KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches

Keyboard key state bit flags More...

Macros

#define KEY_STATE_IS_DOWN   BIT(0)
 If key is currenty down.
 
#define KEY_STATE_WAS_DOWN   BIT(1)
 If key was previously down.
 
#define KEY_STATE_MASK   (KEY_STATE_IS_DOWN | KEY_STATE_WAS_DOWN)
 Mask of all key state flags.
 

Detailed Description

Keyboard key state bit flags

A key_state_t is a combination of two flags:

  1. KEY_STATE_IS_DOWN: whether the key is currently pressed this frame.
  2. KEY_STATE_WAS_DOWN: whether the key was previously pressed last frame.

Between these two flags, you can know whether a key state transition event has occurred (when the two flags have different values).

See also
key_state_t::raw, key_state_value_t

Macro Definition Documentation

◆ KEY_STATE_IS_DOWN

#define KEY_STATE_IS_DOWN   BIT(0)

If key is currenty down.

◆ KEY_STATE_MASK

#define KEY_STATE_MASK   (KEY_STATE_IS_DOWN | KEY_STATE_WAS_DOWN)

Mask of all key state flags.

◆ KEY_STATE_WAS_DOWN

#define KEY_STATE_WAS_DOWN   BIT(1)

If key was previously down.