Bigger combo index (#9318)
* Add change log * Change combo index from uint8_t to uint16_t
This commit is contained in:
committed by
Drashna Jael're
parent
2d37b79534
commit
3f900fc967
@@ -24,10 +24,10 @@ extern combo_t key_combos[];
|
|||||||
extern int COMBO_LEN;
|
extern int COMBO_LEN;
|
||||||
#endif
|
#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 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 drop_buffer = false;
|
||||||
static bool is_active = false;
|
static bool is_active = false;
|
||||||
static bool b_combo_enable = true; // defaults to enabled
|
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) {
|
static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) {
|
||||||
uint8_t count = 0;
|
uint8_t count = 0;
|
||||||
uint8_t index = -1;
|
uint16_t index = -1;
|
||||||
/* Find index of keycode and number of combo keys */
|
/* Find index of keycode and number of combo keys */
|
||||||
for (const uint16_t *keys = combo->keys;; ++count) {
|
for (const uint16_t *keys = combo->keys;; ++count) {
|
||||||
uint16_t key = pgm_read_word(&keys[count]);
|
uint16_t key = pgm_read_word(&keys[count]);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ typedef struct {
|
|||||||
|
|
||||||
bool process_combo(uint16_t keycode, keyrecord_t *record);
|
bool process_combo(uint16_t keycode, keyrecord_t *record);
|
||||||
void matrix_scan_combo(void);
|
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_enable(void);
|
||||||
void combo_disable(void);
|
void combo_disable(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user