Keyboard event.
More...
#include <KeyboardEvent.h>
Inherits Event.
|
| | KeyboardEvent (KeyCode keyCode, InputPhase phase) |
| | Constructor.
|
| | KeyboardEvent (KeyCode keyCode, InputPhase phase, uint32_t modifiers) |
| | Constructor.
|
| KeyCode | getKeyCode () const |
| | Get the key code.
|
| InputPhase | getPhase () const |
| | Retrieve the phase of this keyboard event.
|
| uint32_t | getModifiers () const |
| | Retrieve the modifiers of this keyboard event.
|
|
| Event (Type type) |
| | Constructor.
|
|
virtual | ~Event () |
| | Destructor.
|
| Type | getType () const |
| | Gets the event type.
|
|
void | stopPropagation () |
| | Stops propagation for current event.
|
| bool | isStopped () const |
| | Checks whether the event has been stopped.
|
| Node * | getCurrentTarget () |
| | Gets current target of the event.
|
| void | retain () |
| | Retains the ownership.
|
| void | release () |
| | Releases the ownership immediately.
|
| Object * | autorelease () |
| | Releases the ownership sometime soon automatically.
|
| unsigned int | getReferenceCount () const |
| | Returns the Object's current reference count.
|
| uint64_t | getObjectID () const noexcept |
| | Returns the process-local diagnostic identifier assigned at construction.
|
| virtual | ~Object () |
| | Destructor.
|
◆ KeyboardEvent() [1/2]
| KeyboardEvent |
( |
KeyCode | keyCode, |
|
|
InputPhase | phase ) |
Constructor.
- Parameters
-
| keyCode | A given keycode. |
| phase | Input phase |
◆ KeyboardEvent() [2/2]
| KeyboardEvent |
( |
KeyCode | keyCode, |
|
|
InputPhase | phase, |
|
|
uint32_t | modifiers ) |
Constructor.
- Parameters
-
| keyCode | A given keycode. |
| phase | Input phase |
| modifiers | identifies any modifier keys that are active |
◆ getKeyCode()
Get the key code.
- Returns
- The key code associated with this event.
◆ getPhase()
| InputPhase getPhase |
( |
| ) |
const |
|
inline |
Retrieve the phase of this keyboard event.
Returns the input phase that describes the current state of the keyboard interaction, such as when a key is pressed, released, or held in repeat mode.
- Returns
- InputPhase enumeration value indicating the event phase:
- InputPhase::KeyDown when the key is pressed
- InputPhase::KeyUp when the key is released
- InputPhase::KeyRepeat when the key is repeating
- Note
- This reflects only the state of this KeyboardEvent instance and does not query the global keyboard state.
◆ getModifiers()
| uint32_t getModifiers |
( |
| ) |
const |
|
inline |
Retrieve the modifiers of this keyboard event.
Returns the modifier keys
- Returns
- uint32_t bitmasked value of modifier keys as declared in KeyModifier
The documentation for this class was generated from the following file: