Function TCOD_console_wait_for_keypress

Function Documentation

TCOD_key_t TCOD_console_wait_for_keypress(bool flush)

Wait for a key press event, then return it.

Do not solve input lag issues by arbitrarily dropping events!

Parameters

flush – If 1 then the event queue will be cleared before waiting for the next event. This should always be 0.

Returns

A TCOD_key_t struct with the most recent key data.