< index < 2. Console < 2.3 Handling keyboard input | ===================================== 2.3.4 Keyboard event structure ===================================== |

    typedef struct {
    	TCOD_keycode_t vk;
    	char c;
    	unsigned pressed : 1;
    	unsigned lalt : 1;
    	unsigned lctrl : 1;
    	unsigned ralt : 1;
    	unsigned rctrl : 1;
    	unsigned shift : 1;
    } TCOD_key_t;

This structure contains information about a key pressed/released by the user.

Field | Description
--- | ---
vk | An arbitrary value representing the physical key on the keyboard. Possible values are stored in the TCOD_keycode_t enum. If no key was pressed, the value is TCODK_NONE
c | If the key correspond to a printable character, the character is stored in this field. Else, this field contains 0.
pressed | 1 if the event is a key pressed, or 0 for a key released.
lalt | This field represents the status of the left Alt key : 1 => pressed, 0 => released.
lctrl | This field represents the status of the left Control key : 1 => pressed, 0 => released.
ralt | This field represents the status of the right Alt key : 1 => pressed, 0 => released.
rctrl | This field represents the status of the right Control key : 1 => pressed, 0 => released.
shift | This field represents the status of the shift key : 1 => pressed, 0 => released.