summaryrefslogtreecommitdiff
path: root/keyboards/rgbkb/sol3/rev1
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/rgbkb/sol3/rev1
parent2d9140af53e4e5bbc5cd50a2b6f3eda20ed8f71e (diff)
[Core] Refactor `keyevent_t` for 1ms timing resolution (#15847)
Diffstat (limited to 'keyboards/rgbkb/sol3/rev1')
-rw-r--r--keyboards/rgbkb/sol3/rev1/rev1.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/keyboards/rgbkb/sol3/rev1/rev1.c b/keyboards/rgbkb/sol3/rev1/rev1.c
index de5836e061..ff330a83d6 100644
--- a/keyboards/rgbkb/sol3/rev1/rev1.c
+++ b/keyboards/rgbkb/sol3/rev1/rev1.c
@@ -57,10 +57,7 @@ bool dip_switch_update_kb(uint8_t index, bool active) {
}
case 1: {
// Handle RGB Encoder switch press
- action_exec((keyevent_t){
- .key = (keypos_t){.row = isLeftHand ? 4 : 10, .col = 6},
- .pressed = active, .time = (timer_read() | 1) /* time should not be 0 */
- });
+ action_exec(MAKE_KEYEVENT(isLeftHand ? 4 : 10, 6, active));
break;
}
}
@@ -68,15 +65,11 @@ bool dip_switch_update_kb(uint8_t index, bool active) {
}
static void process_encoder_matrix(encodermap_t pos) {
- action_exec((keyevent_t){
- .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */
- });
+ action_exec(MAKE_KEYEVENT(pos.r, pos.c, true));
#if TAP_CODE_DELAY > 0
wait_ms(TAP_CODE_DELAY);
#endif
- action_exec((keyevent_t){
- .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */
- });
+ action_exec(MAKE_KEYEVENT(pos.r, pos.c, false));
}
bool encoder_update_kb(uint8_t index, bool clockwise) {