The KeyboardEvent class is the event generated for each key press and release. More...
#include <hps.h>


Public Types | |
| enum | Action : uint32_t { Action::None, Action::KeyDown, Action::KeyUp } |
| Enumeration of various states keyboard codes can have for a KeyboardEvent. More... | |
| enum | Status : uint32_t { Status::InProgress, Status::Completed, Status::Failed } |
| Event Status - returned from a notifier to give the status of the event. More... | |
Public Member Functions | |
| KeyboardEvent () | |
| The default constructor creates a KeyboardEvent object with no current action nor any keyboard codes. More... | |
| KeyboardEvent (KeyboardEvent::Action in_action, ModifierKeys in_modifiers=ModifierKeys()) | |
| This constructor creates a KeyboardEvent object for a given action without any keyboard codes. More... | |
| KeyboardEvent (KeyboardEvent::Action in_action, size_t in_keyboardcode_count, HPS::KeyboardCode const in_keyboardcodes[], ModifierKeys in_modifiers=ModifierKeys()) | |
| This constructor creates a KeyboardEvent object for a given action with a list of keyboard codes. More... | |
| KeyboardEvent (KeyboardEvent::Action in_action, KeyboardCodeArray const &in_keyboardcodes, ModifierKeys in_modifiers=ModifierKeys()) | |
| This constructor creates a KeyboardEvent object for a given action with a list of keyboard codes. More... | |
| KeyboardEvent (Event const &in_event) | |
| This constructor converts an Event Object to a MouseEvent object. More... | |
| ~KeyboardEvent () | |
| Event * | Clone () const |
| Allocates and returns a copy of this KeyboardEvent. More... | |
| virtual bool | Equals (InputEvent const &in_that) const |
| Check if the source object is equivalent to this object. More... | |
| virtual bool | Equals (KeyboardEvent const &in_that) const |
| Check if the source object is equivalent to this object. More... | |
| virtual bool | operator== (KeyboardEvent const &in_that) const |
| Check if the source object is equivalent to this object. More... | |
| virtual bool | operator!= (KeyboardEvent const &in_that) const |
| Check if the source object is not equivalent to this object. More... | |
| void | SetKeyboardCodes (size_t in_keyboardcode_count, HPS::KeyboardCode const in_keyboardcodes[]) |
| Sets the keyboard codes for this KeyboardEvent. More... | |
| void | SetKeyboardCodes (HPS::KeyboardCodeArray const &in_keyboardcodes) |
| Sets the keyboard codes for this KeyboardEvent. More... | |
| virtual bool | operator== (InputEvent const &in_that) const |
| Check if the source object is equivalent to this object. More... | |
| virtual bool | operator!= (InputEvent const &in_that) const |
| Check if the source object is not equivalent to this object. More... | |
| ModifierKeys | GetModifierKeys () const |
| Queries which modifier keys are active. More... | |
| intptr_t | GetClassID () const |
| Returns a unique identifier that is shared by all objects of the same class. More... | |
| virtual bool | Drop (Event const *in_that_event) const |
| This optional function is used to determine if the current event can be dropped based on the following event in the queue. More... | |
| virtual intptr_t | Freshen () const |
| This optional function is used to determine if the current event can be dropped in favor of newer event of the same type if one is available. More... | |
| intptr_t | GetChannel () const |
| Returns the channel ID assigned to an event. More... | |
| Time | GetTimeStamp () const |
| Returns the time an event was injected into the event queue. More... | |
| bool | IsConsumable () const |
| Indicates whether an event will be consumed when it is handled or passed on to the next handler anyway. More... | |
Static Public Member Functions | |
| static void * | operator new (size_t in_size) |
| static void | operator delete (void *in_ptr, size_t in_size) throw () |
Public Attributes | |
| HPS::KeyboardCodeArray | KeyboardCodes |
| Array of keyboard codes for this KeyboardEvent. More... | |
| HPS::KeyboardEvent::Action | CurrentAction |
| The action for the keyboard codes for this KeyboardEvent. More... | |
| ModifierKeys | ModifierKeyState |
| The modifier keys which are active for this InputEvent. More... | |
Protected Attributes | |
| intptr_t | channel |
| bool | consumable |
The KeyboardEvent class is the event generated for each key press and release.
|
strong |
Enumeration of various states keyboard codes can have for a KeyboardEvent.
| Enumerator | |
|---|---|
| None | Key is not currently pressed, nor was it just released. |
| KeyDown | Key was pressed. |
| KeyUp | Key was released. |
|
stronginherited |
|
inline |
The default constructor creates a KeyboardEvent object with no current action nor any keyboard codes.
|
inline |
This constructor creates a KeyboardEvent object for a given action without any keyboard codes.
| in_action | Action of the keys for this KeyboardEvent. |
| in_modifiers | The modifier keys for this KeyboardEvent. |
|
inline |
This constructor creates a KeyboardEvent object for a given action with a list of keyboard codes.
| in_action | Action of the keys for this KeyboardEvent. |
| in_keyboardcode_count | Size of the following array. |
| in_keyboardcodes | Array of the keyboard codes for this KeyboardEvent. |
| in_modifiers | The modifier keys for this KeyboardEvent. |
|
inline |
This constructor creates a KeyboardEvent object for a given action with a list of keyboard codes.
| in_action | Action of the keys for this KeyboardEvent. |
| in_keyboardcodes | Array of the keyboard codes for this KeyboardEvent. |
| in_modifiers | The modifier keys for this KeyboardEvent. |
|
inline |
This constructor converts an Event Object to a MouseEvent object.

