From 9b36ec53512f89ee834a894e23a64a8b4fcf3fc8 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 15 Jun 2023 05:18:56 -0700 Subject: DOIO KB30 Refactor (#21250) * refactor keymaps - remove extra blank lines - convert tabs to spaces - use four-space indent - grid-align keycodes - use QMK-native keycode aliases * info.json: correct layout data * add readme.md * info.json: correct maintainer field Updates the value to reference the maintainer's GitHub username. --- keyboards/doio/kb30/info.json | 42 ++++++++-------- keyboards/doio/kb30/keymaps/default/keymap.c | 74 +++++++++++----------------- keyboards/doio/kb30/keymaps/via/keymap.c | 63 +++++++++++------------ keyboards/doio/kb30/readme.md | 27 ++++++++++ 4 files changed, 103 insertions(+), 103 deletions(-) create mode 100644 keyboards/doio/kb30/readme.md diff --git a/keyboards/doio/kb30/info.json b/keyboards/doio/kb30/info.json index 3f3fa1c332..71a300b9cd 100644 --- a/keyboards/doio/kb30/info.json +++ b/keyboards/doio/kb30/info.json @@ -2,7 +2,7 @@ "keyboard_name": "KB30-01", "manufacturer": "DOIO", "url": "", - "maintainer": "Alice", + "maintainer": "DOIO2022", "usb": { "vid": "0xD010", "pid": "0x3001", @@ -49,33 +49,31 @@ {"matrix": [1, 5], "x": 5.25, "y": 1}, {"matrix": [1, 6], "x": 6.25, "y": 1}, - {"matrix": [2, 0], "x": 8.25, "y": 2}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, - {"matrix": [2, 1], "x": 0, "y": 2}, - {"matrix": [2, 2], "x": 1, "y": 2}, - {"matrix": [2, 3], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 4.25, "y": 2}, + {"matrix": [2, 4], "x": 5.25, "y": 2}, + {"matrix": [2, 5], "x": 6.25, "y": 2}, - {"matrix": [2, 4], "x": 4.25, "y": 2}, - {"matrix": [2, 5], "x": 5.25, "y": 2}, - {"matrix": [3, 0], "x": 6.25, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3, "h": 2}, - {"matrix": [3, 1], "x": 11, "y": 2}, + {"matrix": [3, 5], "x": 5.25, "y": 3}, - {"matrix": [3, 2], "x": 0, "y": 3}, - {"matrix": [3, 3], "x": 1, "y": 3}, - {"matrix": [3, 5], "x": 2, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 2}, + {"matrix": [4, 1], "x": 2, "y": 4}, - {"matrix": [4, 0], "x": 4.25, "y": 3, "h": 2}, - {"matrix": [4, 1], "x": 5.25, "y": 3}, + {"matrix": [4, 2], "x": 4.25, "y": 4}, + {"matrix": [4, 3], "x": 5.25, "y": 4}, + {"matrix": [4, 4], "x": 6.25, "y": 4}, - {"matrix": [4, 2], "x": 9, "y": 4}, - - {"matrix": [4, 3], "x": 0, "y": 4, "w": 2}, - {"matrix": [4, 4], "x": 2, "y": 4}, - - {"matrix": [5, 4], "x": 4.25, "y": 4}, - {"matrix": [5, 5], "x": 5.25, "y": 4}, - {"matrix": [5, 6], "x": 6.25, "y": 4} + {"matrix": [5, 4], "x": 7.75, "y": 1}, + {"matrix": [5, 5], "x": 9.75, "y": 1}, + {"matrix": [5, 6], "x": 7.75, "y": 2, "w": 3, "h": 3} ] } } diff --git a/keyboards/doio/kb30/keymaps/default/keymap.c b/keyboards/doio/kb30/keymaps/default/keymap.c index fb06acfd80..2e385d24e3 100644 --- a/keyboards/doio/kb30/keymaps/default/keymap.c +++ b/keyboards/doio/kb30/keymaps/default/keymap.c @@ -15,65 +15,47 @@ * along with this program. If not, see . */ - #include QMK_KEYBOARD_H - enum layer_names { -_LAY0, -_LAY1, -_LAY2, -_LAY3 + _LAY0, + _LAY1, + _LAY2, + _LAY3 }; - - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAY0] = LAYOUT( - KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_SCRL, KC_PAUSE, - KC_P7, KC_P8, KC_P9, KC_PPLS, KC_INS, KC_HOME, KC_PGUP, - KC_P4, KC_P5, KC_P6, KC_DEL, KC_END, KC_PGDN, - KC_P1, KC_P2, KC_P3, LT(3,KC_PENT), KC_UP, - KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, - KC_MPLY, TO(1), KC_TRNS), + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_SCRL, KC_PAUS, + KC_P7, KC_P8, KC_P9, KC_PPLS, KC_INS, KC_HOME, KC_PGUP, + KC_P4, KC_P5, KC_P6, KC_DEL, KC_END, KC_PGDN, + KC_P1, KC_P2, KC_P3, LT(3,KC_PENT), KC_UP, + KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, + KC_MPLY, TO(1), KC_TRNS), [_LAY1] = 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, TO(2), 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, TO(2), KC_TRNS), [_LAY2] = 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, TO(3), 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, TO(3), KC_TRNS), [_LAY3] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_SAI, RGB_SPI, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_SPD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, - KC_TRNS, KC_TRNS, RGB_VAD, RGB_TOG, RGB_VAI, - KC_TRNS, TO(0), KC_TRNS) + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_SAI, RGB_SPI, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_SPD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, + KC_TRNS, KC_TRNS, RGB_VAD, RGB_TOG, RGB_VAI, + KC_TRNS, TO(0), KC_TRNS) }; - - - - - - - - - - - - #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_LAY0] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLU, KC_VOLD) }, diff --git a/keyboards/doio/kb30/keymaps/via/keymap.c b/keyboards/doio/kb30/keymaps/via/keymap.c index 2890fe604a..2e385d24e3 100644 --- a/keyboards/doio/kb30/keymaps/via/keymap.c +++ b/keyboards/doio/kb30/keymaps/via/keymap.c @@ -15,54 +15,47 @@ * along with this program. If not, see . */ - #include QMK_KEYBOARD_H - enum layer_names { -_LAY0, -_LAY1, -_LAY2, -_LAY3 + _LAY0, + _LAY1, + _LAY2, + _LAY3 }; - - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAY0] = LAYOUT( - KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_SCRL, KC_PAUSE, - KC_P7, KC_P8, KC_P9, KC_PPLS, KC_INS, KC_HOME, KC_PGUP, - KC_P4, KC_P5, KC_P6, KC_DEL, KC_END, KC_PGDN, - KC_P1, KC_P2, KC_P3, LT(3,KC_PENT), KC_UP, - KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, - KC_MPLY, TO(1), KC_TRNS), + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_SCRL, KC_PAUS, + KC_P7, KC_P8, KC_P9, KC_PPLS, KC_INS, KC_HOME, KC_PGUP, + KC_P4, KC_P5, KC_P6, KC_DEL, KC_END, KC_PGDN, + KC_P1, KC_P2, KC_P3, LT(3,KC_PENT), KC_UP, + KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, + KC_MPLY, TO(1), KC_TRNS), [_LAY1] = 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, TO(2), 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, TO(2), KC_TRNS), [_LAY2] = 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, TO(3), 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, TO(3), KC_TRNS), [_LAY3] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_SAI, RGB_SPI, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_SPD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, - KC_TRNS, KC_TRNS, RGB_VAD, RGB_TOG, RGB_VAI, - KC_TRNS, TO(0), KC_TRNS) + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_SAI, RGB_SPI, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_SPD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, + KC_TRNS, KC_TRNS, RGB_VAD, RGB_TOG, RGB_VAI, + KC_TRNS, TO(0), KC_TRNS) }; - #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_LAY0] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLU, KC_VOLD) }, diff --git a/keyboards/doio/kb30/readme.md b/keyboards/doio/kb30/readme.md new file mode 100644 index 0000000000..9e66c8993f --- /dev/null +++ b/keyboards/doio/kb30/readme.md @@ -0,0 +1,27 @@ +# Megalodon DOIO 30% Designer Keyboard + +![Megalodon DOIO 30% Designer Keyboard](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/doio/kb30/KB30-01-_0000_778b3a43-228a-433d-94ae-9129f20b2ede_1024xc.jpg) + +A hotswappable 30-key macropad with 3 rotary encoders (2 are clickable), an OLED screen, and RGB lighting. + +* Keyboard Maintainer: [DOIO2022](https://github.com/DOIO2022) +* Hardware Supported: Megalodon DOIO 30% Designer Keyboard with STM32F103 +* Hardware Availability: [KeebMonkey](https://www.keebmonkey.com/products/megalodon-doio-30-designer-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make doio/kb30:default + +## Accessing Bootloader Mode and Flashing + +To access Bootloader Mode, do one of the following: + +* **Bootmagic reset**: Hold the top left key of the keyboard while connecting the USB cable. +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. + +Flashing example for this keyboard: + + make doio/kb30:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). -- cgit v1.2.3