diff options
author | taiyu <taiyu.len@gmail.com> | 2015-08-19 18:59:27 -0700 |
---|---|---|
committer | taiyu <taiyu.len@gmail.com> | 2015-08-19 18:59:27 -0700 |
commit | 470b4dfbae146d83c0061b39534c16b5aad90f1c (patch) | |
tree | 89560b95f1501ecd24036ca69f524771230fe2f0 /include | |
parent | Deal with more xkb bullshit (diff) | |
download | sway-470b4dfbae146d83c0061b39534c16b5aad90f1c.tar.gz sway-470b4dfbae146d83c0061b39534c16b5aad90f1c.tar.zst sway-470b4dfbae146d83c0061b39534c16b5aad90f1c.zip |
key_state.ch, and command conflicts resolved
Diffstat (limited to 'include')
-rw-r--r-- | include/key_state.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/key_state.h b/include/key_state.h new file mode 100644 index 00000000..a8fa8d5e --- /dev/null +++ b/include/key_state.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _SWAY_KEY_STATE_H | ||
2 | #define _SWAY_KEY_STATE_H | ||
3 | #include <stdbool.h> | ||
4 | #include <stdint.h> | ||
5 | |||
6 | typedef uint32_t keycode; | ||
7 | |||
8 | // returns true if key has been pressed, otherwise false | ||
9 | bool check_key(keycode key); | ||
10 | |||
11 | // sets a key as pressed | ||
12 | void press_key(keycode key); | ||
13 | |||
14 | // unsets a key as pressed | ||
15 | void release_key(keycode key); | ||
16 | |||
17 | #endif | ||
18 | |||