diff options
Diffstat (limited to 'keyboards/rmi_kb/herringbone/pro')
-rw-r--r-- | keyboards/rmi_kb/herringbone/pro/info.json | 4 | ||||
-rw-r--r-- | keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c | 58 | ||||
-rw-r--r-- | keyboards/rmi_kb/herringbone/pro/keymaps/via/rules.mk | 1 |
3 files changed, 13 insertions, 50 deletions
diff --git a/keyboards/rmi_kb/herringbone/pro/info.json b/keyboards/rmi_kb/herringbone/pro/info.json index e02c428ab8..bbef69f28a 100644 --- a/keyboards/rmi_kb/herringbone/pro/info.json +++ b/keyboards/rmi_kb/herringbone/pro/info.json @@ -329,9 +329,7 @@ {"matrix": [5, 9], "x": 10, "y": 5.25, "w": 1.5}, {"matrix": [5, 10], "x": 11.5, "y": 5.25, "w": 1.5}, - {"matrix": [5, 12], "x": 13.25, "y": 5.5}, - {"matrix": [5, 13], "x": 14.25, "y": 5.5}, - {"matrix": [5, 14], "x": 15.25, "y": 5.5} + {"matrix": [5, 13], "x": 14.25, "y": 5.5} ] } } diff --git a/keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c b/keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c index dbf282b68f..9df8143fb7 100644 --- a/keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c +++ b/keyboards/rmi_kb/herringbone/pro/keymaps/via/keymap.c @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_VOLD, KC_MUTE, KC_VOLU, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MUTE, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_SPC, KC_NO, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_all( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [2] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [3] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -52,31 +52,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -keyevent_t encoder_ccw = { - .key = (keypos_t){.row = 6, .col = 0}, - .pressed = false, - .type = KEY_EVENT - }; - -keyevent_t encoder_cw = { - .key = (keypos_t){.row = 6, .col = 1}, - .pressed = false, - .type = KEY_EVENT +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(_______, _______) }, + [2] = { ENCODER_CCW_CW(_______, _______) }, + [3] = { ENCODER_CCW_CW(_______, _______) }, }; - -void matrix_scan_user(void) { - if (encoder_ccw.pressed) { - encoder_ccw.pressed = false; - encoder_ccw.time = timer_read(); - action_exec(encoder_ccw); - } - - if (encoder_cw.pressed) { - encoder_cw.pressed = false; - encoder_cw.time = timer_read(); - action_exec(encoder_cw); - } -} +#endif #ifdef OLED_ENABLE uint32_t anim_timer = 0; @@ -85,25 +68,6 @@ uint8_t current_frame = 0; #define FRAME_DURATION 50 -bool encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - encoder_cw.pressed = true; - encoder_cw.time = timer_read(); - action_exec(encoder_cw); - wait_ms(20); - anim_sleep = timer_read32(); - oled_on(); - } else { - encoder_ccw.pressed = true; - encoder_ccw.time = timer_read(); - action_exec(encoder_ccw); - wait_ms(20); - anim_sleep = timer_read32(); - oled_on(); - } - return true; -} - static void render_pattern(void) { void animate(void) { oled_set_cursor(4, 0); diff --git a/keyboards/rmi_kb/herringbone/pro/keymaps/via/rules.mk b/keyboards/rmi_kb/herringbone/pro/keymaps/via/rules.mk index 1e5b99807c..f1adcab005 100644 --- a/keyboards/rmi_kb/herringbone/pro/keymaps/via/rules.mk +++ b/keyboards/rmi_kb/herringbone/pro/keymaps/via/rules.mk @@ -1 +1,2 @@ VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes |