diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-03 16:34:25 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-03 16:34:25 -0400 |
commit | 06558064013c61477a41c0821586c4443638cc2b (patch) | |
tree | dab6a6edd3ce0c55d12f45e9945cebc1bdfffcaf /lib/liboda/include | |
parent | c5ed30f4af541ee134364789a33a0baee370b4ee (diff) |
liboda: input: Add constant 'ODA_KEY_*' defines
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/liboda/include')
-rw-r--r-- | lib/liboda/include/liboda/input.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/liboda/include/liboda/input.h b/lib/liboda/include/liboda/input.h index 9906329..7ba2670 100644 --- a/lib/liboda/include/liboda/input.h +++ b/lib/liboda/include/liboda/input.h @@ -30,7 +30,6 @@ #ifndef LIBODA_INPUT_H #define LIBODA_INPUT_H -#include <sys/ascii.h> #include <stdint.h> #include <stddef.h> @@ -42,12 +41,24 @@ #define ODA_KEYCHAR(KEY) ((char )(KEY) & 0xFF) /* + * Key defines + */ +#define ODA_KEY_OTHER 0x0000 +#define ODA_KEY_ESCAPE 0x0001 +#define ODA_KEY_TAB 0x0002 +#define ODA_KEY_BACKSPACE 0x0003 +#define ODA_KEY_ALPHA 0x0004 +#define ODA_KEY_NUM 0x0005 + +/* * Represents a key press * + * @type: Key types (see ODA_KEY_*) * @scancode: Scancode * @ch: Character */ struct oda_key { + uint16_t type; uint8_t scancode; char ch; }; |