From 81fc9d9aab82416f5012d1fc43a8cf669d647ce1 Mon Sep 17 00:00:00 2001 From: clownfish-og <177758267+clownfish-og@users.noreply.github.com> Date: Thu, 24 Apr 2025 15:47:46 -0400 Subject: [PATCH] fixup keymap and layout --- keyboards/doio/kb38/keyboard.json | 24 +++++------ keyboards/doio/kb38/keymaps/default/keymap.c | 42 ++++++++++---------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/keyboards/doio/kb38/keyboard.json b/keyboards/doio/kb38/keyboard.json index d25be2df4e8..0b27acba7b2 100644 --- a/keyboards/doio/kb38/keyboard.json +++ b/keyboards/doio/kb38/keyboard.json @@ -1,6 +1,6 @@ { - "manufacturer": "Doio", - "keyboard_name": "doio/kb38", + "manufacturer": "DOIO", + "keyboard_name": "KB38-01", "maintainer": "PepperKats", "url": "https://www.keebmonkey.com/products/megalodon-doio-triple-knob-38-keyboard-with-oled-screen", "bootloader": "atmel-dfu", @@ -103,20 +103,20 @@ "layout": [ {"matrix": [0, 0], "label": "ESC", "x": 0, "y": 0}, {"matrix": [0, 1], "label": "BSPC", "x": 2, "y": 0, "w": 2}, - {"matrix": [0, 2], "label": "RGB BACK", "x": 4.25, "y": 0}, - {"matrix": [0, 3], "label": "RGB OFF", "x": 5.25, "y": 0}, - {"matrix": [0, 4], "label": "RGB FORW", "x": 6.25, "y": 0}, - {"matrix": [0, 5], "label": "MAKE", "x": 7.5, "y": 0}, - {"matrix": [0, 6], "label": "REBOOT", "x": 8.5, "y": 0}, - {"matrix": [0, 7], "label": "BOOTLOAD", "x": 9.5, "y": 0}, + {"matrix": [0, 2], "label": "F1", "x": 4.25, "y": 0}, + {"matrix": [0, 3], "label": "F2", "x": 5.25, "y": 0}, + {"matrix": [0, 4], "label": "F3", "x": 6.25, "y": 0}, + {"matrix": [0, 5], "label": "F4", "x": 7.5, "y": 0}, + {"matrix": [0, 6], "label": "F5", "x": 8.5, "y": 0}, + {"matrix": [0, 7], "label": "F6", "x": 9.5, "y": 0}, {"matrix": [1, 0], "label": "NUMLOCK", "x": 0, "y": 1.25}, {"matrix": [1, 1], "label": "PSLS", "x": 1, "y": 1.25}, {"matrix": [1, 2], "label": "PAST", "x": 2, "y": 1.25}, {"matrix": [1, 3], "label": "PMNS", "x": 3, "y": 1.25}, - {"matrix": [1, 4], "label": "PAUS", "x": 4.25, "y": 1.25}, + {"matrix": [1, 4], "label": "PSCR", "x": 4.25, "y": 1.25}, {"matrix": [1, 5], "label": "SCRL", "x": 5.25, "y": 1.25}, - {"matrix": [1, 6], "label": "PSCR", "x": 6.25, "y": 1.25}, + {"matrix": [1, 6], "label": "PAUS", "x": 6.25, "y": 1.25}, {"matrix": [2, 0], "label": "7", "x": 0, "y": 2.25}, {"matrix": [2, 1], "label": "8", "x": 1, "y": 2.25}, @@ -133,8 +133,8 @@ {"matrix": [3, 0], "label": "4", "x": 0, "y": 3.25}, {"matrix": [3, 1], "label": "5", "x": 1, "y": 3.25}, {"matrix": [3, 2], "label": "6", "x": 2, "y": 3.25}, - {"matrix": [3, 3], "label": "END", "x": 4.25, "y": 3.25}, - {"matrix": [3, 4], "label": "DEL", "x": 5.25, "y": 3.25}, + {"matrix": [3, 3], "label": "DEL", "x": 4.25, "y": 3.25}, + {"matrix": [3, 4], "label": "END", "x": 5.25, "y": 3.25}, {"matrix": [3, 5], "label": "PGDN", "x": 6.25, "y": 3.25}, {"matrix": [4, 0], "label": "1", "x": 0, "y": 4.25}, diff --git a/keyboards/doio/kb38/keymaps/default/keymap.c b/keyboards/doio/kb38/keymaps/default/keymap.c index 5c0fbf5da34..fac96098947 100644 --- a/keyboards/doio/kb38/keymaps/default/keymap.c +++ b/keyboards/doio/kb38/keymaps/default/keymap.c @@ -17,52 +17,52 @@ #include QMK_KEYBOARD_H enum layers { - _QWERTY, - _LAYERTWO + _BASE, + _FN }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ┌───┐ ┌───────┐┌───┬───┬───┐┌───┬───┬───┐ - * │ESC│ │KC_BSPC││F1 │F2 │F3 ││F4 │F5 │F6 │ + * │Fn │ │KC_BSPC││F1 │F2 │F3 ││F4 │F5 │F6 │ * └───┘ └───────┘└───┴───┴───┘└───┴───┴───┘ * ┌───┬───┬───┬───┐┌───┬───┬───┐ - * │NUM│ / │ * │ - ││PAS│SCR│PSC│ + * │NUM│ / │ * │ - ││PSC│SCR│PAS│ * ├───┼───┼───┼───┤├───┼───┼───┤┌───┐ ┌───┐ * │ 7 │ 8 │ 9 │ ││INS│HOM│PGU││HOM│ │END│ * ├───┼───┼───┤ + │├───┼───┼───┤├───┴───┴───┤ - * │ 4 │ 5 │ 6 │ ││END│DEL│PGD││ │ + * │ 4 │ 5 │ 6 │ ││DEL│END│PGD││ │ * ├───┼───┼───┼───┤└───┼───┼───┘│ │ - * │ 1 │ 2 │ 3 │ E │ │UP │ │ B │ + * │ 1 │ 2 │ 3 │ E │ │UP │ │ │ * ├───┴───┼───┤ N │┌───┼───┼───┐│ │ * │ 0 │DEL│ T ││LFT│DWN│RHT││ │ * └───────┴───┴───┘└───┴───┴───┘└───────────┘ */ - [_QWERTY] = LAYOUT( - MO(1), KC_BSPC, RM_PREV, RM_TOGG, RM_NEXT, KC_F1, KC_F2, KC_F3, - KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_PAUS, KC_SCRL, KC_PSCR, + [_BASE] = LAYOUT( + MO(_FN), KC_BSPC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + 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_HOME, KC_END, - KC_P4, KC_P5, KC_P6, KC_END, KC_DEL, KC_PGDN, - KC_P1, KC_P2, KC_P3, KC_PENT, KC_UP, KC_B, + KC_P4, KC_P5, KC_P6, KC_DEL, KC_END, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_UP, KC_NO, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT ), - [_LAYERTWO] = LAYOUT( - _______, KC_BSPC, RM_PREV, RM_TOGG, RM_NEXT, KC_A, QK_RBT, QK_BOOT, - KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_PAUS, KC_SCRL, KC_PSCR, - KC_P7, KC_P8, KC_P9, KC_PPLS, KC_INS, KC_HOME, KC_PGUP, KC_HOME, KC_END, - KC_P4, KC_P5, KC_P6, KC_END, KC_DEL, KC_PGDN, - KC_P1, KC_P2, KC_P3, KC_PENT, KC_UP, KC_B, - KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT + [_FN] = LAYOUT( + _______, RM_TOGG, _______, RM_SATU, RM_SATD, RM_PREV, RM_NEXT, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RM_SPDD, RM_SPDU, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_NO, + _______, _______, _______, _______, _______ ) }; /*NOTE FOR PERSON MODIFYING KEYMAP -The large knob press is mapped as KC_B, despite it not having one. +The large knob press is mapped as KC_NO, despite it not having one. I'm not quite sure why, but the only reason it can't be clicked is because the potentiometer is different. If you were to replace it with one that can be clicked, it would work. I shorted it and it does work.*/ #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [0] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(MS_WHLU, MS_WHLD), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } + [_BASE] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(MS_WHLU, MS_WHLD), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FN] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } }; #endif