Keyboard event. More...
#include <gelEvent.h>
Public Member Functions | |
GelKeyEvent (EventType tp, Key ky, int ch, KeyModifier modifiers) | |
Constructor. | |
Key | getKey () const |
Gets the key that triggered this event. | |
int | getChar () const |
Gets the printable character generated by the key that triggered this event. | |
KeyModifier | getModifiers () const |
Gets all modifier keys that were pressed. |
Keyboard event.
gel::GelKeyEvent::GelKeyEvent | ( | EventType | tp, |
Key | ky, | ||
int | ch, | ||
KeyModifier | modifiers | ||
) |
Constructor.
tp | : The event type. Must be KeyPressed or KeyReleased. |
ky | : The key that was pressed. |
ch | : Unicode character that the key generated. |
modifiers | : Key modifiers. |
Key gel::GelKeyEvent::getKey | ( | ) | const [inline] |
Gets the key that triggered this event.
int gel::GelKeyEvent::getChar | ( | ) | const [inline] |
Gets the printable character generated by the key that triggered this event.
This function will return 0 if the key does not generate a printable character, (i.e. modifier keys like Shift, Control, etc.).
KeyModifier gel::GelKeyEvent::getModifiers | ( | ) | const [inline] |
Gets all modifier keys that were pressed.
API Documentation by Mark D. Procarione | Generated by |