1 #ifndef __blip_KeyEvent_hpp 2 #define __blip_KeyEvent_hpp 7 #include <commonc++/Flags.h++> 31 K_Call,
K_EndCall,
K_0,
K_1,
K_2,
K_3,
K_4,
K_5,
K_6,
K_7,
35 K_G,
K_H,
K_I,
K_J,
K_K,
K_L,
K_M,
K_N,
K_O,
K_P,
K_Q,
K_R,
36 K_S,
K_T,
K_U,
K_V,
K_W,
K_X,
K_Y,
K_Z,
K_Comma,
K_Period,
53 K_F1,
K_F2,
K_F3,
K_F4,
K_F5,
K_F6,
K_F7,
K_F8,
K_F9,
K_F10,
80 const ccxx::Flags<int32_t>
getFlags()
const;
240 #endif // __blip_KeyEvent_hpp Definition: KeyEvent.hpp:31
Definition: KeyEvent.hpp:65
Definition: KeyEvent.hpp:45
Definition: KeyEvent.hpp:69
Definition: KeyEvent.hpp:39
Definition: KeyEvent.hpp:31
Definition: KeyEvent.hpp:63
Definition: KeyEvent.hpp:47
Definition: KeyEvent.hpp:64
Definition: KeyEvent.hpp:48
Definition: KeyEvent.hpp:55
Definition: KeyEvent.hpp:36
bool isCapsLockPressed() const
Test if the Caps Lock key was pressed at the time of this event.
Definition: KeyEvent.cpp:251
Definition: KeyEvent.hpp:46
Definition: KeyEvent.hpp:41
Definition: KeyEvent.hpp:35
Definition: KeyEvent.hpp:43
bool isRightControlPressed() const
Test if the right Control key was pressed at the time of this event.
Definition: KeyEvent.cpp:278
static const uint32_t ALT_ANY_MASK
A mask for testing if any Alt key was pressed.
Definition: KeyEvent.hpp:174
Definition: KeyEvent.hpp:46
bool isFunctionPressed() const
Test if the Function key was pressed at the time of this event.
Definition: KeyEvent.cpp:287
Definition: KeyEvent.hpp:60
Definition: KeyEvent.hpp:59
static const uint32_t META_ANY_MASK
A mask for testing if any Meta key was pressed.
Definition: KeyEvent.hpp:204
Definition: KeyEvent.hpp:35
Definition: KeyEvent.hpp:41
Definition: KeyEvent.hpp:36
virtual ~KeyEvent()
Destructor.
Definition: KeyEvent.cpp:49
bool isLeftControlPressed() const
Test if the left Control key was pressed at the time of this event.
Definition: KeyEvent.cpp:269
Definition: KeyEvent.hpp:54
static const uint32_t CTRL_LEFT_MASK
A mask for testing if the left Control key was pressed.
Definition: KeyEvent.hpp:183
Definition: KeyEvent.hpp:66
Definition: KeyEvent.hpp:57
Definition: KeyEvent.hpp:66
bool isScrollLockPressed() const
Test if the Scroll Lock key was pressed at the time of this event.
Definition: KeyEvent.cpp:305
Definition: KeyEvent.hpp:46
Definition: KeyEvent.hpp:31
Definition: KeyEvent.hpp:51
Definition: KeyEvent.hpp:34
Definition: KeyEvent.hpp:32
Definition: KeyEvent.hpp:68
Definition: KeyEvent.hpp:32
Definition: KeyEvent.hpp:62
Definition: KeyEvent.hpp:59
Definition: KeyEvent.hpp:45
Definition: KeyEvent.hpp:53
int getRepeatCount() const
Get the repeat count for this event.
Definition: KeyEvent.cpp:191
Definition: KeyEvent.hpp:35
Definition: KeyEvent.hpp:68
Definition: KeyEvent.hpp:53
Definition: KeyEvent.hpp:70
Action getAction() const
Get the keypress action for this event.
Definition: KeyEvent.cpp:64
Definition: KeyEvent.hpp:37
Definition: KeyEvent.hpp:69
Definition: KeyEvent.hpp:45
Definition: KeyEvent.hpp:30
Definition: KeyEvent.hpp:48
Definition: KeyEvent.hpp:68
Definition: KeyEvent.hpp:60
Definition: KeyEvent.hpp:57
Definition: KeyEvent.hpp:68
Definition: KeyEvent.hpp:54
Definition: KeyEvent.hpp:71
Definition: KeyEvent.hpp:36
Definition: KeyEvent.hpp:62
Definition: KeyEvent.hpp:53
Definition: KeyEvent.hpp:34
Definition: KeyEvent.hpp:46
Definition: KeyEvent.hpp:67
Definition: KeyEvent.hpp:67
Definition: KeyEvent.hpp:49
Definition: KeyEvent.hpp:42
Definition: KeyEvent.hpp:30
Definition: KeyEvent.hpp:31
Definition: KeyEvent.hpp:35
Definition: KeyEvent.hpp:65
Definition: KeyEvent.hpp:69
bool isControlPressed() const
Test if either Control key was pressed at the time of this event.
Definition: KeyEvent.cpp:260
time_ms_t getDownTime() const
Get the amount of time that the key was held down.
Definition: KeyEvent.cpp:199
Definition: KeyEvent.hpp:65
Definition: KeyEvent.hpp:52
Definition: KeyEvent.hpp:61
Definition: KeyEvent.hpp:31
bool isShiftPressed() const
Test if either Shift key was pressed at the time of this event.
Definition: KeyEvent.cpp:314
Definition: KeyEvent.hpp:38
Action
Keypress actions.
Definition: KeyEvent.hpp:24
Definition: KeyEvent.hpp:60
Definition: KeyEvent.hpp:60
Definition: KeyEvent.hpp:43
Definition: KeyEvent.hpp:56
Definition: KeyEvent.hpp:36
Definition: KeyEvent.hpp:50
Definition: KeyEvent.hpp:53
Definition: KeyEvent.hpp:50
Definition: KeyEvent.hpp:35
Definition: KeyEvent.hpp:42
Definition: KeyEvent.hpp:62
Definition: KeyEvent.hpp:42
Definition: KeyEvent.hpp:36
Definition: KeyEvent.hpp:35
Definition: KeyEvent.hpp:68
Definition: KeyEvent.hpp:61
static const uint32_t FUNCTION_MASK
A mask for testing if the Function key was pressed.
Definition: KeyEvent.hpp:192
Definition: KeyEvent.hpp:35
Definition: KeyEvent.hpp:34
Definition: KeyEvent.hpp:24
Definition: KeyEvent.hpp:40
static const uint32_t META_MASK
A mask for testing if either Meta key was pressed.
Definition: KeyEvent.hpp:195
char getCharacter() const
Get the ASCII character represented by this event.
Definition: KeyEvent.cpp:96
Definition: KeyEvent.hpp:45
Definition: KeyEvent.hpp:44
Definition: KeyEvent.hpp:33
static const uint32_t ALT_RIGHT_MASK
A mask for testing if the right Alt key was pressed.
Definition: KeyEvent.hpp:171
Definition: KeyEvent.hpp:34
Definition: KeyEvent.hpp:50
Definition: KeyEvent.hpp:55
Definition: KeyEvent.hpp:36
Definition: KeyEvent.hpp:35
static const uint32_t ALT_LEFT_MASK
A mask for testing if the left Alt key was pressed.
Definition: KeyEvent.hpp:168
Definition: KeyEvent.hpp:32
Definition: KeyEvent.hpp:49
Definition: KeyEvent.hpp:64
Definition: KeyEvent.hpp:38
Definition: KeyEvent.hpp:51
Definition: KeyEvent.hpp:35
Definition: KeyEvent.hpp:31
Definition: KeyEvent.hpp:40
Definition: KeyEvent.hpp:39
Definition: KeyEvent.hpp:38
Definition: KeyEvent.hpp:55
Definition: KeyEvent.hpp:56
WAV file format details at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/.
Definition: AccelerometerSensorEvent.cpp:3
Definition: KeyEvent.hpp:34
Definition: KeyEvent.hpp:31
Definition: KeyEvent.hpp:58
static const uint32_t SYM_MASK
A mask for testing if the Sym key was pressed.
Definition: KeyEvent.hpp:225
Definition: KeyEvent.hpp:64
Definition: KeyEvent.hpp:34
static const uint32_t CTRL_MASK
A mask for testing if either Control key was pressed.
Definition: KeyEvent.hpp:180
Definition: KeyEvent.hpp:56
Definition: KeyEvent.hpp:60
Definition: KeyEvent.hpp:37
bool isRightShiftPressed() const
Test if the right Shift key was pressed at the time of this event.
Definition: KeyEvent.cpp:332
bool isMetaKeyPressed() const
Test if any modifier key was pressed at the time of this event.
Definition: KeyEvent.cpp:215
static const uint32_t META_RIGHT_MASK
A mask for testing if the right Meta key was pressed.
Definition: KeyEvent.hpp:201
static const uint32_t META_LEFT_MASK
A mask for testing if the left Meta key was pressed.
Definition: KeyEvent.hpp:198
virtual time_ms_t getEventTime() const
Get the time at which this event occurred.
Definition: KeyEvent.cpp:207
Definition: KeyEvent.hpp:64
Definition: KeyEvent.hpp:53
Definition: KeyEvent.hpp:52
Definition: KeyEvent.hpp:54
Definition: KeyEvent.hpp:48
Definition: KeyEvent.hpp:36
Definition: KeyEvent.hpp:70
Definition: KeyEvent.hpp:55
Definition: KeyEvent.hpp:56
Definition: KeyEvent.hpp:44
Definition: KeyEvent.hpp:40
Definition: KeyEvent.hpp:44
Definition: KeyEvent.hpp:30
Definition: KeyEvent.hpp:38
Definition: KeyEvent.hpp:30
Definition: KeyEvent.hpp:43
bool isLeftAltPressed() const
Test if the left Alt key was pressed at the time of this event.
Definition: KeyEvent.cpp:233
Definition: KeyEvent.hpp:61
Definition: KeyEvent.hpp:38
static const uint32_t CAPS_LOCK_MASK
A mask for testing if the Caps Lock key was pressed.
Definition: KeyEvent.hpp:177
static const uint32_t SHIFT_MASK
A mask for testing if either Shift key was pressed.
Definition: KeyEvent.hpp:213
Definition: KeyEvent.hpp:50
Definition: KeyEvent.hpp:36
Definition: KeyEvent.hpp:54
Definition: KeyEvent.hpp:24
Definition: KeyEvent.hpp:46
Definition: KeyEvent.hpp:38
Definition: KeyEvent.hpp:53
Definition: KeyEvent.hpp:42
Definition: KeyEvent.hpp:70
Definition: KeyEvent.hpp:66
Definition: KeyEvent.hpp:32
Definition: KeyEvent.hpp:49
KeyCode getKeyCode() const
Get the keycode for this event.
Definition: KeyEvent.cpp:87
Definition: KeyEvent.hpp:24
Definition: KeyEvent.hpp:54
Definition: KeyEvent.hpp:30
Definition: KeyEvent.hpp:53
Definition: KeyEvent.hpp:70
Definition: KeyEvent.hpp:57
Definition: KeyEvent.hpp:66
Definition: KeyEvent.hpp:64
Definition: KeyEvent.hpp:39
Definition: KeyEvent.hpp:40
Definition: KeyEvent.hpp:63
Definition: KeyEvent.hpp:52
Definition: KeyEvent.hpp:32
Definition: KeyEvent.hpp:62
Definition: KeyEvent.hpp:31
Definition: KeyEvent.hpp:53
Definition: KeyEvent.hpp:33
Definition: KeyEvent.hpp:40
static const uint32_t ALT_MASK
A mask for testing if either Alt key was pressed.
Definition: KeyEvent.hpp:165
Definition: KeyEvent.hpp:69
static const uint32_t CTRL_ANY_MASK
A mask for testing if any Control key was pressed.
Definition: KeyEvent.hpp:189
Definition: KeyEvent.hpp:65
KeyCode
Key codes.
Definition: KeyEvent.hpp:30
Definition: KeyEvent.hpp:35
const ccxx::Flags< int32_t > getFlags() const
Get the flags associated with this event.
Definition: KeyEvent.cpp:56
Definition: KeyEvent.hpp:67
Definition: KeyEvent.hpp:52
Definition: KeyEvent.hpp:34
Definition: KeyEvent.hpp:36
Definition: KeyEvent.hpp:61
Definition: KeyEvent.hpp:40
static const uint32_t SHIFT_ANY_MASK
A mask for testing if any Shift key was pressed.
Definition: KeyEvent.hpp:222
Definition: KeyEvent.hpp:33
Definition: KeyEvent.hpp:63
A keyboard input event.
Definition: KeyEvent.hpp:17
Definition: KeyEvent.hpp:49
Definition: KeyEvent.hpp:41
Definition: KeyEvent.hpp:51
int32_t getMetaState() const
Get the state of the modifier keys at the time of this event.
Definition: KeyEvent.cpp:183
Definition: KeyEvent.hpp:43
Definition: KeyEvent.hpp:34
Definition: KeyEvent.hpp:31
Definition: KeyEvent.hpp:32
Definition: KeyEvent.hpp:36
Definition: KeyEvent.hpp:39
Definition: KeyEvent.hpp:62
Definition: KeyEvent.hpp:51
Definition: KeyEvent.hpp:37
bool isSymPressed() const
Test if the Sym key was pressed at the time of this event.
Definition: KeyEvent.cpp:341
bool isRightAltPressed() const
Test if the right Alt key was pressed at the time of this event.
Definition: KeyEvent.cpp:242
Definition: KeyEvent.hpp:47
Definition: KeyEvent.hpp:41
Definition: KeyEvent.hpp:71
Definition: KeyEvent.hpp:35
Definition: KeyEvent.hpp:67
Definition: KeyEvent.hpp:66
Definition: KeyEvent.hpp:53
Definition: KeyEvent.hpp:41
bool isAltPressed() const
Test if either Alt key was pressed at the time of this event.
Definition: KeyEvent.cpp:224
Definition: KeyEvent.hpp:59
bool isNumLockPressed() const
Test if the Num Lock key was pressed at the time of this event.
Definition: KeyEvent.cpp:296
static const uint32_t NUM_LOCK_MASK
A mask for testing if the Num Lock key was pressed.
Definition: KeyEvent.hpp:207
Definition: KeyEvent.hpp:37
Definition: KeyEvent.hpp:63
Definition: KeyEvent.hpp:59
Definition: KeyEvent.hpp:35
static const uint32_t SHIFT_LEFT_MASK
A mask for testing if the left Shift key was pressed.
Definition: KeyEvent.hpp:216
Definition: KeyEvent.hpp:25
Definition: KeyEvent.hpp:47
Definition: KeyEvent.hpp:53
Definition: KeyEvent.hpp:71
Definition: KeyEvent.hpp:65
Definition: KeyEvent.hpp:44
Definition: KeyEvent.hpp:48
Definition: KeyEvent.hpp:55
Definition: KeyEvent.hpp:31
Definition: KeyEvent.hpp:37
static const uint32_t SHIFT_RIGHT_MASK
A mask for testing if the right Shift key was pressed.
Definition: KeyEvent.hpp:219
Definition: KeyEvent.hpp:54
Definition: KeyEvent.hpp:63
Definition: KeyEvent.hpp:58
Definition: KeyEvent.hpp:32
Definition: KeyEvent.hpp:57
Definition: KeyEvent.hpp:34
Definition: KeyEvent.hpp:33
Definition: KeyEvent.hpp:70
static const uint32_t SCROLL_LOCK_MASK
A mask for testing if the Scroll Lock key was pressed.
Definition: KeyEvent.hpp:210
Definition: KeyEvent.hpp:51
Definition: KeyEvent.hpp:50
Definition: KeyEvent.hpp:61
bool isLeftShiftPressed() const
Test if the left Shift key was pressed at the time of this event.
Definition: KeyEvent.cpp:323
Definition: KeyEvent.hpp:58
static const uint32_t CTRL_RIGHT_MASK
A mask for testing if the right Control key was pressed.
Definition: KeyEvent.hpp:186
int32_t getScanCode() const
Get the scancode for this event.
Definition: KeyEvent.cpp:175
Definition: KeyEvent.hpp:45
Definition: KeyEvent.hpp:39