Skip to content

Commit

Permalink
Bigger combo index (qmk#9318)
Browse files Browse the repository at this point in the history
* Add change log

* Change combo index from uint8_t to uint16_t
  • Loading branch information
sevanteri authored and drashna committed Sep 30, 2020
1 parent 2d37b79 commit 3f900fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions quantum/process_keycode/process_combo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion quantum/process_keycode/process_combo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3f900fc

Please sign in to comment.