summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode
diff options
context:
space:
mode:
authorPete Sevander <pete.sevander@gmail.com>2020-07-16 15:39:01 +0300
committerJames Young <18669334+noroadsleft@users.noreply.github.com>2020-08-29 14:30:02 -0700
commitb0335b273142ead24cb4177893fafdf2fda88810 (patch)
treeb4f37b9f7aafe7525bda71a57d68e02cf1474946 /quantum/process_keycode
parent93e7a8f74cc2c9c7bc50b413654642a0347a55d2 (diff)
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.c6
-rw-r--r--quantum/process_keycode/process_combo.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c
index c4e299958a..1f715f43b9 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);