diff options
| author | Pete Sevander <pete.sevander@gmail.com> | 2020-07-16 15:39:01 +0300 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-08-29 14:30:02 -0700 |
| commit | b0335b273142ead24cb4177893fafdf2fda88810 (patch) | |
| tree | b4f37b9f7aafe7525bda71a57d68e02cf1474946 /quantum/process_keycode | |
| parent | 93e7a8f74cc2c9c7bc50b413654642a0347a55d2 (diff) | |
| download | qmk_firmware-b0335b273142ead24cb4177893fafdf2fda88810.tar.gz qmk_firmware-b0335b273142ead24cb4177893fafdf2fda88810.zip | |
Bigger combo index (#9318)
* Add change log
* Change combo index from uint8_t to uint16_t
Diffstat (limited to 'quantum/process_keycode')
| -rw-r--r-- | quantum/process_keycode/process_combo.c | 6 | ||||
| -rw-r--r-- | quantum/process_keycode/process_combo.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index c4e299958..1f715f43b 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c | |||
| @@ -24,10 +24,10 @@ extern combo_t key_combos[]; | |||
| 24 | extern int COMBO_LEN; | 24 | extern int COMBO_LEN; |
| 25 | #endif | 25 | #endif |
| 26 | 26 | ||
| 27 | __attribute__((weak)) void process_combo_event(uint8_t combo_index, bool pressed) {} | 27 | __attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {} |
| 28 | 28 | ||
| 29 | static uint16_t timer = 0; | 29 | static uint16_t timer = 0; |
| 30 | static uint8_t current_combo_index = 0; | 30 | static uint16_t current_combo_index = 0; |
| 31 | static bool drop_buffer = false; | 31 | static bool drop_buffer = false; |
| 32 | static bool is_active = false; | 32 | static bool is_active = false; |
| 33 | static bool b_combo_enable = true; // defaults to enabled | 33 | static bool b_combo_enable = true; // defaults to enabled |
| @@ -83,7 +83,7 @@ static inline void dump_key_buffer(bool emit) { | |||
| 83 | 83 | ||
| 84 | static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) { | 84 | static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) { |
| 85 | uint8_t count = 0; | 85 | uint8_t count = 0; |
| 86 | uint8_t index = -1; | 86 | uint16_t index = -1; |
| 87 | /* Find index of keycode and number of combo keys */ | 87 | /* Find index of keycode and number of combo keys */ |
| 88 | for (const uint16_t *keys = combo->keys;; ++count) { | 88 | for (const uint16_t *keys = combo->keys;; ++count) { |
| 89 | uint16_t key = pgm_read_word(&keys[count]); | 89 | uint16_t key = pgm_read_word(&keys[count]); |
diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index e21ee1960..0f01aae93 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h | |||
| @@ -56,7 +56,7 @@ typedef struct { | |||
| 56 | 56 | ||
| 57 | bool process_combo(uint16_t keycode, keyrecord_t *record); | 57 | bool process_combo(uint16_t keycode, keyrecord_t *record); |
| 58 | void matrix_scan_combo(void); | 58 | void matrix_scan_combo(void); |
| 59 | void process_combo_event(uint8_t combo_index, bool pressed); | 59 | void process_combo_event(uint16_t combo_index, bool pressed); |
| 60 | 60 | ||
| 61 | void combo_enable(void); | 61 | void combo_enable(void); |
| 62 | void combo_disable(void); | 62 | void combo_disable(void); |
