diff options
Diffstat (limited to 'keyboards/meletrix/zoom65')
-rw-r--r-- | keyboards/meletrix/zoom65/config.h | 6 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65/info.json | 5 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65/zoom65.c | 14 |
3 files changed, 11 insertions, 14 deletions
diff --git a/keyboards/meletrix/zoom65/config.h b/keyboards/meletrix/zoom65/config.h index 4c05b1d83b..e5cc1f3e5b 100644 --- a/keyboards/meletrix/zoom65/config.h +++ b/keyboards/meletrix/zoom65/config.h @@ -16,12 +16,6 @@ #pragma once - -#define MATRIX_ROW_PINS { F0, E6, D5, F1, F4 } -#define MATRIX_COL_PINS { C7, D3, D2, D1, D0, B7, B3, B2, C6, B6, B5, B4, D7, D6, D4 } - -#define DIODE_DIRECTION COL2ROW - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 5, 4 } } #define ENCODERS_CCW_KEY { { 3, 4 } } diff --git a/keyboards/meletrix/zoom65/info.json b/keyboards/meletrix/zoom65/info.json index 0968df4794..8c11abe429 100644 --- a/keyboards/meletrix/zoom65/info.json +++ b/keyboards/meletrix/zoom65/info.json @@ -8,6 +8,11 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["C7", "D3", "D2", "D1", "D0", "B7", "B3", "B2", "C6", "B6", "B5", "B4", "D7", "D6", "D4"], + "rows": ["F0", "E6", "D5", "F1", "F4"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "B1", "pin_b": "B0", "resolution": 2} diff --git a/keyboards/meletrix/zoom65/zoom65.c b/keyboards/meletrix/zoom65/zoom65.c index ff27a4442f..11f49a9060 100644 --- a/keyboards/meletrix/zoom65/zoom65.c +++ b/keyboards/meletrix/zoom65/zoom65.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); } @@ -57,10 +61,4 @@ bool encoder_update_kb(uint8_t index, bool clockwise) encoder_action_register(index, clockwise); return true; }; -#else -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, 10); - return true; -} #endif |