diff options
| author | Stefan Kerkmann <karlk90@pm.me> | 2023-04-03 10:33:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-03 18:33:45 +1000 |
| commit | fcf8b804ed95a98561bd4c1d6c85604be0f7cc7b (patch) | |
| tree | 6b6917d99ced027d614e7b461e1cd1939833a9cd /quantum/process_keycode/process_combo.c | |
| parent | 2d9140af53e4e5bbc5cd50a2b6f3eda20ed8f71e (diff) | |
[Core] Refactor `keyevent_t` for 1ms timing resolution (#15847)
Diffstat (limited to 'quantum/process_keycode/process_combo.c')
| -rw-r--r-- | quantum/process_keycode/process_combo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index ce6725c402..b1b49d3019 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c | |||
| @@ -145,7 +145,7 @@ static queued_combo_t combo_buffer[COMBO_BUFFER_LENGTH]; | |||
| 145 | static inline void release_combo(uint16_t combo_index, combo_t *combo) { | 145 | static inline void release_combo(uint16_t combo_index, combo_t *combo) { |
| 146 | if (combo->keycode) { | 146 | if (combo->keycode) { |
| 147 | keyrecord_t record = { | 147 | keyrecord_t record = { |
| 148 | .event = MAKE_KEYEVENT(KEYLOC_COMBO, KEYLOC_COMBO, false), | 148 | .event = MAKE_COMBOEVENT(false), |
| 149 | .keycode = combo->keycode, | 149 | .keycode = combo->keycode, |
| 150 | }; | 150 | }; |
| 151 | #ifndef NO_ACTION_TAPPING | 151 | #ifndef NO_ACTION_TAPPING |
| @@ -233,7 +233,7 @@ static inline void dump_key_buffer(void) { | |||
| 233 | process_record(record); | 233 | process_record(record); |
| 234 | #endif | 234 | #endif |
| 235 | } | 235 | } |
| 236 | record->event.time = 0; | 236 | record->event.type = TICK_EVENT; |
| 237 | 237 | ||
| 238 | #if defined(CAPS_WORD_ENABLE) && defined(AUTO_SHIFT_ENABLE) | 238 | #if defined(CAPS_WORD_ENABLE) && defined(AUTO_SHIFT_ENABLE) |
| 239 | // Edge case: preserve the weak Left Shift mod if both Caps Word and | 239 | // Edge case: preserve the weak Left Shift mod if both Caps Word and |
| @@ -333,8 +333,8 @@ void apply_combo(uint16_t combo_index, combo_t *combo) { | |||
| 333 | KEY_STATE_DOWN(state, key_index); | 333 | KEY_STATE_DOWN(state, key_index); |
| 334 | if (ALL_COMBO_KEYS_ARE_DOWN(state, key_count)) { | 334 | if (ALL_COMBO_KEYS_ARE_DOWN(state, key_count)) { |
| 335 | // this in the end executes the combo when the key_buffer is dumped. | 335 | // this in the end executes the combo when the key_buffer is dumped. |
| 336 | record->keycode = combo->keycode; | 336 | record->keycode = combo->keycode; |
| 337 | record->event.key = MAKE_KEYPOS(KEYLOC_COMBO, KEYLOC_COMBO); | 337 | record->event.type = COMBO_EVENT; |
| 338 | 338 | ||
| 339 | qrecord->combo_index = combo_index; | 339 | qrecord->combo_index = combo_index; |
| 340 | ACTIVATE_COMBO(combo); | 340 | ACTIVATE_COMBO(combo); |
| @@ -343,7 +343,7 @@ void apply_combo(uint16_t combo_index, combo_t *combo) { | |||
| 343 | } else { | 343 | } else { |
| 344 | // key was part of the combo but not the last one, "disable" it | 344 | // key was part of the combo but not the last one, "disable" it |
| 345 | // by making it a TICK event. | 345 | // by making it a TICK event. |
| 346 | record->event.time = 0; | 346 | record->event.type = TICK_EVENT; |
| 347 | } | 347 | } |
| 348 | } | 348 | } |
| 349 | drop_combo_from_buffer(combo_index); | 349 | drop_combo_from_buffer(combo_index); |
