|
libtcod
|
Libtcod key event data, as a keycode or text character. More...
#include <console_types.h>
Public Attributes | |
| TCOD_keycode_t | vk |
| The TCOD_keycode_t enum of the current key. | |
| char | c |
| The printable character of a keycode if vk == TCODK_CHAR, else 0. | |
| char | text [TCOD_KEY_TEXT_SIZE] |
| The UTF-8 text of a key when vk == TCODK_TEXT. | |
| bool | pressed |
| True if is this key was pressed. | |
| bool | lalt |
| True if left alt was held during this event. | |
| bool | lctrl |
| True if left control was held during this event. | |
| bool | lmeta |
| True if the left meta key was held during this event. | |
| bool | ralt |
| True if right alt was held during this event. | |
| bool | rctrl |
| True if right control was held during this event. | |
| bool | rmeta |
| True if the right meta key was held during this event. | |
| bool | shift |
| True if shift was held during this event. | |
Libtcod key event data, as a keycode or text character.
| char TCOD_key_t::c |
The printable character of a keycode if vk == TCODK_CHAR, else 0.
Libtcod 1.6 switched form SDL1 to SDL2 which changed the values returned by this attribute.
Before 1.6 this value could be affected by modifiers such as the shift key.
After 1.6 the SDL key symbol is always returned, which will be the same no matter which modifiers are held.
| bool TCOD_key_t::pressed |
True if is this key was pressed.
False if it was released.
| char TCOD_key_t::text[TCOD_KEY_TEXT_SIZE] |
The UTF-8 text of a key when vk == TCODK_TEXT.
Otherwise this will always be '\0'.
TCODK_TEXT is always derived from an SDL_TEXTINPUT event.