#include <system.h>
Public Attributes | |
ulong | controlKeyState |
ushort | keyCode |
CharScanType | charScan |
The KeyDownEvent structure is a union of keyCode (a ushort) and charScan (of type struct CharScanType). These two members represent two ways of viewing the same data: either as a scan code or as a key code.
Scan codes are what your program receives from the keyboard, while key codes are usually needed in a switch statement.
See file `tkeys.h' for a list of keycodes.
Definition at line 239 of file system.h.
|
The same as above, but splitted in its two components.
|
|
Stores the status of the control keys when the event happened. The following values define keyboard states, and can be used when examining the keyboard shift state:
Constant Value Meaning kbRightShift 0x0001 Set if the Right Shift key is currently down kbLeftShift 0x0002 Set if the Left Shift key is currently down kbCtrlShift 0x0004 Set if the Ctrl key is currently down kbAltShift 0x0008 Set if the Alt key is currently down kbScrollState 0x0010 Set if the keyboard is in the Scroll Lock state kbNumState 0x0020 Set if the keyboard is in the Num Lock state kbCapsState 0x0040 Set if the keyboard is in the Caps Lock state kbInsState 0x0080 Set if the keyboard is in the Ins Lock state Its value is 0 if none of these keys was pressed. Warning: this information is not reliable. Its value depends on your operating system and libraries (gpm, ncurses). Usually only a subset of these flags are detected. See file `system.cc' for details. |
|
This is the key code. It is the concatenation of the scan code and the character code.
|