summaryrefslogtreecommitdiff
path: root/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c')
-rw-r--r--keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c
index 23729b4349..4adfaba69d 100644
--- a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c
+++ b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c
@@ -29,7 +29,9 @@ 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);
}
@@ -40,7 +42,9 @@ 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);
}