diff options
Diffstat (limited to 'keyboards/sofle/keymaps/keyhive_via/encoder.c')
-rw-r--r-- | keyboards/sofle/keymaps/keyhive_via/encoder.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/keyboards/sofle/keymaps/keyhive_via/encoder.c b/keyboards/sofle/keymaps/keyhive_via/encoder.c index 0883c4a48a..7775cb7b86 100644 --- a/keyboards/sofle/keymaps/keyhive_via/encoder.c +++ b/keyboards/sofle/keymaps/keyhive_via/encoder.c @@ -26,7 +26,7 @@ void encoder_action_unregister(void) { for (int index = 0; index < 2; ++index) { if (encoder_state[index]) { - keyevent_t encoder_event = (keyevent_t){.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, .time = (timer_read() | 1)}; + keyevent_t encoder_event = (keyevent_t){.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, .time = timer_read(), .type = KEY_EVENT}; encoder_state[index] = 0; action_exec(encoder_event); } @@ -34,7 +34,7 @@ } void encoder_action_register(uint8_t index, bool clockwise) { - keyevent_t encoder_event = (keyevent_t){.key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, .time = (timer_read() | 1)}; + keyevent_t encoder_event = (keyevent_t){.key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, .time = timer_read(), .type = KEY_EVENT}; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); } @@ -46,4 +46,3 @@ return false; }; #endif - |