diff options
author | Stefan Kerkmann <karlk90@pm.me> | 2023-04-03 10:33:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 18:33:45 +1000 |
commit | fcf8b804ed95a98561bd4c1d6c85604be0f7cc7b (patch) | |
tree | 6b6917d99ced027d614e7b461e1cd1939833a9cd /keyboards/rate/pistachio_mp/keymaps | |
parent | 2d9140af53e4e5bbc5cd50a2b6f3eda20ed8f71e (diff) |
[Core] Refactor `keyevent_t` for 1ms timing resolution (#15847)
Diffstat (limited to 'keyboards/rate/pistachio_mp/keymaps')
-rw-r--r-- | keyboards/rate/pistachio_mp/keymaps/via/keymap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/keyboards/rate/pistachio_mp/keymaps/via/keymap.c b/keyboards/rate/pistachio_mp/keymaps/via/keymap.c index 293da4f569..bee139ac93 100644 --- a/keyboards/rate/pistachio_mp/keymaps/via/keymap.c +++ b/keyboards/rate/pistachio_mp/keymaps/via/keymap.c @@ -87,7 +87,8 @@ void encoder_action_unregister(void) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state >> 1 ? ENC_CW : ENC_CCW, .pressed = false, - .time = (timer_read() | 1) + .time = timer_read(), + .type = KEY_EVENT }; encoder_state = 0; action_exec(encoder_event); @@ -99,7 +100,8 @@ void encoder_action_register(uint8_t index, bool clockwise) { keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? ENC_CW : ENC_CCW, .pressed = true, - .time = (timer_read() | 1) + .time = timer_read() + .type = KEY_EVENT }; encoder_state = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); |