[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
|
@ -147,12 +147,12 @@ void encoder_init(void) {
|
|||
#ifdef ENCODER_MAP_ENABLE
|
||||
static void encoder_exec_mapping(uint8_t index, bool clockwise) {
|
||||
// The delays below cater for Windows and its wonderful requirements.
|
||||
action_exec(clockwise ? ENCODER_CW_EVENT(index, true) : ENCODER_CCW_EVENT(index, true));
|
||||
action_exec(clockwise ? MAKE_ENCODER_CW_EVENT(index, true) : MAKE_ENCODER_CCW_EVENT(index, true));
|
||||
# if ENCODER_MAP_KEY_DELAY > 0
|
||||
wait_ms(ENCODER_MAP_KEY_DELAY);
|
||||
# endif // ENCODER_MAP_KEY_DELAY > 0
|
||||
|
||||
action_exec(clockwise ? ENCODER_CW_EVENT(index, false) : ENCODER_CCW_EVENT(index, false));
|
||||
action_exec(clockwise ? MAKE_ENCODER_CW_EVENT(index, false) : MAKE_ENCODER_CCW_EVENT(index, false));
|
||||
# if ENCODER_MAP_KEY_DELAY > 0
|
||||
wait_ms(ENCODER_MAP_KEY_DELAY);
|
||||
# endif // ENCODER_MAP_KEY_DELAY > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue