KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Types relating to overall keyboard state More...
Topics | |
Key States | |
States each key can be in. | |
LEDs | |
Types associated with keyboard LEDs | |
Modifier Keys | |
Types associated with keyboard modifier keys | |
Data Structures | |
struct | kbd_cond_t |
Keyboard raw condition structure. More... | |
struct | kbd_state_t |
Keyboard status structure. More... | |
Macros | |
#define | MAX_PRESSED_KEYS 6 |
Maximum number of keys the DC can read simultaneously. | |
#define | KBD_MAX_KEYS 256 |
Maximum number of keys a DC keyboard can have. | |
Typedefs | |
typedef enum __packed kbd_key | kbd_key_t |
Raw Keyboard Key Identifiers. | |
typedef void | kbd_keymap_t("Please open an issue, there should be no reason for external code to have used this.") |
Enumerations | |
enum | kbd_region_t { KBD_REGION_JP = 1 , KBD_REGION_US = 2 , KBD_REGION_UK = 3 , KBD_REGION_DE = 4 , KBD_REGION_FR = 5 , KBD_REGION_IT = 6 , KBD_REGION_ES = 7 } |
Region Codes for the Dreamcast keyboard. More... | |
Functions | |
char | kbd_key_to_ascii (kbd_key_t key, kbd_region_t region, kbd_mods_t mods, kbd_leds_t leds) |
Converts a kbd_key_t value into its corresponding ASCII value. | |
static const int | MAX_KBD_KEYS ("Please use KBD_MAX_KEYS.") |
Variables | |
enum __packed | kbd_key |
Raw Keyboard Key Identifiers. | |
Types relating to overall keyboard state
Types and API functions revolving around individual constituents of the overall keyboard state. These values can either be retrieved manually with State Polling.
#define KBD_MAX_KEYS 256 |
Maximum number of keys a DC keyboard can have.
This is a hardware constant. The define prevents the magic number '256' from appearing.
#define MAX_PRESSED_KEYS 6 |
Maximum number of keys the DC can read simultaneously.
This is a hardware constant. The define prevents the magic number '6' from appearing.
Raw Keyboard Key Identifiers.
This is the list of keys that are on the keyboard that may be pressed. The keyboard returns keys in this format.
typedef void kbd_keymap_t("Please open an issue, there should be no reason for external code to have used this.") |
enum kbd_region_t |
Region Codes for the Dreamcast keyboard.
This is the list of possible values for kbd_state_t::region.
char kbd_key_to_ascii | ( | kbd_key_t | key, |
kbd_region_t | region, | ||
kbd_mods_t | mods, | ||
kbd_leds_t | leds ) |
Converts a kbd_key_t value into its corresponding ASCII value.
This function attempts to convert key
to its ASCII representation using an internal translation table and additional keyboard state context. To note, this is actually ISO-8859-15 where applicable for non-English regions.
key | The raw key type to convert to ASCII. |
region | The region type of the keyboard containing the key. |
mods | The modifier flags impacting the key. |
leds | The LED state flags impacting the key. |
key
or NULL if the translation was unsuccessful.
|
static |
enum __packed kbd_key |
Raw Keyboard Key Identifiers.
This is the list of keys that are on the keyboard that may be pressed. The keyboard returns keys in this format.