Class: KeyEvent

KeyEvent

The key events

new KeyEvent ()

Properties:
Name Type Argument Default Description
KeyEvent.DOM_VK_CANCEL number <optional>
3
KeyEvent.DOM_VK_HELP number <optional>
6
KeyEvent.DOM_VK_BACK_SPACE number <optional>
8
KeyEvent.DOM_VK_TAB number <optional>
9
KeyEvent.DOM_VK_CLEAR number <optional>
12
KeyEvent.DOM_VK_RETURN number <optional>
13
KeyEvent.DOM_VK_ENTER number <optional>
14
KeyEvent.DOM_VK_SHIFT number <optional>
16
KeyEvent.DOM_VK_CONTROL number <optional>
17
KeyEvent.DOM_VK_ALT number <optional>
18
KeyEvent.DOM_VK_PAUSE number <optional>
19
KeyEvent.DOM_VK_CAPS_LOCK number <optional>
20
KeyEvent.DOM_VK_ESCAPE number <optional>
27
KeyEvent.DOM_VK_SPACE number <optional>
32
KeyEvent.DOM_VK_PAGE_UP number <optional>
33
KeyEvent.DOM_VK_PAGE_DOWN number <optional>
34
KeyEvent.DOM_VK_END number <optional>
35
KeyEvent.DOM_VK_HOME number <optional>
36
KeyEvent.DOM_VK_LEFT number <optional>
37
KeyEvent.DOM_VK_UP number <optional>
38
KeyEvent.DOM_VK_RIGHT number <optional>
39
KeyEvent.DOM_VK_DOWN number <optional>
40
KeyEvent.DOM_VK_PRINTSCREEN number <optional>
44
KeyEvent.DOM_VK_INSERT number <optional>
45
KeyEvent.DOM_VK_DELETE number <optional>
46
KeyEvent.DOM_VK_0 number <optional>
48
KeyEvent.DOM_VK_1 number <optional>
49
KeyEvent.DOM_VK_2 number <optional>
50
KeyEvent.DOM_VK_3 number <optional>
51
KeyEvent.DOM_VK_4 number <optional>
52
KeyEvent.DOM_VK_5 number <optional>
53
KeyEvent.DOM_VK_6 number <optional>
54
KeyEvent.DOM_VK_7 number <optional>
55
KeyEvent.DOM_VK_8 number <optional>
56
KeyEvent.DOM_VK_9 number <optional>
57
KeyEvent.DOM_VK_SEMICOLON number <optional>
59
KeyEvent.DOM_VK_EQUALS number <optional>
61
KeyEvent.DOM_VK_A number <optional>
65
KeyEvent.DOM_VK_B number <optional>
66
KeyEvent.DOM_VK_C number <optional>
67
KeyEvent.DOM_VK_D number <optional>
68
KeyEvent.DOM_VK_E number <optional>
69
KeyEvent.DOM_VK_F number <optional>
70
KeyEvent.DOM_VK_G number <optional>
71
KeyEvent.DOM_VK_H number <optional>
72
KeyEvent.DOM_VK_I number <optional>
73
KeyEvent.DOM_VK_J number <optional>
74
KeyEvent.DOM_VK_K number <optional>
75
KeyEvent.DOM_VK_L number <optional>
76
KeyEvent.DOM_VK_M number <optional>
77
KeyEvent.DOM_VK_N number <optional>
78
KeyEvent.DOM_VK_O number <optional>
79
KeyEvent.DOM_VK_P number <optional>
80
KeyEvent.DOM_VK_Q number <optional>
81
KeyEvent.DOM_VK_R number <optional>
82
KeyEvent.DOM_VK_S number <optional>
83
KeyEvent.DOM_VK_T number <optional>
84
KeyEvent.DOM_VK_U number <optional>
85
KeyEvent.DOM_VK_V number <optional>
86
KeyEvent.DOM_VK_W number <optional>
87
KeyEvent.DOM_VK_X number <optional>
88
KeyEvent.DOM_VK_Y number <optional>
89
KeyEvent.DOM_VK_Z number <optional>
90
KeyEvent.DOM_VK_NUMPAD0 number <optional>
96
KeyEvent.DOM_VK_NUMPAD1 number <optional>
97
KeyEvent.DOM_VK_NUMPAD2 number <optional>
98
KeyEvent.DOM_VK_NUMPAD3 number <optional>
99
KeyEvent.DOM_VK_NUMPAD4 number <optional>
100
KeyEvent.DOM_VK_NUMPAD5 number <optional>
101
KeyEvent.DOM_VK_NUMPAD6 number <optional>
102
KeyEvent.DOM_VK_NUMPAD7 number <optional>
103
KeyEvent.DOM_VK_NUMPAD8 number <optional>
104
KeyEvent.DOM_VK_NUMPAD9 number <optional>
105
KeyEvent.DOM_VK_MULTIPLY number <optional>
106
KeyEvent.DOM_VK_ADD number <optional>
107
KeyEvent.DOM_VK_SEPARATOR number <optional>
108
KeyEvent.DOM_VK_SUBTRACT number <optional>
109
KeyEvent.DOM_VK_DECIMAL number <optional>
110
KeyEvent.DOM_VK_DIVIDE number <optional>
111
KeyEvent.DOM_VK_F1 number <optional>
112
KeyEvent.DOM_VK_F2 number <optional>
113
KeyEvent.DOM_VK_F3 number <optional>
114
KeyEvent.DOM_VK_F4 number <optional>
115
KeyEvent.DOM_VK_F5 number <optional>
116
KeyEvent.DOM_VK_F6 number <optional>
117
KeyEvent.DOM_VK_F7 number <optional>
118
KeyEvent.DOM_VK_F8 number <optional>
119
KeyEvent.DOM_VK_F9 number <optional>
120
KeyEvent.DOM_VK_F10 number <optional>
121
KeyEvent.DOM_VK_F11 number <optional>
122
KeyEvent.DOM_VK_F12 number <optional>
123
KeyEvent.DOM_VK_F13 number <optional>
124
KeyEvent.DOM_VK_F14 number <optional>
125
KeyEvent.DOM_VK_F15 number <optional>
126
KeyEvent.DOM_VK_F16 number <optional>
127
KeyEvent.DOM_VK_F17 number <optional>
128
KeyEvent.DOM_VK_F18 number <optional>
129
KeyEvent.DOM_VK_F19 number <optional>
130
KeyEvent.DOM_VK_F20 number <optional>
131
KeyEvent.DOM_VK_F21 number <optional>
132
KeyEvent.DOM_VK_F22 number <optional>
133
KeyEvent.DOM_VK_F23 number <optional>
134
KeyEvent.DOM_VK_F24 number <optional>
135
KeyEvent.DOM_VK_NUM_LOCK number <optional>
144
KeyEvent.DOM_VK_SCROLL_LOCK number <optional>
145
KeyEvent.DOM_VK_COMMA number <optional>
188
KeyEvent.DOM_VK_PERIOD number <optional>
190
KeyEvent.DOM_VK_SLASH number <optional>
191
KeyEvent.DOM_VK_BACK_QUOTE number <optional>
192
KeyEvent.DOM_VK_OPEN_BRACKET number <optional>
219
KeyEvent.DOM_VK_BACK_SLASH number <optional>
220
KeyEvent.DOM_VK_CLOSE_BRACKET number <optional>
221
KeyEvent.DOM_VK_QUOTE number <optional>
222
KeyEvent.DOM_VK_META number <optional>
224
KeyEvent.SQUARE number <optional>
178
KeyEvent.AMPERSAND number <optional>
38
KeyEvent.E_ACCENT_RIGHT number <optional>
201
KeyEvent.TILDE number <optional>
126
KeyEvent.HASH number <optional>
35
KeyEvent.APOSTROPHE number <optional>
39
KeyEvent.LEFT_PARENTHESIS number <optional>
40
KeyEvent.LEFT_BRACES number <optional>
123
KeyEvent.RIGHT_BRACES number <optional>
126
KeyEvent.E_ACCENT_LEFT number <optional>
200
KeyEvent.UNDERSCORE number <optional>
95
KeyEvent.C_UNDER number <optional>
199
KeyEvent.CARAT number <optional>
94
KeyEvent.A_ACCENT number <optional>
192
KeyEvent.AT number <optional>
64
KeyEvent.RIGHT_PARENTHESIS number <optional>
41
KeyEvent.DEGREE number <optional>
176
KeyEvent.TREMA number <optional>
16781911
KeyEvent.CARAT_2 number <optional>
16781906
KeyEvent.POUND number <optional>
163
KeyEvent.DOLLAR number <optional>
36
KeyEvent.YEN number <optional>
164
KeyEvent.U_GRAVE number <optional>
217
KeyEvent.PERCENT number <optional>
37
KeyEvent.MU number <optional>
924
KeyEvent.QUESTION number <optional>
63
KeyEvent.POINT number <optional>
46
KeyEvent.COLON number <optional>
58
KeyEvent.SECTION_SIGN number <optional>
167
KeyEvent.EXCLAMATION number <optional>
33
KeyEvent.ALT_GR number <optional>
16781571
KeyEvent.LESS_THAN number <optional>
60
KeyEvent.GREATER_THAN number <optional>
62

Methods

KeyEvent.qtToDOM (key)number static

Convert Qt key to DOM
Name Type Description
key number The qt key to convert
Returns:
Type Description
number

KeyEvent.isKeyNumberPADPressed (key)boolean static

Check if the pressed key is a PAD number
Name Type Description
key number The key ID
Returns:
Type Description
boolean

KeyEvent.isKeyNumberTopPressed (key)boolean static

Check if the pressed key is a number with shift
Name Type Description
key number The key ID
Returns:
Type Description
boolean

KeyEvent.isKeyNumberPressed (key)boolean static

Check if the pressed key is a number
Name Type Description
key number The key ID
Returns:
Type Description
boolean

KeyEvent.getKeyChar (key)string static

Get the char associated to the key
Name Type Description
key number The key ID
Returns:
Type Description
string

KeyEvent.getKeyString (key)string static

Get the string associated to the key
Name Type Description
key number The key ID
Returns:
Type Description
string