![]() |
NDEVR
API Documentation
|
Describes a user key press event used to trigger behavior in the NDEVR API. More...
Public Types | |
| enum | KEY |
| enum | KeyEentType { e_key_unspecified , e_key_pressed , e_key_released } |
| The action taken with the key The type of the KeyEvent determines how the program will react. More... | |
| enum | KeyModifier { e_shift = 0x01 , e_ctrl = 0x02 , e_function = 0x04 , e_alt = 0x08 , e_meta = 0x10 } |
| Modifiers describe a second key which affects the behavior of the key being pressed. More... | |
Public Member Functions | |
| KeyEvent () | |
| Constructs a default KeyEvent with no key, modifier, or type set. | |
| KeyEvent (KEY key_type, uint01 key_modifier=0, KeyEentType event_type=KeyEentType::e_key_unspecified) | |
| Constructs a KeyEvent with the specified key, modifier, and event type. | |
| bool | operator== (const KeyEvent &other) const |
| Checks equality between two KeyEvent objects. | |
| char | toChar () const |
| Converts this key event to its corresponding ASCII character. | |
Public Attributes | |
| KeyEentType | event_type |
| The type of key action (pressed, released, or unspecified). | |
| uint01 | key_modifier |
| Bitmask of active KeyModifier flags during this event. | |
| KEY | key_type |
| The virtual key code associated with this event. | |
Describes a user key press event used to trigger behavior in the NDEVR API.
| enum KeyEvent::KEY |
The action taken with the key The type of the KeyEvent determines how the program will react.
| Enumerator | |
|---|---|
| e_key_unspecified | Unspecified key action. |
| e_key_pressed | Key is pushed to the 'down' position. |
| e_key_released | After key pressed, key returns to default 'up' position. |
|
inline |
Constructs a KeyEvent with the specified key, modifier, and event type.
| [in] | key_type | The virtual key code that was pressed or released. |
| [in] | key_modifier | Bitmask of KeyModifier values active during the event. |
| [in] | event_type | Whether the key was pressed, released, or unspecified. |
Definition at line 285 of file Event.h.
References e_key_unspecified, event_type, key_modifier, and key_type.
|
inline |
Checks equality between two KeyEvent objects.
| [in] | other | The KeyEvent to compare against. |
Definition at line 298 of file Event.h.
References KeyEvent(), event_type, key_modifier, and key_type.
| char KeyEvent::toChar | ( | ) | const |
Converts this key event to its corresponding ASCII character.