diff options
Diffstat (limited to 'quantum/process_keycode/process_combo.h')
-rw-r--r-- | quantum/process_keycode/process_combo.h | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index a5787c9ed..f06d2d345 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h | |||
@@ -17,33 +17,34 @@ | |||
17 | #ifndef PROCESS_COMBO_H | 17 | #ifndef PROCESS_COMBO_H |
18 | #define PROCESS_COMBO_H | 18 | #define PROCESS_COMBO_H |
19 | 19 | ||
20 | #include <stdint.h> | ||
21 | #include "progmem.h" | 20 | #include "progmem.h" |
22 | #include "quantum.h" | 21 | #include "quantum.h" |
22 | #include <stdint.h> | ||
23 | 23 | ||
24 | typedef struct | ||
25 | { | ||
26 | const uint16_t *keys; | ||
27 | uint16_t keycode; | ||
28 | #ifdef EXTRA_EXTRA_LONG_COMBOS | 24 | #ifdef EXTRA_EXTRA_LONG_COMBOS |
29 | uint32_t state; | 25 | #define MAX_COMBO_LENGTH 32 |
30 | #elif EXTRA_LONG_COMBOS | 26 | #elif EXTRA_LONG_COMBOS |
31 | uint16_t state; | 27 | #define MAX_COMBO_LENGTH 16 |
32 | #else | 28 | #else |
33 | uint8_t state; | 29 | #define MAX_COMBO_LENGTH 8 |
34 | #endif | 30 | #endif |
35 | uint16_t timer; | 31 | |
36 | bool is_active; | 32 | typedef struct { |
37 | #ifdef COMBO_ALLOW_ACTION_KEYS | 33 | const uint16_t *keys; |
38 | keyrecord_t prev_record; | 34 | uint16_t keycode; |
35 | #ifdef EXTRA_EXTRA_LONG_COMBOS | ||
36 | uint32_t state; | ||
37 | #elif EXTRA_LONG_COMBOS | ||
38 | uint16_t state; | ||
39 | #else | 39 | #else |
40 | uint16_t prev_key; | 40 | uint8_t state; |
41 | #endif | 41 | #endif |
42 | } combo_t; | 42 | } combo_t; |
43 | 43 | ||
44 | 44 | #define COMBO(ck, ca) \ | |
45 | #define COMBO(ck, ca) {.keys = &(ck)[0], .keycode = (ca)} | 45 | { .keys = &(ck)[0], .keycode = (ca) } |
46 | #define COMBO_ACTION(ck) {.keys = &(ck)[0]} | 46 | #define COMBO_ACTION(ck) \ |
47 | { .keys = &(ck)[0] } | ||
47 | 48 | ||
48 | #define COMBO_END 0 | 49 | #define COMBO_END 0 |
49 | #ifndef COMBO_COUNT | 50 | #ifndef COMBO_COUNT |