[Core] Refactor keyevent_t
for 1ms timing resolution (#15847)
This commit is contained in:
parent
2d9140af53
commit
fcf8b804ed
49 changed files with 360 additions and 273 deletions
|
@ -145,7 +145,7 @@ static queued_combo_t combo_buffer[COMBO_BUFFER_LENGTH];
|
|||
static inline void release_combo(uint16_t combo_index, combo_t *combo) {
|
||||
if (combo->keycode) {
|
||||
keyrecord_t record = {
|
||||
.event = MAKE_KEYEVENT(KEYLOC_COMBO, KEYLOC_COMBO, false),
|
||||
.event = MAKE_COMBOEVENT(false),
|
||||
.keycode = combo->keycode,
|
||||
};
|
||||
#ifndef NO_ACTION_TAPPING
|
||||
|
@ -233,7 +233,7 @@ static inline void dump_key_buffer(void) {
|
|||
process_record(record);
|
||||
#endif
|
||||
}
|
||||
record->event.time = 0;
|
||||
record->event.type = TICK_EVENT;
|
||||
|
||||
#if defined(CAPS_WORD_ENABLE) && defined(AUTO_SHIFT_ENABLE)
|
||||
// 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) {
|
|||
KEY_STATE_DOWN(state, key_index);
|
||||
if (ALL_COMBO_KEYS_ARE_DOWN(state, key_count)) {
|
||||
// this in the end executes the combo when the key_buffer is dumped.
|
||||
record->keycode = combo->keycode;
|
||||
record->event.key = MAKE_KEYPOS(KEYLOC_COMBO, KEYLOC_COMBO);
|
||||
record->keycode = combo->keycode;
|
||||
record->event.type = COMBO_EVENT;
|
||||
|
||||
qrecord->combo_index = combo_index;
|
||||
ACTIVATE_COMBO(combo);
|
||||
|
@ -343,7 +343,7 @@ void apply_combo(uint16_t combo_index, combo_t *combo) {
|
|||
} else {
|
||||
// key was part of the combo but not the last one, "disable" it
|
||||
// by making it a TICK event.
|
||||
record->event.time = 0;
|
||||
record->event.type = TICK_EVENT;
|
||||
}
|
||||
}
|
||||
drop_combo_from_buffer(combo_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue