mirror of
https://github.com/swaywm/sway.git
synced 2025-11-01 22:58:41 -04:00
Refactor keyboard to consider modified keysyms
Press Shift Press 0 # Reads as ')' Release Shift Release 0 # Reads as '0' but we now recognize it as the same
This commit is contained in:
parent
663f53b22a
commit
1ac0c8cd47
3 changed files with 46 additions and 32 deletions
|
|
@ -6,16 +6,14 @@
|
|||
|
||||
/* Keyboard state */
|
||||
|
||||
typedef uint32_t keycode;
|
||||
|
||||
// returns true if key has been pressed, otherwise false
|
||||
bool check_key(keycode key);
|
||||
bool check_key(uint32_t key_sym, uint32_t key_code);
|
||||
|
||||
// sets a key as pressed
|
||||
void press_key(keycode key);
|
||||
void press_key(uint32_t key_sym, uint32_t key_code);
|
||||
|
||||
// unsets a key as pressed
|
||||
void release_key(keycode key);
|
||||
void release_key(uint32_t key_sym, uint32_t key_code);
|
||||
|
||||
/* Pointer state */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue