natiny_input_get_key_released
bool natiny_input_get_key_released(uint32_t key);
Returns true only on the frame when the specified key was released.
Parameters
| Name | Type | Description |
|---|---|---|
key |
uint32_t |
Key code - a NATINY_INPUT_KEY_* constant |
Returns
| Type | Description |
|---|---|
bool |
true on the frame the key was released, false otherwise |
Example
if (natiny_input_get_key_released(NATINY_INPUT_KEY_ESCAPE))
close_menu();
Notes
- Returns
truefor the frame that consumes a pressed-to-released transition. - Key constants are listed in Key codes.