KeyboardEventInfo¶
API 1.36+
| Property | Type | Description |
|---|---|---|
| type | string | Event type: rawkeydown keydown keyup keypress Note: in most cases you’ll want to send keydown followed by keypress followed by keyup with the pressed key indicated by key or charCode. |
| key | string (1 char) | Optional. The character which was pressed. Note: if you specify this property, you must not specify charCode since it will override the value of this property. |
| charCode | number | Optional. Character code of the character which was pressed. Note: this property overrides the value of key. |
| code | number | Optional. Platform-specific virtual key code. It is unlikely you’ll want to use this property, however, it is supported for the sake of completeness. |
| altKey | bool | Optional. Alt key is pressed |
| ctrlKey | bool | Optional. Ctrl key is pressed |
| metaKey | bool | Optional. Windows or Command key are pressed |
| shiftKey | bool | Optional. Shift is pressed |
| capsLock | bool | Optional. Caps-lock is active |
| numLock | bool | Optional. Num-lock is active |
| leftMouseButton | bool | Optional. Primary (left) mouse button is pressed |
| rightMouseButton | bool | Optional. Secondary (right) mouse button is pressed |
| auxiliaryMouseButton | bool | Optional. Auxiliary (middle) mouse button is pressed |
| location | string | Optional. Indicates location of the pressed key if relevant. left – left key right – right key numPad / keyPad – numeric keypad |