| HPS::KeyboardEvent::~KeyboardEvent | ( | ) |
|
inlinevirtual |
Allocates and returns a copy of this KeyboardEvent.
Reimplemented from HPS::InputEvent.
|
inlinevirtualinherited |
This optional function is used to determine if the current event can be dropped based on the following event in the queue.
Reimplemented in HPS::MouseEvent, HPS::TouchEvent, HPS::TimerTickEvent, HPS::SmoothTransitionCompleteEvent, and HPS::CameraChangedEvent.
|
inlinevirtual |
Check if the source object is equivalent to this object.
| in_kit | The source object to compare to this object. |
Reimplemented from HPS::InputEvent.

|
inlinevirtual |
Check if the source object is equivalent to this object.
| in_that | The source object to compare to this object. |

|
inlinevirtualinherited |
This optional function is used to determine if the current event can be dropped in favor of newer event of the same type if one is available.
Reimplemented in HPS::MouseEvent, HPS::TimerTickEvent, and HPS::CameraChangedEvent.
|
inlineinherited |
Returns the channel ID assigned to an event.

|
inherited |
Returns a unique identifier that is shared by all objects of the same class.

|
inlineinherited |
Queries which modifier keys are active.
|
inlineinherited |
Returns the time an event was injected into the event queue.
|
inlineinherited |
Indicates whether an event will be consumed when it is handled or passed on to the next handler anyway.
|
inlinestaticinherited | ||||||||||||||||||||

|
inlinestaticinherited |

|
inlinevirtualinherited |
Check if the source object is not equivalent to this object.
| in_that | The source object to compare to this object. |
|
inlinevirtual |
Check if the source object is not equivalent to this object.
| in_that | The source object to compare to this object. |
|
inlinevirtualinherited |
Check if the source object is equivalent to this object.
| in_that | The source object to compare to this object. |
|
inlinevirtual |
Check if the source object is equivalent to this object.
| in_that | The source object to compare to this object. |
|
inline |
Sets the keyboard codes for this KeyboardEvent.
| in_keyboardcode_count | Size of the following array. |
| in_keyboardcodes | Array of the keyboard codes for this KeyboardEvent. |
|
inline |
Sets the keyboard codes for this KeyboardEvent.
| in_keyboardcodes | Array of the keyboard codes for this KeyboardEvent. |
|
protectedinherited |
|
protectedinherited |
| HPS::KeyboardEvent::Action HPS::KeyboardEvent::CurrentAction |
The action for the keyboard codes for this KeyboardEvent.
| HPS::KeyboardCodeArray HPS::KeyboardEvent::KeyboardCodes |
Array of keyboard codes for this KeyboardEvent.
|
inherited |
The modifier keys which are active for this InputEvent.