summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode/process_combo.h
diff options
context:
space:
mode:
authorOfer Plesser <plesserofer@gmail.com>2016-12-09 23:49:11 +0100
committerOfer Plesser <plesserofer@gmail.com>2016-12-09 23:49:11 +0100
commiteac8fa799909817bfc7cb4043448f85551154c6b (patch)
tree202951d31842163d6aa4899aa3c2647ff569e422 /quantum/process_keycode/process_combo.h
parentd0c667c790479ac50804db0d212d0adf157c3e0b (diff)
downloadqmk_firmware-eac8fa799909817bfc7cb4043448f85551154c6b.tar.gz
qmk_firmware-eac8fa799909817bfc7cb4043448f85551154c6b.tar.xz
Implemented basic key combination feature
Diffstat (limited to 'quantum/process_keycode/process_combo.h')
-rw-r--r--quantum/process_keycode/process_combo.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h
new file mode 100644
index 000000000..68786c0f1
--- /dev/null
+++ b/quantum/process_keycode/process_combo.h
@@ -0,0 +1,25 @@
+#ifndef PROCESS_COMBO_H
+#define PROCESS_COMBO_H
+
+#include <stdint.h>
+#include "progmem.h"
+#include "quantum.h"
+
+
+typedef struct
+{
+ const uint16_t *keys;
+ uint16_t action;
+ uint32_t state;
+} combo_t;
+
+
+#define COMBO_END 0
+#define NUM_ELEMS(a) (sizeof(a)/sizeof 0[a])
+
+
+extern combo_t key_combos[1];
+
+bool process_combo(uint16_t keycode, keyrecord_t *record);
+
+#endif \ No newline at end of file