summaryrefslogtreecommitdiff
path: root/keyboards/takashicompany
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2023-04-03 10:33:45 +0200
committerGitHub <noreply@github.com>2023-04-03 18:33:45 +1000
commitfcf8b804ed95a98561bd4c1d6c85604be0f7cc7b (patch)
tree6b6917d99ced027d614e7b461e1cd1939833a9cd /keyboards/takashicompany
parent2d9140af53e4e5bbc5cd50a2b6f3eda20ed8f71e (diff)
[Core] Refactor `keyevent_t` for 1ms timing resolution (#15847)
Diffstat (limited to 'keyboards/takashicompany')
-rw-r--r--keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c b/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c
index e04c1fea0d..c0d4a0003d 100644
--- a/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c
+++ b/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c
@@ -98,7 +98,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);
@@ -110,7 +111,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);
@@ -124,4 +126,4 @@ void matrix_scan_kb(void) {
bool encoder_update_user(uint8_t index, bool clockwise) {
encoder_action_register(index, clockwise);
return true;
-}; \ No newline at end of file
+};