aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2015-08-19 18:59:27 -0700
committerFurkan Sahin <furkan-dev@proton.me>2015-08-19 18:59:27 -0700
commit92ff61043557fa4b34bafc2323f9791ef79f7116 (patch)
tree89560b95f1501ecd24036ca69f524771230fe2f0 /include
parent9322627a093e5a43aed50885029322b572070824 (diff)
key_state.ch, and command conflicts resolved
Diffstat (limited to 'include')
-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 @@
+#ifndef _SWAY_KEY_STATE_H
+#define _SWAY_KEY_STATE_H
+#include <stdbool.h>
+#include <stdint.h>
+
+typedef uint32_t keycode;
+
+// returns true if key has been pressed, otherwise false
+bool check_key(keycode key);
+
+// sets a key as pressed
+void press_key(keycode key);
+
+// unsets a key as pressed
+void release_key(keycode key);
+
+#endif
+