diff options
Diffstat (limited to 'keyboards/wuque')
-rw-r--r-- | keyboards/wuque/mammoth20x/mammoth20x.c | 8 | ||||
-rw-r--r-- | keyboards/wuque/mammoth75x/mammoth75x.c | 9 | ||||
-rw-r--r-- | keyboards/wuque/serneity65/serneity65.c | 8 |
3 files changed, 18 insertions, 7 deletions
diff --git a/keyboards/wuque/mammoth20x/mammoth20x.c b/keyboards/wuque/mammoth20x/mammoth20x.c index 6cc1dee21a..4619ef5dde 100644 --- a/keyboards/wuque/mammoth20x/mammoth20x.c +++ b/keyboards/wuque/mammoth20x/mammoth20x.c @@ -30,7 +30,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); } @@ -41,7 +43,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); } diff --git a/keyboards/wuque/mammoth75x/mammoth75x.c b/keyboards/wuque/mammoth75x/mammoth75x.c index c2bf2bbe37..9452195752 100644 --- a/keyboards/wuque/mammoth75x/mammoth75x.c +++ b/keyboards/wuque/mammoth75x/mammoth75x.c @@ -30,7 +30,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); } @@ -41,7 +43,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); } @@ -64,4 +68,3 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { return true; } #endif - diff --git a/keyboards/wuque/serneity65/serneity65.c b/keyboards/wuque/serneity65/serneity65.c index 1222722b4b..ff03a3ca5f 100644 --- a/keyboards/wuque/serneity65/serneity65.c +++ b/keyboards/wuque/serneity65/serneity65.c @@ -30,7 +30,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); } @@ -41,7 +43,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); } |