summaryrefslogtreecommitdiffstats
path: root/include/input_state.h
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-23 15:28:49 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-23 15:28:49 -0400
commit1ac0c8cd47f734809c20bf6a6a0a7278680ed597 (patch)
treec15286165247ae28a192f66aa5886f1d956c5b07 /include/input_state.h
parentMerge pull request #123 from Luminarys/master (diff)
downloadsway-1ac0c8cd47f734809c20bf6a6a0a7278680ed597.tar.gz
sway-1ac0c8cd47f734809c20bf6a6a0a7278680ed597.tar.zst
sway-1ac0c8cd47f734809c20bf6a6a0a7278680ed597.zip
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
Diffstat (limited to 'include/input_state.h')
-rw-r--r--include/input_state.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/input_state.h b/include/input_state.h
index 04fde42d..29064fd0 100644
--- a/include/input_state.h
+++ b/include/input_state.h
@@ -6,16 +6,14 @@
6 6
7/* Keyboard state */ 7/* Keyboard state */
8 8
9typedef uint32_t keycode;
10
11// returns true if key has been pressed, otherwise false 9// returns true if key has been pressed, otherwise false
12bool check_key(keycode key); 10bool check_key(uint32_t key_sym, uint32_t key_code);
13 11
14// sets a key as pressed 12// sets a key as pressed
15void press_key(keycode key); 13void press_key(uint32_t key_sym, uint32_t key_code);
16 14
17// unsets a key as pressed 15// unsets a key as pressed
18void release_key(keycode key); 16void release_key(uint32_t key_sym, uint32_t key_code);
19 17
20/* Pointer state */ 18/* Pointer state */
21 19