diff --git a/keyboards/mechwild/bb65/bb65.c b/keyboards/mechwild/bb65/bb65.c deleted file mode 100644 index a8d833a7f94d..000000000000 --- a/keyboards/mechwild/bb65/bb65.c +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2023 Kyle McCreery (@kylemccreery) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "bb65.h" - -#ifdef ENCODER_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - switch (index) { - case 0: - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - break; - } - return true; -} -#endif diff --git a/keyboards/mechwild/bb65/bb65.h b/keyboards/mechwild/bb65/bb65.h deleted file mode 100644 index 8f2d9363b92e..000000000000 --- a/keyboards/mechwild/bb65/bb65.h +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2023 Kyle McCreery (@kylemccreery) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "quantum.h" diff --git a/keyboards/mechwild/bb65/info.json b/keyboards/mechwild/bb65/info.json index ae910d76d0e4..3d00b50445d2 100644 --- a/keyboards/mechwild/bb65/info.json +++ b/keyboards/mechwild/bb65/info.json @@ -25,7 +25,7 @@ }, "encoder": { "rotary": [ - { "pin_a": "A3", "pin_b": "A2", "resolution": 4 } + {"pin_a": "A3", "pin_b": "A2"} ] }, "rgblight": { @@ -48,76 +48,145 @@ } }, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [ - {"matrix":[0,0], "x":0, "y":0}, - {"matrix":[0,1], "x":1, "y":0}, - {"matrix":[0,2], "x":2, "y":0}, - {"matrix":[0,3], "x":3, "y":0}, - {"matrix":[0,4], "x":4, "y":0}, - {"matrix":[0,5], "x":5, "y":0}, - {"matrix":[0,6], "x":6, "y":0}, - {"matrix":[0,7], "x":7, "y":0}, - {"matrix":[0,8], "x":8, "y":0}, - {"matrix":[5,8], "x":9, "y":0}, - {"matrix":[5,7], "x":10, "y":0}, - {"matrix":[5,6], "x":11, "y":0}, - {"matrix":[5,5], "x":12, "y":0}, - {"matrix":[5,4], "x":13, "y":0, "w":2}, - {"matrix":[1,0], "x":0, "y":1, "w":1.5}, - {"matrix":[1,1], "x":1.5, "y":1}, - {"matrix":[1,2], "x":2.5, "y":1}, - {"matrix":[1,3], "x":3.5, "y":1}, - {"matrix":[1,4], "x":4.5, "y":1}, - {"matrix":[1,5], "x":5.5, "y":1}, - {"matrix":[1,6], "x":6.5, "y":1}, - {"matrix":[1,7], "x":7.5, "y":1}, - {"matrix":[1,8], "x":8.5, "y":1}, - {"matrix":[6,8], "x":9.5, "y":1}, - {"matrix":[6,7], "x":10.5, "y":1}, - {"matrix":[6,6], "x":11.5, "y":1}, - {"matrix":[6,5], "x":12.5, "y":1}, - {"matrix":[6,4], "x":13.5, "y":1, "w":1.5}, - {"matrix":[2,0], "x":0, "y":2, "w":1.75}, - {"matrix":[2,1], "x":1.75, "y":2}, - {"matrix":[2,2], "x":2.75, "y":2}, - {"matrix":[2,3], "x":3.75, "y":2}, - {"matrix":[2,4], "x":4.75, "y":2}, - {"matrix":[2,5], "x":5.75, "y":2}, - {"matrix":[2,6], "x":6.75, "y":2}, - {"matrix":[2,7], "x":7.75, "y":2}, - {"matrix":[2,8], "x":8.75, "y":2}, - {"matrix":[7,0], "x":9.75, "y":2}, - {"matrix":[6,0], "x":10.75, "y":2}, - {"matrix":[6,1], "x":11.75, "y":2}, - {"matrix":[6,2], "x":12.75, "y":2}, - {"matrix":[6,3], "x":13.75, "y":2, "w":1.25}, - {"matrix":[3,0], "x":0, "y":3, "w":1.25}, - {"matrix":[3,1], "x":1.25, "y":3}, - {"matrix":[3,2], "x":2.25, "y":3}, - {"matrix":[3,3], "x":3.25, "y":3}, - {"matrix":[3,4], "x":4.25, "y":3}, - {"matrix":[3,5], "x":5.25, "y":3}, - {"matrix":[3,6], "x":6.25, "y":3}, - {"matrix":[3,7], "x":7.25, "y":3}, - {"matrix":[3,8], "x":8.25, "y":3}, - {"matrix":[7,8], "x":9.25, "y":3}, - {"matrix":[7,7], "x":10.25, "y":3}, - {"matrix":[7,6], "x":11.25, "y":3}, - {"matrix":[7,5], "x":12.25, "y":3, "w":1.75}, - {"matrix":[7,4], "x":15.5, "y":3}, - {"matrix":[7,3], "x":14.25, "y":3.25}, - {"matrix":[4,0], "x":0, "y":4, "w":1.25}, - {"matrix":[4,1], "x":1.25, "y":4, "w":1.25}, - {"matrix":[4,2], "x":2.5, "y":4, "w":1.25}, - {"matrix":[4,5], "x":3.75, "y":4, "w":6.25}, - {"matrix":[4,3], "x":10, "y":4}, - {"matrix":[4,4], "x":11, "y":4}, - {"matrix":[4,6], "x":12, "y":4}, - {"matrix":[4,7], "x":13.25, "y":4.25}, - {"matrix":[4,8], "x":14.25, "y":4.25}, + {"matrix":[0,0], "x":0, "y":0}, + {"matrix":[0,1], "x":1, "y":0}, + {"matrix":[0,2], "x":2, "y":0}, + {"matrix":[0,3], "x":3, "y":0}, + {"matrix":[0,4], "x":4, "y":0}, + {"matrix":[0,5], "x":5, "y":0}, + {"matrix":[0,6], "x":6, "y":0}, + {"matrix":[0,7], "x":7, "y":0}, + {"matrix":[0,8], "x":8, "y":0}, + {"matrix":[5,8], "x":9, "y":0}, + {"matrix":[5,7], "x":10, "y":0}, + {"matrix":[5,6], "x":11, "y":0}, + {"matrix":[5,5], "x":12, "y":0}, + {"matrix":[5,4], "x":13, "y":0, "w":2}, + {"matrix":[1,0], "x":0, "y":1, "w":1.5}, + {"matrix":[1,1], "x":1.5, "y":1}, + {"matrix":[1,2], "x":2.5, "y":1}, + {"matrix":[1,3], "x":3.5, "y":1}, + {"matrix":[1,4], "x":4.5, "y":1}, + {"matrix":[1,5], "x":5.5, "y":1}, + {"matrix":[1,6], "x":6.5, "y":1}, + {"matrix":[1,7], "x":7.5, "y":1}, + {"matrix":[1,8], "x":8.5, "y":1}, + {"matrix":[6,8], "x":9.5, "y":1}, + {"matrix":[6,7], "x":10.5, "y":1}, + {"matrix":[6,6], "x":11.5, "y":1}, + {"matrix":[6,5], "x":12.5, "y":1}, + {"matrix":[6,4], "x":13.5, "y":1, "w":1.5}, + {"matrix":[2,0], "x":0, "y":2, "w":1.75}, + {"matrix":[2,1], "x":1.75, "y":2}, + {"matrix":[2,2], "x":2.75, "y":2}, + {"matrix":[2,3], "x":3.75, "y":2}, + {"matrix":[2,4], "x":4.75, "y":2}, + {"matrix":[2,5], "x":5.75, "y":2}, + {"matrix":[2,6], "x":6.75, "y":2}, + {"matrix":[2,7], "x":7.75, "y":2}, + {"matrix":[2,8], "x":8.75, "y":2}, + {"matrix":[7,0], "x":9.75, "y":2}, + {"matrix":[6,0], "x":10.75, "y":2}, + {"matrix":[6,1], "x":11.75, "y":2}, + {"matrix":[6,2], "x":12.75, "y":2}, + {"matrix":[6,3], "x":13.75, "y":2, "w":1.25}, + {"matrix":[3,0], "x":0, "y":3, "w":1.25}, + {"matrix":[3,1], "x":1.25, "y":3}, + {"matrix":[3,2], "x":2.25, "y":3}, + {"matrix":[3,3], "x":3.25, "y":3}, + {"matrix":[3,4], "x":4.25, "y":3}, + {"matrix":[3,5], "x":5.25, "y":3}, + {"matrix":[3,6], "x":6.25, "y":3}, + {"matrix":[3,7], "x":7.25, "y":3}, + {"matrix":[3,8], "x":8.25, "y":3}, + {"matrix":[7,8], "x":9.25, "y":3}, + {"matrix":[7,7], "x":10.25, "y":3}, + {"matrix":[7,6], "x":11.25, "y":3}, + {"matrix":[7,5], "x":12.25, "y":3, "w":1.75}, + {"matrix":[7,4], "x":15.5, "y":3}, + {"matrix":[7,3], "x":14.25, "y":3.25}, + {"matrix":[4,0], "x":0, "y":4, "w":1.25}, + {"matrix":[4,1], "x":1.25, "y":4, "w":1.25}, + {"matrix":[4,2], "x":2.5, "y":4, "w":1.25}, + {"matrix":[4,5], "x":3.75, "y":4, "w":6.25}, + {"matrix":[4,3], "x":10, "y":4}, + {"matrix":[4,4], "x":11, "y":4}, + {"matrix":[4,6], "x":12, "y":4}, + {"matrix":[4,7], "x":13.25, "y":4.25}, + {"matrix":[4,8], "x":14.25, "y":4.25}, + {"matrix":[7,2], "x":15.25, "y":4.25} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"matrix":[0,0], "x":0, "y":0}, + {"matrix":[0,1], "x":1, "y":0}, + {"matrix":[0,2], "x":2, "y":0}, + {"matrix":[0,3], "x":3, "y":0}, + {"matrix":[0,4], "x":4, "y":0}, + {"matrix":[0,5], "x":5, "y":0}, + {"matrix":[0,6], "x":6, "y":0}, + {"matrix":[0,7], "x":7, "y":0}, + {"matrix":[0,8], "x":8, "y":0}, + {"matrix":[5,8], "x":9, "y":0}, + {"matrix":[5,7], "x":10, "y":0}, + {"matrix":[5,6], "x":11, "y":0}, + {"matrix":[5,5], "x":12, "y":0}, + {"matrix":[5,4], "x":13, "y":0, "w":2}, + {"matrix":[1,0], "x":0, "y":1, "w":1.5}, + {"matrix":[1,1], "x":1.5, "y":1}, + {"matrix":[1,2], "x":2.5, "y":1}, + {"matrix":[1,3], "x":3.5, "y":1}, + {"matrix":[1,4], "x":4.5, "y":1}, + {"matrix":[1,5], "x":5.5, "y":1}, + {"matrix":[1,6], "x":6.5, "y":1}, + {"matrix":[1,7], "x":7.5, "y":1}, + {"matrix":[1,8], "x":8.5, "y":1}, + {"matrix":[6,8], "x":9.5, "y":1}, + {"matrix":[6,7], "x":10.5, "y":1}, + {"matrix":[6,6], "x":11.5, "y":1}, + {"matrix":[6,5], "x":12.5, "y":1}, + {"matrix":[6,4], "x":13.5, "y":1, "w":1.5}, + {"matrix":[2,0], "x":0, "y":2, "w":1.75}, + {"matrix":[2,1], "x":1.75, "y":2}, + {"matrix":[2,2], "x":2.75, "y":2}, + {"matrix":[2,3], "x":3.75, "y":2}, + {"matrix":[2,4], "x":4.75, "y":2}, + {"matrix":[2,5], "x":5.75, "y":2}, + {"matrix":[2,6], "x":6.75, "y":2}, + {"matrix":[2,7], "x":7.75, "y":2}, + {"matrix":[2,8], "x":8.75, "y":2}, + {"matrix":[7,0], "x":9.75, "y":2}, + {"matrix":[6,0], "x":10.75, "y":2}, + {"matrix":[6,1], "x":11.75, "y":2}, + {"matrix":[6,3], "x":12.75, "y":2, "w":2.25}, + {"matrix":[3,0], "x":0, "y":3, "w":2.25}, + {"matrix":[3,2], "x":2.25, "y":3}, + {"matrix":[3,3], "x":3.25, "y":3}, + {"matrix":[3,4], "x":4.25, "y":3}, + {"matrix":[3,5], "x":5.25, "y":3}, + {"matrix":[3,6], "x":6.25, "y":3}, + {"matrix":[3,7], "x":7.25, "y":3}, + {"matrix":[3,8], "x":8.25, "y":3}, + {"matrix":[7,8], "x":9.25, "y":3}, + {"matrix":[7,7], "x":10.25, "y":3}, + {"matrix":[7,6], "x":11.25, "y":3}, + {"matrix":[7,5], "x":12.25, "y":3, "w":1.75}, + {"matrix":[7,4], "x":15.5, "y":3}, + {"matrix":[7,3], "x":14.25, "y":3.25}, + {"matrix":[4,0], "x":0, "y":4, "w":1.25}, + {"matrix":[4,1], "x":1.25, "y":4, "w":1.25}, + {"matrix":[4,2], "x":2.5, "y":4, "w":1.25}, + {"matrix":[4,5], "x":3.75, "y":4, "w":6.25}, + {"matrix":[4,3], "x":10, "y":4}, + {"matrix":[4,4], "x":11, "y":4}, + {"matrix":[4,6], "x":12, "y":4}, + {"matrix":[4,7], "x":13.25, "y":4.25}, + {"matrix":[4,8], "x":14.25, "y":4.25}, {"matrix":[7,2], "x":15.25, "y":4.25} ] } } -} \ No newline at end of file +} diff --git a/keyboards/mechwild/bb65/keymaps/default/keymap.c b/keyboards/mechwild/bb65/keymaps/default/keymap.c index b6e477bbf203..e163f86a18b4 100644 --- a/keyboards/mechwild/bb65/keymaps/default/keymap.c +++ b/keyboards/mechwild/bb65/keymaps/default/keymap.c @@ -11,14 +11,14 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ - [_BASE] = LAYOUT( + [_BASE] = LAYOUT_all( QK_GESC, 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_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, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, RGB_RMOD, KC_LGUI, RGB_MOD, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_FN1] = LAYOUT( + [_FN1] = LAYOUT_all( KC_TRNS, 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_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef ENCODER_MAP_ENABLE - const uint16_t PROGMEM encoder_map[][1][2] = { + const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } }; diff --git a/keyboards/mechwild/bb65/keymaps/via/keymap.c b/keyboards/mechwild/bb65/keymaps/via/keymap.c index 77a5e5ed2054..e61d74876dcd 100644 --- a/keyboards/mechwild/bb65/keymaps/via/keymap.c +++ b/keyboards/mechwild/bb65/keymaps/via/keymap.c @@ -7,49 +7,31 @@ enum layer_names { _BASE, - _FN1, - _FN2, - _FN3 + _FN1 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ - [_BASE] = LAYOUT( + [_BASE] = LAYOUT_all( QK_GESC, 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_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, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, RGB_RMOD, KC_LGUI, RGB_MOD, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_FN1] = LAYOUT( + [_FN1] = LAYOUT_all( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END - ), - [_FN2] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [_FN3] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; #ifdef ENCODER_MAP_ENABLE - const uint16_t PROGMEM encoder_map[][1][2] = { + const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [_FN2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [_FN3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } + [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } }; #endif