diff options
Diffstat (limited to 'keyboards/nightly_boards/n40_o')
-rw-r--r-- | keyboards/nightly_boards/n40_o/encoder_action.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/keyboards/nightly_boards/n40_o/encoder_action.c b/keyboards/nightly_boards/n40_o/encoder_action.c index 6b553d3969..522fb58d5a 100644 --- a/keyboards/nightly_boards/n40_o/encoder_action.c +++ b/keyboards/nightly_boards/n40_o/encoder_action.c @@ -26,7 +26,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = 0; action_exec(encoder_event); @@ -38,7 +39,8 @@ 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) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); |