summaryrefslogtreecommitdiffstats
path: root/include/key_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/key_state.h')
-rw-r--r--include/key_state.h18
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
6typedef uint32_t keycode;
7
8// returns true if key has been pressed, otherwise false
9bool check_key(keycode key);
10
11// sets a key as pressed
12void press_key(keycode key);
13
14// unsets a key as pressed
15void release_key(keycode key);
16
17#endif
18