From 3f900fc967b4e266949929f3b80a597ad7c123a5 Mon Sep 17 00:00:00 2001 From: Pete Sevander Date: Thu, 16 Jul 2020 15:39:01 +0300 Subject: Bigger combo index (#9318) * Add change log * Change combo index from uint8_t to uint16_t --- quantum/process_keycode/process_combo.c | 6 +++--- 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 25a6060639..6f7b21642d 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -24,10 +24,10 @@ extern combo_t key_combos[]; extern int COMBO_LEN; #endif -__attribute__((weak)) void process_combo_event(uint8_t combo_index, bool pressed) {} +__attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {} static uint16_t timer = 0; -static uint8_t current_combo_index = 0; +static uint16_t current_combo_index = 0; static bool drop_buffer = false; static bool is_active = false; static bool b_combo_enable = true; // defaults to enabled @@ -83,7 +83,7 @@ static inline void dump_key_buffer(bool emit) { static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) { uint8_t count = 0; - uint8_t index = -1; + uint16_t index = -1; /* Find index of keycode and number of combo keys */ for (const uint16_t *keys = combo->keys;; ++count) { 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 e21ee19609..0f01aae93e 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -56,7 +56,7 @@ typedef struct { bool process_combo(uint16_t keycode, keyrecord_t *record); void matrix_scan_combo(void); -void process_combo_event(uint8_t combo_index, bool pressed); +void process_combo_event(uint16_t combo_index, bool pressed); void combo_enable(void); void combo_disable(void); -- cgit v1.2.3