
The event layout is similar to the one provided by the SDL. See the SDL documentation for further information on this event. Listeners may choose to consume the event via the KeyEvent::consume() function. Subsequent listeners should check if an incoming event was consumed and should ignore it if it is. However, this behavior is not mandatory and should not be assumed.
Public Types | |
| enum | Type { KEY_DOWN = SDL_KEYDOWN, KEY_UP = SDL_KEYUP } |
Public Member Functions | |
| void | consume () |
| marks the event as consumed | |
| Event (KeyDispatcher *src) | |
| creates a new event. | |
| const SDL_keysym & | getKeysym () const |
| accesses the keysym | |
| KeyDispatcher * | getSource () const |
| provides access to the source of the event. | |
| Type | getType () const |
| accesses the type of the event | |
| bool | isConsumed () const |
| checks if the event is marked as consumed | |
| KeyEvent (KeyDispatcher *src, const SDL_keysym &ksym, Type tp) | |
| KeyEvent (const SDL_KeyboardEvent &e) | |
creates a KeyEvent equivalent to the given SDL event | |
|
|
|
|
|
creates a
|
|
||||||||||||||||
|
|
|
|
marks the event as consumed In most cases, it is not appropriate to further process consumed events. However, such events are generally still dispatched to the rest of the registered listeners. |
|
|
creates a new event.
|
|
|
accesses the keysym See the SDL documentation for information on keysyms.
|
|
|
provides access to the source of the event.
The source of an event is the
|
|
|
accesses the type of the event The event represents either a pressed or a released key.
|
|
|
checks if the event is marked as consumed
See |
1.4.3