diff options
| author | Albert Cervin <albert@acervin.com> | 2023-01-23 21:56:39 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2023-01-23 21:56:39 +0100 |
| commit | 9eda570311ffd292d333f7687074403ff46cc838 (patch) | |
| tree | 40265e3d2c23831afaf352bb64b8d6634bae9730 /src/keyboard.h | |
| parent | 385c9d62a5507d901ff7e54d7a4c0342cf3aff43 (diff) | |
| download | dged-9eda570311ffd292d333f7687074403ff46cc838.tar.gz dged-9eda570311ffd292d333f7687074403ff46cc838.tar.xz dged-9eda570311ffd292d333f7687074403ff46cc838.zip | |
Implement some more commands
- More bug fixes for keys: You can now have mod-less keys in keymaps as
binds.
- Fix calculation bug with space fillouts.
Diffstat (limited to 'src/keyboard.h')
| -rw-r--r-- | src/keyboard.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/keyboard.h b/src/keyboard.h index 72c61d5..9bf36de 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -3,11 +3,20 @@ #include <stdint.h> enum modifiers { + None = 0, Ctrl = 1 << 0, Meta = 1 << 1, Spec = 1 << 2, }; +#define BACKSPACE Ctrl, '?' +#define DELETE Spec, '3' + +#define UP Spec, 'A' +#define DOWN Spec, 'B' +#define RIGHT Spec, 'C' +#define LEFT Spec, 'D' + struct key { uint8_t key; uint8_t mod; @@ -24,7 +33,7 @@ struct keyboard_update { struct key keys[32]; uint32_t nkeys; - uint8_t raw[32]; + uint8_t raw[64]; uint32_t nbytes; }; |
