diff options
| author | Ofer Plesser <plesserofer@gmail.com> | 2016-12-10 00:49:11 +0200 |
|---|---|---|
| committer | Ofer Plesser <plesserofer@gmail.com> | 2016-12-10 00:49:11 +0200 |
| commit | eac8fa799909817bfc7cb4043448f85551154c6b (patch) | |
| tree | 202951d31842163d6aa4899aa3c2647ff569e422 /quantum/process_keycode/process_combo.h | |
| parent | d0c667c790479ac50804db0d212d0adf157c3e0b (diff) | |
| download | qmk_firmware-eac8fa799909817bfc7cb4043448f85551154c6b.tar.gz qmk_firmware-eac8fa799909817bfc7cb4043448f85551154c6b.zip | |
Implemented basic key combination feature
Diffstat (limited to 'quantum/process_keycode/process_combo.h')
| -rw-r--r-- | quantum/process_keycode/process_combo.h | 25 |
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 @@ | |||
| 1 | #ifndef PROCESS_COMBO_H | ||
| 2 | #define PROCESS_COMBO_H | ||
| 3 | |||
| 4 | #include <stdint.h> | ||
| 5 | #include "progmem.h" | ||
| 6 | #include "quantum.h" | ||
| 7 | |||
| 8 | |||
| 9 | typedef struct | ||
| 10 | { | ||
| 11 | const uint16_t *keys; | ||
| 12 | uint16_t action; | ||
| 13 | uint32_t state; | ||
| 14 | } combo_t; | ||
| 15 | |||
| 16 | |||
| 17 | #define COMBO_END 0 | ||
| 18 | #define NUM_ELEMS(a) (sizeof(a)/sizeof 0[a]) | ||
| 19 | |||
| 20 | |||
| 21 | extern combo_t key_combos[1]; | ||
| 22 | |||
| 23 | bool process_combo(uint16_t keycode, keyrecord_t *record); | ||
| 24 | |||
| 25 | #endif \ No newline at end of file | ||
