From d90b6e4689ab7d74585774621adccc6faf021d38 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 11 Jan 2025 02:04:17 +1100 Subject: Fix a build warning and tidy up a keymap (#24805) --- keyboards/beekeeb/3w6hs/info.json | 69 ------------------------ keyboards/beekeeb/3w6hs/keyboard.json | 69 ++++++++++++++++++++++++ keyboards/keyprez/bison/keymaps/default/keymap.c | 32 ++--------- 3 files changed, 72 insertions(+), 98 deletions(-) delete mode 100644 keyboards/beekeeb/3w6hs/info.json create mode 100644 keyboards/beekeeb/3w6hs/keyboard.json diff --git a/keyboards/beekeeb/3w6hs/info.json b/keyboards/beekeeb/3w6hs/info.json deleted file mode 100644 index 74f1f1f245..0000000000 --- a/keyboards/beekeeb/3w6hs/info.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "manufacturer": "beekeeb", - "keyboard_name": "3w6hs", - "maintainer": "beekeeb", - "diode_direction": "COL2ROW", - "usb": { - "device_version": "1.0.0", - "pid": "0x0003", - "vid": "0xBEEB", - "no_startup_check": true - }, - "processor": "RP2040", - "bootloader": "rp2040", - "features": { - "bootmagic": true, - "mousekey": true, - "extrakey": true - }, - "community_layouts": ["split_3x5_3"], - "layouts": { - "LAYOUT_split_3x5_3": { - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0.8}, - {"matrix": [0, 1], "x": 1, "y": 0.2}, - {"matrix": [0, 2], "x": 2, "y": 0}, - {"matrix": [0, 3], "x": 3, "y": 0.2}, - {"matrix": [0, 4], "x": 4, "y": 0.4}, - - {"matrix": [4, 0], "x": 8, "y": 0.4}, - {"matrix": [4, 1], "x": 9, "y": 0.2}, - {"matrix": [4, 2], "x": 10, "y": 0}, - {"matrix": [4, 3], "x": 11, "y": 0.2}, - {"matrix": [4, 4], "x": 12, "y": 0.8}, - - {"matrix": [1, 0], "x": 0, "y": 1.8}, - {"matrix": [1, 1], "x": 1, "y": 1.2}, - {"matrix": [1, 2], "x": 2, "y": 1}, - {"matrix": [1, 3], "x": 3, "y": 1.2}, - {"matrix": [1, 4], "x": 4, "y": 1.4}, - - {"matrix": [5, 0], "x": 8, "y": 1.4}, - {"matrix": [5, 1], "x": 9, "y": 1.2}, - {"matrix": [5, 2], "x": 10, "y": 1}, - {"matrix": [5, 3], "x": 11, "y": 1.2}, - {"matrix": [5, 4], "x": 12, "y": 1.8}, - - {"matrix": [2, 0], "x": 0, "y": 2.8}, - {"matrix": [2, 1], "x": 1, "y": 2.2}, - {"matrix": [2, 2], "x": 2, "y": 2}, - {"matrix": [2, 3], "x": 3, "y": 2.2}, - {"matrix": [2, 4], "x": 4, "y": 2.4}, - - {"matrix": [6, 0], "x": 8, "y": 2.4}, - {"matrix": [6, 1], "x": 9, "y": 2.2}, - {"matrix": [6, 2], "x": 10, "y": 2}, - {"matrix": [6, 3], "x": 11, "y": 2.2}, - {"matrix": [6, 4], "x": 12, "y": 2.8}, - - {"matrix": [3, 2], "x": 3.2, "y": 3.6}, - {"matrix": [3, 3], "x": 4.2, "y": 3.6}, - {"matrix": [3, 4], "x": 5.2, "y": 3.8}, - - {"matrix": [7, 0], "x": 6.8, "y": 3.8}, - {"matrix": [7, 1], "x": 7.8, "y": 3.6}, - {"matrix": [7, 2], "x": 8.8, "y": 3.6} - ] - } - } -} diff --git a/keyboards/beekeeb/3w6hs/keyboard.json b/keyboards/beekeeb/3w6hs/keyboard.json new file mode 100644 index 0000000000..74f1f1f245 --- /dev/null +++ b/keyboards/beekeeb/3w6hs/keyboard.json @@ -0,0 +1,69 @@ +{ + "manufacturer": "beekeeb", + "keyboard_name": "3w6hs", + "maintainer": "beekeeb", + "diode_direction": "COL2ROW", + "usb": { + "device_version": "1.0.0", + "pid": "0x0003", + "vid": "0xBEEB", + "no_startup_check": true + }, + "processor": "RP2040", + "bootloader": "rp2040", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true + }, + "community_layouts": ["split_3x5_3"], + "layouts": { + "LAYOUT_split_3x5_3": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.8}, + {"matrix": [0, 1], "x": 1, "y": 0.2}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0.2}, + {"matrix": [0, 4], "x": 4, "y": 0.4}, + + {"matrix": [4, 0], "x": 8, "y": 0.4}, + {"matrix": [4, 1], "x": 9, "y": 0.2}, + {"matrix": [4, 2], "x": 10, "y": 0}, + {"matrix": [4, 3], "x": 11, "y": 0.2}, + {"matrix": [4, 4], "x": 12, "y": 0.8}, + + {"matrix": [1, 0], "x": 0, "y": 1.8}, + {"matrix": [1, 1], "x": 1, "y": 1.2}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1.2}, + {"matrix": [1, 4], "x": 4, "y": 1.4}, + + {"matrix": [5, 0], "x": 8, "y": 1.4}, + {"matrix": [5, 1], "x": 9, "y": 1.2}, + {"matrix": [5, 2], "x": 10, "y": 1}, + {"matrix": [5, 3], "x": 11, "y": 1.2}, + {"matrix": [5, 4], "x": 12, "y": 1.8}, + + {"matrix": [2, 0], "x": 0, "y": 2.8}, + {"matrix": [2, 1], "x": 1, "y": 2.2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2.2}, + {"matrix": [2, 4], "x": 4, "y": 2.4}, + + {"matrix": [6, 0], "x": 8, "y": 2.4}, + {"matrix": [6, 1], "x": 9, "y": 2.2}, + {"matrix": [6, 2], "x": 10, "y": 2}, + {"matrix": [6, 3], "x": 11, "y": 2.2}, + {"matrix": [6, 4], "x": 12, "y": 2.8}, + + {"matrix": [3, 2], "x": 3.2, "y": 3.6}, + {"matrix": [3, 3], "x": 4.2, "y": 3.6}, + {"matrix": [3, 4], "x": 5.2, "y": 3.8}, + + {"matrix": [7, 0], "x": 6.8, "y": 3.8}, + {"matrix": [7, 1], "x": 7.8, "y": 3.6}, + {"matrix": [7, 2], "x": 8.8, "y": 3.6} + ] + } + } +} diff --git a/keyboards/keyprez/bison/keymaps/default/keymap.c b/keyboards/keyprez/bison/keymaps/default/keymap.c index d66b1a487b..17c5f2ecd7 100644 --- a/keyboards/keyprez/bison/keymaps/default/keymap.c +++ b/keyboards/keyprez/bison/keymaps/default/keymap.c @@ -25,11 +25,6 @@ enum layer_names { _FN, }; -enum custom_keycodes { - KC_PRVWD = SAFE_RANGE, - KC_NXTWD -}; - #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) #define FN MO(_FN) @@ -47,6 +42,9 @@ enum custom_keycodes { #define KC_COLMK PDF(_COLEMAK) #define KC_HRM PDF(_HRM) +#define KC_PRVWD LCTL(KC_LEFT) +#define KC_NXTWD LCTL(KC_RGHT) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * QWERTY @@ -186,27 +184,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______, _______, _______, _______, _______, _______, _______ ), }; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_PRVWD: - if (record->event.pressed) { - register_mods(mod_config(MOD_LCTL)); - register_code(KC_LEFT); - } else { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_LEFT); - } - break; - case KC_NXTWD: - if (record->event.pressed) { - register_mods(mod_config(MOD_LCTL)); - register_code(KC_RIGHT); - } else { - unregister_mods(mod_config(MOD_LCTL)); - unregister_code(KC_RIGHT); - } - break; - } - return true; -} -- cgit v1.2.3