From 6921c8a7ddbf5596d629f6272b4043bb3cbcf661 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 28 May 2024 14:41:15 +1000 Subject: [PATCH 0001/1205] Branch point for 2024q3 Breaking Change. --- readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readme.md b/readme.md index f0e49a08e956..c277ca0aade3 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,7 @@ +# THIS IS THE DEVELOP BRANCH + +Warning- This is the `develop` branch of QMK Firmware. You may encounter broken code here. Please see [Breaking Changes](https://docs.qmk.fm/#/breaking_changes) for more information. + # Quantum Mechanical Keyboard Firmware [![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) From 267dffda154d119ed5f155665e90fc5e03d138a5 Mon Sep 17 00:00:00 2001 From: Purdea Andrei Date: Tue, 28 May 2024 14:49:55 +0300 Subject: [PATCH 0002/1205] EEPROM: Don't erase if we don't have to. Adding eeprom_driver_format abstraction. (#18332) --- drivers/eeprom/eeprom_custom.c-template | 11 +++++++++++ drivers/eeprom/eeprom_driver.c | 6 ++++++ drivers/eeprom/eeprom_driver.h | 2 ++ drivers/eeprom/eeprom_i2c.c | 8 ++++++++ drivers/eeprom/eeprom_spi.c | 8 ++++++++ drivers/eeprom/eeprom_transient.c | 9 +++++++-- drivers/eeprom/eeprom_wear_leveling.c | 6 ++++++ .../drivers/eeprom/eeprom_legacy_emulated_flash.c | 7 +++++++ platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c | 6 ++++++ quantum/eeconfig.c | 4 ++-- 10 files changed, 63 insertions(+), 4 deletions(-) diff --git a/drivers/eeprom/eeprom_custom.c-template b/drivers/eeprom/eeprom_custom.c-template index 5f915f7fab55..fb1f0a3a974e 100644 --- a/drivers/eeprom/eeprom_custom.c-template +++ b/drivers/eeprom/eeprom_custom.c-template @@ -23,6 +23,17 @@ void eeprom_driver_init(void) { /* Any initialisation code */ } +void eeprom_driver_format(bool erase) { + /* If erase=false, then only do the absolute minimum initialisation necessary + to make sure that the eeprom driver is usable. It doesn't need to guarantee + that the content of the eeprom is reset to any particular value. For many + eeprom drivers this may be a no-op. + + If erase=true, then in addition to making sure the eeprom driver is in a + usable state, also make sure that it is erased. + */ +} + void eeprom_driver_erase(void) { /* Wipe out the EEPROM, setting values to zero */ } diff --git a/drivers/eeprom/eeprom_driver.c b/drivers/eeprom/eeprom_driver.c index 885cf2198115..1f3f96f0068c 100644 --- a/drivers/eeprom/eeprom_driver.c +++ b/drivers/eeprom/eeprom_driver.c @@ -77,3 +77,9 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) { eeprom_write_dword(addr, value); } } + +void eeprom_driver_format(bool erase) __attribute__((weak)); +void eeprom_driver_format(bool erase) { + (void)erase; /* The default implementation assumes that the eeprom must be erased in order to be usable. */ + eeprom_driver_erase(); +} diff --git a/drivers/eeprom/eeprom_driver.h b/drivers/eeprom/eeprom_driver.h index 74592bc8f05c..0c55c497d461 100644 --- a/drivers/eeprom/eeprom_driver.h +++ b/drivers/eeprom/eeprom_driver.h @@ -16,7 +16,9 @@ #pragma once +#include #include "eeprom.h" void eeprom_driver_init(void); +void eeprom_driver_format(bool erase); void eeprom_driver_erase(void); diff --git a/drivers/eeprom/eeprom_i2c.c b/drivers/eeprom/eeprom_i2c.c index 0d3d5ccbe50c..d29aff5f85f7 100644 --- a/drivers/eeprom/eeprom_i2c.c +++ b/drivers/eeprom/eeprom_i2c.c @@ -36,6 +36,7 @@ #include "wait.h" #include "i2c_master.h" #include "eeprom.h" +#include "eeprom_driver.h" #include "eeprom_i2c.h" // #define DEBUG_EEPROM_OUTPUT @@ -62,6 +63,13 @@ void eeprom_driver_init(void) { #endif } +void eeprom_driver_format(bool erase) { + /* i2c eeproms do not need to be formatted before use */ + if (erase) { + eeprom_driver_erase(); + } +} + void eeprom_driver_erase(void) { #if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) uint32_t start = timer_read32(); diff --git a/drivers/eeprom/eeprom_spi.c b/drivers/eeprom/eeprom_spi.c index 51ba25deced5..14f0afa68bec 100644 --- a/drivers/eeprom/eeprom_spi.c +++ b/drivers/eeprom/eeprom_spi.c @@ -35,6 +35,7 @@ #include "timer.h" #include "spi_master.h" #include "eeprom.h" +#include "eeprom_driver.h" #include "eeprom_spi.h" #define CMD_WREN 6 @@ -92,6 +93,13 @@ void eeprom_driver_init(void) { spi_init(); } +void eeprom_driver_format(bool erase) { + /* spi eeproms do not need to be formatted before use */ + if (erase) { + eeprom_driver_erase(); + } +} + void eeprom_driver_erase(void) { #if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) uint32_t start = timer_read32(); diff --git a/drivers/eeprom/eeprom_transient.c b/drivers/eeprom/eeprom_transient.c index 9dc4289c271b..d9f5db98532b 100644 --- a/drivers/eeprom/eeprom_transient.c +++ b/drivers/eeprom/eeprom_transient.c @@ -30,8 +30,13 @@ size_t clamp_length(intptr_t offset, size_t len) { return len; } -void eeprom_driver_init(void) { - eeprom_driver_erase(); +void eeprom_driver_init(void) {} + +void eeprom_driver_format(bool erase) { + /* The transient eeprom driver doesn't necessarily need to be formatted before use, and it always starts up filled with zeros, due to placement in the .bss section */ + if (erase) { + eeprom_driver_erase(); + } } void eeprom_driver_erase(void) { diff --git a/drivers/eeprom/eeprom_wear_leveling.c b/drivers/eeprom/eeprom_wear_leveling.c index bd77eef35cca..24ca6c3c6b39 100644 --- a/drivers/eeprom/eeprom_wear_leveling.c +++ b/drivers/eeprom/eeprom_wear_leveling.c @@ -10,6 +10,12 @@ void eeprom_driver_init(void) { wear_leveling_init(); } +void eeprom_driver_format(bool erase) { + /* wear leveling requires the write log data structures to be erased before use. */ + (void)erase; + eeprom_driver_erase(); +} + void eeprom_driver_erase(void) { wear_leveling_erase(); } diff --git a/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c b/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c index a81fe3353c63..9857ac046bde 100644 --- a/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c +++ b/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c @@ -24,6 +24,7 @@ #include "debug.h" #include "eeprom_legacy_emulated_flash.h" #include "legacy_flash_ops.h" +#include "eeprom_driver.h" /* * We emulate eeprom by writing a snapshot compacted view of eeprom contents, @@ -564,6 +565,12 @@ void eeprom_driver_init(void) { EEPROM_Init(); } +void eeprom_driver_format(bool erase) { + /* emulated eepron requires the write log data structures to be erased before use. */ + (void)erase; + eeprom_driver_erase(); +} + void eeprom_driver_erase(void) { EEPROM_Erase(); } diff --git a/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c index ed26cc714577..628137a0b357 100644 --- a/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c @@ -52,6 +52,12 @@ static inline void STM32_L0_L1_EEPROM_Lock(void) { void eeprom_driver_init(void) {} +void eeprom_driver_format(bool erase) { + if (erase) { + eeprom_driver_erase(); + } +} + void eeprom_driver_erase(void) { STM32_L0_L1_EEPROM_Unlock(); diff --git a/quantum/eeconfig.c b/quantum/eeconfig.c index 40690d6a97a6..ffbbf43a95c6 100644 --- a/quantum/eeconfig.c +++ b/quantum/eeconfig.c @@ -46,7 +46,7 @@ __attribute__((weak)) void eeconfig_init_kb(void) { */ void eeconfig_init_quantum(void) { #if defined(EEPROM_DRIVER) - eeprom_driver_erase(); + eeprom_driver_format(false); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); @@ -108,7 +108,7 @@ void eeconfig_enable(void) { */ void eeconfig_disable(void) { #if defined(EEPROM_DRIVER) - eeprom_driver_erase(); + eeprom_driver_format(false); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF); } From 4d320736815152abc9b9bd0318edd02d2a045b74 Mon Sep 17 00:00:00 2001 From: burkfers Date: Wed, 29 May 2024 06:53:48 +0200 Subject: [PATCH 0003/1205] BastardKB: remove legacy board `tbk` (#23818) remove legacy board `tbk` --- keyboards/bastardkb/tbk/config.h | 20 ---- keyboards/bastardkb/tbk/keyboard.json | 111 ------------------ .../bastardkb/tbk/keymaps/default/keymap.c | 60 ---------- keyboards/bastardkb/tbk/readme.md | 22 ---- 4 files changed, 213 deletions(-) delete mode 100644 keyboards/bastardkb/tbk/config.h delete mode 100644 keyboards/bastardkb/tbk/keyboard.json delete mode 100644 keyboards/bastardkb/tbk/keymaps/default/keymap.c delete mode 100644 keyboards/bastardkb/tbk/readme.md diff --git a/keyboards/bastardkb/tbk/config.h b/keyboards/bastardkb/tbk/config.h deleted file mode 100644 index 8515cac5ef06..000000000000 --- a/keyboards/bastardkb/tbk/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2021 Quentin LEBASTARD - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define MASTER_RIGHT diff --git a/keyboards/bastardkb/tbk/keyboard.json b/keyboards/bastardkb/tbk/keyboard.json deleted file mode 100644 index 90e37478a1e3..000000000000 --- a/keyboards/bastardkb/tbk/keyboard.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "keyboard_name": "The Bastard Keyboard", - "url": "https://bastardkb.com/", - "usb": { - "device_version": "0.0.1", - "pid": "0x1828" - }, - "rgblight": { - "led_count": 38, - "split_count": [19, 19], - "animations": { - "breathing": true, - "rainbow_mood": true, - "rainbow_swirl": true, - "snake": true, - "knight": true, - "christmas": true, - "static_gradient": true, - "rgb_test": true, - "alternating": true, - "twinkle": true - } - }, - "ws2812": { - "pin": "D2" - }, - "features": { - "bootmagic": true, - "command": false, - "console": false, - "extrakey": true, - "mousekey": true, - "nkro": false, - "rgblight": true - }, - "matrix_pins": { - "cols": ["B4", "E6", "C6", "B1", "B3", "B2"], - "rows": ["D7", "B5", "F7", "F6", "B6"] - }, - "diode_direction": "ROW2COL", - "split": { - "enabled": true, - "soft_serial_pin": "D0" - }, - "processor": "atmega32u4", - "bootloader": "atmel-dfu", - "layouts": { - "LAYOUT_split_4x6_5": { - "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": [5, 5], "x": 11, "y": 0}, - {"matrix": [5, 4], "x": 12, "y": 0}, - {"matrix": [5, 3], "x": 13, "y": 0}, - {"matrix": [5, 2], "x": 14, "y": 0}, - {"matrix": [5, 1], "x": 15, "y": 0}, - {"matrix": [5, 0], "x": 16, "y": 0}, - {"matrix": [1, 0], "x": 0, "y": 1}, - {"matrix": [1, 1], "x": 1, "y": 1}, - {"matrix": [1, 2], "x": 2, "y": 1}, - {"matrix": [1, 3], "x": 3, "y": 1}, - {"matrix": [1, 4], "x": 4, "y": 1}, - {"matrix": [1, 5], "x": 5, "y": 1}, - {"matrix": [6, 5], "x": 11, "y": 1}, - {"matrix": [6, 4], "x": 12, "y": 1}, - {"matrix": [6, 3], "x": 13, "y": 1}, - {"matrix": [6, 2], "x": 14, "y": 1}, - {"matrix": [6, 1], "x": 15, "y": 1}, - {"matrix": [6, 0], "x": 16, "y": 1}, - {"matrix": [2, 0], "x": 0, "y": 2}, - {"matrix": [2, 1], "x": 1, "y": 2}, - {"matrix": [2, 2], "x": 2, "y": 2}, - {"matrix": [2, 3], "x": 3, "y": 2}, - {"matrix": [2, 4], "x": 4, "y": 2}, - {"matrix": [2, 5], "x": 5, "y": 2}, - {"matrix": [7, 5], "x": 11, "y": 2}, - {"matrix": [7, 4], "x": 12, "y": 2}, - {"matrix": [7, 3], "x": 13, "y": 2}, - {"matrix": [7, 2], "x": 14, "y": 2}, - {"matrix": [7, 1], "x": 15, "y": 2}, - {"matrix": [7, 0], "x": 16, "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}, - {"matrix": [3, 4], "x": 4, "y": 3}, - {"matrix": [3, 5], "x": 5, "y": 3}, - {"matrix": [8, 5], "x": 11, "y": 3}, - {"matrix": [8, 4], "x": 12, "y": 3}, - {"matrix": [8, 3], "x": 13, "y": 3}, - {"matrix": [8, 2], "x": 14, "y": 3}, - {"matrix": [8, 1], "x": 15, "y": 3}, - {"matrix": [8, 0], "x": 16, "y": 3}, - {"matrix": [4, 3], "x": 5, "y": 4}, - {"matrix": [4, 4], "x": 6, "y": 4}, - {"matrix": [4, 1], "x": 7, "y": 4}, - {"matrix": [9, 1], "x": 9, "y": 4}, - {"matrix": [9, 4], "x": 10, "y": 4}, - {"matrix": [9, 3], "x": 11, "y": 4}, - {"matrix": [4, 5], "x": 6, "y": 5}, - {"matrix": [4, 2], "x": 7, "y": 5}, - {"matrix": [9, 2], "x": 9, "y": 5}, - {"matrix": [9, 5], "x": 10, "y": 5} - ] - } - } -} diff --git a/keyboards/bastardkb/tbk/keymaps/default/keymap.c b/keyboards/bastardkb/tbk/keymaps/default/keymap.c deleted file mode 100644 index 3227076c076f..000000000000 --- a/keyboards/bastardkb/tbk/keymaps/default/keymap.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2021 Quentin LEBASTARD - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_split_4x6_5( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_MINS, -//-------------------------------------------------//-----------------------------------------------------------// - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, -//-------------------------------------------------//-----------------------------------------------------------// - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, -//-------------------------------------------------//-----------------------------------------------------------// - KC_LCTL, KC_SPC, MO(1), MO(2), KC_ENT, KC_RGUI, - KC_HOME, KC_BSPC, KC_DEL, KC_RALT - ), - - [1] = LAYOUT_split_4x6_5( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, -//---------------------------------------------------------//-----------------------------------------------------------// - QK_BOOT, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, _______, KC_PLUS, -//---------------------------------------------------------//-----------------------------------------------------------// - _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LPRN, KC_RPRN, KC_P4, KC_P5, KC_P6, KC_MINS, KC_PIPE, -//---------------------------------------------------------//-----------------------------------------------------------// - _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_EQL, KC_UNDS, -//---------------------------------------------------------//-----------------------------------------------------------// - KC_LCTL, KC_HOME, KC_TRNS, KC_TRNS, KC_RALT, KC_RGUI, - KC_SPC, KC_BSPC, KC_RCTL, KC_ENT - ), - - [2] = LAYOUT_split_4x6_5( - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, -//---------------------------------------------------------//--------------------------------------------------------------// - _______, _______, RGB_RMOD, RGB_TOG, RGB_MOD, KC_LBRC, KC_RBRC, _______, KC_NUM, KC_INS, KC_SCRL, KC_MUTE, -//---------------------------------------------------------//--------------------------------------------------------------// - _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_LPRN, KC_RPRN, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLU, -//---------------------------------------------------------//--------------------------------------------------------------// - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, -//---------------------------------------------------------//--------------------------------------------------------------// - KC_LCTL, KC_HOME, KC_TRNS, KC_TRNS, KC_RALT, QK_BOOT, - KC_SPC, KC_BSPC, KC_RCTL, KC_ENT - ), -}; diff --git a/keyboards/bastardkb/tbk/readme.md b/keyboards/bastardkb/tbk/readme.md deleted file mode 100644 index 0d552e5caf8d..000000000000 --- a/keyboards/bastardkb/tbk/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# The Bastard Keyboard - -A split ergonomic keyboard. - -* Keyboard Maintainer: [Bastard Keyboards](https://github.com/Bastardkb/) -* Hardware Supported: elite-C V4 -* Hardware Availability: [Bastard Keyboards](https://bastardkb.com/) - -Make example for this keyboard (after setting up your build environment): - - make bastardkb/tbk:default - -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). - -See the [keyboard build instructions](https://docs.bastardkb.com) - - -## Important information regarding the reset - -If you modify this firmware, make sure to always have a QK_BOOT key that can be triggered using only the master side ! This way you ensure that you can always flash the keyboard, even if you mess up. - -Otherwise if you're stuck, open the case and reset manually by shorting Gnd and Rst, or pressing the RST button. From 119e54e9e3db66355a07be5f8db9fcc81b65f1ff Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 31 May 2024 01:34:30 +0100 Subject: [PATCH 0004/1205] Docs theme updates (#23832) --- builddefs/docsgen/.vitepress/theme/custom.css | 14 +++++++++++++- docs/cli_development.md | 4 ++-- docs/driver_installation_zadig.md | 2 +- docs/feature_sequencer.md | 2 +- docs/isp_flashing_guide.md | 2 +- docs/newbs.md | 5 ++--- docs/newbs_building_firmware_workflow.md | 6 ++---- 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/builddefs/docsgen/.vitepress/theme/custom.css b/builddefs/docsgen/.vitepress/theme/custom.css index 77726adedebf..732cb5b74fec 100644 --- a/builddefs/docsgen/.vitepress/theme/custom.css +++ b/builddefs/docsgen/.vitepress/theme/custom.css @@ -1,7 +1,19 @@ /* Override as vitepress doesn't put them with borders */ kbd { border: 1px solid var(--vp-c-text-1); - border-radius: 0.6em; + border-radius: 5px; margin: 0.2em; padding: 0.2em; } + +:root { + --vp-nav-logo-height: 32px; + + --vp-layout-max-width: calc(98% + 64px); + + --vp-sidebar-width: 300px; +} + +.VPDoc.has-aside .content-container { + max-width: unset !important; +} diff --git a/docs/cli_development.md b/docs/cli_development.md index 159bca4faa88..2e74220d4be4 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md @@ -207,7 +207,7 @@ qmk format-python We use [yapf](https://github.com/google/yapf) to automatically format code. Our configuration is in the `[yapf]` section of `setup.cfg`. ::: tip -Tip- Many editors can use yapf as a plugin to automatically format code as you type. +Many editors can use yapf as a plugin to automatically format code as you type. ::: ## Testing Details @@ -217,7 +217,7 @@ Our tests can be found in `lib/python/qmk/tests/`. You will find both unit and i If your PR does not include a comprehensive set of tests please add comments like this to your code so that other people know where they can help: ```python - # TODO(unassigned/): Write tests +# TODO(unassigned/): Write tests ``` We use [nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) to run our tests. You can refer to the nose2 documentation for more details on what you can do in your test functions. diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md index 69113863f8f7..ce16ada166ac 100644 --- a/docs/driver_installation_zadig.md +++ b/docs/driver_installation_zadig.md @@ -65,7 +65,7 @@ Run `pnputil /delete-driver oemXX.inf /uninstall`. This will delete the driver a As with the previous section, this process may need to be repeated multiple times, as multiple drivers can be applicable to the same device. ::: warning -**WARNING:** Be *extremely careful* when doing this! You could potentially uninstall the driver for some other critical device. If you are unsure, double check the output of `/enum-drivers`, and omit the `/uninstall` flag when running `/delete-driver`. +Be *extremely careful* when doing this! You could potentially uninstall the driver for some other critical device. If you are unsure, double check the output of `/enum-drivers`, and omit the `/uninstall` flag when running `/delete-driver`. ::: ## List of Known Bootloaders diff --git a/docs/feature_sequencer.md b/docs/feature_sequencer.md index c58b6225cac2..f5f1f549afd8 100644 --- a/docs/feature_sequencer.md +++ b/docs/feature_sequencer.md @@ -3,7 +3,7 @@ Since QMK has experimental support for MIDI, you can now turn your keyboard into a [step sequencer](https://en.wikipedia.org/wiki/Music_sequencer#Step_sequencers)! ::: warning -**IMPORTANT:** This feature is highly experimental, it has only been tested on a Planck EZ so far. Also, the scope will be limited to support the drum machine use-case to start with. +This feature is highly experimental, it has only been tested on a Planck EZ so far. Also, the scope will be limited to support the drum machine use-case to start with. ::: ## Enable the step sequencer diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md index afebcc6ad651..6f3f0a8f7d08 100644 --- a/docs/isp_flashing_guide.md +++ b/docs/isp_flashing_guide.md @@ -286,7 +286,7 @@ avrdude done. Thank you. This is a slightly more advanced topic, but may be necessary if you are switching from one bootloader to another (for example, Caterina to Atmel/QMK DFU on a Pro Micro). Fuses control some of the low-level functionality of the AVR microcontroller, such as clock speed, whether JTAG is enabled, and the size of the section of flash memory reserved for the bootloader, among other things. You can find a fuse calculator for many AVR parts [here](https://www.engbedded.com/conffuse/). ::: warning -**WARNING:** Setting incorrect fuse values, in particular the clock-related bits, may render the MCU practically unrecoverable without high voltage programming (not covered here)! Make sure to double check the commands you enter before you execute them. +Setting incorrect fuse values, in particular the clock-related bits, may render the MCU practically unrecoverable without high voltage programming (not covered here)! Make sure to double check the commands you enter before you execute them. ::: To set the fuses, add the following to the `avrdude` command: diff --git a/docs/newbs.md b/docs/newbs.md index 10d043c3eda3..64593cbad12c 100644 --- a/docs/newbs.md +++ b/docs/newbs.md @@ -6,10 +6,9 @@ QMK tries to put a lot of power into your hands by making easy things easy, and Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](https://qmk.fm/keyboards/). If your current keyboard can't run QMK there are a lot of choices out there for boards that do. -::: tip -**Is This Guide For Me?**
-::: +::: tip Is This Guide For Me? If the thought of programming intimidates you, please [take a look at our online GUI](newbs_building_firmware_configurator) instead. +::: ## Overview diff --git a/docs/newbs_building_firmware_workflow.md b/docs/newbs_building_firmware_workflow.md index 01c2e69032b4..a5123892783e 100644 --- a/docs/newbs_building_firmware_workflow.md +++ b/docs/newbs_building_firmware_workflow.md @@ -2,11 +2,9 @@ This is an intermediate QMK tutorial to setup an out-of-tree build environment with a personal GitHub repository. It avoids using a fork of the QMK firmware to store and build your keymap within its source tree. Keymap files will instead be stored in your own personal GitHub repository, in [Userspace](feature_userspace) format, and built with an action workflow. Unlike the [default tutorial](newbs), this guide requires some familiarity with using Git. -::: tip -**Is This Guide For Me?**
-::: +::: tip Is This Guide For Me? This is a lean setup to avoid space-consuming local build environment in your computer. Troubleshooting compile-time errors will be slower with commit uploads to GitHub for the compiler workflow. - +::: ## Prerequisites From fa6d23235bf429446250cd5212e209d5fbfdbac2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 1 Jun 2024 10:37:40 +1000 Subject: [PATCH 0005/1205] [docs] Remove gitbook directory (#23839) --- docs/__capabilities.md | 2 +- docs/feature_rgblight.md | 2 +- docs/{gitbook/images => public}/color-wheel.svg | 0 docs/{gitbook/images => public}/favicon.ico | Bin docs/{gitbook/images => public}/favicon.png | Bin 5 files changed, 2 insertions(+), 2 deletions(-) rename docs/{gitbook/images => public}/color-wheel.svg (100%) rename docs/{gitbook/images => public}/favicon.ico (100%) rename docs/{gitbook/images => public}/favicon.png (100%) diff --git a/docs/__capabilities.md b/docs/__capabilities.md index dc576d4a3c1c..873ca44664fa 100644 --- a/docs/__capabilities.md +++ b/docs/__capabilities.md @@ -41,7 +41,7 @@ Unrelated to styling, high-level tech. ![QMK Light](./public/badge-community-light.svg) ![QMK Dark](./public/badge-community-dark.svg) -HSV Color Wheel +HSV Color Wheel ### Lists diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index bd973ef00955..682d8b8cbaea 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -49,7 +49,7 @@ Then you should be able to use the keycodes below to change the RGB lighting to QMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV) to select colors rather than RGB. The color wheel below demonstrates how this works. -HSV Color Wheel +HSV Color Wheel Changing the **Hue** cycles around the circle.
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
diff --git a/docs/gitbook/images/color-wheel.svg b/docs/public/color-wheel.svg similarity index 100% rename from docs/gitbook/images/color-wheel.svg rename to docs/public/color-wheel.svg diff --git a/docs/gitbook/images/favicon.ico b/docs/public/favicon.ico similarity index 100% rename from docs/gitbook/images/favicon.ico rename to docs/public/favicon.ico diff --git a/docs/gitbook/images/favicon.png b/docs/public/favicon.png similarity index 100% rename from docs/gitbook/images/favicon.png rename to docs/public/favicon.png From 78a0adfbb4d2c4e12f93f2a62ded0020d406243e Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 2 Jun 2024 12:42:24 +1000 Subject: [PATCH 0006/1205] [docs] Organize driver & feature docs into subfolders (#23848) Co-authored-by: Nick Brassel --- docs/ChangeLog/20210828.md | 4 +- docs/ChangeLog/20211127.md | 4 +- docs/ChangeLog/20220226.md | 2 +- docs/ChangeLog/20220528.md | 4 +- docs/ChangeLog/20220827.md | 2 +- docs/ChangeLog/20221126.md | 4 +- docs/ChangeLog/20230226.md | 2 +- docs/ChangeLog/20230528.md | 4 +- docs/ChangeLog/20230827.md | 2 +- docs/ChangeLog/20240225.md | 2 +- docs/_sidebar.json | 112 +++++++++--------- docs/cli_commands.md | 2 +- docs/config_options.md | 12 +- docs/custom_quantum_functions.md | 2 +- docs/documentation_best_practices.md | 2 +- docs/driver_installation_zadig.md | 4 +- docs/{adc_driver.md => drivers/adc.md} | 2 +- docs/{apa102_driver.md => drivers/apa102.md} | 4 +- docs/{audio_driver.md => drivers/audio.md} | 2 +- docs/{eeprom_driver.md => drivers/eeprom.md} | 2 +- docs/{flash_driver.md => drivers/flash.md} | 0 docs/{gpio_control.md => drivers/gpio.md} | 0 docs/{i2c_driver.md => drivers/i2c.md} | 2 +- docs/{serial_driver.md => drivers/serial.md} | 4 +- docs/{spi_driver.md => drivers/spi.md} | 2 +- docs/{uart_driver.md => drivers/uart.md} | 0 docs/{ws2812_driver.md => drivers/ws2812.md} | 2 +- docs/easy_maker.md | 2 +- docs/faq_build.md | 2 +- docs/faq_debug.md | 2 +- docs/faq_keymap.md | 6 +- docs/feature_advanced_keycodes.md | 4 +- docs/feature_converters.md | 16 +-- docs/feature_eeprom.md | 2 +- docs/feature_layers.md | 4 +- docs/feature_macros.md | 4 +- docs/{feature_audio.md => features/audio.md} | 6 +- .../auto_shift.md} | 8 +- .../autocorrect.md} | 2 +- .../backlight.md} | 4 +- .../bluetooth.md} | 2 +- .../bootmagic.md} | 6 +- .../caps_word.md} | 4 +- docs/{feature_combo.md => features/combo.md} | 4 +- .../command.md} | 2 +- .../digitizer.md} | 2 +- .../dip_switch.md} | 0 .../dynamic_macros.md} | 0 .../encoders.md} | 0 .../grave_esc.md} | 0 .../haptic_feedback.md} | 4 +- .../hd44780.md} | 0 .../joystick.md} | 2 +- .../key_lock.md} | 4 +- .../key_overrides.md} | 4 +- .../leader_key.md} | 4 +- .../led_indicators.md} | 2 +- .../led_matrix.md} | 2 +- docs/{feature_midi.md => features/midi.md} | 2 +- .../mouse_keys.md} | 2 +- .../oled_driver.md} | 0 .../os_detection.md} | 0 .../pointing_device.md} | 8 +- .../programmable_button.md} | 0 .../ps2_mouse.md} | 0 .../{feature_rawhid.md => features/rawhid.md} | 0 .../repeat_key.md} | 9 +- .../rgb_matrix.md} | 10 +- .../rgblight.md} | 10 +- .../{feature_secure.md => features/secure.md} | 2 +- .../send_string.md} | 8 +- .../sequencer.md} | 0 .../space_cadet.md} | 2 +- .../split_keyboard.md} | 10 +- .../{feature_st7565.md => features/st7565.md} | 0 .../stenography.md} | 4 +- .../swap_hands.md} | 2 +- .../tap_dance.md} | 4 +- .../tri_layer.md} | 2 +- .../unicode.md} | 4 +- docs/{feature_wpm.md => features/wpm.md} | 0 docs/flashing.md | 4 +- docs/getting_started_make_guide.md | 6 +- docs/hand_wire.md | 2 +- docs/hardware_drivers.md | 10 +- docs/hardware_keyboard_guidelines.md | 2 +- docs/keycodes.md | 42 +++---- docs/mod_tap.md | 2 +- docs/newbs_building_firmware.md | 4 +- docs/platformdev_rp2040.md | 30 ++--- docs/porting_your_keyboard_to_qmk.md | 2 +- docs/pr_checklist.md | 6 +- docs/ref_functions.md | 4 +- docs/reference_glossary.md | 12 +- docs/reference_info_json.md | 44 +++---- docs/syllabus.md | 28 ++--- docs/tap_hold.md | 2 +- 97 files changed, 282 insertions(+), 285 deletions(-) rename docs/{adc_driver.md => drivers/adc.md} (99%) rename docs/{apa102_driver.md => drivers/apa102.md} (85%) rename docs/{audio_driver.md => drivers/audio.md} (97%) rename docs/{eeprom_driver.md => drivers/eeprom.md} (99%) rename docs/{flash_driver.md => drivers/flash.md} (100%) rename docs/{gpio_control.md => drivers/gpio.md} (100%) rename docs/{i2c_driver.md => drivers/i2c.md} (99%) rename docs/{serial_driver.md => drivers/serial.md} (98%) rename docs/{spi_driver.md => drivers/spi.md} (99%) rename docs/{uart_driver.md => drivers/uart.md} (100%) rename docs/{ws2812_driver.md => drivers/ws2812.md} (98%) rename docs/{feature_audio.md => features/audio.md} (99%) rename docs/{feature_auto_shift.md => features/auto_shift.md} (97%) rename docs/{feature_autocorrect.md => features/autocorrect.md} (98%) rename docs/{feature_backlight.md => features/backlight.md} (97%) rename docs/{feature_bluetooth.md => features/bluetooth.md} (96%) rename docs/{feature_bootmagic.md => features/bootmagic.md} (87%) rename docs/{feature_caps_word.md => features/caps_word.md} (98%) rename docs/{feature_combo.md => features/combo.md} (98%) rename docs/{feature_command.md => features/command.md} (95%) rename docs/{feature_digitizer.md => features/digitizer.md} (96%) rename docs/{feature_dip_switch.md => features/dip_switch.md} (100%) rename docs/{feature_dynamic_macros.md => features/dynamic_macros.md} (100%) rename docs/{feature_encoders.md => features/encoders.md} (100%) rename docs/{feature_grave_esc.md => features/grave_esc.md} (100%) rename docs/{feature_haptic_feedback.md => features/haptic_feedback.md} (99%) rename docs/{feature_hd44780.md => features/hd44780.md} (100%) rename docs/{feature_joystick.md => features/joystick.md} (98%) rename docs/{feature_key_lock.md => features/key_lock.md} (86%) rename docs/{feature_key_overrides.md => features/key_overrides.md} (95%) rename docs/{feature_leader_key.md => features/leader_key.md} (94%) rename docs/{feature_led_indicators.md => features/led_indicators.md} (98%) rename docs/{feature_led_matrix.md => features/led_matrix.md} (99%) rename docs/{feature_midi.md => features/midi.md} (99%) rename docs/{feature_mouse_keys.md => features/mouse_keys.md} (98%) rename docs/{feature_oled_driver.md => features/oled_driver.md} (100%) rename docs/{feature_os_detection.md => features/os_detection.md} (100%) rename docs/{feature_pointing_device.md => features/pointing_device.md} (98%) rename docs/{feature_programmable_button.md => features/programmable_button.md} (100%) rename docs/{feature_ps2_mouse.md => features/ps2_mouse.md} (100%) rename docs/{feature_rawhid.md => features/rawhid.md} (100%) rename docs/{feature_repeat_key.md => features/repeat_key.md} (98%) rename docs/{feature_rgb_matrix.md => features/rgb_matrix.md} (99%) rename docs/{feature_rgblight.md => features/rgblight.md} (98%) rename docs/{feature_secure.md => features/secure.md} (97%) rename docs/{feature_send_string.md => features/send_string.md} (93%) rename docs/{feature_sequencer.md => features/sequencer.md} (100%) rename docs/{feature_space_cadet.md => features/space_cadet.md} (97%) rename docs/{feature_split_keyboard.md => features/split_keyboard.md} (97%) rename docs/{feature_st7565.md => features/st7565.md} (100%) rename docs/{feature_stenography.md => features/stenography.md} (98%) rename docs/{feature_swap_hands.md => features/swap_hands.md} (94%) rename docs/{feature_tap_dance.md => features/tap_dance.md} (99%) rename docs/{feature_tri_layer.md => features/tri_layer.md} (98%) rename docs/{feature_unicode.md => features/unicode.md} (98%) rename docs/{feature_wpm.md => features/wpm.md} (100%) diff --git a/docs/ChangeLog/20210828.md b/docs/ChangeLog/20210828.md index f84169cc9475..18b1d92b0cd1 100644 --- a/docs/ChangeLog/20210828.md +++ b/docs/ChangeLog/20210828.md @@ -10,11 +10,11 @@ It is also now possible to define combos that have keys overlapping with other c ### Key Overrides ([#11422](https://github.com/qmk/qmk_firmware/pull/11422)) {#key-overrides} -QMK now has a new feature: [key overrides](../feature_key_overrides). This feature allows for overriding the output of key combinations involving modifiers. As an example, pressing Shift+2 normally results in an @ on US-ANSI keyboard layouts -- the new key overrides allow for adding similar functionality, but for any modifier + key press. +QMK now has a new feature: [key overrides](../features/key_overrides). This feature allows for overriding the output of key combinations involving modifiers. As an example, pressing Shift+2 normally results in an @ on US-ANSI keyboard layouts -- the new key overrides allow for adding similar functionality, but for any modifier + key press. To illustrate, it's now possible to use the key overrides feature to translate Shift + Backspace into Delete -- an often-requested example of where this functionality comes in handy. -There's far more to describe that what lives in this changelog, so head over to the [key overrides documentation](../feature_key_overrides) for more examples and info. +There's far more to describe that what lives in this changelog, so head over to the [key overrides documentation](../features/key_overrides) for more examples and info. ### Digitizer support ([#12851](https://github.com/qmk/qmk_firmware/pull/12851)) diff --git a/docs/ChangeLog/20211127.md b/docs/ChangeLog/20211127.md index d810be505a41..5ca68c399936 100644 --- a/docs/ChangeLog/20211127.md +++ b/docs/ChangeLog/20211127.md @@ -31,7 +31,7 @@ QMK now has core-supplied support for the following pointing device peripherals: | `POINTING_DEVICE_DRIVER = pimoroni_trackball` | Pimoroni Trackball | | `POINTING_DEVICE_DRIVER = pmw3360` | PMW 3360 | -See the new documentation for the [Pointing Device](../feature_pointing_device) feature for more information on specific configuration for each driver. +See the new documentation for the [Pointing Device](../features/pointing_device) feature for more information on specific configuration for each driver. ### Dynamic Tapping Term ([#11036](https://github.com/qmk/qmk_firmware/pull/11036)) {#dynamic-tapping-term} @@ -116,7 +116,7 @@ Related to the previous section -- RGB Matrix modes have now been made to be opt Most keyboards keep their original functionality, but over time the QMK maintainers have found that removal of animations ends up being the quickest way to free up space... and some keyboards have had animations such as reactive effects disabled by default in order to still fit within the flash space available. -The full list of configurables to turn specific animations back on can be found at on the [RGB Matrix documentation](../feature_rgb_matrix#rgb-matrix-effects) page. +The full list of configurables to turn specific animations back on can be found at on the [RGB Matrix documentation](../features/rgb_matrix#rgb-matrix-effects) page. ### OLED task refactoring ([#14864](https://github.com/qmk/qmk_firmware/pull/14864)) {#oled-task-refactor} diff --git a/docs/ChangeLog/20220226.md b/docs/ChangeLog/20220226.md index f0cbbc0603eb..a10b6447eacd 100644 --- a/docs/ChangeLog/20220226.md +++ b/docs/ChangeLog/20220226.md @@ -12,7 +12,7 @@ Something something *Lets go gamers!* Pointing devices can now be shared across a split keyboard with support for a single pointing device or a pointing device on each side. -See the [Pointing Device](../feature_pointing_device) documentation for further configuration options. +See the [Pointing Device](../features/pointing_device) documentation for further configuration options. ## Changes Requiring User Action {#changes-requiring-user-action} diff --git a/docs/ChangeLog/20220528.md b/docs/ChangeLog/20220528.md index 31347c9c0052..ae84f163d4d7 100644 --- a/docs/ChangeLog/20220528.md +++ b/docs/ChangeLog/20220528.md @@ -8,7 +8,7 @@ This is a new feature that allows for capslock-like functionality that turns its For instance, if you wish to type "QMK" without holding shift the entire time, you can either tap both left and right shift, or double-tap shift, to turn on _Caps Word_ -- then type `qmk` (lowercase) without holding shift. Once you hit any key other than `a`--`z`, `0`--`9`, `-`, `_`, delete, or backspace, this will go back to normal typing! -There are other activation mechanisms as well as configurable options like timeout and the like -- see the [Caps Word documentation](../feature_caps_word) for more information. +There are other activation mechanisms as well as configurable options like timeout and the like -- see the [Caps Word documentation](../features/caps_word) for more information. ### Quantum Painter ([#10174](https://github.com/qmk/qmk_firmware/pull/10174)) {#quantum-painter} @@ -26,7 +26,7 @@ Quantum Painter is not supported on AVR due to complexity and size constraints. ### Encoder Mapping ([#13286](https://github.com/qmk/qmk_firmware/pull/13286)) {#encoder-mapping} -One of the long-standing complaints with Encoders is that there has been no easy way to configure them in user keymaps. [#13286](https://github.com/qmk/qmk_firmware/pull/13286) added support for [Encoder Mapping](../feature_encoders#encoder-map), which allows users to define encoder functionality in a similar way to their normal keymap. +One of the long-standing complaints with Encoders is that there has been no easy way to configure them in user keymaps. [#13286](https://github.com/qmk/qmk_firmware/pull/13286) added support for [Encoder Mapping](../features/encoders#encoder-map), which allows users to define encoder functionality in a similar way to their normal keymap. ::: warning This is not yet supported by QMK Configurator. It is also unlikely to ever be supported by VIA. diff --git a/docs/ChangeLog/20220827.md b/docs/ChangeLog/20220827.md index d58db91272f9..6d9f82f36a63 100644 --- a/docs/ChangeLog/20220827.md +++ b/docs/ChangeLog/20220827.md @@ -83,7 +83,7 @@ The now-EOL kbfirmware allowed people who aren't set up with QMK the ability to QMK has had the ability to write to internal MCU flash in order to emulate EEPROM for some time now, but it was only limited to a small number of MCUs. The base HAL used by QMK for a large number of ARM devices provides a "proper" embedded MCU flash driver, so _@tzarc_ decoupled the wear-leveling algorithm from the old flash writing code, improved it, wrote some tests, and enabled its use for a much larger number of other devices... including RP2040's XIP flash, and external SPI NOR Flash. -See the [EEPROM Driver](../eeprom_driver) documentation for more information. +See the [EEPROM Driver](../drivers/eeprom) documentation for more information. ### Pointing Device Improvements ([#16371](https://github.com/qmk/qmk_firmware/pull/16371), [#17111](https://github.com/qmk/qmk_firmware/pull/17111), [#17176](https://github.com/qmk/qmk_firmware/pull/17176), [#17482](https://github.com/qmk/qmk_firmware/pull/17482), [#17776](https://github.com/qmk/qmk_firmware/pull/17776), [#17613](https://github.com/qmk/qmk_firmware/pull/17613)) {#pointing-device-improvements} diff --git a/docs/ChangeLog/20221126.md b/docs/ChangeLog/20221126.md index 25cf1d592dd8..41b0ad0a6b71 100644 --- a/docs/ChangeLog/20221126.md +++ b/docs/ChangeLog/20221126.md @@ -4,7 +4,7 @@ ### Autocorrect ([#15699](https://github.com/qmk/qmk_firmware/pull/15699)) {#autocorrect} -_@getreuer_ in their infinite wisdom decided that autocorrect was a feature needed by QMK. As is customary, _@drashna_ adapted it to core and got it into a state that everyone else can use it. See [Feature: Autocorrect](../feature_autocorrect) for more ifnormation (grin). +_@getreuer_ in their infinite wisdom decided that autocorrect was a feature needed by QMK. As is customary, _@drashna_ adapted it to core and got it into a state that everyone else can use it. See [Feature: Autocorrect](../features/autocorrect) for more ifnormation (grin). ## Changes Requiring User Action {#changes-requiring-user-action} @@ -132,7 +132,7 @@ The equivalent transformations should be done for LED Matrix boards. ### Unicode mode refactoring {#unicode-mode-renaming} -Unicode modes were renamed in order to prevent collision with equivalent keycodes. The available values for `UNICODE_SELECTED_MODES` changed -- see [Feature: Unicode](../feature_unicode#setting-the-input-mode) for the new list of values and how to configure them. +Unicode modes were renamed in order to prevent collision with equivalent keycodes. The available values for `UNICODE_SELECTED_MODES` changed -- see [Feature: Unicode](../features/unicode#setting-the-input-mode) for the new list of values and how to configure them. ## Notable core changes {#notable-core} diff --git a/docs/ChangeLog/20230226.md b/docs/ChangeLog/20230226.md index ee560686044e..87ff92426454 100644 --- a/docs/ChangeLog/20230226.md +++ b/docs/ChangeLog/20230226.md @@ -106,7 +106,7 @@ void leader_end_user(void) { } ``` -For more information please see the [Leader Key documentation](../feature_leader_key). +For more information please see the [Leader Key documentation](../features/leader_key). ### Updated Keyboard Codebases {#updated-keyboard-codebases} diff --git a/docs/ChangeLog/20230528.md b/docs/ChangeLog/20230528.md index 40ab3a420c2b..77ad6209b0ed 100644 --- a/docs/ChangeLog/20230528.md +++ b/docs/ChangeLog/20230528.md @@ -24,7 +24,7 @@ Of note for keyboard designers: A new pair of keys has been added to QMK -- namely `QK_REPEAT_KEY` and `QK_ALT_REPEAT_KEY` (shortened: `QK_REP`/`QK_AREP`). These allow you to repeat the last key pressed, or in the case of the alternate key, press the "opposite" of the last key. For example, if you press `KC_LEFT`, pressing `QK_REPEAT_KEY` afterwards repeats `KC_LEFT`, but pressing `QK_ALT_REPEAT_KEY` instead sends `KC_RIGHT`. -The full list of default alternate keys is available on the [Repeat Key](../feature_repeat_key) documentation. +The full list of default alternate keys is available on the [Repeat Key](../features/repeat_key) documentation. To enable these keys, in your keymap's `rules.mk`, add: @@ -93,7 +93,7 @@ Additionally, this ensures that builds on QMK Configurator produce some sort of The "classic" OLED driver picked up support for additional sizes of OLED displays, support for the SH1107 controller, and SPI-based OLED support. -Other configurable items are available and can be found on the [OLED Driver page](../feature_oled_driver). +Other configurable items are available and can be found on the [OLED Driver page](../features/oled_driver). ## Full changelist {#full-changelist} diff --git a/docs/ChangeLog/20230827.md b/docs/ChangeLog/20230827.md index aecbcb0d8f43..493ee84349d0 100644 --- a/docs/ChangeLog/20230827.md +++ b/docs/ChangeLog/20230827.md @@ -42,7 +42,7 @@ AVR sees minimal (if any) benefit -- `double` was interpreted as `float` on AVR ### Remove encoder in-matrix workaround code ([#20389](https://github.com/qmk/qmk_firmware/pull/20389)) {#remove-encoder-in-matrix-workaround-code} -Some keyboards "hacked" encoder support into spare slots in the key matrix in order to interoperate with VIA. This workaround is no longer necessary, and the code has been removed. If you have a keyboard that uses this workaround, you will need to update your keymap to use the new [Encoder Map](../feature_encoders#encoder-map) API instead. +Some keyboards "hacked" encoder support into spare slots in the key matrix in order to interoperate with VIA. This workaround is no longer necessary, and the code has been removed. If you have a keyboard that uses this workaround, you will need to update your keymap to use the new [Encoder Map](../features/encoders#encoder-map) API instead. ### Unicodemap keycodes rename ([#21092](https://github.com/qmk/qmk_firmware/pull/21092)) {#unicodemap-keycodes-rename} diff --git a/docs/ChangeLog/20240225.md b/docs/ChangeLog/20240225.md index f4103c594e09..1ebfbd23094c 100644 --- a/docs/ChangeLog/20240225.md +++ b/docs/ChangeLog/20240225.md @@ -120,7 +120,7 @@ In some cases, accidental automatic activation of the mouse layer made it diffic ### DIP Switch Mapping ([#22543](https://github.com/qmk/qmk_firmware/pull/22543)) {#dip-switch-map} -Much like Encoder Mapping, DIP Switch Mapping allows for specifying a table of actions to execute when a DIP switch state changes. See the [DIP Switch Documentation](../feature_dip_switch#dip-switch-map) for more information. +Much like Encoder Mapping, DIP Switch Mapping allows for specifying a table of actions to execute when a DIP switch state changes. See the [DIP Switch Documentation](../features/dip_switch#dip-switch-map) for more information. ```c #if defined(DIP_SWITCH_MAP_ENABLE) diff --git a/docs/_sidebar.json b/docs/_sidebar.json index f1b7c156e6eb..b41719e4b327 100644 --- a/docs/_sidebar.json +++ b/docs/_sidebar.json @@ -103,45 +103,45 @@ { "text": "Advanced Keycodes", "items": [ - { "text": "Command", "link": "/feature_command" }, - { "text": "Dynamic Macros", "link": "/feature_dynamic_macros" }, - { "text": "Grave Escape", "link": "/feature_grave_esc" }, - { "text": "Leader Key", "link": "/feature_leader_key" }, + { "text": "Command", "link": "/features/command" }, + { "text": "Dynamic Macros", "link": "/features/dynamic_macros" }, + { "text": "Grave Escape", "link": "/features/grave_esc" }, + { "text": "Leader Key", "link": "/features/leader_key" }, { "text": "Mod-Tap", "link": "/mod_tap" }, { "text": "Macros", "link": "/feature_macros" }, - { "text": "Mouse Keys", "link": "/feature_mouse_keys" }, - { "text": "Programmable Button", "link": "/feature_programmable_button" }, - { "text": "Repeat Key", "link": "/feature_repeat_key" }, - { "text": "Space Cadet Shift", "link": "/feature_space_cadet" }, + { "text": "Mouse Keys", "link": "/features/mouse_keys" }, + { "text": "Programmable Button", "link": "/features/programmable_button" }, + { "text": "Repeat Key", "link": "/features/repeat_key" }, + { "text": "Space Cadet Shift", "link": "/features/space_cadet" }, { "text": "US ANSI Shifted Keys", "link": "/keycodes_us_ansi_shifted" } ] }, { "text": "Software Features", "items": [ - { "text": "Auto Shift", "link": "/feature_auto_shift" }, - { "text": "Autocorrect", "link": "/feature_autocorrect" }, - { "text": "Caps Word", "link": "/feature_caps_word" }, - { "text": "Combos", "link": "/feature_combo" }, + { "text": "Auto Shift", "link": "/features/auto_shift" }, + { "text": "Autocorrect", "link": "/features/autocorrect" }, + { "text": "Caps Word", "link": "/features/caps_word" }, + { "text": "Combos", "link": "/features/combo" }, { "text": "Debounce API", "link": "/feature_debounce_type" }, - { "text": "Digitizer", "link": "/feature_digitizer" }, + { "text": "Digitizer", "link": "/features/digitizer" }, { "text": "EEPROM", "link": "/feature_eeprom" }, - { "text": "Key Lock", "link": "/feature_key_lock" }, - { "text": "Key Overrides", "link": "/feature_key_overrides" }, + { "text": "Key Lock", "link": "/features/key_lock" }, + { "text": "Key Overrides", "link": "/features/key_overrides" }, { "text": "Layers", "link": "/feature_layers" }, { "text": "One Shot Keys", "link": "/one_shot_keys" }, - { "text": "OS Detection", "link": "/feature_os_detection" }, - { "text": "Raw HID", "link": "/feature_rawhid" }, - { "text": "Secure", "link": "/feature_secure" }, - { "text": "Send String", "link": "/feature_send_string" }, - { "text": "Sequencer", "link": "/feature_sequencer" }, - { "text": "Swap Hands", "link": "/feature_swap_hands" }, - { "text": "Tap Dance", "link": "/feature_tap_dance" }, + { "text": "OS Detection", "link": "/features/os_detection" }, + { "text": "Raw HID", "link": "/features/rawhid" }, + { "text": "Secure", "link": "/features/secure" }, + { "text": "Send String", "link": "/features/send_string" }, + { "text": "Sequencer", "link": "/features/sequencer" }, + { "text": "Swap Hands", "link": "/features/swap_hands" }, + { "text": "Tap Dance", "link": "/features/tap_dance" }, { "text": "Tap-Hold Configuration", "link": "/tap_hold" }, - { "text": "Tri Layer", "link": "/feature_tri_layer" }, - { "text": "Unicode", "link": "/feature_unicode" }, + { "text": "Tri Layer", "link": "/features/tri_layer" }, + { "text": "Unicode", "link": "/features/unicode" }, { "text": "Userspace", "link": "/feature_userspace" }, - { "text": "WPM Calculation", "link": "/feature_wpm" } + { "text": "WPM Calculation", "link": "/features/wpm" } ] }, { @@ -157,35 +157,35 @@ { "text": "Quantum Painter LVGL Integration", "link": "/quantum_painter_lvgl" } ] }, - { "text": "HD44780 LCD Driver", "link": "/feature_hd44780" }, - { "text": "ST7565 LCD Driver", "link": "/feature_st7565" }, - { "text": "OLED Driver", "link": "/feature_oled_driver" } + { "text": "HD44780 LCD Driver", "link": "/features/hd44780" }, + { "text": "ST7565 LCD Driver", "link": "/features/st7565" }, + { "text": "OLED Driver", "link": "/features/oled_driver" } ] }, { "text": "Lighting", "items": [ - { "text": "Backlight", "link": "/feature_backlight" }, - { "text": "LED Matrix", "link": "/feature_led_matrix" }, - { "text": "RGB Lighting", "link": "/feature_rgblight" }, - { "text": "RGB Matrix", "link": "/feature_rgb_matrix" } + { "text": "Backlight", "link": "/features/backlight" }, + { "text": "LED Matrix", "link": "/features/led_matrix" }, + { "text": "RGB Lighting", "link": "/features/rgblight" }, + { "text": "RGB Matrix", "link": "/features/rgb_matrix" } ] }, - { "text": "Audio", "link": "/feature_audio" }, - { "text": "Bluetooth", "link": "/feature_bluetooth" }, - { "text": "Bootmagic Lite", "link": "/feature_bootmagic" }, + { "text": "Audio", "link": "/features/audio" }, + { "text": "Bluetooth", "link": "/features/bluetooth" }, + { "text": "Bootmagic Lite", "link": "/features/bootmagic" }, { "text": "Converters", "link": "/feature_converters" }, { "text": "Custom Matrix", "link": "/custom_matrix" }, - { "text": "DIP Switch", "link": "/feature_dip_switch" }, - { "text": "Encoders", "link": "/feature_encoders" }, - { "text": "Haptic Feedback", "link": "/feature_haptic_feedback" }, - { "text": "Joystick", "link": "/feature_joystick" }, - { "text": "LED Indicators", "link": "/feature_led_indicators" }, - { "text": "MIDI", "link": "/feature_midi" }, - { "text": "Pointing Device", "link": "/feature_pointing_device" }, - { "text": "PS/2 Mouse", "link": "/feature_ps2_mouse" }, - { "text": "Split Keyboard", "link": "/feature_split_keyboard" }, - { "text": "Stenography", "link": "/feature_stenography" } + { "text": "DIP Switch", "link": "/features/dip_switch" }, + { "text": "Encoders", "link": "/features/encoders" }, + { "text": "Haptic Feedback", "link": "/features/haptic_feedback" }, + { "text": "Joystick", "link": "/features/joystick" }, + { "text": "LED Indicators", "link": "/features/led_indicators" }, + { "text": "MIDI", "link": "/features/midi" }, + { "text": "Pointing Device", "link": "/features/pointing_device" }, + { "text": "PS/2 Mouse", "link": "/features/ps2_mouse" }, + { "text": "Split Keyboard", "link": "/features/split_keyboard" }, + { "text": "Stenography", "link": "/features/stenography" } ] }, { @@ -226,19 +226,19 @@ "text": "Drivers", "link": "hardware_drivers", "items": [ - { "text": "ADC Driver", "link": "/adc_driver" }, - { "text": "APA102 Driver", "link": "/apa102_driver" }, - { "text": "Audio Driver", "link": "/audio_driver" }, - { "text": "I2C Driver", "link": "/i2c_driver" }, - { "text": "SPI Driver", "link": "/spi_driver" }, - { "text": "WS2812 Driver", "link": "/ws2812_driver" }, - { "text": "EEPROM Driver", "link": "/eeprom_driver" }, - { "text": "Flash Driver", "link": "/flash_driver" }, - { "text": "'serial' Driver", "link": "/serial_driver" }, - { "text": "UART Driver", "link": "/uart_driver" } + { "text": "ADC Driver", "link": "/drivers/adc" }, + { "text": "APA102 Driver", "link": "/drivers/apa102" }, + { "text": "Audio Driver", "link": "/drivers/audio" }, + { "text": "EEPROM Driver", "link": "/drivers/eeprom" }, + { "text": "Flash Driver", "link": "/drivers/flash" }, + { "text": "I2C Driver", "link": "/drivers/i2c" }, + { "text": "'serial' Driver", "link": "/drivers/serial" }, + { "text": "SPI Driver", "link": "/drivers/spi" }, + { "text": "UART Driver", "link": "/drivers/uart" }, + { "text": "WS2812 Driver", "link": "/drivers/ws2812" } ] }, - { "text": "GPIO Controls", "link": "/gpio_control" }, + { "text": "GPIO Controls", "link": "/drivers/gpio" }, { "text": "Keyboard Guidelines", "link": "/hardware_keyboard_guidelines" } ] }, diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 5a85356e7071..7d74d8e6177b 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -749,7 +749,7 @@ options: ## `qmk generate-rgb-breathe-table` -This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/rgblight/`. +This command generates a lookup table (LUT) header file for the [RGB Lighting](features/rgblight) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/rgblight/`. **Usage**: diff --git a/docs/config_options.md b/docs/config_options.md index 236649a0ea5b..a1ca8c8d503a 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -207,7 +207,7 @@ If you define these options you will enable the associated feature, which may in * `#define TAP_HOLD_CAPS_DELAY 80` * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPS_LOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. * `#define KEY_OVERRIDE_REPEAT_DELAY 500` - * Sets the key repeat interval for [key overrides](feature_key_overrides). + * Sets the key repeat interval for [key overrides](features/key_overrides). * `#define LEGACY_MAGIC_HANDLING` * Enables magic configuration handling for advanced keycodes (such as Mod Tap and Layer Tap) @@ -217,14 +217,14 @@ If you define these options you will enable the associated feature, which may in * `#define WS2812_DI_PIN D7` * pin the DI on the WS2812 is hooked-up to * `#define RGBLIGHT_LAYERS` - * Lets you define [lighting layers](feature_rgblight#lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state. + * Lets you define [lighting layers](features/rgblight#lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state. * `#define RGBLIGHT_MAX_LAYERS` - * Defaults to 8. Can be expanded up to 32 if more [lighting layers](feature_rgblight#lighting-layers) are needed. + * Defaults to 8. Can be expanded up to 32 if more [lighting layers](features/rgblight#lighting-layers) are needed. * Note: Increasing the maximum will increase the firmware size and slow sync on split keyboards. * `#define RGBLIGHT_LAYER_BLINK` - * Adds ability to [blink](feature_rgblight#lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action). + * Adds ability to [blink](features/rgblight#lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action). * `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` - * If defined, then [lighting layers](feature_rgblight#overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off. + * If defined, then [lighting layers](features/rgblight#overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off. * `#define RGBLIGHT_LED_COUNT 12` * number of LEDs * `#define RGBLIGHT_SPLIT` @@ -358,7 +358,7 @@ There are a few different ways to set handedness for split keyboards (listed in * `#define SPLIT_TRANSACTION_IDS_KB .....` * `#define SPLIT_TRANSACTION_IDS_USER .....` - * Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard#custom-data-sync) for more information. + * Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](features/split_keyboard#custom-data-sync) for more information. # The `rules.mk` File diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index ac21f0e0390e..729f0cd02834 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -206,7 +206,7 @@ Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To ### Example `void housekeeping_task_user(void)` implementation -This example will show you how to use `void housekeeping_task_user(void)` to turn off [RGB Light](feature_rgblight). For RGB Matrix, the [builtin](feature_rgb_matrix#additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used. +This example will show you how to use `void housekeeping_task_user(void)` to turn off [RGB Light](features/rgblight). For RGB Matrix, the [builtin](features/rgb_matrix#additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used. First, add the following lines to your keymap's `config.h`: diff --git a/docs/documentation_best_practices.md b/docs/documentation_best_practices.md index d41ec28f196f..bc64472e2415 100644 --- a/docs/documentation_best_practices.md +++ b/docs/documentation_best_practices.md @@ -69,4 +69,4 @@ This page describes my cool feature. You can use my cool feature to make coffee |KC_SUGAR||Order Sugar| ``` -Place your documentation into `docs/feature_.md`, and add that file to the appropriate place in `docs/_sidebar.json`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. +Place your documentation into `docs/features/.md`, and add that file to the appropriate place in `docs/_sidebar.json`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md index ce16ada166ac..099376faeb1d 100644 --- a/docs/driver_installation_zadig.md +++ b/docs/driver_installation_zadig.md @@ -8,8 +8,8 @@ We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have ## Installation -Put your keyboard into bootloader mode, either by hitting the `QK_BOOT` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic Lite](feature_bootmagic) docs for more details). Some boards use [Command](feature_command) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in. -Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](feature_bootmagic) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure. +Put your keyboard into bootloader mode, either by hitting the `QK_BOOT` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic Lite](features/bootmagic) docs for more details). Some boards use [Command](features/command) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in. +Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](features/bootmagic) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure. To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button. Alternatively, hold `BOOT` while inserting the USB cable. diff --git a/docs/adc_driver.md b/docs/drivers/adc.md similarity index 99% rename from docs/adc_driver.md rename to docs/drivers/adc.md index a1ab5a525132..d89068c2aeb4 100644 --- a/docs/adc_driver.md +++ b/docs/drivers/adc.md @@ -1,6 +1,6 @@ # ADC Driver -QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](feature_encoders). +QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](../features/encoders). This driver currently supports both AVR and a limited selection of ARM devices. The values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V for AVR, 3.3V only for ARM), however on ARM there is more flexibility in control of operation through `#define`s if you need more precision. diff --git a/docs/apa102_driver.md b/docs/drivers/apa102.md similarity index 85% rename from docs/apa102_driver.md rename to docs/drivers/apa102.md index 0f905e3f1811..88868a73b593 100644 --- a/docs/apa102_driver.md +++ b/docs/drivers/apa102.md @@ -1,10 +1,10 @@ # APA102 Driver {#apa102-driver} -This driver provides support for APA102 addressable RGB LEDs. They are similar to the [WS2812](ws2812_driver) LEDs, but have increased data and refresh rates. +This driver provides support for APA102 addressable RGB LEDs. They are similar to the [WS2812](ws2812) LEDs, but have increased data and refresh rates. ## Usage {#usage} -In most cases, the APA102 driver code is automatically included if you are using either the [RGBLight](feature_rgblight) or [RGB Matrix](feature_rgb_matrix) feature with the `apa102` driver set, and you would use those APIs instead. +In most cases, the APA102 driver code is automatically included if you are using either the [RGBLight](../features/rgblight) or [RGB Matrix](../features/rgb_matrix) feature with the `apa102` driver set, and you would use those APIs instead. However, if you need to use the driver standalone, add the following to your `rules.mk`: diff --git a/docs/audio_driver.md b/docs/drivers/audio.md similarity index 97% rename from docs/audio_driver.md rename to docs/drivers/audio.md index 4a71b4f411cd..c764c97369a9 100644 --- a/docs/audio_driver.md +++ b/docs/drivers/audio.md @@ -1,6 +1,6 @@ # Audio Driver {#audio-driver} -The [Audio feature](feature_audio) breaks the hardware specifics out into separate, exchangeable driver units, with a common interface to the audio-"core" - which itself handles playing songs and notes while tracking their progress in an internal state, initializing/starting/stopping the driver as needed. +The [Audio feature](../features/audio) breaks the hardware specifics out into separate, exchangeable driver units, with a common interface to the audio-"core" - which itself handles playing songs and notes while tracking their progress in an internal state, initializing/starting/stopping the driver as needed. Not all MCUs support every available driver, either the platform-support is not there (yet?) or the MCU simply does not have the required hardware peripheral. diff --git a/docs/eeprom_driver.md b/docs/drivers/eeprom.md similarity index 99% rename from docs/eeprom_driver.md rename to docs/drivers/eeprom.md index 6d13377ed8d0..82630c501d11 100644 --- a/docs/eeprom_driver.md +++ b/docs/drivers/eeprom.md @@ -133,7 +133,7 @@ If your MCU does not boot after swapping to the EFL wear-leveling driver, it's l ## Wear-leveling SPI Flash Driver Configuration {#wear_leveling-flash_spi-driver-configuration} -This driver performs writes to an external SPI NOR Flash peripheral. It also requires a working configuration for the SPI NOR Flash peripheral -- see the [flash driver](flash_driver) documentation for more information. +This driver performs writes to an external SPI NOR Flash peripheral. It also requires a working configuration for the SPI NOR Flash peripheral -- see the [flash driver](flash) documentation for more information. Configurable options in your keyboard's `config.h`: diff --git a/docs/flash_driver.md b/docs/drivers/flash.md similarity index 100% rename from docs/flash_driver.md rename to docs/drivers/flash.md diff --git a/docs/gpio_control.md b/docs/drivers/gpio.md similarity index 100% rename from docs/gpio_control.md rename to docs/drivers/gpio.md diff --git a/docs/i2c_driver.md b/docs/drivers/i2c.md similarity index 99% rename from docs/i2c_driver.md rename to docs/drivers/i2c.md index ccc21137b389..10949ed59e08 100644 --- a/docs/i2c_driver.md +++ b/docs/drivers/i2c.md @@ -4,7 +4,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta ## Usage {#usage} -In most cases, the I2C Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](feature_oled_driver). +In most cases, the I2C Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](../features/oled_driver). However, if you need to use the driver standalone, add the following to your `rules.mk`: diff --git a/docs/serial_driver.md b/docs/drivers/serial.md similarity index 98% rename from docs/serial_driver.md rename to docs/drivers/serial.md index ce2fc7a46c4d..364e951b8698 100644 --- a/docs/serial_driver.md +++ b/docs/drivers/serial.md @@ -1,6 +1,6 @@ # 'serial' Driver -The Serial driver powers the [Split Keyboard](feature_split_keyboard) feature. Several implementations are available that cater to the platform and capabilites of MCU in use. Note that none of the drivers support split keyboards with more than two halves. +The Serial driver powers the [Split Keyboard](../features/split_keyboard) feature. Several implementations are available that cater to the platform and capabilites of MCU in use. Note that none of the drivers support split keyboards with more than two halves. | Driver | AVR | ARM | Connection between halves | | --------------------------------------- | ------------------ | ------------------ | --------------------------------------------------------------------------------------------- | @@ -298,7 +298,7 @@ If you're having issues withe serial communication, you can enable debug message ``` ::: tip -The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug). +The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](../faq_debug). ::: ## Alternate Functions for selected STM32 MCUs diff --git a/docs/spi_driver.md b/docs/drivers/spi.md similarity index 99% rename from docs/spi_driver.md rename to docs/drivers/spi.md index b77e2dbb46f7..ddc35de8511a 100644 --- a/docs/spi_driver.md +++ b/docs/drivers/spi.md @@ -4,7 +4,7 @@ The SPI Master drivers used in QMK have a set of common functions to allow porta ## Usage {#usage} -In most cases, the SPI Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](feature_oled_driver). +In most cases, the SPI Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](../features/oled_driver). However, if you need to use the driver standalone, add the following to your `rules.mk`: diff --git a/docs/uart_driver.md b/docs/drivers/uart.md similarity index 100% rename from docs/uart_driver.md rename to docs/drivers/uart.md diff --git a/docs/ws2812_driver.md b/docs/drivers/ws2812.md similarity index 98% rename from docs/ws2812_driver.md rename to docs/drivers/ws2812.md index c445e2dbf65d..61addf1917ed 100644 --- a/docs/ws2812_driver.md +++ b/docs/drivers/ws2812.md @@ -10,7 +10,7 @@ The LEDs can be chained together, and the remaining data is passed on to the nex ## Usage {#usage} -In most cases, the WS2812 driver code is automatically included if you are using either the [RGBLight](feature_rgblight) or [RGB Matrix](feature_rgb_matrix) feature with the `ws2812` driver set, and you would use those APIs instead. +In most cases, the WS2812 driver code is automatically included if you are using either the [RGBLight](../features/rgblight) or [RGB Matrix](../features/rgb_matrix) feature with the `ws2812` driver set, and you would use those APIs instead. However, if you need to use the driver standalone, add the following to your `rules.mk`: diff --git a/docs/easy_maker.md b/docs/easy_maker.md index 6a2f00686fd5..e94477322b3b 100644 --- a/docs/easy_maker.md +++ b/docs/easy_maker.md @@ -5,7 +5,7 @@ Have you ever needed an easy way to program a controller, such as a Proton C or There are different styles of Easy Maker available depending on your needs: * [Direct Pin](https://config.qmk.fm/#/?filter=ez_maker/direct) - Connect a single switch to a single pin -* Direct Pin + Backlight (Coming Soon) - Like Direct Pin but dedicates a single pin to [Backlight](feature_backlight) control +* Direct Pin + Backlight (Coming Soon) - Like Direct Pin but dedicates a single pin to [Backlight](features/backlight) control * Direct Pin + Numlock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Numlock LED * Direct Pin + Capslock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Capslock LED * Direct Pin + Encoder (Coming Soon) - Like Direct Pin but uses 2 pins to add a single rotary encoder diff --git a/docs/faq_build.md b/docs/faq_build.md index 7fafff10664c..54ed576c708a 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -66,4 +66,4 @@ Due to how EEPROM works on ARM based chips, saved settings may no longer be vali [Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) can be used to force an eeprom reset. After flashing this image, flash your normal firmware again which should restore your keyboard to _normal_ working order. [Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin) -If bootmagic is enabled in any form, you should be able to do this too (see [Bootmagic docs](feature_bootmagic) and keyboard info for specifics on how to do this). +If bootmagic is enabled in any form, you should be able to do this too (see [Bootmagic docs](features/bootmagic) and keyboard info for specifics on how to do this). diff --git a/docs/faq_debug.md b/docs/faq_debug.md index e22bc5d9ced6..36374974dfd0 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -4,7 +4,7 @@ This page details various common questions people have about troubleshooting the ## Debugging {#debugging} -Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DB_TOGG` keycode in your keymap, use the [Command](feature_command) feature to enable debug mode, or add the following code to your keymap. +Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DB_TOGG` keycode in your keymap, use the [Command](features/command) feature to enable debug mode, or add the following code to your keymap. ```c void keyboard_post_init_user(void) { diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index 0070b6d1de19..56ccc6f6ccf5 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -45,7 +45,7 @@ QMK has a couple of features which allow you to change the behavior of your keyb Refer to the EEPROM clearing methods above, which should return those keys to normal operation. If that doesn't work, look here: * [Magic Keycodes](keycodes_magic) -* [Command](feature_command) +* [Command](features/command) ## The Menu Key Isn't Working @@ -86,7 +86,7 @@ Old vintage mechanical keyboards occasionally have lock switches but modern ones ## Input Special Characters Other Than ASCII like Cédille 'Ç' -See the [Unicode](feature_unicode) feature. +See the [Unicode](features/unicode) feature. ## `Fn` Key on macOS @@ -130,7 +130,7 @@ https://github.com/tekezo/Karabiner/issues/403 ## Esc and ` on a Single Key -See the [Grave Escape](feature_grave_esc) feature. +See the [Grave Escape](features/grave_esc) feature. ## Eject on Mac OSX diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 50dc0bb2815d..7f5a10d1c13d 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -160,7 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; ``` -Alternatively, this can be done with [Key Overrides](feature_key_overrides#simple-example). +Alternatively, this can be done with [Key Overrides](features/key_overrides#simple-example). # Advanced topics {#advanced-topics} @@ -184,4 +184,4 @@ This page used to encompass a large set of features. We have moved many sections ## Key Overrides {#key-overrides} -* [Key Overrides](feature_key_overrides) +* [Key Overrides](features/key_overrides) diff --git a/docs/feature_converters.md b/docs/feature_converters.md index 9b2d027a6655..229d1007ab4c 100644 --- a/docs/feature_converters.md +++ b/docs/feature_converters.md @@ -39,7 +39,7 @@ qmk flash -c -kb keebio/bdn9/rev1 -km default -e CONVERT_TO=proton_c You can also add the same `CONVERT_TO=` to your keymap's `rules.mk`, which will accomplish the same thing. ::: tip -If you get errors about `PORTB/DDRB`, etc not being defined, you'll need to convert the keyboard's code to use the [GPIO Controls](gpio_control) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. +If you get errors about `PORTB/DDRB`, etc not being defined, you'll need to convert the keyboard's code to use the [GPIO Controls](drivers/gpio) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. ::: ### Conditional Configuration @@ -118,11 +118,11 @@ The following defaults are based on what has been implemented for STM32 boards. | Feature | Notes | |----------------------------------------------|------------------------------------------------------------------------------------------------------------------| -| [Audio](feature_audio) | Enabled | -| [RGB Lighting](feature_rgblight) | Disabled | -| [Backlight](feature_backlight) | Forces [task driven PWM](feature_backlight#software-pwm-driver) until ARM can provide automatic configuration | +| [Audio](features/audio) | Enabled | +| [RGB Lighting](features/rgblight) | Disabled | +| [Backlight](features/backlight) | Forces [task driven PWM](features/backlight#software-pwm-driver) until ARM can provide automatic configuration | | USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | -| [Split keyboards](feature_split_keyboard) | Partial - heavily dependent on enabled features | +| [Split keyboards](features/split_keyboard) | Partial - heavily dependent on enabled features | ### Adafruit KB2040 {#kb2040} @@ -130,10 +130,10 @@ The following defaults are based on what has been implemented for [RP2040](platf | Feature | Notes | |----------------------------------------------|------------------------------------------------------------------------------------------------------------------| -| [RGB Lighting](feature_rgblight) | Enabled via `PIO` vendor driver | -| [Backlight](feature_backlight) | Forces [task driven PWM](feature_backlight#software-pwm-driver) until ARM can provide automatic configuration | +| [RGB Lighting](features/rgblight) | Enabled via `PIO` vendor driver | +| [Backlight](features/backlight) | Forces [task driven PWM](features/backlight#software-pwm-driver) until ARM can provide automatic configuration | | USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | -| [Split keyboards](feature_split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features | +| [Split keyboards](features/split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features | ### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#promicro_rp2040 } diff --git a/docs/feature_eeprom.md b/docs/feature_eeprom.md index 63026d3c102b..2912407ac765 100644 --- a/docs/feature_eeprom.md +++ b/docs/feature_eeprom.md @@ -109,7 +109,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } ``` -And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic Lite](feature_bootmagic) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued. +And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic Lite](features/bootmagic) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued. ```c void eeconfig_init_user(void) { // EEPROM is getting reset! diff --git a/docs/feature_layers.md b/docs/feature_layers.md index 77b6ef953130..fe9932fadbe6 100644 --- a/docs/feature_layers.md +++ b/docs/feature_layers.md @@ -27,7 +27,7 @@ For a similar reason, the `layer` argument of `LM()` is also limited to layers 0 |:---------------:|:----------------------:|:------------------------:|:----------------:| | ❌ | ❌ | ❌ | ✅ | -Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. +Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](features/tap_dance#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. ## Working with Layers {#working-with-layers} @@ -104,7 +104,7 @@ This runs code every time that the layers get changed. This can be useful for l ### Example `layer_state_set_*` Implementation -This example shows how to set the [RGB Underglow](feature_rgblight) lights based on the layer, using the Planck as an example. +This example shows how to set the [RGB Underglow](features/rgblight) lights based on the layer, using the Planck as an example. ```c layer_state_t layer_state_set_user(layer_state_t state) { diff --git a/docs/feature_macros.md b/docs/feature_macros.md index d5a830c0ef52..055bb3ff8f72 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -86,7 +86,7 @@ All objects have one required key: `action`. This tells QMK what the object does Only basic keycodes (prefixed by `KC_`) are supported. Do not include the `KC_` prefix when listing keycodes. * `beep` - * Play a bell if the keyboard has [audio enabled](feature_audio). + * Play a bell if the keyboard has [audio enabled](features/audio). * Example: `{"action": "beep"}` * `delay` * Pause macro playback. Duration is specified in milliseconds (ms). @@ -108,7 +108,7 @@ Only basic keycodes (prefixed by `KC_`) are supported. Do not include the `KC_` ### `SEND_STRING()` & `process_record_user` -See also: [Send String](feature_send_string) +See also: [Send String](features/send_string) Sometimes you want a key to type out words or phrases. For the most common situations, we've provided `SEND_STRING()`, which will type out a string (i.e. a sequence of characters) for you. All ASCII characters that are easily translatable to a keycode are supported (e.g. `qmk 123\n\t`). diff --git a/docs/feature_audio.md b/docs/features/audio.md similarity index 99% rename from docs/feature_audio.md rename to docs/features/audio.md index ec28860ae9fa..2f5e5b2d9819 100644 --- a/docs/feature_audio.md +++ b/docs/features/audio.md @@ -27,7 +27,7 @@ per speaker is - for example with a piezo buzzer - the black lead to Ground, and ## ARM based boards -for more technical details, see the notes on [Audio driver](audio_driver). +for more technical details, see the notes on [Audio driver](../drivers/audio). ### DAC (basic) @@ -196,7 +196,7 @@ These keycodes turn all of the audio functionality on and off. Turning it off m |`GUITAR_SONG` | `GUITAR_SOUND` |Plays when the guitar music mode is selected (process_music.c) | |`VIOLIN_SONG` | `VIOLIN_SOUND` |Plays when the violin music mode is selected (process_music.c) | |`MAJOR_SONG` | `MAJOR_SOUND` |Plays when the major music mode is selected (process_music.c) | -|`DEFAULT_LAYER_SONGS` | *Not defined* |Plays song when switched default layers with [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer)(quantum.c). | +|`DEFAULT_LAYER_SONGS` | *Not defined* |Plays song when switched default layers with [`set_single_persistent_default_layer(layer)`](../ref_functions#setting-the-persistent-default-layer)(quantum.c). | |`SENDSTRING_BELL` | *Not defined* |Plays chime when the "enter" ("\a") character is sent (send_string.c) | ## Tempo @@ -354,7 +354,7 @@ You can configure the default, min and max frequencies, the stepping and built i ## MIDI Functionality -See [MIDI](feature_midi) +See [MIDI](midi) ## Audio Keycodes diff --git a/docs/feature_auto_shift.md b/docs/features/auto_shift.md similarity index 97% rename from docs/feature_auto_shift.md rename to docs/features/auto_shift.md index 53635e39f067..45b9048f0391 100644 --- a/docs/feature_auto_shift.md +++ b/docs/features/auto_shift.md @@ -294,7 +294,7 @@ Holding and releasing a Tap Hold key without pressing another key will ordinaril result in only the hold. With `retro shift` enabled this action will instead produce a shifted version of the tap keycode on release. -It does not require [Retro Tapping](tap_hold#retro-tapping) to be enabled, and +It does not require [Retro Tapping](../tap_hold#retro-tapping) to be enabled, and if both are enabled the state of `retro tapping` will only apply if the tap keycode is not matched by Auto Shift. `RETRO_TAPPING_PER_KEY` and its corresponding function, however, are checked before `retro shift` is applied. @@ -318,10 +318,10 @@ Without a value set, holds of any length without an interrupting key will produc This value (if set) must be greater than one's `TAPPING_TERM`, as the key press must be designated as a 'hold' by `process_tapping` before we send the modifier. -[Per-key tapping terms](tap_hold#tapping-term) can be used as a workaround. +[Per-key tapping terms](../tap_hold#tapping-term) can be used as a workaround. There is no such limitation in regards to `AUTO_SHIFT_TIMEOUT` for normal keys. -**Note:** Tap Holds must be added to Auto Shift, see [here.](feature_auto_shift#auto-shift-per-key) +**Note:** Tap Holds must be added to Auto Shift, see [here.](auto_shift#auto-shift-per-key) `IS_RETRO` may be helpful if one wants all Tap Holds retro shifted. ### Retro Shift and Tap Hold Configurations @@ -330,7 +330,7 @@ Tap Hold Configurations work a little differently when using Retro Shift. Referencing `TAPPING_TERM` makes little sense, as holding longer would result in shifting one of the keys. -`RETRO_SHIFT` enables [`PERMISSIVE_HOLD`-like behaviour](tap_hold#permissive-hold) (even if not explicitly enabled) on all mod-taps for which `RETRO_SHIFT` applies. +`RETRO_SHIFT` enables [`PERMISSIVE_HOLD`-like behaviour](../tap_hold#permissive-hold) (even if not explicitly enabled) on all mod-taps for which `RETRO_SHIFT` applies. ## Using Auto Shift Setup diff --git a/docs/feature_autocorrect.md b/docs/features/autocorrect.md similarity index 98% rename from docs/feature_autocorrect.md rename to docs/features/autocorrect.md index 1ad582207aa8..df3f2e0fd8f8 100644 --- a/docs/feature_autocorrect.md +++ b/docs/features/autocorrect.md @@ -113,7 +113,7 @@ Additionally, you can use the `AC_TOGG` keycode to toggle the on/off status for Callback function `bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods)` is available to customise incoming keycodes and handle exceptions. You can use this function to sanitise input before they are passed onto the autocorrect engine ::: tip -Sanitisation of input is required because autocorrect will only match 8-bit [basic keycodes](keycodes_basic) for typos. If valid modifier keys or 16-bit keycodes that are part of a user's word input (such as Shift + A) is passed through, they will fail typo letter detection. For example a [Mod-Tap](mod_tap) key such as `LCTL_T(KC_A)` is 16-bit and should be masked for the 8-bit `KC_A`. +Sanitisation of input is required because autocorrect will only match 8-bit [basic keycodes](../keycodes_basic) for typos. If valid modifier keys or 16-bit keycodes that are part of a user's word input (such as Shift + A) is passed through, they will fail typo letter detection. For example a [Mod-Tap](../mod_tap) key such as `LCTL_T(KC_A)` is 16-bit and should be masked for the 8-bit `KC_A`. ::: The default user callback function is found inside `quantum/process_keycode/process_autocorrect.c`. It covers most use-cases for QMK special functions and quantum keycodes, including [overriding autocorrect](#overriding-autocorrect) with a modifier other than shift. The `process_autocorrect_user` function is `weak` defined to allow user's copy inside `keymap.c` (or code files) to overwrite it. diff --git a/docs/feature_backlight.md b/docs/features/backlight.md similarity index 97% rename from docs/feature_backlight.md rename to docs/features/backlight.md index 545d7be9495f..94726756fdb9 100644 --- a/docs/feature_backlight.md +++ b/docs/features/backlight.md @@ -1,6 +1,6 @@ # Backlighting {#backlighting} -Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB Underglow](feature_rgblight) and [RGB Matrix](feature_rgb_matrix) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard. +Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB Underglow](rgblight) and [RGB Matrix](rgb_matrix) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard. QMK is able to control the brightness of these LEDs by switching them on and off rapidly in a certain ratio, a technique known as *Pulse Width Modulation*, or PWM. By altering the duty cycle of the PWM signal, it creates the illusion of dimming. @@ -153,7 +153,7 @@ The following `#define`s apply only to the `timer` driver: |-----------------------|-------|----------------| |`BACKLIGHT_PWM_TIMER` |`1` |The timer to use| -Note that the choice of timer may conflict with the [Audio](feature_audio) feature. +Note that the choice of timer may conflict with the [Audio](audio) feature. ## ChibiOS/ARM Configuration {#arm-configuration} diff --git a/docs/feature_bluetooth.md b/docs/features/bluetooth.md similarity index 96% rename from docs/feature_bluetooth.md rename to docs/features/bluetooth.md index 7562a75447d2..1dbf15f4e104 100644 --- a/docs/feature_bluetooth.md +++ b/docs/features/bluetooth.md @@ -26,7 +26,7 @@ A Bluefruit UART friend can be converted to an SPI friend, however this [require ## Bluetooth Rules.mk Options -The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`. +The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](../reference_glossary#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`. Add the following to your `rules.mk`: diff --git a/docs/feature_bootmagic.md b/docs/features/bootmagic.md similarity index 87% rename from docs/feature_bootmagic.md rename to docs/features/bootmagic.md index df0344ee8e9b..49fae5ba4507 100644 --- a/docs/feature_bootmagic.md +++ b/docs/features/bootmagic.md @@ -25,7 +25,7 @@ Using Bootmagic will **always reset** the EEPROM, so you will lose any settings ## Split Keyboards -When [handedness](feature_split_keyboard#setting-handedness) is predetermined via options like `SPLIT_HAND_PIN` or `EE_HANDS`, you might need to configure a different key between halves. To identify the correct key for the right half, examine the split key matrix defined in the `.h` file, e.g.: +When [handedness](split_keyboard#setting-handedness) is predetermined via options like `SPLIT_HAND_PIN` or `EE_HANDS`, you might need to configure a different key between halves. To identify the correct key for the right half, examine the split key matrix defined in the `.h` file, e.g.: ```c #define LAYOUT_split_3x5_2( \ @@ -80,6 +80,6 @@ You can define additional logic here. For instance, resetting the EEPROM or requ ## Addenda -To manipulate settings that were formerly configured through the now-deprecated full Bootmagic feature, see [Magic Keycodes](keycodes_magic). +To manipulate settings that were formerly configured through the now-deprecated full Bootmagic feature, see [Magic Keycodes](../keycodes_magic). -The Command feature, formerly known as Magic, also allows you to control different aspects of your keyboard. While it shares some functionality with Magic Keycodes, it also allows you to do things that Magic Keycodes cannot, such as printing version information to the console. For more information, see [Command](feature_command). +The Command feature, formerly known as Magic, also allows you to control different aspects of your keyboard. While it shares some functionality with Magic Keycodes, it also allows you to do things that Magic Keycodes cannot, such as printing version information to the console. For more information, see [Command](command). diff --git a/docs/feature_caps_word.md b/docs/features/caps_word.md similarity index 98% rename from docs/feature_caps_word.md rename to docs/features/caps_word.md index 666edecb6ecc..15361aab962b 100644 --- a/docs/feature_caps_word.md +++ b/docs/features/caps_word.md @@ -62,7 +62,7 @@ Next, use one the following methods to activate Caps Word: * **Custom activation**: You can activate Caps Word from code by calling `caps_word_on()`. This may be used to activate Caps Word through [a - combo](feature_combo) or [tap dance](feature_tap_dance) or any means + combo](combo) or [tap dance](tap_dance) or any means you like. ### Troubleshooting: Command {#troubleshooting-command} @@ -71,7 +71,7 @@ When using `BOTH_SHIFTS_TURNS_ON_CAPS_WORD`, you might see a compile message **"BOTH_SHIFTS_TURNS_ON_CAPS_WORD and Command should not be enabled at the same time, since both use the Left Shift + Right Shift key combination."** -Many keyboards enable the [Command feature](feature_command), which by +Many keyboards enable the [Command feature](command), which by default is also activated using the Left Shift + Right Shift key combination. To fix this conflict, please disable Command by adding in rules.mk: diff --git a/docs/feature_combo.md b/docs/features/combo.md similarity index 98% rename from docs/feature_combo.md rename to docs/features/combo.md index b49a4448049e..bdb8c4b15fcb 100644 --- a/docs/feature_combo.md +++ b/docs/features/combo.md @@ -18,7 +18,7 @@ combo_t key_combos[] = { This will send "Escape" if you hit the A and B keys, and Ctrl+Z when you hit the C and D keys. ## Advanced Keycodes Support -Advanced keycodes, such as [Mod-Tap](mod_tap) and [Tap Dance](feature_tap_dance) are also supported together with combos. If you use these advanced keycodes in your keymap, you will need to place the full keycode in the combo definition, e.g.: +Advanced keycodes, such as [Mod-Tap](../mod_tap) and [Tap Dance](tap_dance) are also supported together with combos. If you use these advanced keycodes in your keymap, you will need to place the full keycode in the combo definition, e.g.: ```c const uint16_t PROGMEM test_combo1[] = {LSFT_T(KC_A), LT(1, KC_B), COMBO_END}; @@ -99,7 +99,7 @@ void process_combo_event(uint16_t combo_index, bool pressed) { This will send "john.doe@example.com" if you chord E and M together, and clear the current line with Backspace and Left-Shift. You could change this to do stuff like play sounds or change settings. -It is worth noting that `COMBO_ACTION`s are not needed anymore. As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to run your own custom keycodes from combos. Just define the custom keycode, program its functionality in `process_record_user`, and define a combo with `COMBO(, )`. See the first example in [Macros](feature_macros). +It is worth noting that `COMBO_ACTION`s are not needed anymore. As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to run your own custom keycodes from combos. Just define the custom keycode, program its functionality in `process_record_user`, and define a combo with `COMBO(, )`. See the first example in [Macros](../feature_macros). ## Keycodes You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game. The following keycodes are available for use in your `keymap.c` diff --git a/docs/feature_command.md b/docs/features/command.md similarity index 95% rename from docs/feature_command.md rename to docs/features/command.md index 4aba9cfb6301..7ad45103c786 100644 --- a/docs/feature_command.md +++ b/docs/features/command.md @@ -1,6 +1,6 @@ # Command -Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic Lite](feature_bootmagic). There is a lot of overlap between this functionality and the [Magic Keycodes](keycodes_magic). Wherever possible we encourage you to use that feature instead of Command. +Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic Lite](bootmagic). There is a lot of overlap between this functionality and the [Magic Keycodes](../keycodes_magic). Wherever possible we encourage you to use that feature instead of Command. On some keyboards Command is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk`: diff --git a/docs/feature_digitizer.md b/docs/features/digitizer.md similarity index 96% rename from docs/feature_digitizer.md rename to docs/features/digitizer.md index 475d5b4d51f6..e52487763689 100644 --- a/docs/feature_digitizer.md +++ b/docs/features/digitizer.md @@ -1,6 +1,6 @@ # Digitizer {#digitizer} -Digitizers allow the mouse cursor to be placed at absolute coordinates, unlike the [Pointing Device](feature_pointing_device) feature which applies relative displacements. +Digitizers allow the mouse cursor to be placed at absolute coordinates, unlike the [Pointing Device](pointing_device) feature which applies relative displacements. This feature implements a stylus device with a tip switch and barrel switch (generally equivalent to the primary and secondary mouse buttons respectively). Tip pressure is not currently implemented. diff --git a/docs/feature_dip_switch.md b/docs/features/dip_switch.md similarity index 100% rename from docs/feature_dip_switch.md rename to docs/features/dip_switch.md diff --git a/docs/feature_dynamic_macros.md b/docs/features/dynamic_macros.md similarity index 100% rename from docs/feature_dynamic_macros.md rename to docs/features/dynamic_macros.md diff --git a/docs/feature_encoders.md b/docs/features/encoders.md similarity index 100% rename from docs/feature_encoders.md rename to docs/features/encoders.md diff --git a/docs/feature_grave_esc.md b/docs/features/grave_esc.md similarity index 100% rename from docs/feature_grave_esc.md rename to docs/features/grave_esc.md diff --git a/docs/feature_haptic_feedback.md b/docs/features/haptic_feedback.md similarity index 99% rename from docs/feature_haptic_feedback.md rename to docs/features/haptic_feedback.md index 16370327cbc1..52667965a040 100644 --- a/docs/feature_haptic_feedback.md +++ b/docs/features/haptic_feedback.md @@ -192,11 +192,11 @@ The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_en With the entry of `#define NO_HAPTIC_MOD` in config.h, the following keys will not trigger feedback: * Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTL`) -* `MO()` momentary keys. See also [Layers](feature_layers). +* `MO()` momentary keys. See also [Layers](../feature_layers). * `LM()` momentary keys with mod active. * `LT()` layer tap keys, when held to activate a layer. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered. * `TT()` layer tap toggle keys, when held to activate a layer. However when tapped `TAPPING_TOGGLE` times to permanently toggle the layer, on the last tap haptic feedback is still triggered. -* `MT()` mod tap keys, when held to keep a usual modifier key pressed. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered. See also [Mod-Tap](mod_tap). +* `MT()` mod tap keys, when held to keep a usual modifier key pressed. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered. See also [Mod-Tap](../mod_tap). ### NO_HAPTIC_ALPHA With the entry of `#define NO_HAPTIC_ALPHA` in config.h, none of the alpha keys (A ... Z) will trigger a feedback. diff --git a/docs/feature_hd44780.md b/docs/features/hd44780.md similarity index 100% rename from docs/feature_hd44780.md rename to docs/features/hd44780.md diff --git a/docs/feature_joystick.md b/docs/features/joystick.md similarity index 98% rename from docs/feature_joystick.md rename to docs/features/joystick.md index 75bffa605ae6..f3fd209d5a9a 100644 --- a/docs/feature_joystick.md +++ b/docs/features/joystick.md @@ -1,6 +1,6 @@ # Joystick {#joystick} -This feature provides game controller input as a joystick device supporting up to 6 axes and 32 buttons. Axes can be read either from an [ADC-capable input pin](adc_driver), or can be virtual, so that its value is provided by your code. +This feature provides game controller input as a joystick device supporting up to 6 axes and 32 buttons. Axes can be read either from an [ADC-capable input pin](../drivers/adc), or can be virtual, so that its value is provided by your code. An analog device such as a [potentiometer](https://en.wikipedia.org/wiki/Potentiometer) found on an analog joystick's axes is based on a voltage divider, where adjusting the movable wiper controls the output voltage which can then be read by the microcontroller's ADC. diff --git a/docs/feature_key_lock.md b/docs/features/key_lock.md similarity index 86% rename from docs/feature_key_lock.md rename to docs/features/key_lock.md index 1a0a2dfb6016..ba3b71ef06c7 100644 --- a/docs/feature_key_lock.md +++ b/docs/features/key_lock.md @@ -16,8 +16,8 @@ First, enable Key Lock by setting `KEY_LOCK_ENABLE = yes` in your `rules.mk`. Th ## Caveats -Key Lock is only able to hold standard action keys and [One Shot modifier](one_shot_keys) keys (for example, if you have your Shift defined as `OSM(MOD_LSFT)`). -This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as `KC_LPRN`. If it's in the [Basic Keycodes](keycodes_basic) list, it can be held. +Key Lock is only able to hold standard action keys and [One Shot modifier](../one_shot_keys) keys (for example, if you have your Shift defined as `OSM(MOD_LSFT)`). +This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as `KC_LPRN`. If it's in the [Basic Keycodes](../keycodes_basic) list, it can be held. Switching layers will not cancel the Key Lock. The Key Lock can be cancelled by calling the `cancel_key_lock()` function. diff --git a/docs/feature_key_overrides.md b/docs/features/key_overrides.md similarity index 95% rename from docs/feature_key_overrides.md rename to docs/features/key_overrides.md index b9fbd35966a1..4c568f167919 100644 --- a/docs/feature_key_overrides.md +++ b/docs/features/key_overrides.md @@ -103,7 +103,7 @@ const key_override_t **key_overrides = (const key_override_t *[]){ ``` ### Flexible macOS-friendly Grave Escape {#flexible-macos-friendly-grave-escape} -The [Grave Escape feature](feature_grave_esc) is limited in its configurability and has [bugs when used on macOS](feature_grave_esc#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS. +The [Grave Escape feature](grave_esc) is limited in its configurability and has [bugs when used on macOS](grave_esc#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS. ```c // Shift + esc = ~ @@ -224,7 +224,7 @@ The duration of the key repeat delay is controlled with the `KEY_OVERRIDE_REPEAT ## Difference to Combos {#difference-to-combos} -Note that key overrides are very different from [combos](feature_combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interaction with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable. +Note that key overrides are very different from [combos](combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interaction with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable. ## Solution to the problem of flashing modifiers {#neutralize-flashing-modifiers} diff --git a/docs/feature_leader_key.md b/docs/features/leader_key.md similarity index 94% rename from docs/feature_leader_key.md rename to docs/features/leader_key.md index 641c2d7ae588..a36e630a3669 100644 --- a/docs/feature_leader_key.md +++ b/docs/features/leader_key.md @@ -1,6 +1,6 @@ # The Leader Key: A New Kind of Modifier {#the-leader-key} -If you're a Vim user, you probably know what a Leader key is. In contrast to [Combos](feature_combo), the Leader key allows you to hit a *sequence* of up to five keys instead, which triggers some custom functionality once complete. +If you're a Vim user, you probably know what a Leader key is. In contrast to [Combos](combo), the Leader key allows you to hit a *sequence* of up to five keys instead, which triggers some custom functionality once complete. ## Usage {#usage} @@ -86,7 +86,7 @@ Now, after you hit the leader key, you will have an infinite amount of time to s ### Strict Key Processing {#strict-key-processing} -By default, only the "tap keycode" portions of [Mod-Taps](mod_tap) and [Layer Taps](feature_layers#switching-and-toggling-layers) are added to the sequence buffer. This means if you press eg. `LT(3, KC_A)` as part of a sequence, `KC_A` will be added to the buffer, rather than the entire `LT(3, KC_A)` keycode. +By default, only the "tap keycode" portions of [Mod-Taps](../mod_tap) and [Layer Taps](../feature_layers#switching-and-toggling-layers) are added to the sequence buffer. This means if you press eg. `LT(3, KC_A)` as part of a sequence, `KC_A` will be added to the buffer, rather than the entire `LT(3, KC_A)` keycode. This gives a more expected behaviour for most users, however you may want to change this. diff --git a/docs/feature_led_indicators.md b/docs/features/led_indicators.md similarity index 98% rename from docs/feature_led_indicators.md rename to docs/features/led_indicators.md index e28c222e7653..8435c69a5526 100644 --- a/docs/feature_led_indicators.md +++ b/docs/features/led_indicators.md @@ -1,7 +1,7 @@ # LED Indicators ::: tip -LED indicators on split keyboards will require state information synced to the slave half (e.g. `#define SPLIT_LED_STATE_ENABLE`). See [data sync options](feature_split_keyboard#data-sync-options) for more details. +LED indicators on split keyboards will require state information synced to the slave half (e.g. `#define SPLIT_LED_STATE_ENABLE`). See [data sync options](split_keyboard#data-sync-options) for more details. ::: QMK provides methods to read 5 of the LEDs defined in the HID spec: diff --git a/docs/feature_led_matrix.md b/docs/features/led_matrix.md similarity index 99% rename from docs/feature_led_matrix.md rename to docs/features/led_matrix.md index 78afb36d2c69..fee7b139bce1 100644 --- a/docs/feature_led_matrix.md +++ b/docs/features/led_matrix.md @@ -2,7 +2,7 @@ This feature allows you to use LED matrices driven by external drivers. It hooks into the backlight system so you can use the same keycodes as backlighting to control it. -If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_rgb_matrix) instead. +If you want to use RGB LED's you should use the [RGB Matrix Subsystem](rgb_matrix) instead. ## Driver configuration {#driver-configuration} --- diff --git a/docs/feature_midi.md b/docs/features/midi.md similarity index 99% rename from docs/feature_midi.md rename to docs/features/midi.md index 89c6af05085a..32c062e54d21 100644 --- a/docs/feature_midi.md +++ b/docs/features/midi.md @@ -34,7 +34,7 @@ To enable advanced MIDI, add the following to your `config.h`: If you're aiming to emulate the features of something like a Launchpad or other MIDI controller you'll need to access the internal MIDI device directly. -Because there are so many possible CC messages, not all of them are implemented as keycodes. Additionally, you might need to provide more than just two values that you would get from a keycode (pressed and released) - for example, the analog values from a fader or a potentiometer. So, you will need to implement [custom keycodes](feature_macros) if you want to use them in your keymap directly using `process_record_user()`. +Because there are so many possible CC messages, not all of them are implemented as keycodes. Additionally, you might need to provide more than just two values that you would get from a keycode (pressed and released) - for example, the analog values from a fader or a potentiometer. So, you will need to implement [custom keycodes](../feature_macros) if you want to use them in your keymap directly using `process_record_user()`. For reference of all the possible control code numbers see [MIDI Specification](#midi-specification) diff --git a/docs/feature_mouse_keys.md b/docs/features/mouse_keys.md similarity index 98% rename from docs/feature_mouse_keys.md rename to docs/features/mouse_keys.md index 240f6bf9be08..c2b3e98f4241 100644 --- a/docs/feature_mouse_keys.md +++ b/docs/features/mouse_keys.md @@ -205,4 +205,4 @@ Tips: ## Use with PS/2 Mouse and Pointing Device -Mouse keys button state is shared with [PS/2 mouse](feature_ps2_mouse) and [pointing device](feature_pointing_device) so mouse keys button presses can be used for clicks and drags. +Mouse keys button state is shared with [PS/2 mouse](ps2_mouse) and [pointing device](pointing_device) so mouse keys button presses can be used for clicks and drags. diff --git a/docs/feature_oled_driver.md b/docs/features/oled_driver.md similarity index 100% rename from docs/feature_oled_driver.md rename to docs/features/oled_driver.md diff --git a/docs/feature_os_detection.md b/docs/features/os_detection.md similarity index 100% rename from docs/feature_os_detection.md rename to docs/features/os_detection.md diff --git a/docs/feature_pointing_device.md b/docs/features/pointing_device.md similarity index 98% rename from docs/feature_pointing_device.md rename to docs/features/pointing_device.md index 933202a009b9..a6bf521a184c 100644 --- a/docs/feature_pointing_device.md +++ b/docs/features/pointing_device.md @@ -420,7 +420,7 @@ Any pointing device with a lift/contact status can integrate inertial cursor fea ## Split Keyboard Configuration -The following configuration options are only available when using `SPLIT_POINTING_ENABLE` see [data sync options](feature_split_keyboard#data-sync-options). The rotation and invert `*_RIGHT` options are only used with `POINTING_DEVICE_COMBINED`. If using `POINTING_DEVICE_LEFT` or `POINTING_DEVICE_RIGHT` use the common configuration above to configure your pointing device. +The following configuration options are only available when using `SPLIT_POINTING_ENABLE` see [data sync options](split_keyboard#data-sync-options). The rotation and invert `*_RIGHT` options are only used with `POINTING_DEVICE_COMBINED`. If using `POINTING_DEVICE_LEFT` or `POINTING_DEVICE_RIGHT` use the common configuration above to configure your pointing device. | Setting | Description | Default | | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | ------------- | @@ -434,7 +434,7 @@ The following configuration options are only available when using `SPLIT_POINTIN | `POINTING_DEVICE_INVERT_Y_RIGHT` | (Optional) Inverts the Y axis report. | _not defined_ | ::: warning -If there is a `_RIGHT` configuration option or callback, the [common configuration](feature_pointing_device#common-configuration) option will work for the left. For correct left/right detection you should setup a [handedness option](feature_split_keyboard#setting-handedness), `EE_HANDS` is usually a good option for an existing board that doesn't do handedness by hardware. +If there is a `_RIGHT` configuration option or callback, the [common configuration](pointing_device#common-configuration) option will work for the left. For correct left/right detection you should setup a [handedness option](split_keyboard#setting-handedness), `EE_HANDS` is usually a good option for an existing board that doesn't do handedness by hardware. ::: @@ -458,7 +458,7 @@ If there is a `_RIGHT` configuration option or callback, the [common configurati ## Split Keyboard Callbacks and Functions -The combined functions below are only available when using `SPLIT_POINTING_ENABLE` and `POINTING_DEVICE_COMBINED`. The 2 callbacks `pointing_device_task_combined_*` replace the single sided equivalents above. See the [combined pointing devices example](feature_pointing_device#combined-pointing-devices) +The combined functions below are only available when using `SPLIT_POINTING_ENABLE` and `POINTING_DEVICE_COMBINED`. The 2 callbacks `pointing_device_task_combined_*` replace the single sided equivalents above. See the [combined pointing devices example](pointing_device#combined-pointing-devices) | Function | Description | | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | @@ -684,7 +684,7 @@ If you are having issues with pointing device drivers debug messages can be enab ``` ::: tip -The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug). +The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](../faq_debug). ::: diff --git a/docs/feature_programmable_button.md b/docs/features/programmable_button.md similarity index 100% rename from docs/feature_programmable_button.md rename to docs/features/programmable_button.md diff --git a/docs/feature_ps2_mouse.md b/docs/features/ps2_mouse.md similarity index 100% rename from docs/feature_ps2_mouse.md rename to docs/features/ps2_mouse.md diff --git a/docs/feature_rawhid.md b/docs/features/rawhid.md similarity index 100% rename from docs/feature_rawhid.md rename to docs/features/rawhid.md diff --git a/docs/feature_repeat_key.md b/docs/features/repeat_key.md similarity index 98% rename from docs/feature_repeat_key.md rename to docs/features/repeat_key.md index c353ec5b59b2..53495e0f4d6c 100644 --- a/docs/feature_repeat_key.md +++ b/docs/features/repeat_key.md @@ -172,7 +172,7 @@ uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) { #### Typing shortcuts A useful possibility is having Alternate Repeat press [a -macro](feature_macros). This way macros can be used without having to +macro](../feature_macros). This way macros can be used without having to dedicate keys to them. The following defines a couple shortcuts. * Typing K, Alt Repeat produces "`keyboard`," with the @@ -281,11 +281,8 @@ bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, ``` ::: tip -See [Layer Functions](feature_layers#functions) and [Checking Modifier +See [Layer Functions](../feature_layers#functions) and [Checking Modifier State](../feature_advanced_keycodes#checking-modifier-state) for further details. ::: -State](feature_advanced_keycodes#checking-modifier-state) for further -details. - ## Handle how a key is repeated @@ -388,7 +385,7 @@ By leveraging `get_last_keycode()` in macros, it is possible to define additional, distinct "Alternate Repeat"-like keys. The following defines two keys `ALTREP2` and `ALTREP3` and implements ten shortcuts with them for common English 5-gram letter patterns, taking inspiration from -[Stenotype](feature_stenography): +[Stenotype](stenography): | Typing | Produces | Typing | Produces | diff --git a/docs/feature_rgb_matrix.md b/docs/features/rgb_matrix.md similarity index 99% rename from docs/feature_rgb_matrix.md rename to docs/features/rgb_matrix.md index b9c01dcbf5f3..f7f693f239fa 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/features/rgb_matrix.md @@ -2,7 +2,7 @@ This feature allows you to use RGB LED matrices driven by external drivers. It hooks into the RGBLIGHT system so you can use the same keycodes as RGBLIGHT to control it. -If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix) instead. +If you want to use single color LED's you should use the [LED Matrix Subsystem](led_matrix) instead. ## Driver configuration {#driver-configuration} --- @@ -444,7 +444,7 @@ Configure the hardware via your `config.h`: ``` ::: tip -There are additional configuration options for ARM controllers that offer increased performance over the default bitbang driver. Please see [WS2812 Driver](ws2812_driver) for more information. +There are additional configuration options for ARM controllers that offer increased performance over the default bitbang driver. Please see [WS2812 Driver](../drivers/ws2812) for more information. ::: --- @@ -619,7 +619,7 @@ All RGB keycodes are currently shared with the RGBLIGHT system: ::: warning -By default, if you have both the [RGB Light](feature_rgblight) and the RGB Matrix feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. +By default, if you have both the [RGB Light](rgblight) and the RGB Matrix feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. ::: ## RGB Matrix Effects {#rgb-matrix-effects} @@ -1060,7 +1060,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { ``` ::: tip -Split keyboards will require layer state data syncing with `#define SPLIT_LAYER_STATE_ENABLE`. See [Data Sync Options](feature_split_keyboard#data-sync-options) for more details. +Split keyboards will require layer state data syncing with `#define SPLIT_LAYER_STATE_ENABLE`. See [Data Sync Options](split_keyboard#data-sync-options) for more details. ::: #### Examples {#indicator-examples-2} @@ -1105,7 +1105,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { ``` ::: tip -RGB indicators on split keyboards will require state information synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](feature_split_keyboard#data-sync-options) for more details. +RGB indicators on split keyboards will require state information synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](split_keyboard#data-sync-options) for more details. ::: #### Indicators without RGB Matrix Effect diff --git a/docs/feature_rgblight.md b/docs/features/rgblight.md similarity index 98% rename from docs/feature_rgblight.md rename to docs/features/rgblight.md index 682d8b8cbaea..ece1c1046776 100644 --- a/docs/feature_rgblight.md +++ b/docs/features/rgblight.md @@ -23,7 +23,7 @@ RGBLIGHT_ENABLE = yes ``` ::: tip -There are additional configuration options for ARM controllers that offer increased performance over the default WS2812 bitbang driver. Please see [WS2812 Driver](ws2812_driver) for more information. +There are additional configuration options for ARM controllers that offer increased performance over the default WS2812 bitbang driver. Please see [WS2812 Driver](../drivers/ws2812) for more information. ::: For APA102 LEDs, add the following to your `rules.mk`: @@ -49,7 +49,7 @@ Then you should be able to use the keycodes below to change the RGB lighting to QMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV) to select colors rather than RGB. The color wheel below demonstrates how this works. -HSV Color Wheel +HSV Color Wheel Changing the **Hue** cycles around the circle.
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
@@ -87,7 +87,7 @@ Changing the **Value** sets the overall brightness.
::: warning -By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. +By default, if you have both the RGB Light and the [RGB Matrix](rgb_matrix) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. ::: ## Configuration @@ -218,7 +218,7 @@ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64}; ## Lighting Layers ::: tip -**Note:** Lighting Layers is an RGB Light feature, it will not work for RGB Matrix. See [RGB Matrix Indicators](feature_rgb_matrix#indicators) for details on how to do so. +**Note:** Lighting Layers is an RGB Light feature, it will not work for RGB Matrix. See [RGB Matrix Indicators](rgb_matrix#indicators) for details on how to do so. ::: By including `#define RGBLIGHT_LAYERS` in your `config.h` file you can enable lighting layers. These make @@ -353,7 +353,7 @@ rgblight_blink_layer(2, 500); ``` ::: warning -Lighting layers on split keyboards will require layer state synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](feature_split_keyboard#data-sync-options) for more details. +Lighting layers on split keyboards will require layer state synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](split_keyboard#data-sync-options) for more details. ::: ### Overriding RGB Lighting on/off status diff --git a/docs/feature_secure.md b/docs/features/secure.md similarity index 97% rename from docs/feature_secure.md rename to docs/features/secure.md index 5ca9eed65fc5..02ed20a470cb 100644 --- a/docs/feature_secure.md +++ b/docs/features/secure.md @@ -16,7 +16,7 @@ To unlock, the user must perform a set of actions. This can optionally be config ### Automatic Locking Once unlocked, the keyboard will revert back to a locked state after the configured timeout. -The timeout can be refreshed by using the `secure_activity_event` function, for example from one of the various [hooks](custom_quantum_functions). +The timeout can be refreshed by using the `secure_activity_event` function, for example from one of the various [hooks](../custom_quantum_functions). ## Usage diff --git a/docs/feature_send_string.md b/docs/features/send_string.md similarity index 93% rename from docs/feature_send_string.md rename to docs/features/send_string.md index 97e4ccc80966..ed9311e20a53 100644 --- a/docs/feature_send_string.md +++ b/docs/features/send_string.md @@ -5,7 +5,7 @@ The Send String API is part of QMK's macro system. It allows for sequences of ke The full ASCII character set is supported, along with all of the keycodes in the Basic Keycode range (as these are the only ones that will actually be sent to the host). ::: tip -Unicode characters are **not** supported with this API -- see the [Unicode](feature_unicode) feature instead. +Unicode characters are **not** supported with this API -- see the [Unicode](unicode) feature instead. ::: ## Usage {#usage} @@ -22,12 +22,12 @@ Add the following to your `config.h`: |Define |Default |Description | |-----------------|----------------|------------------------------------------------------------------------------------------------------------| -|`SENDSTRING_BELL`|*Not defined* |If the [Audio](feature_audio) feature is enabled, the `\a` character (ASCII `BEL`) will beep the speaker.| +|`SENDSTRING_BELL`|*Not defined* |If the [Audio](audio) feature is enabled, the `\a` character (ASCII `BEL`) will beep the speaker.| |`BELL_SOUND` |`TERMINAL_SOUND`|The song to play when the `\a` character is encountered. By default, this is an eighth note of C5. | ## Keycodes {#keycodes} -The Send String functions accept C string literals, but specific keycodes can be injected with the below macros. All of the keycodes in the [Basic Keycode range](keycodes_basic) are supported (as these are the only ones that will actually be sent to the host), but with an `X_` prefix instead of `KC_`. +The Send String functions accept C string literals, but specific keycodes can be injected with the below macros. All of the keycodes in the [Basic Keycode range](../keycodes_basic) are supported (as these are the only ones that will actually be sent to the host), but with an `X_` prefix instead of `KC_`. |Macro |Description | |--------------|-------------------------------------------------------------------| @@ -48,7 +48,7 @@ The following characters are also mapped to their respective keycodes for conven ### Language Support {#language-support} -By default, Send String assumes your OS keyboard layout is set to US ANSI. If you are using a different keyboard layout, you can [override the lookup tables used to convert ASCII characters to keystrokes](reference_keymap_extras#sendstring-support). +By default, Send String assumes your OS keyboard layout is set to US ANSI. If you are using a different keyboard layout, you can [override the lookup tables used to convert ASCII characters to keystrokes](../reference_keymap_extras#sendstring-support). ## Examples {#examples} diff --git a/docs/feature_sequencer.md b/docs/features/sequencer.md similarity index 100% rename from docs/feature_sequencer.md rename to docs/features/sequencer.md diff --git a/docs/feature_space_cadet.md b/docs/features/space_cadet.md similarity index 97% rename from docs/feature_space_cadet.md rename to docs/features/space_cadet.md index cbb79e10adf1..0abdaebf33a0 100644 --- a/docs/feature_space_cadet.md +++ b/docs/features/space_cadet.md @@ -24,7 +24,7 @@ Firstly, in your keymap, do one of the following: ## Caveats -Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. See the [Command feature](feature_command) for info on how to change it, or make sure that Command is disabled in your `rules.mk` with: +Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. See the [Command feature](command) for info on how to change it, or make sure that Command is disabled in your `rules.mk` with: ```make COMMAND_ENABLE = no diff --git a/docs/feature_split_keyboard.md b/docs/features/split_keyboard.md similarity index 97% rename from docs/feature_split_keyboard.md rename to docs/features/split_keyboard.md index c39d0a7e0839..6efa1c2a35c3 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/features/split_keyboard.md @@ -20,12 +20,12 @@ Both sides must use the same MCU family, for eg two Pro Micro-compatible control | Transport | AVR | ARM | |------------------------------|--------------------|--------------------| -| ['serial'](serial_driver) | :heavy_check_mark: | :white_check_mark: 1 | +| ['serial'](../drivers/serial) | :heavy_check_mark: | :white_check_mark: 1 | | I2C | :heavy_check_mark: | | Notes: -1. Both hardware and software limitations are detailed within the [driver documentation](serial_driver). +1. Both hardware and software limitations are detailed within the [driver documentation](../drivers/serial). ## Hardware Configuration @@ -173,10 +173,10 @@ Some controllers (e.g. Blackpill with DFU compatible bootloader) will need to be ::: ::: tip -[QMK Toolbox]() can also be used to flash EEPROM handedness files. Place the controller in bootloader mode and select menu option Tools -> EEPROM -> Set Left/Right Hand +[QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases/) can also be used to flash EEPROM handedness files. Place the controller in bootloader mode and select menu option Tools -> EEPROM -> Set Left/Right Hand ::: -This setting is not changed when re-initializing the EEPROM using the `EE_CLR` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox]()'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files. +This setting is not changed when re-initializing the EEPROM using the `EE_CLR` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases/)'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files. You can find the `EEPROM` files in the QMK firmware repo, [here](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common). @@ -307,7 +307,7 @@ This enables transmitting the current ST7565 on/off status to the slave side of This enables transmitting the pointing device status to the master side of the split keyboard. The purpose of this feature is to enable use pointing devices on the slave side. ::: warning -There is additional required configuration for `SPLIT_POINTING_ENABLE` outlined in the [pointing device documentation](feature_pointing_device#split-keyboard-configuration). +There is additional required configuration for `SPLIT_POINTING_ENABLE` outlined in the [pointing device documentation](pointing_device#split-keyboard-configuration). ::: ```c diff --git a/docs/feature_st7565.md b/docs/features/st7565.md similarity index 100% rename from docs/feature_st7565.md rename to docs/features/st7565.md diff --git a/docs/feature_stenography.md b/docs/features/stenography.md similarity index 98% rename from docs/feature_stenography.md rename to docs/features/stenography.md index 6827117a6b36..c6c2155a9af4 100644 --- a/docs/feature_stenography.md +++ b/docs/features/stenography.md @@ -25,7 +25,7 @@ Note: Due to hardware limitations, you might not be able to run both a virtual s ::: ::: warning -Serial stenography protocols are not supported on [V-USB keyboards](compatible_microcontrollers#atmel-avr). +Serial stenography protocols are not supported on [V-USB keyboards](../compatible_microcontrollers#atmel-avr). ::: To enable stenography protocols, add the following lines to your `rules.mk`: @@ -94,7 +94,7 @@ STENO_ENABLE = yes STENO_PROTOCOL = all ``` -If you want to switch protocols programatically, as part of a custom macro for example, don't use `tap_code(QK_STENO_*)`, as `tap_code` only supports [basic keycodes](keycodes_basic). Instead, you should use `steno_set_mode(STENO_MODE_*)`, whose valid arguments are `STENO_MODE_BOLT` and `STENO_MODE_GEMINI`. +If you want to switch protocols programatically, as part of a custom macro for example, don't use `tap_code(QK_STENO_*)`, as `tap_code` only supports [basic keycodes](../keycodes_basic). Instead, you should use `steno_set_mode(STENO_MODE_*)`, whose valid arguments are `STENO_MODE_BOLT` and `STENO_MODE_GEMINI`. The default protocol is Gemini PR but the last protocol used is stored in non-volatile memory so QMK will remember your choice between reboots of your keyboard — assuming that your keyboard features (emulated) EEPROM. diff --git a/docs/feature_swap_hands.md b/docs/features/swap_hands.md similarity index 94% rename from docs/feature_swap_hands.md rename to docs/features/swap_hands.md index 7546823d841d..3560fe22f096 100644 --- a/docs/feature_swap_hands.md +++ b/docs/features/swap_hands.md @@ -30,7 +30,7 @@ Note that the array indices are reversed same as the matrix and the values are o |`QK_SWAP_HANDS_TAP_TOGGLE` |`SH_TT` |Momentary swap when held, toggle when tapped | |`QK_SWAP_HANDS_ONE_SHOT` |`SH_OS` |Turn on hand swap while held or until next key press| -`SH_TT` swap-hands tap-toggle key is similar to [layer tap-toggle](feature_layers#switching-and-toggling-layers). Tapping repeatedly (5 taps by default) will toggle swap-hands on or off, like `SH_TOGG`. Tap-toggle count can be changed by defining a value for `TAPPING_TOGGLE`. +`SH_TT` swap-hands tap-toggle key is similar to [layer tap-toggle](../feature_layers#switching-and-toggling-layers). Tapping repeatedly (5 taps by default) will toggle swap-hands on or off, like `SH_TOGG`. Tap-toggle count can be changed by defining a value for `TAPPING_TOGGLE`. ## Encoder Mapping diff --git a/docs/feature_tap_dance.md b/docs/features/tap_dance.md similarity index 99% rename from docs/feature_tap_dance.md rename to docs/features/tap_dance.md index e43daf419672..3c4040db224b 100644 --- a/docs/feature_tap_dance.md +++ b/docs/features/tap_dance.md @@ -17,7 +17,7 @@ Optionally, you might want to set a custom `TAPPING_TERM` time by adding somethi #define TAPPING_TERM_PER_KEY ``` -The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead. The `TAPPING_TERM_PER_KEY` definition is only needed if you control the tapping term through a [custom `get_tapping_term` function](tap_hold#tapping_term), which may be needed because `TAPPING_TERM` affects not just tap-dance keys. +The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead. The `TAPPING_TERM_PER_KEY` definition is only needed if you control the tapping term through a [custom `get_tapping_term` function](../tap_hold#tapping_term), which may be needed because `TAPPING_TERM` affects not just tap-dance keys. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro. That macro takes a number which will later be used as an index into the `tap_dance_actions` array and turns it into a tap-dance keycode. @@ -33,7 +33,7 @@ After this, you'll want to use the `tap_dance_actions` array to specify what act The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. ::: warning -Keep in mind that only [basic keycodes](keycodes_basic) are supported here. Custom keycodes are not supported. +Keep in mind that only [basic keycodes](../keycodes_basic) are supported here. Custom keycodes are not supported. ::: Similar to the first option, the second and third option are good for simple layer-switching cases. diff --git a/docs/feature_tri_layer.md b/docs/features/tri_layer.md similarity index 98% rename from docs/feature_tri_layer.md rename to docs/features/tri_layer.md index a67ec97a89fc..c32e65caed0f 100644 --- a/docs/feature_tri_layer.md +++ b/docs/features/tri_layer.md @@ -8,7 +8,7 @@ TRI_LAYER_ENABLE = yes Note that the "upper", "lower" and "adjust" names don't have a particular significance, they are just used to identify and clarify the behavior. Layers are processed from highest numeric value to lowest, however the values are not required to be consecutive. -For a detailed explanation of how the layer stack works, check out [Keymap Overview](keymap#keymap-and-layers). +For a detailed explanation of how the layer stack works, check out [Keymap Overview](../keymap#keymap-and-layers). ## Keycodes {#keycodes} diff --git a/docs/feature_unicode.md b/docs/features/unicode.md similarity index 98% rename from docs/feature_unicode.md rename to docs/features/unicode.md index f9295c1f5727..7ed178c30d7a 100644 --- a/docs/feature_unicode.md +++ b/docs/features/unicode.md @@ -31,7 +31,7 @@ Add the following to your `config.h`: ### Audio Feedback {#audio-feedback} -If you have the [Audio](feature_audio) feature enabled on your board, you can configure it to play sounds when the input mode is changed. +If you have the [Audio](audio) feature enabled on your board, you can configure it to play sounds when the input mode is changed. Add the following to your `config.h`: @@ -199,7 +199,7 @@ Emacs supports code point input with the `insert-char` command. **Mode Name:** `UNICODE_MODE_BSD` -Not currently implemented. If you're a BSD user and want to contribute support for this input mode, please [feel free](contributing)! +Not currently implemented. If you're a BSD user and want to contribute support for this input mode, please [feel free](../contributing)! ::::: diff --git a/docs/feature_wpm.md b/docs/features/wpm.md similarity index 100% rename from docs/feature_wpm.md rename to docs/features/wpm.md diff --git a/docs/flashing.md b/docs/flashing.md index c1e9f2a43d4a..798331eb23d1 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -53,7 +53,7 @@ QMK maintains [a fork of the LUFA DFU bootloader](https://github.com/qmk/lufa/tr //#define QMK_LED E6 //#define QMK_SPEAKER C6 ``` -Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader. +Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](features/bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader. The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string. @@ -209,7 +209,7 @@ To enable the additional features, add the following defines to your `config.h`: //#define QMK_SPEAKER C6 ``` -Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader. +Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](features/bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader. The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string. diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index 8a66a65c21a7..59455adb30e4 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -115,11 +115,11 @@ This allows you to send Unicode characters using `UM()` in your keyma This allows you to send Unicode characters by inputting a mnemonic corresponding to the character you want to send. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported. -For further details, as well as limitations, see the [Unicode page](feature_unicode). +For further details, as well as limitations, see the [Unicode page](features/unicode). `AUDIO_ENABLE` -This allows you output audio on the C6 pin (needs abstracting). See the [audio page](feature_audio) for more information. +This allows you output audio on the C6 pin (needs abstracting). See the [audio page](features/audio) for more information. `VARIABLE_TRACE` @@ -127,7 +127,7 @@ Use this to debug changes to variable values, see the [tracing variables](unit_t `KEY_LOCK_ENABLE` -This enables [key lock](feature_key_lock). +This enables [key lock](features/key_lock). `SPLIT_KEYBOARD` diff --git a/docs/hand_wire.md b/docs/hand_wire.md index 0928888f0e7f..cbb917906079 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -88,7 +88,7 @@ Note that these methods can be combined. Prepare your lengths of wire before mo ### A note on split keyboards -If you are planning a split keyboard (e.g. Dactyl) each half will require a controller and a means of communicating between them (like a TRRS or hardwired cable). Further information can be found in the [QMK split keyboard documentation.](feature_split_keyboard) +If you are planning a split keyboard (e.g. Dactyl) each half will require a controller and a means of communicating between them (like a TRRS or hardwired cable). Further information can be found in the [QMK split keyboard documentation.](features/split_keyboard) ### Soldering diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 6960bbcaa185..694d46971ac5 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md @@ -16,20 +16,20 @@ Support for addressing pins on the ProMicro by their Arduino name rather than th ## SSD1306 OLED Driver -Support for SSD1306 based OLED displays. For more information see the [OLED Driver Feature](feature_oled_driver) page. +Support for SSD1306 based OLED displays. For more information see the [OLED Driver Feature](features/oled_driver) page. ## WS2812 -Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight) page. +Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](features/rgblight) page. ## IS31FL3731 -Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to individually address LEDs using I2C. This allows up to 144 same color LEDs or 32 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix) page. +Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to individually address LEDs using I2C. This allows up to 144 same color LEDs or 32 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](features/rgb_matrix) page. ## IS31FL3733 -Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix) page. +Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](features/rgb_matrix) page. ## 24xx series external I2C EEPROM -Support for an external I2C-based EEPROM instead of using the on-chip EEPROM. For more information on how to setup the driver see the [EEPROM Driver](eeprom_driver) page. +Support for an external I2C-based EEPROM instead of using the on-chip EEPROM. For more information on how to setup the driver see the [EEPROM Driver](drivers/eeprom) page. diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 728e09c8a9ad..de67fa3bc399 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -230,7 +230,7 @@ Given the amount of functionality that QMK exposes it's very easy to confuse new ### Magic Keycodes and Command -[Magic Keycodes](keycodes_magic) and [Command](feature_command) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board. +[Magic Keycodes](keycodes_magic) and [Command](features/command) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board. By far the most common problem new users encounter is accidentally triggering Bootmagic while they're plugging in their keyboard. They're holding the keyboard by the bottom, unknowingly pressing in alt and spacebar, and then they find that these keys have been swapped on them. We recommend leaving this feature disabled by default, but if you do turn it on consider setting `BOOTMAGIC_KEY_SALT` to a key that is hard to press while plugging your keyboard in. diff --git a/docs/keycodes.md b/docs/keycodes.md index 38ed5ab18d4d..4c91d98fa7a4 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -233,7 +233,7 @@ See also: [Quantum Keycodes](quantum_keycodes#qmk-keycodes) ## Audio Keys {#audio-keys} -See also: [Audio](feature_audio) +See also: [Audio](features/audio) |Key |Aliases |Description | |-------------------------|---------|-------------------------------------------| @@ -255,7 +255,7 @@ See also: [Audio](feature_audio) ## Auto Shift {#auto-shift} -See also: [Auto Shift](feature_auto_shift) +See also: [Auto Shift](features/auto_shift) |Key |Aliases |Description | |----------------------|---------|--------------------------------------------| @@ -268,7 +268,7 @@ See also: [Auto Shift](feature_auto_shift) ## Autocorrect {#autocorrect} -See also: [Autocorrect](feature_autocorrect) +See also: [Autocorrect](features/autocorrect) |Key |Aliases |Description | |-----------------------|---------|----------------------------------------------| @@ -278,7 +278,7 @@ See also: [Autocorrect](feature_autocorrect) ## Backlighting {#backlighting} -See also: [Backlighting](feature_backlight) +See also: [Backlighting](features/backlight) | Key | Aliases | Description | |---------------------------------|-----------|-------------------------------------| @@ -292,7 +292,7 @@ See also: [Backlighting](feature_backlight) ## Bluetooth {#bluetooth} -See also: [Bluetooth](feature_bluetooth) +See also: [Bluetooth](features/bluetooth) |Key |Aliases |Description | |---------------------|---------|----------------------------------------------| @@ -302,7 +302,7 @@ See also: [Bluetooth](feature_bluetooth) ## Caps Word {#caps-word} -See also: [Caps Word](feature_caps_word) +See also: [Caps Word](features/caps_word) |Key |Aliases |Description | |---------------------|---------|------------------------------| @@ -310,7 +310,7 @@ See also: [Caps Word](feature_caps_word) ## Dynamic Macros {#dynamic-macros} -See also: [Dynamic Macros](feature_dynamic_macros) +See also: [Dynamic Macros](features/dynamic_macros) |Key |Aliases |Description | |---------------------------------|---------|--------------------------------------------------| @@ -322,7 +322,7 @@ See also: [Dynamic Macros](feature_dynamic_macros) ## Grave Escape {#grave-escape} -See also: [Grave Escape](feature_grave_esc) +See also: [Grave Escape](features/grave_esc) |Key |Aliases |Description | |-----------------|---------|------------------------------------------------------------------| @@ -330,7 +330,7 @@ See also: [Grave Escape](feature_grave_esc) ## Joystick {#joystick} -See also: [Joystick](feature_joystick) +See also: [Joystick](features/joystick) |Key |Aliases|Description| |-----------------------|-------|-----------| @@ -369,7 +369,7 @@ See also: [Joystick](feature_joystick) ## Key Lock {#key-lock} -See also: [Key Lock](feature_key_lock) +See also: [Key Lock](features/key_lock) |Key |Description | |---------|--------------------------------------------------------------| @@ -392,7 +392,7 @@ See also: [Layer Switching](feature_layers#switching-and-toggling-layers) ## Leader Key {#leader-key} -See also: [Leader Key](feature_leader_key) +See also: [Leader Key](features/leader_key) |Key |Description | |---------|------------------------| @@ -400,7 +400,7 @@ See also: [Leader Key](feature_leader_key) ## LED Matrix {#led-matrix} -See also: [LED Matrix](feature_led_matrix) +See also: [LED Matrix](features/led_matrix) |Key |Aliases |Description | |-------------------------------|---------|-----------------------------------| @@ -458,7 +458,7 @@ See also: [Magic Keycodes](keycodes_magic) ## MIDI {#midi} -See also: [MIDI](feature_midi) +See also: [MIDI](features/midi) |Key |Aliases |Description | |-------------------------------|------------------|---------------------------------| @@ -609,7 +609,7 @@ See also: [MIDI](feature_midi) ## Mouse Keys {#mouse-keys} -See also: [Mouse Keys](feature_mouse_keys) +See also: [Mouse Keys](features/mouse_keys) |Key |Aliases |Description | |----------------|---------|---------------------------| @@ -699,7 +699,7 @@ See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term) ## RGB Lighting {#rgb-lighting} -See also: [RGB Lighting](feature_rgblight) +See also: [RGB Lighting](features/rgblight) |Key |Aliases |Description | |-------------------|----------|--------------------------------------------------------------------| @@ -724,7 +724,7 @@ See also: [RGB Lighting](feature_rgblight) ## RGB Matrix Lighting {#rgb-matrix-lighting} -See also: [RGB Matrix Lighting](feature_rgb_matrix) +See also: [RGB Matrix Lighting](features/rgb_matrix) |Key |Aliases |Description | |-------------------|----------|--------------------------------------------------------------------------------------| @@ -782,7 +782,7 @@ See also: [One Shot Keys](one_shot_keys) ## Programmable Button Support {#programmable-button} -See also: [Programmable Button](feature_programmable_button) +See also: [Programmable Button](features/programmable_button) |Key |Aliases|Description | |---------------------------|-------|----------------------| @@ -821,7 +821,7 @@ See also: [Programmable Button](feature_programmable_button) ## Repeat Key {#repeat-key} -See also: [Repeat Key](feature_repeat_key) +See also: [Repeat Key](features/repeat_key) |Keycode |Aliases |Description | |-----------------------|---------|-------------------------------------| @@ -830,7 +830,7 @@ See also: [Repeat Key](feature_repeat_key) ## Space Cadet {#space-cadet} -See also: [Space Cadet](feature_space_cadet) +See also: [Space Cadet](features/space_cadet) |Key |Aliases |Description | |----------------------------------------------|---------|----------------------------------------| @@ -844,7 +844,7 @@ See also: [Space Cadet](feature_space_cadet) ## Swap Hands {#swap-hands} -See also: [Swap Hands](feature_swap_hands) +See also: [Swap Hands](features/swap_hands) |Key |Aliases |Description | |-----------------------------|---------|----------------------------------------------------| @@ -859,7 +859,7 @@ See also: [Swap Hands](feature_swap_hands) ## Unicode Support {#unicode-support} -See also: [Unicode Support](feature_unicode) +See also: [Unicode Support](features/unicode) |Key |Aliases |Description | |----------------------------|---------|----------------------------------------------------------------| diff --git a/docs/mod_tap.md b/docs/mod_tap.md index 0008967c524a..37c2ba3473bc 100644 --- a/docs/mod_tap.md +++ b/docs/mod_tap.md @@ -55,7 +55,7 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations Currently, the `kc` argument of `MT()` is limited to the [Basic Keycode set](keycodes_basic), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. This is because QMK uses 16-bit keycodes, of which 3 bits are used for the function identifier, 1 bit for selecting right or left mods, and 4 bits to tell which mods are used, leaving only 8 bits for the keycode. Additionally, if at least one right-handed modifier is specified in a Mod-Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two - for example, Left Control and Right Shift would become Right Control and Right Shift. -Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. +Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](features/tap_dance#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. You may also run into issues when using Remote Desktop Connection on Windows. Because these keycodes send key events faster than a human, Remote Desktop could miss them. To fix this, open Remote Desktop Connection, click on "Show Options", open the "Local Resources" tab, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly. diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md index d7c1157b2d50..f3afd6a89685 100644 --- a/docs/newbs_building_firmware.md +++ b/docs/newbs_building_firmware.md @@ -64,8 +64,8 @@ How to complete this step is entirely up to you. Make the one change that's been * [Basic Keycodes](keycodes_basic) * [Quantum Keycodes](quantum_keycodes) -* [Grave/Escape](feature_grave_esc) -* [Mouse keys](feature_mouse_keys) +* [Grave/Escape](features/grave_esc) +* [Mouse keys](features/mouse_keys) ::: tip While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise. diff --git a/docs/platformdev_rp2040.md b/docs/platformdev_rp2040.md index f0b006cf6eea..1269ffeeb517 100644 --- a/docs/platformdev_rp2040.md +++ b/docs/platformdev_rp2040.md @@ -4,16 +4,16 @@ The following table shows the current driver status for peripherals on RP2040 MC | System | Support | | ---------------------------------------------------------------- | ---------------------------------------------- | -| [ADC driver](adc_driver) | :heavy_check_mark: | -| [Audio](audio_driver#pwm-hardware) | :heavy_check_mark: | -| [Backlight](feature_backlight) | :heavy_check_mark: | -| [I2C driver](i2c_driver) | :heavy_check_mark: | -| [SPI driver](spi_driver) | :heavy_check_mark: | -| [WS2812 driver](ws2812_driver) | :heavy_check_mark: using `PIO` driver | -| [External EEPROMs](eeprom_driver) | :heavy_check_mark: using `I2C` or `SPI` driver | -| [EEPROM emulation](eeprom_driver#wear_leveling-configuration) | :heavy_check_mark: | -| [serial driver](serial_driver) | :heavy_check_mark: using `SIO` or `PIO` driver | -| [UART driver](uart_driver) | :heavy_check_mark: using `SIO` driver | +| [ADC driver](drivers/adc) | :heavy_check_mark: | +| [Audio](drivers/audio#pwm-hardware) | :heavy_check_mark: | +| [Backlight](features/backlight) | :heavy_check_mark: | +| [I2C driver](drivers/i2c) | :heavy_check_mark: | +| [SPI driver](drivers/spi) | :heavy_check_mark: | +| [WS2812 driver](drivers/ws2812) | :heavy_check_mark: using `PIO` driver | +| [External EEPROMs](drivers/eeprom) | :heavy_check_mark: using `I2C` or `SPI` driver | +| [EEPROM emulation](drivers/eeprom#wear_leveling-configuration) | :heavy_check_mark: | +| [serial driver](drivers/serial) | :heavy_check_mark: using `SIO` or `PIO` driver | +| [UART driver](drivers/uart) | :heavy_check_mark: using `SIO` driver | ## GPIO @@ -43,7 +43,7 @@ QMK RP2040 support builds upon ChibiOS and thus follows their convention for act | `I2C0` | `RP_I2C_USE_I2C0` | `I2CD0` | | `I2C1` | `RP_I2C_USE_I2C1` | `I2CD1` | -To configure the I2C driver please read the [ChibiOS/ARM](i2c_driver#arm-configuration) section. +To configure the I2C driver please read the [ChibiOS/ARM](drivers/i2c#arm-configuration) section. ### SPI Driver @@ -52,7 +52,7 @@ To configure the I2C driver please read the [ChibiOS/ARM](i2c_driver#arm-configu | `SPI0` | `RP_SPI_USE_SPI0` | `SPID0` | | `SPI1` | `RP_SPI_USE_SPI1` | `SPID1` | -To configure the SPI driver please read the [ChibiOS/ARM](spi_driver#chibiosarm-configuration) section. +To configure the SPI driver please read the [ChibiOS/ARM](drivers/spi#chibiosarm-configuration) section. ### UART Driver @@ -92,7 +92,7 @@ This is the default board that is chosen, unless any other RP2040 board is selec | `SPI_MISO_PIN` | `GP20` | | `SPI_MOSI_PIN` | `GP19` | | **Serial driver** | | -| `SERIAL_USART_DRIVER` ([SIO Driver](serial_driver#the-sio-driver) only) | `SIOD0` | +| `SERIAL_USART_DRIVER` ([SIO Driver](drivers/serial#the-sio-driver) only) | `SIOD0` | | `SOFT_SERIAL_PIN` | undefined, use `SERIAL_USART_TX_PIN` | | `SERIAL_USART_TX_PIN` | `GP0` | | `SERIAL_USART_RX_PIN` | `GP1` | @@ -115,9 +115,9 @@ BOARD = GENERIC_RP_RP2040 ## Split keyboard support -Split keyboards are fully supported using the [serial driver](serial_driver) in both full-duplex and half-duplex configurations. Two driver subsystems are supported by the RP2040, the hardware UART based `SIO` and the Programmable IO based `PIO` driver. +Split keyboards are fully supported using the [serial driver](drivers/serial) in both full-duplex and half-duplex configurations. Two driver subsystems are supported by the RP2040, the hardware UART based `SIO` and the Programmable IO based `PIO` driver. -| Feature | [SIO Driver](serial_driver#the-sio-driver) | [PIO Driver](serial_driver#the-pio-driver) | +| Feature | [SIO Driver](drivers/serial#the-sio-driver) | [PIO Driver](drivers/serial#the-pio-driver) | | ----------------------------- | --------------------------------------------- | --------------------------------------------- | | Half-Duplex operation | | :heavy_check_mark: | | Full-Duplex operation | :heavy_check_mark: | :heavy_check_mark: | diff --git a/docs/porting_your_keyboard_to_qmk.md b/docs/porting_your_keyboard_to_qmk.md index c91e5ca31dfa..eb45790128d1 100644 --- a/docs/porting_your_keyboard_to_qmk.md +++ b/docs/porting_your_keyboard_to_qmk.md @@ -153,7 +153,7 @@ In the above example, * `"matrix": [0, 0]` defines the electrical position ::: tip -See also: [Split Keyboard Layout Macro](feature_split_keyboard#layout-macro) and [Matrix to Physical Layout](understanding_qmk#matrix-to-physical-layout-map). +See also: [Split Keyboard Layout Macro](features/split_keyboard#layout-macro) and [Matrix to Physical Layout](understanding_qmk#matrix-to-physical-layout-map). ::: ## Additional Configuration diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md index e5ed1d67b668..f7b16e1d8527 100644 --- a/docs/pr_checklist.md +++ b/docs/pr_checklist.md @@ -126,7 +126,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - commented-out functions removed too - `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](custom_quantum_functions#keyboard_pre_init_-function-documentation) - prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](custom_matrix#lite) - - prefer LED indicator [Configuration Options](feature_led_indicators#configuration-options) to custom `led_update_*()` implementations where possible + - prefer LED indicator [Configuration Options](features/led_indicators#configuration-options) to custom `led_update_*()` implementations where possible - hardware that's enabled at the keyboard level and requires configuration such as OLED displays or encoders should have basic functionality implemented here - `.h` - `#include "quantum.h"` appears at the top @@ -135,12 +135,12 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - no duplication of `rules.mk` or `config.h` from keyboard - `keymaps/default/keymap.c` - `QMKBEST`/`QMKURL` example macros removed - - if using `MO(1)` and `MO(2)` keycodes together to access a third layer, the [Tri Layer](feature_tri_layer) feature should be used, rather than manually implementing this using `layer_on/off()` and `update_tri_layer()` functions in the keymap's `process_record_user()`. + - if using `MO(1)` and `MO(2)` keycodes together to access a third layer, the [Tri Layer](features/tri_layer) feature should be used, rather than manually implementing this using `layer_on/off()` and `update_tri_layer()` functions in the keymap's `process_record_user()`. - default (and via) keymaps should be "pristine" - bare minimum to be used as a "clean slate" for another user to develop their own user-specific keymap - what does pristine mean? no custom keycodes. no advanced features like tap dance or macros. basic mod taps and home row mods would be acceptable where their use is necessary - standard layouts preferred in these keymaps, if possible - - should use [encoder map feature](feature_encoders#encoder-map), rather than `encoder_update_user()` + - should use [encoder map feature](features/encoders#encoder-map), rather than `encoder_update_user()` - default keymap should not enable VIA -- the VIA integration documentation requires a keymap called `via` - submitters can add an example (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap - submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board diff --git a/docs/ref_functions.md b/docs/ref_functions.md index 156c9ed20b13..577273c05d34 100644 --- a/docs/ref_functions.md +++ b/docs/ref_functions.md @@ -71,7 +71,7 @@ Do you want to set the default layer, so that it's retained even after you unplu To use this, you would use `set_single_persistent_default_layer(layer)`. If you have a name defined for your layer, you can use that instead (such as _QWERTY, _DVORAK or _COLEMAK). -This will set the default layer, update the persistent settings, and play a tune if you have [Audio](feature_audio) enabled on your board, and the default layer sounds set. +This will set the default layer, update the persistent settings, and play a tune if you have [Audio](features/audio) enabled on your board, and the default layer sounds set. To configure the default layer sounds, you would want to define this in your `config.h` file, like this: @@ -99,7 +99,7 @@ To reset to the bootloader use `QK_BOOTLOADER` or `QK_BOOT` keycode or `reset_ke ## Wiping the EEPROM (Persistent Storage) -If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EE_CLR` keycode](quantum_keycodes) or [Bootmagic Lite](feature_bootmagic) functionality. If neither of those are an option, then you can use a custom macro to do so. +If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EE_CLR` keycode](quantum_keycodes) or [Bootmagic Lite](features/bootmagic) functionality. If neither of those are an option, then you can use a custom macro to do so. To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default. diff --git a/docs/reference_glossary.md b/docs/reference_glossary.md index cf8c8f0d75fa..d24576b3330e 100644 --- a/docs/reference_glossary.md +++ b/docs/reference_glossary.md @@ -36,7 +36,7 @@ An alternative keyboard layout developed by Dr. August Dvorak in the 1930's. A s ## Dynamic Macro A macro which has been recorded on the keyboard and which will be lost when the keyboard is unplugged or the computer rebooted. -* [Dynamic Macro Documentation](feature_dynamic_macros) +* [Dynamic Macro Documentation](features/dynamic_macros) ## Eclipse An IDE that is popular with many C developers. @@ -76,7 +76,7 @@ An abstraction used to allow a key to serve multiple purposes. The highest activ ## Leader Key A feature that allows you to tap the leader key followed by a sequence of 1, 2, or 3 keys to activate key presses or other quantum features. -* [Leader Key Documentation](feature_leader_key) +* [Leader Key Documentation](features/leader_key) ## LED Light Emitting Diode, the most common device used for indicators on a keyboard. @@ -101,7 +101,7 @@ A key that is held down while typing another key to modify the action of that ke ## Mousekeys A feature that lets you control your mouse cursor and click from your keyboard. -* [Mousekeys Documentation](feature_mouse_keys) +* [Mousekeys Documentation](features/mouse_keys) ## N-Key Rollover (NKRO) A term that applies to keyboards that are capable of reporting any number of key-presses at once. @@ -130,7 +130,7 @@ A 1 byte number that is sent as part of a HID report over USB that represents a ## Space Cadet Shift A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times. -* [Space Cadet Shift Documentation](feature_space_cadet) +* [Space Cadet Shift Documentation](features/space_cadet) ## Tap Pressing and releasing a key. In some situations you will need to distinguish between a key down and a key up event, and Tap always refers to both at once. @@ -138,7 +138,7 @@ Pressing and releasing a key. In some situations you will need to distinguish be ## Tap Dance A feature that lets you assign multiple keycodes to the same key based on how many times you press it. -* [Tap Dance Documentation](feature_tap_dance) +* [Tap Dance Documentation](features/tap_dance) ## Teensy A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollars more due to its halfkay bootloader, which makes flashing very simple. @@ -149,7 +149,7 @@ A generic term for LEDs that light the underside of the board. These LEDs typica ## Unicode In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes. -* [Unicode Documentation](feature_unicode) +* [Unicode Documentation](features/unicode) ## Unit Testing A framework for running automated tests against QMK. Unit testing helps us be confident that our changes do not break anything. diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 25d2e9d1d83c..2db2cd14277a 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -95,7 +95,7 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/ - * [Audio](feature_audio) + * [Audio](features/audio) * Lighting - * [Backlight](feature_backlight) - * [LED Matrix](feature_led_matrix) - * [RGB Lighting](feature_rgblight) - * [RGB Matrix](feature_rgb_matrix) + * [Backlight](features/backlight) + * [LED Matrix](features/led_matrix) + * [RGB Lighting](features/rgblight) + * [RGB Matrix](features/rgb_matrix) * [Tap-Hold Configuration](tap_hold) * [Squeezing Space from AVR](squeezing_avr) * **Learn More About Keymaps** * [Keymaps](keymap) * [Custom Functions and Keycodes](custom_quantum_functions) * Macros - * [Dynamic Macros](feature_dynamic_macros) + * [Dynamic Macros](features/dynamic_macros) * [Compiled Macros](feature_macros) - * [Tap Dance](feature_tap_dance) - * [Combos](feature_combo) + * [Tap Dance](features/tap_dance) + * [Combos](features/combo) * [Userspace](feature_userspace) - * [Key Overrides](feature_key_overrides) + * [Key Overrides](features/key_overrides) # Advanced Topics @@ -53,15 +53,15 @@ Everything below here requires a lot of foundational knowledge. Besides being ab * [info.json Reference](reference_info_json) * [Debounce API](feature_debounce_type) * **Advanced Features** - * [Unicode](feature_unicode) + * [Unicode](features/unicode) * [API](api_overview) - * [Bootmagic Lite](feature_bootmagic) + * [Bootmagic Lite](features/bootmagic) * **Hardware** * [How Keyboards Work](how_keyboards_work) * [How A Keyboard Matrix Works](how_a_matrix_works) - * [Split Keyboards](feature_split_keyboard) - * [Stenography](feature_stenography) - * [Pointing Devices](feature_pointing_device) + * [Split Keyboards](features/split_keyboard) + * [Stenography](features/stenography) + * [Pointing Devices](features/pointing_device) * **Core Development** * [Coding Conventions](coding_conventions_c) * [Compatible Microcontrollers](compatible_microcontrollers) diff --git a/docs/tap_hold.md b/docs/tap_hold.md index fe862894b450..9b7f6552cbf0 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -497,7 +497,7 @@ Do not use `MOD_xxx` constants like `MOD_LSFT` or `MOD_RALT`, since they're 5-bi ### Retro Shift -[Auto Shift,](feature_auto_shift) has its own version of `retro tapping` called `retro shift`. It is extremely similar to `retro tapping`, but holding the key past `AUTO_SHIFT_TIMEOUT` results in the value it sends being shifted. Other configurations also affect it differently; see [here](feature_auto_shift#retro-shift) for more information. +[Auto Shift,](features/auto_shift) has its own version of `retro tapping` called `retro shift`. It is extremely similar to `retro tapping`, but holding the key past `AUTO_SHIFT_TIMEOUT` results in the value it sends being shifted. Other configurations also affect it differently; see [here](features/auto_shift#retro-shift) for more information. ## Why do we include the key record for the per key functions? From 41dbb4c86c2afd45480ed38c0d5f058eef41a92f Mon Sep 17 00:00:00 2001 From: Alex Mayer Date: Sat, 1 Jun 2024 23:19:23 -0400 Subject: [PATCH 0007/1205] Fix Vitamins Included Keymap Formatting (#23803) --- .../keymaps/default/keymap.c | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/keyboards/vitamins_included/keymaps/default/keymap.c b/keyboards/vitamins_included/keymaps/default/keymap.c index 12219b723add..3fcb08b8da10 100644 --- a/keyboards/vitamins_included/keymaps/default/keymap.c +++ b/keyboards/vitamins_included/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -// Layer names - enum layer_names { _QWERTY, _COLEMAK, @@ -25,9 +23,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------. * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt |Adjust|Lower |Space |Space |Raise | Left | Down | Up |Right | @@ -43,9 +41,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Esc | A | R | S | T | D | H | N | E | I | O | ' | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | @@ -61,9 +59,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak * ,-----------------------------------------------------------------------------------. * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | @@ -79,30 +77,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * |QK_BOOT | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * |TGNKRO| | | | | | | Next | Vol- | Vol+ | Play | + * | BOOT | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |TGNKRO| | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho_4x12( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - QK_BOOT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, - NK_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + QK_BOOT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, _______, + NK_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), /* Raise * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | |TGNKRO|QK_BOOT | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | |TGNKRO| BOOT | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_ortho_4x12( @@ -115,12 +113,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | |Qwerty|Colemk|Dvorak| | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | |Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | |Audoff Audon | | | | |RGBMOD| + * | | | | | |Audoff|Audon | | | | |RGBMOD| * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( From 282253a7e0c51717234bd64159a37ee527d16dc2 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 3 Jun 2024 08:55:03 +1000 Subject: [PATCH 0008/1205] [docs] Add ability to redirect based on input path. (#23851) --- .../docsgen/.vitepress/theme/QMKLayout.vue | 15 +++- docs/_aliases.json | 74 +++++++++++++++++++ 2 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 docs/_aliases.json diff --git a/builddefs/docsgen/.vitepress/theme/QMKLayout.vue b/builddefs/docsgen/.vitepress/theme/QMKLayout.vue index 30d0780d7c31..9d7a41f9e2d8 100644 --- a/builddefs/docsgen/.vitepress/theme/QMKLayout.vue +++ b/builddefs/docsgen/.vitepress/theme/QMKLayout.vue @@ -2,11 +2,22 @@ import DefaultTheme from 'vitepress/theme' import { useRouter } from 'vitepress' import { onBeforeMount } from 'vue'; +import aliases from "../../../../docs/_aliases.json"; const router = useRouter() onBeforeMount(async () => { - if (window.location.href.includes('/#/')) { - const newUrl = window.location.href.replace(/\/#\//, '/').replace(/\?id=/, '#'); + // Convert from docsify-style to vitepress-style URLs + let newUrl = window.location.href.replace(/\/#\//, '/').replace(/\?id=/, '#'); + + // Convert any aliases + let testUrl = new URL(newUrl); + while (testUrl.pathname in aliases) { + testUrl.pathname = aliases[testUrl.pathname]; + } + newUrl = testUrl.toString(); + + // Redirect if required + if (newUrl != window.location.href) { window.history.replaceState({}, '', newUrl); await router.go(newUrl); } diff --git a/docs/_aliases.json b/docs/_aliases.json new file mode 100644 index 000000000000..a2224bd0d547 --- /dev/null +++ b/docs/_aliases.json @@ -0,0 +1,74 @@ +{ + "/adding_a_keyboard_to_qmk": "/hardware_keyboard_guidelines", + "/build_environment_setup": "/newbs_getting_started", + "/cli_dev_configuration": "/cli_configuration", + "/dynamic_macros": "/feature_dynamic_macros", + "/feature_common_shortcuts": "/feature_advanced_keycodes", + "/getting_started_build_tools": "/newbs_getting_started", + "/getting_started_getting_help": "/support", + "/glossary": "/reference_glossary", + "/key_lock": "/feature_key_lock", + "/make_instructions": "/getting_started_make_guide", + "/python_development": "/cli_development", + "/space_cadet_shift": "/feature_space_cadet_shift", + "/tap_dance": "/feature_tap_dance", + "/tutorial": "/newbs", + "/unicode": "/feature_unicode", + + "/adc_driver": "/drivers/adc", + "/apa102_driver": "/drivers/apa102", + "/audio_driver": "/drivers/audio", + "/eeprom_driver": "/drivers/eeprom", + "/feature_audio": "/features/audio", + "/feature_auto_shift": "/features/auto_shift", + "/feature_autocorrect": "/features/autocorrect", + "/feature_backlight": "/features/backlight", + "/feature_bluetooth": "/features/bluetooth", + "/feature_bootmagic": "/features/bootmagic", + "/feature_caps_word": "/features/caps_word", + "/feature_combo": "/features/combo", + "/feature_command": "/features/command", + "/feature_digitizer": "/features/digitizer", + "/feature_dip_switch": "/features/dip_switch", + "/feature_dynamic_macros": "/features/dynamic_macros", + "/feature_encoders": "/features/encoders", + "/feature_grave_esc": "/features/grave_esc", + "/feature_haptic_feedback": "/features/haptic_feedback", + "/feature_hd44780": "/features/hd44780", + "/feature_joystick": "/features/joystick", + "/feature_key_lock": "/features/key_lock", + "/feature_key_overrides": "/features/key_overrides", + "/feature_leader_key": "/features/leader_key", + "/feature_led_indicators": "/features/led_indicators", + "/feature_led_matrix": "/features/led_matrix", + "/feature_midi": "/features/midi", + "/feature_mouse_keys": "/features/mouse_keys", + "/feature_oled_driver": "/features/oled_driver", + "/feature_os_detection": "/features/os_detection", + "/feature_pointing_device": "/features/pointing_device", + "/feature_programmable_button": "/features/programmable_button", + "/feature_ps2_mouse": "/features/ps2_mouse", + "/feature_rawhid": "/features/rawhid", + "/feature_repeat_key": "/features/repeat_key", + "/feature_rgb_matrix": "/features/rgb_matrix", + "/feature_rgblight": "/features/rgblight", + "/feature_secure": "/features/secure", + "/feature_send_string": "/features/send_string", + "/feature_sequencer": "/features/sequencer", + "/feature_space_cadet": "/features/space_cadet", + "/feature_split_keyboard": "/features/split_keyboard", + "/feature_st7565": "/features/st7565", + "/feature_stenography": "/features/stenography", + "/feature_swap_hands": "/features/swap_hands", + "/feature_tap_dance": "/features/tap_dance", + "/feature_tri_layer": "/features/tri_layer", + "/feature_unicode": "/features/unicode", + "/feature_wpm": "/features/wpm", + "/flash_driver": "/drivers/flash", + "/gpio_control": "/drivers/gpio", + "/i2c_driver": "/drivers/i2c", + "/serial_driver": "/drivers/serial", + "/spi_driver": "/drivers/spi", + "/uart_driver": "/drivers/uart", + "/ws2812_driver": "/drivers/ws2812" +} From 8253697a6389aaec73f85a29dd25247b32389502 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Mon, 3 Jun 2024 14:35:46 +0200 Subject: [PATCH 0009/1205] [FIX] ChibiOS: USB Digitizer and Joystick IN endpoint compilation (#23854) Co-authored-by: Ryan --- tmk_core/protocol/chibios/usb_endpoints.c | 4 ++-- tmk_core/protocol/usb_descriptor.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_endpoints.c b/tmk_core/protocol/chibios/usb_endpoints.c index 37ec3c722f60..856df6242603 100644 --- a/tmk_core/protocol/chibios/usb_endpoints.c +++ b/tmk_core/protocol/chibios/usb_endpoints.c @@ -57,11 +57,11 @@ usb_endpoint_in_t usb_endpoints_in[USB_ENDPOINT_IN_COUNT] = { #endif #if defined(JOYSTICK_ENABLE) && !defined(JOYSTICK_SHARED_EP) - [USB_ENDPOINT_IN_JOYSTICK] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, JOYSTICK_EPSIZE, JOYSTICK_IN_EPNUM, JOYSTICK_IN_CAPACITY, QMK_USB_REPORT_STORAGE_DEFAULT(sizeof(report_joystick_t))), + [USB_ENDPOINT_IN_JOYSTICK] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, JOYSTICK_EPSIZE, JOYSTICK_IN_EPNUM, JOYSTICK_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(sizeof(report_joystick_t))), #endif #if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) - [USB_ENDPOINT_IN_JOYSTICK] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, DIGITIZER_EPSIZE, DIGITIZER_IN_EPNUM, DIGITIZER_IN_CAPACITY, QMK_USB_REPORT_STORAGE_DEFAULT(sizeof(report_digitizer_t))), + [USB_ENDPOINT_IN_DIGITIZER] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, DIGITIZER_EPSIZE, DIGITIZER_IN_EPNUM, DIGITIZER_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(sizeof(report_digitizer_t))), #endif #if defined(CONSOLE_ENABLE) diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index 0e2e63ad8eec..7efd085ea32e 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -990,7 +990,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = JOYSTICK_EPSIZE, .PollingIntervalMS = USB_POLLING_INTERVAL_MS - } + }, #endif #if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) From 6d365dd8f11cfb440a1c7e67572d3deb10f7833f Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 4 Jun 2024 12:23:25 +1000 Subject: [PATCH 0010/1205] Add helper `make` targets for formatting and pytest. (#23858) --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index 78d1a372bc7e..5fcd6bbf0f38 100644 --- a/Makefile +++ b/Makefile @@ -465,3 +465,18 @@ distclean_userspace: clean rm -f $(QMK_USERSPACE)/*.bin $(QMK_USERSPACE)/*.hex $(QMK_USERSPACE)/*.uf2 echo 'done.' endif + +# Extra targets for formatting and/or pytest, running within the qmk/qmk_cli container to match GHA. +CONTAINER_PREAMBLE := export HOME="/tmp"; export PATH="/tmp/.local/bin:\$$PATH"; python3 -m pip install --upgrade pip; python3 -m pip install -r requirements-dev.txt + +.PHONY: format-core +format-core: + RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a" + +.PHONY: pytest +pytest: + RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk pytest" + +.PHONY: format-and-pytest +format-and-pytest: + RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a && qmk pytest" From 75d11e04215edc43eeef71756a23d7f46e66c459 Mon Sep 17 00:00:00 2001 From: dexter93 Date: Tue, 4 Jun 2024 13:16:45 +0300 Subject: [PATCH 0011/1205] [wear_leveling] efl updates (#22489) Co-authored-by: Nick Brassel --- docs/drivers/eeprom.md | 15 +++++---- .../drivers/wear_leveling/wear_leveling_efl.c | 33 ++++++++++++++----- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/docs/drivers/eeprom.md b/docs/drivers/eeprom.md index 82630c501d11..0ae258424f87 100644 --- a/docs/drivers/eeprom.md +++ b/docs/drivers/eeprom.md @@ -119,13 +119,14 @@ This driver performs writes to the embedded flash storage embedded in the MCU. I Configurable options in your keyboard's `config.h`: -`config.h` override | Default | Description ------------------------------------------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration. -`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting. -`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM. -`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size. -`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly. +`config.h` override | Default | Description +---------------------------------------------------|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration. +`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting. +`#define WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT` | `0` | Number of sectors to omit at the end of the flash. These sectors will not be allocated to the driver and the usable flash block will be offset, but keeping the set flash size. Useful on devices with bootloaders requiring a check flag at the end of flash to be present in order to confirm a valid, bootable firmware. +`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM. +`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size. +`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly. ::: warning If your MCU does not boot after swapping to the EFL wear-leveling driver, it's likely that the flash size is incorrectly detected, usually as an MCU with larger flash and may require overriding. diff --git a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c index 3d6ed52e5c01..f49c4a45b0bf 100644 --- a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c +++ b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c @@ -14,11 +14,15 @@ static flash_sector_t first_sector = WEAR_LEVELING_EFL_FIRST_SECTOR; static flash_sector_t first_sector = UINT16_MAX; #endif // defined(WEAR_LEVELING_EFL_FIRST_SECTOR) +#if !defined(WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT) +# define WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT 0 +#endif // WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT + static flash_sector_t sector_count = UINT16_MAX; static BaseFlash * flash; - -static volatile bool is_issuing_read = false; -static volatile bool ecc_error_occurred = false; +static bool flash_erased_is_one; +static volatile bool is_issuing_read = false; +static volatile bool ecc_error_occurred = false; // "Automatic" detection of the flash size -- ideally ChibiOS would have this already, but alas, it doesn't. static inline uint32_t detect_flash_size(void) { @@ -51,10 +55,19 @@ bool backing_store_init(void) { uint32_t counter = 0; uint32_t flash_size = detect_flash_size(); + // Check if the hardware erase is logic 1 + flash_erased_is_one = (desc->attributes & FLASH_ATTR_ERASED_IS_ONE) ? true : false; + + if (WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT >= desc->sectors_count) { + // Last sector defined is greater than available number of sectors. Can't do anything here. Fault. + chSysHalt("Last sector intended to be used with wear_leveling is beyond available flash descriptor range"); + } + #if defined(WEAR_LEVELING_EFL_FIRST_SECTOR) // Work out how many sectors we want to use, working forwards from the first sector specified - for (flash_sector_t i = 0; i < desc->sectors_count - first_sector; ++i) { + flash_sector_t last_sector = desc->sectors_count - WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT; + for (flash_sector_t i = 0; i < last_sector - first_sector; ++i) { counter += flashGetSectorSize(flash, first_sector + i); if (counter >= (WEAR_LEVELING_BACKING_SIZE)) { sector_count = i + 1; @@ -70,9 +83,9 @@ bool backing_store_init(void) { #else // defined(WEAR_LEVELING_EFL_FIRST_SECTOR) // Work out how many sectors we want to use, working backwards from the end of the flash - flash_sector_t last_sector = desc->sectors_count; - for (flash_sector_t i = 0; i < desc->sectors_count; ++i) { - first_sector = desc->sectors_count - i - 1; + flash_sector_t last_sector = desc->sectors_count - WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT; + for (flash_sector_t i = 0; i < last_sector; ++i) { + first_sector = last_sector - i - 1; if (flashGetSectorOffset(flash, first_sector) >= flash_size) { last_sector = first_sector; continue; @@ -124,7 +137,9 @@ bool backing_store_write(uint32_t address, backing_store_int_t value) { uint32_t offset = (base_offset + address); bs_dprintf("Write "); wl_dump(offset, &value, sizeof(value)); - value = ~value; + if (flash_erased_is_one) { + value = ~value; + } return flashProgram(flash, offset, sizeof(value), (const uint8_t *)&value) == FLASH_NO_ERROR; } @@ -138,7 +153,7 @@ static backing_store_int_t backing_store_safe_read_from_location(backing_store_i backing_store_int_t value; is_issuing_read = true; ecc_error_occurred = false; - value = ~(*loc); + value = flash_erased_is_one ? ~(*loc) : (*loc); is_issuing_read = false; return value; } From a82b0628b399c35bcdf70f14cabfa0bb27f86af8 Mon Sep 17 00:00:00 2001 From: Fernando Birra Date: Tue, 4 Jun 2024 23:41:26 +0100 Subject: [PATCH 0012/1205] GC9xxx LCD family drivers (GC9107 and GC9A01) (#23091) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nick Brassel Co-authored-by: jack <0x6A73@pm.me> Co-authored-by: Joel Challis Co-authored-by: フィルターペーパー <76888457+filterpaper@users.noreply.github.com> Co-authored-by: rookiebwoy <81021475+rookiebwoy@users.noreply.github.com> Fixup boardsource/equals (#23106) Fix make clean test:os_detection (#23112) Fix make clean test:os_detection (#23112)" Fixup boardsource/equals (#23106)" --- drivers/painter/gc9a01/qp_gc9a01_opcodes.h | 77 ---------- drivers/painter/gc9xxx/qp_gc9107.c | 114 +++++++++++++++ drivers/painter/gc9xxx/qp_gc9107.h | 37 +++++ drivers/painter/gc9xxx/qp_gc9107_opcodes.h | 135 ++++++++++++++++++ .../painter/{gc9a01 => gc9xxx}/qp_gc9a01.c | 78 ++++------ .../painter/{gc9a01 => gc9xxx}/qp_gc9a01.h | 0 drivers/painter/gc9xxx/qp_gc9a01_opcodes.h | 104 ++++++++++++++ drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h | 55 +++++++ quantum/painter/qp.h | 6 + quantum/painter/qp_internal.c | 1 + quantum/painter/rules.mk | 16 ++- 11 files changed, 490 insertions(+), 133 deletions(-) delete mode 100644 drivers/painter/gc9a01/qp_gc9a01_opcodes.h create mode 100644 drivers/painter/gc9xxx/qp_gc9107.c create mode 100644 drivers/painter/gc9xxx/qp_gc9107.h create mode 100644 drivers/painter/gc9xxx/qp_gc9107_opcodes.h rename drivers/painter/{gc9a01 => gc9xxx}/qp_gc9a01.c (61%) rename drivers/painter/{gc9a01 => gc9xxx}/qp_gc9a01.h (100%) create mode 100644 drivers/painter/gc9xxx/qp_gc9a01_opcodes.h create mode 100644 drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h diff --git a/drivers/painter/gc9a01/qp_gc9a01_opcodes.h b/drivers/painter/gc9a01/qp_gc9a01_opcodes.h deleted file mode 100644 index 828e42752b0c..000000000000 --- a/drivers/painter/gc9a01/qp_gc9a01_opcodes.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2021 Paul Cotter (@gr1mr3aver) -// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Quantum Painter GC9A01 command opcodes -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Level 1 command opcodes - -#define GC9A01_GET_ID_INFO 0x04 // Get ID information -#define GC9A01_GET_STATUS 0x09 // Get status -#define GC9A01_CMD_SLEEP_ON 0x10 // Enter sleep mode -#define GC9A01_CMD_SLEEP_OFF 0x11 // Exit sleep mode -#define GC9A01_CMD_PARTIAL_ON 0x12 // Enter partial mode -#define GC9A01_CMD_PARTIAL_OFF 0x13 // Exit partial mode -#define GC9A01_CMD_INVERT_ON 0x20 // Enter inverted mode -#define GC9A01_CMD_INVERT_OFF 0x21 // Exit inverted mode -#define GC9A01_CMD_DISPLAY_OFF 0x28 // Disable display -#define GC9A01_CMD_DISPLAY_ON 0x29 // Enable display -#define GC9A01_SET_COL_ADDR 0x2A // Set column address -#define GC9A01_SET_PAGE_ADDR 0x2B // Set page address -#define GC9A01_SET_MEM 0x2C // Set memory -#define GC9A01_SET_PARTIAL_AREA 0x30 // Set partial area -#define GC9A01_SET_VSCROLL 0x33 // Set vertical scroll def -#define GC9A01_CMD_TEARING_ON 0x34 // Tearing line enabled -#define GC9A01_CMD_TEARING_OFF 0x35 // Tearing line disabled -#define GC9A01_SET_MEM_ACS_CTL 0x36 // Set mem access ctl -#define GC9A01_SET_VSCROLL_ADDR 0x37 // Set vscroll start addr -#define GC9A01_CMD_IDLE_OFF 0x38 // Exit idle mode -#define GC9A01_CMD_IDLE_ON 0x39 // Enter idle mode -#define GC9A01_SET_PIX_FMT 0x3A // Set pixel format -#define GC9A01_SET_MEM_CONT 0x3C // Set memory continue -#define GC9A01_SET_TEAR_SCANLINE 0x44 // Set tearing scanline -#define GC9A01_GET_TEAR_SCANLINE 0x45 // Get tearing scanline -#define GC9A01_SET_BRIGHTNESS 0x51 // Set brightness -#define GC9A01_SET_DISPLAY_CTL 0x53 // Set display ctl -#define GC9A01_GET_ID1 0xDA // Get ID1 -#define GC9A01_GET_ID2 0xDB // Get ID2 -#define GC9A01_GET_ID3 0xDC // Get ID3 - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Level 2 command opcodes - -#define GC9A01_SET_RGB_IF_SIG_CTL 0xB0 // RGB IF signal ctl -#define GC9A01_SET_BLANKING_PORCH_CTL 0xB5 // Set blanking porch ctl -#define GC9A01_SET_FUNCTION_CTL 0xB6 // Set function ctl -#define GC9A01_SET_TEARING_EFFECT 0xBA // Set backlight ctl 3 -#define GC9A01_SET_IF_CTL 0xF6 // Set interface control - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Level 3 command opcodes - -#define GC9A01_SET_FRAME_RATE 0xE8 // Set frame rate -#define GC9A01_SET_SPI_2DATA 0xE9 // Set frame rate -#define GC9A01_SET_POWER_CTL_1 0xC1 // Set power ctl 1 -#define GC9A01_SET_POWER_CTL_2 0xC3 // Set power ctl 2 -#define GC9A01_SET_POWER_CTL_3 0xC4 // Set power ctl 3 -#define GC9A01_SET_POWER_CTL_4 0xC9 // Set power ctl 4 -#define GC9A01_SET_POWER_CTL_7 0xA7 // Set power ctl 7 -#define GC9A01_SET_INTER_REG_ENABLE1 0xFE // Enable Inter Register 1 -#define GC9A01_SET_INTER_REG_ENABLE2 0xEF // Enable Inter Register 2 -#define GC9A01_SET_GAMMA1 0xF0 // -#define GC9A01_SET_GAMMA2 0xF1 -#define GC9A01_SET_GAMMA3 0xF2 -#define GC9A01_SET_GAMMA4 0xF3 - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// MADCTL Flags -#define GC9A01_MADCTL_MY 0b10000000 -#define GC9A01_MADCTL_MX 0b01000000 -#define GC9A01_MADCTL_MV 0b00100000 -#define GC9A01_MADCTL_ML 0b00010000 -#define GC9A01_MADCTL_RGB 0b00000000 -#define GC9A01_MADCTL_BGR 0b00001000 -#define GC9A01_MADCTL_MH 0b00000100 diff --git a/drivers/painter/gc9xxx/qp_gc9107.c b/drivers/painter/gc9xxx/qp_gc9107.c new file mode 100644 index 000000000000..108344da4f20 --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9107.c @@ -0,0 +1,114 @@ +// Copyright 2024 Fernando Birra +// SPDX-License-Identifier: GPL-2.0-or-later +#include "qp_internal.h" +#include "qp_comms.h" +#include "qp_gc9107.h" +#include "qp_gc9xxx_opcodes.h" +#include "qp_gc9107_opcodes.h" +#include "qp_tft_panel.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Driver storage +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +tft_panel_dc_reset_painter_device_t gc9107_drivers[GC9107_NUM_DEVICES] = {0}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Initialization +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +__attribute__((weak)) bool qp_gc9107_init(painter_device_t device, painter_rotation_t rotation) { + // A lot of these "unknown" opcodes are sourced from other OSS projects and are seemingly required for this display to function. + // clang-format off + const uint8_t gc9107_init_sequence[] = { + GC9XXX_SET_INTER_REG_ENABLE1, 5, 0, + GC9XXX_SET_INTER_REG_ENABLE2, 5, 0, + GC9107_SET_FUNCTION_CTL6, 0, 1, GC9107_ALLOW_SET_COMPLEMENT_RGB | 0x08 | GC9107_ALLOW_SET_FRAMERATE, + GC9107_SET_COMPLEMENT_RGB, 0, 1, GC9107_COMPLEMENT_WITH_LSB, + 0xAB, 0, 1, 0x0E, + GC9107_SET_FRAME_RATE, 0, 1, 0x19, + GC9XXX_SET_PIXEL_FORMAT, 0, 1, GC9107_PIXEL_FORMAT_16_BPP_IFPF, + GC9XXX_CMD_SLEEP_OFF, 120, 0, + GC9XXX_CMD_DISPLAY_ON, 20, 0 + }; + + // clang-format on + qp_comms_bulk_command_sequence(device, gc9107_init_sequence, sizeof(gc9107_init_sequence)); + + // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) + const uint8_t madctl[] = { + [QP_ROTATION_0] = GC9XXX_MADCTL_BGR, + [QP_ROTATION_90] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MV, + [QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY, + [QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY, + }; + qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]); + + return true; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Driver vtable +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const tft_panel_dc_reset_painter_driver_vtable_t gc9107_driver_vtable = { + .base = + { + .init = qp_gc9107_init, + .power = qp_tft_panel_power, + .clear = qp_tft_panel_clear, + .flush = qp_tft_panel_flush, + .pixdata = qp_tft_panel_pixdata, + .viewport = qp_tft_panel_viewport, + .palette_convert = qp_tft_panel_palette_convert_rgb565_swapped, + .append_pixels = qp_tft_panel_append_pixels_rgb565, + .append_pixdata = qp_tft_panel_append_pixdata, + }, + .num_window_bytes = 2, + .swap_window_coords = false, + .opcodes = + { + .display_on = GC9XXX_CMD_DISPLAY_ON, + .display_off = GC9XXX_CMD_DISPLAY_OFF, + .set_column_address = GC9XXX_SET_COL_ADDR, + .set_row_address = GC9XXX_SET_ROW_ADDR, + .enable_writes = GC9XXX_SET_MEM, + }, +}; + +#ifdef QUANTUM_PAINTER_GC9107_SPI_ENABLE +// Factory function for creating a handle to the GC9107 device +painter_device_t qp_gc9107_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode) { + for (uint32_t i = 0; i < GC9107_NUM_DEVICES; ++i) { + tft_panel_dc_reset_painter_device_t *driver = &gc9107_drivers[i]; + if (!driver->base.driver_vtable) { + driver->base.driver_vtable = (const painter_driver_vtable_t *)&gc9107_driver_vtable; + driver->base.comms_vtable = (const painter_comms_vtable_t *)&spi_comms_with_dc_vtable; + driver->base.native_bits_per_pixel = 16; // RGB565 + driver->base.panel_width = panel_width; + driver->base.panel_height = panel_height; + driver->base.rotation = QP_ROTATION_0; + driver->base.offset_x = 2; + driver->base.offset_y = 1; + + // SPI and other pin configuration + driver->base.comms_config = &driver->spi_dc_reset_config; + driver->spi_dc_reset_config.spi_config.chip_select_pin = chip_select_pin; + driver->spi_dc_reset_config.spi_config.divisor = spi_divisor; + driver->spi_dc_reset_config.spi_config.lsb_first = false; + driver->spi_dc_reset_config.spi_config.mode = spi_mode; + driver->spi_dc_reset_config.dc_pin = dc_pin; + driver->spi_dc_reset_config.reset_pin = reset_pin; + driver->spi_dc_reset_config.command_params_uses_command_pin = false; + + if (!qp_internal_register_device((painter_device_t)driver)) { + memset(driver, 0, sizeof(tft_panel_dc_reset_painter_device_t)); + return NULL; + } + + return (painter_device_t)driver; + } + } + return NULL; +} + +#endif // QUANTUM_PAINTER_GC9107_SPI_ENABLE diff --git a/drivers/painter/gc9xxx/qp_gc9107.h b/drivers/painter/gc9xxx/qp_gc9107.h new file mode 100644 index 000000000000..b0b08f76654a --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9107.h @@ -0,0 +1,37 @@ +// Copyright 2024 Fernando Birra (@gr1mr3aver) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include "gpio.h" +#include "qp_internal.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9107 configurables (add to your keyboard's config.h) + +#ifndef GC9107_NUM_DEVICES +/** + * @def This controls the maximum number of GC9107 devices that Quantum Painter can communicate with at any one time. + * Increasing this number allows for multiple displays to be used. + */ +# define GC9107_NUM_DEVICES 1 +#endif + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9107 device factories + +#ifdef QUANTUM_PAINTER_GC9107_SPI_ENABLE +/** + * Factory method for an GC9107 SPI LCD device. + * + * @param panel_width[in] the width of the display panel + * @param panel_height[in] the height of the display panel + * @param chip_select_pin[in] the GPIO pin used for SPI chip select + * @param dc_pin[in] the GPIO pin used for D/C control + * @param reset_pin[in] the GPIO pin used for RST + * @param spi_divisor[in] the SPI divisor to use when communicating with the display + * @param spi_mode[in] the SPI mode to use when communicating with the display + * @return the device handle used with all drawing routines in Quantum Painter + */ +painter_device_t qp_gc9107_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode); + +#endif // QUANTUM_PAINTER_GC9107_SPI_ENABLE diff --git a/drivers/painter/gc9xxx/qp_gc9107_opcodes.h b/drivers/painter/gc9xxx/qp_gc9107_opcodes.h new file mode 100644 index 000000000000..e9b308eb49b8 --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9107_opcodes.h @@ -0,0 +1,135 @@ +// Copyright 2024 Fernando Birra +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9107 command opcodes +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#define GC9107_GET_POWER_MODE 0x0A // Get power mode +#define GC9107_GET_MADCTL 0x0B // Get MADCTL +#define GC9107_GET_PIXEL_FMT 0x0C // Get pixel format +#define GC9107_GET_IMAGE_FMT 0x0D // Get image format +#define GC9107_GET_SIGNAL_MODE 0x0E // Get signal mode +#define GC9107_GET_DIAG_RESULT 0x0F // Get self-diagnostic results + +#define GC9107_SET_FRAME_RATE 0xA8 // Set frame rate +#define GC9107_SET_COMPLEMENT_RGB 0xAC // Set complement Principle RGB +#define GC9107_SET_BLANK_PORCH 0xAD // Set blank porch control, 0;front_porch[6:0],0;back_porch[6:0] +#define GC9107_SET_FUNCTION_CTL1 0xB1 // Set access to AVDD_VCL_CLK and VGH_VGL_CLK commands +#define GC9107_SET_FUNCTION_CTL2 0xB2 // Set access to VGH, VGH control commands +#define GC9107_SET_FUNCTION_CTL3 0xB3 // Set access to Gamma control commands +#define GC9107_SET_DISPLAY_INVERSION 0xB4 // Set Display Inversion control +#define GC9107_SET_FUNCTION_CTL6 0xB6 // Set access to commands SET_FRAME_RATE, SET_COMPLEMENT_RGB and SET_BLANK_PORCH +#define GC9107_SET_CUSTOM_ID_INFO 0xD3 // Set customized display id information +#define GC9107_AVDD_VCL_CLK 0xE3 // AVDD_CLK +#define GC9107_SET_VGH 0xE8 // Set VGH +#define GC9107_SET_VGL 0xE9 // Set VGL +#define GC9107_SET_VGH_VGL_CLK 0xEA // Set VGH and VGL clock divisors + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GC9107 Parameter constants + +// Parameter values for +// GC9107_SET_PIXEL_FORMAT +#define GC9107_PIXEL_FORMAT_12_BPP_IFPF (0b001 << 0) // 12 bits per pixel +#define GC9107_PIXEL_FORMAT_16_BPP_IFPF (0b101 << 0) // 16 bits per pixel +#define GC9107_PIXEL_FORMAT_18_BPP_IFPB (0b110 << 0) // 18 bits per pixel + +// Parameter values for +// GC9107_SET_COMPLEMENT_RGB +#define GC9107_COMPLEMENT_WITH_0 0x00 // R0 <- B0 <- 0, except if data is FFh +#define GC9107_COMPLEMENT_WITH_1 0x40 // R0 <- B0 <- 1, except if data is 00h +#define GC9107_COMPLEMENT_WITH_MSB 0x80 // R0 <- R5, B0 <- B5 +#define GC9107_COMPLEMENT_WITH_LSB 0xC0 // R0 <- B0 <- G0 +// Parameter masks for +// GC9107_SET_FUNCTION_CTL1 +#define GC9107_ALLOW_AVDD_VCL_CLK 0b00001000 // Allow AVDD_VCL_CLK command +// Parameter masks for +// GC9107_SET_FUNCTION_CTL2 +#define GC9107_ALLOW_SET_VGH 0b00000001 // Allow GC9107_SET_VGH +#define GC9107_ALLOW_SET_VGL 0b00000010 // Allow GC9107_SET_VGL +#define GC9107_ALLOW_SET_VGH_VGL_CLK 0b00000100 // Allow GC9107_SET_VGH_VGL_CLK +// Parameter masks for +// GC9107_SET_FUNCTION_CTL3 +#define GC9107_ALLOW_SET_GAMMA1 0b00000001 // Allow GC9107_SET_GAMMA1 +#define GC9107_ALLOW_SET_GAMMA2 0b00000010 // Allow GC9107_SET_GAMMA2 +// Parameter mask for +// GC9107_SET_FUNCTION_CTL6 +#define GC9107_ALLOW_SET_FRAMERATE 0b000000001 // Allow GC9107_SET_FRAME_RATE +#define GC9107_ALLOW_SET_COMPLEMENT_RGB 0b000010000 // Allow GC9107_SET_COMPLEMENT_RGB +#define GC9107_ALLOW_SET_BLANK_PORCH 0b000100000 // Allow GFC9107_SET_BLANK_PORCH +// Parameter values for +// AVDD_CLK_AD part (Most significant nibble) +#define GC9107_AVDD_CLK_AD_2T 0x00 +#define GC9107_AVDD_CLK_AD_3T 0x10 +#define GC9107_AVDD_CLK_AD_4T 0x20 +#define GC9107_AVDD_CLK_AD_5T 0x30 +#define GC9107_AVDD_CLK_AD_6T 0x40 +#define GC9107_AVDD_CLK_AD_7T 0x50 +#define GC9107_AVDD_CLK_AD_8T 0x60 +#define GC9107_AVDD_CLK_AD_9T 0x70 +// Parameter values for +// VCL_CLK_AD part (Least significant nibble) +#define GC9107_VCL_CLK_AD_2T 0x00 +#define GC9107_VCL_CLK_AD_3T 0x01 +#define GC9107_VCL_CLK_AD_4T 0x02 +#define GC9107_VCL_CLK_AD_5T 0x03 +#define GC9107_VCL_CLK_AD_6T 0x04 +#define GC9107_VCL_CLK_AD_7T 0x05 +#define GC9107_VCL_CLK_AD_8T 0x06 +#define GC9107_VCL_CLK_AD_9T 0x07 +// Parameter values for +// GC9107_SET_VGH +#define GC9107_VGH_P100 0x20 // +10 V +#define GC9107_VGH_P110 0x21 // +11 V +#define GC9107_VGH_P120 0x22 // +12 V +#define GC9107_VGH_P130 0x23 // +13 V +#define GC9107_VGH_P140 0x24 // +14 V +#define GC9107_VGH_P150 0x25 // +15 V +// Parameter values for +// GC9107_SET_VGL +#define VGL_N_075 0x40 // -7.5 V +#define VGL_N_085 0x41 // -8.5 V +#define VGL_N_095 0x42 // -9.5 V +#define VGL_N_100 0x43 // -10.0 V +#define VGL_N_105 0x44 // -10.5 V +#define VGL_N_110 0x45 // -11.0 V +#define VGL_N_120 0x46 // -12.0 V +#define VGL_N_130 0x47 // -13.0 V +// Parameter masks for +// GC9107_SET_VGH_VGL_CLK (VGH Divisor) +#define GC9107_VGH_CLK_DIV_2 0x00 // Clock divisor = 2 -> 6.0 Mhz +#define GC9107_VGH_CLK_DIV_3 0x10 // Clock divisor = 3 -> 4.0 Mhz +#define GC9107_VGH_CLK_DIV_4 0x20 // Clock divisor = 4 -> 3.0 Mhz +#define GC9107_VGH_CLK_DIV_5 0x30 // Clock divisor = 5 -> 2.4 Mhz +#define GC9107_VGH_CLK_DIV_6 0x40 // Clock divisor = 6 -> 2.0 Mhz +#define GC9107_VGH_CLK_DIV_7 0x50 // Clock divisor = 7 -> 1.7 Mhz +#define GC9107_VGH_CLK_DIV_8 0x60 // Clock divisor = 8 -> 1.5 Mhz +#define GC9107_VGH_CLK_DIV_9 0x70 // Clock divisor = 9 -> 1.3 Mhz +#define GC9107_VGH_CLK_DIV_10 0x80 // Clock divisor = 10 -> 1.2 Mhz +#define GC9107_VGH_CLK_DIV_12 0x90 // Clock divisor = 12 -> 1.0 Mhz +#define GC9107_VGH_CLK_DIV_15 0xA0 // Clock divisor = 15 -> 0.8 Mhz +#define GC9107_VGH_CLK_DIV_20 0xB0 // Clock divisor = 20 -> 0.6 Mhz +#define GC9107_VGH_CLK_DIV_24 0xC0 // Clock divisor = 24 -> 0.5 Mhz +#define GC9107_VGH_CLK_DIV_30 0xD0 // Clock divisor = 30 -> 0.4 Mhz +#define GC9107_VGH_CLK_DIV_40 0xE0 // Clock divisor = 40 -> 0.3 Mhz +#define GC9107_VGH_CLK_DIV_60 0xE0 // Clock divisor = 40 -> 0.2 Mhz +// Parameter masks for +// GC9107_SET_VGH_VGL_CLK (VGL Divisor) +#define GC9107_VGL_CLK_DIV_2 0x00 // Clock divisor = 2 -> 6.0 Mhz +#define GC9107_VGL_CLK_DIV_3 0x01 // Clock divisor = 3 -> 4.0 Mhz +#define GC9107_VGL_CLK_DIV_4 0x02 // Clock divisor = 4 -> 3.0 Mhz +#define GC9107_VGL_CLK_DIV_5 0x03 // Clock divisor = 5 -> 2.4 Mhz +#define GC9107_VGL_CLK_DIV_6 0x04 // Clock divisor = 6 -> 2.0 Mhz +#define GC9107_VGL_CLK_DIV_7 0x05 // Clock divisor = 7 -> 1.7 Mhz +#define GC9107_VGL_CLK_DIV_8 0x06 // Clock divisor = 8 -> 1.5 Mhz +#define GC9107_VGL_CLK_DIV_9 0x07 // Clock divisor = 9 -> 1.3 Mhz +#define GC9107_VGL_CLK_DIV_10 0x08 // Clock divisor = 10 -> 1.2 Mhz +#define GC9107_VGL_CLK_DIV_12 0x09 // Clock divisor = 12 -> 1.0 Mhz +#define GC9107_VGL_CLK_DIV_15 0x0A // Clock divisor = 15 -> 0.8 Mhz +#define GC9107_VGL_CLK_DIV_20 0x0B // Clock divisor = 20 -> 0.6 Mhz +#define GC9107_VGL_CLK_DIV_24 0x0C // Clock divisor = 24 -> 0.5 Mhz +#define GC9107_VGL_CLK_DIV_30 0x0D // Clock divisor = 30 -> 0.4 Mhz +#define GC9107_VGL_CLK_DIV_40 0x0E // Clock divisor = 40 -> 0.3 Mhz +#define GC9107_VGL_CLK_DIV_60 0x0E // Clock divisor = 40 -> 0.2 Mhz diff --git a/drivers/painter/gc9a01/qp_gc9a01.c b/drivers/painter/gc9xxx/qp_gc9a01.c similarity index 61% rename from drivers/painter/gc9a01/qp_gc9a01.c rename to drivers/painter/gc9xxx/qp_gc9a01.c index fe6fa7a9d024..f037a4cc87b2 100644 --- a/drivers/painter/gc9a01/qp_gc9a01.c +++ b/drivers/painter/gc9xxx/qp_gc9a01.c @@ -5,6 +5,7 @@ #include "qp_internal.h" #include "qp_comms.h" #include "qp_gc9a01.h" +#include "qp_gc9xxx_opcodes.h" #include "qp_gc9a01_opcodes.h" #include "qp_tft_panel.h" @@ -20,71 +21,40 @@ tft_panel_dc_reset_painter_device_t gc9a01_drivers[GC9A01_NUM_DEVICES] = {0}; __attribute__((weak)) bool qp_gc9a01_init(painter_device_t device, painter_rotation_t rotation) { // A lot of these "unknown" opcodes are sourced from other OSS projects and are seemingly required for this display to function. // clang-format off + const uint8_t gc9a01_init_sequence[] = { // Command, Delay, N, Data[N] - GC9A01_SET_INTER_REG_ENABLE2, 0, 0, - 0xEB, 0, 1, 0x14, - GC9A01_SET_INTER_REG_ENABLE1, 0, 0, - GC9A01_SET_INTER_REG_ENABLE2, 0, 0, - 0xEB, 0, 1, 0x14, + GC9XXX_SET_INTER_REG_ENABLE1, 0, 0, + GC9XXX_SET_INTER_REG_ENABLE2, 0, 0, 0x84, 0, 1, 0x40, - 0x85, 0, 1, 0xFF, - 0x86, 0, 1, 0xFF, - 0x87, 0, 1, 0xFF, - 0x88, 0, 1, 0x0A, - 0x89, 0, 1, 0x21, - 0x8a, 0, 1, 0x00, - 0x8b, 0, 1, 0x80, - 0x8c, 0, 1, 0x01, - 0x8d, 0, 1, 0x01, - 0x8e, 0, 1, 0xFF, - 0x8f, 0, 1, 0xFF, - GC9A01_SET_FUNCTION_CTL, 0, 2, 0x00, 0x20, - GC9A01_SET_PIX_FMT, 0, 1, 0x55, - 0x90, 0, 4, 0x08, 0x08, 0x08, 0x08, - 0xBD, 0, 1, 0x06, - 0xBC, 0, 1, 0x00, - 0xFF, 0, 3, 0x60, 0x01, 0x04, - GC9A01_SET_POWER_CTL_2, 0, 1, 0x13, - GC9A01_SET_POWER_CTL_3, 0, 1, 0x13, + GC9A01_SET_FUNCTION_CTL, 0, 3, 0x00, GC9A01_SOURCE_OUTPUT_SCAN_DIRECTION_S360_TO_S1 | GC9A01_GATE_OUTPUT_SCAN_DIRECTION_G1_TO_G32, GC9A01_LCD_DRIVE_LINE_240, // Only works if the previous command is present (undocumented) + GC9A01_SET_POWER_CTL_2, 0, 1, 0x20, + GC9A01_SET_POWER_CTL_3, 0, 1, 0x20, GC9A01_SET_POWER_CTL_4, 0, 1, 0x22, - 0xBE, 0, 1, 0x11, - 0xE1, 0, 2, 0x10, 0x0E, - 0xDF, 0, 3, 0x21, 0x0C, 0x02, - GC9A01_SET_GAMMA1, 0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A, - GC9A01_SET_GAMMA2, 0, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F, + GC9XXX_SET_GAMMA1, 0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A, + GC9XXX_SET_GAMMA2, 0, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F, GC9A01_SET_GAMMA3, 0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A, GC9A01_SET_GAMMA4, 0, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F, - 0xED, 0, 2, 0x1B, 0x0B, - 0xAE, 0, 1, 0x77, - 0xCD, 0, 1, 0x63, - 0x70, 0, 9, 0x07, 0x07, 0x04, 0x0E, 0x0F, 0x09, 0x07, 0x08, 0x03, - GC9A01_SET_FRAME_RATE, 0, 1, 0x34, - 0x62, 0, 12, 0x18, 0x0D, 0x71, 0xED, 0x70, 0x70, 0x18, 0x0F, 0x71, 0xEF, 0x70, 0x70, - 0x63, 0, 12, 0x18, 0x11, 0x71, 0xF1, 0x70, 0x70, 0x18, 0x13, 0x71, 0xF3, 0x70, 0x70, - 0x64, 0, 7, 0x28, 0x29, 0xF1, 0x01, 0xF1, 0x00, 0x07, 0x66, 0, 10, 0x3C, 0x00, 0xCD, 0x67, 0x45, 0x45, 0x10, 0x00, 0x00, 0x00, 0x67, 0, 10, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x54, 0x10, 0x32, 0x98, - 0x74, 0, 7, 0x10, 0x85, 0x80, 0x00, 0x00, 0x4E, 0x00, - 0x98, 0, 2, 0x3E, 0x07, - GC9A01_CMD_TEARING_OFF, 0, 0, - GC9A01_CMD_INVERT_OFF, 0, 0, - GC9A01_CMD_SLEEP_OFF, 120, 0, - GC9A01_CMD_DISPLAY_ON, 20, 0 + GC9XXX_CMD_TEARING_ON, 0, 0, + GC9XXX_SET_PIXEL_FORMAT, 0, 1, GC9A01_PIXEL_FORMAT_16_BPP_DBI, + GC9XXX_CMD_INVERT_ON, 0, 0, + GC9XXX_CMD_SLEEP_OFF, 120, 0, + GC9XXX_CMD_DISPLAY_ON, 20, 0 }; // clang-format on - // clang-format on qp_comms_bulk_command_sequence(device, gc9a01_init_sequence, sizeof(gc9a01_init_sequence)); // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { - [QP_ROTATION_0] = GC9A01_MADCTL_BGR, - [QP_ROTATION_90] = GC9A01_MADCTL_BGR | GC9A01_MADCTL_MX | GC9A01_MADCTL_MV, - [QP_ROTATION_180] = GC9A01_MADCTL_BGR | GC9A01_MADCTL_MX | GC9A01_MADCTL_MY, - [QP_ROTATION_270] = GC9A01_MADCTL_BGR | GC9A01_MADCTL_MV | GC9A01_MADCTL_MY, + [QP_ROTATION_0] = GC9XXX_MADCTL_BGR, + [QP_ROTATION_90] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MV, + [QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY, + [QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY, }; - qp_comms_command_databyte(device, GC9A01_SET_MEM_ACS_CTL, madctl[rotation]); + qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]); return true; } @@ -110,11 +80,11 @@ const tft_panel_dc_reset_painter_driver_vtable_t gc9a01_driver_vtable = { .swap_window_coords = false, .opcodes = { - .display_on = GC9A01_CMD_DISPLAY_ON, - .display_off = GC9A01_CMD_DISPLAY_OFF, - .set_column_address = GC9A01_SET_COL_ADDR, - .set_row_address = GC9A01_SET_PAGE_ADDR, - .enable_writes = GC9A01_SET_MEM, + .display_on = GC9XXX_CMD_DISPLAY_ON, + .display_off = GC9XXX_CMD_DISPLAY_OFF, + .set_column_address = GC9XXX_SET_COL_ADDR, + .set_row_address = GC9XXX_SET_ROW_ADDR, + .enable_writes = GC9XXX_SET_MEM, }, }; diff --git a/drivers/painter/gc9a01/qp_gc9a01.h b/drivers/painter/gc9xxx/qp_gc9a01.h similarity index 100% rename from drivers/painter/gc9a01/qp_gc9a01.h rename to drivers/painter/gc9xxx/qp_gc9a01.h diff --git a/drivers/painter/gc9xxx/qp_gc9a01_opcodes.h b/drivers/painter/gc9xxx/qp_gc9a01_opcodes.h new file mode 100644 index 000000000000..5853902e6834 --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9a01_opcodes.h @@ -0,0 +1,104 @@ +// Copyright 2021 Paul Cotter (@gr1mr3aver) +// Copyright 2024 Fernando Birra +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9A01 command opcodes +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#define GC9A01_SET_MEM_CONT 0x3C // Set memory continue +#define GC9A01_SET_BRIGHTNESS 0x51 // Set brightness +#define GC9A01_SET_DISPLAY_CTL 0x53 // Set display ctl + +#define GC9A01_SET_RGB_IF_SIG_CTL 0xB0 // RGB IF signal ctl +#define GC9A01_SET_BLANKING_PORCH_CTL 0xB5 // Set blanking porch ctl +#define GC9A01_SET_FUNCTION_CTL 0xB6 // Set function ctl +#define GC9A01_SET_TEARING_EFFECT 0xBA // Set tering effect control +#define GC9A01_SET_POWER_CTL_7 0xA7 // Set power ctl 7 +#define GC9A01_SET_POWER_CTL_1 0xC1 // Set power ctl 1 +#define GC9A01_SET_POWER_CTL_2 0xC3 // Set power ctl 2 +#define GC9A01_SET_POWER_CTL_3 0xC4 // Set power ctl 3 +#define GC9A01_SET_POWER_CTL_4 0xC9 // Set power ctl 4 +#define GC9A01_SET_FRAME_RATE 0xE8 // Set frame rate +#define GC9A01_SET_SPI_2DATA 0xE9 // Set frame rate +#define GC9A01_SET_GAMMA3 0xF2 // Set gamma 3 +#define GC9A01_SET_GAMMA4 0xF3 // Set gamma 4 +#define GC9A01_SET_IF_CTL 0xF6 // Set interface control + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GC9A01 MADCTL Flags +#define GC9A01_MADCTL_MH 0b00000100 + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GC9A01 Parameter constants + +// Parameter values for +// GC9A01_SET_PIXEL_FORMAT +#define GC9A01_PIXEL_FORMAT_12_BPP_DBI (0b011 << 0) // 12 bits/pixel MCU interface format +#define GC9A01_PIXEL_FORMAT_16_BPP_DBI (0b101 << 0) // 16 bits/pixel MCU interface format +#define GC9A01_PIXEL_FORMAT_18_BPP_DBI (0b110 << 0) // 18 bits/pixel MCU interface format +#define GC9A01_PIXEL_FORMAT_16_BPP_DPI (0b101 << 4) // 16 bits/pixel RGB interface format +#define GC9A01_PIXEL_FORMAT_18_BPP_DPI (0b110 << 4) // 18 bits/pixel RGB interface format + +// Parameter values for +// GC9A01_SET_FUNCTION_CTL (2nd parameter) +#define GC9A01_SOURCE_OUTPUT_SCAN_DIRECTION_S1_TO_S360 0b00000000 +#define GC9A01_SOURCE_OUTPUT_SCAN_DIRECTION_S360_TO_S1 0b00100000 +#define GC9A01_GATE_OUTPUT_SCAN_DIRECTION_G1_TO_G32 0b00000000 +#define GC9A01_GATE_OUTPUT_SCAN_DIRECTION_G32_TO_G1 0b01000000 +#define GC9A01_SCAN_MODE_INTER 0x10 + +// Parameter values for +// GC9A01_SET_FUNCTION_CTL (3rd parameter) +#define GC9A01_LCD_DRIVE_LINE_16 0x01 +#define GC9A01_LCD_DRIVE_LINE_24 0x02 +#define GC9A01_LCD_DRIVE_LINE_32 0x03 +#define GC9A01_LCD_DRIVE_LINE_40 0x04 +#define GC9A01_LCD_DRIVE_LINE_48 0x05 +#define GC9A01_LCD_DRIVE_LINE_56 0x06 +#define GC9A01_LCD_DRIVE_LINE_64 0x07 +#define GC9A01_LCD_DRIVE_LINE_72 0x08 +#define GC9A01_LCD_DRIVE_LINE_80 0x09 +#define GC9A01_LCD_DRIVE_LINE_88 0x0A +#define GC9A01_LCD_DRIVE_LINE_96 0x0B +#define GC9A01_LCD_DRIVE_LINE_104 0x0C +#define GC9A01_LCD_DRIVE_LINE_112 0x0D +#define GC9A01_LCD_DRIVE_LINE_120 0x0E +#define GC9A01_LCD_DRIVE_LINE_128 0x0F +#define GC9A01_LCD_DRIVE_LINE_136 0x10 +#define GC9A01_LCD_DRIVE_LINE_144 0x11 +#define GC9A01_LCD_DRIVE_LINE_152 0x12 +#define GC9A01_LCD_DRIVE_LINE_160 0x13 +#define GC9A01_LCD_DRIVE_LINE_168 0x14 +#define GC9A01_LCD_DRIVE_LINE_176 0x15 +#define GC9A01_LCD_DRIVE_LINE_184 0x16 +#define GC9A01_LCD_DRIVE_LINE_192 0x17 +#define GC9A01_LCD_DRIVE_LINE_200 0x18 +#define GC9A01_LCD_DRIVE_LINE_208 0x19 +#define GC9A01_LCD_DRIVE_LINE_216 0x1A +#define GC9A01_LCD_DRIVE_LINE_224 0x1B +#define GC9A01_LCD_DRIVE_LINE_232 0x1C +#define GC9A01_LCD_DRIVE_LINE_240 0x1D + +// Parameter values for +// GC9A01_SET_DISPLAY_CTL +#define GC9A01_BRIGHTNESS_CONTROL_ON 0b00100000 +#define GC9A01_DIMMING_ON 0b00001000 +#define GC9A01_BACKLIGHT_ON 0b00000100 +#define GC9A01_BRIGHTNESS_CONTROL_OFF 0b00000000 +#define GC9A01_DIMMING_OFF 0b00000000 +#define GC9A01_BACKLIGHT_OFF 0b00000000 + +// Parameter values for +// GC9A01_SET_IF_CTL +#define GC9A01_DISPLAY_MODE_INTERNAL_CLOCK 0b00000000 +#define GC9A01_DISPLAY_MODE_RGB_INTERFACE 0b00000100 +#define GC9A01_DISPLAY_MODE_VSYNC_INTERFACE 0b00001000 +#define GC9A01_DSISPLAY_MODE_DISABLED 0b00001100 + +#define GC0A01_GRAM_INTERFACE_VSYNC 0b00000000 +#define GC9A01_GRAM_INTERFACE_RGB 0b00000010 + +#define GC9A01_RGB_INTERFACE_MODE_1_TRANSFER 0b00000000 +#define GC9A01_RGB_INTERFACE_MODE_3_TRANSFER 0b00000001 \ No newline at end of file diff --git a/drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h b/drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h new file mode 100644 index 000000000000..7e0fbf9110b2 --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h @@ -0,0 +1,55 @@ +// Copyright 2021 Paul Cotter (@gr1mr3aver) +// Copyright 2024 Fernando Birra +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9xxx command opcodes +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#define GC9XXX_GET_ID_INFO 0x04 // Get ID information +#define GC9XXX_GET_STATUS 0x09 // Get status + +#define GC9XXX_CMD_SLEEP_ON 0x10 // Enter sleep mode +#define GC9XXX_CMD_SLEEP_OFF 0x11 // Exit sleep mode +#define GC9XXX_CMD_PARTIAL_ON 0x12 // Enter partial mode +#define GC9XXX_CMD_PARTIAL_OFF 0x13 // Exit partial mode + +#define GC9XXX_CMD_INVERT_OFF 0x20 // Exit inverted mode +#define GC9XXX_CMD_INVERT_ON 0x21 // Enter inverted mode +#define GC9XXX_CMD_DISPLAY_OFF 0x28 // Disable display +#define GC9XXX_CMD_DISPLAY_ON 0x29 // Enable display +#define GC9XXX_SET_COL_ADDR 0x2A // Set column address (MSB(StartCol),LSB(StartCol),MSB(EndCol),LSB(EndCol) +#define GC9XXX_SET_ROW_ADDR 0x2B // Set row address (MSB(StartRow),LSB(StartRow),MSB(EndRow),LSB(EndRow) +#define GC9XXX_SET_MEM 0x2C // Set (write) memory + +#define GC9XXX_SET_PARTIAL_AREA 0x30 // Set partial area (MSB(StartRow),LSB(StartRow),MSB(EndRow),LSB(EndRow) +#define GC9XXX_SET_VSCROLL 0x33 // Set vertical scroll MSB(TFA),LSB(TFA),MSB(VSA),LSB(VSA)+ GC9107 extra param: MSB(BFA),LSB(BFA) +#define GC9XXX_CMD_TEARING_OFF 0x34 // Tearing effect line OFF +#define GC9XXX_CMD_TEARING_ON 0x35 // Tearing effect line ON +#define GC9XXX_SET_MEM_ACS_CTL 0x36 // Set mem access ctl +#define GC9XXX_SET_VSCROLL_ADDR 0x37 // Set vscroll start addr +#define GC9XXX_CMD_IDLE_OFF 0x38 // Exit idle mode +#define GC9XXX_CMD_IDLE_ON 0x39 // Enter idle mode +#define GC9XXX_SET_PIXEL_FORMAT 0x3A // Set pixel format +#define GC9XXX_SET_TEAR_SCANLINE 0x44 // Set tearing scanline (Scanline = LS bit of Param 1 (GC9A01) + Param 2(GC9XXX)) +#define GC9XXX_GET_TEAR_SCANLINE 0x45 // Get tearing scanline (Scanline = LS bit of Param 1 (GC9A01) + Param 2(GC9XXX)) +#define GC9XXX_GET_ID1 0xDA // Get ID1 +#define GC9XXX_GET_ID2 0xDB // Get ID2 +#define GC9XXX_GET_ID3 0xDC // Get ID3 +#define GC9XXX_SET_INTER_REG_ENABLE1 0xFE // Enable Inter Register 1 +#define GC9XXX_SET_INTER_REG_ENABLE2 0xEF // Enable Inter Register 2 +#define GC9XXX_SET_GAMMA1 0xF0 // Set gamma 1 +#define GC9XXX_SET_GAMMA2 0xF1 // Set gamma 2 + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// MADCTL Flags +#define GC9XXX_MADCTL_MY 0b10000000 // Mirror Y (row address order) +#define GC9XXX_MADCTL_MX 0b01000000 // Mirror X (column address order) +#define GC9XXX_MADCTL_MV 0b00100000 // Vertical Refresh Order (bottom to top) +#define GC9XXX_MADCTL_ML 0b00010000 +#define GC9XXX_MADCTL_BGR 0b00001000 +#define GC9XXX_MADCTL_RGB 0b00000000 + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GC9XXX Parameter constants diff --git a/quantum/painter/qp.h b/quantum/painter/qp.h index 02acbf589a3a..820c418f43b7 100644 --- a/quantum/painter/qp.h +++ b/quantum/painter/qp.h @@ -539,6 +539,12 @@ int16_t qp_drawtext_recolor(painter_device_t device, uint16_t x, uint16_t y, pai # define GC9A01_NUM_DEVICES 0 #endif // QUANTUM_PAINTER_GC9A01_ENABLE +#ifdef QUANTUM_PAINTER_GC9107_ENABLE +# include "qp_gc9107.h" +#else // QUANTUM_PAINTER_GC9107_ENABLE +# define GC9107_NUM_DEVICES 0 +#endif // QUANTUM_PAINTER_GC9107_ENABLE + #ifdef QUANTUM_PAINTER_SSD1351_ENABLE # include "qp_ssd1351.h" #else // QUANTUM_PAINTER_SSD1351_ENABLE diff --git a/quantum/painter/qp_internal.c b/quantum/painter/qp_internal.c index 1f0f98179679..7d4a6430afe0 100644 --- a/quantum/painter/qp_internal.c +++ b/quantum/painter/qp_internal.c @@ -16,6 +16,7 @@ enum { + (ST7789_NUM_DEVICES) // ST7789 + (ST7735_NUM_DEVICES) // ST7735 + (GC9A01_NUM_DEVICES) // GC9A01 + + (GC9107_NUM_DEVICES) // GC9107 + (SSD1351_NUM_DEVICES) // SSD1351 + (SH1106_NUM_DEVICES) // SH1106 }; diff --git a/quantum/painter/rules.mk b/quantum/painter/rules.mk index d991a6d7423f..7b2ab702ee11 100644 --- a/quantum/painter/rules.mk +++ b/quantum/painter/rules.mk @@ -14,6 +14,7 @@ VALID_QUANTUM_PAINTER_DRIVERS := \ st7735_spi \ st7789_spi \ gc9a01_spi \ + gc9107_spi \ ssd1351_spi \ sh1106_i2c \ sh1106_spi @@ -131,10 +132,21 @@ define handle_quantum_painter_driver OPT_DEFS += -DQUANTUM_PAINTER_GC9A01_ENABLE -DQUANTUM_PAINTER_GC9A01_SPI_ENABLE COMMON_VPATH += \ $(DRIVER_PATH)/painter/tft_panel \ - $(DRIVER_PATH)/painter/gc9a01 + $(DRIVER_PATH)/painter/gc9xxx SRC += \ $(DRIVER_PATH)/painter/tft_panel/qp_tft_panel.c \ - $(DRIVER_PATH)/painter/gc9a01/qp_gc9a01.c + $(DRIVER_PATH)/painter/gc9xxx/qp_gc9a01.c + + else ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),gc9107_spi) + QUANTUM_PAINTER_NEEDS_COMMS_SPI := yes + QUANTUM_PAINTER_NEEDS_COMMS_SPI_DC_RESET := yes + OPT_DEFS += -DQUANTUM_PAINTER_GC9107_ENABLE -DQUANTUM_PAINTER_GC9107_SPI_ENABLE + COMMON_VPATH += \ + $(DRIVER_PATH)/painter/tft_panel \ + $(DRIVER_PATH)/painter/gc9xxx + SRC += \ + $(DRIVER_PATH)/painter/tft_panel/qp_tft_panel.c \ + $(DRIVER_PATH)/painter/gc9xxx/qp_gc9107.c else ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),ssd1351_spi) QUANTUM_PAINTER_NEEDS_COMMS_SPI := yes From a4da5f219fe0f202a07afa045fc0c08f6ce1f86b Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 5 Jun 2024 12:20:57 +1000 Subject: [PATCH 0013/1205] Fixup build failures. (#23869) --- keyboards/matrix/m12og/rev2/rev2.c | 12 ++++++------ keyboards/mechwild/mokulua/info.json | 5 +++++ keyboards/planck/rev4/keyboard.json | 3 +++ keyboards/planck/rev5/keyboard.json | 3 +++ 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 keyboards/mechwild/mokulua/info.json diff --git a/keyboards/matrix/m12og/rev2/rev2.c b/keyboards/matrix/m12og/rev2/rev2.c index bf6129c80636..e64640b2d2d8 100644 --- a/keyboards/matrix/m12og/rev2/rev2.c +++ b/keyboards/matrix/m12og/rev2/rev2.c @@ -4,12 +4,12 @@ #include "quantum.h" -void matrix_init_user(void) { - gpio_set_pin_output(C6); - gpio_set_pin_output(B2); - gpio_set_pin_output(B1); - - matrix_init_user(); +void matrix_init_kb(void) { + gpio_set_pin_output(C6); + gpio_set_pin_output(B2); + gpio_set_pin_output(B1); + + matrix_init_user(); } bool led_update_kb(led_t led_state) { diff --git a/keyboards/mechwild/mokulua/info.json b/keyboards/mechwild/mokulua/info.json new file mode 100644 index 000000000000..9f75b9c218bd --- /dev/null +++ b/keyboards/mechwild/mokulua/info.json @@ -0,0 +1,5 @@ +{ + "build": { + "lto": true + } +} diff --git a/keyboards/planck/rev4/keyboard.json b/keyboards/planck/rev4/keyboard.json index 725a297b2f2e..655c48e7dd5d 100644 --- a/keyboards/planck/rev4/keyboard.json +++ b/keyboards/planck/rev4/keyboard.json @@ -8,6 +8,9 @@ "pid": "0xAE01", "device_version": "0.0.4" }, + "build": { + "lto": true + }, "features": { "audio": true, "bootmagic": true, diff --git a/keyboards/planck/rev5/keyboard.json b/keyboards/planck/rev5/keyboard.json index f816d23e9b08..debf8dcdfca7 100644 --- a/keyboards/planck/rev5/keyboard.json +++ b/keyboards/planck/rev5/keyboard.json @@ -8,6 +8,9 @@ "pid": "0xAE01", "device_version": "0.0.5" }, + "build": { + "lto": true + }, "features": { "audio": true, "bootmagic": true, From 260e9a546ebfa3f6f0f32038c99751122f53d131 Mon Sep 17 00:00:00 2001 From: Kim Viberti <45943577+ilkimo@users.noreply.github.com> Date: Thu, 6 Jun 2024 04:09:44 +0200 Subject: [PATCH 0014/1205] Fix documentation error (#23872) Co-authored-by: Nick Brassel Co-authored-by: Ryan --- docs/features/swap_hands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/swap_hands.md b/docs/features/swap_hands.md index 3560fe22f096..0090ce77a9d4 100644 --- a/docs/features/swap_hands.md +++ b/docs/features/swap_hands.md @@ -1,6 +1,6 @@ # Swap-Hands Action -The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `SWAP_HANDS_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd` +The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `SWAP_HANDS_ENABLE = yes` in your keymap's `rules.mk` (creating it if needed), and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd` ## Configuration From 950d7653708965bb37f3b4919db041ab98d42f69 Mon Sep 17 00:00:00 2001 From: "Syenasweta a.k.a. Nashrullah Ali Fauzi" Date: Fri, 7 Jun 2024 08:17:21 +0700 Subject: [PATCH 0015/1205] Add SyenaKeyboards Elaruus (#23870) * add syenakeyboard elaruus * add syenakeyboards elaruus * add syenakeyboards elaruus * add syenakeyboards elaruus * add syenakeyboards/elaruus * add syenakeyboards elaruus * add syenakeyboards elaruus * add syenakeyboards elaruus * Update keyboards/syenakeyboards/elaruus/keyboard.json Co-authored-by: jack <0x6a73@protonmail.com> * Update keyboards/syenakeyboards/elaruus/keymaps/default/keymap.c Co-authored-by: jack <0x6a73@protonmail.com> * Update keyboards/syenakeyboards/elaruus/keymaps/via/keymap.c Co-authored-by: jack <0x6a73@protonmail.com> --------- Co-authored-by: Syenasweta Co-authored-by: jack <0x6a73@protonmail.com> --- .../syenakeyboards/elaruus/keyboard.json | 31 +++++++++++++++++++ .../elaruus/keymaps/default/keymap.c | 16 ++++++++++ .../elaruus/keymaps/via/keymap.c | 16 ++++++++++ .../elaruus/keymaps/via/rules.mk | 1 + keyboards/syenakeyboards/elaruus/readme.md | 25 +++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 keyboards/syenakeyboards/elaruus/keyboard.json create mode 100644 keyboards/syenakeyboards/elaruus/keymaps/default/keymap.c create mode 100644 keyboards/syenakeyboards/elaruus/keymaps/via/keymap.c create mode 100644 keyboards/syenakeyboards/elaruus/keymaps/via/rules.mk create mode 100644 keyboards/syenakeyboards/elaruus/readme.md diff --git a/keyboards/syenakeyboards/elaruus/keyboard.json b/keyboards/syenakeyboards/elaruus/keyboard.json new file mode 100644 index 000000000000..535a46eb7cbc --- /dev/null +++ b/keyboards/syenakeyboards/elaruus/keyboard.json @@ -0,0 +1,31 @@ +{ + "manufacturer": "Syenasweta", + "keyboard_name": "SyenaKeyboards Elaruus", + "maintainer": "syenasweta", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "cols": ["GP21", "GP19"], + "rows": ["GP10"] + }, + "processor": "RP2040", + "url": "https://github.com/syenasweta/syenakeyboards", + "usb": { + "device_version": "1.0.0", + "pid": "0x6172", + "vid": "0x5373" + }, + "layouts": { + "LAYOUT_ortho_1x2": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0} + ] + } + } +} diff --git a/keyboards/syenakeyboards/elaruus/keymaps/default/keymap.c b/keyboards/syenakeyboards/elaruus/keymaps/default/keymap.c new file mode 100644 index 000000000000..329ad7f77efd --- /dev/null +++ b/keyboards/syenakeyboards/elaruus/keymaps/default/keymap.c @@ -0,0 +1,16 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_1x2( + LT(1,KC_LEFT), LT(2,KC_RIGHT) + ), + [1] = LAYOUT_ortho_1x2( + _______, KC_UP + ), + [2] = LAYOUT_ortho_1x2( + KC_DOWN, _______ + ) +}; diff --git a/keyboards/syenakeyboards/elaruus/keymaps/via/keymap.c b/keyboards/syenakeyboards/elaruus/keymaps/via/keymap.c new file mode 100644 index 000000000000..329ad7f77efd --- /dev/null +++ b/keyboards/syenakeyboards/elaruus/keymaps/via/keymap.c @@ -0,0 +1,16 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_1x2( + LT(1,KC_LEFT), LT(2,KC_RIGHT) + ), + [1] = LAYOUT_ortho_1x2( + _______, KC_UP + ), + [2] = LAYOUT_ortho_1x2( + KC_DOWN, _______ + ) +}; diff --git a/keyboards/syenakeyboards/elaruus/keymaps/via/rules.mk b/keyboards/syenakeyboards/elaruus/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/syenakeyboards/elaruus/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/syenakeyboards/elaruus/readme.md b/keyboards/syenakeyboards/elaruus/readme.md new file mode 100644 index 000000000000..4d95dd6cf089 --- /dev/null +++ b/keyboards/syenakeyboards/elaruus/readme.md @@ -0,0 +1,25 @@ +# SyenaKeyboards Elaruus + +![SyenaKeyboards Elaruus](https://i.imgur.com/6qU13gi.jpeg) + +Elaruus is ortholinear 1x2 mechanical keyboard with two switch for everythinks. The default functions are `left`, `right`. Elaruus is supported by QMK Firmware and VIA. + +* Keyboard Maintainer: [Syenasweta](https://github.com/syenasweta) +* Hardware Supported: RP2040 +* Hardware Availability: [Tokopedia (Syenasweta)](https://tokopedia.link/Ak0c4uqpbKb) + +Make example for this keyboard (after setting up your build environment): + + make syenakeyboards/elaruus:default + +Flashing example for this keyboard: + + make syenakeyboards/elaruss: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). + +## Bootloader + +Enter the bootloader in 1 ways: + +* **Bootmagic reset**: Hold down the top left key (assigned to `left` by default) and plug in the keyboard. From e7a08ef1a99b407f7326e146239d785e552c9aba Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 7 Jun 2024 14:25:20 +0100 Subject: [PATCH 0016/1205] Fix broken link in PR checklist (#23877) --- docs/pr_checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md index f7b16e1d8527..e0b0810aef7b 100644 --- a/docs/pr_checklist.md +++ b/docs/pr_checklist.md @@ -88,7 +88,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - RGB Matrix Configuration - Run `qmk format-json` on this file before submitting your PR. Be sure to append the `-i` flag to directly modify the file, or paste the outputted code into the file. - `readme.md` - - must follow the [template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme) + - must follow the [template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme.md) - flash command is present, and has `:flash` at end - valid hardware availability link (unless handwired) -- private groupbuys are okay, but one-off prototypes will be questioned. If open-source, a link to files should be provided. - clear instructions on how to reset the board into bootloader mode From 333f8bf0d7a4f3efd56a60a5328d15b1e0be4942 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 8 Jun 2024 18:08:53 -0700 Subject: [PATCH 0017/1205] Add STM32F405RG ld script for tinyuf2 (#23885) --- .../boards/common/ld/STM32F405xG_tinyuf2.ld | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 platforms/chibios/boards/common/ld/STM32F405xG_tinyuf2.ld diff --git a/platforms/chibios/boards/common/ld/STM32F405xG_tinyuf2.ld b/platforms/chibios/boards/common/ld/STM32F405xG_tinyuf2.ld new file mode 100644 index 000000000000..1ee4aa1a06c6 --- /dev/null +++ b/platforms/chibios/boards/common/ld/STM32F405xG_tinyuf2.ld @@ -0,0 +1,89 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * STM32F405xG memory setup. + * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000 + 64k, len = 1M - 64k /* tinyuf2 bootloader requires app to be located at 64k offset for this MCU */ + flash1 (rx) : org = 0x00000000, len = 0 + flash2 (rx) : org = 0x00000000, len = 0 + flash3 (rx) : org = 0x00000000, len = 0 + flash4 (rx) : org = 0x00000000, len = 0 + flash5 (rx) : org = 0x00000000, len = 0 + flash6 (rx) : org = 0x00000000, len = 0 + flash7 (rx) : org = 0x00000000, len = 0 + ram0 (wx) : org = 0x20000000, len = 128k /* SRAM1 + SRAM2 */ + ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */ + ram2 (wx) : org = 0x2001C000, len = 16k /* SRAM2 */ + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x10000000, len = 64k /* CCM SRAM */ + ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */ + ram6 (wx) : org = 0x00000000, len = 0 + ram7 (wx) : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld + +/* TinyUF2 bootloader reset support */ +_board_dfu_dbl_tap = ORIGIN(ram0) + 64k - 4; /* this is based off the linker file for tinyuf2 */ From 4926f0de8b9b05a2c3435a12b9b70f97e606b57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Mon, 10 Jun 2024 01:57:08 +0800 Subject: [PATCH 0018/1205] [Keyboard] Fixup mt/mt84 (#23883) --- keyboards/mt/mt84/config.h | 18 +++--------------- keyboards/mt/mt84/keyboard.json | 1 - keyboards/mt/mt84/keymaps/default/keymap.c | 18 +++--------------- keyboards/mt/mt84/keymaps/via/keymap.c | 18 +++--------------- keyboards/mt/mt84/mt84.c | 18 +++--------------- 5 files changed, 12 insertions(+), 61 deletions(-) diff --git a/keyboards/mt/mt84/config.h b/keyboards/mt/mt84/config.h index 9b115d527d5d..4a6ed1492ea9 100644 --- a/keyboards/mt/mt84/config.h +++ b/keyboards/mt/mt84/config.h @@ -1,18 +1,6 @@ - /* Copyright 2020 MT <704340378@qq.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Copyright 2020 MaiKong<704340378@qq.com> +// SPDX-License-Identifier: GPL-2.0+ + #pragma once #define IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND diff --git a/keyboards/mt/mt84/keyboard.json b/keyboards/mt/mt84/keyboard.json index 8833f77ed98f..a76336e7eddc 100644 --- a/keyboards/mt/mt84/keyboard.json +++ b/keyboards/mt/mt84/keyboard.json @@ -43,7 +43,6 @@ "hue_wave": true, "pixel_rain": true, "pixel_flow": true, - "pixel_fractal": true, "solid_reactive_simple": true, "solid_reactive": true, "solid_reactive_wide": true, diff --git a/keyboards/mt/mt84/keymaps/default/keymap.c b/keyboards/mt/mt84/keymaps/default/keymap.c index e3c7fa8b8798..2b3371257c63 100644 --- a/keyboards/mt/mt84/keymaps/default/keymap.c +++ b/keyboards/mt/mt84/keymaps/default/keymap.c @@ -1,18 +1,6 @@ - /* Copyright 2020 mt<704340378@qq.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Copyright 2020 MaiKong<704340378@qq.com> +// SPDX-License-Identifier: GPL-2.0 + #include QMK_KEYBOARD_H diff --git a/keyboards/mt/mt84/keymaps/via/keymap.c b/keyboards/mt/mt84/keymaps/via/keymap.c index 6906ddf9fe3c..906ed635ad03 100644 --- a/keyboards/mt/mt84/keymaps/via/keymap.c +++ b/keyboards/mt/mt84/keymaps/via/keymap.c @@ -1,18 +1,6 @@ - /* Copyright 2020 MaiKong<704340378@qq.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Copyright 2020 MaiKong<704340378@qq.com> +// SPDX-License-Identifier: GPL-2.0+ + #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/mt/mt84/mt84.c b/keyboards/mt/mt84/mt84.c index 276c92fc065b..f7e1503cea45 100644 --- a/keyboards/mt/mt84/mt84.c +++ b/keyboards/mt/mt84/mt84.c @@ -1,18 +1,6 @@ - /* Copyright 2020 MT<704340378@qq.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// Copyright 2020 MaiKong<704340378@qq.com> +// SPDX-License-Identifier: GPL-2.0+ + #include "quantum.h" #ifdef RGB_MATRIX_ENABLE From 9dc183afe43ef37dcda66a23d2e151ed629abbf5 Mon Sep 17 00:00:00 2001 From: Alex Mayer Date: Sun, 9 Jun 2024 13:57:45 -0400 Subject: [PATCH 0019/1205] Fix Tri-Layer Keycode Descriptions (#23888) --- docs/features/tri_layer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/features/tri_layer.md b/docs/features/tri_layer.md index c32e65caed0f..8c34fc65b34e 100644 --- a/docs/features/tri_layer.md +++ b/docs/features/tri_layer.md @@ -14,8 +14,8 @@ For a detailed explanation of how the layer stack works, check out [Keymap Overv | Keycode | Alias | Description | |----------------------|-----------|---------------------------------------------------------------------------------------------------------| -| `QK_TRI_LAYER_LOWER` | `TL_LOWR` | Momentarily enables the "lower" layer. Enables the "adjust" layer if the "upper" layer is also enabled" | -| `QK_TRI_LAYER_UPPER` | `TL_UPPR` | Momentarily enables the "upper" layer. Enables the "adjust" layer if the "lower" layer is also enabled" | +| `QK_TRI_LAYER_LOWER` | `TL_LOWR` | Momentarily enables the "lower" layer. Enables the "adjust" layer if the "upper" layer is also enabled. | +| `QK_TRI_LAYER_UPPER` | `TL_UPPR` | Momentarily enables the "upper" layer. Enables the "adjust" layer if the "lower" layer is also enabled. | ## Configuration From e484a3a17926dae6abc37e9997b78043ff383efd Mon Sep 17 00:00:00 2001 From: Alabahuy Date: Mon, 10 Jun 2024 02:47:48 +0700 Subject: [PATCH 0020/1205] [Keyboard] add jaykeeb jk60 (#23876) --- keyboards/jaykeeb/jk60/keyboard.json | 585 ++++++++++++++++++ .../jaykeeb/jk60/keymaps/default/keymap.c | 22 + keyboards/jaykeeb/jk60/keymaps/via/keymap.c | 21 + keyboards/jaykeeb/jk60/keymaps/via/rules.mk | 1 + keyboards/jaykeeb/jk60/matrix_diagram.md | 24 + keyboards/jaykeeb/jk60/readme.md | 27 + 6 files changed, 680 insertions(+) create mode 100644 keyboards/jaykeeb/jk60/keyboard.json create mode 100644 keyboards/jaykeeb/jk60/keymaps/default/keymap.c create mode 100644 keyboards/jaykeeb/jk60/keymaps/via/keymap.c create mode 100644 keyboards/jaykeeb/jk60/keymaps/via/rules.mk create mode 100644 keyboards/jaykeeb/jk60/matrix_diagram.md create mode 100644 keyboards/jaykeeb/jk60/readme.md diff --git a/keyboards/jaykeeb/jk60/keyboard.json b/keyboards/jaykeeb/jk60/keyboard.json new file mode 100644 index 000000000000..99eb3d4a3817 --- /dev/null +++ b/keyboards/jaykeeb/jk60/keyboard.json @@ -0,0 +1,585 @@ +{ + "manufacturer": "Jaykeeb Studio", + "keyboard_name": "JK60", + "maintainer": "Alabahuy", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["GP16", "GP3", "GP15", "GP14", "GP13", "GP12", "GP11", "GP10", "GP9", "GP8", "GP7", "GP6", "GP5", "GP4"], + "rows": ["GP29", "GP0", "GP2", "GP18", "GP19"] + }, + "indicators": { + "caps_lock": "GP17", + "on_state": 0 + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x7760", + "vid": "0x414C" + }, + "community_layouts": ["60_ansi", "60_ansi_split_bs_rshift", "60_ansi_tsangan", "60_tsangan_hhkb", "60_ansi_wkl", "60_ansi_wkl_split_bs_rshift", "60_hhkb"], + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "Delete", "matrix": [1, 13], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "\\", "matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, + {"label": "\\", "matrix": [3, 1], "x": 1.25, "y": 3}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "GUI", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "Space", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "Alt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, + {"label": "GUI", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "\\", "matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "GUI", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "Space", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "Alt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, + {"label": "GUI", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "Delete", "matrix": [1, 13], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "\\", "matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "GUI", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "Space", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "Alt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, + {"label": "GUI", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi_tsangan": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "\\", "matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"label": "Alt", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 11], "x": 12.5, "y": 4}, + {"label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_tsangan_hhkb": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "Delete", "matrix": [1, 13], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "\\", "matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"label": "Alt", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 11], "x": 12.5, "y": 4}, + {"label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_ansi_wkl": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "\\", "matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"label": "Alt", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_ansi_wkl_split_bs_rshift": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "Delete", "matrix": [1, 13], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "\\", "matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"label": "Alt", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_hhkb": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "=", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "Delete", "matrix": [1, 13], "x": 14, "y": 0}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "\\", "matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5}, + + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3}, + + {"label": "GUI", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"label": "Alt", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 11], "x": 12.5, "y": 4} + ] + } + } +} diff --git a/keyboards/jaykeeb/jk60/keymaps/default/keymap.c b/keyboards/jaykeeb/jk60/keymaps/default/keymap.c new file mode 100644 index 000000000000..449fccc16867 --- /dev/null +++ b/keyboards/jaykeeb/jk60/keymaps/default/keymap.c @@ -0,0 +1,22 @@ +// Copyright 2024 Alabahuy +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_ESC, 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, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + KC_GRV, 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_PSCR, KC_SCRL, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, _______, QK_BOOT, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/jaykeeb/jk60/keymaps/via/keymap.c b/keyboards/jaykeeb/jk60/keymaps/via/keymap.c new file mode 100644 index 000000000000..dccacd7127e9 --- /dev/null +++ b/keyboards/jaykeeb/jk60/keymaps/via/keymap.c @@ -0,0 +1,21 @@ +// Copyright 2024 Alabahuy +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, 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_DEL, + 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_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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + [1] = LAYOUT_all( + KC_GRV, 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_SCRL, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, QK_BOOT, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/jaykeeb/jk60/keymaps/via/rules.mk b/keyboards/jaykeeb/jk60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/jaykeeb/jk60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/jaykeeb/jk60/matrix_diagram.md b/keyboards/jaykeeb/jk60/matrix_diagram.md new file mode 100644 index 000000000000..89cd664562c8 --- /dev/null +++ b/keyboards/jaykeeb/jk60/matrix_diagram.md @@ -0,0 +1,24 @@ +# Matrix Diagram for Jaykeeb JK60 + +``` + ┌───────┐ + 2u Backspace │0D │ + └───────┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │1D │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │2D │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ +│40 │41 │42 │46 │4A │4B │4C │4D │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +┌────────┐ ┌──────────┐ +│30 │ 2.25u LShift │3C │ 2.75u RShift +└────────┘ └──────────┘ +┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐ +│40 │41 │42 │46 │4B │4C │4D │ Tsangan/WKL/HHKB +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` diff --git a/keyboards/jaykeeb/jk60/readme.md b/keyboards/jaykeeb/jk60/readme.md new file mode 100644 index 000000000000..f38abe1550a2 --- /dev/null +++ b/keyboards/jaykeeb/jk60/readme.md @@ -0,0 +1,27 @@ +# JK60 + +![jk60]( https://i.imgur.com/394cDVG.png ) + +Layout 60% support multi layout and keyboard case existing + +* Keyboard Maintainer: [Alabahuy](https://github.com/Alabahuy) +* Hardware Supported: JK60 PCB, RP2040 +* Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make jaykeeb/jk60:default + +Flashing example for this keyboard: + + make jaykeeb/jk60: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **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 From df4538d894d8e5c1321c239ecbe4293a4ec3ee2d Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 10 Jun 2024 06:14:48 +1000 Subject: [PATCH 0021/1205] Fix Iris/Irispad keymaps (#23856) --- keyboards/keebio/iris/keymaps/default/keymap.json | 2 +- keyboards/keebio/irispad/keymaps/default/keymap.json | 2 +- keyboards/keebio/irispad/keymaps/via/keymap.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/default/keymap.json b/keyboards/keebio/iris/keymaps/default/keymap.json index 8b141d992fdd..623c532a303f 100644 --- a/keyboards/keebio/iris/keymaps/default/keymap.json +++ b/keyboards/keebio/iris/keymaps/default/keymap.json @@ -1,6 +1,6 @@ { "config": { "features": {"tri_layer": true} }, - "keyboard": "keebio/iris", + "keyboard": "keebio/iris/rev8", "keymap": "default", "layout": "LAYOUT", "layers": [ diff --git a/keyboards/keebio/irispad/keymaps/default/keymap.json b/keyboards/keebio/irispad/keymaps/default/keymap.json index fd0dc3bb5eef..e9c52fa99fd0 100644 --- a/keyboards/keebio/irispad/keymaps/default/keymap.json +++ b/keyboards/keebio/irispad/keymaps/default/keymap.json @@ -1,6 +1,6 @@ { "config": { "features": {"encoder_map": true, "tri_layer": true} }, - "keyboard": "keebio/irispad", + "keyboard": "keebio/irispad/rev8", "keymap": "default", "layout": "LAYOUT", "layers": [ diff --git a/keyboards/keebio/irispad/keymaps/via/keymap.json b/keyboards/keebio/irispad/keymaps/via/keymap.json index 97fc085b92ea..bf681822f6da 100644 --- a/keyboards/keebio/irispad/keymaps/via/keymap.json +++ b/keyboards/keebio/irispad/keymaps/via/keymap.json @@ -1,6 +1,6 @@ { "config": { "features": {"encoder_map": true, "via": true} }, - "keyboard": "keebio/irispad", + "keyboard": "keebio/irispad/rev8", "keymap": "via", "layout": "LAYOUT", "layers": [ From 8b5cdfabf5d05958a607efa174e64377d36e4b64 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 10 Jun 2024 01:23:25 +0100 Subject: [PATCH 0022/1205] Re-implement `eeprom_write_qword` as define (#23890) --- platforms/eeprom.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/platforms/eeprom.h b/platforms/eeprom.h index 8e69eecc4cb3..067fa0161649 100644 --- a/platforms/eeprom.h +++ b/platforms/eeprom.h @@ -22,9 +22,14 @@ void eeprom_update_dword(uint32_t *__p, uint32_t __value); void eeprom_update_block(const void *__src, void *__dst, size_t __n); #endif -static inline void eeprom_write_qword(uint64_t *__p, uint64_t __value) { - eeprom_update_block(&__value, __p, sizeof(uint64_t)); -} +// While newer avr-libc versions may have an implementation +// use preprocessor as to not cause conflicts +#undef eeprom_write_qword +#define eeprom_write_qword(__p, __value) \ + do { \ + uint64_t tmp = __value; \ + eeprom_update_block(&tmp, __p, sizeof(uint64_t)); \ + } while (0) #if defined(EEPROM_CUSTOM) # ifndef EEPROM_SIZE From 354a2e40cf8348d043d39b34ca63223f6b5b689c Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 11 Jun 2024 13:25:51 +1000 Subject: [PATCH 0023/1205] splitkb/kyria: remove `CONVERT_TO` at keyboard level (#23857) --- keyboards/splitkb/kyria/info.json | 1 - .../splitkb/kyria/rev1/base/keyboard.json | 25 ++++++++++++-- keyboards/splitkb/kyria/rev1/config.h | 30 ++-------------- keyboards/splitkb/kyria/rev1/info.json | 17 ---------- .../splitkb/kyria/rev1/proton_c/config.h | 17 ++++++++++ .../splitkb/kyria/rev1/proton_c/keyboard.json | 23 ++++++++++++- .../splitkb/kyria/rev1/proton_c/rules.mk | 1 - .../splitkb/kyria/rev2/base/keyboard.json | 34 +++++++++++++++++-- keyboards/splitkb/kyria/rev2/config.h | 31 ++--------------- keyboards/splitkb/kyria/rev2/info.json | 23 ------------- .../splitkb/kyria/rev2/proton_c/config.h | 17 ++++++++++ .../splitkb/kyria/rev2/proton_c/keyboard.json | 32 ++++++++++++++++- .../splitkb/kyria/rev2/proton_c/rules.mk | 1 - keyboards/splitkb/kyria/rev3/config.h | 7 ++-- keyboards/splitkb/kyria/rev3/keyboard.json | 4 +-- 15 files changed, 149 insertions(+), 114 deletions(-) create mode 100644 keyboards/splitkb/kyria/rev1/proton_c/config.h create mode 100644 keyboards/splitkb/kyria/rev2/proton_c/config.h diff --git a/keyboards/splitkb/kyria/info.json b/keyboards/splitkb/kyria/info.json index f70e8e3bb223..050e12f2ff54 100644 --- a/keyboards/splitkb/kyria/info.json +++ b/keyboards/splitkb/kyria/info.json @@ -6,7 +6,6 @@ "vid": "0x8D1D", "device_version": "1.0.0" }, - "development_board": "elite_c", "split": { "enabled": true }, diff --git a/keyboards/splitkb/kyria/rev1/base/keyboard.json b/keyboards/splitkb/kyria/rev1/base/keyboard.json index 9f75b9c218bd..df92d71ad13f 100644 --- a/keyboards/splitkb/kyria/rev1/base/keyboard.json +++ b/keyboards/splitkb/kyria/rev1/base/keyboard.json @@ -1,5 +1,26 @@ { - "build": { - "lto": true + "development_board": "elite_c", + "matrix_pins": { + "cols": ["B6", "B2", "B3", "B1", "F7", "F6", "F5", "F4"], + "rows": ["B4", "E6", "D7", "D4"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "B5"} + ] + }, + "split": { + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B5", "pin_b": "C6"} + ] + } + } + }, + "ws2812": { + "pin": "D3" } } diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h index 4f130293e22a..615d93496dd1 100644 --- a/keyboards/splitkb/kyria/rev1/config.h +++ b/keyboards/splitkb/kyria/rev1/config.h @@ -17,31 +17,5 @@ along with this program. If not, see . #pragma once -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ - -#if defined(CONVERT_TO_PROTON_C) -# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. -# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. -# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 -# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 -# define SERIAL_USART_TX_PIN D3 -# define SERIAL_USART_RX_PIN D2 - -# define WS2812_DI_PIN PAL_LINE(GPIOA, 3) -# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 -# define WS2812_PWM_CHANNEL 4 // default: 2 -# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -# define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. -#else -# define WS2812_DI_PIN D3 -# define SOFT_SERIAL_PIN D2 -#endif - -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define SPLIT_OLED_ENABLE -#endif +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev1/info.json b/keyboards/splitkb/kyria/rev1/info.json index 3d84b37b3112..1e21c609782f 100644 --- a/keyboards/splitkb/kyria/rev1/info.json +++ b/keyboards/splitkb/kyria/rev1/info.json @@ -23,24 +23,7 @@ "sleep": true, "split_count": [10, 10] }, - "matrix_pins": { - "cols": ["B6", "B2", "B3", "B1", "F7", "F6", "F5", "F4"], - "rows": ["B4", "E6", "D7", "D4"] - }, - "diode_direction": "COL2ROW", - "encoder": { - "rotary": [ - {"pin_a": "C6", "pin_b": "B5"} - ] - }, "split": { - "encoder": { - "right": { - "rotary": [ - {"pin_a": "B5", "pin_b": "C6"} - ] - } - }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/splitkb/kyria/rev1/proton_c/config.h b/keyboards/splitkb/kyria/rev1/proton_c/config.h new file mode 100644 index 000000000000..df2eb96ae22d --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/config.h @@ -0,0 +1,17 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +#define SERIAL_USART_TX_PIN A9 +#define SERIAL_USART_RX_PIN A10 + +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json b/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json index 6cc38d4a2125..a7181fef8dfd 100644 --- a/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json +++ b/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json @@ -1,5 +1,26 @@ { + "development_board": "proton_c", + "matrix_pins": { + "cols": ["B9", "B15", "B14", "B13", "B8", "A0", "A1", "A2"], + "rows": ["B1", "B2", "B3", "B5"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B0"} + ] + }, + "split": { + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B4"} + ] + } + } + }, "ws2812": { - "driver": "pwm" + "driver": "pwm", + "pin": "A3" } } diff --git a/keyboards/splitkb/kyria/rev1/proton_c/rules.mk b/keyboards/splitkb/kyria/rev1/proton_c/rules.mk index a58b20c575c9..c6e298832137 100644 --- a/keyboards/splitkb/kyria/rev1/proton_c/rules.mk +++ b/keyboards/splitkb/kyria/rev1/proton_c/rules.mk @@ -1,2 +1 @@ SERIAL_DRIVER = usart -CONVERT_TO = proton_c diff --git a/keyboards/splitkb/kyria/rev2/base/keyboard.json b/keyboards/splitkb/kyria/rev2/base/keyboard.json index 9f75b9c218bd..8de0f335cc57 100644 --- a/keyboards/splitkb/kyria/rev2/base/keyboard.json +++ b/keyboards/splitkb/kyria/rev2/base/keyboard.json @@ -1,5 +1,35 @@ { - "build": { - "lto": true + "development_board": "elite_c", + "matrix_pins": { + "cols": ["B2", "B6", "B5", "B4", "E6", "D7", "C6", "D4"], + "rows": ["F6", "F7", "B1", "B3"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, + "split": { + "handedness": { + "matrix_grid": ["E6", "B3"] + }, + "soft_serial_pin": "D2", + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + } + }, + "matrix_pins": { + "right": { + "cols": ["B4", "B5", "B6", "B2", "B3", "B1", "F7", "F6"], + "rows": ["D4", "C6", "D7", "E6"] + } + } + }, + "ws2812": { + "pin": "D3" } } diff --git a/keyboards/splitkb/kyria/rev2/config.h b/keyboards/splitkb/kyria/rev2/config.h index 54d8f0985ae6..fb9e7bb95901 100644 --- a/keyboards/splitkb/kyria/rev2/config.h +++ b/keyboards/splitkb/kyria/rev2/config.h @@ -19,34 +19,7 @@ along with this program. If not, see . // Side detection // col 4 row 3 on right-hand-side -#define SPLIT_HAND_MATRIX_GRID E6, B3 // row first because the board is col2row #define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `rev2.c` -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ - -#if defined(CONVERT_TO_PROTON_C) -# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. -# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. -# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 -# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 -# define SERIAL_USART_TX_PIN D3 -# define SERIAL_USART_RX_PIN D2 - -# define WS2812_DI_PIN PAL_LINE(GPIOA, 3) -# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 -# define WS2812_PWM_CHANNEL 4 // default: 2 -# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -# define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. -#else -# define WS2812_DI_PIN D3 -# define SOFT_SERIAL_PIN D2 -#endif - -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define SPLIT_OLED_ENABLE -#endif +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev2/info.json b/keyboards/splitkb/kyria/rev2/info.json index 80f801e3d152..d1507a26b0d6 100644 --- a/keyboards/splitkb/kyria/rev2/info.json +++ b/keyboards/splitkb/kyria/rev2/info.json @@ -23,30 +23,7 @@ "sleep": true, "split_count": [10, 10] }, - "matrix_pins": { - "cols": ["B2", "B6", "B5", "B4", "E6", "D7", "C6", "D4"], - "rows": ["F6", "F7", "B1", "B3"] - }, - "diode_direction": "COL2ROW", - "encoder": { - "rotary": [ - {"pin_a": "F4", "pin_b": "F5"} - ] - }, "split": { - "encoder": { - "right": { - "rotary": [ - {"pin_a": "F5", "pin_b": "F4"} - ] - } - }, - "matrix_pins": { - "right": { - "cols": ["B4", "B5", "B6", "B2", "B3", "B1", "F7", "F6"], - "rows": ["D4", "C6", "D7", "E6"] - } - }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/splitkb/kyria/rev2/proton_c/config.h b/keyboards/splitkb/kyria/rev2/proton_c/config.h new file mode 100644 index 000000000000..df2eb96ae22d --- /dev/null +++ b/keyboards/splitkb/kyria/rev2/proton_c/config.h @@ -0,0 +1,17 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +#define SERIAL_USART_TX_PIN A9 +#define SERIAL_USART_RX_PIN A10 + +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json b/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json index 6cc38d4a2125..43a3d532f223 100644 --- a/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json +++ b/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json @@ -1,5 +1,35 @@ { + "development_board": "proton_c", + "matrix_pins": { + "cols": ["B15", "B9", "B0", "B1", "B2", "B3", "B4", "B5"], + "rows": ["A0", "B8", "B13", "B14"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "A2", "pin_b": "A1"} + ] + }, + "split": { + "handedness": { + "matrix_grid": ["B2", "B14"] + }, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "A1", "pin_b": "A2"} + ] + } + }, + "matrix_pins": { + "right": { + "cols": ["B1", "B0", "B9", "B15", "B14", "B13", "B8", "A0"], + "rows": ["B5", "B4", "B3", "B2"] + } + } + }, "ws2812": { - "driver": "pwm" + "driver": "pwm", + "pin": "A3" } } diff --git a/keyboards/splitkb/kyria/rev2/proton_c/rules.mk b/keyboards/splitkb/kyria/rev2/proton_c/rules.mk index a58b20c575c9..c6e298832137 100644 --- a/keyboards/splitkb/kyria/rev2/proton_c/rules.mk +++ b/keyboards/splitkb/kyria/rev2/proton_c/rules.mk @@ -1,2 +1 @@ SERIAL_DRIVER = usart -CONVERT_TO = proton_c diff --git a/keyboards/splitkb/kyria/rev3/config.h b/keyboards/splitkb/kyria/rev3/config.h index b0a64320c602..7938384a781c 100644 --- a/keyboards/splitkb/kyria/rev3/config.h +++ b/keyboards/splitkb/kyria/rev3/config.h @@ -20,8 +20,5 @@ // but can't yet be given a value #define SPLIT_HAND_PIN B5 -// Not yet available in `info.json` -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define SPLIT_OLED_ENABLE -#endif +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev3/keyboard.json b/keyboards/splitkb/kyria/rev3/keyboard.json index 4a426cb20607..750f87ae4b37 100644 --- a/keyboards/splitkb/kyria/rev3/keyboard.json +++ b/keyboards/splitkb/kyria/rev3/keyboard.json @@ -1,14 +1,12 @@ { "keyboard_name": "Kyria rev3", + "development_board": "elite_c", "usb": { "pid": "0xCF44" }, "bootmagic": { "matrix": [0, 6] }, - "build": { - "lto": true - }, "features": { "mousekey": true, "bootmagic": true, From 8041a88f5d39709548bdb44908afe0548651d640 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 12 Jun 2024 10:50:25 +1000 Subject: [PATCH 0024/1205] Slight clarification of LED/RGB Matrix custom effect docs (#23897) --- docs/features/led_matrix.md | 21 ++++++++++----------- docs/features/rgb_matrix.md | 12 ++++++------ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/docs/features/led_matrix.md b/docs/features/led_matrix.md index fee7b139bce1..164cbc0f5fc0 100644 --- a/docs/features/led_matrix.md +++ b/docs/features/led_matrix.md @@ -300,18 +300,11 @@ These modes introduce additional logic that can increase firmware size. ## Custom LED Matrix Effects {#custom-led-matrix-effects} -By setting `LED_MATRIX_CUSTOM_USER` (and/or `LED_MATRIX_CUSTOM_KB`) in `rules.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files. +By setting `LED_MATRIX_CUSTOM_USER = yes` in `rules.mk`, new effects can be defined directly from your keymap or userspace, without having to edit any QMK core files. To declare new effects, create a `led_matrix_user.inc` file in the user keymap directory or userspace folder. -To declare new effects, create a new `led_matrix_user/kb.inc` that looks something like this: - -`led_matrix_user.inc` should go in the root of the keymap directory. -`led_matrix_kb.inc` should go in the root of the keyboard directory. - -To use custom effects in your code, simply prepend `LED_MATRIX_CUSTOM_` to the effect name specified in `LED_MATRIX_EFFECT()`. For example, an effect declared as `LED_MATRIX_EFFECT(my_cool_effect)` would be referenced with: - -```c -led_matrix_mode(led_MATRIX_CUSTOM_my_cool_effect); -``` +::: tip +Hardware maintainers who want to limit custom effects to a specific keyboard can create a `led_matrix_kb.inc` file in the root of the keyboard directory, and add `LED_MATRIX_CUSTOM_KB = yes` to the keyboard level `rules.mk`. +::: ```c // !!! DO NOT ADD #pragma once !!! // @@ -356,6 +349,12 @@ static bool my_cool_effect2(effect_params_t* params) { #endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS ``` +To switch to your custom effect programmatically, simply call `led_matrix_mode()` and prepend `LED_MATRIX_CUSTOM_` to the effect name your specified in `LED_MATRIX_EFFECT()`. For example, an effect declared as `LED_MATRIX_EFFECT(my_cool_effect)` would be referenced with: + +```c +led_matrix_mode(LED_MATRIX_CUSTOM_my_cool_effect); +``` + For inspiration and examples, check out the built-in effects under `quantum/led_matrix/animations/`. diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md index f7f693f239fa..448d1cdfb56c 100644 --- a/docs/features/rgb_matrix.md +++ b/docs/features/rgb_matrix.md @@ -807,12 +807,6 @@ By setting `RGB_MATRIX_CUSTOM_USER = yes` in `rules.mk`, new effects can be defi Hardware maintainers who want to limit custom effects to a specific keyboard can create a `rgb_matrix_kb.inc` file in the root of the keyboard directory, and add `RGB_MATRIX_CUSTOM_KB = yes` to the keyboard level `rules.mk`. ::: -To use custom effects in your code, simply prepend `RGB_MATRIX_CUSTOM_` to the effect name specified in `RGB_MATRIX_EFFECT()`. For example, an effect declared as `RGB_MATRIX_EFFECT(my_cool_effect)` would be referenced with: - -```c -rgb_matrix_mode(RGB_MATRIX_CUSTOM_my_cool_effect); -``` - ```c // !!! DO NOT ADD #pragma once !!! // @@ -856,6 +850,12 @@ static bool my_cool_effect2(effect_params_t* params) { #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS ``` +To switch to your custom effect programmatically, simply call `rgb_matrix_mode()` and prepend `RGB_MATRIX_CUSTOM_` to the effect name you specified in `RGB_MATRIX_EFFECT()`. For example, an effect declared as `RGB_MATRIX_EFFECT(my_cool_effect)` would be referenced with: + +```c +rgb_matrix_mode(RGB_MATRIX_CUSTOM_my_cool_effect); +``` + For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix/animations/`. From b826877c40b64be023fda2879a268d5fa6aa610e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 12 Jun 2024 04:00:23 +0100 Subject: [PATCH 0025/1205] Decouple VIA from STM32 L0/L1 EEPROM implementation (#23901) --- platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h index 616d7ccbeeec..c1d801f2250f 100644 --- a/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h @@ -20,7 +20,7 @@ The size used by the STM32 L0/L1 EEPROM driver. */ #ifndef STM32_ONBOARD_EEPROM_SIZE -# ifdef VIA_ENABLE +# ifdef DYNAMIC_KEYMAP_ENABLE # define STM32_ONBOARD_EEPROM_SIZE 1024 # else # include "eeconfig.h" From 031ca3b40bbfae7f1d65e9ece0fab8fdfd9ee8ed Mon Sep 17 00:00:00 2001 From: 4pplet Date: Wed, 12 Jun 2024 09:11:50 +0200 Subject: [PATCH 0026/1205] [Keyboard] Fix settings for 4pplet/waffling60 (#23862) --- keyboards/4pplet/waffling60/rev_e/keyboard.json | 3 ++- keyboards/4pplet/waffling60/rev_e_ansi/keyboard.json | 3 ++- keyboards/4pplet/waffling60/rev_e_iso/keyboard.json | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/keyboards/4pplet/waffling60/rev_e/keyboard.json b/keyboards/4pplet/waffling60/rev_e/keyboard.json index 3a75cf3d06ac..4cd2501bbd47 100644 --- a/keyboards/4pplet/waffling60/rev_e/keyboard.json +++ b/keyboards/4pplet/waffling60/rev_e/keyboard.json @@ -15,7 +15,8 @@ "console": false, "extrakey": true, "key_lock": true, - "mousekey": false, + "mousekey": true, + "encoder": true, "nkro": true, "rgblight": true }, diff --git a/keyboards/4pplet/waffling60/rev_e_ansi/keyboard.json b/keyboards/4pplet/waffling60/rev_e_ansi/keyboard.json index c2514700ff00..a1b5d0e11eb4 100644 --- a/keyboards/4pplet/waffling60/rev_e_ansi/keyboard.json +++ b/keyboards/4pplet/waffling60/rev_e_ansi/keyboard.json @@ -15,7 +15,8 @@ "console": false, "extrakey": true, "key_lock": true, - "mousekey": false, + "mousekey": true, + "encoder": true, "nkro": true, "rgblight": true }, diff --git a/keyboards/4pplet/waffling60/rev_e_iso/keyboard.json b/keyboards/4pplet/waffling60/rev_e_iso/keyboard.json index e53dcab891cd..a9bfad4d6296 100644 --- a/keyboards/4pplet/waffling60/rev_e_iso/keyboard.json +++ b/keyboards/4pplet/waffling60/rev_e_iso/keyboard.json @@ -16,6 +16,7 @@ "extrakey": true, "key_lock": true, "mousekey": true, + "encoder": true, "nkro": true, "rgblight": true }, From bdd10ef8e7855ed6a5ed4253df731d8978bc1aa2 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 12 Jun 2024 17:43:09 +1000 Subject: [PATCH 0027/1205] Remove VIA_ENABLE from default keymaps. (#23903) --- .../keychron/q9_plus/ansi_encoder/keymaps/default/rules.mk | 1 - .../zed65/no_backlight/wearhaus66/keymaps/default/rules.mk | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/keychron/q9_plus/ansi_encoder/keymaps/default/rules.mk b/keyboards/keychron/q9_plus/ansi_encoder/keymaps/default/rules.mk index f1adcab005e8..ee325681483f 100755 --- a/keyboards/keychron/q9_plus/ansi_encoder/keymaps/default/rules.mk +++ b/keyboards/keychron/q9_plus/ansi_encoder/keymaps/default/rules.mk @@ -1,2 +1 @@ -VIA_ENABLE = yes ENCODER_MAP_ENABLE = yes diff --git a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/default/rules.mk b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/default/rules.mk index 43061db1dd46..4da205a168c7 100644 --- a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/default/rules.mk +++ b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/default/rules.mk @@ -1,2 +1 @@ -VIA_ENABLE = yes -LTO_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes From e69d30a9e915cfed7c4abe07eecb82831747f180 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 13 Jun 2024 09:48:24 +1000 Subject: [PATCH 0028/1205] VIA keymap deprecation notice. (#23905) --- docs/ChangeLog/20240526.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/ChangeLog/20240526.md b/docs/ChangeLog/20240526.md index b5e5b3b69389..b311f869c433 100644 --- a/docs/ChangeLog/20240526.md +++ b/docs/ChangeLog/20240526.md @@ -109,6 +109,16 @@ Essentially, changes were made in the internals of how QMK interacts with USB fo Compliance checks were run against QMK firmwares for the most popular ARM microcontrollers, as well as suspend/resume tests. As far as we can tell, a whole host of hard-to-reproduce issues are mitigated by this change. +## Deprecation Notices + +In line with the [notice period](support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here. + +### Migration of VIA keymaps to VIA team control + +The QMK team has been in discussion with the VIA maintainers and all VIA-related keymaps in the `qmk_firmware` repository will transition to a `qmk_userspace`-style repository under the VIA team's control at the end of the next breaking changes period. This allows the VIA team to support many more custom keyboard configurations, as well as reduces the turnaround time for any changes to the VIA protocol they wish to make. + +At the end of the breaking changes cycle ending 2024-08-25, VIA-enabled keymaps will no longer be accepted into the QMK repository. At the time of migration, any open PRs against `qmk_firmware` which include new VIA-related keymaps will be subsequently be asked to remove those keymaps and instead raise a PR against the userspace repository containing all VIA keymaps. + ## Full changelist {#full-changelist} Core: From 7247039742fb81cbf1e443c23a8070afb5961762 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 13 Jun 2024 11:55:52 +1000 Subject: [PATCH 0029/1205] Fixup docs. (#23906) --- docs/ChangeLog/20240526.md | 2 +- docs/_sidebar.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/ChangeLog/20240526.md b/docs/ChangeLog/20240526.md index b311f869c433..f7efbc64271f 100644 --- a/docs/ChangeLog/20240526.md +++ b/docs/ChangeLog/20240526.md @@ -111,7 +111,7 @@ Compliance checks were run against QMK firmwares for the most popular ARM microc ## Deprecation Notices -In line with the [notice period](support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here. +In line with the [notice period](../support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here. ### Migration of VIA keymaps to VIA team control diff --git a/docs/_sidebar.json b/docs/_sidebar.json index b41719e4b327..2f64607deaee 100644 --- a/docs/_sidebar.json +++ b/docs/_sidebar.json @@ -212,7 +212,8 @@ "text": "Most Recent ChangeLog", "link": "/ChangeLog/20240526" }, - { "text": "Past Breaking Changes", "link": "/breaking_changes_history" } + { "text": "Past Breaking Changes", "link": "/breaking_changes_history" }, + { "text": "Deprecation Policy", "link": "/support_deprecation_policy" } ] }, From fa403562500e1229256ea355d36a8bf4c7967021 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 13 Jun 2024 02:59:37 +0100 Subject: [PATCH 0030/1205] Ensure documentation pull requests build (#23908) --- .github/workflows/docs.yml | 36 ++++++++---------------------------- docs/public/.nojekyll | 0 docs/public/CNAME | 1 + 3 files changed, 9 insertions(+), 28 deletions(-) create mode 100644 docs/public/.nojekyll create mode 100644 docs/public/CNAME diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 25311019c6c9..0fdd2c7b37d9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,7 +7,6 @@ on: push: branches: - master - - vitepress paths: - 'builddefs/docsgen/**' - 'tmk_core/**' @@ -15,6 +14,11 @@ on: - 'platforms/**' - 'docs/**' - '.github/workflows/docs.yml' + pull_request: + paths: + - 'builddefs/docsgen/**' + - 'docs/**' + - '.github/workflows/docs.yml' defaults: run: @@ -25,9 +29,6 @@ jobs: runs-on: ubuntu-latest container: ghcr.io/qmk/qmk_cli - # protect against those who develop with their fork on master - if: github.repository == 'qmk/qmk_firmware' || (github.repository == 'tzarc/qmk_firmware' && github.ref == 'refs/heads/vitepress') - steps: - uses: actions/checkout@v4 with: @@ -35,10 +36,10 @@ jobs: - name: Install dependencies run: | - apt-get update && apt-get install -y rsync doxygen curl + apt-get update && apt-get install -y rsync doxygen # install nvm touch $HOME/.bashrc - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash + wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash - name: Install node run: | @@ -46,29 +47,15 @@ jobs: nvm install 20 nvm use 20 corepack enable - npm install -g moxygen - name: Build docs run: | source $HOME/.bashrc nvm use 20 qmk --verbose generate-docs - touch '.build/docs/.nojekyll' - - - name: Set CNAME - if: github.repository == 'qmk/qmk_firmware' - run: | - # Override target CNAME - echo 'docs.qmk.fm' > .build/docs/CNAME - - - name: Override CNAME - if: github.repository == 'tzarc/qmk_firmware' - run: | - # Temporarily override target CNAME during development - echo 'vitepress.qmk.fm' > .build/docs/CNAME - name: Deploy - if: github.repository == 'qmk/qmk_firmware' + if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }} uses: JamesIves/github-pages-deploy-action@v4.6.1 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -76,10 +63,3 @@ jobs: folder: .build/docs git-config-name: QMK Bot git-config-email: hello@qmk.fm - - - name: Deploy - if: github.repository == 'tzarc/qmk_firmware' - uses: JamesIves/github-pages-deploy-action@v4.6.1 - with: - branch: gh-pages - folder: .build/docs diff --git a/docs/public/.nojekyll b/docs/public/.nojekyll new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/docs/public/CNAME b/docs/public/CNAME new file mode 100644 index 000000000000..06276c90c406 --- /dev/null +++ b/docs/public/CNAME @@ -0,0 +1 @@ +docs.qmk.fm From be9dfe65dd9cbc9f58e7c55894220b6708a22da7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 13 Jun 2024 12:55:47 +1000 Subject: [PATCH 0031/1205] Add API reference section for LED/RGB Matrix docs (#23902) --- docs/features/led_matrix.md | 339 ++++++++++++++++++++++---- docs/features/rgb_matrix.md | 471 +++++++++++++++++++++++++++++++----- 2 files changed, 696 insertions(+), 114 deletions(-) diff --git a/docs/features/led_matrix.md b/docs/features/led_matrix.md index 164cbc0f5fc0..3e3c17d2c1cb 100644 --- a/docs/features/led_matrix.md +++ b/docs/features/led_matrix.md @@ -380,55 +380,6 @@ For inspiration and examples, check out the built-in effects under `quantum/led_ The EEPROM for it is currently shared with the RGB Matrix system (it's generally assumed only one feature would be used at a time). -### Direct Operation {#direct-operation} -|Function |Description | -|--------------------------------------------|-------------| -|`led_matrix_set_value_all(v)` |Set all of the LEDs to the given value, where `v` is between 0 and 255 (not written to EEPROM) | -|`led_matrix_set_value(index, v)` |Set a single LED to the given value, where `v` is between 0 and 255, and `index` is between 0 and `LED_MATRIX_LED_COUNT` (not written to EEPROM) | - -### Disable/Enable Effects {#disable-enable-effects} -|Function |Description | -|--------------------------------------------|-------------| -|`led_matrix_toggle()` |Toggle effect range LEDs between on and off | -|`led_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) | -|`led_matrix_enable()` |Turn effect range LEDs on, based on their previous state | -|`led_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) | -|`led_matrix_disable()` |Turn effect range LEDs off, based on their previous state | -|`led_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) | - -### Change Effect Mode {#change-effect-mode} -|Function |Description | -|--------------------------------------------|-------------| -|`led_matrix_mode(mode)` |Set the mode, if LED animations are enabled | -|`led_matrix_mode_noeeprom(mode)` |Set the mode, if LED animations are enabled (not written to EEPROM) | -|`led_matrix_step()` |Change the mode to the next LED animation in the list of enabled LED animations | -|`led_matrix_step_noeeprom()` |Change the mode to the next LED animation in the list of enabled LED animations (not written to EEPROM) | -|`led_matrix_step_reverse()` |Change the mode to the previous LED animation in the list of enabled LED animations | -|`led_matrix_step_reverse_noeeprom()` |Change the mode to the previous LED animation in the list of enabled LED animations (not written to EEPROM) | -|`led_matrix_increase_speed()` |Increase the speed of the animations | -|`led_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) | -|`led_matrix_decrease_speed()` |Decrease the speed of the animations | -|`led_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) | -|`led_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 | -|`led_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) | - -### Change Value {#change-value} -|Function |Description | -|--------------------------------------------|-------------| -|`led_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value | -|`led_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) | -|`led_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value | -|`led_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) | - -### Query Current Status {#query-current-status} -|Function |Description | -|---------------------------------|---------------------------| -|`led_matrix_is_enabled()` |Gets current on/off status | -|`led_matrix_get_mode()` |Gets current mode | -|`led_matrix_get_val()` |Gets current val | -|`led_matrix_get_speed()` |Gets current speed | -|`led_matrix_get_suspend_state()` |Gets current suspend state | - ## Callbacks {#callbacks} ### Indicators {#indicators} @@ -452,3 +403,293 @@ void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { return false; } ``` + +## API {#api} + +### `void led_matrix_toggle(void)` {#api-led-matrix-toggle} + +Toggle LED Matrix on or off. + +--- + +### `void led_matrix_toggle_noeeprom(void)` {#api-led-matrix-toggle-noeeprom} + +Toggle LED Matrix on or off. New state is not written to EEPROM. + +--- + +### `void led_matrix_enable(void)` {#api-led-matrix-enable} + +Turn LED Matrix on. + +--- + +### `void led_matrix_enable_noeeprom(void)` {#api-led-matrix-enable-noeeprom} + +Turn LED Matrix on. New state is not written to EEPROM. + +--- + +### `void led_matrix_disable(void)` {#api-led-matrix-disable} + +Turn LED Matrix off. + +--- + +### `void led_matrix_disable_noeeprom(void)` {#api-led-matrix-disable-noeeprom} + +Turn LED Matrix off. New state is not written to EEPROM. + +--- + +### `bool led_matrix_is_enabled(void)` {#api-led-matrix-is-enabled} + +Get the current enabled state of LED Matrix. + +#### Return Value {#api-led-matrix-is-enabled-return} + +`true` if LED Matrix is enabled. + +--- + +### `void led_matrix_set_value(uint8_t index, uint8_t v)` {#led-matrix-set-value} + +Set the brightness of a single LED. + +This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame. + +#### Arguments {#api-led-matrix-set-value-arguments} + + - `uint8_t index` + The LED index, from 0 to `LED_MATRIX_LED_COUNT - 1`. + - `uint8_t v` + The brightness value to set. + +--- + +### `void led_matrix_set_value_all(uint8_t v)` {#api-led-matrix-set-value-all} + +Set the brightness of all LEDs. + +This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame. + +#### Arguments {#api-led-matrix-set-value-all-arguments} + + - `uint8_t v` + The brightness value to set. + +--- + +### `void led_matrix_mode(uint8_t mode)` {#api-led-matrix-mode} + +Set the currently running effect. + +#### Arguments {#api-led-matrix-mode-arguments} + + - `uint8_t mode` + The effect to switch to. + +--- + +### `void led_matrix_mode_noeeprom(uint8_t mode)` {#api-led-matrix-mode-noeeprom} + +Set the currently running effect. New state is not written to EEPROM. + +#### Arguments {#api-led-matrix-mode-noeeprom-arguments} + + - `uint8_t mode` + The effect to switch to. + +--- + +### `void led_matrix_step(void)` {#api-led-matrix-step} + +Move to the next enabled effect. + +--- + +### `void led_matrix_step_noeeprom(void)` {#api-led-matrix-step-noeeprom} + +Move to the next enabled effect. New state is not written to EEPROM. + +--- + +### `void led_matrix_step_reverse(void)` {#api-led-matrix-step-reverse} + +Move to the previous enabled effect. + +--- + +### `void led_matrix_step_reverse_noeeprom(void)` {#api-led-matrix-step-reverse} + +Move to the previous enabled effect. New state is not written to EEPROM. + +--- + +### `uint8_t led_matrix_get_mode(void)` {#api-led-matrix-get-mode} + +Get the currently running effect. + +#### Return Value {#api-led-matrix-get-mode-return} + +The index of the currently running effect. + +--- + +### `void val_matrix_increase_val(void)` {#api-led-matrix-increase-val} + +Increase the global effect brightness. + +--- + +### `void led_matrix_increase_val_noeeprom(void)` {#api-led-matrix-increase-val-noeeprom} + +Increase the global effect brightness. New state is not written to EEPROM. + +--- + +### `void led_matrix_decrease_val(void)` {#api-led-matrix-decrease-val} + +Decrease the global effect brightness. + +--- + +### `void led_matrix_decrease_val_noeeprom(void)` {#api-led-matrix-decrease-val-noeeprom} + +Decrease the global effect brightness. New state is not written to EEPROM. + +--- + +### `uint8_t led_matrix_get_val(void)` {#api-led-matrix-get-val} + +Get the current global effect brightness. + +#### Return Value {#api-led-matrix-get-val-return} + +The current brightness value, from 0 to 255. + +--- + +### `void led_matrix_increase_speed(void)` {#api-led-matrix-increase-speed} + +Increase the effect speed. + +--- + +### `void led_matrix_increase_speed_noeeprom(void)` {#api-led-matrix-increase-speed-noeeprom} + +Increase the effect speed. New state is not written to EEPROM. + +--- + +### `void led_matrix_decrease_speed(void)` {#api-led-matrix-decrease-speed} + +Decrease the effect speed. + +--- + +### `void led_matrix_decrease_speed_noeeprom(void)` {#api-led-matrix-decrease-speed-noeeprom} + +Decrease the effect speed. New state is not written to EEPROM. + +--- + +### `void led_matrix_set_speed(uint8_t speed)` {#api-led-matrix-set-speed} + +Set the effect speed. + +#### Arguments {#api-led-matrix-set-speed-arguments} + + - `uint8_t speed` + The new speed to set, from 0 to 255. + +--- + +### `void led_matrix_set_speed_noeeprom(uint8_t speed)` {#api-led-matrix-set-speed-noeeprom} + +Set the effect speed. New state is not written to EEPROM. + +#### Arguments {#api-led-matrix-set-speed-noeeprom-arguments} + + - `uint8_t speed` + The new speed to set, from 0 to 255. + +--- + +### `uint8_t led_matrix_get_speed(void)` {#api-led-matrix-get-speed} + +Get the current effect speed. + +#### Return Value {#api-led-matrix-get-speed-return} + +The current effect speed, from 0 to 255. + +--- + +### `void led_matrix_reload_from_eeprom(void)` {#api-led-matrix-reload-from-eeprom} + +Reload the effect configuration (enabled, mode and brightness) from EEPROM. + +--- + +### `bool led_matrix_get_suspend_state(void)` {#api-led-matrix-get-suspend-state} + +Get the current suspend state of LED Matrix. + +#### Return Value {#api-led-matrix-get-suspend-state-return} + +`true` if LED Matrix is currently in the suspended state. + +--- + +### `bool led_matrix_indicators_kb(void)` {#api-led-matrix-indicators-kb} + +Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs. + +#### Return Value {#api-led-matrix-indicators-kb-return} + +Currently unused. + +--- + +### `bool led_matrix_indicators_user(void)` {#api-led-matrix-indicators-user} + +Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs. + +#### Return Value {#api-led-matrix-indicators-user-return} + +`true` to continue running the keyboard-level callback. + +--- + +### `bool led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max)` {#api-led-matrix-indicators-advanced-kb} + +Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs. + +### Arguments {#api-led-matrix-indicators-advanced-kb-arguments} + + - `uint8_t led_min` + The index of the first LED in this batch. + - `uint8_t led_max` + The index of the last LED in this batch. + +#### Return Value {#api-led-matrix-indicators-advanced-kb-return} + +Currently unused. + +--- + +### `bool led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max)` {#api-led-matrix-indicators-advanced-user} + +Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs. + +### Arguments {#api-led-matrix-indicators-advanced-user-arguments} + + - `uint8_t led_min` + The index of the first LED in this batch. + - `uint8_t led_max` + The index of the last LED in this batch. + +#### Return Value {#api-led-matrix-indicators-advanced-user-return} + +`true` to continue running the keyboard-level callback. diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md index 448d1cdfb56c..60250c2c9c89 100644 --- a/docs/features/rgb_matrix.md +++ b/docs/features/rgb_matrix.md @@ -914,71 +914,6 @@ These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master The EEPROM for it is currently shared with the LED Matrix system (it's generally assumed only one feature would be used at a time). -## Functions {#functions} - -### Direct Operation {#direct-operation} -|Function |Description | -|--------------------------------------------|-------------| -|`rgb_matrix_set_color_all(r, g, b)` |Set all of the LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | -|`rgb_matrix_set_color(index, r, g, b)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255, and `index` is between 0 and `RGB_MATRIX_LED_COUNT` (not written to EEPROM) | - -### Disable/Enable Effects {#disable-enable-effects} -|Function |Description | -|--------------------------------------------|-------------| -|`rgb_matrix_toggle()` |Toggle effect range LEDs between on and off | -|`rgb_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) | -|`rgb_matrix_enable()` |Turn effect range LEDs on, based on their previous state | -|`rgb_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) | -|`rgb_matrix_disable()` |Turn effect range LEDs off, based on their previous state | -|`rgb_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) | - -### Change Effect Mode {#change-effect-mode} -|Function |Description | -|--------------------------------------------|-------------| -|`rgb_matrix_mode(mode)` |Set the mode, if RGB animations are enabled | -|`rgb_matrix_mode_noeeprom(mode)` |Set the mode, if RGB animations are enabled (not written to EEPROM) | -|`rgb_matrix_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations | -|`rgb_matrix_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) | -|`rgb_matrix_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations | -|`rgb_matrix_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) | -|`rgb_matrix_increase_speed()` |Increase the speed of the animations | -|`rgb_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) | -|`rgb_matrix_decrease_speed()` |Decrease the speed of the animations | -|`rgb_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) | -|`rgb_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 | -|`rgb_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) | -|`rgb_matrix_reload_from_eeprom()` |Reload the effect configuration (enabled, mode and color) from EEPROM | - -### Change Color {#change-color} -|Function |Description | -|--------------------------------------------|-------------| -|`rgb_matrix_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue | -|`rgb_matrix_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) | -|`rgb_matrix_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue | -|`rgb_matrix_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) | -|`rgb_matrix_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation | -|`rgb_matrix_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) | -|`rgb_matrix_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation | -|`rgb_matrix_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) | -|`rgb_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value | -|`rgb_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) | -|`rgb_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value | -|`rgb_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) | -|`rgb_matrix_sethsv(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 | -|`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | - -### Query Current Status {#query-current-status} -|Function |Description | -|---------------------------------|---------------------------| -|`rgb_matrix_is_enabled()` |Gets current on/off status | -|`rgb_matrix_get_mode()` |Gets current mode | -|`rgb_matrix_get_hue()` |Gets current hue | -|`rgb_matrix_get_sat()` |Gets current sat | -|`rgb_matrix_get_val()` |Gets current val | -|`rgb_matrix_get_hsv()` |Gets hue, sat, and val and returns a [`HSV` structure](https://github.com/qmk/qmk_firmware/blob/7ba6456c0b2e041bb9f97dbed265c5b8b4b12192/quantum/color.h#L56-L61)| -|`rgb_matrix_get_speed()` |Gets current speed | -|`rgb_matrix_get_suspend_state()` |Gets current suspend state | - ## Callbacks {#callbacks} ### Indicators {#indicators} @@ -1117,3 +1052,409 @@ void keyboard_post_init_user(void) { rgb_matrix_sethsv_noeeprom(HSV_OFF); } ``` + +## API {#api} + +### `void rgb_matrix_toggle(void)` {#api-rgb-matrix-toggle} + +Toggle RGB Matrix on or off. + +--- + +### `void rgb_matrix_toggle_noeeprom(void)` {#api-rgb-matrix-toggle-noeeprom} + +Toggle RGB Matrix on or off. New state is not written to EEPROM. + +--- + +### `void rgb_matrix_enable(void)` {#api-rgb-matrix-enable} + +Turn RGB Matrix on. + +--- + +### `void rgb_matrix_enable_noeeprom(void)` {#api-rgb-matrix-enable-noeeprom} + +Turn RGB Matrix on. New state is not written to EEPROM. + +--- + +### `void rgb_matrix_disable(void)` {#api-rgb-matrix-disable} + +Turn RGB Matrix off. + +--- + +### `void rgb_matrix_disable_noeeprom(void)` {#api-rgb-matrix-disable-noeeprom} + +Turn RGB Matrix off. New state is not written to EEPROM. + +--- + +### `bool rgb_matrix_is_enabled(void)` {#api-rgb-matrix-is-enabled} + +Get the current enabled state of RGB Matrix. + +#### Return Value {#api-rgb-matrix-is-enabled-return} + +`true` if RGB Matrix is enabled. + +--- + +### `void rgb_matrix_set_color(uint8_t index, uint8_t r, uint8_t g, uint8_t b)` {#api-rgb-matrix-set-color} + +Set the color of a single LED. + +This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame. + +#### Arguments {#api-rgb-matrix-set-color-arguments} + + - `uint8_t index` + The LED index, from 0 to `RGB_MATRIX_LED_COUNT - 1`. + - `uint8_t r` + The red value to set. + - `uint8_t g` + The green value to set. + - `uint8_t b` + The blue value to set. + +--- + +### `void rgb_matrix_set_color_all(uint8_t r, uint8_t g, uint8_t b)` {#api-rgb-matrix-set-color-all} + +Set the color of all LEDs. + +This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame. + +#### Arguments {#api-rgb-matrix-set-color-all-arguments} + + - `uint8_t r` + The red value to set. + - `uint8_t g` + The green value to set. + - `uint8_t b` + The blue value to set. + +--- + +### `void rgb_matrix_mode(uint8_t mode)` {#api-rgb-matrix-mode} + +Set the currently running effect. + +#### Arguments {#api-rgb-matrix-mode-arguments} + + - `uint8_t mode` + The effect to switch to. + +--- + +### `void rgb_matrix_mode_noeeprom(uint8_t mode)` {#api-rgb-matrix-mode-noeeprom} + +Set the currently running effect. New state is not written to EEPROM. + +#### Arguments {#api-rgb-matrix-mode-noeeprom-arguments} + + - `uint8_t mode` + The effect to switch to. + +--- + +### `void rgb_matrix_step(void)` {#api-rgb-matrix-step} + +Move to the next enabled effect. + +--- + +### `void rgb_matrix_step_noeeprom(void)` {#api-rgb-matrix-step-noeeprom} + +Move to the next enabled effect. New state is not written to EEPROM. + +--- + +### `void rgb_matrix_step_reverse(void)` {#api-rgb-matrix-step-reverse} + +Move to the previous enabled effect. + +--- + +### `void rgb_matrix_step_reverse_noeeprom(void)` {#api-rgb-matrix-step-reverse} + +Move to the previous enabled effect. New state is not written to EEPROM. + +--- + +### `uint8_t rgb_matrix_get_mode(void)` {#api-rgb-matrix-get-mode} + +Get the currently running effect. + +#### Return Value {#api-rgb-matrix-get-mode-return} + +The index of the currently running effect. + +--- + +### `void rgb_matrix_increase_hue(void)` {#api-rgb-matrix-increase-hue} + +Increase the global effect hue. + +--- + +### `void rgb_matrix_increase_hue_noeeprom(void)` {#api-rgb-matrix-increase-hue-noeeprom} + +Increase the global effect hue. New state is not written to EEPROM. + +--- + +### `void rgb_matrix_decrease_hue(void)` {#api-rgb-matrix-decrease-hue} + +Decrease the global effect hue. + +--- + +### `void rgb_matrix_decrease_hue_noeeprom(void)` {#api-rgb-matrix-decrease-hue-noeeprom} + +Decrease the global effect hue. New state is not written to EEPROM. + +--- + +### `uint8_t rgb_matrix_get_hue(void)` {#api-rgb-matrix-get-hue} + +Get the current global effect hue. + +#### Return Value {#api-rgb-matrix-get-hue-return} + +The current hue value, from 0 to 255. + +--- + +### `void rgb_matrix_increase_sat(void)` {#api-rgb-matrix-increase-sat} + +Increase the global effect saturation. + +--- + +### `void rgb_matrix_increase_sat_noeeprom(void)` {#api-rgb-matrix-increase-sat-noeeprom} + +Increase the global effect saturation. New state is not written to EEPROM. + +--- + +### `void rgb_matrix_decrease_sat(void)` {#api-rgb-matrix-decrease-sat} + +Decrease the global effect saturation. + +--- + +### `void rgb_matrix_decrease_sat_noeeprom(void)` {#api-rgb-matrix-decrease-sat-noeeprom} + +Decrease the global effect saturation. New state is not written to EEPROM. + +--- + +### `uint8_t rgb_matrix_get_sat(void)` {#api-rgb-matrix-get-sat} + +Get the current global effect saturation. + +#### Return Value {#api-rgb-matrix-get-sat-return} + +The current saturation value, from 0 to 255. + +--- + +### `void rgb_matrix_increase_val(void)` {#api-rgb-matrix-increase-val} + +Increase the global effect value (brightness). + +--- + +### `void rgb_matrix_increase_val_noeeprom(void)` {#api-rgb-matrix-increase-val-noeeprom} + +Increase the global effect value (brightness). New state is not written to EEPROM. + +--- + +### `void rgb_matrix_decrease_val(void)` {#api-rgb-matrix-decrease-val} + +Decrease the global effect value (brightness). + +--- + +### `void rgb_matrix_decrease_val_noeeprom(void)` {#api-rgb-matrix-decrease-val-noeeprom} + +Decrease the global effect value (brightness). New state is not written to EEPROM. + +--- + +### `uint8_t rgb_matrix_get_val(void)` {#api-rgb-matrix-get-val} + +Get the current global effect value (brightness). + +#### Return Value {#api-rgb-matrix-get-val-return} + +The current brightness value, from 0 to 255. + +--- + +### `void rgb_matrix_increase_speed(void)` {#api-rgb-matrix-increase-speed} + +Increase the effect speed. + +--- + +### `void rgb_matrix_increase_speed_noeeprom(void)` {#api-rgb-matrix-increase-speed-noeeprom} + +Increase the effect speed. New state is not written to EEPROM. + +--- + +### `void rgb_matrix_decrease_speed(void)` {#api-rgb-matrix-decrease-speed} + +Decrease the effect speed. + +--- + +### `void rgb_matrix_decrease_speed_noeeprom(void)` {#api-rgb-matrix-decrease-speed-noeeprom} + +Decrease the effect speed. New state is not written to EEPROM. + +--- + +### `void rgb_matrix_set_speed(uint8_t speed)` {#api-rgb-matrix-set-speed} + +Set the effect speed. + +#### Arguments {#api-rgb-matrix-set-speed-arguments} + + - `uint8_t speed` + The new speed to set, from 0 to 255. + +--- + +### `void rgb_matrix_set_speed_noeeprom(uint8_t speed)` {#api-rgb-matrix-set-speed-noeeprom} + +Set the effect speed. New state is not written to EEPROM. + +#### Arguments {#api-rgb-matrix-set-speed-noeeprom-arguments} + + - `uint8_t speed` + The new speed to set, from 0 to 255. + +--- + +### `uint8_t rgb_matrix_get_speed(void)` {#api-rgb-matrix-get-speed} + +Get the current effect speed. + +#### Return Value {#api-rgb-matrix-get-speed-return} + +The current effect speed, from 0 to 255. + +--- + +### `void rgb_matrix_sethsv(uint8_t h, uint8_t s, uint8_t v)` {#api-rgb-matrix-sethsv} + +Set the global effect hue, saturation, and value (brightness). + +### Arguments {#api-rgb-matrix-sethsv-arguments} + + - `uint8_t h` + The hue to set, from 0 to 255. + - `uint8_t s` + The saturation to set, from 0 to 255. + - `uint8_t v` + The value (brightness) to set, from 0 to 255. + +--- + +### `void rgb_matrix_sethsv_noeeprom(uint8_t h, uint8_t s, uint8_t v)` {#api-rgb-matrix-sethsv-noeeprom} + +Set the global effect hue, saturation, and value (brightness). New state is not written to EEPROM. + +#### Arguments {#api-rgb-matrix-sethsv-noeeprom-arguments} + + - `uint8_t h` + The hue to set, from 0 to 255. + - `uint8_t s` + The saturation to set, from 0 to 255. + - `uint8_t v` + The value (brightness) to set, from 0 to 255. + +--- + +### `HSV rgb_matrix_get_hsv(void)` {#api-rgb-matrix-get-hsv} + +Get the current global effect hue, saturation, and value (brightness). + +#### Return Value {#api-rgb-matrix-get-hsv-return} + +The current effect HSV as an `HSV` struct. + +--- + +### `void rgb_matrix_reload_from_eeprom(void)` {#api-rgb-matrix-reload-from-eeprom} + +Reload the effect configuration (enabled, mode and color) from EEPROM. + +--- + +### `bool rgb_matrix_get_suspend_state(void)` {#api-rgb-matrix-get-suspend-state} + +Get the current suspend state of RGB Matrix. + +#### Return Value {#api-rgb-matrix-get-suspend-state-return} + +`true` if RGB Matrix is currently in the suspended state. + +--- + +### `bool rgb_matrix_indicators_kb(void)` {#api-rgb-matrix-indicators-kb} + +Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs. + +#### Return Value {#api-rgb-matrix-indicators-kb-return} + +Currently unused. + +--- + +### `bool rgb_matrix_indicators_user(void)` {#api-rgb-matrix-indicators-user} + +Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs. + +#### Return Value {#api-rgb-matrix-indicators-user-return} + +`true` to continue running the keyboard-level callback. + +--- + +### `bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max)` {#api-rgb-matrix-indicators-advanced-kb} + +Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs. + +### Arguments {#api-rgb-matrix-indicators-advanced-kb-arguments} + + - `uint8_t led_min` + The index of the first LED in this batch. + - `uint8_t led_max` + The index of the last LED in this batch. + +#### Return Value {#api-rgb-matrix-indicators-advanced-kb-return} + +Currently unused. + +--- + +### `bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max)` {#api-rgb-matrix-indicators-advanced-user} + +Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs. + +### Arguments {#api-rgb-matrix-indicators-advanced-user-arguments} + + - `uint8_t led_min` + The index of the first LED in this batch. + - `uint8_t led_max` + The index of the last LED in this batch. + +#### Return Value {#api-rgb-matrix-indicators-advanced-user-return} + +`true` to continue running the keyboard-level callback. From 942c2a8d5acfebe73cc1dafd9b0044cb1cc7e911 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 13 Jun 2024 13:31:03 +1000 Subject: [PATCH 0032/1205] Fix nonunique anchors (#23910) --- docs/features/led_matrix.md | 2 +- docs/features/rgb_matrix.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/features/led_matrix.md b/docs/features/led_matrix.md index 3e3c17d2c1cb..f6587f7b3eaa 100644 --- a/docs/features/led_matrix.md +++ b/docs/features/led_matrix.md @@ -520,7 +520,7 @@ Move to the previous enabled effect. --- -### `void led_matrix_step_reverse_noeeprom(void)` {#api-led-matrix-step-reverse} +### `void led_matrix_step_reverse_noeeprom(void)` {#api-led-matrix-step-reverse-noeeprom} Move to the previous enabled effect. New state is not written to EEPROM. diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md index 60250c2c9c89..a42f0a0f7360 100644 --- a/docs/features/rgb_matrix.md +++ b/docs/features/rgb_matrix.md @@ -1177,7 +1177,7 @@ Move to the previous enabled effect. --- -### `void rgb_matrix_step_reverse_noeeprom(void)` {#api-rgb-matrix-step-reverse} +### `void rgb_matrix_step_reverse_noeeprom(void)` {#api-rgb-matrix-step-reverse-noeeprom} Move to the previous enabled effect. New state is not written to EEPROM. From c4a74be7f02ec64033638e93a49924df20fb2e57 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 13 Jun 2024 21:59:46 +1000 Subject: [PATCH 0033/1205] Add process_keycode handlers for new RGB Matrix and Underglow keycodes (#23896) --- quantum/process_keycode/process_rgb_matrix.c | 101 +++++++++++++++++++ quantum/process_keycode/process_rgb_matrix.h | 10 ++ quantum/process_keycode/process_underglow.c | 91 +++++++++++++++++ quantum/process_keycode/process_underglow.h | 10 ++ 4 files changed, 212 insertions(+) create mode 100644 quantum/process_keycode/process_rgb_matrix.c create mode 100644 quantum/process_keycode/process_rgb_matrix.h create mode 100644 quantum/process_keycode/process_underglow.c create mode 100644 quantum/process_keycode/process_underglow.h diff --git a/quantum/process_keycode/process_rgb_matrix.c b/quantum/process_keycode/process_rgb_matrix.c new file mode 100644 index 000000000000..fd2aa1a0c73f --- /dev/null +++ b/quantum/process_keycode/process_rgb_matrix.c @@ -0,0 +1,101 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "process_rgb_matrix.h" +#include "rgb_matrix.h" +#include "action_util.h" +#include "keycodes.h" +#include "modifiers.h" + +bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { +#ifdef RGB_TRIGGER_ON_KEYDOWN + if (record->event.pressed) { +#else + if (!record->event.pressed) { +#endif + bool shifted = get_mods() & MOD_MASK_SHIFT; + switch (keycode) { + case QK_RGB_MATRIX_ON: + rgb_matrix_enable(); + return false; + case QK_RGB_MATRIX_OFF: + rgb_matrix_disable(); + return false; + case QK_RGB_MATRIX_TOGGLE: + rgb_matrix_toggle(); + return false; + case QK_RGB_MATRIX_MODE_NEXT: + if (shifted) { + rgb_matrix_step_reverse(); + } else { + rgb_matrix_step(); + } + return false; + case QK_RGB_MATRIX_MODE_PREVIOUS: + if (shifted) { + rgb_matrix_step(); + } else { + rgb_matrix_step_reverse(); + } + return false; + case QK_RGB_MATRIX_HUE_UP: + if (shifted) { + rgb_matrix_decrease_hue(); + } else { + rgb_matrix_increase_hue(); + } + return false; + case QK_RGB_MATRIX_HUE_DOWN: + if (shifted) { + rgb_matrix_increase_hue(); + } else { + rgb_matrix_decrease_hue(); + } + return false; + case QK_RGB_MATRIX_SATURATION_UP: + if (shifted) { + rgb_matrix_decrease_sat(); + } else { + rgb_matrix_increase_sat(); + } + return false; + case QK_RGB_MATRIX_SATURATION_DOWN: + if (shifted) { + rgb_matrix_increase_sat(); + } else { + rgb_matrix_decrease_sat(); + } + return false; + case QK_RGB_MATRIX_VALUE_UP: + if (shifted) { + rgb_matrix_decrease_val(); + } else { + rgb_matrix_increase_val(); + } + return false; + case QK_RGB_MATRIX_VALUE_DOWN: + if (shifted) { + rgb_matrix_increase_val(); + } else { + rgb_matrix_decrease_val(); + } + return false; + case QK_RGB_MATRIX_SPEED_UP: + if (shifted) { + rgb_matrix_decrease_speed(); + } else { + rgb_matrix_increase_speed(); + } + return false; + case QK_RGB_MATRIX_SPEED_DOWN: + if (shifted) { + rgb_matrix_increase_speed(); + } else { + rgb_matrix_decrease_speed(); + } + return false; + } + } + + return true; +} diff --git a/quantum/process_keycode/process_rgb_matrix.h b/quantum/process_keycode/process_rgb_matrix.h new file mode 100644 index 000000000000..a02bf57b5f3c --- /dev/null +++ b/quantum/process_keycode/process_rgb_matrix.h @@ -0,0 +1,10 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include +#include "action.h" + +bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_underglow.c b/quantum/process_keycode/process_underglow.c new file mode 100644 index 000000000000..779672ac0768 --- /dev/null +++ b/quantum/process_keycode/process_underglow.c @@ -0,0 +1,91 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "process_underglow.h" +#include "rgblight.h" +#include "action_util.h" +#include "keycodes.h" +#include "modifiers.h" + +bool process_underglow(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + uint8_t shifted = get_mods() & MOD_MASK_SHIFT; + switch (keycode) { + case QK_UNDERGLOW_TOGGLE: + rgblight_toggle(); + return false; + case QK_UNDERGLOW_MODE_NEXT: + if (shifted) { + rgblight_step_reverse(); + } else { + rgblight_step(); + } + return false; + case QK_UNDERGLOW_MODE_PREVIOUS: + if (shifted) { + rgblight_step(); + } else { + rgblight_step_reverse(); + } + return false; + case QK_UNDERGLOW_HUE_UP: + if (shifted) { + rgblight_decrease_hue(); + } else { + rgblight_increase_hue(); + } + return false; + case QK_UNDERGLOW_HUE_DOWN: + if (shifted) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + return false; + case QK_UNDERGLOW_SATURATION_UP: + if (shifted) { + rgblight_decrease_sat(); + } else { + rgblight_increase_sat(); + } + return false; + case QK_UNDERGLOW_SATURATION_DOWN: + if (shifted) { + rgblight_increase_sat(); + } else { + rgblight_decrease_sat(); + } + return false; + case QK_UNDERGLOW_VALUE_UP: + if (shifted) { + rgblight_decrease_val(); + } else { + rgblight_increase_val(); + } + return false; + case QK_UNDERGLOW_VALUE_DOWN: + if (shifted) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + return false; + case QK_UNDERGLOW_SPEED_UP: + if (shifted) { + rgblight_decrease_speed(); + } else { + rgblight_increase_speed(); + } + return false; + case QK_UNDERGLOW_SPEED_DOWN: + if (shifted) { + rgblight_increase_speed(); + } else { + rgblight_decrease_speed(); + } + return false; + } + } + + return true; +} diff --git a/quantum/process_keycode/process_underglow.h b/quantum/process_keycode/process_underglow.h new file mode 100644 index 000000000000..b409cafbb895 --- /dev/null +++ b/quantum/process_keycode/process_underglow.h @@ -0,0 +1,10 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include +#include "action.h" + +bool process_underglow(uint16_t keycode, keyrecord_t *record); From 55538b2e1e743ec1a209e61880d52bb5d2156669 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 13 Jun 2024 22:19:45 +1000 Subject: [PATCH 0034/1205] APA102: API rework (#23355) --- docs/drivers/apa102.md | 47 ++++++++++++++++++++++++----- drivers/led/apa102.c | 23 ++++++++++---- drivers/led/apa102.h | 15 ++------- quantum/rgblight/rgblight_drivers.c | 8 +++++ 4 files changed, 67 insertions(+), 26 deletions(-) diff --git a/docs/drivers/apa102.md b/docs/drivers/apa102.md index 88868a73b593..197b18869e83 100644 --- a/docs/drivers/apa102.md +++ b/docs/drivers/apa102.md @@ -26,20 +26,51 @@ Add the following to your `config.h`: ## API {#api} -### `void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds)` +### `void apa102_init(void)` {#api-apa102-init} -Send RGB data to the APA102 LED chain. +Initialize the LED driver. This function should be called first. -#### Arguments {#api-apa102-setleds-arguments} +--- + +### `void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-apa102-set-color} + +Set the color of a single LED. This function does not immediately update the LEDs; call `apa102_flush()` after you are finished. + +#### Arguments {#api-apa102-set-color-arguments} + + - `uint16_t index` + The LED index in the APA102 chain. + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-apa102-set-color-all} + +Set the color of all LEDs. + +#### Arguments {#api-apa102-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void apa102_flush(void)` {#api-apa102-flush} - - `rgb_led_t *start_led` - A pointer to the LED array. - - `uint16_t num_leds` - The length of the LED array. +Flush the PWM values to the LED chain. --- -### `void apa102_set_brightness(uint8_t brightness)` +### `void apa102_set_brightness(uint8_t brightness)` {#api-apa102-set-brightness} Set the global brightness. diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c index b171b07b12c4..0cf0ecb40183 100644 --- a/drivers/led/apa102.c +++ b/drivers/led/apa102.c @@ -53,7 +53,8 @@ io_wait; \ } while (0) -uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS; +rgb_led_t apa102_leds[APA102_LED_COUNT]; +uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS; static void apa102_send_byte(uint8_t byte) { APA102_SEND_BIT(byte, 7); @@ -121,14 +122,24 @@ void apa102_init(void) { gpio_set_pin_output(APA102_CI_PIN); } -void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) { - rgb_led_t *end = start_led + num_leds; +void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue) { + apa102_leds[index].r = red; + apa102_leds[index].g = green; + apa102_leds[index].b = blue; +} + +void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (uint16_t i = 0; i < APA102_LED_COUNT; i++) { + apa102_set_color(i, red, green, blue); + } +} +void apa102_flush(void) { apa102_start_frame(); - for (rgb_led_t *led = start_led; led < end; led++) { - apa102_send_frame(led->r, led->g, led->b, apa102_led_brightness); + for (uint8_t i = 0; i < APA102_LED_COUNT; i++) { + apa102_send_frame(apa102_leds[i].r, apa102_leds[i].g, apa102_leds[i].b, apa102_led_brightness); } - apa102_end_frame(num_leds); + apa102_end_frame(APA102_LED_COUNT); } void apa102_set_brightness(uint8_t brightness) { diff --git a/drivers/led/apa102.h b/drivers/led/apa102.h index 5e2f78658be0..42f1344f0c94 100644 --- a/drivers/led/apa102.h +++ b/drivers/led/apa102.h @@ -32,17 +32,8 @@ #define APA102_MAX_BRIGHTNESS 31 void apa102_init(void); - -/* User Interface - * - * Input: - * start_led: An array of GRB data describing the LED colors - * num_leds: The number of LEDs to write - * - * The functions will perform the following actions: - * - Set the data-out pin as output - * - Send out the LED data - */ -void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds); +void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue); +void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue); +void apa102_flush(void); void apa102_set_brightness(uint8_t brightness); diff --git a/quantum/rgblight/rgblight_drivers.c b/quantum/rgblight/rgblight_drivers.c index 8902b8f842e5..76e9031aec92 100644 --- a/quantum/rgblight/rgblight_drivers.c +++ b/quantum/rgblight/rgblight_drivers.c @@ -14,6 +14,14 @@ const rgblight_driver_t rgblight_driver = { #elif defined(RGBLIGHT_APA102) # include "apa102.h" +// Temporary shim +static void apa102_setleds(rgb_led_t *ledarray, uint16_t number_of_leds) { + for (uint16_t i = 0; i < number_of_leds; i++) { + apa102_set_color(i, ledarray[i].r, ledarray[i].g, ledarray[i].b); + } + apa102_flush(); +} + const rgblight_driver_t rgblight_driver = { .init = apa102_init, .setleds = apa102_setleds, From 4a4eda4c3ca96a57d44fc1cb5d4d5ef536839d2f Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 13 Jun 2024 09:00:42 -0400 Subject: [PATCH 0035/1205] Add missing encode enable for BAMFK-1 (#23821) Add missing encode enable --- keyboards/keebio/bamfk1/keyboard.json | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/keebio/bamfk1/keyboard.json b/keyboards/keebio/bamfk1/keyboard.json index 09e7edbd185c..babc74f780e9 100644 --- a/keyboards/keebio/bamfk1/keyboard.json +++ b/keyboards/keebio/bamfk1/keyboard.json @@ -4,6 +4,7 @@ "maintainer": "nooges", "bootloader": "atmel-dfu", "encoder": { + "enabled": true, "rotary": [ {"pin_a": "C7", "pin_b": "B5"}, {"pin_a": "D7", "pin_b": "D4"} From caf13bb9db0ffa29c25ec55d5cff5c12770f97b9 Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 13 Jun 2024 18:36:26 -0400 Subject: [PATCH 0036/1205] Fix order of RGB LEDs to correct one for Iris CE (#23914) --- keyboards/keebio/iris_ce/rev1/keyboard.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/keebio/iris_ce/rev1/keyboard.json b/keyboards/keebio/iris_ce/rev1/keyboard.json index c9fc160001ad..6086f948b1c6 100644 --- a/keyboards/keebio/iris_ce/rev1/keyboard.json +++ b/keyboards/keebio/iris_ce/rev1/keyboard.json @@ -118,11 +118,11 @@ {"matrix": [8, 5], "x": 144, "y": 43, "flags": 4}, {"matrix": [8, 4], "x": 160, "y": 42, "flags": 4}, {"matrix": [8, 3], "x": 176, "y": 40, "flags": 4}, - {"x": 184, "y": 50, "flags": 2}, {"matrix": [8, 2], "x": 192, "y": 42, "flags": 4}, {"matrix": [8, 1], "x": 208, "y": 45, "flags": 4}, - {"x": 216, "y": 43, "flags": 2}, {"matrix": [8, 0], "x": 224, "y": 45, "flags": 4}, + {"x": 216, "y": 43, "flags": 2}, + {"x": 184, "y": 50, "flags": 2}, {"matrix": [9, 2], "x": 168, "y": 47, "flags": 4}, {"matrix": [9, 3], "x": 152, "y": 58, "flags": 4}, {"x": 144, "y": 58, "flags": 2}, @@ -215,4 +215,4 @@ ] } } -} \ No newline at end of file +} From cd565a95a02509c84010974273815f8f81e9b03b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 14 Jun 2024 00:23:57 +0100 Subject: [PATCH 0037/1205] Remove suggestion of creating issues for unsupported keyboards. (#23918) --- docs/configurator_step_by_step.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/configurator_step_by_step.md b/docs/configurator_step_by_step.md index 4da9ea04a28a..d0ac268bba89 100644 --- a/docs/configurator_step_by_step.md +++ b/docs/configurator_step_by_step.md @@ -16,7 +16,9 @@ I'll say that again because it's important: **MAKE SURE YOU SELECT THE RIGHT VERSION!** ::: -If your keyboard has been advertised to be powered by QMK but is not in the list, chances are a developer hasn't gotten to it yet or we haven't had a chance to merge it in yet. File an issue at [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) requesting to support that particular keyboard, if there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) for it. There are also QMK powered keyboards that are in their manufacturer's own GitHub accounts. Double check for that as well. +Unfortunately if your keyboard has been advertised to be powered by QMK but is not in the list, you will **not** be able to use Configurator to customize your keyboard. + +Chances are a developer hasn't gotten round to adding support or we haven't had a chance to merge it in yet. If there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard), contact the manufacturer and encourage them to add support. ## Step 2: Select Your Keyboard Layout From c92becc57ed94f2106f703b7955e61ad31e0dcfa Mon Sep 17 00:00:00 2001 From: adophoxia <100170946+adophoxia@users.noreply.github.com> Date: Thu, 13 Jun 2024 21:10:23 -0700 Subject: [PATCH 0038/1205] [Keyboard] Enable dip switch for Keychron Q4 (#23889) --- keyboards/keychron/q4/info.json | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/keychron/q4/info.json b/keyboards/keychron/q4/info.json index 59f6caef923e..4b9f246b4c85 100644 --- a/keyboards/keychron/q4/info.json +++ b/keyboards/keychron/q4/info.json @@ -5,6 +5,7 @@ "bootloader": "stm32-dfu", "diode_direction": "ROW2COL", "dip_switch": { + "enabled": true, "matrix_grid": [ [4, 4] ] }, "dynamic_keymap": { From 4e8b740dd70cf79e6ade39a75442ff8f4e4e0872 Mon Sep 17 00:00:00 2001 From: Myriam Date: Fri, 14 Jun 2024 09:34:06 +0200 Subject: [PATCH 0039/1205] fix keymap for kprepublic bm60hsrgb_iso (#23733) Co-authored-by: Duncan Sutherland Co-authored-by: Ryan --- .../kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.c | 4 ++-- keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/via/keymap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.c index 52610f04d648..3b7ca14c98ef 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.c @@ -20,8 +20,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_iso_arrow( 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, - KC_LSFT, KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, + 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_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_60_iso_arrow( diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/via/keymap.c b/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/via/keymap.c index d9a22d3bacf3..4dcbb20f8449 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/via/keymap.c +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/via/keymap.c @@ -20,8 +20,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_iso_arrow( 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, - KC_LSFT, KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, + 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_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_60_iso_arrow( From 0594121b683832b3fd5161374c6b6b1d1627b5b9 Mon Sep 17 00:00:00 2001 From: ai03 Date: Fri, 14 Jun 2024 13:26:00 -0700 Subject: [PATCH 0040/1205] [Keyboard] Add Altair-X (#23879) Co-authored-by: jack <0x6a73@protonmail.com> Co-authored-by: Drashna Jaelre --- keyboards/ai03/altair_x/config.h | 12 ++ keyboards/ai03/altair_x/keyboard.json | 104 ++++++++++++++++++ .../ai03/altair_x/keymaps/default/keymap.c | 29 +++++ keyboards/ai03/altair_x/keymaps/via/keymap.c | 29 +++++ keyboards/ai03/altair_x/keymaps/via/rules.mk | 1 + keyboards/ai03/altair_x/readme.md | 19 ++++ keyboards/ai03/altair_x/rules.mk | 1 + 7 files changed, 195 insertions(+) create mode 100644 keyboards/ai03/altair_x/config.h create mode 100644 keyboards/ai03/altair_x/keyboard.json create mode 100644 keyboards/ai03/altair_x/keymaps/default/keymap.c create mode 100644 keyboards/ai03/altair_x/keymaps/via/keymap.c create mode 100644 keyboards/ai03/altair_x/keymaps/via/rules.mk create mode 100644 keyboards/ai03/altair_x/readme.md create mode 100644 keyboards/ai03/altair_x/rules.mk diff --git a/keyboards/ai03/altair_x/config.h b/keyboards/ai03/altair_x/config.h new file mode 100644 index 000000000000..c54b35498b50 --- /dev/null +++ b/keyboards/ai03/altair_x/config.h @@ -0,0 +1,12 @@ +/* Copyright 2024 ai03 Design Studio */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +/* VBUS-routed pin for upstream detection */ +#define USB_VBUS_PIN GP0 + +/* RP2040- and hardware-specific config */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/keyboards/ai03/altair_x/keyboard.json b/keyboards/ai03/altair_x/keyboard.json new file mode 100644 index 000000000000..d1448ab8c2f0 --- /dev/null +++ b/keyboards/ai03/altair_x/keyboard.json @@ -0,0 +1,104 @@ +{ + "manufacturer": "ai03 Design Studio", + "keyboard_name": "Altair-X", + "maintainer": "ai03_2725", + "bootloader": "rp2040", + "build": { + "debounce_type": "asym_eager_defer_pk" + }, + "diode_direction": "COL2ROW", + "dynamic_keymap": { + "layer_count": 6 + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["GP20", "GP19", "GP18", "GP17", "GP16", "GP21", "GP9"], + "rows": ["GP26", "GP27", "GP28", "GP10"] + }, + "processor": "RP2040", + "split": { + "bootmagic": { + "matrix": [4, 0] + }, + "enabled": true, + "handedness": { + "pin": "GP8" + }, + "matrix_pins": { + "right": { + "cols": ["GP15", "GP21", "GP9", "GP13", "GP10", "GP11", "GP12"], + "rows": ["GP16", "GP20", "GP28", "GP14"] + } + }, + "soft_serial_pin": "GP29" + }, + "url": "https://ai03.com/", + "usb": { + "device_version": "0.0.1", + "pid": "0x0023", + "vid": "0xA103" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.38}, + {"matrix": [0, 1], "x": 1, "y": 0.38}, + {"matrix": [0, 2], "x": 2, "y": 0.13}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.13}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [0, 6], "x": 6, "y": 0.5}, + {"matrix": [4, 0], "x": 7.75, "y": 0.5}, + {"matrix": [4, 1], "x": 8.75, "y": 0.25}, + {"matrix": [4, 2], "x": 9.75, "y": 0.13}, + {"matrix": [4, 3], "x": 10.75, "y": 0}, + {"matrix": [4, 4], "x": 11.75, "y": 0.13}, + {"matrix": [4, 5], "x": 12.75, "y": 0.38}, + {"matrix": [4, 6], "x": 13.75, "y": 0.38}, + {"matrix": [1, 0], "x": 0, "y": 1.38}, + {"matrix": [1, 1], "x": 1, "y": 1.38}, + {"matrix": [1, 2], "x": 2, "y": 1.13}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.13}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [5, 0], "x": 7.75, "y": 1.5}, + {"matrix": [5, 1], "x": 8.75, "y": 1.25}, + {"matrix": [5, 2], "x": 9.75, "y": 1.13}, + {"matrix": [5, 3], "x": 10.75, "y": 1}, + {"matrix": [5, 4], "x": 11.75, "y": 1.13}, + {"matrix": [5, 5], "x": 12.75, "y": 1.38}, + {"matrix": [5, 6], "x": 13.75, "y": 1.38}, + {"matrix": [2, 0], "x": 0, "y": 2.38}, + {"matrix": [2, 1], "x": 1, "y": 2.38}, + {"matrix": [2, 2], "x": 2, "y": 2.13}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.13}, + {"matrix": [2, 5], "x": 5, "y": 2.25}, + {"matrix": [2, 6], "x": 6, "y": 2.5}, + {"matrix": [6, 0], "x": 7.75, "y": 2.5}, + {"matrix": [6, 1], "x": 8.75, "y": 2.25}, + {"matrix": [6, 2], "x": 9.75, "y": 2.13}, + {"matrix": [6, 3], "x": 10.75, "y": 2}, + {"matrix": [6, 4], "x": 11.75, "y": 2.13}, + {"matrix": [6, 5], "x": 12.75, "y": 2.38}, + {"matrix": [6, 6], "x": 13.75, "y": 2.38}, + {"matrix": [3, 3], "x": 2.71, "y": 3.13}, + {"matrix": [3, 4], "x": 3.73, "y": 3.16}, + {"matrix": [3, 5], "x": 4.74, "y": 3.36}, + {"matrix": [3, 6], "x": 5.75, "y": 3.72}, + {"matrix": [7, 0], "x": 8, "y": 3.72}, + {"matrix": [7, 1], "x": 9.02, "y": 3.36}, + {"matrix": [7, 2], "x": 10.03, "y": 3.18}, + {"matrix": [7, 3], "x": 11.05, "y": 3.13} + ] + } + } +} diff --git a/keyboards/ai03/altair_x/keymaps/default/keymap.c b/keyboards/ai03/altair_x/keymaps/default/keymap.c new file mode 100644 index 000000000000..8eb350993da3 --- /dev/null +++ b/keyboards/ai03/altair_x/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2024 ai03 Design Studio */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_TAB, KC_DEL + ), + + [1] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_MINS, _______, _______, KC_EQL, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, _______, + _______, KC_TILD, _______, _______, _______, KC_UNDS, _______, _______, KC_PLUS, _______, _______, _______, KC_PIPE, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT( + _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/ai03/altair_x/keymaps/via/keymap.c b/keyboards/ai03/altair_x/keymaps/via/keymap.c new file mode 100644 index 000000000000..8eb350993da3 --- /dev/null +++ b/keyboards/ai03/altair_x/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2024 ai03 Design Studio */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_TAB, KC_DEL + ), + + [1] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_MINS, _______, _______, KC_EQL, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, _______, + _______, KC_TILD, _______, _______, _______, KC_UNDS, _______, _______, KC_PLUS, _______, _______, _______, KC_PIPE, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT( + _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/ai03/altair_x/keymaps/via/rules.mk b/keyboards/ai03/altair_x/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/ai03/altair_x/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ai03/altair_x/readme.md b/keyboards/ai03/altair_x/readme.md new file mode 100644 index 000000000000..221a46155626 --- /dev/null +++ b/keyboards/ai03/altair_x/readme.md @@ -0,0 +1,19 @@ +# Altair-X + +![altair-x](https://i.imgur.com/regfKQC.png) + +ai03's third-generation ergonomic keyboard, 4-row variant + +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +* Hardware Supported: Altair-X keyboard PCB +* Hardware Availability: Group buy + +Make example for this keyboard (after setting up your build environment): + + make ai03/altair_x:default + +Flashing example for this keyboard: + + make ai03/altair_x: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). diff --git a/keyboards/ai03/altair_x/rules.mk b/keyboards/ai03/altair_x/rules.mk new file mode 100644 index 000000000000..161ec22b16e2 --- /dev/null +++ b/keyboards/ai03/altair_x/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = vendor From aec7569a046a79d0b2483357005d662e18f729be Mon Sep 17 00:00:00 2001 From: ai03 Date: Fri, 14 Jun 2024 13:26:21 -0700 Subject: [PATCH 0041/1205] [Keyboard] Add Altair (#23878) Co-authored-by: jack <0x6a73@protonmail.com> Co-authored-by: Drashna Jaelre --- keyboards/ai03/altair/config.h | 12 ++ keyboards/ai03/altair/keyboard.json | 118 ++++++++++++++++++ .../ai03/altair/keymaps/default/keymap.c | 24 ++++ keyboards/ai03/altair/keymaps/via/keymap.c | 24 ++++ keyboards/ai03/altair/keymaps/via/rules.mk | 1 + keyboards/ai03/altair/readme.md | 19 +++ keyboards/ai03/altair/rules.mk | 1 + 7 files changed, 199 insertions(+) create mode 100644 keyboards/ai03/altair/config.h create mode 100644 keyboards/ai03/altair/keyboard.json create mode 100644 keyboards/ai03/altair/keymaps/default/keymap.c create mode 100644 keyboards/ai03/altair/keymaps/via/keymap.c create mode 100644 keyboards/ai03/altair/keymaps/via/rules.mk create mode 100644 keyboards/ai03/altair/readme.md create mode 100644 keyboards/ai03/altair/rules.mk diff --git a/keyboards/ai03/altair/config.h b/keyboards/ai03/altair/config.h new file mode 100644 index 000000000000..c54b35498b50 --- /dev/null +++ b/keyboards/ai03/altair/config.h @@ -0,0 +1,12 @@ +/* Copyright 2024 ai03 Design Studio */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +/* VBUS-routed pin for upstream detection */ +#define USB_VBUS_PIN GP0 + +/* RP2040- and hardware-specific config */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/keyboards/ai03/altair/keyboard.json b/keyboards/ai03/altair/keyboard.json new file mode 100644 index 000000000000..9626716cde37 --- /dev/null +++ b/keyboards/ai03/altair/keyboard.json @@ -0,0 +1,118 @@ +{ + "manufacturer": "ai03 Design Studio", + "keyboard_name": "Altair", + "maintainer": "ai03_2725", + "bootloader": "rp2040", + "build": { + "debounce_type": "asym_eager_defer_pk" + }, + "diode_direction": "COL2ROW", + "dynamic_keymap": { + "layer_count": 6 + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["GP20", "GP19", "GP18", "GP17", "GP16", "GP21", "GP9"], + "rows": ["GP11", "GP26", "GP27", "GP28", "GP10"] + }, + "processor": "RP2040", + "split": { + "bootmagic": { + "matrix": [5, 0] + }, + "enabled": true, + "handedness": { + "pin": "GP8" + }, + "matrix_pins": { + "right": { + "cols": ["GP15", "GP21", "GP9", "GP13", "GP10", "GP11", "GP12"], + "rows": ["GP5", "GP16", "GP20", "GP28", "GP14"] + } + }, + "soft_serial_pin": "GP29" + }, + "url": "https://ai03.com/", + "usb": { + "device_version": "0.0.1", + "pid": "0x0022", + "vid": "0xA103" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.38}, + {"matrix": [0, 1], "x": 1, "y": 0.38}, + {"matrix": [0, 2], "x": 2, "y": 0.13}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.13}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [0, 6], "x": 6, "y": 0.5}, + {"matrix": [5, 0], "x": 7.75, "y": 0.5}, + {"matrix": [5, 1], "x": 8.75, "y": 0.25}, + {"matrix": [5, 2], "x": 9.75, "y": 0.13}, + {"matrix": [5, 3], "x": 10.75, "y": 0}, + {"matrix": [5, 4], "x": 11.75, "y": 0.13}, + {"matrix": [5, 5], "x": 12.75, "y": 0.38}, + {"matrix": [5, 6], "x": 13.75, "y": 0.38}, + {"matrix": [1, 0], "x": 0, "y": 1.38}, + {"matrix": [1, 1], "x": 1, "y": 1.38}, + {"matrix": [1, 2], "x": 2, "y": 1.13}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.13}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [6, 0], "x": 7.75, "y": 1.5}, + {"matrix": [6, 1], "x": 8.75, "y": 1.25}, + {"matrix": [6, 2], "x": 9.75, "y": 1.13}, + {"matrix": [6, 3], "x": 10.75, "y": 1}, + {"matrix": [6, 4], "x": 11.75, "y": 1.13}, + {"matrix": [6, 5], "x": 12.75, "y": 1.38}, + {"matrix": [6, 6], "x": 13.75, "y": 1.38}, + {"matrix": [2, 0], "x": 0, "y": 2.38}, + {"matrix": [2, 1], "x": 1, "y": 2.38}, + {"matrix": [2, 2], "x": 2, "y": 2.13}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.13}, + {"matrix": [2, 5], "x": 5, "y": 2.25}, + {"matrix": [2, 6], "x": 6, "y": 2.5}, + {"matrix": [7, 0], "x": 7.75, "y": 2.5}, + {"matrix": [7, 1], "x": 8.75, "y": 2.25}, + {"matrix": [7, 2], "x": 9.75, "y": 2.13}, + {"matrix": [7, 3], "x": 10.75, "y": 2}, + {"matrix": [7, 4], "x": 11.75, "y": 2.13}, + {"matrix": [7, 5], "x": 12.75, "y": 2.38}, + {"matrix": [7, 6], "x": 13.75, "y": 2.38}, + {"matrix": [3, 0], "x": 0, "y": 3.38}, + {"matrix": [3, 1], "x": 1, "y": 3.38}, + {"matrix": [3, 2], "x": 2, "y": 3.13}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3.13}, + {"matrix": [3, 5], "x": 5, "y": 3.25}, + {"matrix": [3, 6], "x": 6, "y": 3.5}, + {"matrix": [8, 0], "x": 7.75, "y": 3.5}, + {"matrix": [8, 1], "x": 8.75, "y": 3.25}, + {"matrix": [8, 2], "x": 9.75, "y": 3.13}, + {"matrix": [8, 3], "x": 10.75, "y": 3}, + {"matrix": [8, 4], "x": 11.75, "y": 3.13}, + {"matrix": [8, 5], "x": 12.75, "y": 3.38}, + {"matrix": [8, 6], "x": 13.75, "y": 3.38}, + {"matrix": [4, 3], "x": 2.71, "y": 4.13}, + {"matrix": [4, 4], "x": 3.73, "y": 4.16}, + {"matrix": [4, 5], "x": 4.74, "y": 4.36}, + {"matrix": [4, 6], "x": 5.75, "y": 4.72}, + {"matrix": [9, 0], "x": 8, "y": 4.72}, + {"matrix": [9, 1], "x": 9.02, "y": 4.36}, + {"matrix": [9, 2], "x": 10.03, "y": 4.18}, + {"matrix": [9, 3], "x": 11.05, "y": 4.13} + ] + } + } +} diff --git a/keyboards/ai03/altair/keymaps/default/keymap.c b/keyboards/ai03/altair/keymaps/default/keymap.c new file mode 100644 index 000000000000..038b2b823dd6 --- /dev/null +++ b/keyboards/ai03/altair/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +/* Copyright 2024 ai03 Design Studio */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_CAPS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(1), KC_TAB, KC_DEL + ), + + [1] = LAYOUT( + _______, 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_PGUP, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/ai03/altair/keymaps/via/keymap.c b/keyboards/ai03/altair/keymaps/via/keymap.c new file mode 100644 index 000000000000..038b2b823dd6 --- /dev/null +++ b/keyboards/ai03/altair/keymaps/via/keymap.c @@ -0,0 +1,24 @@ +/* Copyright 2024 ai03 Design Studio */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_CAPS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(1), KC_TAB, KC_DEL + ), + + [1] = LAYOUT( + _______, 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_PGUP, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/ai03/altair/keymaps/via/rules.mk b/keyboards/ai03/altair/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/ai03/altair/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ai03/altair/readme.md b/keyboards/ai03/altair/readme.md new file mode 100644 index 000000000000..959759d94549 --- /dev/null +++ b/keyboards/ai03/altair/readme.md @@ -0,0 +1,19 @@ +# Altair + +![altair](https://i.imgur.com/O9UXaCO.png) + +ai03's third-generation ergonomic keyboard, 5-row variant + +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +* Hardware Supported: Altair keyboard PCB +* Hardware Availability: Group buy + +Make example for this keyboard (after setting up your build environment): + + make ai03/altair:default + +Flashing example for this keyboard: + + make ai03/altair: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). diff --git a/keyboards/ai03/altair/rules.mk b/keyboards/ai03/altair/rules.mk new file mode 100644 index 000000000000..161ec22b16e2 --- /dev/null +++ b/keyboards/ai03/altair/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = vendor From d4654ab8934f795bbfc294f5b128a94aaa645a78 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 15 Jun 2024 07:58:13 +1000 Subject: [PATCH 0042/1205] Various keyboard fixes (#23919) --- .../eason/meow65/{info.json => keyboard.json} | 0 keyboards/eason/meow65/rules.mk | 1 - .../marek128b/ergosplit44/keyboard.json | 94 ++++++------ .../rev3_4rows/{info.json => keyboard.json} | 0 .../rev3_5rows/{info.json => keyboard.json} | 0 .../irispad/rev8/{info.json => keyboard.json} | 0 keyboards/meetlab/kalice/keyboard.json | 142 +++++++++--------- .../moky/moky67/{info.json => keyboard.json} | 0 keyboards/moky/moky67/rules.mk | 1 - .../75/iso/{info.json => keyboard.json} | 0 keyboards/projectd/75/iso/rules.mk | 1 - .../h4ckb0ard/{info.json => keyboard.json} | 0 keyboards/rot13labs/h4ckb0ard/rules.mk | 1 - .../sleepy_keeb/{info.json => keyboard.json} | 0 .../sleepy_craft_studios/sleepy_keeb/rules.mk | 1 - .../smart68/{info.json => keyboard.json} | 0 keyboards/smart68/rules.mk | 1 - .../cycle7/{info.json => keyboard.json} | 0 keyboards/vertex/cycle7/rules.mk | 1 - .../{info.json => keyboard.json} | 0 keyboards/viktus/tx_roundup_pad/rules.mk | 1 - 21 files changed, 118 insertions(+), 126 deletions(-) rename keyboards/eason/meow65/{info.json => keyboard.json} (100%) delete mode 100644 keyboards/eason/meow65/rules.mk rename keyboards/helix/rev3_4rows/{info.json => keyboard.json} (100%) rename keyboards/helix/rev3_5rows/{info.json => keyboard.json} (100%) rename keyboards/keebio/irispad/rev8/{info.json => keyboard.json} (100%) rename keyboards/moky/moky67/{info.json => keyboard.json} (100%) delete mode 100644 keyboards/moky/moky67/rules.mk rename keyboards/projectd/75/iso/{info.json => keyboard.json} (100%) delete mode 100644 keyboards/projectd/75/iso/rules.mk rename keyboards/rot13labs/h4ckb0ard/{info.json => keyboard.json} (100%) delete mode 100644 keyboards/rot13labs/h4ckb0ard/rules.mk rename keyboards/sleepy_craft_studios/sleepy_keeb/{info.json => keyboard.json} (100%) delete mode 100644 keyboards/sleepy_craft_studios/sleepy_keeb/rules.mk rename keyboards/smart68/{info.json => keyboard.json} (100%) delete mode 100644 keyboards/smart68/rules.mk rename keyboards/vertex/cycle7/{info.json => keyboard.json} (100%) delete mode 100644 keyboards/vertex/cycle7/rules.mk rename keyboards/viktus/tx_roundup_pad/{info.json => keyboard.json} (100%) delete mode 100644 keyboards/viktus/tx_roundup_pad/rules.mk diff --git a/keyboards/eason/meow65/info.json b/keyboards/eason/meow65/keyboard.json similarity index 100% rename from keyboards/eason/meow65/info.json rename to keyboards/eason/meow65/keyboard.json diff --git a/keyboards/eason/meow65/rules.mk b/keyboards/eason/meow65/rules.mk deleted file mode 100644 index 6e7633bfe015..000000000000 --- a/keyboards/eason/meow65/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank diff --git a/keyboards/handwired/marek128b/ergosplit44/keyboard.json b/keyboards/handwired/marek128b/ergosplit44/keyboard.json index 8e0c71fc06f4..f9a88576a7dc 100644 --- a/keyboards/handwired/marek128b/ergosplit44/keyboard.json +++ b/keyboards/handwired/marek128b/ergosplit44/keyboard.json @@ -107,57 +107,57 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"tab", "matrix": [0, 0],"x":0, "y":1.25}, - {"label":"Q", "matrix": [0, 1],"x":1, "y":1.25}, - {"label":"W", "matrix": [0, 2],"x":2, "y":0.75}, - {"label":"E", "matrix": [0, 3],"x":3, "y":0.5}, - {"label":"R", "matrix": [0, 4],"x":4, "y":0.75}, - {"label":"T", "matrix": [0, 5],"x":5, "y":1}, - - {"label":"Y", "matrix": [0, 6],"x":9.75, "y":1}, - {"label":"U", "matrix": [0, 7],"x":10.75, "y":0.75}, - {"label":"I", "matrix": [0, 8],"x":11.75, "y":0.5}, - {"label":"O", "matrix": [0, 9],"x":12.75, "y":0.75}, - {"label":"P", "matrix": [0, 10],"x":13.75, "y":1.25}, - {"label":"\u00dc", "matrix": [0, 11],"x":14.75, "y":1.25}, + {"matrix": [0, 0],"x": 0, "y": 0.75}, + {"matrix": [0, 1],"x": 1, "y": 0.75}, + {"matrix": [0, 2],"x": 2, "y": 0.25}, + {"matrix": [0, 3],"x": 3, "y": 0}, + {"matrix": [0, 4],"x": 4, "y": 0.25}, + {"matrix": [0, 5],"x": 5, "y": 0.5}, - {"label":"back-space", "matrix": [1, 0],"x":0, "y":2.25}, - {"label":"A", "matrix": [1, 1],"x":1, "y":2.25}, - {"label":"S", "matrix": [1, 2],"x":2, "y":1.75}, - {"label":"D", "matrix": [1, 3],"x":3, "y":1.5}, - {"label":"F", "matrix": [1, 4],"x":4, "y":1.75}, - {"label":"G", "matrix": [1, 5],"x":5, "y":2}, + {"matrix": [0, 6],"x": 8, "y": 0.5}, + {"matrix": [0, 7],"x": 9, "y": 0.25}, + {"matrix": [0, 8],"x": 10, "y": 0}, + {"matrix": [0, 9],"x": 11, "y": 0.25}, + {"matrix": [0, 10],"x": 12, "y": 0.75}, + {"matrix": [0, 11],"x": 13, "y": 0.75}, - {"label":"H", "matrix": [1, 6],"x":9.75, "y":2}, - {"label":"J", "matrix": [1, 7],"x":10.75, "y":1.75}, - {"label":"K", "matrix": [1, 8],"x":11.75, "y":1.5}, - {"label":"L", "matrix": [1, 9],"x":12.75, "y":1.75}, - {"label":"\u00d6", "matrix": [1, 10],"x":13.75, "y":2.25}, - {"label":"\u00c4", "matrix": [1, 11],"x":14.75, "y":2.25}, - - {"label":"shift", "matrix": [2, 0],"x":0, "y":3.25}, - {"label":"Z", "matrix": [2, 1],"x":1, "y":3.25}, - {"label":"X", "matrix": [2, 2],"x":2, "y":2.75}, - {"label":"C", "matrix": [2, 3],"x":3, "y":2.5}, - {"label":"V", "matrix": [2, 4],"x":4, "y":2.75}, - {"label":"B", "matrix": [2, 5],"x":5, "y":3}, - - {"label":"N", "matrix": [2, 6],"x":9.75, "y":3}, - {"label":"M", "matrix": [2, 7],"x":10.75, "y":2.75}, - {"label":"<", "matrix": [2, 8],"x":11.75, "y":2.5}, - {"label":":", "matrix": [2, 9],"x":12.75, "y":2.75}, - {"label":"_", "matrix": [2, 10],"x":13.75, "y":3.25}, - {"label":"Shift", "matrix": [2, 11],"x":14.75, "y":3.25}, + {"matrix": [1, 0],"x": 0, "y": 1.75}, + {"matrix": [1, 1],"x": 1, "y": 1.75}, + {"matrix": [1, 2],"x": 2, "y": 1.25}, + {"matrix": [1, 3],"x": 3, "y": 1}, + {"matrix": [1, 4],"x": 4, "y": 1.25}, + {"matrix": [1, 5],"x": 5, "y": 1.5}, - {"label":"L2", "matrix": [3, 2],"x":-3.5, "y":4.5}, - {"label":"Alt", "matrix": [3, 3],"x":-2.25, "y":7.25}, - {"label":"Strg", "matrix": [3, 4],"x":-1.0, "y":7.25}, - {"label":"Space", "matrix": [3, 5],"x":0, "y":7}, + {"matrix": [1, 6],"x": 8, "y": 1.5}, + {"matrix": [1, 7],"x": 9, "y": 1.25}, + {"matrix": [1, 8],"x": 10, "y": 1}, + {"matrix": [1, 9],"x": 11, "y": 1.25}, + {"matrix": [1, 10],"x": 12, "y": 1.75}, + {"matrix": [1, 11],"x": 13, "y": 1.75}, - {"label":"Space", "matrix": [3, 6],"x":-1.0, "y":8.5}, - {"label":"Strg", "matrix": [3, 7],"x":0, "y":8.75}, - {"label":"AltGr", "matrix": [3, 8],"x":1.25, "y":8.75}, - {"label":"L1", "matrix": [3, 9],"x":2.5, "y":5.75} + {"matrix": [2, 0],"x": 0, "y": 2.75}, + {"matrix": [2, 1],"x": 1, "y": 2.75}, + {"matrix": [2, 2],"x": 2, "y": 2.25}, + {"matrix": [2, 3],"x": 3, "y": 2}, + {"matrix": [2, 4],"x": 4, "y": 2.25}, + {"matrix": [2, 5],"x": 5, "y": 2.5}, + + {"matrix": [2, 6],"x": 8, "y": 2.5}, + {"matrix": [2, 7],"x": 9, "y": 2.25}, + {"matrix": [2, 8],"x": 10, "y": 2}, + {"matrix": [2, 9],"x": 11, "y": 2.25}, + {"matrix": [2, 10],"x": 12, "y": 2.75}, + {"matrix": [2, 11],"x": 13, "y": 2.75}, + + {"matrix": [3, 2],"x": 2.5, "y": 4}, + {"matrix": [3, 3],"x": 3.5, "y": 4}, + {"matrix": [3, 4],"x": 4.5, "y": 4}, + {"matrix": [3, 5],"x": 5.5, "y": 4}, + + {"matrix": [3, 6],"x": 7.5, "y": 4}, + {"matrix": [3, 7],"x": 8.5, "y": 4}, + {"matrix": [3, 8],"x": 9.5, "y": 4}, + {"matrix": [3, 9],"x": 10.5, "y": 4} ] } } diff --git a/keyboards/helix/rev3_4rows/info.json b/keyboards/helix/rev3_4rows/keyboard.json similarity index 100% rename from keyboards/helix/rev3_4rows/info.json rename to keyboards/helix/rev3_4rows/keyboard.json diff --git a/keyboards/helix/rev3_5rows/info.json b/keyboards/helix/rev3_5rows/keyboard.json similarity index 100% rename from keyboards/helix/rev3_5rows/info.json rename to keyboards/helix/rev3_5rows/keyboard.json diff --git a/keyboards/keebio/irispad/rev8/info.json b/keyboards/keebio/irispad/rev8/keyboard.json similarity index 100% rename from keyboards/keebio/irispad/rev8/info.json rename to keyboards/keebio/irispad/rev8/keyboard.json diff --git a/keyboards/meetlab/kalice/keyboard.json b/keyboards/meetlab/kalice/keyboard.json index 5cb46eb9cf55..5e53fe49049b 100644 --- a/keyboards/meetlab/kalice/keyboard.json +++ b/keyboards/meetlab/kalice/keyboard.json @@ -44,77 +44,77 @@ "layouts": { "LAYOUT": { "layout": [ - {"matrix": [0, 0], "x": 0.45, "y": 0}, - {"matrix": [0, 1], "x": 1.75, "y": 0}, - {"matrix": [0, 2], "x": 2.75, "y": 0}, - {"matrix": [0, 3], "x": 3.75, "y": 0}, - {"matrix": [0, 4], "x": 4.75, "y": 0}, - {"matrix": [0, 5], "x": 5.75, "y": 0}, - {"matrix": [0, 6], "x": 6.75, "y": 0}, - {"matrix": [0, 7], "x": 7.75, "y": 0}, - {"matrix": [0, 8], "x": 8.75, "y": 0}, - {"matrix": [0, 9], "x": 9.75, "y": 0}, - {"matrix": [0, 10], "x": 10.75, "y": 0}, - {"matrix": [0, 11], "x": 11.75, "y": 0}, - {"matrix": [0, 12], "x": 12.75, "y": 0}, - {"matrix": [0, 13], "x": 13.75, "y": 0}, - {"matrix": [0, 14], "x": 14.75, "y": 0, "w": 2}, - {"matrix": [0, 15], "x": 16.75, "y": 0}, - {"matrix": [1, 0], "x": 0.3, "y": 1}, - {"matrix": [1, 1], "x": 1.5, "y": 1, "w": 1.5}, - {"matrix": [1, 2], "x": 3, "y": 1}, - {"matrix": [1, 3], "x": 4, "y": 1}, - {"matrix": [1, 4], "x": 5, "y": 1}, - {"matrix": [1, 5], "x": 6, "y": 1}, - {"matrix": [1, 6], "x": 7, "y": 1}, - {"matrix": [1, 7], "x": 8, "y": 1}, - {"matrix": [1, 8], "x": 9, "y": 1}, - {"matrix": [1, 9], "x": 10, "y": 1}, - {"matrix": [1, 10], "x": 11, "y": 1}, - {"matrix": [1, 11], "x": 12, "y": 1}, - {"matrix": [1, 12], "x": 13, "y": 1}, - {"matrix": [1, 13], "x": 14, "y": 1}, - {"matrix": [1, 14], "x": 15, "y": 1, "w": 1.5}, - {"matrix": [1, 15], "x": 16.5, "y": 1}, - {"matrix": [2, 0], "x": 0.15, "y": 2}, - {"matrix": [2, 1], "x": 1.4, "y": 2, "w": 1.75}, - {"matrix": [2, 2], "x": 3.15, "y": 2}, - {"matrix": [2, 3], "x": 4.15, "y": 2}, - {"matrix": [2, 4], "x": 5.15, "y": 2}, - {"matrix": [2, 5], "x": 6.15, "y": 2}, - {"matrix": [2, 6], "x": 7.15, "y": 2}, - {"matrix": [2, 7], "x": 8.15, "y": 2}, - {"matrix": [2, 8], "x": 9.15, "y": 2}, - {"matrix": [2, 9], "x": 10.15, "y": 2}, - {"matrix": [2, 10], "x": 11.15, "y": 2}, - {"matrix": [2, 11], "x": 12.15, "y": 2}, - {"matrix": [2, 12], "x": 13.15, "y": 2}, - {"matrix": [2, 13], "x": 14.15, "y": 2, "w": 2.25}, - {"matrix": [2, 15], "x": 16.4, "y": 2}, - {"matrix": [3, 1], "x": 1.25, "y": 3, "w": 2.25}, - {"matrix": [3, 2], "x": 3.5, "y": 3}, - {"matrix": [3, 3], "x": 4.5, "y": 3}, - {"matrix": [3, 4], "x": 5.5, "y": 3}, - {"matrix": [3, 5], "x": 6.5, "y": 3}, - {"matrix": [3, 6], "x": 7.5, "y": 3}, - {"matrix": [3, 7], "x": 8.5, "y": 3}, - {"matrix": [3, 8], "x": 9.5, "y": 3}, - {"matrix": [3, 9], "x": 10.5, "y": 3}, - {"matrix": [3, 10], "x": 11.5, "y": 3}, - {"matrix": [3, 11], "x": 12.5, "y": 3}, - {"matrix": [3, 12], "x": 13.5, "y": 3}, - {"matrix": [3, 13], "x": 14.5, "y": 3, "w": 1.75}, - {"matrix": [3, 14], "x": 16.25, "y": 3}, - {"matrix": [4, 0], "x": 1.25, "y": 4, "w": 1.25}, - {"matrix": [4, 1], "x": 2.5, "y": 4, "w": 1.25}, - {"matrix": [4, 2], "x": 3.75, "y": 4, "w": 1.5}, - {"matrix": [4, 3], "x": 5.25, "y": 4, "w": 2.25}, - {"matrix": [4, 10], "x": 7.5, "y": 4, "w": 2.75}, - {"matrix": [4, 11], "x": 10.25, "y": 4, "w": 1.5}, - {"matrix": [4, 12], "x": 14, "y": 4, "w": 1.25}, - {"matrix": [4, 13], "x": 15.25, "y": 4}, - {"matrix": [4, 14], "x": 16.25, "y": 4}, - {"matrix": [4, 15], "x": 17.25, "y": 4} + {"matrix": [0, 0], "x": 0.3, "y": 0}, + {"matrix": [0, 1], "x": 1.6, "y": 0}, + {"matrix": [0, 2], "x": 2.6, "y": 0}, + {"matrix": [0, 3], "x": 3.6, "y": 0}, + {"matrix": [0, 4], "x": 4.6, "y": 0}, + {"matrix": [0, 5], "x": 5.6, "y": 0}, + {"matrix": [0, 6], "x": 6.6, "y": 0}, + {"matrix": [0, 7], "x": 7.6, "y": 0}, + {"matrix": [0, 8], "x": 8.6, "y": 0}, + {"matrix": [0, 9], "x": 9.6, "y": 0}, + {"matrix": [0, 10], "x": 10.6, "y": 0}, + {"matrix": [0, 11], "x": 11.6, "y": 0}, + {"matrix": [0, 12], "x": 12.6, "y": 0}, + {"matrix": [0, 13], "x": 13.6, "y": 0}, + {"matrix": [0, 14], "x": 14.6, "y": 0, "w": 2}, + {"matrix": [0, 15], "x": 16.6, "y": 0}, + {"matrix": [1, 0], "x": 0.15, "y": 1}, + {"matrix": [1, 1], "x": 1.35, "y": 1, "w": 1.5}, + {"matrix": [1, 2], "x": 2.85, "y": 1}, + {"matrix": [1, 3], "x": 3.85, "y": 1}, + {"matrix": [1, 4], "x": 4.85, "y": 1}, + {"matrix": [1, 5], "x": 5.85, "y": 1}, + {"matrix": [1, 6], "x": 6.85, "y": 1}, + {"matrix": [1, 7], "x": 7.85, "y": 1}, + {"matrix": [1, 8], "x": 8.85, "y": 1}, + {"matrix": [1, 9], "x": 9.85, "y": 1}, + {"matrix": [1, 10], "x": 10.85, "y": 1}, + {"matrix": [1, 11], "x": 11.85, "y": 1}, + {"matrix": [1, 12], "x": 12.85, "y": 1}, + {"matrix": [1, 13], "x": 13.85, "y": 1}, + {"matrix": [1, 14], "x": 14.85, "y": 1, "w": 1.5}, + {"matrix": [1, 15], "x": 16.35, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1.25, "y": 2, "w": 1.75}, + {"matrix": [2, 2], "x": 3, "y": 2}, + {"matrix": [2, 3], "x": 4, "y": 2}, + {"matrix": [2, 4], "x": 5, "y": 2}, + {"matrix": [2, 5], "x": 6, "y": 2}, + {"matrix": [2, 6], "x": 7, "y": 2}, + {"matrix": [2, 7], "x": 8, "y": 2}, + {"matrix": [2, 8], "x": 9, "y": 2}, + {"matrix": [2, 9], "x": 10, "y": 2}, + {"matrix": [2, 10], "x": 11, "y": 2}, + {"matrix": [2, 11], "x": 12, "y": 2}, + {"matrix": [2, 12], "x": 13, "y": 2}, + {"matrix": [2, 13], "x": 14, "y": 2, "w": 2.25}, + {"matrix": [2, 15], "x": 16.25, "y": 2}, + {"matrix": [3, 1], "x": 1.1, "y": 3, "w": 2.25}, + {"matrix": [3, 2], "x": 3.35, "y": 3}, + {"matrix": [3, 3], "x": 4.35, "y": 3}, + {"matrix": [3, 4], "x": 5.35, "y": 3}, + {"matrix": [3, 5], "x": 6.35, "y": 3}, + {"matrix": [3, 6], "x": 7.35, "y": 3}, + {"matrix": [3, 7], "x": 8.35, "y": 3}, + {"matrix": [3, 8], "x": 9.35, "y": 3}, + {"matrix": [3, 9], "x": 10.35, "y": 3}, + {"matrix": [3, 10], "x": 11.35, "y": 3}, + {"matrix": [3, 11], "x": 12.35, "y": 3}, + {"matrix": [3, 12], "x": 13.35, "y": 3}, + {"matrix": [3, 13], "x": 14.35, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 16.1, "y": 3}, + {"matrix": [4, 0], "x": 1.1, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 2.35, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 3.6, "y": 4, "w": 1.5}, + {"matrix": [4, 3], "x": 5.1, "y": 4, "w": 2.25}, + {"matrix": [4, 10], "x": 7.35, "y": 4, "w": 2.75}, + {"matrix": [4, 11], "x": 10.1, "y": 4, "w": 1.5}, + {"matrix": [4, 12], "x": 13.85, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 15.1, "y": 4}, + {"matrix": [4, 14], "x": 16.1, "y": 4}, + {"matrix": [4, 15], "x": 17.1, "y": 4} ] } } diff --git a/keyboards/moky/moky67/info.json b/keyboards/moky/moky67/keyboard.json similarity index 100% rename from keyboards/moky/moky67/info.json rename to keyboards/moky/moky67/keyboard.json diff --git a/keyboards/moky/moky67/rules.mk b/keyboards/moky/moky67/rules.mk deleted file mode 100644 index 7ff128fa692e..000000000000 --- a/keyboards/moky/moky67/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank \ No newline at end of file diff --git a/keyboards/projectd/75/iso/info.json b/keyboards/projectd/75/iso/keyboard.json similarity index 100% rename from keyboards/projectd/75/iso/info.json rename to keyboards/projectd/75/iso/keyboard.json diff --git a/keyboards/projectd/75/iso/rules.mk b/keyboards/projectd/75/iso/rules.mk deleted file mode 100644 index 6e7633bfe015..000000000000 --- a/keyboards/projectd/75/iso/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank diff --git a/keyboards/rot13labs/h4ckb0ard/info.json b/keyboards/rot13labs/h4ckb0ard/keyboard.json similarity index 100% rename from keyboards/rot13labs/h4ckb0ard/info.json rename to keyboards/rot13labs/h4ckb0ard/keyboard.json diff --git a/keyboards/rot13labs/h4ckb0ard/rules.mk b/keyboards/rot13labs/h4ckb0ard/rules.mk deleted file mode 100644 index 7ff128fa692e..000000000000 --- a/keyboards/rot13labs/h4ckb0ard/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank \ No newline at end of file diff --git a/keyboards/sleepy_craft_studios/sleepy_keeb/info.json b/keyboards/sleepy_craft_studios/sleepy_keeb/keyboard.json similarity index 100% rename from keyboards/sleepy_craft_studios/sleepy_keeb/info.json rename to keyboards/sleepy_craft_studios/sleepy_keeb/keyboard.json diff --git a/keyboards/sleepy_craft_studios/sleepy_keeb/rules.mk b/keyboards/sleepy_craft_studios/sleepy_keeb/rules.mk deleted file mode 100644 index 6e7633bfe015..000000000000 --- a/keyboards/sleepy_craft_studios/sleepy_keeb/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank diff --git a/keyboards/smart68/info.json b/keyboards/smart68/keyboard.json similarity index 100% rename from keyboards/smart68/info.json rename to keyboards/smart68/keyboard.json diff --git a/keyboards/smart68/rules.mk b/keyboards/smart68/rules.mk deleted file mode 100644 index 6e7633bfe015..000000000000 --- a/keyboards/smart68/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank diff --git a/keyboards/vertex/cycle7/info.json b/keyboards/vertex/cycle7/keyboard.json similarity index 100% rename from keyboards/vertex/cycle7/info.json rename to keyboards/vertex/cycle7/keyboard.json diff --git a/keyboards/vertex/cycle7/rules.mk b/keyboards/vertex/cycle7/rules.mk deleted file mode 100644 index 6e7633bfe015..000000000000 --- a/keyboards/vertex/cycle7/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank diff --git a/keyboards/viktus/tx_roundup_pad/info.json b/keyboards/viktus/tx_roundup_pad/keyboard.json similarity index 100% rename from keyboards/viktus/tx_roundup_pad/info.json rename to keyboards/viktus/tx_roundup_pad/keyboard.json diff --git a/keyboards/viktus/tx_roundup_pad/rules.mk b/keyboards/viktus/tx_roundup_pad/rules.mk deleted file mode 100644 index 6e7633bfe015..000000000000 --- a/keyboards/viktus/tx_roundup_pad/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank From 0262161914133e6abfc306e675dbac3ba816a6ee Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 15 Jun 2024 19:37:47 +1000 Subject: [PATCH 0043/1205] [CLI] Don't `exit()` when certain exceptions occur. (#23442) --- lib/python/qmk/cli/find.py | 3 +++ .../qmk/cli/generate/autocorrect_data.py | 12 +++++------ lib/python/qmk/cli/mass_compile.py | 3 +++ lib/python/qmk/cli/userspace/compile.py | 3 +++ lib/python/qmk/cli/userspace/list.py | 3 +++ lib/python/qmk/cli/via2json.py | 10 +++++++-- lib/python/qmk/commands.py | 3 ++- lib/python/qmk/info.py | 3 ++- lib/python/qmk/json_schema.py | 6 ++++-- lib/python/qmk/util.py | 21 +++++++++++++++++++ 10 files changed, 55 insertions(+), 12 deletions(-) diff --git a/lib/python/qmk/cli/find.py b/lib/python/qmk/cli/find.py index 8f3a29c90ce4..bfed91e22cdb 100644 --- a/lib/python/qmk/cli/find.py +++ b/lib/python/qmk/cli/find.py @@ -2,6 +2,7 @@ """ from milc import cli from qmk.search import filter_help, search_keymap_targets +from qmk.util import maybe_exit_config @cli.argument( @@ -19,6 +20,8 @@ def find(cli): """Search through all keyboards and keymaps for a given search criteria. """ + maybe_exit_config(should_exit=False, should_reraise=True) + targets = search_keymap_targets([('all', cli.config.find.keymap)], cli.args.filter) for target in sorted(targets, key=lambda t: (t.keyboard, t.keymap)): print(f'{target}') diff --git a/lib/python/qmk/cli/generate/autocorrect_data.py b/lib/python/qmk/cli/generate/autocorrect_data.py index b11c66d95d21..01a29b46fe99 100644 --- a/lib/python/qmk/cli/generate/autocorrect_data.py +++ b/lib/python/qmk/cli/generate/autocorrect_data.py @@ -27,7 +27,6 @@ For full documentation, see QMK Docs """ -import sys import textwrap from typing import Any, Dict, Iterator, List, Tuple @@ -38,6 +37,7 @@ from qmk.keyboard import keyboard_completer, keyboard_folder from qmk.keymap import keymap_completer, locate_keymap from qmk.path import normpath +from qmk.util import maybe_exit KC_A = 4 KC_SPC = 0x2c @@ -88,16 +88,16 @@ def parse_file(file_name: str) -> List[Tuple[str, str]]: # Check that `typo` is valid. if not (all([c in TYPO_CHARS for c in typo])): cli.log.error('{fg_red}Error:%d:{fg_reset} Typo "{fg_cyan}%s{fg_reset}" has characters other than a-z, \' and :.', line_number, typo) - sys.exit(1) + maybe_exit(1) for other_typo in typos: if typo in other_typo or other_typo in typo: cli.log.error('{fg_red}Error:%d:{fg_reset} Typos may not be substrings of one another, otherwise the longer typo would never trigger: "{fg_cyan}%s{fg_reset}" vs. "{fg_cyan}%s{fg_reset}".', line_number, typo, other_typo) - sys.exit(1) + maybe_exit(1) if len(typo) < 5: cli.log.warning('{fg_yellow}Warning:%d:{fg_reset} It is suggested that typos are at least 5 characters long to avoid false triggers: "{fg_cyan}%s{fg_reset}"', line_number, typo) if len(typo) > 127: cli.log.error('{fg_red}Error:%d:{fg_reset} Typo exceeds 127 chars: "{fg_cyan}%s{fg_reset}"', line_number, typo) - sys.exit(1) + maybe_exit(1) check_typo_against_dictionary(typo, line_number, correct_words) @@ -136,7 +136,7 @@ def parse_file_lines(file_name: str) -> Iterator[Tuple[int, str, str]]: tokens = [token.strip() for token in line.split('->', 1)] if len(tokens) != 2 or not tokens[0]: print(f'Error:{line_number}: Invalid syntax: "{line}"') - sys.exit(1) + maybe_exit(1) typo, correction = tokens typo = typo.lower() # Force typos to lowercase. @@ -237,7 +237,7 @@ def encode_link(link: Dict[str, Any]) -> List[int]: byte_offset = link['byte_offset'] if not (0 <= byte_offset <= 0xffff): cli.log.error('{fg_red}Error:{fg_reset} The autocorrection table is too large, a node link exceeds 64KB limit. Try reducing the autocorrection dict to fewer entries.') - sys.exit(1) + maybe_exit(1) return [byte_offset & 255, byte_offset >> 8] diff --git a/lib/python/qmk/cli/mass_compile.py b/lib/python/qmk/cli/mass_compile.py index 7db704d6c257..d13afc614329 100755 --- a/lib/python/qmk/cli/mass_compile.py +++ b/lib/python/qmk/cli/mass_compile.py @@ -12,6 +12,7 @@ from qmk.commands import find_make, get_make_parallel_args, build_environment from qmk.search import search_keymap_targets, search_make_targets from qmk.build_targets import BuildTarget, JsonKeymapBuildTarget +from qmk.util import maybe_exit_config def mass_compile_targets(targets: List[BuildTarget], clean: bool, dry_run: bool, no_temp: bool, parallel: int, **env): @@ -100,6 +101,8 @@ def mass_compile_targets(targets: List[BuildTarget], clean: bool, dry_run: bool, def mass_compile(cli): """Compile QMK Firmware against all keyboards. """ + maybe_exit_config(should_exit=False, should_reraise=True) + if len(cli.args.builds) > 0: json_like_targets = list([Path(p) for p in filter(lambda e: Path(e).exists() and Path(e).suffix == '.json', cli.args.builds)]) make_like_targets = list(filter(lambda e: Path(e) not in json_like_targets, cli.args.builds)) diff --git a/lib/python/qmk/cli/userspace/compile.py b/lib/python/qmk/cli/userspace/compile.py index fb320a16f0d6..e8cdf6cd9716 100644 --- a/lib/python/qmk/cli/userspace/compile.py +++ b/lib/python/qmk/cli/userspace/compile.py @@ -9,6 +9,7 @@ from qmk.build_targets import JsonKeymapBuildTarget from qmk.search import search_keymap_targets from qmk.cli.mass_compile import mass_compile_targets +from qmk.util import maybe_exit_config @cli.argument('-t', '--no-temp', arg_only=True, action='store_true', help="Remove temporary files during build.") @@ -22,6 +23,8 @@ def userspace_compile(cli): cli.log.error('Could not determine QMK userspace location. Please run `qmk doctor` or `qmk userspace-doctor` to diagnose.') return False + maybe_exit_config(should_exit=False, should_reraise=True) + userspace = UserspaceDefs(QMK_USERSPACE / 'qmk.json') build_targets = [] diff --git a/lib/python/qmk/cli/userspace/list.py b/lib/python/qmk/cli/userspace/list.py index a63f669dd7b8..8689c80a7696 100644 --- a/lib/python/qmk/cli/userspace/list.py +++ b/lib/python/qmk/cli/userspace/list.py @@ -10,6 +10,7 @@ from qmk.keyboard import is_all_keyboards, keyboard_folder from qmk.keymap import is_keymap_target from qmk.search import search_keymap_targets +from qmk.util import maybe_exit_config @cli.argument('-e', '--expand', arg_only=True, action='store_true', help="Expands any use of `all` for either keyboard or keymap.") @@ -19,6 +20,8 @@ def userspace_list(cli): cli.log.error('Could not determine QMK userspace location. Please run `qmk doctor` or `qmk userspace-doctor` to diagnose.') return False + maybe_exit_config(should_exit=False, should_reraise=True) + userspace = UserspaceDefs(QMK_USERSPACE / 'qmk.json') if cli.args.expand: diff --git a/lib/python/qmk/cli/via2json.py b/lib/python/qmk/cli/via2json.py index 77823b5d9d78..73c9a61b3d3c 100755 --- a/lib/python/qmk/cli/via2json.py +++ b/lib/python/qmk/cli/via2json.py @@ -69,7 +69,7 @@ def _via_to_keymap(via_backup, keyboard_data, keymap_layout): layout_data = keyboard_data['layouts'].get(keymap_layout) if not layout_data: cli.log.error(f'LAYOUT macro {keymap_layout} is not a valid one for keyboard {cli.args.keyboard}!') - exit(1) + return None layout_data = layout_data['layout'] sorting_hat = list() @@ -118,7 +118,7 @@ def via2json(cli): keymap_layout = cli.args.layout if cli.args.layout else _find_via_layout_macro(cli.args.keyboard) if not keymap_layout: cli.log.error(f"Couldn't find LAYOUT macro for keyboard {cli.args.keyboard}. Please specify it with the '-l' argument.") - exit(1) + return False # Load the VIA backup json with cli.args.filename.open('r') as fd: @@ -126,9 +126,15 @@ def via2json(cli): # Generate keyboard metadata keyboard_data = info_json(cli.args.keyboard) + if not keyboard_data: + cli.log.error(f'LAYOUT macro {keymap_layout} is not a valid one for keyboard {cli.args.keyboard}!') + return False # Get keycode array keymap_data = _via_to_keymap(via_backup, keyboard_data, keymap_layout) + if not keymap_data: + cli.log.error(f'Could not extract valid keycode data from VIA backup matching keyboard {cli.args.keyboard}!') + return False # Convert macros macro_data = list() diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index d95ff5f923ee..3db8353bfda9 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -11,6 +11,7 @@ from qmk.constants import QMK_USERSPACE, HAS_QMK_USERSPACE from qmk.json_schema import json_load, validate from qmk.keyboard import keyboard_alias_definitions +from qmk.util import maybe_exit def find_make(): @@ -52,7 +53,7 @@ def parse_configurator_json(configurator_file): except jsonschema.ValidationError as e: cli.log.error(f'Invalid JSON keymap: {configurator_file} : {e.message}') - exit(1) + maybe_exit(1) keyboard = user_keymap['keyboard'] aliases = keyboard_alias_definitions() diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index ffc9d57d682c..833271c09cc7 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -14,6 +14,7 @@ from qmk.commands import parse_configurator_json from qmk.makefile import parse_rules_mk_file from qmk.math import compute +from qmk.util import maybe_exit true_values = ['1', 'on', 'yes'] false_values = ['0', 'off', 'no'] @@ -208,7 +209,7 @@ def _validate(keyboard, info_data): except jsonschema.ValidationError as e: json_path = '.'.join([str(p) for p in e.absolute_path]) cli.log.error('Invalid API data: %s: %s: %s', keyboard, json_path, e.message) - exit(1) + maybe_exit(1) def info_json(keyboard): diff --git a/lib/python/qmk/json_schema.py b/lib/python/qmk/json_schema.py index 1d5f863807fb..b11a0ed7ea1c 100644 --- a/lib/python/qmk/json_schema.py +++ b/lib/python/qmk/json_schema.py @@ -11,6 +11,8 @@ from milc import cli +from qmk.util import maybe_exit + def _dict_raise_on_duplicates(ordered_pairs): """Reject duplicate keys.""" @@ -38,10 +40,10 @@ def _json_load_impl(json_file, strict=True): except (json.decoder.JSONDecodeError, hjson.HjsonDecodeError) as e: cli.log.error('Invalid JSON encountered attempting to load {fg_cyan}%s{fg_reset}:\n\t{fg_red}%s', json_file, e) - exit(1) + maybe_exit(1) except Exception as e: cli.log.error('Unknown error attempting to load {fg_cyan}%s{fg_reset}:\n\t{fg_red}%s', json_file, e) - exit(1) + maybe_exit(1) def json_load(json_file, strict=True): diff --git a/lib/python/qmk/util.py b/lib/python/qmk/util.py index db7debd5788f..0145ab135412 100644 --- a/lib/python/qmk/util.py +++ b/lib/python/qmk/util.py @@ -2,9 +2,30 @@ """ import contextlib import multiprocessing +import sys from milc import cli +maybe_exit_should_exit = True +maybe_exit_reraise = False + + +# Controls whether or not early `exit()` calls should be made +def maybe_exit(rc): + if maybe_exit_should_exit: + sys.exit(rc) + if maybe_exit_reraise: + e = sys.exception() + if e: + raise e + + +def maybe_exit_config(should_exit: bool = True, should_reraise: bool = False): + global maybe_exit_should_exit + global maybe_exit_reraise + maybe_exit_should_exit = should_exit + maybe_exit_reraise = should_reraise + @contextlib.contextmanager def parallelize(): From ad82c4703a4a2e0e5c8d266b2df9e89836b76587 Mon Sep 17 00:00:00 2001 From: David Hoelscher Date: Sat, 15 Jun 2024 23:46:22 -0500 Subject: [PATCH 0044/1205] [Keyboard] ErgoStrafer RGB (#22936) * adding ergostrafer rgb * removing comment --- keyboards/custommk/ergostrafer_rgb/config.h | 28 +++ keyboards/custommk/ergostrafer_rgb/halconf.h | 30 +++ keyboards/custommk/ergostrafer_rgb/info.json | 189 ++++++++++++++++++ .../ergostrafer_rgb/keymaps/default/keymap.c | 21 ++ .../ergostrafer_rgb/keymaps/default/rules.mk | 1 + .../ergostrafer_rgb/keymaps/via/config.h | 6 + .../ergostrafer_rgb/keymaps/via/keymap.c | 19 ++ .../ergostrafer_rgb/keymaps/via/rules.mk | 2 + keyboards/custommk/ergostrafer_rgb/mcuconf.h | 31 +++ keyboards/custommk/ergostrafer_rgb/readme.md | 27 +++ keyboards/custommk/ergostrafer_rgb/rules.mk | 1 + 11 files changed, 355 insertions(+) create mode 100644 keyboards/custommk/ergostrafer_rgb/config.h create mode 100644 keyboards/custommk/ergostrafer_rgb/halconf.h create mode 100644 keyboards/custommk/ergostrafer_rgb/info.json create mode 100644 keyboards/custommk/ergostrafer_rgb/keymaps/default/keymap.c create mode 100644 keyboards/custommk/ergostrafer_rgb/keymaps/default/rules.mk create mode 100644 keyboards/custommk/ergostrafer_rgb/keymaps/via/config.h create mode 100644 keyboards/custommk/ergostrafer_rgb/keymaps/via/keymap.c create mode 100644 keyboards/custommk/ergostrafer_rgb/keymaps/via/rules.mk create mode 100644 keyboards/custommk/ergostrafer_rgb/mcuconf.h create mode 100644 keyboards/custommk/ergostrafer_rgb/readme.md create mode 100644 keyboards/custommk/ergostrafer_rgb/rules.mk diff --git a/keyboards/custommk/ergostrafer_rgb/config.h b/keyboards/custommk/ergostrafer_rgb/config.h new file mode 100644 index 000000000000..cba40b36d40c --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/config.h @@ -0,0 +1,28 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// FRAM configuration +#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN B7 +#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 4 // 48MHz / 4 = 12MHz; max supported by MB85R64 is 20MHz + +// SPI configuration +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN B3 +#define SPI_MOSI_PIN B5 +#define SPI_MISO_PIN B4 + +// Audio configuration +#define AUDIO_PIN B8 +#define AUDIO_PWM_DRIVER PWMD4 +#define AUDIO_PWM_CHANNEL 3 +#define AUDIO_PWM_PAL_MODE 2 +#define AUDIO_STATE_TIMER GPTD5 +#define AUDIO_INIT_DELAY + +#define WS2812_PWM_DRIVER PWMD1 +#define WS2812_PWM_CHANNEL 3 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_DMA_CHANNEL 6 diff --git a/keyboards/custommk/ergostrafer_rgb/halconf.h b/keyboards/custommk/ergostrafer_rgb/halconf.h new file mode 100644 index 000000000000..6791d829f9b5 --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/halconf.h @@ -0,0 +1,30 @@ +/* Copyright 2024 customMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_PWM TRUE + +#define HAL_USE_SPI TRUE + +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#define SERIAL_BUFFERS_SIZE 256 + +// This enables interrupt-driven mode +#define SPI_USE_WAIT TRUE + +#include_next diff --git a/keyboards/custommk/ergostrafer_rgb/info.json b/keyboards/custommk/ergostrafer_rgb/info.json new file mode 100644 index 000000000000..ac058be1a40b --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/info.json @@ -0,0 +1,189 @@ +{ + "manufacturer": "customMK", + "keyboard_name": "ErgoStrafer RGB", + "maintainer": "customMK", + "bootloader": "stm32-dfu", + "diode_direction": "ROW2COL", + "dynamic_keymap": { + "layer_count": 32 + }, + "eeprom": { + "driver": "spi" + }, + "encoder": { + "rotary": [ + {"pin_a": "A8", "pin_b": "A4", "resolution": 2}, + {"pin_a": "B12", "pin_b": "B14", "resolution": 2}, + {"pin_a": "B15", "pin_b": "A15", "resolution": 2} + ] + }, + "features": { + "audio": true, + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["B0", "A1", "A2", "A3", "A6", "B6", "B10"], + "rows": ["C13", "C14", "C15", "B1", "A7", "A5"] + }, + "processor": "STM32F411", + "qmk": { + "tap_keycode_delay": 10 + }, + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true + }, + "center_point": [112, 112], + "driver": "ws2812", + "layout": [ + {"matrix": [0, 1], "x": 32, "y": 45, "flags": 4}, + {"matrix": [0, 2], "x": 57, "y": 40, "flags": 4}, + {"matrix": [0, 3], "x": 83, "y": 38, "flags": 4}, + {"matrix": [0, 4], "x": 109, "y": 40, "flags": 4}, + {"matrix": [0, 5], "x": 134, "y": 45, "flags": 4}, + {"x": 136, "y": 18, "flags": 4}, + {"matrix": [0, 0], "x": 167, "y": 11, "flags": 4}, + {"matrix": [1, 0], "x": 170, "y": 33, "flags": 4}, + {"matrix": [2, 0], "x": 174, "y": 54, "flags": 4}, + {"x": 195, "y": 57, "flags": 4}, + {"x": 211, "y": 81, "flags": 4}, + {"x": 193, "y": 90, "flags": 4}, + {"matrix": [0, 6], "x": 171, "y": 90, "flags": 4}, + {"matrix": [2, 5], "x": 143, "y": 90, "flags": 4}, + {"matrix": [1, 5], "x": 140, "y": 67, "flags": 4}, + {"matrix": [1, 4], "x": 118, "y": 61, "flags": 4}, + {"matrix": [2, 3], "x": 95, "y": 58, "flags": 4}, + {"matrix": [1, 3], "x": 71, "y": 58, "flags": 4}, + {"matrix": [1, 2], "x": 48, "y": 61, "flags": 4}, + {"matrix": [1, 1], "x": 26, "y": 67, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 90, "flags": 4}, + {"matrix": [2, 1], "x": 23, "y": 90, "flags": 4}, + {"matrix": [2, 2], "x": 52, "y": 87, "flags": 4}, + {"matrix": [3, 3], "x": 83, "y": 85, "flags": 4}, + {"matrix": [2, 4], "x": 114, "y": 87, "flags": 4}, + {"matrix": [3, 5], "x": 139, "y": 113, "flags": 4}, + {"matrix": [1, 6], "x": 167, "y": 114, "flags": 4}, + {"x": 207, "y": 112, "flags": 4}, + {"matrix": [5, 6], "x": 224, "y": 146, "flags": 4}, + {"matrix": [3, 6], "x": 184, "y": 147, "flags": 4}, + {"matrix": [2, 6], "x": 156, "y": 147, "flags": 4}, + {"matrix": [4, 5], "x": 127, "y": 135, "flags": 4}, + {"matrix": [3, 4], "x": 111, "y": 112, "flags": 4}, + {"matrix": [4, 3], "x": 83, "y": 112, "flags": 4}, + {"matrix": [3, 2], "x": 55, "y": 112, "flags": 4}, + {"matrix": [3, 1], "x": 20, "y": 114, "flags": 4}, + {"matrix": [4, 1], "x": 15, "y": 138, "flags": 4}, + {"matrix": [5, 1], "x": 14, "y": 162, "flags": 4}, + {"matrix": [4, 2], "x": 52, "y": 137, "flags": 4}, + {"matrix": [5, 3], "x": 83, "y": 139, "flags": 4}, + {"x": 83, "y": 164, "flags": 4}, + {"x": 104, "y": 144, "flags": 4}, + {"matrix": [5, 5], "x": 121, "y": 173, "flags": 4}, + {"matrix": [4, 6], "x": 167, "y": 173, "flags": 4} + ], + "max_brightness": 120, + "sat_steps": 8, + "speed_steps": 10, + "val_steps": 8 + }, + "url": "https://shop.custommk.com/collections/ergostrafer/products/ergostrafer", + "usb": { + "device_version": "1.0.0", + "pid": "0xFAB9", + "vid": "0xF35B" + }, + "ws2812": { + "driver": "pwm", + "pin": "A10" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "F9", "matrix": [0, 0], "x": 7.5, "y": 0}, + {"label": "7", "matrix": [0, 1], "x": 1.5, "y": 1.25}, + {"label": "8", "matrix": [0, 2], "x": 2.5, "y": 1.25}, + {"label": "9", "matrix": [0, 3], "x": 3.5, "y": 1.25}, + {"label": "0", "matrix": [0, 4], "x": 4.5, "y": 1.25}, + {"label": "-", "matrix": [0, 5], "x": 5.5, "y": 1.25}, + {"label": "T", "matrix": [0, 6], "x": 7.25, "y": 3.25, "w": 1.5}, + {"label": "PrtScr", "matrix": [1, 0], "x": 7.5, "y": 1}, + {"label": "1", "matrix": [1, 1], "x": 1, "y": 2.25}, + {"label": "2", "matrix": [1, 2], "x": 2, "y": 2.25}, + {"label": "3", "matrix": [1, 3], "x": 3, "y": 2.25}, + {"label": "5", "matrix": [1, 4], "x": 5, "y": 2.25}, + {"label": "6", "matrix": [1, 5], "x": 6, "y": 2.25}, + {"label": "G", "matrix": [1, 6], "x": 7.25, "y": 4.25, "w": 1.5}, + {"label": "F5", "matrix": [2, 0], "x": 7.5, "y": 2}, + {"label": "Tab", "matrix": [2, 1], "x": 1, "y": 3.5}, + {"label": "Q", "matrix": [2, 2], "x": 2.5, "y": 3.4}, + {"label": "4", "matrix": [2, 3], "x": 4, "y": 2.25}, + {"label": "E", "matrix": [2, 4], "x": 4.5, "y": 3.4}, + {"label": "R", "matrix": [2, 5], "x": 6, "y": 3.3}, + {"label": "B", "matrix": [2, 6], "x": 6.5, "y": 5.75, "w": 1.5}, + {"label": "Caps Lock", "matrix": [3, 0], "x": 0, "y": 3.5}, + {"label": "L Alt", "matrix": [3, 1], "x": 0.25, "y": 4.75, "w": 1.5}, + {"label": "A", "matrix": [3, 2], "x": 2.5, "y": 4.5}, + {"label": "W", "matrix": [3, 3], "x": 3.5, "y": 3.4}, + {"label": "D", "matrix": [3, 4], "x": 4.5, "y": 4.5}, + {"label": "F", "matrix": [3, 5], "x": 6, "y": 4.3}, + {"label": "P", "matrix": [3, 6], "x": 8, "y": 5.75}, + {"label": "L Shift", "matrix": [4, 1], "x": 0.25, "y": 5.75, "w": 1.5}, + {"label": "Z", "matrix": [4, 2], "x": 2.5, "y": 5.6}, + {"label": "S", "matrix": [4, 3], "x": 3.5, "y": 4.5}, + {"label": "V", "matrix": [4, 5], "x": 5, "y": 5.75, "w": 1.5}, + {"label": "Space", "matrix": [4, 6], "x": 6.5, "y": 6.85, "w": 1.75}, + {"label": "L Ctrl Duck", "matrix": [5, 1], "x": 0.25, "y": 6.75, "w": 1.5}, + {"label": "X", "matrix": [5, 3], "x": 3.5, "y": 5.6}, + {"label": "C", "matrix": [5, 5], "x": 4.75, "y": 6.85, "w": 1.75}, + {"label": "L Ctrl", "matrix": [5, 6], "x": 9.5, "y": 5.75} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/custommk/ergostrafer_rgb/keymaps/default/keymap.c b/keyboards/custommk/ergostrafer_rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..71a83d4868a9 --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_F9, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_T, + KC_PSCR, KC_1, KC_2, KC_3, KC_5, KC_6, KC_G, + KC_F5, KC_TAB, KC_Q, KC_4, KC_E, KC_R, KC_B, + KC_CAPS, KC_LALT, KC_A, KC_W, KC_D, KC_F, KC_P, + KC_LSFT, KC_Z, KC_S, KC_V, KC_SPC, + KC_LCTL, KC_X, KC_C, KC_LCTL + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif \ No newline at end of file diff --git a/keyboards/custommk/ergostrafer_rgb/keymaps/default/rules.mk b/keyboards/custommk/ergostrafer_rgb/keymaps/default/rules.mk new file mode 100644 index 000000000000..a40474b4d5c7 --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/custommk/ergostrafer_rgb/keymaps/via/config.h b/keyboards/custommk/ergostrafer_rgb/keymaps/via/config.h new file mode 100644 index 000000000000..c2dca3827778 --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/keymaps/via/config.h @@ -0,0 +1,6 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define DYNAMIC_KEYMAP_MACRO_COUNT 128 diff --git a/keyboards/custommk/ergostrafer_rgb/keymaps/via/keymap.c b/keyboards/custommk/ergostrafer_rgb/keymaps/via/keymap.c new file mode 100644 index 000000000000..cddbb912c40b --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/keymaps/via/keymap.c @@ -0,0 +1,19 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_F9, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_T, + KC_PSCR, KC_1, KC_2, KC_3, KC_5, KC_6, KC_G, + KC_F5, KC_TAB, KC_Q, KC_4, KC_E, KC_R, KC_B, + KC_CAPS, KC_LALT, KC_A, KC_W, KC_D, KC_F, KC_P, + KC_LSFT, KC_Z, KC_S, KC_V, KC_SPC, + KC_LCTL, KC_X, KC_C, KC_LCTL + ) +}; + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; \ No newline at end of file diff --git a/keyboards/custommk/ergostrafer_rgb/keymaps/via/rules.mk b/keyboards/custommk/ergostrafer_rgb/keymaps/via/rules.mk new file mode 100644 index 000000000000..4253f570f0bb --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/custommk/ergostrafer_rgb/mcuconf.h b/keyboards/custommk/ergostrafer_rgb/mcuconf.h new file mode 100644 index 000000000000..8151abdcba3e --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/mcuconf.h @@ -0,0 +1,31 @@ +/* Copyright 2024 customMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +// Used for audio +#undef STM32_PWM_USE_TIM4 +#define STM32_PWM_USE_TIM4 TRUE + +// Used for FRAM +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +// Used for RGB matrix +#undef STM32_PWM_USE_TIM1 +#define STM32_PWM_USE_TIM1 TRUE \ No newline at end of file diff --git a/keyboards/custommk/ergostrafer_rgb/readme.md b/keyboards/custommk/ergostrafer_rgb/readme.md new file mode 100644 index 000000000000..4536a9841e38 --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/readme.md @@ -0,0 +1,27 @@ +# ergostrafer rgb + +![ergostrafer rgb](https://i.imgur.com/3LZImFwh.jpeg) + +ErgoStrafer RGB is a gaming mechanical keyboard with per-key RGB LEDs that reproduces the layout of the discontinued SteelSeries Merc Stealth a.k.a. Zboard. + +* Keyboard Maintainer: [customMK](https://github.com/customMK) +* Hardware Supported: ErgoStrafer RGB +* Hardware Availability: [customMK](https://shop.custommk.com/collections/ergostrafer/products/ergostrafer) + +Make example for this keyboard (after setting up your build environment): + + make custommk/ergostrafer_rgb:default + +Flashing example for this keyboard: + + make custommk/ergostrafer_rgb: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (the "Load" key in the top right corner) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/custommk/ergostrafer_rgb/rules.mk b/keyboards/custommk/ergostrafer_rgb/rules.mk new file mode 100644 index 000000000000..72f75f4367e0 --- /dev/null +++ b/keyboards/custommk/ergostrafer_rgb/rules.mk @@ -0,0 +1 @@ +AUDIO_DRIVER = pwm_hardware From 7ac1a34a346aed7118018f4f562a1cfdd651a087 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 16 Jun 2024 19:53:03 +1000 Subject: [PATCH 0045/1205] [CLI] Older python compat. (#23933) --- lib/python/qmk/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/util.py b/lib/python/qmk/util.py index 0145ab135412..b73fab89d128 100644 --- a/lib/python/qmk/util.py +++ b/lib/python/qmk/util.py @@ -15,7 +15,7 @@ def maybe_exit(rc): if maybe_exit_should_exit: sys.exit(rc) if maybe_exit_reraise: - e = sys.exception() + e = sys.exc_info()[1] if e: raise e From 3c868b9316ea9415288f55c0041c4d25e3e489ae Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 16 Jun 2024 22:52:47 +1000 Subject: [PATCH 0046/1205] `ergodox_ez/base`: Add missing `features` object (#23935) --- keyboards/ergodox_ez/base/keyboard.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/keyboards/ergodox_ez/base/keyboard.json b/keyboards/ergodox_ez/base/keyboard.json index be1433ccbafd..5e0f54e40b4d 100644 --- a/keyboards/ergodox_ez/base/keyboard.json +++ b/keyboards/ergodox_ez/base/keyboard.json @@ -2,5 +2,11 @@ "keyboard_name": "ErgoDox EZ", "usb": { "pid": "0x4974" + }, + "features": { + "bootmagic": false, + "mousekey": true, + "extrakey": true, + "nkro": true } } From 751fbd75d3faaadbd4ea276b4922d1686c656b62 Mon Sep 17 00:00:00 2001 From: Danny Date: Sun, 16 Jun 2024 14:16:05 -0400 Subject: [PATCH 0047/1205] Add Chiri CE (#23926) * Add Chiri CE * Add more layers for dynamic keymap * Move EEPROM clear * Convert to keymap.json * Change bootmagic matrix position --- keyboards/keebio/chiri_ce/info.json | 8 + .../chiri_ce/keymaps/default/keymap.json | 32 +++ .../keebio/chiri_ce/keymaps/via/keymap.json | 32 +++ keyboards/keebio/chiri_ce/readme.md | 25 +++ keyboards/keebio/chiri_ce/rev1/config.h | 16 ++ keyboards/keebio/chiri_ce/rev1/keyboard.json | 189 ++++++++++++++++++ keyboards/keebio/chiri_ce/rev1/rules.mk | 1 + 7 files changed, 303 insertions(+) create mode 100644 keyboards/keebio/chiri_ce/info.json create mode 100644 keyboards/keebio/chiri_ce/keymaps/default/keymap.json create mode 100644 keyboards/keebio/chiri_ce/keymaps/via/keymap.json create mode 100644 keyboards/keebio/chiri_ce/readme.md create mode 100644 keyboards/keebio/chiri_ce/rev1/config.h create mode 100644 keyboards/keebio/chiri_ce/rev1/keyboard.json create mode 100644 keyboards/keebio/chiri_ce/rev1/rules.mk diff --git a/keyboards/keebio/chiri_ce/info.json b/keyboards/keebio/chiri_ce/info.json new file mode 100644 index 000000000000..64fa5a05cafd --- /dev/null +++ b/keyboards/keebio/chiri_ce/info.json @@ -0,0 +1,8 @@ +{ + "manufacturer": "Keebio", + "maintainer": "Keebio", + "url": "https://keeb.io", + "usb": { + "vid": "0xCB10" + } +} diff --git a/keyboards/keebio/chiri_ce/keymaps/default/keymap.json b/keyboards/keebio/chiri_ce/keymaps/default/keymap.json new file mode 100644 index 000000000000..18c9e441e07a --- /dev/null +++ b/keyboards/keebio/chiri_ce/keymaps/default/keymap.json @@ -0,0 +1,32 @@ +{ + "config": { "features": {"tri_layer": true} }, + "keyboard": "keebio/chiri_ce/rev1", + "keymap": "default", + "layout": "LAYOUT", + "layers": [ + [ + "KC_TAB" , "KC_Q" , "KC_W" , "KC_E" , "KC_R" , "KC_T" , "KC_Y" , "KC_U" , "KC_I" , "KC_O" , "KC_P" , "KC_DEL" , + "KC_LCTL", "KC_A" , "KC_S" , "KC_D" , "KC_F" , "KC_G" , "KC_H" , "KC_J" , "KC_K" , "KC_L" , "KC_SCLN", "KC_QUOT", + "KC_LSFT", "KC_Z" , "KC_X" , "KC_C" , "KC_V" , "KC_B" , "QK_GESC", "KC_BSPC", "KC_N" , "KC_M" , "KC_COMM", "KC_DOT" , "KC_SLSH", "KC_RSFT", + "KC_LGUI", "TL_LOWR", "KC_ENT" , "KC_SPC" , "TL_UPPR", "KC_RALT" + ], + [ + "KC_GRV" , "KC_1" , "KC_2" , "KC_3" , "KC_4" , "KC_5" , "KC_6" , "KC_7" , "KC_8" , "KC_9" , "KC_0" , "KC_BSPC", + "KC_ESC" , "KC_LEFT", "KC_DOWN", "KC_UP" , "KC_RGHT", "KC_LBRC", "KC_RBRC", "KC_P4" , "KC_P5" , "KC_P6" , "KC_PLUS", "KC_PIPE", + "RGB_MOD", "_______", "_______", "_______", "_______", "KC_LCBR", "KC_LPRN", "KC_RPRN", "KC_RCBR", "KC_P1" , "KC_P2" , "KC_P3" , "KC_MINS", "_______", + "_______", "_______", "KC_DEL" , "KC_DEL" , "_______", "KC_P0" + ], + [ + "RGB_TOG", "KC_EXLM", "KC_AT" , "KC_HASH", "KC_DLR" , "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", "QK_BOOT", + "RGB_MOD", "KC_MPRV", "KC_MNXT", "KC_VOLU", "KC_PGUP", "KC_UNDS", "KC_EQL" , "KC_HOME", "RGB_HUI", "RGB_SAI", "RGB_VAI", "KC_BSLS", + "KC_MUTE", "KC_MSTP", "KC_MPLY", "KC_VOLD", "KC_PGDN", "KC_MINS", "KC_LPRN", "_______", "KC_PLUS", "KC_END" , "RGB_HUD", "RGB_SAD", "RGB_VAD", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "KC_F12" , "KC_F1" , "KC_F2" , "KC_F3" , "KC_F4" , "KC_F5" , "KC_F6" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10" , "KC_F11" , + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "EE_CLR" , "QK_BOOT", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "QK_BOOT", "EE_CLR" , "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/keebio/chiri_ce/keymaps/via/keymap.json b/keyboards/keebio/chiri_ce/keymaps/via/keymap.json new file mode 100644 index 000000000000..e8db1835451a --- /dev/null +++ b/keyboards/keebio/chiri_ce/keymaps/via/keymap.json @@ -0,0 +1,32 @@ +{ + "config": { "features": {"tri_layer": true, "via": true} }, + "keyboard": "keebio/chiri_ce/rev1", + "keymap": "via", + "layout": "LAYOUT", + "layers": [ + [ + "KC_TAB" , "KC_Q" , "KC_W" , "KC_E" , "KC_R" , "KC_T" , "KC_Y" , "KC_U" , "KC_I" , "KC_O" , "KC_P" , "KC_DEL" , + "KC_LCTL", "KC_A" , "KC_S" , "KC_D" , "KC_F" , "KC_G" , "KC_H" , "KC_J" , "KC_K" , "KC_L" , "KC_SCLN", "KC_QUOT", + "KC_LSFT", "KC_Z" , "KC_X" , "KC_C" , "KC_V" , "KC_B" , "QK_GESC", "KC_BSPC", "KC_N" , "KC_M" , "KC_COMM", "KC_DOT" , "KC_SLSH", "KC_RSFT", + "KC_LGUI", "TL_LOWR", "KC_ENT" , "KC_SPC" , "TL_UPPR", "KC_RALT" + ], + [ + "KC_GRV" , "KC_1" , "KC_2" , "KC_3" , "KC_4" , "KC_5" , "KC_6" , "KC_7" , "KC_8" , "KC_9" , "KC_0" , "KC_BSPC", + "KC_ESC" , "KC_LEFT", "KC_DOWN", "KC_UP" , "KC_RGHT", "KC_LBRC", "KC_RBRC", "KC_P4" , "KC_P5" , "KC_P6" , "KC_PLUS", "KC_PIPE", + "RGB_MOD", "_______", "_______", "_______", "_______", "KC_LCBR", "KC_LPRN", "KC_RPRN", "KC_RCBR", "KC_P1" , "KC_P2" , "KC_P3" , "KC_MINS", "_______", + "_______", "_______", "KC_DEL" , "KC_DEL" , "_______", "KC_P0" + ], + [ + "RGB_TOG", "KC_EXLM", "KC_AT" , "KC_HASH", "KC_DLR" , "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", "QK_BOOT", + "RGB_MOD", "KC_MPRV", "KC_MNXT", "KC_VOLU", "KC_PGUP", "KC_UNDS", "KC_EQL" , "KC_HOME", "RGB_HUI", "RGB_SAI", "RGB_VAI", "KC_BSLS", + "KC_MUTE", "KC_MSTP", "KC_MPLY", "KC_VOLD", "KC_PGDN", "KC_MINS", "KC_LPRN", "_______", "KC_PLUS", "KC_END" , "RGB_HUD", "RGB_SAD", "RGB_VAD", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "KC_F12" , "KC_F1" , "KC_F2" , "KC_F3" , "KC_F4" , "KC_F5" , "KC_F6" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10" , "KC_F11" , + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "EE_CLR" , "QK_BOOT", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "QK_BOOT", "EE_CLR" , "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/keebio/chiri_ce/readme.md b/keyboards/keebio/chiri_ce/readme.md new file mode 100644 index 000000000000..5bc70c0199c7 --- /dev/null +++ b/keyboards/keebio/chiri_ce/readme.md @@ -0,0 +1,25 @@ +# Chiri CE (Compact Edition) + +A split ergo 3x6 keyboard with 4 thumb keys made and sold by Keebio. Outer columns can be broken off to convert it to 3x5 layout. [More info at Keebio](https://keeb.io). + +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Chiri CE PCBs w/RP2040 microcontroller +* Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make keebio/chiri_ce/rev1:default + +Example of flashing this keyboard: + + make keebio/chiri_ce/rev1: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at the top left (for left half) or top right (for right half) and plug in the keyboard +* **Physical reset button**: Press and hold the button on the back of the PCB for at least 1 second and let go +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/keebio/chiri_ce/rev1/config.h b/keyboards/keebio/chiri_ce/rev1/config.h new file mode 100644 index 000000000000..b1eb9da4e9b9 --- /dev/null +++ b/keyboards/keebio/chiri_ce/rev1/config.h @@ -0,0 +1,16 @@ +// Copyright 2024 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define SPLIT_HAND_PIN GP4 +#define USB_VBUS_PIN GP0 +#define SERIAL_USART_FULL_DUPLEX +#define SERIAL_USART_TX_PIN GP12 +#define SERIAL_USART_RX_PIN GP13 +#define SERIAL_USART_PIN_SWAP +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U +#define I2C_DRIVER I2CD2 +#define I2C1_SDA_PIN GP10 +#define I2C1_SCL_PIN GP11 diff --git a/keyboards/keebio/chiri_ce/rev1/keyboard.json b/keyboards/keebio/chiri_ce/rev1/keyboard.json new file mode 100644 index 000000000000..8b46dd7d6d47 --- /dev/null +++ b/keyboards/keebio/chiri_ce/rev1/keyboard.json @@ -0,0 +1,189 @@ +{ + "keyboard_name": "Chiri CE Rev. 1", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "dynamic_keymap": { + "layer_count": 6 + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["GP29", "GP28", "GP27", "GP2", "GP3", "GP14"], + "rows": ["GP19", "GP20", "GP7", "GP26"] + }, + "processor": "RP2040", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 5], "x": 80, "y": 3, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 5, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 2, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 5, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 18, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 17, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [3, 2], "x": 56, "y": 47, "flags": 4}, + {"matrix": [3, 3], "x": 72, "y": 58, "flags": 4}, + {"matrix": [3, 4], "x": 90, "y": 64, "flags": 4}, + {"matrix": [3, 5], "x": 98, "y": 52, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 18, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 5, "flags": 4}, + {"matrix": [4, 5], "x": 144, "y": 3, "flags": 4}, + {"matrix": [4, 4], "x": 160, "y": 5, "flags": 4}, + {"matrix": [4, 3], "x": 176, "y": 0, "flags": 4}, + {"matrix": [4, 2], "x": 192, "y": 2, "flags": 4}, + {"matrix": [4, 1], "x": 208, "y": 5, "flags": 4}, + {"matrix": [5, 1], "x": 208, "y": 18, "flags": 4}, + {"matrix": [5, 2], "x": 192, "y": 15, "flags": 4}, + {"matrix": [5, 3], "x": 176, "y": 13, "flags": 4}, + {"matrix": [5, 4], "x": 160, "y": 15, "flags": 4}, + {"matrix": [5, 5], "x": 144, "y": 17, "flags": 4}, + {"matrix": [6, 5], "x": 144, "y": 30, "flags": 4}, + {"matrix": [6, 4], "x": 160, "y": 28, "flags": 4}, + {"matrix": [6, 3], "x": 176, "y": 27, "flags": 4}, + {"matrix": [6, 2], "x": 192, "y": 28, "flags": 4}, + {"matrix": [6, 1], "x": 208, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 168, "y": 47, "flags": 4}, + {"matrix": [7, 3], "x": 152, "y": 58, "flags": 4}, + {"matrix": [7, 4], "x": 134, "y": 64, "flags": 4}, + {"matrix": [7, 5], "x": 126, "y": 52, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 32, "flags": 4}, + {"matrix": [5, 0], "x": 224, "y": 18, "flags": 4}, + {"matrix": [4, 0], "x": 224, "y": 5, "flags": 4} + ], + "max_brightness": 200, + "split_count": [22, 22], + "sleep": true + }, + "split": { + "bootmagic": { + "matrix": [4, 0] + }, + "enabled": true, + "matrix_pins": { + "right": { + "cols": ["GP29", "GP28", "GP2", "GP27", "GP18", "GP7"], + "rows": ["GP24", "GP23", "GP21", "GP3"] + } + }, + "transport": { + "sync_matrix_state": true + } + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x1546" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP25" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.375}, + {"matrix": [0, 1], "x": 1, "y": 0.375}, + {"matrix": [0, 2], "x": 2, "y": 0.125}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.125}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [4, 5], "x": 9, "y": 0.25}, + {"matrix": [4, 4], "x": 10, "y": 0.125}, + {"matrix": [4, 3], "x": 11, "y": 0}, + {"matrix": [4, 2], "x": 12, "y": 0.125}, + {"matrix": [4, 1], "x": 13, "y": 0.375}, + {"matrix": [4, 0], "x": 14, "y": 0.375}, + {"matrix": [1, 0], "x": 0, "y": 1.375}, + {"matrix": [1, 1], "x": 1, "y": 1.375}, + {"matrix": [1, 2], "x": 2, "y": 1.125}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.125}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [5, 5], "x": 9, "y": 1.25}, + {"matrix": [5, 4], "x": 10, "y": 1.125}, + {"matrix": [5, 3], "x": 11, "y": 1}, + {"matrix": [5, 2], "x": 12, "y": 1.125}, + {"matrix": [5, 1], "x": 13, "y": 1.375}, + {"matrix": [5, 0], "x": 14, "y": 1.375}, + {"matrix": [2, 0], "x": 0, "y": 2.375}, + {"matrix": [2, 1], "x": 1, "y": 2.375}, + {"matrix": [2, 2], "x": 2, "y": 2.125}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.125}, + {"matrix": [2, 5], "x": 5, "y": 2.25}, + {"matrix": [3, 5], "x": 6.15, "y": 2.75}, + {"matrix": [7, 5], "x": 7.85, "y": 2.75}, + {"matrix": [6, 5], "x": 9, "y": 2.25}, + {"matrix": [6, 4], "x": 10, "y": 2.125}, + {"matrix": [6, 3], "x": 11, "y": 2}, + {"matrix": [6, 2], "x": 12, "y": 2.125}, + {"matrix": [6, 1], "x": 13, "y": 2.375}, + {"matrix": [6, 0], "x": 14, "y": 2.375}, + {"matrix": [3, 2], "x": 3.5, "y": 3.25}, + {"matrix": [3, 3], "x": 4.5, "y": 3.375}, + {"matrix": [3, 4], "x": 5.6, "y": 3.75}, + {"matrix": [7, 4], "x": 8.4, "y": 3.75}, + {"matrix": [7, 3], "x": 9.5, "y": 3.375}, + {"matrix": [7, 2], "x": 10.5, "y": 3.25} + ] + } + } +} diff --git a/keyboards/keebio/chiri_ce/rev1/rules.mk b/keyboards/keebio/chiri_ce/rev1/rules.mk new file mode 100644 index 000000000000..161ec22b16e2 --- /dev/null +++ b/keyboards/keebio/chiri_ce/rev1/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = vendor From 089a819179fe5a5eb25b8dc3fd595c9b6c485349 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 17 Jun 2024 06:57:37 +1000 Subject: [PATCH 0048/1205] keyboard.json schema: set minimum value for `key_unit` (#23937) * keyboard.json schema: set minimum value for `key_unit` * Fix invalid `matrix_size` in keyboard.json * Fix bad layout for silverbullet44 --- data/schemas/definitions.jsonschema | 3 +- data/schemas/keyboard.jsonschema | 8 ++--- keyboards/hazel/bad_wings/config.h | 3 ++ keyboards/hazel/bad_wings/keyboard.json | 4 --- keyboards/keychron/q1v2/config.h | 3 ++ keyboards/keychron/q1v2/info.json | 4 --- keyboards/mechlovin/olly/jf/rev1/config.h | 7 ++++ .../mechlovin/olly/jf/rev1/keyboard.json | 4 --- keyboards/silverbullet44/keyboard.json | 34 +++++++++---------- keyboards/snes_macropad/config.h | 3 ++ keyboards/snes_macropad/keyboard.json | 4 --- keyboards/zsa/voyager/config.h | 3 ++ keyboards/zsa/voyager/keyboard.json | 4 --- 13 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 keyboards/mechlovin/olly/jf/rev1/config.h diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema index a1fdd2dcc680..ef44915244c9 100644 --- a/data/schemas/definitions.jsonschema +++ b/data/schemas/definitions.jsonschema @@ -40,7 +40,8 @@ "pattern": "^[0-9a-z_/\\-]+\\.json$" }, "key_unit": { - "type": "number" + "type": "number", + "minimum": 0 }, "keyboard": { "type": "string", diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index b699f862770b..e5802fe07dd9 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -515,8 +515,8 @@ "minimum": 0 } }, - "x": {"$ref": "qmk.definitions.v1#/key_unit"}, - "y": {"$ref": "qmk.definitions.v1#/key_unit"}, + "x": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "y": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} } } @@ -601,8 +601,8 @@ "minimum": 0 } }, - "x": {"$ref": "qmk.definitions.v1#/key_unit"}, - "y": {"$ref": "qmk.definitions.v1#/key_unit"}, + "x": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "y": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} } } diff --git a/keyboards/hazel/bad_wings/config.h b/keyboards/hazel/bad_wings/config.h index 47301728357b..b69628e7fc46 100644 --- a/keyboards/hazel/bad_wings/config.h +++ b/keyboards/hazel/bad_wings/config.h @@ -3,6 +3,9 @@ #pragma once +#define MATRIX_COLS 8 +#define MATRIX_ROWS 5 + #define SPI_SCK_PIN GP2 #define SPI_MOSI_PIN GP3 #define SPI_MISO_PIN GP4 diff --git a/keyboards/hazel/bad_wings/keyboard.json b/keyboards/hazel/bad_wings/keyboard.json index fef514c539f7..983b8c4fc3dd 100644 --- a/keyboards/hazel/bad_wings/keyboard.json +++ b/keyboards/hazel/bad_wings/keyboard.json @@ -10,10 +10,6 @@ }, "processor": "RP2040", "bootloader": "rp2040", - "matrix_size": { - "cols": 8, - "rows": 5 - }, "diode_direction": "COL2ROW", "features": { "bootmagic": true, diff --git a/keyboards/keychron/q1v2/config.h b/keyboards/keychron/q1v2/config.h index 326e60e3c0b4..2e93d80e4e29 100644 --- a/keyboards/keychron/q1v2/config.h +++ b/keyboards/keychron/q1v2/config.h @@ -16,6 +16,9 @@ #pragma once +#define MATRIX_COLS 16 +#define MATRIX_ROWS 6 + /* RGB Matrix Driver Configuration */ #define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO #define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND diff --git a/keyboards/keychron/q1v2/info.json b/keyboards/keychron/q1v2/info.json index ed718006e368..7eb7038696ca 100644 --- a/keyboards/keychron/q1v2/info.json +++ b/keyboards/keychron/q1v2/info.json @@ -32,10 +32,6 @@ "custom": true, "custom_lite": true }, - "matrix_size": { - "cols": 16, - "rows": 6 - }, "diode_direction": "ROW2COL", "rgb_matrix": { "driver": "snled27351", diff --git a/keyboards/mechlovin/olly/jf/rev1/config.h b/keyboards/mechlovin/olly/jf/rev1/config.h new file mode 100644 index 000000000000..9aa7e1c1d320 --- /dev/null +++ b/keyboards/mechlovin/olly/jf/rev1/config.h @@ -0,0 +1,7 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define MATRIX_COLS 19 +#define MATRIX_ROWS 6 diff --git a/keyboards/mechlovin/olly/jf/rev1/keyboard.json b/keyboards/mechlovin/olly/jf/rev1/keyboard.json index 69f092af07e3..1b8fa4a19ad0 100644 --- a/keyboards/mechlovin/olly/jf/rev1/keyboard.json +++ b/keyboards/mechlovin/olly/jf/rev1/keyboard.json @@ -16,10 +16,6 @@ "rows": ["D5", "D6", "A5", "A4", "A3", "A6"], "custom_lite": true }, - "matrix_size": { - "cols": 19, - "rows": 6 - }, "backlight": { "pin": "D4", "breathing": true diff --git a/keyboards/silverbullet44/keyboard.json b/keyboards/silverbullet44/keyboard.json index 793ec229e4b4..a58aed88206c 100644 --- a/keyboards/silverbullet44/keyboard.json +++ b/keyboards/silverbullet44/keyboard.json @@ -92,29 +92,29 @@ {"matrix": [5, 1], "x": 16, "y": 1.75}, {"matrix": [5, 0], "x": 17, "y": 2.375}, - {"matrix": [2, 0], "x": 12, "y": 2.5}, - {"matrix": [2, 1], "x": 13, "y": 2.25}, - {"matrix": [2, 2], "x": 14, "y": 2}, - {"matrix": [2, 3], "x": 15, "y": 2.25}, - {"matrix": [2, 4], "x": 16, "y": 2.75}, - {"matrix": [2, 5], "x": 17, "y": 3.375}, + {"matrix": [2, 0], "x": 0, "y": 3.375}, + {"matrix": [2, 1], "x": 1, "y": 2.75}, + {"matrix": [2, 2], "x": 2, "y": 2.25}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.25}, + {"matrix": [2, 5], "x": 5, "y": 2.5}, - {"matrix": [6, 5], "x": 0, "y": 3.375}, - {"matrix": [6, 4], "x": 1, "y": 2.75}, - {"matrix": [6, 3], "x": 2, "y": 2.25}, - {"matrix": [6, 2], "x": 3, "y": 2}, - {"matrix": [6, 1], "x": 4, "y": 2.25}, - {"matrix": [6, 0], "x": 5, "y": 2.5}, + {"matrix": [6, 5], "x": 12, "y": 2.5}, + {"matrix": [6, 4], "x": 13, "y": 2.25}, + {"matrix": [6, 3], "x": 14, "y": 2}, + {"matrix": [6, 2], "x": 15, "y": 2.25}, + {"matrix": [6, 1], "x": 16, "y": 2.75}, + {"matrix": [6, 0], "x": 17, "y": 3.375}, {"matrix": [3, 2], "x": 4, "y": 3.25, "h": 1.25}, {"matrix": [3, 3], "x": 5, "y": 3.5}, - {"matrix": [3, 4], "x": -0.5, "y": 3.5, "h": 1.5}, - {"matrix": [3, 5], "x": 7, "y": 3.25, "h": 1.5}, + {"matrix": [3, 4], "x": 6, "y": 3.25, "h": 1.5}, + {"matrix": [3, 5], "x": 7, "y": 3.5, "h": 1.5}, - {"matrix": [7, 5], "x": -3, "y": 3.5, "h": 1.5}, - {"matrix": [7, 4], "x": -2, "y": 3.5, "h": 1.5}, + {"matrix": [7, 5], "x": 10, "y": 3.5, "h": 1.5}, + {"matrix": [7, 4], "x": 11, "y": 3.25, "h": 1.5}, {"matrix": [7, 3], "x": 12, "y": 3.5}, - {"matrix": [7, 2], "x": 13, "y": 3.25, "w": 1.25} + {"matrix": [7, 2], "x": 13, "y": 3.25, "h": 1.25} ] } } diff --git a/keyboards/snes_macropad/config.h b/keyboards/snes_macropad/config.h index c5edeb55f1db..a8f0c7fc4570 100644 --- a/keyboards/snes_macropad/config.h +++ b/keyboards/snes_macropad/config.h @@ -3,6 +3,9 @@ #pragma once +#define MATRIX_COLS 4 +#define MATRIX_ROWS 6 + #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U diff --git a/keyboards/snes_macropad/keyboard.json b/keyboards/snes_macropad/keyboard.json index 3483fe8f5390..91ee33235735 100644 --- a/keyboards/snes_macropad/keyboard.json +++ b/keyboards/snes_macropad/keyboard.json @@ -19,10 +19,6 @@ "driver": "vendor" }, "processor": "RP2040", - "matrix_size": { - "cols": 4, - "rows": 6 - }, "url": "", "usb": { "device_version": "1.0.0", diff --git a/keyboards/zsa/voyager/config.h b/keyboards/zsa/voyager/config.h index 630c01fc8095..27460c591044 100644 --- a/keyboards/zsa/voyager/config.h +++ b/keyboards/zsa/voyager/config.h @@ -4,6 +4,9 @@ #pragma once +#define MATRIX_COLS 7 +#define MATRIX_ROWS 12 + #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC diff --git a/keyboards/zsa/voyager/keyboard.json b/keyboards/zsa/voyager/keyboard.json index 3a7e7865ea90..3c5f2931ef4d 100644 --- a/keyboards/zsa/voyager/keyboard.json +++ b/keyboards/zsa/voyager/keyboard.json @@ -27,10 +27,6 @@ "matrix": [0, 1] }, "diode_direction": "ROW2COL", - "matrix_size": { - "cols": 7, - "rows": 12 - }, "mousekey": { "delay": 0, "interval": 20, From 4864d5afca09cbd4b0bfc7e7cef505ad602b0c9c Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 17 Jun 2024 14:47:33 +1000 Subject: [PATCH 0049/1205] Mechwild OBE/Waka60: Fix build warnings (#23929) --- keyboards/mechwild/obe/f401/base/keyboard.json | 1 + keyboards/mechwild/obe/f401/eeprom/keyboard.json | 5 +++++ keyboards/mechwild/obe/f401/eeprom/rules.mk | 1 - keyboards/mechwild/obe/f401/{keyboard.json => info.json} | 0 keyboards/mechwild/obe/f401/rules.mk | 1 + keyboards/mechwild/obe/f411/base/keyboard.json | 1 + keyboards/mechwild/obe/f411/eeprom/keyboard.json | 5 +++++ keyboards/mechwild/obe/f411/eeprom/rules.mk | 1 - keyboards/mechwild/obe/f411/{keyboard.json => info.json} | 0 keyboards/mechwild/obe/f411/rules.mk | 1 + keyboards/mechwild/obe/rules.mk | 2 +- keyboards/mechwild/waka60/f401/base/keyboard.json | 1 + keyboards/mechwild/waka60/f401/{ => eeprom}/config.h | 0 keyboards/mechwild/waka60/f401/eeprom/keyboard.json | 5 +++++ keyboards/mechwild/waka60/f401/eeprom/rules.mk | 1 - keyboards/mechwild/waka60/f401/{keyboard.json => info.json} | 0 keyboards/mechwild/waka60/f401/rules.mk | 1 + keyboards/mechwild/waka60/f411/base/keyboard.json | 1 + keyboards/mechwild/waka60/f411/{ => eeprom}/config.h | 0 keyboards/mechwild/waka60/f411/eeprom/keyboard.json | 5 +++++ keyboards/mechwild/waka60/f411/eeprom/rules.mk | 1 - keyboards/mechwild/waka60/f411/{keyboard.json => info.json} | 0 keyboards/mechwild/waka60/f411/rules.mk | 1 + keyboards/mechwild/waka60/rules.mk | 2 +- 24 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 keyboards/mechwild/obe/f401/base/keyboard.json create mode 100644 keyboards/mechwild/obe/f401/eeprom/keyboard.json delete mode 100644 keyboards/mechwild/obe/f401/eeprom/rules.mk rename keyboards/mechwild/obe/f401/{keyboard.json => info.json} (100%) create mode 100644 keyboards/mechwild/obe/f401/rules.mk create mode 100644 keyboards/mechwild/obe/f411/base/keyboard.json create mode 100644 keyboards/mechwild/obe/f411/eeprom/keyboard.json delete mode 100644 keyboards/mechwild/obe/f411/eeprom/rules.mk rename keyboards/mechwild/obe/f411/{keyboard.json => info.json} (100%) create mode 100644 keyboards/mechwild/obe/f411/rules.mk create mode 100644 keyboards/mechwild/waka60/f401/base/keyboard.json rename keyboards/mechwild/waka60/f401/{ => eeprom}/config.h (100%) create mode 100644 keyboards/mechwild/waka60/f401/eeprom/keyboard.json delete mode 100644 keyboards/mechwild/waka60/f401/eeprom/rules.mk rename keyboards/mechwild/waka60/f401/{keyboard.json => info.json} (100%) create mode 100644 keyboards/mechwild/waka60/f401/rules.mk create mode 100644 keyboards/mechwild/waka60/f411/base/keyboard.json rename keyboards/mechwild/waka60/f411/{ => eeprom}/config.h (100%) create mode 100644 keyboards/mechwild/waka60/f411/eeprom/keyboard.json delete mode 100644 keyboards/mechwild/waka60/f411/eeprom/rules.mk rename keyboards/mechwild/waka60/f411/{keyboard.json => info.json} (100%) create mode 100644 keyboards/mechwild/waka60/f411/rules.mk diff --git a/keyboards/mechwild/obe/f401/base/keyboard.json b/keyboards/mechwild/obe/f401/base/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/mechwild/obe/f401/base/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/mechwild/obe/f401/eeprom/keyboard.json b/keyboards/mechwild/obe/f401/eeprom/keyboard.json new file mode 100644 index 000000000000..12d3baee1417 --- /dev/null +++ b/keyboards/mechwild/obe/f401/eeprom/keyboard.json @@ -0,0 +1,5 @@ +{ + "eeprom": { + "driver": "i2c" + } +} diff --git a/keyboards/mechwild/obe/f401/eeprom/rules.mk b/keyboards/mechwild/obe/f401/eeprom/rules.mk deleted file mode 100644 index 44adba039b51..000000000000 --- a/keyboards/mechwild/obe/f401/eeprom/rules.mk +++ /dev/null @@ -1 +0,0 @@ -EEPROM_DRIVER = i2c diff --git a/keyboards/mechwild/obe/f401/keyboard.json b/keyboards/mechwild/obe/f401/info.json similarity index 100% rename from keyboards/mechwild/obe/f401/keyboard.json rename to keyboards/mechwild/obe/f401/info.json diff --git a/keyboards/mechwild/obe/f401/rules.mk b/keyboards/mechwild/obe/f401/rules.mk new file mode 100644 index 000000000000..8709dbb4de30 --- /dev/null +++ b/keyboards/mechwild/obe/f401/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = mechwild/obe/f401/base diff --git a/keyboards/mechwild/obe/f411/base/keyboard.json b/keyboards/mechwild/obe/f411/base/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/mechwild/obe/f411/base/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/mechwild/obe/f411/eeprom/keyboard.json b/keyboards/mechwild/obe/f411/eeprom/keyboard.json new file mode 100644 index 000000000000..12d3baee1417 --- /dev/null +++ b/keyboards/mechwild/obe/f411/eeprom/keyboard.json @@ -0,0 +1,5 @@ +{ + "eeprom": { + "driver": "i2c" + } +} diff --git a/keyboards/mechwild/obe/f411/eeprom/rules.mk b/keyboards/mechwild/obe/f411/eeprom/rules.mk deleted file mode 100644 index 44adba039b51..000000000000 --- a/keyboards/mechwild/obe/f411/eeprom/rules.mk +++ /dev/null @@ -1 +0,0 @@ -EEPROM_DRIVER = i2c diff --git a/keyboards/mechwild/obe/f411/keyboard.json b/keyboards/mechwild/obe/f411/info.json similarity index 100% rename from keyboards/mechwild/obe/f411/keyboard.json rename to keyboards/mechwild/obe/f411/info.json diff --git a/keyboards/mechwild/obe/f411/rules.mk b/keyboards/mechwild/obe/f411/rules.mk new file mode 100644 index 000000000000..e24fe6050948 --- /dev/null +++ b/keyboards/mechwild/obe/f411/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = mechwild/obe/f411/base diff --git a/keyboards/mechwild/obe/rules.mk b/keyboards/mechwild/obe/rules.mk index 8fb92c3a6b6f..8709dbb4de30 100644 --- a/keyboards/mechwild/obe/rules.mk +++ b/keyboards/mechwild/obe/rules.mk @@ -1 +1 @@ -DEFAULT_FOLDER = mechwild/obe/f401 +DEFAULT_FOLDER = mechwild/obe/f401/base diff --git a/keyboards/mechwild/waka60/f401/base/keyboard.json b/keyboards/mechwild/waka60/f401/base/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/mechwild/waka60/f401/base/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/mechwild/waka60/f401/config.h b/keyboards/mechwild/waka60/f401/eeprom/config.h similarity index 100% rename from keyboards/mechwild/waka60/f401/config.h rename to keyboards/mechwild/waka60/f401/eeprom/config.h diff --git a/keyboards/mechwild/waka60/f401/eeprom/keyboard.json b/keyboards/mechwild/waka60/f401/eeprom/keyboard.json new file mode 100644 index 000000000000..12d3baee1417 --- /dev/null +++ b/keyboards/mechwild/waka60/f401/eeprom/keyboard.json @@ -0,0 +1,5 @@ +{ + "eeprom": { + "driver": "i2c" + } +} diff --git a/keyboards/mechwild/waka60/f401/eeprom/rules.mk b/keyboards/mechwild/waka60/f401/eeprom/rules.mk deleted file mode 100644 index 44adba039b51..000000000000 --- a/keyboards/mechwild/waka60/f401/eeprom/rules.mk +++ /dev/null @@ -1 +0,0 @@ -EEPROM_DRIVER = i2c diff --git a/keyboards/mechwild/waka60/f401/keyboard.json b/keyboards/mechwild/waka60/f401/info.json similarity index 100% rename from keyboards/mechwild/waka60/f401/keyboard.json rename to keyboards/mechwild/waka60/f401/info.json diff --git a/keyboards/mechwild/waka60/f401/rules.mk b/keyboards/mechwild/waka60/f401/rules.mk new file mode 100644 index 000000000000..a0d74c14eb1c --- /dev/null +++ b/keyboards/mechwild/waka60/f401/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = mechwild/waka60/f401/base diff --git a/keyboards/mechwild/waka60/f411/base/keyboard.json b/keyboards/mechwild/waka60/f411/base/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/mechwild/waka60/f411/base/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/mechwild/waka60/f411/config.h b/keyboards/mechwild/waka60/f411/eeprom/config.h similarity index 100% rename from keyboards/mechwild/waka60/f411/config.h rename to keyboards/mechwild/waka60/f411/eeprom/config.h diff --git a/keyboards/mechwild/waka60/f411/eeprom/keyboard.json b/keyboards/mechwild/waka60/f411/eeprom/keyboard.json new file mode 100644 index 000000000000..12d3baee1417 --- /dev/null +++ b/keyboards/mechwild/waka60/f411/eeprom/keyboard.json @@ -0,0 +1,5 @@ +{ + "eeprom": { + "driver": "i2c" + } +} diff --git a/keyboards/mechwild/waka60/f411/eeprom/rules.mk b/keyboards/mechwild/waka60/f411/eeprom/rules.mk deleted file mode 100644 index 44adba039b51..000000000000 --- a/keyboards/mechwild/waka60/f411/eeprom/rules.mk +++ /dev/null @@ -1 +0,0 @@ -EEPROM_DRIVER = i2c diff --git a/keyboards/mechwild/waka60/f411/keyboard.json b/keyboards/mechwild/waka60/f411/info.json similarity index 100% rename from keyboards/mechwild/waka60/f411/keyboard.json rename to keyboards/mechwild/waka60/f411/info.json diff --git a/keyboards/mechwild/waka60/f411/rules.mk b/keyboards/mechwild/waka60/f411/rules.mk new file mode 100644 index 000000000000..0dd69ff65f7b --- /dev/null +++ b/keyboards/mechwild/waka60/f411/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = mechwild/waka60/f411/base diff --git a/keyboards/mechwild/waka60/rules.mk b/keyboards/mechwild/waka60/rules.mk index d3be506b167b..a0d74c14eb1c 100644 --- a/keyboards/mechwild/waka60/rules.mk +++ b/keyboards/mechwild/waka60/rules.mk @@ -1 +1 @@ -DEFAULT_FOLDER = mechwild/waka60/f401 +DEFAULT_FOLDER = mechwild/waka60/f401/base From 3f44231d2d7889beb87f67035d884daae72eb6f5 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 17 Jun 2024 20:12:26 +1000 Subject: [PATCH 0050/1205] Strip decimals from RGB Matrix layout positions (#23943) --- keyboards/cipulot/ec_980c/keyboard.json | 6 +- .../kd87a_bfg_edition/keyboard.json | 54 +++--- keyboards/doio/kb38/keyboard.json | 76 ++++---- .../handwired/alcor_dactyl/keyboard.json | 4 +- keyboards/input_club/k_type/k_type.c | 20 +-- keyboards/kbdfans/kbd75rgb/kbd75rgb.c | 8 +- keyboards/kbdfans/kbdpad/mk3/keyboard.json | 30 ++-- keyboards/keebio/bamfk4/bamfk4.c | 16 +- keyboards/meletrix/zoom98/keyboard.json | 22 +-- .../65/projectd_65_ansi/keyboard.json | 58 +++---- keyboards/projectd/75/ansi/keyboard.json | 160 ++++++++--------- keyboards/projectd/75/iso/keyboard.json | 162 +++++++++--------- keyboards/rot13labs/h4ckb0ard/keyboard.json | 56 +++--- keyboards/skeletonkbd/frost68/keyboard.json | 136 +++++++-------- keyboards/theone/keyboard.json | 50 +++--- 15 files changed, 429 insertions(+), 429 deletions(-) diff --git a/keyboards/cipulot/ec_980c/keyboard.json b/keyboards/cipulot/ec_980c/keyboard.json index 6d3cb22719cf..35946fa623f2 100644 --- a/keyboards/cipulot/ec_980c/keyboard.json +++ b/keyboards/cipulot/ec_980c/keyboard.json @@ -35,9 +35,9 @@ }, "driver": "ws2812", "layout": [ - {"matrix": [0, 15], "x": 16.25, "y": 1, "flags": 4}, - {"matrix": [0, 16], "x": 17.25, "y": 1, "flags": 4}, - {"matrix": [0, 17], "x": 18.25, "y": 1, "flags": 4} + {"matrix": [0, 15], "x": 16, "y": 1, "flags": 4}, + {"matrix": [0, 16], "x": 17, "y": 1, "flags": 4}, + {"matrix": [0, 17], "x": 18, "y": 1, "flags": 4} ], "led_count": 3, "max_brightness": 255 diff --git a/keyboards/darkproject/kd87a_bfg_edition/keyboard.json b/keyboards/darkproject/kd87a_bfg_edition/keyboard.json index 856dbea64887..1e0d7f5e8b8c 100644 --- a/keyboards/darkproject/kd87a_bfg_edition/keyboard.json +++ b/keyboards/darkproject/kd87a_bfg_edition/keyboard.json @@ -139,41 +139,41 @@ { "flags": 4, "matrix": [2, 5], "x": 175, "y": 25 }, { "flags": 8, "matrix": [2, 1], "x": 0, "y": 35 }, - { "flags": 4, "matrix": [1, 2], "x": 17.5, "y": 35 }, - { "flags": 4, "matrix": [2, 2], "x": 27.5, "y": 35 }, - { "flags": 4, "matrix": [3, 2], "x": 37.5, "y": 35 }, - { "flags": 4, "matrix": [4, 2], "x": 47.5, "y": 35 }, - { "flags": 4, "matrix": [4, 3], "x": 57.5, "y": 35 }, - { "flags": 4, "matrix": [5, 3], "x": 67.5, "y": 35 }, - { "flags": 4, "matrix": [5, 2], "x": 77.5, "y": 35 }, - { "flags": 4, "matrix": [6, 2], "x": 87.5, "y": 35 }, - { "flags": 4, "matrix": [7, 2], "x": 97.5, "y": 35 }, - { "flags": 4, "matrix": [8, 2], "x": 107.5, "y": 35 }, - { "flags": 4, "matrix": [8, 3], "x": 117.5, "y": 35 }, - { "flags": 4, "matrix": [10, 4], "x": 127.5, "y": 35 }, + { "flags": 4, "matrix": [1, 2], "x": 17, "y": 35 }, + { "flags": 4, "matrix": [2, 2], "x": 27, "y": 35 }, + { "flags": 4, "matrix": [3, 2], "x": 37, "y": 35 }, + { "flags": 4, "matrix": [4, 2], "x": 47, "y": 35 }, + { "flags": 4, "matrix": [4, 3], "x": 57, "y": 35 }, + { "flags": 4, "matrix": [5, 3], "x": 67, "y": 35 }, + { "flags": 4, "matrix": [5, 2], "x": 77, "y": 35 }, + { "flags": 4, "matrix": [6, 2], "x": 87, "y": 35 }, + { "flags": 4, "matrix": [7, 2], "x": 97, "y": 35 }, + { "flags": 4, "matrix": [8, 2], "x": 107, "y": 35 }, + { "flags": 4, "matrix": [8, 3], "x": 117, "y": 35 }, + { "flags": 4, "matrix": [10, 4], "x": 127, "y": 35 }, { "flags": 4, "matrix": [0, 0], "x": 0, "y": 45 }, - { "flags": 4, "matrix": [1, 4], "x": 22.5, "y": 45 }, - { "flags": 4, "matrix": [2, 4], "x": 32.5, "y": 45 }, - { "flags": 4, "matrix": [3, 4], "x": 42.5, "y": 45 }, - { "flags": 4, "matrix": [4, 4], "x": 52.5, "y": 45 }, - { "flags": 4, "matrix": [4, 5], "x": 62.5, "y": 45 }, - { "flags": 4, "matrix": [5, 5], "x": 72.5, "y": 45 }, - { "flags": 4, "matrix": [5, 4], "x": 82.5, "y": 45 }, - { "flags": 4, "matrix": [6, 4], "x": 92.5, "y": 45 }, - { "flags": 4, "matrix": [7, 4], "x": 102.5, "y": 45 }, - { "flags": 4, "matrix": [8, 5], "x": 112.5, "y": 45 }, - { "flags": 4, "matrix": [9, 1], "x": 122.5, "y": 45 }, + { "flags": 4, "matrix": [1, 4], "x": 22, "y": 45 }, + { "flags": 4, "matrix": [2, 4], "x": 32, "y": 45 }, + { "flags": 4, "matrix": [3, 4], "x": 42, "y": 45 }, + { "flags": 4, "matrix": [4, 4], "x": 52, "y": 45 }, + { "flags": 4, "matrix": [4, 5], "x": 62, "y": 45 }, + { "flags": 4, "matrix": [5, 5], "x": 72, "y": 45 }, + { "flags": 4, "matrix": [5, 4], "x": 82, "y": 45 }, + { "flags": 4, "matrix": [6, 4], "x": 92, "y": 45 }, + { "flags": 4, "matrix": [7, 4], "x": 102, "y": 45 }, + { "flags": 4, "matrix": [8, 5], "x": 112, "y": 45 }, + { "flags": 4, "matrix": [9, 1], "x": 122, "y": 45 }, { "flags": 4, "matrix": [3, 5], "x": 165, "y": 45 }, { "flags": 4, "matrix": [0, 6], "x": 0, "y": 55 }, - { "flags": 4, "matrix": [9, 0], "x": 12.5, "y": 55 }, + { "flags": 4, "matrix": [9, 0], "x": 12, "y": 55 }, { "flags": 4, "matrix": [9, 3], "x": 25, "y": 55 }, - { "flags": 4, "matrix": [9, 4], "x": 37.5, "y": 55 }, + { "flags": 4, "matrix": [9, 4], "x": 37, "y": 55 }, { "flags": 4, "matrix": [9, 5], "x": 100, "y": 55 }, - { "flags": 4, "matrix": [9, 2], "x": 112.5, "y": 55 }, + { "flags": 4, "matrix": [9, 2], "x": 112, "y": 55 }, { "flags": 4, "matrix": [8, 4], "x": 125, "y": 55 }, - { "flags": 4, "matrix": [0, 4], "x": 137.5, "y": 55 }, + { "flags": 4, "matrix": [0, 4], "x": 137, "y": 55 }, { "flags": 4, "matrix": [0, 3], "x": 155, "y": 55 }, { "flags": 4, "matrix": [7, 3], "x": 165, "y": 55 }, { "flags": 4, "matrix": [0, 5], "x": 175, "y": 55 } diff --git a/keyboards/doio/kb38/keyboard.json b/keyboards/doio/kb38/keyboard.json index 7e978b2be8ba..a46f1a6a4508 100644 --- a/keyboards/doio/kb38/keyboard.json +++ b/keyboards/doio/kb38/keyboard.json @@ -48,54 +48,54 @@ "driver": "ws2812", "layout": [ {"flags": 4, "matrix": [0, 0], "x": 0, "y": 0}, - {"flags": 4, "matrix": [0, 1], "x": 62.2, "y": 0}, - {"flags": 4, "matrix": [0, 2], "x": 99.6, "y": 0}, - {"flags": 4, "matrix": [0, 3], "x": 124.4, "y": 0}, - {"flags": 4, "matrix": [0, 4], "x": 149.3, "y": 0}, - {"flags": 4, "matrix": [0, 5], "x": 174.2, "y": 0}, - {"flags": 4, "matrix": [0, 6], "x": 199.1, "y": 0}, + {"flags": 4, "matrix": [0, 1], "x": 62, "y": 0}, + {"flags": 4, "matrix": [0, 2], "x": 99, "y": 0}, + {"flags": 4, "matrix": [0, 3], "x": 124, "y": 0}, + {"flags": 4, "matrix": [0, 4], "x": 149, "y": 0}, + {"flags": 4, "matrix": [0, 5], "x": 174, "y": 0}, + {"flags": 4, "matrix": [0, 6], "x": 199, "y": 0}, {"flags": 4, "matrix": [0, 7], "x": 224, "y": 0}, - {"flags": 4, "matrix": [1, 0], "x": 0, "y": 12.8}, - {"flags": 4, "matrix": [1, 1], "x": 24.9, "y": 12.8}, - {"flags": 4, "matrix": [1, 2], "x": 49.8, "y": 12.8}, - {"flags": 4, "matrix": [1, 3], "x": 74.6, "y": 12.8}, - {"flags": 4, "matrix": [1, 4], "x": 99.6, "y": 12.8}, - {"flags": 4, "matrix": [1, 5], "x": 124.4, "y": 12.8}, - {"flags": 4, "matrix": [1, 6], "x": 149.3, "y": 12.8}, + {"flags": 4, "matrix": [1, 0], "x": 0, "y": 12}, + {"flags": 4, "matrix": [1, 1], "x": 24, "y": 12}, + {"flags": 4, "matrix": [1, 2], "x": 49, "y": 12}, + {"flags": 4, "matrix": [1, 3], "x": 74, "y": 12}, + {"flags": 4, "matrix": [1, 4], "x": 99, "y": 12}, + {"flags": 4, "matrix": [1, 5], "x": 124, "y": 12}, + {"flags": 4, "matrix": [1, 6], "x": 149, "y": 12}, - {"flags": 4, "matrix": [2, 0], "x": 0, "y": 25.6}, - {"flags": 4, "matrix": [2, 1], "x": 24.9, "y": 25.6}, - {"flags": 4, "matrix": [2, 2], "x": 49.8, "y": 25.6}, - {"flags": 4, "matrix": [2, 3], "x": 74.6, "y": 32}, - {"flags": 4, "matrix": [2, 4], "x": 90, "y": 25.6}, - {"flags": 4, "matrix": [2, 5], "x": 124.4, "y": 25.6}, - {"flags": 4, "matrix": [2, 6], "x": 149.3, "y": 25.6}, + {"flags": 4, "matrix": [2, 0], "x": 0, "y": 25}, + {"flags": 4, "matrix": [2, 1], "x": 24, "y": 25}, + {"flags": 4, "matrix": [2, 2], "x": 49, "y": 25}, + {"flags": 4, "matrix": [2, 3], "x": 74, "y": 32}, + {"flags": 4, "matrix": [2, 4], "x": 90, "y": 25}, + {"flags": 4, "matrix": [2, 5], "x": 124, "y": 25}, + {"flags": 4, "matrix": [2, 6], "x": 149, "y": 25}, - {"flags": 4, "matrix": [3, 0], "x": 0, "y": 38.4}, - {"flags": 4, "matrix": [3, 1], "x": 24.9, "y": 38.4}, - {"flags": 4, "matrix": [3, 2], "x": 49.8, "y": 38.4}, - {"flags": 4, "matrix": [3, 3], "x": 99.6, "y": 38.4}, - {"flags": 4, "matrix": [3, 4], "x": 124.4, "y": 38.4}, - {"flags": 4, "matrix": [3, 5], "x": 149.3, "y": 38.4}, + {"flags": 4, "matrix": [3, 0], "x": 0, "y": 38}, + {"flags": 4, "matrix": [3, 1], "x": 24, "y": 38}, + {"flags": 4, "matrix": [3, 2], "x": 49, "y": 38}, + {"flags": 4, "matrix": [3, 3], "x": 99, "y": 38}, + {"flags": 4, "matrix": [3, 4], "x": 124, "y": 38}, + {"flags": 4, "matrix": [3, 5], "x": 149, "y": 38}, - {"flags": 4, "matrix": [4, 0], "x": 0, "y": 51.2}, - {"flags": 4, "matrix": [4, 1], "x": 24.9, "y": 51.2}, - {"flags": 4, "matrix": [4, 2], "x": 49.8, "y": 51.2}, - {"flags": 4, "matrix": [4, 3], "x": 74.6, "y": 57.6}, - {"flags": 4, "matrix": [4, 5], "x": 124.4, "y": 51.2}, + {"flags": 4, "matrix": [4, 0], "x": 0, "y": 51}, + {"flags": 4, "matrix": [4, 1], "x": 24, "y": 51}, + {"flags": 4, "matrix": [4, 2], "x": 49, "y": 51}, + {"flags": 4, "matrix": [4, 3], "x": 74, "y": 57}, + {"flags": 4, "matrix": [4, 5], "x": 124, "y": 51}, - {"flags": 4, "matrix": [5, 0], "x": 12.5, "y": 64}, - {"flags": 4, "matrix": [5, 1], "x": 49.8, "y": 64}, - {"flags": 4, "matrix": [5, 2], "x": 99.6, "y": 64}, - {"flags": 4, "matrix": [5, 3], "x": 124.4, "y": 64}, - {"flags": 4, "matrix": [5, 4], "x": 149.3, "y": 64}, + {"flags": 4, "matrix": [5, 0], "x": 12, "y": 64}, + {"flags": 4, "matrix": [5, 1], "x": 49, "y": 64}, + {"flags": 4, "matrix": [5, 2], "x": 99, "y": 64}, + {"flags": 4, "matrix": [5, 3], "x": 124, "y": 64}, + {"flags": 4, "matrix": [5, 4], "x": 149, "y": 64}, {"flags": 2, "x": 224, "y": 64}, - {"flags": 2, "x": 74.6, "y": 64}, + {"flags": 2, "x": 74, "y": 64}, {"flags": 2, "x": 0, "y": 64}, {"flags": 2, "x": 0, "y": 0}, - {"flags": 2, "x": 74.6, "y": 0}, + {"flags": 2, "x": 74, "y": 0}, {"flags": 2, "x": 224, "y": 0} ], "max_brightness": 200, diff --git a/keyboards/handwired/alcor_dactyl/keyboard.json b/keyboards/handwired/alcor_dactyl/keyboard.json index 65f1f804aa94..c179278c097e 100644 --- a/keyboards/handwired/alcor_dactyl/keyboard.json +++ b/keyboards/handwired/alcor_dactyl/keyboard.json @@ -29,8 +29,8 @@ "rgb_matrix": { "driver": "ws2812", "layout": [ - {"x": 0, "y": 0.375}, - {"x": 16.5, "y": 0.38} + {"x": 0, "y": 0}, + {"x": 16, "y": 0} ], "split_count": [1, 1] }, diff --git a/keyboards/input_club/k_type/k_type.c b/keyboards/input_club/k_type/k_type.c index 85bdc7ea7393..c719208af120 100644 --- a/keyboards/input_club/k_type/k_type.c +++ b/keyboards/input_club/k_type/k_type.c @@ -166,19 +166,19 @@ led_config_t g_led_config = { }, { // LED Index to Physical Position // Key LED - { 0, 0 }, { 26.35, 0 }, { 39.53, 0 }, { 52.71, 0 }, { 65.88, 0 }, { 79.06, 0 }, { 92.24, 0 }, { 105.41, 0 }, { 118.59, 0 }, { 131.77, 0 }, { 144.94, 0 }, { 158.12, 0 }, { 171.29, 0 }, { 197.65, 0 }, { 210.82, 0 }, { 224, 0 }, + { 0, 0 }, { 26, 0 }, { 39, 0 }, { 52, 0 }, { 65, 0 }, { 79, 0 }, { 92, 0 }, { 105, 0 }, { 118, 0 }, { 131, 0 }, { 144, 0 }, { 158, 0 }, { 171, 0 }, { 197, 0 }, { 210, 0 }, { 224, 0 }, - { 0, 21.33 }, { 13.18, 21.33 }, { 26.35, 21.33 }, { 39.53, 21.33 }, { 52.71, 21.33 }, { 65.88, 21.33 }, { 79.06, 21.33 }, { 92.24, 21.33 }, { 105.41, 21.33 }, { 118.59, 21.33 }, { 131.77, 21.33 }, { 144.94, 21.33 }, { 158.12, 21.33 }, { 171.29, 21.33 }, { 197.65, 21.33 }, { 210.82, 21.33 }, { 224, 21.33 }, - { 0, 32 }, { 13.18, 32 }, { 26.35, 32 }, { 39.53, 32 }, { 52.71, 32 }, { 65.88, 32 }, { 79.06, 32 }, { 92.24, 32 }, { 105.41, 32 }, { 118.59, 32 }, { 131.77, 32 }, { 144.94, 32 }, { 158.12, 32 }, { 171.29, 32 }, { 197.65, 32 }, { 210.82, 32 }, { 224, 32 }, - { 0, 42.67 }, { 13.18, 42.67 }, { 26.35, 42.67 }, { 39.53, 42.67 }, { 52.71, 42.67 }, { 65.88, 42.67 }, { 79.06, 42.67 }, { 92.24, 42.67 }, { 105.41, 42.67 }, { 118.59, 42.67 }, { 131.77, 42.67 }, { 144.94, 42.67 }, { 171.29, 42.67 }, - { 0, 53.33 }, { 26.35, 53.33 }, { 39.53, 53.33 }, { 52.71, 53.33 }, { 65.88, 53.33 }, { 79.06, 53.33 }, { 92.24, 53.33 }, { 105.41, 53.33 }, { 118.59, 53.33 }, { 131.77, 53.33 }, { 144.94, 53.33 }, { 171.29, 53.33 }, { 210.82, 53.33 }, - { 0, 64 }, { 13.18, 64 }, { 26.35, 64 }, { 79.06, 64 }, { 131.77, 64 }, { 144.94, 64 }, { 158.12, 64 }, { 171.29, 64 }, { 197.65, 64 }, { 210.82, 64 }, { 224, 64 }, + { 0, 21 }, { 13, 21 }, { 26, 21 }, { 39, 21 }, { 52, 21 }, { 65, 21 }, { 79, 21 }, { 92, 21 }, { 105, 21 }, { 118, 21 }, { 131, 21 }, { 144, 21 }, { 158, 21 }, { 171, 21 }, { 197, 21 }, { 210, 21 }, { 224, 21 }, + { 0, 32 }, { 13, 32 }, { 26, 32 }, { 39, 32 }, { 52, 32 }, { 65, 32 }, { 79, 32 }, { 92, 32 }, { 105, 32 }, { 118, 32 }, { 131, 32 }, { 144, 32 }, { 158, 32 }, { 171, 32 }, { 197, 32 }, { 210, 32 }, { 224, 32 }, + { 0, 42 }, { 13, 42 }, { 26, 42 }, { 39, 42 }, { 52, 42 }, { 65, 42 }, { 79, 42 }, { 92, 42 }, { 105, 42 }, { 118, 42 }, { 131, 42 }, { 144, 42 }, { 171, 42 }, + { 0, 53 }, { 26, 53 }, { 39, 53 }, { 52, 53 }, { 65, 53 }, { 79, 53 }, { 92, 53 }, { 105, 53 }, { 118, 53 }, { 131, 53 }, { 144, 53 }, { 171, 53 }, { 210, 53 }, + { 0, 64 }, { 13, 64 }, { 26, 64 }, { 79, 64 }, { 131, 64 }, { 144, 64 }, { 158, 64 }, { 171, 64 }, { 197, 64 }, { 210, 64 }, { 224, 64 }, // Underglow LED - { 224, 64 }, { 206.77, 64 }, { 189.54, 64 }, { 172.31, 64 }, { 155.08, 64 }, { 137.85, 64 }, { 120.61, 64 }, { 103.38, 64 }, { 86.15, 64 }, { 68.92, 64 }, { 51.69, 64 }, { 34.46, 64 }, { 17.23, 64 }, { 0, 64 }, - { 0, 42.67 }, { 0, 21.33 }, - { 0, 0 }, { 17.23, 0 }, { 34.46, 0 }, { 51.69, 0 }, { 68.92, 0 }, { 86.15, 0 }, { 103.38, 0 }, { 120.61, 0 }, { 137.85, 0 }, { 155.08, 0 }, { 172.31, 0 }, { 189.54, 0 }, { 206.77, 0 }, { 224, 0 }, - { 224, 21.33 }, { 224, 42.67 } + { 224, 64 }, { 206, 64 }, { 189, 64 }, { 172, 64 }, { 155, 64 }, { 137, 64 }, { 120, 64 }, { 103, 64 }, { 86, 64 }, { 68, 64 }, { 51, 64 }, { 34, 64 }, { 17, 64 }, { 0, 64 }, + { 0, 42 }, { 0, 21 }, + { 0, 0 }, { 17, 0 }, { 34, 0 }, { 51, 0 }, { 68, 0 }, { 86, 0 }, { 103, 0 }, { 120, 0 }, { 137, 0 }, { 155, 0 }, { 172, 0 }, { 189, 0 }, { 206, 0 }, { 224, 0 }, + { 224, 21 }, { 224, 42 } }, { // LED Index to Flag //Key LED diff --git a/keyboards/kbdfans/kbd75rgb/kbd75rgb.c b/keyboards/kbdfans/kbd75rgb/kbd75rgb.c index 8e39dad6d236..622ca83b681d 100644 --- a/keyboards/kbdfans/kbd75rgb/kbd75rgb.c +++ b/keyboards/kbdfans/kbd75rgb/kbd75rgb.c @@ -26,10 +26,10 @@ led_config_t g_led_config = { { { 83, 82, 81, NO_LED, NO_LED, 80, NO_LED, NO_LED, 79, 78, 77, 76, NO_LED,75 ,74} }, { {0, 0}, {15, 0}, {30, 0},{45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {195, 0}, {210, 0}, {224, 0}, - {224, 12.8}, {218, 12.8},{192, 12.8},{176, 12.8},{160, 12.8},{144, 12.8},{128, 12.8},{112, 12.8},{96, 12.8},{80, 12.8},{64, 12.8},{48, 12.8},{32, 12.8},{16, 12.8},{0, 12.8}, - {0, 25.6},{16, 25.6}, {32, 25.6}, {48, 25.6}, {64, 25.6}, {80, 25.6}, {96, 25.6}, {112, 25.6}, {128, 25.6}, {144, 25.6}, {160, 25.6},{176, 25.6}, {192, 25.6}, {218, 25.6}, {224, 25.6}, -{224, 38.4},{200, 38.4},{176, 38.4},{160, 38.4},{144, 38.4},{128, 38.4},{112, 38.4},{96, 38.4},{80, 38.4},{64, 38.4},{48, 38.4},{32, 38.4},{16, 38.4},{0, 38.4}, - {0, 51.2},{16, 51.2}, {32, 51.2}, {48, 51.2}, {64, 51.2}, {80, 51.2}, {96, 51.2}, {112, 51.2}, {128, 51.2}, {144, 51.2}, {160, 51.2}, {189, 51.2}, {218, 51.2}, {224, 51.2}, + {224, 12}, {218, 12},{192, 12},{176, 12},{160, 12},{144, 12},{128, 12},{112, 12},{96, 12},{80, 12},{64, 12},{48, 12},{32, 12},{16, 12},{0, 12}, + {0, 25},{16, 25}, {32, 25}, {48, 25}, {64, 25}, {80, 25}, {96, 25}, {112, 25}, {128, 25}, {144, 25}, {160, 25},{176, 25}, {192, 25}, {218, 25}, {224, 25}, +{224, 38},{200, 38},{176, 38},{160, 38},{144, 38},{128, 38},{112, 38},{96, 38},{80, 38},{64, 38},{48, 38},{32, 38},{16, 38},{0, 38}, + {0, 51},{16, 51}, {32, 51}, {48, 51}, {64, 51}, {80, 51}, {96, 51}, {112, 51}, {128, 51}, {144, 51}, {160, 51}, {189, 51}, {218, 51}, {224, 51}, {224, 64},{218, 64},{192, 64},{176, 64},{160, 64},{144, 64}, {80, 64}, {32, 64},{16, 64},{0, 64} }, { 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, diff --git a/keyboards/kbdfans/kbdpad/mk3/keyboard.json b/keyboards/kbdfans/kbdpad/mk3/keyboard.json index 735dd3e4ef49..7c741f7633a9 100644 --- a/keyboards/kbdfans/kbdpad/mk3/keyboard.json +++ b/keyboards/kbdfans/kbdpad/mk3/keyboard.json @@ -65,23 +65,23 @@ {"flags": 4, "matrix": [0, 1], "x": 75, "y": 0}, {"flags": 4, "matrix": [0, 2], "x": 150, "y": 0}, {"flags": 4, "matrix": [0, 3], "x": 224, "y": 0}, - {"flags": 4, "matrix": [1, 3], "x": 224, "y": 12.8}, - {"flags": 4, "matrix": [1, 2], "x": 150, "y": 12.8}, - {"flags": 4, "matrix": [1, 1], "x": 75, "y": 12.8}, - {"flags": 4, "matrix": [1, 0], "x": 0, "y": 12.8}, - {"flags": 4, "matrix": [2, 0], "x": 0, "y": 25.6}, - {"flags": 4, "matrix": [2, 1], "x": 75, "y": 25.6}, - {"flags": 4, "matrix": [2, 2], "x": 150, "y": 25.6}, + {"flags": 4, "matrix": [1, 3], "x": 224, "y": 12}, + {"flags": 4, "matrix": [1, 2], "x": 150, "y": 12}, + {"flags": 4, "matrix": [1, 1], "x": 75, "y": 12}, + {"flags": 4, "matrix": [1, 0], "x": 0, "y": 12}, + {"flags": 4, "matrix": [2, 0], "x": 0, "y": 25}, + {"flags": 4, "matrix": [2, 1], "x": 75, "y": 25}, + {"flags": 4, "matrix": [2, 2], "x": 150, "y": 25}, {"flags": 4, "matrix": [2, 3], "x": 224, "y": 32}, - {"flags": 4, "matrix": [3, 2], "x": 150, "y": 38.4}, - {"flags": 4, "matrix": [3, 1], "x": 75, "y": 38.4}, - {"flags": 4, "matrix": [3, 0], "x": 0, "y": 38.4}, - {"flags": 4, "matrix": [4, 0], "x": 0, "y": 51.2}, - {"flags": 4, "matrix": [4, 1], "x": 75, "y": 51.2}, - {"flags": 4, "matrix": [4, 2], "x": 150, "y": 51.24}, - {"flags": 4, "matrix": [4, 3], "x": 224, "y": 57.6}, + {"flags": 4, "matrix": [3, 2], "x": 150, "y": 38}, + {"flags": 4, "matrix": [3, 1], "x": 75, "y": 38}, + {"flags": 4, "matrix": [3, 0], "x": 0, "y": 38}, + {"flags": 4, "matrix": [4, 0], "x": 0, "y": 51}, + {"flags": 4, "matrix": [4, 1], "x": 75, "y": 51}, + {"flags": 4, "matrix": [4, 2], "x": 150, "y": 51}, + {"flags": 4, "matrix": [4, 3], "x": 224, "y": 57}, {"flags": 4, "matrix": [5, 2], "x": 150, "y": 64}, - {"flags": 4, "matrix": [5, 0], "x": 37.5, "y": 64} + {"flags": 4, "matrix": [5, 0], "x": 37, "y": 64} ], "max_brightness": 128, "sleep": true diff --git a/keyboards/keebio/bamfk4/bamfk4.c b/keyboards/keebio/bamfk4/bamfk4.c index 52fe61e39e99..757bc03f7224 100644 --- a/keyboards/keebio/bamfk4/bamfk4.c +++ b/keyboards/keebio/bamfk4/bamfk4.c @@ -10,16 +10,16 @@ led_config_t g_led_config = { { }, { // LED Index to Physical Position //through switch - { 26.6, 10 }, { 4.3, 10 }, { 3.8, 49.3 }, { 23.3, 49.3 }, - { 69.4, 49.3 }, { 68.9, 10 }, { 90.6, 10 }, { 89.5, 49.3 }, - { 134, 49.3 }, { 132.9, 10 }, { 155.7, 10 }, { 155.1, 49.3 }, - { 199.6, 49.3 }, { 199.6, 10 }, { 219.1, 10 }, { 219.1, 49.3 }, + { 26, 10 }, { 4, 10 }, { 3, 49 }, { 23, 49 }, + { 69, 49 }, { 68, 10 }, { 90, 10 }, { 89, 49 }, + { 134, 49 }, { 132, 10 }, { 155, 10 }, { 155, 49 }, + { 199, 49 }, { 199, 10 }, { 219, 10 }, { 219, 49 }, //underglow - { 218, 62.2 }, { 188.7, 62.2 }, { 159.5, 62.2 }, { 123.7, 62.2 }, //bottom right - { 100.3, 62.2 }, { 59.1, 62.2 }, { 35.3, 62.2 }, { 5.4, 62.2 }, //bottom left - { 6, 6.4 }, { 35.3, 6.4 }, { 59.1, 6.4 }, { 100.3, 6.4 }, //top left - { 123.7, 6.4 }, { 159.5, 6.4 }, { 188.7, 6.4 }, { 218, 6.4 } //top right + { 218, 62 }, { 188, 62 }, { 159, 62 }, { 123, 62 }, //bottom right + { 100, 62 }, { 59, 62 }, { 35, 62 }, { 5, 62 }, //bottom left + { 6, 6 }, { 35, 6 }, { 59, 6 }, { 100, 6 }, //top left + { 123, 6 }, { 159, 6 }, { 188, 6 }, { 218, 6 } //top right }, { // LED Index to Flag 4, 4, 4, 4, diff --git a/keyboards/meletrix/zoom98/keyboard.json b/keyboards/meletrix/zoom98/keyboard.json index e58d80f216ef..b7d567295032 100644 --- a/keyboards/meletrix/zoom98/keyboard.json +++ b/keyboards/meletrix/zoom98/keyboard.json @@ -78,17 +78,17 @@ { "matrix": [6, 2], "x": 0, "y": 3, "flags": 4 }, { "matrix": [8, 1], "x": 0, "y": 4, "flags": 4 }, { "matrix": [8, 2], "x": 0, "y": 4, "flags": 4 }, - { "matrix": [1, 8], "x": 20.5, "y": 0, "flags": 4 }, - { "matrix": [1, 7], "x": 20.5, "y": 0, "flags": 4 }, - { "matrix": [3, 8], "x": 20.5, "y": 1, "flags": 4 }, - { "matrix": [3, 7], "x": 20.5, "y": 1, "flags": 4 }, - { "matrix": [5, 8], "x": 20.5, "y": 2, "flags": 4 }, - { "matrix": [5, 7], "x": 20.5, "y": 2, "flags": 4 }, - { "matrix": [7, 8], "x": 20.5, "y": 3, "flags": 4 }, - { "matrix": [7, 7], "x": 20.5, "y": 3, "flags": 4 }, - { "matrix": [9, 8], "x": 20.5, "y": 4, "flags": 4 }, - { "matrix": [9, 7], "x": 20.5, "y": 4, "flags": 4 }, - { "matrix": [6, 0], "x": 0, "y": 3.25, "flags": 1 } + { "matrix": [1, 8], "x": 20, "y": 0, "flags": 4 }, + { "matrix": [1, 7], "x": 20, "y": 0, "flags": 4 }, + { "matrix": [3, 8], "x": 20, "y": 1, "flags": 4 }, + { "matrix": [3, 7], "x": 20, "y": 1, "flags": 4 }, + { "matrix": [5, 8], "x": 20, "y": 2, "flags": 4 }, + { "matrix": [5, 7], "x": 20, "y": 2, "flags": 4 }, + { "matrix": [7, 8], "x": 20, "y": 3, "flags": 4 }, + { "matrix": [7, 7], "x": 20, "y": 3, "flags": 4 }, + { "matrix": [9, 8], "x": 20, "y": 4, "flags": 4 }, + { "matrix": [9, 7], "x": 20, "y": 4, "flags": 4 }, + { "matrix": [6, 0], "x": 0, "y": 3, "flags": 1 } ] }, "matrix_pins": { diff --git a/keyboards/projectd/65/projectd_65_ansi/keyboard.json b/keyboards/projectd/65/projectd_65_ansi/keyboard.json index 5d75389e2a0d..32a95f965eb3 100644 --- a/keyboards/projectd/65/projectd_65_ansi/keyboard.json +++ b/keyboards/projectd/65/projectd_65_ansi/keyboard.json @@ -118,43 +118,43 @@ { "flags": 4, "matrix": [7, 5], "x": 135, "y": 10 }, { "flags": 4, "matrix": [7, 3], "x": 150, "y": 10 }, { "flags": 1, "matrix": [2, 1], "x": 0, "y": 20 }, - { "flags": 4, "matrix": [1, 2], "x": 17.5, "y": 20 }, - { "flags": 4, "matrix": [2, 2], "x": 27.5, "y": 20 }, - { "flags": 4, "matrix": [3, 2], "x": 37.5, "y": 20 }, - { "flags": 4, "matrix": [4, 2], "x": 47.5, "y": 20 }, - { "flags": 4, "matrix": [4, 3], "x": 57.5, "y": 20 }, - { "flags": 4, "matrix": [5, 3], "x": 67.5, "y": 20 }, - { "flags": 4, "matrix": [5, 2], "x": 77.5, "y": 20 }, - { "flags": 4, "matrix": [6, 2], "x": 87.5, "y": 20 }, - { "flags": 4, "matrix": [7, 2], "x": 97.5, "y": 20 }, - { "flags": 4, "matrix": [8, 2], "x": 107.5, "y": 20 }, - { "flags": 4, "matrix": [8, 3], "x": 117.5, "y": 20 }, - { "flags": 4, "matrix": [8, 4], "x": 127.5, "y": 20 }, + { "flags": 4, "matrix": [1, 2], "x": 17, "y": 20 }, + { "flags": 4, "matrix": [2, 2], "x": 27, "y": 20 }, + { "flags": 4, "matrix": [3, 2], "x": 37, "y": 20 }, + { "flags": 4, "matrix": [4, 2], "x": 47, "y": 20 }, + { "flags": 4, "matrix": [4, 3], "x": 57, "y": 20 }, + { "flags": 4, "matrix": [5, 3], "x": 67, "y": 20 }, + { "flags": 4, "matrix": [5, 2], "x": 77, "y": 20 }, + { "flags": 4, "matrix": [6, 2], "x": 87, "y": 20 }, + { "flags": 4, "matrix": [7, 2], "x": 97, "y": 20 }, + { "flags": 4, "matrix": [8, 2], "x": 107, "y": 20 }, + { "flags": 4, "matrix": [8, 3], "x": 117, "y": 20 }, + { "flags": 4, "matrix": [8, 4], "x": 127, "y": 20 }, { "flags": 4, "matrix": [2, 6], "x": 150, "y": 20 }, { "flags": 4, "matrix": [0, 0], "x": 0, "y": 30 }, - { "flags": 4, "matrix": [1, 4], "x": 22.5, "y": 30 }, - { "flags": 4, "matrix": [2, 4], "x": 32.5, "y": 30 }, - { "flags": 4, "matrix": [3, 4], "x": 42.5, "y": 30 }, - { "flags": 4, "matrix": [4, 4], "x": 52.5, "y": 30 }, - { "flags": 4, "matrix": [4, 5], "x": 62.5, "y": 30 }, - { "flags": 4, "matrix": [5, 5], "x": 72.5, "y": 30 }, - { "flags": 4, "matrix": [5, 4], "x": 82.5, "y": 30 }, - { "flags": 4, "matrix": [6, 4], "x": 92.5, "y": 30 }, - { "flags": 4, "matrix": [7, 4], "x": 102.5, "y": 30 }, - { "flags": 4, "matrix": [8, 5], "x": 112.5, "y": 30 }, - { "flags": 4, "matrix": [0, 7], "x": 122.5, "y": 30 }, + { "flags": 4, "matrix": [1, 4], "x": 22, "y": 30 }, + { "flags": 4, "matrix": [2, 4], "x": 32, "y": 30 }, + { "flags": 4, "matrix": [3, 4], "x": 42, "y": 30 }, + { "flags": 4, "matrix": [4, 4], "x": 52, "y": 30 }, + { "flags": 4, "matrix": [4, 5], "x": 62, "y": 30 }, + { "flags": 4, "matrix": [5, 5], "x": 72, "y": 30 }, + { "flags": 4, "matrix": [5, 4], "x": 82, "y": 30 }, + { "flags": 4, "matrix": [6, 4], "x": 92, "y": 30 }, + { "flags": 4, "matrix": [7, 4], "x": 102, "y": 30 }, + { "flags": 4, "matrix": [8, 5], "x": 112, "y": 30 }, + { "flags": 4, "matrix": [0, 7], "x": 122, "y": 30 }, { "flags": 4, "matrix": [1, 6], "x": 140, "y": 30 }, { "flags": 4, "matrix": [6, 3], "x": 150, "y": 30 }, { "flags": 4, "matrix": [0, 6], "x": 0, "y": 40 }, - { "flags": 4, "matrix": [0, 5], "x": 12.5, "y": 40 }, + { "flags": 4, "matrix": [0, 5], "x": 12, "y": 40 }, { "flags": 4, "matrix": [0, 2], "x": 25, "y": 40 }, - { "flags": 4, "x": 61.5, "y": 40 }, - { "flags": 4, "x": 62.5, "y": 40 }, + { "flags": 4, "x": 61, "y": 40 }, + { "flags": 4, "x": 62, "y": 40 }, { "flags": 4, "matrix": [0, 1], "x": 65, "y": 40 }, - { "flags": 4, "x": 67.5, "y": 40 }, - { "flags": 4, "x": 68.5, "y": 40 }, + { "flags": 4, "x": 67, "y": 40 }, + { "flags": 4, "x": 68, "y": 40 }, { "flags": 4, "matrix": [3, 6], "x": 100, "y": 40 }, - { "flags": 4, "matrix": [3, 3], "x": 112.5, "y": 40 }, + { "flags": 4, "matrix": [3, 3], "x": 112, "y": 40 }, { "flags": 4, "matrix": [0, 3], "x": 130, "y": 40 }, { "flags": 4, "matrix": [1, 5], "x": 140, "y": 40 }, { "flags": 4, "matrix": [2, 5], "x": 150, "y": 40 } diff --git a/keyboards/projectd/75/ansi/keyboard.json b/keyboards/projectd/75/ansi/keyboard.json index 2296c639373b..d94db22bfc0f 100644 --- a/keyboards/projectd/75/ansi/keyboard.json +++ b/keyboards/projectd/75/ansi/keyboard.json @@ -88,97 +88,97 @@ "driver": "aw20216s", "layout": [ { "flags": 4, "matrix": [1, 3], "x": 0, "y": 0 }, - { "flags": 4, "matrix": [2, 6], "x": 12.5, "y": 0 }, - { "flags": 4, "matrix": [3, 6], "x": 22.5, "y": 0 }, - { "flags": 4, "matrix": [3, 1], "x": 32.5, "y": 0 }, - { "flags": 4, "matrix": [3, 3], "x": 42.5, "y": 0 }, + { "flags": 4, "matrix": [2, 6], "x": 12, "y": 0 }, + { "flags": 4, "matrix": [3, 6], "x": 22, "y": 0 }, + { "flags": 4, "matrix": [3, 1], "x": 32, "y": 0 }, + { "flags": 4, "matrix": [3, 3], "x": 42, "y": 0 }, { "flags": 4, "matrix": [0, 7], "x": 55, "y": 0 }, { "flags": 4, "matrix": [6, 3], "x": 65, "y": 0 }, { "flags": 4, "matrix": [7, 1], "x": 75, "y": 0 }, { "flags": 4, "matrix": [7, 6], "x": 85, "y": 0 }, - { "flags": 4, "matrix": [10, 6], "x": 97.5, "y": 0 }, - { "flags": 4, "matrix": [10, 7], "x": 107.5, "y": 0 }, - { "flags": 4, "matrix": [10, 3], "x": 117.5, "y": 0 }, - { "flags": 4, "matrix": [10, 5], "x": 127.5, "y": 0 }, + { "flags": 4, "matrix": [10, 6], "x": 97, "y": 0 }, + { "flags": 4, "matrix": [10, 7], "x": 107, "y": 0 }, + { "flags": 4, "matrix": [10, 3], "x": 117, "y": 0 }, + { "flags": 4, "matrix": [10, 5], "x": 127, "y": 0 }, { "flags": 4, "matrix": [9, 7], "x": 140, "y": 0 }, { "flags": 4, "matrix": [6, 5], "x": 155, "y": 0 }, - { "flags": 4, "matrix": [1, 6], "x": 0, "y": 12.5 }, - { "flags": 4, "matrix": [1, 7], "x": 10, "y": 12.5 }, - { "flags": 4, "matrix": [2, 7], "x": 20, "y": 12.5 }, - { "flags": 4, "matrix": [3, 7], "x": 30, "y": 12.5 }, - { "flags": 4, "matrix": [4, 7], "x": 40, "y": 12.5 }, - { "flags": 4, "matrix": [4, 6], "x": 50, "y": 12.5 }, - { "flags": 4, "matrix": [5, 6], "x": 60, "y": 12.5 }, - { "flags": 4, "matrix": [5, 7], "x": 70, "y": 12.5 }, - { "flags": 4, "matrix": [6, 7], "x": 80, "y": 12.5 }, - { "flags": 4, "matrix": [7, 7], "x": 90, "y": 12.5 }, - { "flags": 4, "matrix": [8, 7], "x": 100, "y": 12.5 }, - { "flags": 4, "matrix": [8, 6], "x": 110, "y": 12.5 }, - { "flags": 4, "matrix": [6, 6], "x": 120, "y": 12.5 }, - { "flags": 4, "matrix": [10, 1], "x": 130, "y": 12.5 }, - { "flags": 4, "matrix": [0, 2], "x": 155, "y": 12.5 }, + { "flags": 4, "matrix": [1, 6], "x": 0, "y": 12 }, + { "flags": 4, "matrix": [1, 7], "x": 10, "y": 12 }, + { "flags": 4, "matrix": [2, 7], "x": 20, "y": 12 }, + { "flags": 4, "matrix": [3, 7], "x": 30, "y": 12 }, + { "flags": 4, "matrix": [4, 7], "x": 40, "y": 12 }, + { "flags": 4, "matrix": [4, 6], "x": 50, "y": 12 }, + { "flags": 4, "matrix": [5, 6], "x": 60, "y": 12 }, + { "flags": 4, "matrix": [5, 7], "x": 70, "y": 12 }, + { "flags": 4, "matrix": [6, 7], "x": 80, "y": 12 }, + { "flags": 4, "matrix": [7, 7], "x": 90, "y": 12 }, + { "flags": 4, "matrix": [8, 7], "x": 100, "y": 12 }, + { "flags": 4, "matrix": [8, 6], "x": 110, "y": 12 }, + { "flags": 4, "matrix": [6, 6], "x": 120, "y": 12 }, + { "flags": 4, "matrix": [10, 1], "x": 130, "y": 12 }, + { "flags": 4, "matrix": [0, 2], "x": 155, "y": 12 }, - { "flags": 4, "matrix": [1, 1], "x": 0, "y": 22.5 }, - { "flags": 4, "matrix": [1, 0], "x": 15, "y": 22.5 }, - { "flags": 4, "matrix": [2, 0], "x": 25, "y": 22.5 }, - { "flags": 4, "matrix": [3, 0], "x": 35, "y": 22.5 }, - { "flags": 4, "matrix": [4, 0], "x": 45, "y": 22.5 }, - { "flags": 4, "matrix": [4, 1], "x": 55, "y": 22.5 }, - { "flags": 4, "matrix": [5, 1], "x": 65, "y": 22.5 }, - { "flags": 4, "matrix": [5, 0], "x": 75, "y": 22.5 }, - { "flags": 4, "matrix": [6, 0], "x": 85, "y": 22.5 }, - { "flags": 4, "matrix": [7, 0], "x": 95, "y": 22.5 }, - { "flags": 4, "matrix": [8, 0], "x": 105, "y": 22.5 }, - { "flags": 4, "matrix": [8, 1], "x": 115, "y": 22.5 }, - { "flags": 4, "matrix": [6, 1], "x": 125, "y": 22.5 }, - { "flags": 4, "matrix": [10, 2], "x": 135, "y": 22.5 }, - { "flags": 4, "matrix": [1, 5], "x": 155, "y": 22.5 }, + { "flags": 4, "matrix": [1, 1], "x": 0, "y": 22 }, + { "flags": 4, "matrix": [1, 0], "x": 15, "y": 22 }, + { "flags": 4, "matrix": [2, 0], "x": 25, "y": 22 }, + { "flags": 4, "matrix": [3, 0], "x": 35, "y": 22 }, + { "flags": 4, "matrix": [4, 0], "x": 45, "y": 22 }, + { "flags": 4, "matrix": [4, 1], "x": 55, "y": 22 }, + { "flags": 4, "matrix": [5, 1], "x": 65, "y": 22 }, + { "flags": 4, "matrix": [5, 0], "x": 75, "y": 22 }, + { "flags": 4, "matrix": [6, 0], "x": 85, "y": 22 }, + { "flags": 4, "matrix": [7, 0], "x": 95, "y": 22 }, + { "flags": 4, "matrix": [8, 0], "x": 105, "y": 22 }, + { "flags": 4, "matrix": [8, 1], "x": 115, "y": 22 }, + { "flags": 4, "matrix": [6, 1], "x": 125, "y": 22 }, + { "flags": 4, "matrix": [10, 2], "x": 135, "y": 22 }, + { "flags": 4, "matrix": [1, 5], "x": 155, "y": 22 }, - { "flags": 8, "matrix": [2, 1], "x": 0, "y": 32.5 }, - { "flags": 4, "matrix": [1, 2], "x": 17.5, "y": 32.5 }, - { "flags": 4, "matrix": [2, 2], "x": 27.5, "y": 32.5 }, - { "flags": 4, "matrix": [3, 2], "x": 37.5, "y": 32.5 }, - { "flags": 4, "matrix": [4, 2], "x": 47.5, "y": 32.5 }, - { "flags": 4, "matrix": [4, 3], "x": 57.5, "y": 32.5 }, - { "flags": 4, "matrix": [5, 3], "x": 67.5, "y": 32.5 }, - { "flags": 4, "matrix": [5, 2], "x": 77.5, "y": 32.5 }, - { "flags": 4, "matrix": [6, 2], "x": 87.5, "y": 32.5 }, - { "flags": 4, "matrix": [7, 2], "x": 97.5, "y": 32.5 }, - { "flags": 4, "matrix": [8, 2], "x": 107.5, "y": 32.5 }, - { "flags": 4, "matrix": [8, 3], "x": 117.5, "y": 32.5 }, - { "flags": 4, "matrix": [10, 4], "x": 127.5, "y": 32.5 }, - { "flags": 4, "matrix": [2, 5], "x": 155, "y": 32.5 }, + { "flags": 8, "matrix": [2, 1], "x": 0, "y": 32 }, + { "flags": 4, "matrix": [1, 2], "x": 17, "y": 32 }, + { "flags": 4, "matrix": [2, 2], "x": 27, "y": 32 }, + { "flags": 4, "matrix": [3, 2], "x": 37, "y": 32 }, + { "flags": 4, "matrix": [4, 2], "x": 47, "y": 32 }, + { "flags": 4, "matrix": [4, 3], "x": 57, "y": 32 }, + { "flags": 4, "matrix": [5, 3], "x": 67, "y": 32 }, + { "flags": 4, "matrix": [5, 2], "x": 77, "y": 32 }, + { "flags": 4, "matrix": [6, 2], "x": 87, "y": 32 }, + { "flags": 4, "matrix": [7, 2], "x": 97, "y": 32 }, + { "flags": 4, "matrix": [8, 2], "x": 107, "y": 32 }, + { "flags": 4, "matrix": [8, 3], "x": 117, "y": 32 }, + { "flags": 4, "matrix": [10, 4], "x": 127, "y": 32 }, + { "flags": 4, "matrix": [2, 5], "x": 155, "y": 32 }, - { "flags": 4, "matrix": [0, 0], "x": 0, "y": 42.5 }, - { "flags": 4, "matrix": [1, 4], "x": 22.5, "y": 42.5 }, - { "flags": 4, "matrix": [2, 4], "x": 32.5, "y": 42.5 }, - { "flags": 4, "matrix": [3, 4], "x": 42.5, "y": 42.5 }, - { "flags": 4, "matrix": [4, 4], "x": 52.5, "y": 42.5 }, - { "flags": 4, "matrix": [4, 5], "x": 62.5, "y": 42.5 }, - { "flags": 4, "matrix": [5, 5], "x": 72.5, "y": 42.5 }, - { "flags": 4, "matrix": [5, 4], "x": 82.5, "y": 42.5 }, - { "flags": 4, "matrix": [6, 4], "x": 92.5, "y": 42.5 }, - { "flags": 4, "matrix": [7, 4], "x": 102.5, "y": 42.5 }, - { "flags": 4, "matrix": [8, 5], "x": 112.5, "y": 42.5 }, - { "flags": 4, "matrix": [9, 1], "x": 122.5, "y": 42.5 }, - { "flags": 4, "matrix": [3, 5], "x": 142.5, "y": 45 }, - { "flags": 4, "matrix": [7, 5], "x": 155, "y": 42.5 }, + { "flags": 4, "matrix": [0, 0], "x": 0, "y": 42 }, + { "flags": 4, "matrix": [1, 4], "x": 22, "y": 42 }, + { "flags": 4, "matrix": [2, 4], "x": 32, "y": 42 }, + { "flags": 4, "matrix": [3, 4], "x": 42, "y": 42 }, + { "flags": 4, "matrix": [4, 4], "x": 52, "y": 42 }, + { "flags": 4, "matrix": [4, 5], "x": 62, "y": 42 }, + { "flags": 4, "matrix": [5, 5], "x": 72, "y": 42 }, + { "flags": 4, "matrix": [5, 4], "x": 82, "y": 42 }, + { "flags": 4, "matrix": [6, 4], "x": 92, "y": 42 }, + { "flags": 4, "matrix": [7, 4], "x": 102, "y": 42 }, + { "flags": 4, "matrix": [8, 5], "x": 112, "y": 42 }, + { "flags": 4, "matrix": [9, 1], "x": 122, "y": 42 }, + { "flags": 4, "matrix": [3, 5], "x": 142, "y": 45 }, + { "flags": 4, "matrix": [7, 5], "x": 155, "y": 42 }, - { "flags": 4, "matrix": [0, 6], "x": 0, "y": 52.5 }, - { "flags": 4, "matrix": [9, 0], "x": 12.5, "y": 52.5 }, - { "flags": 4, "matrix": [9, 3], "x": 25, "y": 52.5 }, - { "flags": 4, "x": 61.5, "y": 52.5 }, - { "flags": 4, "x": 62.5, "y": 52.5 }, - { "flags": 4, "matrix": [9, 4], "x": 65, "y": 52.5 }, - { "flags": 4, "x": 67.5, "y": 52.5 }, - { "flags": 4, "x": 68.5, "y": 52.5 }, - { "flags": 4, "matrix": [9, 5], "x": 100, "y": 52.5 }, - { "flags": 4, "matrix": [9, 2], "x": 110, "y": 52.5 }, - { "flags": 4, "matrix": [0, 4], "x": 120, "y": 52.5 }, - { "flags": 4, "matrix": [0, 3], "x": 132.5, "y": 52.5 }, - { "flags": 4, "matrix": [7, 3], "x": 142.5, "y": 52.5 }, - { "flags": 4, "matrix": [0, 5], "x": 152.5, "y": 52.5 } + { "flags": 4, "matrix": [0, 6], "x": 0, "y": 52 }, + { "flags": 4, "matrix": [9, 0], "x": 12, "y": 52 }, + { "flags": 4, "matrix": [9, 3], "x": 25, "y": 52 }, + { "flags": 4, "x": 61, "y": 52 }, + { "flags": 4, "x": 62, "y": 52 }, + { "flags": 4, "matrix": [9, 4], "x": 65, "y": 52 }, + { "flags": 4, "x": 67, "y": 52 }, + { "flags": 4, "x": 68, "y": 52 }, + { "flags": 4, "matrix": [9, 5], "x": 100, "y": 52 }, + { "flags": 4, "matrix": [9, 2], "x": 110, "y": 52 }, + { "flags": 4, "matrix": [0, 4], "x": 120, "y": 52 }, + { "flags": 4, "matrix": [0, 3], "x": 132, "y": 52 }, + { "flags": 4, "matrix": [7, 3], "x": 142, "y": 52 }, + { "flags": 4, "matrix": [0, 5], "x": 152, "y": 52 } ], "sleep": true }, diff --git a/keyboards/projectd/75/iso/keyboard.json b/keyboards/projectd/75/iso/keyboard.json index d86150003163..d42e8c4b3393 100644 --- a/keyboards/projectd/75/iso/keyboard.json +++ b/keyboards/projectd/75/iso/keyboard.json @@ -82,98 +82,98 @@ "sleep": true, "layout": [ { "flags": 4, "matrix": [1, 3], "x": 0, "y": 0 }, - { "flags": 4, "matrix": [2, 6], "x": 12.5, "y": 0 }, - { "flags": 4, "matrix": [3, 6], "x": 22.5, "y": 0 }, - { "flags": 4, "matrix": [3, 1], "x": 32.5, "y": 0 }, - { "flags": 4, "matrix": [3, 3], "x": 42.5, "y": 0 }, + { "flags": 4, "matrix": [2, 6], "x": 12, "y": 0 }, + { "flags": 4, "matrix": [3, 6], "x": 22, "y": 0 }, + { "flags": 4, "matrix": [3, 1], "x": 32, "y": 0 }, + { "flags": 4, "matrix": [3, 3], "x": 42, "y": 0 }, { "flags": 4, "matrix": [0, 7], "x": 55, "y": 0 }, { "flags": 4, "matrix": [6, 3], "x": 65, "y": 0 }, { "flags": 4, "matrix": [7, 1], "x": 75, "y": 0 }, { "flags": 4, "matrix": [7, 6], "x": 85, "y": 0 }, - { "flags": 4, "matrix": [10, 6], "x": 97.5, "y": 0 }, - { "flags": 4, "matrix": [10, 7], "x": 107.5, "y": 0 }, - { "flags": 4, "matrix": [10, 3], "x": 117.5, "y": 0 }, - { "flags": 4, "matrix": [10, 5], "x": 127.5, "y": 0 }, + { "flags": 4, "matrix": [10, 6], "x": 97, "y": 0 }, + { "flags": 4, "matrix": [10, 7], "x": 107, "y": 0 }, + { "flags": 4, "matrix": [10, 3], "x": 117, "y": 0 }, + { "flags": 4, "matrix": [10, 5], "x": 127, "y": 0 }, { "flags": 4, "matrix": [9, 7], "x": 140, "y": 0 }, { "flags": 4, "matrix": [6, 5], "x": 155, "y": 0 }, - { "flags": 4, "matrix": [1, 6], "x": 0, "y": 12.5 }, - { "flags": 4, "matrix": [1, 7], "x": 10, "y": 12.5 }, - { "flags": 4, "matrix": [2, 7], "x": 20, "y": 12.5 }, - { "flags": 4, "matrix": [3, 7], "x": 30, "y": 12.5 }, - { "flags": 4, "matrix": [4, 7], "x": 40, "y": 12.5 }, - { "flags": 4, "matrix": [4, 6], "x": 50, "y": 12.5 }, - { "flags": 4, "matrix": [5, 6], "x": 60, "y": 12.5 }, - { "flags": 4, "matrix": [5, 7], "x": 70, "y": 12.5 }, - { "flags": 4, "matrix": [6, 7], "x": 80, "y": 12.5 }, - { "flags": 4, "matrix": [7, 7], "x": 90, "y": 12.5 }, - { "flags": 4, "matrix": [8, 7], "x": 100, "y": 12.5 }, - { "flags": 4, "matrix": [8, 6], "x": 110, "y": 12.5 }, - { "flags": 4, "matrix": [6, 6], "x": 120, "y": 12.5 }, - { "flags": 4, "matrix": [10, 1], "x": 130, "y": 12.5 }, - { "flags": 4, "matrix": [0, 2], "x": 155, "y": 12.5 }, + { "flags": 4, "matrix": [1, 6], "x": 0, "y": 12 }, + { "flags": 4, "matrix": [1, 7], "x": 10, "y": 12 }, + { "flags": 4, "matrix": [2, 7], "x": 20, "y": 12 }, + { "flags": 4, "matrix": [3, 7], "x": 30, "y": 12 }, + { "flags": 4, "matrix": [4, 7], "x": 40, "y": 12 }, + { "flags": 4, "matrix": [4, 6], "x": 50, "y": 12 }, + { "flags": 4, "matrix": [5, 6], "x": 60, "y": 12 }, + { "flags": 4, "matrix": [5, 7], "x": 70, "y": 12 }, + { "flags": 4, "matrix": [6, 7], "x": 80, "y": 12 }, + { "flags": 4, "matrix": [7, 7], "x": 90, "y": 12 }, + { "flags": 4, "matrix": [8, 7], "x": 100, "y": 12 }, + { "flags": 4, "matrix": [8, 6], "x": 110, "y": 12 }, + { "flags": 4, "matrix": [6, 6], "x": 120, "y": 12 }, + { "flags": 4, "matrix": [10, 1], "x": 130, "y": 12 }, + { "flags": 4, "matrix": [0, 2], "x": 155, "y": 12 }, - { "flags": 4, "matrix": [1, 1], "x": 0, "y": 22.5 }, - { "flags": 4, "matrix": [1, 0], "x": 15, "y": 22.5 }, - { "flags": 4, "matrix": [2, 0], "x": 25, "y": 22.5 }, - { "flags": 4, "matrix": [3, 0], "x": 35, "y": 22.5 }, - { "flags": 4, "matrix": [4, 0], "x": 45, "y": 22.5 }, - { "flags": 4, "matrix": [4, 1], "x": 55, "y": 22.5 }, - { "flags": 4, "matrix": [5, 1], "x": 65, "y": 22.5 }, - { "flags": 4, "matrix": [5, 0], "x": 75, "y": 22.5 }, - { "flags": 4, "matrix": [6, 0], "x": 85, "y": 22.5 }, - { "flags": 4, "matrix": [7, 0], "x": 95, "y": 22.5 }, - { "flags": 4, "matrix": [8, 0], "x": 105, "y": 22.5 }, - { "flags": 4, "matrix": [8, 1], "x": 115, "y": 22.5 }, - { "flags": 4, "matrix": [6, 1], "x": 125, "y": 22.5 }, - { "flags": 4, "matrix": [1, 5], "x": 155.5, "y": 22.5 }, + { "flags": 4, "matrix": [1, 1], "x": 0, "y": 22 }, + { "flags": 4, "matrix": [1, 0], "x": 15, "y": 22 }, + { "flags": 4, "matrix": [2, 0], "x": 25, "y": 22 }, + { "flags": 4, "matrix": [3, 0], "x": 35, "y": 22 }, + { "flags": 4, "matrix": [4, 0], "x": 45, "y": 22 }, + { "flags": 4, "matrix": [4, 1], "x": 55, "y": 22 }, + { "flags": 4, "matrix": [5, 1], "x": 65, "y": 22 }, + { "flags": 4, "matrix": [5, 0], "x": 75, "y": 22 }, + { "flags": 4, "matrix": [6, 0], "x": 85, "y": 22 }, + { "flags": 4, "matrix": [7, 0], "x": 95, "y": 22 }, + { "flags": 4, "matrix": [8, 0], "x": 105, "y": 22 }, + { "flags": 4, "matrix": [8, 1], "x": 115, "y": 22 }, + { "flags": 4, "matrix": [6, 1], "x": 125, "y": 22 }, + { "flags": 4, "matrix": [1, 5], "x": 155, "y": 22 }, - { "flags": 8, "matrix": [2, 1], "x": 0, "y": 32.5 }, - { "flags": 4, "matrix": [1, 2], "x": 17.5, "y": 32.5 }, - { "flags": 4, "matrix": [2, 2], "x": 27.5, "y": 32.5 }, - { "flags": 4, "matrix": [3, 2], "x": 37.5, "y": 32.5 }, - { "flags": 4, "matrix": [4, 2], "x": 47.5, "y": 32.5 }, - { "flags": 4, "matrix": [4, 3], "x": 57.5, "y": 32.5 }, - { "flags": 4, "matrix": [5, 3], "x": 67.5, "y": 32.5 }, - { "flags": 4, "matrix": [5, 2], "x": 77.5, "y": 32.5 }, - { "flags": 4, "matrix": [6, 2], "x": 87.5, "y": 32.5 }, - { "flags": 4, "matrix": [7, 2], "x": 97.5, "y": 32.5 }, - { "flags": 4, "matrix": [8, 2], "x": 107.5, "y": 32.5 }, - { "flags": 4, "matrix": [8, 3], "x": 117.5, "y": 32.5 }, - { "flags": 4, "matrix": [10, 2], "x": 127.5, "y": 32.5 }, - { "flags": 4, "matrix": [10, 4], "x": 137.5, "y": 22.5 }, - { "flags": 4, "matrix": [2, 5], "x": 155.5, "y": 32.5 }, + { "flags": 8, "matrix": [2, 1], "x": 0, "y": 32 }, + { "flags": 4, "matrix": [1, 2], "x": 17, "y": 32 }, + { "flags": 4, "matrix": [2, 2], "x": 27, "y": 32 }, + { "flags": 4, "matrix": [3, 2], "x": 37, "y": 32 }, + { "flags": 4, "matrix": [4, 2], "x": 47, "y": 32 }, + { "flags": 4, "matrix": [4, 3], "x": 57, "y": 32 }, + { "flags": 4, "matrix": [5, 3], "x": 67, "y": 32 }, + { "flags": 4, "matrix": [5, 2], "x": 77, "y": 32 }, + { "flags": 4, "matrix": [6, 2], "x": 87, "y": 32 }, + { "flags": 4, "matrix": [7, 2], "x": 97, "y": 32 }, + { "flags": 4, "matrix": [8, 2], "x": 107, "y": 32 }, + { "flags": 4, "matrix": [8, 3], "x": 117, "y": 32 }, + { "flags": 4, "matrix": [10, 2], "x": 127, "y": 32 }, + { "flags": 4, "matrix": [10, 4], "x": 137, "y": 22 }, + { "flags": 4, "matrix": [2, 5], "x": 155, "y": 32 }, - { "flags": 4, "matrix": [0, 0], "x": 0, "y": 42.5 }, - { "flags": 4, "matrix": [0, 1], "x": 12.5, "y": 42.5 }, - { "flags": 4, "matrix": [1, 4], "x": 22.5, "y": 42.5 }, - { "flags": 4, "matrix": [2, 4], "x": 32.5, "y": 42.5 }, - { "flags": 4, "matrix": [3, 4], "x": 42.5, "y": 42.5 }, - { "flags": 4, "matrix": [4, 4], "x": 52.5, "y": 42.5 }, - { "flags": 4, "matrix": [4, 5], "x": 62.5, "y": 42.5 }, - { "flags": 4, "matrix": [5, 5], "x": 72.5, "y": 42.5 }, - { "flags": 4, "matrix": [5, 4], "x": 82.5, "y": 42.5 }, - { "flags": 4, "matrix": [6, 4], "x": 92.5, "y": 42.5 }, - { "flags": 4, "matrix": [7, 4], "x": 102.5, "y": 42.5 }, - { "flags": 4, "matrix": [8, 5], "x": 112.5, "y": 42.5 }, - { "flags": 4, "matrix": [9, 1], "x": 122.5, "y": 42.5 }, - { "flags": 4, "matrix": [3, 5], "x": 142.5, "y": 45 }, - { "flags": 4, "matrix": [7, 5], "x": 155, "y": 42.5 }, + { "flags": 4, "matrix": [0, 0], "x": 0, "y": 42 }, + { "flags": 4, "matrix": [0, 1], "x": 12, "y": 42 }, + { "flags": 4, "matrix": [1, 4], "x": 22, "y": 42 }, + { "flags": 4, "matrix": [2, 4], "x": 32, "y": 42 }, + { "flags": 4, "matrix": [3, 4], "x": 42, "y": 42 }, + { "flags": 4, "matrix": [4, 4], "x": 52, "y": 42 }, + { "flags": 4, "matrix": [4, 5], "x": 62, "y": 42 }, + { "flags": 4, "matrix": [5, 5], "x": 72, "y": 42 }, + { "flags": 4, "matrix": [5, 4], "x": 82, "y": 42 }, + { "flags": 4, "matrix": [6, 4], "x": 92, "y": 42 }, + { "flags": 4, "matrix": [7, 4], "x": 102, "y": 42 }, + { "flags": 4, "matrix": [8, 5], "x": 112, "y": 42 }, + { "flags": 4, "matrix": [9, 1], "x": 122, "y": 42 }, + { "flags": 4, "matrix": [3, 5], "x": 142, "y": 45 }, + { "flags": 4, "matrix": [7, 5], "x": 155, "y": 42 }, - { "flags": 4, "matrix": [0, 6], "x": 0, "y": 52.5 }, - { "flags": 4, "matrix": [9, 0], "x": 12.5, "y": 52.5 }, - { "flags": 4, "matrix": [9, 3], "x": 25, "y": 52.5 }, - { "flags": 4, "x": 61.5, "y": 52.5 }, - { "flags": 4, "x": 62.5, "y": 52.5 }, - { "flags": 4, "matrix": [9, 4], "x": 65, "y": 52.5 }, - { "flags": 4, "x": 67.5, "y": 52.5 }, - { "flags": 4, "x": 68.5, "y": 52.5 }, - { "flags": 4, "matrix": [9, 5], "x": 100, "y": 52.5 }, - { "flags": 4, "matrix": [9, 2], "x": 110, "y": 52.5 }, - { "flags": 4, "matrix": [0, 4], "x": 120, "y": 52.5 }, - { "flags": 4, "matrix": [0, 3], "x": 132.5, "y": 52.5 }, - { "flags": 4, "matrix": [7, 3], "x": 142.5, "y": 52.5 }, - { "flags": 4, "matrix": [0, 5], "x": 152.5, "y": 52.5 } + { "flags": 4, "matrix": [0, 6], "x": 0, "y": 52 }, + { "flags": 4, "matrix": [9, 0], "x": 12, "y": 52 }, + { "flags": 4, "matrix": [9, 3], "x": 25, "y": 52 }, + { "flags": 4, "x": 61, "y": 52 }, + { "flags": 4, "x": 62, "y": 52 }, + { "flags": 4, "matrix": [9, 4], "x": 65, "y": 52 }, + { "flags": 4, "x": 67, "y": 52 }, + { "flags": 4, "x": 68, "y": 52 }, + { "flags": 4, "matrix": [9, 5], "x": 100, "y": 52 }, + { "flags": 4, "matrix": [9, 2], "x": 110, "y": 52 }, + { "flags": 4, "matrix": [0, 4], "x": 120, "y": 52 }, + { "flags": 4, "matrix": [0, 3], "x": 132, "y": 52 }, + { "flags": 4, "matrix": [7, 3], "x": 142, "y": 52 }, + { "flags": 4, "matrix": [0, 5], "x": 152, "y": 52 } ] }, "url": "", diff --git a/keyboards/rot13labs/h4ckb0ard/keyboard.json b/keyboards/rot13labs/h4ckb0ard/keyboard.json index 0ffe5be40de9..4ac783774de6 100644 --- a/keyboards/rot13labs/h4ckb0ard/keyboard.json +++ b/keyboards/rot13labs/h4ckb0ard/keyboard.json @@ -67,38 +67,38 @@ {"flags": 4, "matrix": [0, 0], "x": 11, "y": 0}, {"flags": 4, "matrix": [1, 0], "x": 0, "y": 1}, - {"flags": 4, "matrix": [1, 1], "x": 1.25, "y": 1}, - {"flags": 4, "matrix": [1, 2], "x": 2.25, "y": 1}, - {"flags": 4, "matrix": [1, 3], "x": 3.25, "y": 1}, - {"flags": 4, "matrix": [1, 4], "x": 4.25, "y": 1}, - {"flags": 4, "matrix": [1, 5], "x": 5.25, "y": 1}, - {"flags": 4, "matrix": [1, 6], "x": 6.25, "y": 1}, - {"flags": 4, "matrix": [1, 7], "x": 7.25, "y": 1}, - {"flags": 4, "matrix": [1, 8], "x": 8.25, "y": 1}, - {"flags": 4, "matrix": [1, 9], "x": 9.25, "y": 1}, - {"flags": 4, "matrix": [1, 11], "x": 10.25, "y": 1}, + {"flags": 4, "matrix": [1, 1], "x": 1, "y": 1}, + {"flags": 4, "matrix": [1, 2], "x": 2, "y": 1}, + {"flags": 4, "matrix": [1, 3], "x": 3, "y": 1}, + {"flags": 4, "matrix": [1, 4], "x": 4, "y": 1}, + {"flags": 4, "matrix": [1, 5], "x": 5, "y": 1}, + {"flags": 4, "matrix": [1, 6], "x": 6, "y": 1}, + {"flags": 4, "matrix": [1, 7], "x": 7, "y": 1}, + {"flags": 4, "matrix": [1, 8], "x": 8, "y": 1}, + {"flags": 4, "matrix": [1, 9], "x": 9, "y": 1}, + {"flags": 4, "matrix": [1, 11], "x": 10, "y": 1}, {"flags": 4, "matrix": [2, 11], "x": 0, "y": 2}, - {"flags": 4, "matrix": [2, 10], "x": 1.75, "y": 2}, - {"flags": 4, "matrix": [2, 8], "x": 2.75, "y": 2}, - {"flags": 4, "matrix": [2, 7], "x": 3.75, "y": 2}, - {"flags": 4, "matrix": [2, 6], "x": 4.75, "y": 2}, - {"flags": 4, "matrix": [2, 5], "x": 5.75, "y": 2}, - {"flags": 4, "matrix": [2, 4], "x": 6.75, "y": 2}, - {"flags": 4, "matrix": [2, 3], "x": 7.75, "y": 2}, - {"flags": 4, "matrix": [2, 2], "x": 8.75, "y": 2}, - {"flags": 4, "matrix": [2, 1], "x": 10.5, "y": 2}, - {"flags": 4, "matrix": [2, 0], "x": 11.5, "y": 2}, + {"flags": 4, "matrix": [2, 10], "x": 1, "y": 2}, + {"flags": 4, "matrix": [2, 8], "x": 2, "y": 2}, + {"flags": 4, "matrix": [2, 7], "x": 3, "y": 2}, + {"flags": 4, "matrix": [2, 6], "x": 4, "y": 2}, + {"flags": 4, "matrix": [2, 5], "x": 5, "y": 2}, + {"flags": 4, "matrix": [2, 4], "x": 6, "y": 2}, + {"flags": 4, "matrix": [2, 3], "x": 7, "y": 2}, + {"flags": 4, "matrix": [2, 2], "x": 8, "y": 2}, + {"flags": 4, "matrix": [2, 1], "x": 10, "y": 2}, + {"flags": 4, "matrix": [2, 0], "x": 11, "y": 2}, {"flags": 4, "matrix": [3, 0], "x": 0, "y": 3}, - {"flags": 4, "matrix": [3, 1], "x": 1.25, "y": 3}, - {"flags": 4, "matrix": [3, 2], "x": 2.5, "y": 3}, - {"flags": 4, "matrix": [3, 4], "x": 3.5, "y": 3}, - {"flags": 4, "matrix": [3, 6], "x": 5.75, "y": 3}, - {"flags": 4, "matrix": [3, 8], "x": 8.5, "y": 3}, - {"flags": 4, "matrix": [3, 9], "x": 9.5, "y": 3}, - {"flags": 4, "matrix": [3, 10], "x": 10.5, "y": 3}, - {"flags": 4, "matrix": [3, 11], "x": 11.5, "y": 3} + {"flags": 4, "matrix": [3, 1], "x": 1, "y": 3}, + {"flags": 4, "matrix": [3, 2], "x": 2, "y": 3}, + {"flags": 4, "matrix": [3, 4], "x": 3, "y": 3}, + {"flags": 4, "matrix": [3, 6], "x": 5, "y": 3}, + {"flags": 4, "matrix": [3, 8], "x": 8, "y": 3}, + {"flags": 4, "matrix": [3, 9], "x": 9, "y": 3}, + {"flags": 4, "matrix": [3, 10], "x": 10, "y": 3}, + {"flags": 4, "matrix": [3, 11], "x": 11, "y": 3} ], "max_brightness": 100 diff --git a/keyboards/skeletonkbd/frost68/keyboard.json b/keyboards/skeletonkbd/frost68/keyboard.json index 0411a3826d55..28b819e0d010 100644 --- a/keyboards/skeletonkbd/frost68/keyboard.json +++ b/keyboards/skeletonkbd/frost68/keyboard.json @@ -76,74 +76,74 @@ }, "driver": "ws2812", "layout": [ - {"matrix": [0, 0], "x": 33.1, "y": 3.7, "flags": 4}, - {"matrix": [0, 1], "x": 45.7, "y": 3.7, "flags": 4}, - {"matrix": [0, 2], "x": 58.3, "y": 2.4, "flags": 4}, - {"matrix": [0, 3], "x": 71.1, "y": 6.4, "flags": 4}, - {"matrix": [0, 4], "x": 83.4, "y": 10.4, "flags": 4}, - {"matrix": [0, 5], "x": 95.7, "y": 14.3, "flags": 4}, - {"matrix": [0, 6], "x": 108, "y": 18.3, "flags": 4}, - {"matrix": [1, 5], "x": 99.3, "y": 35, "flags": 4}, - {"matrix": [1, 4], "x": 86.9, "y": 31, "flags": 4}, - {"matrix": [1, 3], "x": 74.6, "y": 27, "flags": 4}, - {"matrix": [1, 2], "x": 62.3, "y": 23.1, "flags": 4}, - {"matrix": [1, 1], "x": 49.2, "y": 22.7, "flags": 4}, - {"matrix": [1, 0], "x": 33.5, "y": 22.7, "flags": 1}, - {"matrix": [2, 0], "x": 32.3, "y": 41.8, "flags": 1}, - {"matrix": [2, 1], "x": 49.7, "y": 41.8, "flags": 4}, - {"matrix": [2, 2], "x": 62.7, "y": 42.7, "flags": 4}, - {"matrix": [2, 3], "x": 75.1, "y": 46.7, "flags": 4}, - {"matrix": [2, 4], "x": 87.4, "y": 50.6, "flags": 4}, - {"matrix": [2, 5], "x": 99.7, "y": 54.6, "flags": 4}, - {"matrix": [3, 5], "x": 103.3, "y": 75.2, "flags": 4}, - {"matrix": [3, 4], "x": 90.9, "y": 71.2, "flags": 4}, - {"matrix": [3, 3], "x": 78.6, "y": 67.3, "flags": 4}, - {"matrix": [3, 2], "x": 66.3, "y": 63.3, "flags": 4}, - {"matrix": [3, 1], "x": 53.3, "y": 60.8, "flags": 4}, - {"matrix": [3, 0], "x": 32.8, "y": 60.8, "flags": 1}, - {"matrix": [4, 0], "x": 28.1, "y": 79.9, "flags": 1}, - {"matrix": [4, 1], "x": 47, "y": 79.9, "flags": 1}, - {"matrix": [4, 3], "x": 80.6, "y": 87.4, "flags": 4}, - {"matrix": [4, 5], "x": 100.6, "y": 93.8, "flags": 4}, - {"matrix": [4, 7], "x": 140.2, "y": 90.4, "flags": 4}, - {"matrix": [4, 10], "x": 166.4, "y": 82.5, "flags": 1}, - {"matrix": [4, 12], "x": 195.7, "y": 79.9, "flags": 1}, - {"matrix": [4, 13], "x": 211.4, "y": 79.9, "flags": 4}, - {"matrix": [4, 14], "x": 224, "y": 79.9, "flags": 4}, - {"matrix": [4, 15], "x": 236.6, "y": 79.9, "flags": 4}, - {"matrix": [3, 14], "x": 224, "y": 60.8, "flags": 4}, - {"matrix": [3, 13], "x": 206.7, "y": 60.8, "flags": 1}, - {"matrix": [3, 12], "x": 189.4, "y": 60.8, "flags": 4}, - {"matrix": [3, 11], "x": 176.8, "y": 60.8, "flags": 4}, - {"matrix": [3, 10], "x": 163.7, "y": 63.3, "flags": 4}, - {"matrix": [3, 9], "x": 151.4, "y": 67.3, "flags": 4}, - {"matrix": [3, 8], "x": 139.1, "y": 71.2, "flags": 4}, - {"matrix": [3, 7], "x": 126.8, "y": 75.2, "flags": 4}, - {"matrix": [2, 7], "x": 130.3, "y": 54.6, "flags": 4}, - {"matrix": [2, 8], "x": 142.6, "y": 50.6, "flags": 4}, - {"matrix": [2, 9], "x": 155, "y": 46.7, "flags": 4}, - {"matrix": [2, 10], "x": 167.3, "y": 42.7, "flags": 4}, - {"matrix": [2, 11], "x": 180.4, "y": 41.8, "flags": 4}, - {"matrix": [2, 12], "x": 193, "y": 41.8, "flags": 4}, - {"matrix": [2, 13], "x": 213.4, "y": 41.8, "flags": 4}, - {"matrix": [2, 15], "x": 236.6, "y": 39.6, "flags": 4}, - {"matrix": [1, 15], "x": 235.3, "y": 20.5, "flags": 4}, - {"matrix": [1, 14], "x": 217.4, "y": 22.7, "flags": 4}, - {"matrix": [1, 13], "x": 201.6, "y": 22.7, "flags": 4}, - {"matrix": [1, 12], "x": 189, "y": 22.7, "flags": 4}, - {"matrix": [1, 11], "x": 176.4, "y": 22, "flags": 4}, - {"matrix": [1, 10], "x": 163.4, "y": 24.5, "flags": 4}, - {"matrix": [1, 9], "x": 151.1, "y": 28.4, "flags": 4}, - {"matrix": [1, 8], "x": 138.7, "y": 32.4, "flags": 4}, - {"matrix": [1, 7], "x": 126.4, "y": 36.4, "flags": 4}, - {"matrix": [0, 7], "x": 128.1, "y": 16.3, "flags": 4}, - {"matrix": [0, 8], "x": 140.5, "y": 12.4, "flags": 4}, - {"matrix": [0, 9], "x": 152.8, "y": 8.4, "flags": 4}, - {"matrix": [0, 10], "x": 165.1, "y": 4.4, "flags": 4}, - {"matrix": [0, 11], "x": 178.2, "y": 2.9, "flags": 4}, - {"matrix": [0, 12], "x": 190.8, "y": 3.7, "flags": 4}, - {"matrix": [0, 14], "x": 209.7, "y": 3.7, "flags": 1}, - {"matrix": [0, 15], "x": 233.9, "y": 1.5, "flags": 4} + {"matrix": [0, 0], "x": 33, "y": 3, "flags": 4}, + {"matrix": [0, 1], "x": 45, "y": 3, "flags": 4}, + {"matrix": [0, 2], "x": 58, "y": 2, "flags": 4}, + {"matrix": [0, 3], "x": 71, "y": 6, "flags": 4}, + {"matrix": [0, 4], "x": 83, "y": 10, "flags": 4}, + {"matrix": [0, 5], "x": 95, "y": 14, "flags": 4}, + {"matrix": [0, 6], "x": 108, "y": 18, "flags": 4}, + {"matrix": [1, 5], "x": 99, "y": 35, "flags": 4}, + {"matrix": [1, 4], "x": 86, "y": 31, "flags": 4}, + {"matrix": [1, 3], "x": 74, "y": 27, "flags": 4}, + {"matrix": [1, 2], "x": 62, "y": 23, "flags": 4}, + {"matrix": [1, 1], "x": 49, "y": 22, "flags": 4}, + {"matrix": [1, 0], "x": 33, "y": 22, "flags": 1}, + {"matrix": [2, 0], "x": 32, "y": 41, "flags": 1}, + {"matrix": [2, 1], "x": 49, "y": 41, "flags": 4}, + {"matrix": [2, 2], "x": 62, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 75, "y": 46, "flags": 4}, + {"matrix": [2, 4], "x": 87, "y": 50, "flags": 4}, + {"matrix": [2, 5], "x": 99, "y": 54, "flags": 4}, + {"matrix": [3, 5], "x": 103, "y": 75, "flags": 4}, + {"matrix": [3, 4], "x": 90, "y": 71, "flags": 4}, + {"matrix": [3, 3], "x": 78, "y": 67, "flags": 4}, + {"matrix": [3, 2], "x": 66, "y": 63, "flags": 4}, + {"matrix": [3, 1], "x": 53, "y": 60, "flags": 4}, + {"matrix": [3, 0], "x": 32, "y": 60, "flags": 1}, + {"matrix": [4, 0], "x": 28, "y": 79, "flags": 1}, + {"matrix": [4, 1], "x": 47, "y": 79, "flags": 1}, + {"matrix": [4, 3], "x": 80, "y": 87, "flags": 4}, + {"matrix": [4, 5], "x": 100, "y": 93, "flags": 4}, + {"matrix": [4, 7], "x": 140, "y": 90, "flags": 4}, + {"matrix": [4, 10], "x": 166, "y": 82, "flags": 1}, + {"matrix": [4, 12], "x": 195, "y": 79, "flags": 1}, + {"matrix": [4, 13], "x": 211, "y": 79, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 79, "flags": 4}, + {"matrix": [4, 15], "x": 236, "y": 79, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 60, "flags": 4}, + {"matrix": [3, 13], "x": 206, "y": 60, "flags": 1}, + {"matrix": [3, 12], "x": 189, "y": 60, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 60, "flags": 4}, + {"matrix": [3, 10], "x": 163, "y": 63, "flags": 4}, + {"matrix": [3, 9], "x": 151, "y": 67, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 71, "flags": 4}, + {"matrix": [3, 7], "x": 126, "y": 75, "flags": 4}, + {"matrix": [2, 7], "x": 130, "y": 54, "flags": 4}, + {"matrix": [2, 8], "x": 142, "y": 50, "flags": 4}, + {"matrix": [2, 9], "x": 155, "y": 46, "flags": 4}, + {"matrix": [2, 10], "x": 167, "y": 42, "flags": 4}, + {"matrix": [2, 11], "x": 180, "y": 41, "flags": 4}, + {"matrix": [2, 12], "x": 193, "y": 41, "flags": 4}, + {"matrix": [2, 13], "x": 213, "y": 41, "flags": 4}, + {"matrix": [2, 15], "x": 236, "y": 39, "flags": 4}, + {"matrix": [1, 15], "x": 235, "y": 20, "flags": 4}, + {"matrix": [1, 14], "x": 217, "y": 22, "flags": 4}, + {"matrix": [1, 13], "x": 201, "y": 22, "flags": 4}, + {"matrix": [1, 12], "x": 189, "y": 22, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 22, "flags": 4}, + {"matrix": [1, 10], "x": 163, "y": 24, "flags": 4}, + {"matrix": [1, 9], "x": 151, "y": 28, "flags": 4}, + {"matrix": [1, 8], "x": 138, "y": 32, "flags": 4}, + {"matrix": [1, 7], "x": 126, "y": 36, "flags": 4}, + {"matrix": [0, 7], "x": 128, "y": 16, "flags": 4}, + {"matrix": [0, 8], "x": 140, "y": 12, "flags": 4}, + {"matrix": [0, 9], "x": 152, "y": 8, "flags": 4}, + {"matrix": [0, 10], "x": 165, "y": 4, "flags": 4}, + {"matrix": [0, 11], "x": 178, "y": 2, "flags": 4}, + {"matrix": [0, 12], "x": 190, "y": 3, "flags": 4}, + {"matrix": [0, 14], "x": 209, "y": 3, "flags": 1}, + {"matrix": [0, 15], "x": 233, "y": 1, "flags": 4} ], "max_brightness": 118, "react_on_keyup": true, diff --git a/keyboards/theone/keyboard.json b/keyboards/theone/keyboard.json index 0f1d8e021ccf..3b4fc99d0521 100644 --- a/keyboards/theone/keyboard.json +++ b/keyboards/theone/keyboard.json @@ -115,31 +115,31 @@ {"matrix": [2, 13], "x": 135, "y": 20, "flags": 4}, {"matrix": [1, 16], "x": 152, "y": 20, "flags": 4}, {"matrix": [2, 16], "x": 152, "y": 30, "flags": 4}, - {"matrix": [3, 13], "x": 127.5, "y": 30, "flags": 4}, - {"matrix": [3, 11], "x": 117.5, "y": 30, "flags": 4}, - {"matrix": [3, 10], "x": 107.5, "y": 30, "flags": 4}, - {"matrix": [3, 9], "x": 97.5, "y": 30, "flags": 4}, - {"matrix": [3, 8], "x": 87.5, "y": 30, "flags": 4}, - {"matrix": [3, 7], "x": 77.5, "y": 30, "flags": 4}, - {"matrix": [3, 6], "x": 67.5, "y": 30, "flags": 4}, - {"matrix": [3, 5], "x": 57.5, "y": 30, "flags": 4}, - {"matrix": [3, 4], "x": 47.5, "y": 30, "flags": 4}, - {"matrix": [3, 3], "x": 37.5, "y": 30, "flags": 4}, - {"matrix": [3, 2], "x": 27.5, "y": 30, "flags": 4}, - {"matrix": [3, 1], "x": 17.5, "y": 30, "flags": 4}, + {"matrix": [3, 13], "x": 127, "y": 30, "flags": 4}, + {"matrix": [3, 11], "x": 117, "y": 30, "flags": 4}, + {"matrix": [3, 10], "x": 107, "y": 30, "flags": 4}, + {"matrix": [3, 9], "x": 97, "y": 30, "flags": 4}, + {"matrix": [3, 8], "x": 87, "y": 30, "flags": 4}, + {"matrix": [3, 7], "x": 77, "y": 30, "flags": 4}, + {"matrix": [3, 6], "x": 67, "y": 30, "flags": 4}, + {"matrix": [3, 5], "x": 57, "y": 30, "flags": 4}, + {"matrix": [3, 4], "x": 47, "y": 30, "flags": 4}, + {"matrix": [3, 3], "x": 37, "y": 30, "flags": 4}, + {"matrix": [3, 2], "x": 27, "y": 30, "flags": 4}, + {"matrix": [3, 1], "x": 17, "y": 30, "flags": 4}, {"matrix": [3, 0], "x": 0, "y": 30, "flags": 4}, {"matrix": [4, 0], "x": 0, "y": 40, "flags": 4}, - {"matrix": [4, 2], "x": 22.5, "y": 40, "flags": 4}, - {"matrix": [4, 3], "x": 32.5, "y": 40, "flags": 4}, - {"matrix": [4, 4], "x": 42.5, "y": 40, "flags": 4}, - {"matrix": [4, 5], "x": 52.5, "y": 40, "flags": 4}, - {"matrix": [4, 6], "x": 62.5, "y": 40, "flags": 4}, - {"matrix": [4, 7], "x": 72.5, "y": 40, "flags": 4}, - {"matrix": [4, 8], "x": 82.5, "y": 40, "flags": 4}, - {"matrix": [4, 9], "x": 92.5, "y": 40, "flags": 4}, - {"matrix": [4, 10], "x": 102.5, "y": 40, "flags": 4}, - {"matrix": [4, 11], "x": 112.5, "y": 40, "flags": 4}, - {"matrix": [4, 13], "x": 122.5, "y": 40, "flags": 4}, + {"matrix": [4, 2], "x": 22, "y": 40, "flags": 4}, + {"matrix": [4, 3], "x": 32, "y": 40, "flags": 4}, + {"matrix": [4, 4], "x": 42, "y": 40, "flags": 4}, + {"matrix": [4, 5], "x": 52, "y": 40, "flags": 4}, + {"matrix": [4, 6], "x": 62, "y": 40, "flags": 4}, + {"matrix": [4, 7], "x": 72, "y": 40, "flags": 4}, + {"matrix": [4, 8], "x": 82, "y": 40, "flags": 4}, + {"matrix": [4, 9], "x": 92, "y": 40, "flags": 4}, + {"matrix": [4, 10], "x": 102, "y": 40, "flags": 4}, + {"matrix": [4, 11], "x": 112, "y": 40, "flags": 4}, + {"matrix": [4, 13], "x": 122, "y": 40, "flags": 4}, {"matrix": [4, 14], "x": 142, "y": 42, "flags": 4}, {"matrix": [5, 15], "x": 152, "y": 52, "flags": 4}, {"matrix": [5, 14], "x": 142, "y": 52, "flags": 4}, @@ -147,9 +147,9 @@ {"matrix": [5, 12], "x": 120, "y": 50, "flags": 4}, {"matrix": [5, 10], "x": 110, "y": 50, "flags": 4}, {"matrix": [5, 9], "x": 100, "y": 50, "flags": 4}, - {"matrix": [5, 6], "x": 37.5, "y": 50, "flags": 4}, + {"matrix": [5, 6], "x": 37, "y": 50, "flags": 4}, {"matrix": [5, 2], "x": 25, "y": 50, "flags": 4}, - {"matrix": [5, 1], "x": 12.5, "y": 50, "flags": 4}, + {"matrix": [5, 1], "x": 12, "y": 50, "flags": 4}, {"matrix": [5, 0], "x": 0, "y": 50, "flags": 4} ], "max_brightness": 130, From 51acd35e6f2196ca1d9a1328be92355b128d8239 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 17 Jun 2024 19:22:47 +0100 Subject: [PATCH 0051/1205] Implement data driven serial driver (#23923) --- data/mappings/info_rules.hjson | 1 + data/schemas/keyboard.jsonschema | 10 ++++++++++ docs/reference_info_json.md | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson index 97611bcf587c..384bc87b7839 100644 --- a/data/mappings/info_rules.hjson +++ b/data/mappings/info_rules.hjson @@ -41,6 +41,7 @@ "RGB_MATRIX_DRIVER": {"info_key": "rgb_matrix.driver"}, "RGBLIGHT_DRIVER": {"info_key": "rgblight.driver"}, "SECURE_ENABLE": {"info_key": "secure.enabled", "value_type": "bool"}, + "SERIAL_DRIVER": {"info_key": "split.serial.driver"}, "SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"}, "SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false}, "STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index e5802fe07dd9..5b63acf8e80e 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -799,6 +799,16 @@ "minimum": 0, "maximum": 5 }, + "serial": { + "type": "object", + "additionalProperties": false, + "properties": { + "driver": { + "type": "string", + "enum": ["bitbang", "usart", "vendor"] + } + } + }, "transport": { "type": "object", "additionalProperties": false, diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 2db2cd14277a..a7a6caff7994 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -732,6 +732,10 @@ Configures the [Split Keyboard](features/split_keyboard) feature. * `matrix_pins` * `right` * See [Matrix](#matrix) config. + * `serial` + * `driver` + * The driver to use. Must be one of `bitbang`, `usart`, `vendor`. + * Default: `"bitbang"` * `soft_serial_pin` * The GPIO pin to use (`serial` transport protocol only). * `soft_serial_speed` From baa564bddfa0b1bfc7689bc42ec3d1cd7abb7a13 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 18 Jun 2024 05:23:45 +1000 Subject: [PATCH 0052/1205] Remove references to bootloadHID flashing page in keyboard readmes (#23942) * Remove references to bootloadHID flashing page in keyboard readmes * Remove bootloadHID flashing page --- docs/_aliases.json | 1 + docs/_sidebar.json | 8 +-- docs/flashing_bootloadhid.md | 74 ----------------------- keyboards/amag23/readme.md | 2 +- keyboards/ares/readme.md | 2 +- keyboards/bfake/readme.md | 2 +- keyboards/db/db63/readme.md | 2 +- keyboards/donutcables/budget96/readme.md | 2 +- keyboards/eve/meteor/readme.md | 2 +- keyboards/exclusive/e6v2/le_bmc/readme.md | 2 +- keyboards/exclusive/e6v2/oe_bmc/readme.md | 2 +- keyboards/exent/readme.md | 2 +- keyboards/facew/readme.md | 2 +- keyboards/foxlab/time80/readme.md | 6 +- keyboards/ft/mars65/readme.md | 2 +- keyboards/ft/mars80/readme.md | 2 +- keyboards/gray_studio/hb85/readme.md | 2 +- keyboards/j80/readme.md | 2 +- keyboards/jaykeeb/skyline/readme.md | 2 +- keyboards/jc65/v32a/readme.md | 2 +- keyboards/kbdfans/kbdpad/mk1/readme.md | 2 +- keyboards/keychron/q2/readme.md | 2 +- keyboards/keychron/q4/readme.md | 2 +- keyboards/keychron/q60/readme.md | 2 +- keyboards/keychron/q65/readme.md | 2 +- keyboards/keychron/v2/readme.md | 2 +- keyboards/keychron/v4/readme.md | 2 +- keyboards/keychron/v7/readme.md | 2 +- keyboards/keychron/v8/readme.md | 2 +- keyboards/kira/kira80/readme.md | 2 +- keyboards/kprepublic/jj40/rev1/readme.md | 2 +- keyboards/kprepublic/jj4x4/readme.md | 2 +- keyboards/kprepublic/jj50/rev1/readme.md | 2 +- keyboards/leeku/finger65/readme.md | 2 +- keyboards/mechkeys/mechmini/v1/readme.md | 2 +- keyboards/mehkee96/readme.md | 2 +- keyboards/mt/mt40/readme.md | 2 +- keyboards/mt/split75/readme.md | 2 +- keyboards/oddforge/vea/readme.md | 2 +- keyboards/panc60/readme.md | 2 +- keyboards/pearl/readme.md | 2 +- keyboards/percent/canoe/readme.md | 2 +- keyboards/percent/skog/readme.md | 2 +- keyboards/percent/skog_lite/readme.md | 2 +- keyboards/singa/readme.md | 2 +- keyboards/spiderisland/split78/readme.md | 2 +- keyboards/tgr/910/readme.md | 2 +- keyboards/tgr/910ce/readme.md | 2 +- keyboards/tgr/alice/readme.md | 2 +- keyboards/tgr/jane/v2/readme.md | 2 +- keyboards/tgr/jane/v2ce/readme.md | 2 +- keyboards/tgr/tris/readme.md | 2 +- keyboards/unikorn/readme.md | 2 +- keyboards/winkeyless/b87/readme.md | 2 +- keyboards/winkeyless/bface/readme.md | 2 +- keyboards/winkeyless/bmini/readme.md | 2 +- keyboards/winkeyless/bminiex/readme.md | 2 +- keyboards/ymdk/bface/readme.md | 2 +- keyboards/ymdk/np21/readme.md | 2 +- keyboards/ymdk/sp64/readme.md | 2 +- keyboards/ymdk/ymd75/rev1/readme.md | 2 +- keyboards/ymdk/ymd75/rev2/readme.md | 2 +- keyboards/ymdk/ymd96/readme.md | 2 +- 63 files changed, 63 insertions(+), 144 deletions(-) delete mode 100644 docs/flashing_bootloadhid.md diff --git a/docs/_aliases.json b/docs/_aliases.json index a2224bd0d547..f06e032215c4 100644 --- a/docs/_aliases.json +++ b/docs/_aliases.json @@ -4,6 +4,7 @@ "/cli_dev_configuration": "/cli_configuration", "/dynamic_macros": "/feature_dynamic_macros", "/feature_common_shortcuts": "/feature_advanced_keycodes", + "/flashing_bootloadhid": "/flashing", "/getting_started_build_tools": "/newbs_getting_started", "/getting_started_getting_help": "/support", "/glossary": "/reference_glossary", diff --git a/docs/_sidebar.json b/docs/_sidebar.json index 2f64607deaee..5935865a7ade 100644 --- a/docs/_sidebar.json +++ b/docs/_sidebar.json @@ -64,13 +64,7 @@ "text": "Development Environments", "items": [{ "text": "Docker Guide", "link": "/getting_started_docker" }] }, - { - "text": "Flashing", - "items": [ - { "text": "Flashing", "link": "/flashing" }, - { "text": "Flashing ATmega32A (ps2avrgb)", "link": "/flashing_bootloadhid" } - ] - }, + { "text": "Flashing", "link": "/flashing" }, { "text": "IDEs", "items": [ diff --git a/docs/flashing_bootloadhid.md b/docs/flashing_bootloadhid.md deleted file mode 100644 index 2d1696c6e746..000000000000 --- a/docs/flashing_bootloadhid.md +++ /dev/null @@ -1,74 +0,0 @@ -# BootloadHID Flashing Instructions and Bootloader Information - -ps2avr(GB) boards use an ATmega32A microcontroller and a different bootloader. It is not flashable using the regular QMK methods. - -General flashing sequence: - -1. Enter the bootloader using any of the following methods: - * Tap the `QK_BOOT` keycode (may not work on all devices) - * Hold the salt key while plugging the keyboard in (usually documented within keyboard readme) -2. Wait for the OS to detect the device -3. Flash a .hex file -4. Reset the device into application mode (may be done automatically) - -## bootloadHID Flashing Target - -::: tip -Using the QMK installation script, detailed [here](newbs_getting_started), the required bootloadHID tools should be automatically installed. -::: - -To flash via the command line, use the target `:bootloadhid` by executing the following command: - -``` -make ::bootloadhid -``` - -## GUI Flashing - -### Windows -1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). -2. Place your keyboard into reset. -3. Ensure the configured VendorID is `16c0` and ProductID is `05df` -4. Press the `Find Device` button and ensure that your keyboard is found. -5. Press the `Open .hex File` button and locate the `.hex` file you created. -6. Press the `Flash Device` button and wait for the process to complete. - -## Command Line Flashing - -1. Place your keyboard into reset. -2. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. - -### Windows Manual Installation -For MSYS2: -1. Download the BootloadHID firmware package from https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz. -2. Extract contents using a compatible tool, for example 7-Zip. -3. Add to the MSYS path by copying `commandline/bootloadHID.exe` from the extracted archive to your MSYS2 installation, typically `C:\msys64\usr\bin`. - -For native Windows flashing, the `bootloadHID.exe` can be used outside of the MSYS2 environment. - -### Linux Manual Installation -1. Install libusb development dependency: - ``` - # This depends on OS - for Debian the following works - sudo apt-get install libusb-dev - ``` -2. Download the BootloadHID firmware package: - ``` - wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp - ``` -3. Build the bootloadHID executable: - ``` - cd /tmp/bootloadHID.2012-12-08/commandline/ - make - sudo cp bootloadHID /usr/local/bin - ``` - -### MacOS Manual Installation -1. Install Homebrew by typing the following: - ``` - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - ``` -2. Install the following packages: - ``` - brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb - ``` diff --git a/keyboards/amag23/readme.md b/keyboards/amag23/readme.md index 30791a5cfb8b..70fb7f8b2c78 100644 --- a/keyboards/amag23/readme.md +++ b/keyboards/amag23/readme.md @@ -15,7 +15,7 @@ Make example for this keyboard (after setting up your build environment): make amag23:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make amag23:default:flash diff --git a/keyboards/ares/readme.md b/keyboards/ares/readme.md index a1e04ecf91e1..b443489406c8 100644 --- a/keyboards/ares/readme.md +++ b/keyboards/ares/readme.md @@ -8,7 +8,7 @@ Make example for this keyboard (after setting up your build environment): make ares:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make ares:default:flash diff --git a/keyboards/bfake/readme.md b/keyboards/bfake/readme.md index df319cd7c51c..ced1bd0e81f6 100644 --- a/keyboards/bfake/readme.md +++ b/keyboards/bfake/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make bfake:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make bfake:default:flash diff --git a/keyboards/db/db63/readme.md b/keyboards/db/db63/readme.md index e886bed0a1a7..09ea46a3ce24 100644 --- a/keyboards/db/db63/readme.md +++ b/keyboards/db/db63/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make db/db63:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make db/db63:default:flash diff --git a/keyboards/donutcables/budget96/readme.md b/keyboards/donutcables/budget96/readme.md index 9cdb3a01bf68..b082c2af0ff1 100644 --- a/keyboards/donutcables/budget96/readme.md +++ b/keyboards/donutcables/budget96/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make donutcables/budget96:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make donutcables/budget96:default:flash diff --git a/keyboards/eve/meteor/readme.md b/keyboards/eve/meteor/readme.md index 69d5a35ece76..43bc09911847 100644 --- a/keyboards/eve/meteor/readme.md +++ b/keyboards/eve/meteor/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make eve/meteor:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make eve/meteor:default:flash diff --git a/keyboards/exclusive/e6v2/le_bmc/readme.md b/keyboards/exclusive/e6v2/le_bmc/readme.md index d999982671b2..ada5a64a608c 100644 --- a/keyboards/exclusive/e6v2/le_bmc/readme.md +++ b/keyboards/exclusive/e6v2/le_bmc/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make exclusive/e6v2/le_bmc:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make exclusive/e6v2/le_bmc:default:flash diff --git a/keyboards/exclusive/e6v2/oe_bmc/readme.md b/keyboards/exclusive/e6v2/oe_bmc/readme.md index c259728edf13..95d1f85c0a01 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/readme.md +++ b/keyboards/exclusive/e6v2/oe_bmc/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make exclusive/e6v2/oe_bmc:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make exclusive/e6v2/oe_bmc:default:flash diff --git a/keyboards/exent/readme.md b/keyboards/exent/readme.md index d30bed91a577..dbdf69ae96e9 100644 --- a/keyboards/exent/readme.md +++ b/keyboards/exent/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make exent:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](flashing_bootloadhid.md)) +Flashing example for this keyboard: make exent:default:flash diff --git a/keyboards/facew/readme.md b/keyboards/facew/readme.md index a852a4f46dc5..6c392a32e2ad 100644 --- a/keyboards/facew/readme.md +++ b/keyboards/facew/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make facew:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make facew:default:flash diff --git a/keyboards/foxlab/time80/readme.md b/keyboards/foxlab/time80/readme.md index 58ad56040082..9f04a07dd68f 100644 --- a/keyboards/foxlab/time80/readme.md +++ b/keyboards/foxlab/time80/readme.md @@ -15,13 +15,11 @@ Make example for this keyboard (after setting up your build environment): make foxlab/time80:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make foxlab/time80:default:flash -**Reset Key**: There are no reset switches or pads. Follow this -[guide](https://docs.qmk.fm/#/flashing_bootloadhid) -to have it flashed for the first time. Remember to add a `QK_BOOT` +**Reset Key**: There are no reset switches or pads. Remember to add a `QK_BOOT` key on your keymap for future endeavors. 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). diff --git a/keyboards/ft/mars65/readme.md b/keyboards/ft/mars65/readme.md index 6853994ee43b..55373214f898 100644 --- a/keyboards/ft/mars65/readme.md +++ b/keyboards/ft/mars65/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make ft/mars65:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make ft/mars65:default:flash diff --git a/keyboards/ft/mars80/readme.md b/keyboards/ft/mars80/readme.md index 3d108300bb7f..f4aa3b5f7742 100644 --- a/keyboards/ft/mars80/readme.md +++ b/keyboards/ft/mars80/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make ft/mars80:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make ft/mars80:default:flash diff --git a/keyboards/gray_studio/hb85/readme.md b/keyboards/gray_studio/hb85/readme.md index 523f774c83da..4307e61b571a 100644 --- a/keyboards/gray_studio/hb85/readme.md +++ b/keyboards/gray_studio/hb85/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make gray_studio/hb85:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make gray_studio/hb85:default:flash diff --git a/keyboards/j80/readme.md b/keyboards/j80/readme.md index 44ed46fe4507..8ce90cca746f 100644 --- a/keyboards/j80/readme.md +++ b/keyboards/j80/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make j80:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make j80:default:flash diff --git a/keyboards/jaykeeb/skyline/readme.md b/keyboards/jaykeeb/skyline/readme.md index 92291310e045..6f58ba33def2 100644 --- a/keyboards/jaykeeb/skyline/readme.md +++ b/keyboards/jaykeeb/skyline/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make jaykeeb/skyline:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make jaykeeb/skyline:default:flash diff --git a/keyboards/jc65/v32a/readme.md b/keyboards/jc65/v32a/readme.md index 8a139ca66444..6695793f935b 100644 --- a/keyboards/jc65/v32a/readme.md +++ b/keyboards/jc65/v32a/readme.md @@ -16,7 +16,7 @@ Make example for this keyboard (after setting up your build environment): make jc65/v32a:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make jc65/v32a:default:flash diff --git a/keyboards/kbdfans/kbdpad/mk1/readme.md b/keyboards/kbdfans/kbdpad/mk1/readme.md index 27194e683f47..43d0ebf8776f 100644 --- a/keyboards/kbdfans/kbdpad/mk1/readme.md +++ b/keyboards/kbdfans/kbdpad/mk1/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make kbdfans/kbdpad/mk1:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make kbdfans/kbdpad/mk1:default:flash diff --git a/keyboards/keychron/q2/readme.md b/keyboards/keychron/q2/readme.md index 69a2d892ff07..3abd7280ca4f 100644 --- a/keyboards/keychron/q2/readme.md +++ b/keyboards/keychron/q2/readme.md @@ -17,7 +17,7 @@ Make example for this keyboard (after setting up your build environment): make keychron/q2/jis:default make keychron/q2/jis_encoder:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make keychron/q2/ansi:default:flash make keychron/q2/ansi_encoder:default:flash diff --git a/keyboards/keychron/q4/readme.md b/keyboards/keychron/q4/readme.md index 711eeadbb4d7..de4c6927138b 100644 --- a/keyboards/keychron/q4/readme.md +++ b/keyboards/keychron/q4/readme.md @@ -16,7 +16,7 @@ Make example for this keyboard (after setting up your build environment): make keychron/q4/ansi/v2:default make keychron/q4/iso:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make keychron/q4/ansi/v1:default:flash make keychron/q4/ansi/v2:default:flash diff --git a/keyboards/keychron/q60/readme.md b/keyboards/keychron/q60/readme.md index 6e546ae1e15f..7ef775c7bee0 100644 --- a/keyboards/keychron/q60/readme.md +++ b/keyboards/keychron/q60/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make keychron/q60/ansi:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make keychron/q60/ansi:default:flash diff --git a/keyboards/keychron/q65/readme.md b/keyboards/keychron/q65/readme.md index 1a2a27dc752e..708ed013e008 100644 --- a/keyboards/keychron/q65/readme.md +++ b/keyboards/keychron/q65/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make keychron/q65/ansi_encoder:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make keychron/q65/ansi_encoder:default:flash diff --git a/keyboards/keychron/v2/readme.md b/keyboards/keychron/v2/readme.md index 7836a457fbd9..4d3de284da88 100644 --- a/keyboards/keychron/v2/readme.md +++ b/keyboards/keychron/v2/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make keychron/v2/ansi:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make keychron/v2/ansi:default:flash diff --git a/keyboards/keychron/v4/readme.md b/keyboards/keychron/v4/readme.md index 62846a5e70a0..e35f47a44894 100644 --- a/keyboards/keychron/v4/readme.md +++ b/keyboards/keychron/v4/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make keychron/v4/ansi:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make keychron/v4/ansi:default:flash diff --git a/keyboards/keychron/v7/readme.md b/keyboards/keychron/v7/readme.md index 2a156494429f..fb44a0fc5f90 100644 --- a/keyboards/keychron/v7/readme.md +++ b/keyboards/keychron/v7/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make keychron/v7/ansi:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make keychron/v7/ansi:default:flash diff --git a/keyboards/keychron/v8/readme.md b/keyboards/keychron/v8/readme.md index 9d37ba16161a..8473f4fc9803 100644 --- a/keyboards/keychron/v8/readme.md +++ b/keyboards/keychron/v8/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make keychron/v8/ansi:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make keychron/v8/ansi:default:flash diff --git a/keyboards/kira/kira80/readme.md b/keyboards/kira/kira80/readme.md index c9816a12462f..e6d4d78d7238 100644 --- a/keyboards/kira/kira80/readme.md +++ b/keyboards/kira/kira80/readme.md @@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment): make kira/kira80:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make kira/kira80:default:flash diff --git a/keyboards/kprepublic/jj40/rev1/readme.md b/keyboards/kprepublic/jj40/rev1/readme.md index 49f644849e97..96ee7dc099e9 100644 --- a/keyboards/kprepublic/jj40/rev1/readme.md +++ b/keyboards/kprepublic/jj40/rev1/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make kprepublic/jj40/rev1:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make kprepublic/jj40/rev1:default:flash diff --git a/keyboards/kprepublic/jj4x4/readme.md b/keyboards/kprepublic/jj4x4/readme.md index b6e58661682b..37853ac36a89 100644 --- a/keyboards/kprepublic/jj4x4/readme.md +++ b/keyboards/kprepublic/jj4x4/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make kprepublic/jj4x4:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make kprepublic/jj4x4:default:flash diff --git a/keyboards/kprepublic/jj50/rev1/readme.md b/keyboards/kprepublic/jj50/rev1/readme.md index 643dfc54da3c..ff276b1c7113 100644 --- a/keyboards/kprepublic/jj50/rev1/readme.md +++ b/keyboards/kprepublic/jj50/rev1/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make kprepublic/jj50/rev1:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make kprepublic/jj50/rev1:default:flash diff --git a/keyboards/leeku/finger65/readme.md b/keyboards/leeku/finger65/readme.md index c27ce5d48930..715fa76fe2a9 100644 --- a/keyboards/leeku/finger65/readme.md +++ b/keyboards/leeku/finger65/readme.md @@ -9,7 +9,7 @@ Make example for this keyboard (after setting up your build environment): make leeku/finger65:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make leeku/finger65:default:flash diff --git a/keyboards/mechkeys/mechmini/v1/readme.md b/keyboards/mechkeys/mechmini/v1/readme.md index d6b88d9c0485..7e789115a585 100644 --- a/keyboards/mechkeys/mechmini/v1/readme.md +++ b/keyboards/mechkeys/mechmini/v1/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make mechkeys/mechmini/v1:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make mechkeys/mechmini/v1:default:flash diff --git a/keyboards/mehkee96/readme.md b/keyboards/mehkee96/readme.md index ff1a6e201a41..852061cc18df 100644 --- a/keyboards/mehkee96/readme.md +++ b/keyboards/mehkee96/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make mehkee96:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make mehkee96:default:flash diff --git a/keyboards/mt/mt40/readme.md b/keyboards/mt/mt40/readme.md index 632cefdb7315..e24b856140c2 100644 --- a/keyboards/mt/mt40/readme.md +++ b/keyboards/mt/mt40/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make mt/mt40:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make mt/mt40:default:flash diff --git a/keyboards/mt/split75/readme.md b/keyboards/mt/split75/readme.md index 360ad552398f..68ecd81bf210 100644 --- a/keyboards/mt/split75/readme.md +++ b/keyboards/mt/split75/readme.md @@ -15,7 +15,7 @@ Make example for this keyboard (after setting up your build environment): make mt/split75:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make mt/split75:default:flash diff --git a/keyboards/oddforge/vea/readme.md b/keyboards/oddforge/vea/readme.md index 872fb90d3ab8..488f3cc1a212 100644 --- a/keyboards/oddforge/vea/readme.md +++ b/keyboards/oddforge/vea/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make oddforge/vea:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make oddforge/vea:default:flash diff --git a/keyboards/panc60/readme.md b/keyboards/panc60/readme.md index 52dcc4ccea1e..e07ace93a103 100644 --- a/keyboards/panc60/readme.md +++ b/keyboards/panc60/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make panc60:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make panc60:default:flash diff --git a/keyboards/pearl/readme.md b/keyboards/pearl/readme.md index 1f78a5540a55..289e11b017f7 100644 --- a/keyboards/pearl/readme.md +++ b/keyboards/pearl/readme.md @@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment): make pearl:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make pearl:default:flash diff --git a/keyboards/percent/canoe/readme.md b/keyboards/percent/canoe/readme.md index a4a409393986..b5048e62d80b 100644 --- a/keyboards/percent/canoe/readme.md +++ b/keyboards/percent/canoe/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make percent/canoe:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make percent/canoe:default:flash diff --git a/keyboards/percent/skog/readme.md b/keyboards/percent/skog/readme.md index 9f76110cde6c..af2832220d57 100644 --- a/keyboards/percent/skog/readme.md +++ b/keyboards/percent/skog/readme.md @@ -8,7 +8,7 @@ Make example for this keyboard (after setting up your build environment): make percent/skog:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make percent/skog:default:flash diff --git a/keyboards/percent/skog_lite/readme.md b/keyboards/percent/skog_lite/readme.md index 72ca79725415..d40eec01fd20 100644 --- a/keyboards/percent/skog_lite/readme.md +++ b/keyboards/percent/skog_lite/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make percent/skog_lite:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make percent/skog_lite:default:flash diff --git a/keyboards/singa/readme.md b/keyboards/singa/readme.md index e3b87092ec05..d700090ce1d9 100644 --- a/keyboards/singa/readme.md +++ b/keyboards/singa/readme.md @@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment): make singa:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make singa:default:flash diff --git a/keyboards/spiderisland/split78/readme.md b/keyboards/spiderisland/split78/readme.md index 84db8f0ffa39..e7e96f3d96ef 100644 --- a/keyboards/spiderisland/split78/readme.md +++ b/keyboards/spiderisland/split78/readme.md @@ -16,7 +16,7 @@ Make example for this keyboard (after setting up your build environment): make spiderisland/split78:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make spiderisland/split78:default:flash diff --git a/keyboards/tgr/910/readme.md b/keyboards/tgr/910/readme.md index 63e86380b870..9d3efefbb94f 100644 --- a/keyboards/tgr/910/readme.md +++ b/keyboards/tgr/910/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make tgr/910:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make tgr/910:default:flash diff --git a/keyboards/tgr/910ce/readme.md b/keyboards/tgr/910ce/readme.md index 6df25c8f8cc0..6d9bb71ceffd 100644 --- a/keyboards/tgr/910ce/readme.md +++ b/keyboards/tgr/910ce/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make tgr/910ce:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make tgr/910ce:default:flash diff --git a/keyboards/tgr/alice/readme.md b/keyboards/tgr/alice/readme.md index a08aaf71ba63..d9b01aef64b8 100644 --- a/keyboards/tgr/alice/readme.md +++ b/keyboards/tgr/alice/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make tgr/alice:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make tgr/alice:default:flash diff --git a/keyboards/tgr/jane/v2/readme.md b/keyboards/tgr/jane/v2/readme.md index 5c5a2d92d3c5..dac3e8429f0a 100644 --- a/keyboards/tgr/jane/v2/readme.md +++ b/keyboards/tgr/jane/v2/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make tgr/jane:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make tgr/jane:default:flash diff --git a/keyboards/tgr/jane/v2ce/readme.md b/keyboards/tgr/jane/v2ce/readme.md index 20e949caa575..7580270d8d32 100644 --- a/keyboards/tgr/jane/v2ce/readme.md +++ b/keyboards/tgr/jane/v2ce/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make tgr/jane/v2ce:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make tgr/jane/v2ce:default:flash diff --git a/keyboards/tgr/tris/readme.md b/keyboards/tgr/tris/readme.md index 8c3433700b8a..c9cc19906964 100644 --- a/keyboards/tgr/tris/readme.md +++ b/keyboards/tgr/tris/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make tris:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make tris:default:flash diff --git a/keyboards/unikorn/readme.md b/keyboards/unikorn/readme.md index 1383e18518cb..89690374c903 100644 --- a/keyboards/unikorn/readme.md +++ b/keyboards/unikorn/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make unikorn:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make unikorn:default:flash diff --git a/keyboards/winkeyless/b87/readme.md b/keyboards/winkeyless/b87/readme.md index b1df3439b146..9e19e546cc42 100644 --- a/keyboards/winkeyless/b87/readme.md +++ b/keyboards/winkeyless/b87/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make winkeyless/b87:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make winkeyless/b87:default:flash diff --git a/keyboards/winkeyless/bface/readme.md b/keyboards/winkeyless/bface/readme.md index ab39a97db086..119fdf44ae2c 100644 --- a/keyboards/winkeyless/bface/readme.md +++ b/keyboards/winkeyless/bface/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make winkeyless/bface:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make winkeyless/bface:default:flash diff --git a/keyboards/winkeyless/bmini/readme.md b/keyboards/winkeyless/bmini/readme.md index 5b19e0309025..1d98de56bbda 100644 --- a/keyboards/winkeyless/bmini/readme.md +++ b/keyboards/winkeyless/bmini/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make winkeyless/bmini:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make winkeyless/bmini:default:flash diff --git a/keyboards/winkeyless/bminiex/readme.md b/keyboards/winkeyless/bminiex/readme.md index 31a9e2608f34..df07082a8f82 100644 --- a/keyboards/winkeyless/bminiex/readme.md +++ b/keyboards/winkeyless/bminiex/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make winkeyless/bminiex:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make winkeyless/bminiex:default:flash diff --git a/keyboards/ymdk/bface/readme.md b/keyboards/ymdk/bface/readme.md index d99d4f9fb0d6..e2404f7faba9 100644 --- a/keyboards/ymdk/bface/readme.md +++ b/keyboards/ymdk/bface/readme.md @@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment): make ymdk/bface:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make ymdk/bface:default:flash diff --git a/keyboards/ymdk/np21/readme.md b/keyboards/ymdk/np21/readme.md index e9eaad9b7be1..bbebea5880d3 100644 --- a/keyboards/ymdk/np21/readme.md +++ b/keyboards/ymdk/np21/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make ymdk/np21:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make ymdk/np21:default:flash diff --git a/keyboards/ymdk/sp64/readme.md b/keyboards/ymdk/sp64/readme.md index ce547f1e0cea..3421e434efc7 100644 --- a/keyboards/ymdk/sp64/readme.md +++ b/keyboards/ymdk/sp64/readme.md @@ -8,7 +8,7 @@ Make example for this keyboard (after setting up your build environment): make ymdk/sp64:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make ymdk/sp64:default:flash diff --git a/keyboards/ymdk/ymd75/rev1/readme.md b/keyboards/ymdk/ymd75/rev1/readme.md index e4784d4eb984..1583c17d8fc4 100644 --- a/keyboards/ymdk/ymd75/rev1/readme.md +++ b/keyboards/ymdk/ymd75/rev1/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make ymdk/ymd75/rev1:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make ymdk/ymd75/rev1:default:flash diff --git a/keyboards/ymdk/ymd75/rev2/readme.md b/keyboards/ymdk/ymd75/rev2/readme.md index 7d70ed3a50a5..7437488c195e 100644 --- a/keyboards/ymdk/ymd75/rev2/readme.md +++ b/keyboards/ymdk/ymd75/rev2/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make ymdk/ymd75/rev2:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make ymdk/ymd75/rev2:default:flash diff --git a/keyboards/ymdk/ymd96/readme.md b/keyboards/ymdk/ymd96/readme.md index 6a967a49c258..ff6d61e5ae2b 100644 --- a/keyboards/ymdk/ymd96/readme.md +++ b/keyboards/ymdk/ymd96/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make ymdk/ymd96:default -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) +Flashing example for this keyboard: make ymdk/ymd96:default:flash From dafc46f1d11134bee65a4b21a404f8e79d7b8402 Mon Sep 17 00:00:00 2001 From: lizaoreo Date: Mon, 17 Jun 2024 15:30:57 -0400 Subject: [PATCH 0053/1205] Update RGB matrix indicator example (#23947) Changed the example in indicator-examples-2 to use a compound literal, otherwise the code fails to compile. --- docs/features/rgb_matrix.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md index a42f0a0f7360..aef766ebd248 100644 --- a/docs/features/rgb_matrix.md +++ b/docs/features/rgb_matrix.md @@ -1007,9 +1007,9 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { HSV hsv = {0, 255, 255}; if (layer_state_is(layer_state, 2)) { - hsv = {130, 255, 255}; + hsv = (HSV){130, 255, 255}; } else { - hsv = {30, 255, 255}; + hsv = (HSV){30, 255, 255}; } if (hsv.v > rgb_matrix_get_val()) { From 938badc3b0a8b71647e2463241f2e3fe8578f32a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 17 Jun 2024 21:51:53 +0100 Subject: [PATCH 0054/1205] Generate keymap dd keycodes to header (#20273) --- builddefs/build_keyboard.mk | 7 +++- lib/python/qmk/cli/__init__.py | 1 + lib/python/qmk/cli/generate/keymap_h.py | 51 +++++++++++++++++++++++++ lib/python/qmk/keymap.py | 34 ++--------------- 4 files changed, 61 insertions(+), 32 deletions(-) create mode 100644 lib/python/qmk/cli/generate/keymap_h.py diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index f0788e55c99c..ebc52a930901 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -212,7 +212,12 @@ $(INTERMEDIATE_OUTPUT)/src/config.h: $(KEYMAP_JSON) $(eval CMD=$(QMK_BIN) generate-config-h --quiet --output $(KEYMAP_H) $(KEYMAP_JSON)) @$(BUILD_CMD) -generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c +$(INTERMEDIATE_OUTPUT)/src/keymap.h: $(KEYMAP_JSON) + @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD) + $(eval CMD=$(QMK_BIN) generate-keymap-h --quiet --output $(INTERMEDIATE_OUTPUT)/src/keymap.h $(KEYMAP_JSON)) + @$(BUILD_CMD) + +generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c $(INTERMEDIATE_OUTPUT)/src/keymap.h endif diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 6d05a5fc21ce..b656909f8531 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -58,6 +58,7 @@ 'qmk.cli.generate.keyboard_h', 'qmk.cli.generate.keycodes', 'qmk.cli.generate.keycodes_tests', + 'qmk.cli.generate.keymap_h', 'qmk.cli.generate.make_dependencies', 'qmk.cli.generate.rgb_breathe_table', 'qmk.cli.generate.rules_mk', diff --git a/lib/python/qmk/cli/generate/keymap_h.py b/lib/python/qmk/cli/generate/keymap_h.py new file mode 100644 index 000000000000..a3aaa405c0fb --- /dev/null +++ b/lib/python/qmk/cli/generate/keymap_h.py @@ -0,0 +1,51 @@ +from argcomplete.completers import FilesCompleter + +from milc import cli + +import qmk.path +from qmk.commands import dump_lines +from qmk.commands import parse_configurator_json +from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE + + +def _generate_keycodes_function(keymap_json): + """Generates keymap level keycodes. + """ + lines = [] + lines.append('enum keymap_keycodes {') + + for index, item in enumerate(keymap_json.get('keycodes', [])): + key = item["key"] + if index == 0: + lines.append(f' {key} = QK_USER_0,') + else: + lines.append(f' {key},') + + lines.append('};') + + for item in keymap_json.get('keycodes', []): + key = item["key"] + for alias in item.get("aliases", []): + lines.append(f'#define {alias} {key}') + + return lines + + +@cli.argument('-o', '--output', arg_only=True, type=qmk.path.normpath, help='File to write to') +@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") +@cli.argument('filename', type=qmk.path.FileType('r'), arg_only=True, completer=FilesCompleter('.json'), help='Configurator JSON file') +@cli.subcommand('Creates a keymap.h from a QMK Configurator export.') +def generate_keymap_h(cli): + """Creates a keymap.h from a QMK Configurator export + """ + if cli.args.output and cli.args.output.name == '-': + cli.args.output = None + + keymap_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '// clang-format off'] + + keymap_json = parse_configurator_json(cli.args.filename) + + if 'keycodes' in keymap_json and keymap_json['keycodes'] is not None: + keymap_h_lines += _generate_keycodes_function(keymap_json) + + dump_lines(cli.args.output, keymap_h_lines, cli.args.quiet) diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index b7bf897377c5..ca76f1b2888e 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -19,6 +19,9 @@ # The `keymap.c` template to use when a keyboard doesn't have its own DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H +#if __has_include("keymap.h") +# include "keymap.h" +#endif __INCLUDES__ /* THIS FILE WAS GENERATED! @@ -26,8 +29,6 @@ * This file was generated by qmk json2c. You may or may not want to * edit it directly. */ -__KEYCODE_OUTPUT_GOES_HERE__ - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { __KEYMAP_GOES_HERE__ }; @@ -125,29 +126,6 @@ def _generate_macros_function(keymap_json): return macro_txt -def _generate_keycodes_function(keymap_json): - """Generates keymap level keycodes. - """ - lines = [] - lines.append('enum keymap_keycodes {') - - for index, item in enumerate(keymap_json.get('keycodes', [])): - key = item["key"] - if index == 0: - lines.append(f' {key} = QK_USER_0,') - else: - lines.append(f' {key},') - - lines.append('};') - - for item in keymap_json.get('keycodes', []): - key = item["key"] - for alias in item.get("aliases", []): - lines.append(f'#define {alias} {key}') - - return lines - - def template_json(keyboard): """Returns a `keymap.json` template for a keyboard. @@ -350,12 +328,6 @@ def generate_c(keymap_json): hostlang = f'#include "keymap_{keymap_json["host_language"]}.h"\n#include "sendstring_{keymap_json["host_language"]}.h"\n' new_keymap = new_keymap.replace('__INCLUDES__', hostlang) - keycodes = '' - if 'keycodes' in keymap_json and keymap_json['keycodes'] is not None: - keycodes_txt = _generate_keycodes_function(keymap_json) - keycodes = '\n'.join(keycodes_txt) - new_keymap = new_keymap.replace('__KEYCODE_OUTPUT_GOES_HERE__', keycodes) - return new_keymap From 53a0cdc4467fb688faa2708fe75daa26686e918d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 18 Jun 2024 03:44:22 +0100 Subject: [PATCH 0055/1205] Implement data driven joysticks (#22947) --- data/mappings/info_config.hjson | 5 +++ data/mappings/info_rules.hjson | 2 + data/schemas/keyboard.jsonschema | 30 +++++++++++++++ .../battleship_gamepad/battleship_gamepad.c | 6 --- .../handwired/battleship_gamepad/config.h | 21 ---------- .../battleship_gamepad/keyboard.json | 8 ++++ .../handwired/battleship_gamepad/rules.mk | 1 - lib/python/qmk/cli/generate/keyboard_c.py | 38 ++++++++++++++++++- lib/python/qmk/constants.py | 2 + lib/python/qmk/info.py | 15 +++++++- 10 files changed, 97 insertions(+), 31 deletions(-) delete mode 100644 keyboards/handwired/battleship_gamepad/config.h delete mode 100644 keyboards/handwired/battleship_gamepad/rules.mk diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index b61ca0407145..4f731b601134 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -72,6 +72,11 @@ "LED_KANA_PIN": {"info_key": "indicators.kana"}, "LED_PIN_ON_STATE": {"info_key": "indicators.on_state", "value_type": "int"}, + // Joystick + "JOYSTICK_AXIS_COUNT": {"info_key": "joystick.axis_count", "value_type": "int"}, + "JOYSTICK_AXIS_RESOLUTION": {"info_key": "joystick.axis_resolution", "value_type": "int"}, + "JOYSTICK_BUTTON_COUNT": {"info_key": "joystick.button_count", "value_type": "int"}, + // Leader Key "LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "flag"}, "LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "flag"}, diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson index 384bc87b7839..64972af63b0e 100644 --- a/data/mappings/info_rules.hjson +++ b/data/mappings/info_rules.hjson @@ -25,6 +25,8 @@ "ENCODER_DRIVER": {"info_key": "encoder.driver"}, "FIRMWARE_FORMAT": {"info_key": "build.firmware_format"}, "HAPTIC_DRIVER": {"info_key": "haptic.driver"}, + "JOYSTICK_DRIVER": {"info_key": "joystick.driver"}, + "JOYSTICK_ENABLE": {"info_key": "joystick.enabled", "value_type": "bool"}, "KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"}, "LAYOUTS": {"info_key": "community_layouts", "value_type": "list"}, "LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 5b63acf8e80e..e758c325c77e 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -342,6 +342,36 @@ "on_state": {"$ref": "qmk.definitions.v1#/bit"} } }, + "joystick": { + "type": "object", + "properties": { + "enabled": {"type": "boolean"}, + "driver": {"type": "string"}, + "button_count": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "axis_resolution": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "axes": { + "type": "object", + "propertyNames": {"enum": ["x", "y", "z", "rx", "ry", "rz"]} + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "input_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "low": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "rest": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "high": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + }, + { + "type": "string", + "enum": ["virtual"] + } + ] + } + } + } + }, "keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"}, "layout_aliases": { "type": "object", diff --git a/keyboards/handwired/battleship_gamepad/battleship_gamepad.c b/keyboards/handwired/battleship_gamepad/battleship_gamepad.c index cccc03a28722..7b5e65a9907a 100644 --- a/keyboards/handwired/battleship_gamepad/battleship_gamepad.c +++ b/keyboards/handwired/battleship_gamepad/battleship_gamepad.c @@ -16,12 +16,6 @@ #include "quantum.h" -/* joystick config */ -joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = { - [0] = JOYSTICK_AXIS_IN(F5, 1023, 512, 0), - [1] = JOYSTICK_AXIS_IN(F4, 0, 512, 1023) -}; - /* joystick button code (thumbstick pressed) */ void keyboard_pre_init_kb(void) { gpio_set_pin_input_high(F6); diff --git a/keyboards/handwired/battleship_gamepad/config.h b/keyboards/handwired/battleship_gamepad/config.h deleted file mode 100644 index b785c80aadf5..000000000000 --- a/keyboards/handwired/battleship_gamepad/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2021 Andrew Braini - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -/* joystick configuration */ -#define JOYSTICK_BUTTON_COUNT 25 -#define JOYSTICK_AXIS_RESOLUTION 10 diff --git a/keyboards/handwired/battleship_gamepad/keyboard.json b/keyboards/handwired/battleship_gamepad/keyboard.json index 283274187585..8350f31fddbf 100644 --- a/keyboards/handwired/battleship_gamepad/keyboard.json +++ b/keyboards/handwired/battleship_gamepad/keyboard.json @@ -13,6 +13,14 @@ "rows": ["B6", "B2", "B3", "B1", "F7"] }, "diode_direction": "COL2ROW", + "joystick": { + "button_count": 25, + "axis_resolution": 10, + "axes": { + "x": {"input_pin": "F5", "low": 1023, "rest": 512, "high": 0}, + "y": {"input_pin": "F4", "low": 0, "rest": 512, "high": 1023} + } + }, "processor": "atmega32u4", "bootloader": "caterina", "features": { diff --git a/keyboards/handwired/battleship_gamepad/rules.mk b/keyboards/handwired/battleship_gamepad/rules.mk deleted file mode 100644 index c5ab560bca99..000000000000 --- a/keyboards/handwired/battleship_gamepad/rules.mk +++ /dev/null @@ -1 +0,0 @@ -JOYSTICK_DRIVER = analog diff --git a/lib/python/qmk/cli/generate/keyboard_c.py b/lib/python/qmk/cli/generate/keyboard_c.py index 5a6c96748601..228b320942a0 100755 --- a/lib/python/qmk/cli/generate/keyboard_c.py +++ b/lib/python/qmk/cli/generate/keyboard_c.py @@ -6,7 +6,7 @@ from qmk.commands import dump_lines from qmk.keyboard import keyboard_completer, keyboard_folder from qmk.path import normpath -from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE +from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, JOYSTICK_AXES def _gen_led_configs(info_data): @@ -91,6 +91,41 @@ def _gen_matrix_mask(info_data): return lines +def _gen_joystick_axes(info_data): + """Convert info.json content to joystick_axes + """ + if 'axes' not in info_data.get('joystick', {}): + return [] + + axes = info_data['joystick']['axes'] + axes_keys = list(axes.keys()) + + lines = [] + lines.append('#ifdef JOYSTICK_ENABLE') + lines.append('joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = {') + + # loop over all available axes - injecting virtual axis for those not specified + for index, cur in enumerate(JOYSTICK_AXES): + # bail out if we have generated all requested axis + if len(axes_keys) == 0: + break + + axis = 'virtual' + if cur in axes: + axis = axes[cur] + axes_keys.remove(cur) + + if axis == 'virtual': + lines.append(f" [{index}] = JOYSTICK_AXIS_VIRTUAL,") + else: + lines.append(f" [{index}] = JOYSTICK_AXIS_IN({axis['input_pin']}, {axis['low']}, {axis['rest']}, {axis['high']}),") + + lines.append('};') + lines.append('#endif') + + return lines + + @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") @cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate keyboard.c for.') @@ -105,6 +140,7 @@ def generate_keyboard_c(cli): keyboard_h_lines.extend(_gen_led_configs(kb_info_json)) keyboard_h_lines.extend(_gen_matrix_mask(kb_info_json)) + keyboard_h_lines.extend(_gen_joystick_axes(kb_info_json)) # Show the results dump_lines(cli.args.output, keyboard_h_lines, cli.args.quiet) diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py index 90e4452f2b99..b6f46180b298 100644 --- a/lib/python/qmk/constants.py +++ b/lib/python/qmk/constants.py @@ -320,3 +320,5 @@ you may not use this file except in compliance with the License. """]), ] + +JOYSTICK_AXES = ['x', 'y', 'z', 'rx', 'ry', 'rz'] diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 833271c09cc7..091a11854c01 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -7,7 +7,7 @@ from milc import cli -from qmk.constants import COL_LETTERS, ROW_LETTERS, CHIBIOS_PROCESSORS, LUFA_PROCESSORS, VUSB_PROCESSORS +from qmk.constants import COL_LETTERS, ROW_LETTERS, CHIBIOS_PROCESSORS, LUFA_PROCESSORS, VUSB_PROCESSORS, JOYSTICK_AXES from qmk.c_parse import find_layouts, parse_config_h_file, find_led_config from qmk.json_schema import deep_update, json_load, validate from qmk.keyboard import config_h, rules_mk @@ -249,8 +249,9 @@ def info_json(keyboard): info_data = _extract_rules_mk(info_data, rules_mk(str(keyboard))) info_data = _extract_config_h(info_data, config_h(str(keyboard))) - # Ensure that we have matrix row and column counts + # Ensure that we have various calculated values info_data = _matrix_size(info_data) + info_data = _joystick_axis_count(info_data) # Merge in data from info_data = _extract_led_config(info_data, str(keyboard)) @@ -800,6 +801,16 @@ def _matrix_size(info_data): return info_data +def _joystick_axis_count(info_data): + """Add info_data['joystick.axis_count'] if required + """ + if 'axes' in info_data.get('joystick', {}): + axes_keys = info_data['joystick']['axes'].keys() + info_data['joystick']['axis_count'] = max(JOYSTICK_AXES.index(a) for a in axes_keys) + 1 if axes_keys else 0 + + return info_data + + def _check_matrix(info_data): """Check the matrix to ensure that row/column count is consistent. """ From 0a5b8928202078a7a64b7fadf11b0fc25a26b4a6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 20 Jun 2024 04:43:23 +1000 Subject: [PATCH 0056/1205] [CLI] Force `dump_lines()` to always use Unix line endings (#23954) --- lib/python/qmk/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 3db8353bfda9..873380c28b74 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -102,7 +102,9 @@ def dump_lines(output_file, lines, quiet=True): output_file.parent.mkdir(parents=True, exist_ok=True) if output_file.exists(): output_file.replace(output_file.parent / (output_file.name + '.bak')) - output_file.write_text(generated, encoding='utf-8') + with open(output_file, 'w', encoding='utf-8', newline='\n') as f: + f.write(generated) + # output_file.write_text(generated, encoding='utf-8', newline='\n') # `newline` needs Python 3.10 if not quiet: cli.log.info(f'Wrote {output_file.name} to {output_file}.') From 4fdde75333acce3c15eb1b733f7c29798804ed82 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 20 Jun 2024 02:59:29 +0100 Subject: [PATCH 0057/1205] Update 'qmk import-kbfirmware' to use 'keyboard.json' (#23960) --- lib/python/qmk/importers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/python/qmk/importers.py b/lib/python/qmk/importers.py index 8c449a719406..35a38e8572b0 100644 --- a/lib/python/qmk/importers.py +++ b/lib/python/qmk/importers.py @@ -102,7 +102,7 @@ def import_keyboard(info_data, keymap_data=None): # And validate some more as everything is optional if not all(key in info_data for key in ['keyboard_name', 'layouts']): - raise ValueError('invalid info.json') + raise ValueError('invalid json config') kb_name = info_data['keyboard_name'] @@ -115,7 +115,7 @@ def import_keyboard(info_data, keymap_data=None): # TODO: if supports community then grab that instead keymap_data = _gen_dummy_keymap(kb_name, info_data) - keyboard_info = kb_folder / 'info.json' + keyboard_json = kb_folder / 'keyboard.json' keyboard_keymap = kb_folder / 'keymaps' / 'default' / 'keymap.json' # begin with making the deepest folder in the tree @@ -136,10 +136,10 @@ def import_keyboard(info_data, keymap_data=None): for file in list(TEMPLATE.iterdir()): replace_placeholders(file, kb_folder / file.name, tokens) - temp = json_load(keyboard_info) + temp = json_load(keyboard_json) deep_update(temp, info_data) - keyboard_info.write_text(json.dumps(temp, cls=InfoJSONEncoder, sort_keys=True)) + keyboard_json.write_text(json.dumps(temp, cls=InfoJSONEncoder, sort_keys=True)) keyboard_keymap.write_text(json.dumps(keymap_data, cls=KeymapJSONEncoder, sort_keys=True)) return kb_name From a6ef34cd169f77f68788f9f0a8384a1143cdd122 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 20 Jun 2024 01:08:57 -0700 Subject: [PATCH 0058/1205] [Keyboard] fixes for ZSA Voyager (#23912) --- keyboards/zsa/voyager/ld/voyager.ld | 8 ++++---- keyboards/zsa/voyager/voyager.c | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/keyboards/zsa/voyager/ld/voyager.ld b/keyboards/zsa/voyager/ld/voyager.ld index 0619983beb05..bfaed9df6539 100644 --- a/keyboards/zsa/voyager/ld/voyager.ld +++ b/keyboards/zsa/voyager/ld/voyager.ld @@ -15,11 +15,11 @@ */ /* - * STM32F303xC memory setup. + * STM32F303xB memory setup. */ MEMORY { - flash0 (rx) : org = 0x08002000, len = 256k - 0x2000 + flash0 (rx) : org = 0x08002000, len = 128k - 0x2000 flash1 (rx) : org = 0x00000000, len = 0 flash2 (rx) : org = 0x00000000, len = 0 flash3 (rx) : org = 0x00000000, len = 0 @@ -27,7 +27,7 @@ MEMORY flash5 (rx) : org = 0x00000000, len = 0 flash6 (rx) : org = 0x00000000, len = 0 flash7 (rx) : org = 0x00000000, len = 0 - ram0 (wx) : org = 0x20000000, len = 40k + ram0 (wx) : org = 0x20000000, len = 32k ram1 (wx) : org = 0x00000000, len = 0 ram2 (wx) : org = 0x00000000, len = 0 ram3 (wx) : org = 0x00000000, len = 0 @@ -82,4 +82,4 @@ REGION_ALIAS("BSS_RAM", ram0); REGION_ALIAS("HEAP_RAM", ram0); /* Generic rules inclusion.*/ -INCLUDE rules.ld \ No newline at end of file +INCLUDE rules.ld diff --git a/keyboards/zsa/voyager/voyager.c b/keyboards/zsa/voyager/voyager.c index d70f1be3effd..3255f25a979e 100644 --- a/keyboards/zsa/voyager/voyager.c +++ b/keyboards/zsa/voyager/voyager.c @@ -12,7 +12,6 @@ bool is_launching = false; #if defined(DEFERRED_EXEC_ENABLE) # if defined(DYNAMIC_MACRO_ENABLE) deferred_token dynamic_macro_token = INVALID_DEFERRED_TOKEN; - static uint32_t dynamic_macro_led(uint32_t trigger_time, void *cb_arg) { static bool led_state = true; if (!is_launching) { @@ -22,8 +21,8 @@ static uint32_t dynamic_macro_led(uint32_t trigger_time, void *cb_arg) { return 100; } -void dynamic_macro_record_start_user(void) { - if (my_token == INVALID_DEFERRED_TOKEN) { +void dynamic_macro_record_start_user(int8_t direction) { + if (dynamic_macro_token == INVALID_DEFERRED_TOKEN) { STATUS_LED_3(true); dynamic_macro_token = defer_exec(100, dynamic_macro_led, NULL); } From 751a6b5bc4404e8398b360a925cb95e17be848d8 Mon Sep 17 00:00:00 2001 From: Amir Date: Fri, 21 Jun 2024 02:42:16 +0330 Subject: [PATCH 0059/1205] add farsi keymap extras (#23650) --- .../extras/keycodes_farsi_0.0.1.hjson | 616 ++++++++++++++++++ docs/reference_keymap_extras.md | 1 + quantum/keymap_extras/keymap_farsi.h | 171 +++++ 3 files changed, 788 insertions(+) create mode 100644 data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson create mode 100644 quantum/keymap_extras/keymap_farsi.h diff --git a/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson b/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson new file mode 100644 index 000000000000..d59b6fab2642 --- /dev/null +++ b/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson @@ -0,0 +1,616 @@ +{ + "aliases": { +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ │ ۱ │ ۲ │ ۳ │ ۴ │ ۵ │ ۶ │ ۷ │ ۸ │ ۹ │ ۰ │ - │ = │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ ض │ ص │ ث │ ق │ ف │ غ │ ع │ ه │ خ │ ح │ ج │ چ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ ش │ س │ ی │ ب │ ل │ ا │ ت │ ن │ م │ ک │ گ │ \ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ < │ ظ │ ط │ ز │ ر │ ذ │ د │ پ │ و │ . │ / │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + "KC_GRV": { + "key": "FA_ZWJ", + "label": "(zero-width joiner)", + } + "KC_1": { + "key": "FA_1A", + "label": "۱", + } + "KC_2": { + "key": "FA_2A", + "label": "۲", + } + "KC_3": { + "key": "FA_3A", + "label": "۳", + } + "KC_4": { + "key": "FA_4A", + "label": "۴", + } + "KC_5": { + "key": "FA_5A", + "label": "۵", + } + "KC_6": { + "key": "FA_6A", + "label": "۶", + } + "KC_7": { + "key": "FA_7A", + "label": "۷", + } + "KC_8": { + "key": "FA_8A", + "label": "۸", + } + "KC_9": { + "key": "FA_9A", + "label": "۹", + } + "KC_0": { + "key": "FA_0A", + "label": "۰", + } + "KC_MINS": { + "key": "FA_MINS", + "label": "-", + } + "KC_EQL": { + "key": "FA_EQL", + "label": "=", + } + "KC_Q": { + "key": "FA_ZAD", + "label": "ض", + } + "KC_W": { + "key": "FA_SAD", + "label": "ص", + } + "KC_E": { + "key": "FA_SE", + "label": "ث", + } + "KC_R": { + "key": "FA_QAF", + "label": "ق", + } + "KC_T": { + "key": "FA_FE", + "label": "ف", + } + "KC_Y": { + "key": "FA_GHYN", + "label": "غ", + } + "KC_U": { + "key": "FA_EYN", + "label": "ع", + } + "KC_I": { + "key": "FA_HE", + "label": "ه", + } + "KC_O": { + "key": "FA_KHE", + "label": "خ", + } + "KC_P": { + "key": "FA_HEJ", + "label": "ح", + } + "KC_LBRC": { + "key": "FA_JIM", + "label": "ج", + } + "KC_RBRC": { + "key": "FA_CHE", + "label": "چ", + } + "KC_A": { + "key": "FA_SHIN", + "label": "ش", + } + "KC_S": { + "key": "FA_SIN", + "label": "س", + } + "KC_D": { + "key": "FA_YE", + "label": "ی", + } + "KC_F": { + "key": "FA_BE", + "label": "ب", + } + "KC_G": { + "key": "FA_LAM", + "label": "ل", + } + "KC_H": { + "key": "FA_ALEF", + "label": "ا", + } + "KC_J": { + "key": "FA_TE", + "label": "ت", + } + "KC_K": { + "key": "FA_NOON", + "label": "ن", + } + "KC_L": { + "key": "FA_MIM", + "label": "م", + } + "KC_SCLN": { + "key": "FA_KAF", + "label": "ک", + } + "KC_QUOT": { + "key": "FA_GAF", + "label": "گ", + } + "KC_BSLS": { + "key": "FA_BSLS", + "label": "\\", + } + "KC_LT": { + "key": "FA_LT", + "label": "<", + } + "KC_Z": { + "key": "FA_ZA", + "label": "ظ", + } + "KC_X": { + "key": "FA_TA", + "label": "ط", + } + "KC_C": { + "key": "FA_ZE", + "label": "ز", + } + "KC_V": { + "key": "FA_RE", + "label": "ر", + } + "KC_B": { + "key": "FA_ZAL", + "label": "ذ", + } + "KC_N": { + "key": "FA_DAL", + "label": "د", + } + "KC_M": { + "key": "FA_PE", + "label": "پ", + } + "KC_COMM": { + "key": "FA_WAW", + "label": "و", + } + "KC_DOT": { + "key": "FA_DOT", + "label": ".", + } + "KC_SLSH": { + "key": "FA_SLSH", + "label": "/", + } + "KC_SPC": { + "key": "FA_SPC", + "label": " ", + } +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ÷ │ ! │ ٬ │ ٫ │ ﷼ │ ٪ │ × │ ، │ * │ ) │ ( │ ـ │ + │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ ْ │ ٌ │ ٍ │ ً │ ُ │ ِ │ َ │ ّ │ ] │ [ │ } │ { │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ ؤ │ ئ │ ي │ إ │ أ │ آ │ ة │ » │ « │ : │ ؛ │ | │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ > │ ك │ ٓ │ ژ │ ٰ │ │ ٔ │ ء │ │ │ ؟ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + "S(FA_ZWJ)": { + "key": "FA_DIV", + "label": "÷", + } + "S(FA_1A)": { + "key": "FA_EXLM", + "label": "!", + } + "S(FA_2A)": { + "key": "FA_THS", + "label": "٬", + } + "S(FA_3A)": { + "key": "FA_DECS", + "label": "٫", + } + "S(FA_4A)": { + "key": "FA_RIAL", + "label": "﷼", + } + "S(FA_5A)": { + "key": "FA_PRCA", + "label": "٪", + } + "S(FA_6A)": { + "key": "FA_MUL", + "label": "×", + } + "S(FA_7A)": { + "key": "FA_COMA", + "label": "،", + } + "S(FA_8A)": { + "key": "FA_ASTR", + "label": "*", + } + "S(FA_9A)": { + "key": "FA_RPRN", + "label": ")", + } + "S(FA_0A)": { + "key": "FA_LPRN", + "label": "(", + } + "S(FA_MINS)": { + "key": "FA_TATW", + "label": "ـ", + } + "S(FA_EQL)": { + "key": "FA_PLUS", + "label": "+", + } + "S(FA_ZAD)": { + "key": "FA_SUK", + "label": "ْ", + } + "S(FA_SAD)": { + "key": "FA_DMTN", + "label": "ٌ", + } + "S(FA_SE)": { + "key": "FA_KSTN", + "label": "ٍ", + } + "S(FA_QAF)": { + "key": "FA_FTHN", + "label": "ً", + } + "S(FA_FE)": { + "key": "FA_DMM", + "label": "ُ", + } + "S(FA_GHYN)": { + "key": "FA_KAS", + "label": "ِ", + } + "S(FA_EYN)": { + "key": "FA_FAT", + "label": "َ", + } + "S(FA_HE)": { + "key": "FA_TSDD", + "label": "", + } + "S(FA_KHE)": { + "key": "FA_RBRC", + "label": "]", + } + "S(FA_HEJ)": { + "key": "FA_LBRC", + "label": "[", + } + "S(FA_JIM)": { + "key": "FA_RCBR", + "label": "}", + } + "S(FA_CHE)": { + "key": "FA_LCBR", + "label": "{", + } + "S(FA_SHIN)": { + "key": "FA_HMZV", + "label": "ؤ", + } + "S(FA_SIN)": { + "key": "FA_HMZY", + "label": "ئ", + } + "S(FA_YE)": { + "key": "FA_YEA", + "label": "ي", + } + "S(FA_BE)": { + "key": "FA_HMZU", + "label": "إ", + } + "S(FA_LAM)": { + "key": "FA_HMZO", + "label": "أ", + } + "S(FA_ALEF)": { + "key": "FA_MALF", + "label": "آ", + } + "S(FA_TE)": { + "key": "FA_TEHM", + "label": "ة", + } + "S(FA_NOON)": { + "key": "FA_RQOT", + "label": "»", + } + "S(FA_MIM)": { + "key": "FA_LQOT", + "label": "«", + } + "S(FA_KAF)": { + "key": "FA_COLN", + "label": ":", + } + "S(FA_GAF)": { + "key": "FA_SCLA", + "label": "؛", + } + "S(FA_LT)": { + "key": "FA_GT", + "label": ">", + } + "S(FA_ZA)": { + "key": "FA_KAFA", + "label": "ك", + } + "S(FA_TA)": { + "key": "FA_MADO", + "label": "ٓ", + } + "S(FA_ZE)": { + "key": "FA_JEH", + "label": "ژ", + } + "S(FA_RE)": { + "key": "FA_SUPA", + "label": "ٰ", + } + "S(FA_ZAL)": { + "key": "FA_ZWNJ", + "label": "(zero-width non-joiner)", + } + "S(FA_DAL)": { + "key": "FA_HMZA", + "label": "ٔ", + } + "S(FA_PE)": { + "key": "FA_HMZ", + "label": "ء", + } + "S(FA_SLSH)": { + "key": "FA_QSA", + "label": "؟", + } +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ~ │ ` │ @ │ # │ $ │ % │ ^ │ & │ • │ │ │ _ │ − │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ ° │ │ € │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ │ │ ى │ │ │ ٱ │ │ ﴾ │ ﴿ │ ; │ " │ ‐ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ | │ │ │ │ ٖ │ │ ٕ │ … │ , │ ' │ ? │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + "ALGR(FA_ZWJ)": { + "key": "FA_TILD", + "label": "~", + } + "ALGR(FA_1A)": { + "key": "FA_GRV", + "label": "`", + } + "ALGR(FA_2A)": { + "key": "FA_AT", + "label": "@", + } + "ALGR(FA_3A)": { + "key": "FA_HASH", + "label": "#", + } + "ALGR(FA_4A)": { + "key": "FA_DLR", + "label": "$", + } + "ALGR(FA_5A)": { + "key": "FA_PERC", + "label": "%", + } + "ALGR(FA_6A)": { + "key": "FA_CIRC", + "label": "^", + } + "ALGR(FA_7A)": { + "key": "FA_AMPR", + "label": "&", + } + "ALGR(FA_8A)": { + "key": "FA_BULT", + "label": "•", + } + "ALGR(FA_9A)": { + "key": "FA_LRM", + "label": "(left-to-right mark)", + } + "ALGR(FA_0A)": { + "key": "FA_RLM", + "label": "(right-to-left mark)", + } + "ALGR(FA_MINS)": { + "key": "FA_UNDS", + "label": "_", + } + "ALGR(FA_EQL)": { + "key": "FA_DMNS", + "label": "− (dead)", + } + "ALGR(FA_ZAD)": { + "key": "FA_DEG", + "label": "°", + } + "ALGR(FA_SE)": { + "key": "FA_EURO", + "label": "€", + } + "ALGR(FA_HE)": { + "key": "FA_LRO", + "label": "(left-to-right override)", + } + "ALGR(FA_KHE)": { + "key": "FA_RLO", + "label": "(right-to-left override)", + } + "ALGR(FA_HEJ)": { + "key": "FA_PDF", + "label": "(pop directional formatting)", + } + "ALGR(FA_JIM)": { + "key": "FA_LRE", + "label": "(left-to-right embedding)", + } + "ALGR(FA_CHE)": { + "key": "FA_RLE", + "label": "(right-to-left embedding)", + } + "ALGR(FA_YE)": { + "key": "FA_ALFM", + "label": "ى", + } + "ALGR(FA_ALEF)": { + "key": "FA_ALFW", + "label": "ٱ", + } + "ALGR(FA_NOON)": { + "key": "FA_LORP", + "label": "﴾", + } + "ALGR(FA_MIM)": { + "key": "FA_RORP", + "label": "﴿", + } + "ALGR(FA_KAF)": { + "key": "FA_SCLN", + "label": ";", + } + "ALGR(FA_GAF)": { + "key": "FA_DQT", + "label": "\"", + } + "ALGR(FA_BSLS)": { + "key": "FA_MINA", + "label": "-", + } + "ALGR(FA_ZA)": { + "key": "FA_PIPE", + "label": "|", + } + "ALGR(FA_RA)": { + "key": "FA_SUBA", + "label": "ٖ", + } + "ALGR(FA_DAL)": { + "key": "FA_HMZB", + "label": "ء", + } + "ALGR(FA_PE)": { + "key": "FA_ELLP", + "label": "…", + } + "ALGR(FA_WAW)": { + "key": "FA_COMM", + "label": ",", + } + "ALGR(FA_DOT)": { + "key": "FA_QUOT", + "label": "'", + } + "ALGR(FA_SLSH)": { + "key": "FA_QUES", + "label": "?", + } +/* Shift+AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ ¦ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + "S(ALGR(FA_1A))": { + "key": "FA_1", + "label": "1", + } + "S(ALGR(FA_2A))": { + "key": "FA_2", + "label": "2", + } + "S(ALGR(FA_3A))": { + "key": "FA_3", + "label": "3", + } + "S(ALGR(FA_4A))": { + "key": "FA_4", + "label": "4", + } + "S(ALGR(FA_5A))": { + "key": "FA_5", + "label": "5", + } + "S(ALGR(FA_6A))": { + "key": "FA_6", + "label": "6", + } + "S(ALGR(FA_7A))": { + "key": "FA_7", + "label": "7", + } + "S(ALGR(FA_8A))": { + "key": "FA_8", + "label": "8", + } + "S(ALGR(FA_9A))": { + "key": "FA_9", + "label": "9", + } + "S(ALGR(FA_0A))": { + "key": "FA_0", + "label": "0", + } + "S(ALGR(FA_LT))": { + "key": "FA_BRKP", + "label": "¦", + } + "S(ALGR(FA_SPC))": { + "key": "FA_NNBS", + "label": "(narrow non-breaking space)", + } + } +} diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md index 191e0d4ea8de..d45183b6c6a1 100644 --- a/docs/reference_keymap_extras.md +++ b/docs/reference_keymap_extras.md @@ -33,6 +33,7 @@ These headers are located in [`quantum/keymap_extras/`](https://github.com/qmk/q |English (US International) |`keymap_us_international.h` |`sendstring_us_international.h` | |English (US International, Linux)|`keymap_us_international_linux.h`| | |Estonian |`keymap_estonian.h` |`sendstring_estonian.h` | +|Farsi |`keymap_farsi.h` | | |Finnish |`keymap_finnish.h` |`sendstring_finnish.h` | |French |`keymap_french.h` |`sendstring_french.h` | |French (AFNOR) |`keymap_french_afnor.h` |`sendstring_french_afnor.h` | diff --git a/quantum/keymap_extras/keymap_farsi.h b/quantum/keymap_extras/keymap_farsi.h new file mode 100644 index 000000000000..d26891751315 --- /dev/null +++ b/quantum/keymap_extras/keymap_farsi.h @@ -0,0 +1,171 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ + +#pragma once +#include "keycodes.h" +// clang-format off + +// Aliases +#define FA_ZWJ KC_GRV // (zero-width joiner) +#define FA_1A KC_1 // ۱ +#define FA_2A KC_2 // ۲ +#define FA_3A KC_3 // ۳ +#define FA_4A KC_4 // ۴ +#define FA_5A KC_5 // ۵ +#define FA_6A KC_6 // ۶ +#define FA_7A KC_7 // ۷ +#define FA_8A KC_8 // ۸ +#define FA_9A KC_9 // ۹ +#define FA_0A KC_0 // ۰ +#define FA_MINS KC_MINS // - +#define FA_EQL KC_EQL // = +#define FA_ZAD KC_Q // ض +#define FA_SAD KC_W // ص +#define FA_SE KC_E // ث +#define FA_QAF KC_R // ق +#define FA_FE KC_T // ف +#define FA_GHYN KC_Y // غ +#define FA_EYN KC_U // ع +#define FA_HE KC_I // ه +#define FA_KHE KC_O // خ +#define FA_HEJ KC_P // ح +#define FA_JIM KC_LBRC // ج +#define FA_CHE KC_RBRC // چ +#define FA_SHIN KC_A // ش +#define FA_SIN KC_S // س +#define FA_YE KC_D // ی +#define FA_BE KC_F // ب +#define FA_LAM KC_G // ل +#define FA_ALEF KC_H // ا +#define FA_TE KC_J // ت +#define FA_NOON KC_K // ن +#define FA_MIM KC_L // م +#define FA_KAF KC_SCLN // ک +#define FA_GAF KC_QUOT // گ +#define FA_BSLS KC_BSLS // (backslash) +#define FA_LT KC_LT // < +#define FA_ZA KC_Z // ظ +#define FA_TA KC_X // ط +#define FA_ZE KC_C // ز +#define FA_RE KC_V // ر +#define FA_ZAL KC_B // ذ +#define FA_DAL KC_N // د +#define FA_PE KC_M // پ +#define FA_WAW KC_COMM // و +#define FA_DOT KC_DOT // . +#define FA_SLSH KC_SLSH // / +#define FA_SPC KC_SPC // +#define FA_DIV S(FA_ZWJ) // ÷ +#define FA_EXLM S(FA_1A) // ! +#define FA_THS S(FA_2A) // ٬ +#define FA_DECS S(FA_3A) // ٫ +#define FA_RIAL S(FA_4A) // ﷼ +#define FA_PRCA S(FA_5A) // ٪ +#define FA_MUL S(FA_6A) // × +#define FA_COMA S(FA_7A) // ، +#define FA_ASTR S(FA_8A) // * +#define FA_RPRN S(FA_9A) // ) +#define FA_LPRN S(FA_0A) // ( +#define FA_TATW S(FA_MINS) // ـ +#define FA_PLUS S(FA_EQL) // + +#define FA_SUK S(FA_ZAD) // ْ +#define FA_DMTN S(FA_SAD) // ٌ +#define FA_KSTN S(FA_SE) // ٍ +#define FA_FTHN S(FA_QAF) // ً +#define FA_DMM S(FA_FE) // ُ +#define FA_KAS S(FA_GHYN) // ِ +#define FA_FAT S(FA_EYN) // َ +#define FA_TSDD S(FA_HE) // +#define FA_RBRC S(FA_KHE) // ] +#define FA_LBRC S(FA_HEJ) // [ +#define FA_RCBR S(FA_JIM) // } +#define FA_LCBR S(FA_CHE) // { +#define FA_HMZV S(FA_SHIN) // ؤ +#define FA_HMZY S(FA_SIN) // ئ +#define FA_YEA S(FA_YE) // ي +#define FA_HMZU S(FA_BE) // إ +#define FA_HMZO S(FA_LAM) // أ +#define FA_MALF S(FA_ALEF) // آ +#define FA_TEHM S(FA_TE) // ة +#define FA_RQOT S(FA_NOON) // » +#define FA_LQOT S(FA_MIM) // « +#define FA_COLN S(FA_KAF) // : +#define FA_SCLA S(FA_GAF) // ؛ +#define FA_GT S(FA_LT) // > +#define FA_KAFA S(FA_ZA) // ك +#define FA_MADO S(FA_TA) // ٓ +#define FA_JEH S(FA_ZE) // ژ +#define FA_SUPA S(FA_RE) // ٰ +#define FA_ZWNJ S(FA_ZAL) // (zero-width non-joiner) +#define FA_HMZA S(FA_DAL) // ٔ +#define FA_HMZ S(FA_PE) // ء +#define FA_QSA S(FA_SLSH) // ؟ +#define FA_TILD ALGR(FA_ZWJ) // ~ +#define FA_GRV ALGR(FA_1A) // ` +#define FA_AT ALGR(FA_2A) // @ +#define FA_HASH ALGR(FA_3A) // # +#define FA_DLR ALGR(FA_4A) // $ +#define FA_PERC ALGR(FA_5A) // % +#define FA_CIRC ALGR(FA_6A) // ^ +#define FA_AMPR ALGR(FA_7A) // & +#define FA_BULT ALGR(FA_8A) // • +#define FA_LRM ALGR(FA_9A) // (left-to-right mark) +#define FA_RLM ALGR(FA_0A) // (right-to-left mark) +#define FA_UNDS ALGR(FA_MINS) // _ +#define FA_DMNS ALGR(FA_EQL) // − (dead) +#define FA_DEG ALGR(FA_ZAD) // ° +#define FA_EURO ALGR(FA_SE) // € +#define FA_LRO ALGR(FA_HE) // (left-to-right override) +#define FA_RLO ALGR(FA_KHE) // (right-to-left override) +#define FA_PDF ALGR(FA_HEJ) // (pop directional formatting) +#define FA_LRE ALGR(FA_JIM) // (left-to-right embedding) +#define FA_RLE ALGR(FA_CHE) // (right-to-left embedding) +#define FA_ALFM ALGR(FA_YE) // ى +#define FA_ALFW ALGR(FA_ALEF) // ٱ +#define FA_LORP ALGR(FA_NOON) // ﴾ +#define FA_RORP ALGR(FA_MIM) // ﴿ +#define FA_SCLN ALGR(FA_KAF) // ; +#define FA_DQT ALGR(FA_GAF) // " +#define FA_MINA ALGR(FA_BSLS) // - +#define FA_PIPE ALGR(FA_ZA) // | +#define FA_SUBA ALGR(FA_RA) // ٖ +#define FA_HMZB ALGR(FA_DAL) // ء +#define FA_ELLP ALGR(FA_PE) // … +#define FA_COMM ALGR(FA_WAW) // , +#define FA_QUOT ALGR(FA_DOT) // ' +#define FA_QUES ALGR(FA_SLSH) // ? +#define FA_1 S(ALGR(FA_1A)) // 1 +#define FA_2 S(ALGR(FA_2A)) // 2 +#define FA_3 S(ALGR(FA_3A)) // 3 +#define FA_4 S(ALGR(FA_4A)) // 4 +#define FA_5 S(ALGR(FA_5A)) // 5 +#define FA_6 S(ALGR(FA_6A)) // 6 +#define FA_7 S(ALGR(FA_7A)) // 7 +#define FA_8 S(ALGR(FA_8A)) // 8 +#define FA_9 S(ALGR(FA_9A)) // 9 +#define FA_0 S(ALGR(FA_0A)) // 0 +#define FA_BRKP S(ALGR(FA_LT)) // ¦ +#define FA_NNBS S(ALGR(FA_SPC)) // (narrow non-breaking space) + From aa11ef5bcf012960081e9f8e23cc9c6025161142 Mon Sep 17 00:00:00 2001 From: Kevin Horvat Date: Sat, 22 Jun 2024 02:53:59 +0200 Subject: [PATCH 0060/1205] Fix leftover reference to previous AW20216S EN pin definition (#23974) --- keyboards/gmmk/numpad/numpad.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/gmmk/numpad/numpad.c b/keyboards/gmmk/numpad/numpad.c index cdbc4b871a81..87446d8f497b 100644 --- a/keyboards/gmmk/numpad/numpad.c +++ b/keyboards/gmmk/numpad/numpad.c @@ -107,12 +107,14 @@ led_config_t g_led_config = {{ 2, 2, 2, 2, 2, 2, 2 } }; -# ifdef AW20216S_PW_EN_PIN_1 +# ifdef AW20216S_PW_EN_PIN -void keyboard_pre_init_user(void) { +void keyboard_pre_init_kb(void) { wait_ms(2000); gpio_set_pin_output(AW20216S_PW_EN_PIN); gpio_write_pin_high(AW20216S_PW_EN_PIN); + + keyboard_pre_init_user(); } # endif From e5c80fc6b3a812faae3f5fe676e572d5c505b4f7 Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 21 Jun 2024 23:27:15 -0400 Subject: [PATCH 0061/1205] Update what's powering QMK docs (#23977) --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index f0e49a08e956..5025b40d959b 100644 --- a/readme.md +++ b/readme.md @@ -12,7 +12,7 @@ This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github * [See the official documentation on docs.qmk.fm](https://docs.qmk.fm) -The docs are powered by [Docsify](https://docsify.js.org/) and hosted on [GitHub](/docs/). They are also viewable offline; see [Previewing the Documentation](https://docs.qmk.fm/#/contributing?id=previewing-the-documentation) for more details. +The docs are powered by [VitePress](https://vitepress.dev/) and hosted on [GitHub](/docs/). They are also viewable offline; see [Previewing the Documentation](https://docs.qmk.fm/#/contributing?id=previewing-the-documentation) for more details. You can request changes by making a fork and opening a [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "Edit this page" link at the bottom of any page. From 6f03d20a92b01d656fe911aa025186056aefb9e9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Jun 2024 04:27:57 +0100 Subject: [PATCH 0062/1205] Fix 'qmk import-kbfirmware' WS2812 config (#23976) --- lib/python/qmk/importers.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/python/qmk/importers.py b/lib/python/qmk/importers.py index 35a38e8572b0..3e7f305a4331 100644 --- a/lib/python/qmk/importers.py +++ b/lib/python/qmk/importers.py @@ -181,9 +181,17 @@ def import_kbfirmware(kbfirmware_data): info_data['indicators.scroll_lock'] = kbf_data['keyboard.pins.scroll'] if kbf_data['keyboard.pins.rgb']: - info_data['rgblight.animations.all'] = True + info_data['rgblight.animations'] = { # Comment here is to force multiline formatting + "breathing": True, + "rainbow_mood": True, + "rainbow_swirl": True, + "snake": True, + "knight": True, + "static_gradient": True, + "twinkle": True + } info_data['rgblight.led_count'] = kbf_data['keyboard.settings.rgbNum'] - info_data['rgblight.pin'] = kbf_data['keyboard.pins.rgb'] + info_data['ws2812.pin'] = kbf_data['keyboard.pins.rgb'] if kbf_data['keyboard.pins.led']: info_data['backlight.levels'] = kbf_data['keyboard.settings.backlightLevels'] From 7aa2ce2b38e7cf38f148d0781eae525d72260b8b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Jun 2024 05:45:04 +0100 Subject: [PATCH 0063/1205] Update documentation suggestion in top level readme (#23978) --- docs/contributing.md | 4 +++- readme.md | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 14025c2c5058..43b2214d09db 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -105,7 +105,9 @@ enum my_keycodes { Before opening a pull request, you can preview your changes if you have set up the development environment by running this command from the `qmk_firmware/` folder: - qmk docs +``` +qmk docs +``` and navigating to `http://localhost:5173/`. diff --git a/readme.md b/readme.md index 5025b40d959b..5501089e861d 100644 --- a/readme.md +++ b/readme.md @@ -12,9 +12,9 @@ This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github * [See the official documentation on docs.qmk.fm](https://docs.qmk.fm) -The docs are powered by [VitePress](https://vitepress.dev/) and hosted on [GitHub](/docs/). They are also viewable offline; see [Previewing the Documentation](https://docs.qmk.fm/#/contributing?id=previewing-the-documentation) for more details. +The docs are powered by [VitePress](https://vitepress.dev/). They are also viewable offline; see [Previewing the Documentation](https://docs.qmk.fm/#/contributing?id=previewing-the-documentation) for more details. -You can request changes by making a fork and opening a [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "Edit this page" link at the bottom of any page. +You can request changes by making a fork and opening a [pull request](https://github.com/qmk/qmk_firmware/pulls). ## Supported Keyboards From 99aa4f5191ae0e120503385869b3b24baeaf223a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Jun 2024 09:10:12 +0100 Subject: [PATCH 0064/1205] Migrate `led_update_kb` implementations to DD (#23980) --- keyboards/aeboards/ext65/rev1/keyboard.json | 5 ++ keyboards/aeboards/ext65/rev1/rev1.c | 19 ++----- keyboards/aeboards/ext65/rev2/keyboard.json | 5 ++ keyboards/aeboards/ext65/rev2/rev2.c | 15 ------ keyboards/heliar/wm1_hotswap/keyboard.json | 6 +++ keyboards/heliar/wm1_hotswap/wm1_hotswap.c | 39 -------------- keyboards/hineybush/h10/h10.c | 34 ------------- keyboards/hineybush/h10/keyboard.json | 4 ++ keyboards/hineybush/h60/h60.c | 31 ----------- keyboards/hineybush/h60/keyboard.json | 4 ++ keyboards/hineybush/h87a/h87a.c | 16 ------ keyboards/hineybush/h87a/keyboard.json | 5 ++ keyboards/hineybush/h88/h88.c | 16 ------ keyboards/hineybush/h88/keyboard.json | 5 ++ keyboards/hineybush/physix/keyboard.json | 4 ++ keyboards/hineybush/physix/physix.c | 49 ------------------ keyboards/kc60se/kc60se.c | 30 ----------- keyboards/kc60se/keyboard.json | 4 ++ .../classy_tkl/rev_a/keyboard.json | 4 ++ .../masterworks/classy_tkl/rev_a/rev_a.c | 42 --------------- keyboards/matrix/cain_re/cain_re.c | 40 --------------- keyboards/matrix/cain_re/config.h | 24 --------- keyboards/matrix/cain_re/keyboard.json | 5 ++ keyboards/matrix/m12og/rev2/keyboard.json | 6 +++ keyboards/matrix/m12og/rev2/rev2.c | 23 --------- keyboards/quad_h/lb75/keyboard.json | 5 ++ keyboards/quad_h/lb75/lb75.c | 39 -------------- keyboards/rmi_kb/wete/v1/keyboard.json | 6 +++ keyboards/rmi_kb/wete/v1/v1.c | 35 ------------- .../switchplate/southpaw_65/keyboard.json | 4 ++ .../switchplate/southpaw_65/southpaw_65.c | 30 ----------- .../southpaw_fullsize/keyboard.json | 6 +++ .../southpaw_fullsize/southpaw_fullsize.c | 51 ------------------- .../westfoxtrot/cypher/rev1/keyboard.json | 5 ++ keyboards/westfoxtrot/cypher/rev1/rev1.c | 31 ----------- .../westfoxtrot/cypher/rev5/keyboard.json | 5 ++ keyboards/westfoxtrot/cypher/rev5/rev5.c | 31 ----------- keyboards/westfoxtrot/prophet/keyboard.json | 3 ++ keyboards/westfoxtrot/prophet/prophet.c | 11 +--- 39 files changed, 96 insertions(+), 601 deletions(-) delete mode 100644 keyboards/heliar/wm1_hotswap/wm1_hotswap.c delete mode 100644 keyboards/hineybush/h10/h10.c delete mode 100644 keyboards/hineybush/h60/h60.c delete mode 100644 keyboards/hineybush/physix/physix.c delete mode 100644 keyboards/kc60se/kc60se.c delete mode 100644 keyboards/masterworks/classy_tkl/rev_a/rev_a.c delete mode 100644 keyboards/matrix/cain_re/cain_re.c delete mode 100644 keyboards/matrix/cain_re/config.h delete mode 100644 keyboards/matrix/m12og/rev2/rev2.c delete mode 100644 keyboards/quad_h/lb75/lb75.c delete mode 100644 keyboards/rmi_kb/wete/v1/v1.c delete mode 100644 keyboards/switchplate/southpaw_65/southpaw_65.c delete mode 100644 keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c delete mode 100644 keyboards/westfoxtrot/cypher/rev1/rev1.c delete mode 100644 keyboards/westfoxtrot/cypher/rev5/rev5.c diff --git a/keyboards/aeboards/ext65/rev1/keyboard.json b/keyboards/aeboards/ext65/rev1/keyboard.json index c254a6714214..1d105505e538 100644 --- a/keyboards/aeboards/ext65/rev1/keyboard.json +++ b/keyboards/aeboards/ext65/rev1/keyboard.json @@ -13,6 +13,11 @@ "extrakey": true, "nkro": true }, + "indicators": { + "caps_lock": "D3", + "num_lock": "D5", + "scroll_lock": "D2" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "diode_direction": "COL2ROW", diff --git a/keyboards/aeboards/ext65/rev1/rev1.c b/keyboards/aeboards/ext65/rev1/rev1.c index 344a2bcb3221..fc8280a5e4e3 100644 --- a/keyboards/aeboards/ext65/rev1/rev1.c +++ b/keyboards/aeboards/ext65/rev1/rev1.c @@ -16,23 +16,10 @@ #include "quantum.h" -void keyboard_pre_init_user(void) { - // Call the keyboard pre init code. - // Set our LED pins as output - gpio_set_pin_output(D5); - gpio_set_pin_output(D3); - gpio_set_pin_output(D2); - gpio_set_pin_output(D1); -} +void keyboard_pre_init_kb(void) { + gpio_set_pin_output(D1); -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D5, led_state.num_lock); - gpio_write_pin(D3, led_state.caps_lock); - gpio_write_pin(D2, led_state.scroll_lock); - } - return res; + keyboard_pre_init_user(); } layer_state_t layer_state_set_kb(layer_state_t state) { diff --git a/keyboards/aeboards/ext65/rev2/keyboard.json b/keyboards/aeboards/ext65/rev2/keyboard.json index 0ab50f925827..ab7cceeefb39 100644 --- a/keyboards/aeboards/ext65/rev2/keyboard.json +++ b/keyboards/aeboards/ext65/rev2/keyboard.json @@ -22,6 +22,11 @@ "levels": 6, "breathing": true }, + "indicators": { + "caps_lock": "B3", + "num_lock": "B4", + "scroll_lock": "A15" + }, "rgblight": { "led_count": 24, "animations": { diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c index 5922b601cd19..7b8ebb008754 100644 --- a/keyboards/aeboards/ext65/rev2/rev2.c +++ b/keyboards/aeboards/ext65/rev2/rev2.c @@ -69,26 +69,11 @@ bool oled_task_kb(void) { #else void keyboard_pre_init_kb(void) { - // Call the keyboard pre init code. - // Set our LED pins as output - gpio_set_pin_output(B4); - gpio_set_pin_output(B3); - gpio_set_pin_output(A15); gpio_set_pin_output(A14); keyboard_pre_init_user(); } -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(B4, led_state.num_lock); - gpio_write_pin(B3, led_state.caps_lock); - gpio_write_pin(A15, led_state.scroll_lock); - } - return res; -} - layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 1: diff --git a/keyboards/heliar/wm1_hotswap/keyboard.json b/keyboards/heliar/wm1_hotswap/keyboard.json index 3fa1a8e6cb8e..789a3c7d2b6d 100644 --- a/keyboards/heliar/wm1_hotswap/keyboard.json +++ b/keyboards/heliar/wm1_hotswap/keyboard.json @@ -25,6 +25,12 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "D6", + "num_lock": "D7", + "scroll_lock": "D4", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c deleted file mode 100644 index d2d10b0b1f11..000000000000 --- a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 HELIAR MK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - - -void keyboard_pre_init_kb(void) -{ - gpio_set_pin_output(D7); - gpio_write_pin_high(D7); - gpio_set_pin_output(D6); - gpio_write_pin_high(D6); - gpio_set_pin_output(D4); - gpio_write_pin_high(D4); -} - -bool led_update_kb(led_t led_state) { - - if (led_update_user(led_state)){ - gpio_write_pin(D7, !led_state.num_lock); - gpio_write_pin(D6, !led_state.caps_lock); - gpio_write_pin(D4, !led_state.scroll_lock); - } - - return true; -} diff --git a/keyboards/hineybush/h10/h10.c b/keyboards/hineybush/h10/h10.c deleted file mode 100644 index 2170a8b2d7b3..000000000000 --- a/keyboards/hineybush/h10/h10.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 hineybush - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(F7); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(F7, !led_state.num_lock); - } - return true; -} diff --git a/keyboards/hineybush/h10/keyboard.json b/keyboards/hineybush/h10/keyboard.json index 73205f85ffcb..63a109f4843e 100644 --- a/keyboards/hineybush/h10/keyboard.json +++ b/keyboards/hineybush/h10/keyboard.json @@ -32,6 +32,10 @@ "pin": "B7", "breathing": true }, + "indicators": { + "caps_lock": "F7", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_6x4", "numpad_6x4"], diff --git a/keyboards/hineybush/h60/h60.c b/keyboards/hineybush/h60/h60.c deleted file mode 100644 index 472b99d8ba15..000000000000 --- a/keyboards/hineybush/h60/h60.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2020 hineybush - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(C6); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(C6, !led_state.caps_lock); - } - return true; -} - diff --git a/keyboards/hineybush/h60/keyboard.json b/keyboards/hineybush/h60/keyboard.json index 8a019d42da37..ea058b6d6462 100644 --- a/keyboards/hineybush/h60/keyboard.json +++ b/keyboards/hineybush/h60/keyboard.json @@ -34,6 +34,10 @@ "pin": "B7", "levels": 12 }, + "indicators": { + "caps_lock": "C6", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/hineybush/h87a/h87a.c b/keyboards/hineybush/h87a/h87a.c index f2d0c62813e6..8c10b68ca0e6 100644 --- a/keyboards/hineybush/h87a/h87a.c +++ b/keyboards/hineybush/h87a/h87a.c @@ -15,22 +15,6 @@ */ #include "quantum.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(D5); - gpio_set_pin_output(E6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(D5, !led_state.caps_lock); - gpio_write_pin(E6, !led_state.scroll_lock); - } - return true; -} - void eeconfig_init_kb(void) { // EEPROM is getting reset! rgblight_enable(); // Enable RGB by default rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness diff --git a/keyboards/hineybush/h87a/keyboard.json b/keyboards/hineybush/h87a/keyboard.json index e9096201d923..987d1a60fdb2 100644 --- a/keyboards/hineybush/h87a/keyboard.json +++ b/keyboards/hineybush/h87a/keyboard.json @@ -35,6 +35,11 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "D5", + "scroll_lock": "E6", + "on_state": 0 + }, "ws2812": { "pin": "D3" }, diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c index a916609d75e1..7c634467511c 100644 --- a/keyboards/hineybush/h88/h88.c +++ b/keyboards/hineybush/h88/h88.c @@ -15,22 +15,6 @@ */ #include "quantum.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(D5); - gpio_set_pin_output(E6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(D5, !led_state.caps_lock); - gpio_write_pin(E6, !led_state.scroll_lock); - } - return true; -} - void eeconfig_init_kb(void) { // EEPROM is getting reset! rgblight_enable(); // Enable RGB by default rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness diff --git a/keyboards/hineybush/h88/keyboard.json b/keyboards/hineybush/h88/keyboard.json index e74a3f362347..b1bb84230358 100644 --- a/keyboards/hineybush/h88/keyboard.json +++ b/keyboards/hineybush/h88/keyboard.json @@ -35,6 +35,11 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "D5", + "scroll_lock": "E6", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/hineybush/physix/keyboard.json b/keyboards/hineybush/physix/keyboard.json index b7b1c05393e6..79a0bea7aba7 100644 --- a/keyboards/hineybush/physix/keyboard.json +++ b/keyboards/hineybush/physix/keyboard.json @@ -33,6 +33,10 @@ "pin": "B7", "breathing": true }, + "indicators": { + "caps_lock": "D3", + "scroll_lock": "D5" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/hineybush/physix/physix.c b/keyboards/hineybush/physix/physix.c deleted file mode 100644 index cd920a72b30a..000000000000 --- a/keyboards/hineybush/physix/physix.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2019 hineybush - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(D3); - gpio_set_pin_output(D5); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(D3, led_state.caps_lock); - gpio_write_pin(D5, led_state.scroll_lock); - } - return res; - return led_update_user(led_state); -} - - - diff --git a/keyboards/kc60se/kc60se.c b/keyboards/kc60se/kc60se.c deleted file mode 100644 index a7d60079b2e8..000000000000 --- a/keyboards/kc60se/kc60se.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2017 Blake C. Lewis - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void matrix_init_kb(void){ - gpio_set_pin_output(B2); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B2, !led_state.caps_lock); - } - return res; -} - diff --git a/keyboards/kc60se/keyboard.json b/keyboards/kc60se/keyboard.json index b7123b5749d4..c8bdf24a4b8c 100644 --- a/keyboards/kc60se/keyboard.json +++ b/keyboards/kc60se/keyboard.json @@ -27,6 +27,10 @@ "pin": "F5", "levels": 6 }, + "indicators": { + "caps_lock": "B2", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["60_ansi", "60_ansi_split_bs_rshift", "60_iso", "60_iso_split_bs_rshift"], diff --git a/keyboards/masterworks/classy_tkl/rev_a/keyboard.json b/keyboards/masterworks/classy_tkl/rev_a/keyboard.json index d3e723d413df..889aa6d3f901 100644 --- a/keyboards/masterworks/classy_tkl/rev_a/keyboard.json +++ b/keyboards/masterworks/classy_tkl/rev_a/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "B5", + "scroll_lock": "B6" + }, "matrix_pins": { "cols": ["B4", "D7", "D6", "D4", "C6", "D5", "D3", "D2", "D1", "D0", "B7", "B3", "B2", "B1", "B0", "E6", "F7"], "rows": ["C7", "F0", "F1", "F4", "F5", "F6"] diff --git a/keyboards/masterworks/classy_tkl/rev_a/rev_a.c b/keyboards/masterworks/classy_tkl/rev_a/rev_a.c deleted file mode 100644 index 6e01c217d2d7..000000000000 --- a/keyboards/masterworks/classy_tkl/rev_a/rev_a.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright 2020 Mathias Andersson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -#define CAPS_PIN B5 -#define SCROLL_PIN B6 - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - gpio_set_pin_output(CAPS_PIN); - gpio_set_pin_output(SCROLL_PIN); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(CAPS_PIN, led_state.caps_lock); - gpio_write_pin(SCROLL_PIN, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/matrix/cain_re/cain_re.c b/keyboards/matrix/cain_re/cain_re.c deleted file mode 100644 index 6dc24f22926f..000000000000 --- a/keyboards/matrix/cain_re/cain_re.c +++ /dev/null @@ -1,40 +0,0 @@ -/** - * cain_re.c - * - Copyright 2020 astro - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - */ - -#include "quantum.h" - -void matrix_init_kb(void) -{ - gpio_set_pin_output(NUM_PIN); - gpio_set_pin_output(CAPS_PIN); - gpio_set_pin_output(SCROLL_PIN); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) -{ - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(NUM_PIN, led_state.num_lock); - gpio_write_pin(CAPS_PIN, led_state.caps_lock); - gpio_write_pin(SCROLL_PIN, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/matrix/cain_re/config.h b/keyboards/matrix/cain_re/config.h deleted file mode 100644 index 9469d689d0c7..000000000000 --- a/keyboards/matrix/cain_re/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/** - * config.h - * - Copyright 2020 astro - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - */ - -#pragma once - -#define CAPS_PIN D3 -#define NUM_PIN F7 -#define SCROLL_PIN B0 diff --git a/keyboards/matrix/cain_re/keyboard.json b/keyboards/matrix/cain_re/keyboard.json index 02c6cbbeb568..7d93e806c25e 100644 --- a/keyboards/matrix/cain_re/keyboard.json +++ b/keyboards/matrix/cain_re/keyboard.json @@ -8,6 +8,11 @@ "pid": "0x0106", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "D3", + "num_lock": "F7", + "scroll_lock": "B0" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/matrix/m12og/rev2/keyboard.json b/keyboards/matrix/m12og/rev2/keyboard.json index 42df6a75e874..45fcffe9eb61 100644 --- a/keyboards/matrix/m12og/rev2/keyboard.json +++ b/keyboards/matrix/m12og/rev2/keyboard.json @@ -8,6 +8,12 @@ "pid": "0x8712", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "C6", + "num_lock": "B1", + "scroll_lock": "B2", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/matrix/m12og/rev2/rev2.c b/keyboards/matrix/m12og/rev2/rev2.c deleted file mode 100644 index e64640b2d2d8..000000000000 --- a/keyboards/matrix/m12og/rev2/rev2.c +++ /dev/null @@ -1,23 +0,0 @@ -/** - * rev2.c - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(C6); - gpio_set_pin_output(B2); - gpio_set_pin_output(B1); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(B1, !led_state.num_lock); - gpio_write_pin(C6, !led_state.caps_lock); - gpio_write_pin(B2, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/quad_h/lb75/keyboard.json b/keyboards/quad_h/lb75/keyboard.json index 0a51d4f47f48..e88ba4b3a4ec 100644 --- a/keyboards/quad_h/lb75/keyboard.json +++ b/keyboards/quad_h/lb75/keyboard.json @@ -33,6 +33,11 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "B1", + "scroll_lock": "B2", + "on_state": 0 + }, "ws2812": { "pin": "B0" }, diff --git a/keyboards/quad_h/lb75/lb75.c b/keyboards/quad_h/lb75/lb75.c deleted file mode 100644 index ef716092b9f3..000000000000 --- a/keyboards/quad_h/lb75/lb75.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 Ryota Goto - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - gpio_set_pin_output(B1); - gpio_set_pin_output(B2); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - - if(res) { - gpio_write_pin(B1, !led_state.caps_lock); - gpio_write_pin(B2, !led_state.scroll_lock); - } - - return res; -} - diff --git a/keyboards/rmi_kb/wete/v1/keyboard.json b/keyboards/rmi_kb/wete/v1/keyboard.json index 8e8059c103de..c9a54f76c204 100644 --- a/keyboards/rmi_kb/wete/v1/keyboard.json +++ b/keyboards/rmi_kb/wete/v1/keyboard.json @@ -35,6 +35,12 @@ "levels": 24, "breathing": true }, + "indicators": { + "caps_lock": "B3", + "num_lock": "A14", + "scroll_lock": "A15", + "on_state": 0 + }, "rgblight": { "led_count": 24, "animations": { diff --git a/keyboards/rmi_kb/wete/v1/v1.c b/keyboards/rmi_kb/wete/v1/v1.c deleted file mode 100644 index 34a091746847..000000000000 --- a/keyboards/rmi_kb/wete/v1/v1.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Ramon Imbao - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void keyboard_pre_init_user(void) { - // Initialize indicator LED pins - gpio_set_pin_output(A14); // Num Lock - gpio_set_pin_output(A15); // Scroll Lock - gpio_set_pin_output(B3); // Caps Lock -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(A14, !led_state.num_lock); - gpio_write_pin(A15, !led_state.scroll_lock); - gpio_write_pin(B3, !led_state.caps_lock); - } - - return res; -} diff --git a/keyboards/switchplate/southpaw_65/keyboard.json b/keyboards/switchplate/southpaw_65/keyboard.json index e4090e49c728..72c4c71097e4 100644 --- a/keyboards/switchplate/southpaw_65/keyboard.json +++ b/keyboards/switchplate/southpaw_65/keyboard.json @@ -29,6 +29,10 @@ "pin": "B5", "levels": 10 }, + "indicators": { + "caps_lock": "B6", + "on_state": 0 + }, "rgblight": { "led_count": 9, "animations": { diff --git a/keyboards/switchplate/southpaw_65/southpaw_65.c b/keyboards/switchplate/southpaw_65/southpaw_65.c deleted file mode 100644 index dfe3665928bf..000000000000 --- a/keyboards/switchplate/southpaw_65/southpaw_65.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(B6); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B6, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/switchplate/southpaw_fullsize/keyboard.json b/keyboards/switchplate/southpaw_fullsize/keyboard.json index ad897821c35a..84942ccfa469 100644 --- a/keyboards/switchplate/southpaw_fullsize/keyboard.json +++ b/keyboards/switchplate/southpaw_fullsize/keyboard.json @@ -31,6 +31,12 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "D4", + "num_lock": "D3", + "scroll_lock": "D5", + "on_state": 0 + }, "processor": "at90usb1286", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c deleted file mode 100644 index 3d77e8722e65..000000000000 --- a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2020 Ryota Goto - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -#define INDICATOR_NUM D3 -#define INDICATOR_CAPS D4 -#define INDICATOR_SCR D5 - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - // D3 Numlock, D4 Capslock, D5 Scrlock - gpio_set_pin_output(INDICATOR_NUM); - gpio_set_pin_output(INDICATOR_CAPS); - gpio_set_pin_output(INDICATOR_SCR); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - bool res = led_update_user(led_state); - if (res) - { - gpio_write_pin(INDICATOR_NUM, !led_state.num_lock); - gpio_write_pin(INDICATOR_CAPS, !led_state.caps_lock); - gpio_write_pin(INDICATOR_SCR, !led_state.scroll_lock); - } - return res; -} - diff --git a/keyboards/westfoxtrot/cypher/rev1/keyboard.json b/keyboards/westfoxtrot/cypher/rev1/keyboard.json index 09294d169c2c..30dcc625de06 100644 --- a/keyboards/westfoxtrot/cypher/rev1/keyboard.json +++ b/keyboards/westfoxtrot/cypher/rev1/keyboard.json @@ -31,6 +31,11 @@ "levels": 5, "breathing": true }, + "indicators": { + "caps_lock": "F1", + "num_lock": "F4", + "scroll_lock": "F5" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/westfoxtrot/cypher/rev1/rev1.c b/keyboards/westfoxtrot/cypher/rev1/rev1.c deleted file mode 100644 index eeaa7b4a4cf3..000000000000 --- a/keyboards/westfoxtrot/cypher/rev1/rev1.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2019 westfoxtrot - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(F4, led_state.num_lock); - gpio_write_pin(F1, led_state.caps_lock); - gpio_write_pin(F5, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/westfoxtrot/cypher/rev5/keyboard.json b/keyboards/westfoxtrot/cypher/rev5/keyboard.json index fbb487534d55..278ff94b06eb 100644 --- a/keyboards/westfoxtrot/cypher/rev5/keyboard.json +++ b/keyboards/westfoxtrot/cypher/rev5/keyboard.json @@ -33,6 +33,11 @@ "levels": 5, "breathing": true }, + "indicators": { + "caps_lock": "D5", + "num_lock": "D3", + "scroll_lock": "D2" + }, "rgblight": { "hue_steps": 12, "saturation_steps": 25, diff --git a/keyboards/westfoxtrot/cypher/rev5/rev5.c b/keyboards/westfoxtrot/cypher/rev5/rev5.c deleted file mode 100644 index 37ca9cf3c162..000000000000 --- a/keyboards/westfoxtrot/cypher/rev5/rev5.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2019 westfoxtrot - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(D3, led_state.num_lock); - gpio_write_pin(D5, led_state.caps_lock); - gpio_write_pin(D2, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/westfoxtrot/prophet/keyboard.json b/keyboards/westfoxtrot/prophet/keyboard.json index 049f5cd7fc58..f82c6da14dd8 100644 --- a/keyboards/westfoxtrot/prophet/keyboard.json +++ b/keyboards/westfoxtrot/prophet/keyboard.json @@ -17,6 +17,9 @@ "nkro": true, "sleep_led": true }, + "indicators": { + "caps_lock": "B13" + }, "qmk": { "locking": { "enabled": true, diff --git a/keyboards/westfoxtrot/prophet/prophet.c b/keyboards/westfoxtrot/prophet/prophet.c index 3ef0a3f92883..b33ecf90b410 100644 --- a/keyboards/westfoxtrot/prophet/prophet.c +++ b/keyboards/westfoxtrot/prophet/prophet.c @@ -1,16 +1,9 @@ #include "quantum.h" -void keyboard_pre_init_kb (void) { +void keyboard_pre_init_kb(void) { gpio_set_pin_output(B12); - gpio_set_pin_output(B13); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B13, led_state.caps_lock); - } - return res; + keyboard_pre_init_user(); } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { From cb39df273de782be1145dc5184bfd47d823531d5 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Jun 2024 09:10:58 +0100 Subject: [PATCH 0065/1205] Remove deprecated `led_set_user` (#23979) --- docs/features/led_indicators.md | 7 +------ keyboards/converter/usb_usb/custom_matrix.cpp | 1 - keyboards/sirius/unigo66/custom_matrix.cpp | 1 - quantum/led.c | 11 +++-------- quantum/led.h | 3 --- 5 files changed, 4 insertions(+), 19 deletions(-) diff --git a/docs/features/led_indicators.md b/docs/features/led_indicators.md index 8435c69a5526..211fda258155 100644 --- a/docs/features/led_indicators.md +++ b/docs/features/led_indicators.md @@ -21,9 +21,8 @@ There are three ways to get the lock LED state: The `host_keyboard_led_state()` may reflect an updated state before `led_update_user()` is called. ::: -Two deprecated functions that provide the LED state as `uint8_t`: +Deprecated functions that provide the LED state as `uint8_t`: -* `uint8_t led_set_user(uint8_t usb_led)` * `uint8_t host_keyboard_leds()` ## Configuration Options @@ -50,10 +49,6 @@ When the configuration options do not provide enough flexibility, the following Both receives LED state as a struct parameter. Returning `true` in `led_update_user()` will allow the keyboard level code in `led_update_kb()` to run as well. Returning `false` will override the keyboard level code, depending on how the keyboard level function is set up. -::: tip -This boolean return type of `led_update_user` allows for overriding keyboard LED controls, and is thus recommended over the void `led_set_user` function. -::: - ### Example of keyboard LED update implementation This is a template indicator function that can be implemented on keyboard level code: diff --git a/keyboards/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp index ca0855a82b9f..e1ef69557071 100644 --- a/keyboards/converter/usb_usb/custom_matrix.cpp +++ b/keyboards/converter/usb_usb/custom_matrix.cpp @@ -229,7 +229,6 @@ extern "C" { if (kbd2.isReady()) kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); if (kbd3.isReady()) kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); if (kbd4.isReady()) kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); - led_set_user(usb_led); led_update_kb((led_t){.raw = usb_led}); } } diff --git a/keyboards/sirius/unigo66/custom_matrix.cpp b/keyboards/sirius/unigo66/custom_matrix.cpp index 25648a5f78e2..879a0e7c1534 100644 --- a/keyboards/sirius/unigo66/custom_matrix.cpp +++ b/keyboards/sirius/unigo66/custom_matrix.cpp @@ -216,7 +216,6 @@ extern "C" kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); - led_set_user(usb_led); led_update_kb((led_t){.raw = usb_led}); } diff --git a/quantum/led.c b/quantum/led.c index e2b598510997..aec3edc8235c 100644 --- a/quantum/led.c +++ b/quantum/led.c @@ -56,19 +56,15 @@ static void handle_backlight_caps_lock(led_t led_state) { #endif static uint32_t last_led_modification_time = 0; -uint32_t last_led_activity_time(void) { + +uint32_t last_led_activity_time(void) { return last_led_modification_time; } + uint32_t last_led_activity_elapsed(void) { return timer_elapsed32(last_led_modification_time); } -/** \brief Lock LED set callback - keymap/user level - * - * \deprecated Use led_update_user() instead. - */ -__attribute__((weak)) void led_set_user(uint8_t usb_led) {} - /** \brief Lock LED update callback - keymap/user level * * \return True if led_update_kb() should run its own code, false otherwise. @@ -146,7 +142,6 @@ __attribute__((weak)) void led_set(uint8_t usb_led) { handle_backlight_caps_lock((led_t)usb_led); #endif - led_set_user(usb_led); led_update_kb((led_t)usb_led); } diff --git a/quantum/led.h b/quantum/led.h index b9fad670aeba..669e93e19441 100644 --- a/quantum/led.h +++ b/quantum/led.h @@ -48,9 +48,6 @@ void led_wakeup(void); void led_task(void); -/* Deprecated callbacks */ -void led_set_user(uint8_t usb_led); - /* Callbacks */ bool led_update_user(led_t led_state); bool led_update_kb(led_t led_state); From 17498fa48a8c5c0ac439e59d0db12a41954d4fb0 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Jun 2024 12:14:07 +0100 Subject: [PATCH 0066/1205] Migrate `led_update_kb` implementations to DD (#23981) --- keyboards/ai03/vega/keyboard.json | 5 +++ keyboards/ai03/vega/vega.c | 37 ---------------- keyboards/bioi/g60/g60.c | 28 ------------ keyboards/bioi/g60/keyboard.json | 4 ++ keyboards/bioi/morgan65/keyboard.json | 4 ++ keyboards/bioi/morgan65/morgan65.c | 28 ------------ keyboards/bioi/s65/keyboard.json | 4 ++ keyboards/bioi/s65/s65.c | 27 ------------ keyboards/clueboard/2x1800/2019/2019.c | 14 ------ keyboards/clueboard/2x1800/2019/keyboard.json | 6 +++ keyboards/duck/orion/v3/keyboard.json | 6 +++ keyboards/duck/orion/v3/matrix.c | 13 ------ keyboards/duck/orion/v3/v3.c | 39 ----------------- keyboards/ealdin/quadrant/keyboard.json | 3 ++ keyboards/ealdin/quadrant/quadrant.c | 13 ------ .../jtallbean/split_65/keyboard.json | 3 ++ .../handwired/jtallbean/split_65/split_65.c | 43 ------------------- .../handwired/prime_exl_plus/keyboard.json | 4 ++ .../handwired/prime_exl_plus/prime_exl_plus.c | 19 +------- .../ibm/model_m/ashpil_usbc/ashpil_usbc.c | 36 ---------------- .../ibm/model_m/ashpil_usbc/keyboard.json | 6 +++ keyboards/ibm/model_m/teensypp/keyboard.json | 6 +++ keyboards/ibm/model_m/teensypp/teensypp.c | 36 ---------------- keyboards/ibm/model_m/yugo_m/keyboard.json | 6 +++ keyboards/ibm/model_m/yugo_m/yugo_m.c | 35 --------------- keyboards/jels/jels88/jels88.c | 38 ---------------- keyboards/jels/jels88/keyboard.json | 4 ++ .../kbdfans/bella/soldered/keyboard.json | 4 ++ keyboards/kbdfans/bella/soldered/soldered.c | 28 ------------ keyboards/kbdfans/maja_soldered/keyboard.json | 4 ++ .../kbdfans/maja_soldered/maja_soldered.c | 29 ------------- keyboards/kopibeng/mnk88/mnk88.c | 36 ---------------- keyboards/kopibeng/xt8x/xt8x.c | 15 ------- keyboards/mc_76k/keyboard.json | 4 ++ keyboards/mc_76k/mc_76k.c | 34 --------------- keyboards/viktus/sp111/keyboard.json | 5 +++ keyboards/viktus/sp111/sp111.c | 18 -------- keyboards/wilba_tech/wt69_a/keyboard.json | 3 ++ keyboards/wilba_tech/wt69_a/wt69_a.c | 30 ------------- keyboards/wilba_tech/wt70_jb/keyboard.json | 3 ++ keyboards/wilba_tech/wt70_jb/wt70_jb.c | 13 ------ keyboards/wuque/ikki68/ikki68.c | 30 ------------- keyboards/wuque/ikki68/keyboard.json | 4 ++ keyboards/ymdk/yd60mq/info.json | 4 ++ keyboards/ymdk/yd60mq/yd60mq.c | 21 --------- 45 files changed, 94 insertions(+), 658 deletions(-) delete mode 100644 keyboards/ai03/vega/vega.c delete mode 100644 keyboards/bioi/g60/g60.c delete mode 100644 keyboards/bioi/morgan65/morgan65.c delete mode 100644 keyboards/bioi/s65/s65.c delete mode 100644 keyboards/duck/orion/v3/v3.c delete mode 100644 keyboards/handwired/jtallbean/split_65/split_65.c delete mode 100644 keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c delete mode 100644 keyboards/ibm/model_m/teensypp/teensypp.c delete mode 100644 keyboards/ibm/model_m/yugo_m/yugo_m.c delete mode 100644 keyboards/jels/jels88/jels88.c delete mode 100755 keyboards/kbdfans/bella/soldered/soldered.c delete mode 100755 keyboards/kbdfans/maja_soldered/maja_soldered.c delete mode 100644 keyboards/kopibeng/mnk88/mnk88.c delete mode 100644 keyboards/mc_76k/mc_76k.c delete mode 100644 keyboards/wilba_tech/wt69_a/wt69_a.c delete mode 100644 keyboards/wuque/ikki68/ikki68.c delete mode 100644 keyboards/ymdk/yd60mq/yd60mq.c diff --git a/keyboards/ai03/vega/keyboard.json b/keyboards/ai03/vega/keyboard.json index a58fa4fcaefb..bc220cc7a125 100644 --- a/keyboards/ai03/vega/keyboard.json +++ b/keyboards/ai03/vega/keyboard.json @@ -22,6 +22,11 @@ "resync": true } }, + "indicators": { + "caps_lock": "B7", + "scroll_lock": "A5", + "on_state": 0 + }, "matrix_pins": { "cols": ["B5", "A3", "A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6"], "rows": ["A1", "A2", "B3", "A15", "A10"] diff --git a/keyboards/ai03/vega/vega.c b/keyboards/ai03/vega/vega.c deleted file mode 100644 index 44ded2c85c45..000000000000 --- a/keyboards/ai03/vega/vega.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2020 ai03 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - // Initialize indicator LEDs to output - - gpio_set_pin_output(B7); // Caps - gpio_set_pin_output(A5); // Slck - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - - bool res = led_update_user(led_state); - - if(res) { - gpio_write_pin(B7, !led_state.caps_lock); - gpio_write_pin(A5, !led_state.scroll_lock); - } - return res; -} \ No newline at end of file diff --git a/keyboards/bioi/g60/g60.c b/keyboards/bioi/g60/g60.c deleted file mode 100644 index 3fdfef8897a5..000000000000 --- a/keyboards/bioi/g60/g60.c +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2019 Basic I/O Instruments(Scott Wei) -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F0); - gpio_write_pin_high(F0); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F0, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/bioi/g60/keyboard.json b/keyboards/bioi/g60/keyboard.json index 8d3dd587707a..b98aee8273f1 100644 --- a/keyboards/bioi/g60/keyboard.json +++ b/keyboards/bioi/g60/keyboard.json @@ -35,6 +35,10 @@ "pin": "B7", "levels": 12 }, + "indicators": { + "caps_lock": "F0", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/bioi/morgan65/keyboard.json b/keyboards/bioi/morgan65/keyboard.json index 8f83237f82f5..5606233f2ad3 100644 --- a/keyboards/bioi/morgan65/keyboard.json +++ b/keyboards/bioi/morgan65/keyboard.json @@ -35,6 +35,10 @@ "pin": "B6", "levels": 12 }, + "indicators": { + "caps_lock": "F0", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/bioi/morgan65/morgan65.c b/keyboards/bioi/morgan65/morgan65.c deleted file mode 100644 index 3fdfef8897a5..000000000000 --- a/keyboards/bioi/morgan65/morgan65.c +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2019 Basic I/O Instruments(Scott Wei) -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F0); - gpio_write_pin_high(F0); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F0, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/bioi/s65/keyboard.json b/keyboards/bioi/s65/keyboard.json index c55852f31ccb..56d53b54cf5b 100644 --- a/keyboards/bioi/s65/keyboard.json +++ b/keyboards/bioi/s65/keyboard.json @@ -35,6 +35,10 @@ "pin": "B6", "levels": 12 }, + "indicators": { + "caps_lock": "F0", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/bioi/s65/s65.c b/keyboards/bioi/s65/s65.c deleted file mode 100644 index e632f31eeb63..000000000000 --- a/keyboards/bioi/s65/s65.c +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2019 Basic I/O Instruments(Scott Wei) -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "quantum.h" -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F0); - gpio_write_pin_high(F0); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F0, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/clueboard/2x1800/2019/2019.c b/keyboards/clueboard/2x1800/2019/2019.c index 8b0ba6a71e16..3fe170af998e 100644 --- a/keyboards/clueboard/2x1800/2019/2019.c +++ b/keyboards/clueboard/2x1800/2019/2019.c @@ -18,9 +18,6 @@ void matrix_init_kb(void) { // Set our LED pins as output gpio_set_pin_output(D6); - gpio_set_pin_output(B4); - gpio_set_pin_output(B5); - gpio_set_pin_output(B6); // Set our Tilt Sensor pins as input gpio_set_pin_input_high(SHAKE_PIN_A); @@ -133,17 +130,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record); } -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B4, !led_state.num_lock); - gpio_write_pin(B5, !led_state.caps_lock); - gpio_write_pin(B6, !led_state.scroll_lock); - } - - return res; -} - __attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; } __attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return encoder_update_keymap(index, clockwise); } diff --git a/keyboards/clueboard/2x1800/2019/keyboard.json b/keyboards/clueboard/2x1800/2019/keyboard.json index 6f33a11ca758..31ff448d17e7 100644 --- a/keyboards/clueboard/2x1800/2019/keyboard.json +++ b/keyboards/clueboard/2x1800/2019/keyboard.json @@ -32,6 +32,12 @@ {"pin_a": "A1", "pin_b": "A0"} ] }, + "indicators": { + "caps_lock": "B5", + "num_lock": "B4", + "scroll_lock": "B6", + "on_state": 0 + }, "layout_aliases": { "LAYOUT": "LAYOUT_all" }, diff --git a/keyboards/duck/orion/v3/keyboard.json b/keyboards/duck/orion/v3/keyboard.json index 280cd8b07f8c..ba479aa0a298 100644 --- a/keyboards/duck/orion/v3/keyboard.json +++ b/keyboards/duck/orion/v3/keyboard.json @@ -16,6 +16,12 @@ "bootmagic": { "matrix": [4, 10] }, + "indicators": { + "caps_lock": "B0", + "num_lock": "B4", + "scroll_lock": "D7", + "on_state": 0 + }, "rgblight": { "led_count": 18, "animations": { diff --git a/keyboards/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c index 1dd07a656700..acd4fe0349ac 100644 --- a/keyboards/duck/orion/v3/matrix.c +++ b/keyboards/duck/orion/v3/matrix.c @@ -53,20 +53,7 @@ __attribute__ ((weak)) void matrix_scan_user(void) { } -void indicator_init_ports(void) { - - // Num LED - gpio_set_pin_output(B4); - - // Caps Lock - gpio_set_pin_output(B0); - - // Scroll Lock - gpio_set_pin_output(D7); -} - void matrix_init(void) { - indicator_init_ports(); unselect_cols(); init_rows(); diff --git a/keyboards/duck/orion/v3/v3.c b/keyboards/duck/orion/v3/v3.c deleted file mode 100644 index c0ca9ddd06aa..000000000000 --- a/keyboards/duck/orion/v3/v3.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" -#include "indicator_leds.h" - -// Alphas PB1 -// Navigation Cluster: PB2 -// Number Row, Mods: PB3 -// Function Row: PE6 - -// Other than using RGB or LED matrix, QMK cannot turn on specific zones -// of backlight LEDs. Unfortunately, Duck PCBs do not follow this design -// and instead use multiple pins connected to each of these zones. QMK is -// only able to control them ALL with the current default mechanisms. - -// Locking indicator LEDs -// The Duck Orion V3 has 3 locking indicator LEDs and are located to the right -// of the Escape key. -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(B0, !led_state.caps_lock); - gpio_write_pin(B4, !led_state.num_lock); - gpio_write_pin(D7, !led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/ealdin/quadrant/keyboard.json b/keyboards/ealdin/quadrant/keyboard.json index 9f7a6143d2f4..7a8bcf0db235 100644 --- a/keyboards/ealdin/quadrant/keyboard.json +++ b/keyboards/ealdin/quadrant/keyboard.json @@ -34,6 +34,9 @@ {"pin_a": "D5", "pin_b": "F1"} ] }, + "indicators": { + "caps_lock": "F0" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/ealdin/quadrant/quadrant.c b/keyboards/ealdin/quadrant/quadrant.c index 23be00b96f04..328c92e02e34 100644 --- a/keyboards/ealdin/quadrant/quadrant.c +++ b/keyboards/ealdin/quadrant/quadrant.c @@ -52,16 +52,3 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } return true; } - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F0); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F0, led_state.caps_lock); - } - return true; -} diff --git a/keyboards/handwired/jtallbean/split_65/keyboard.json b/keyboards/handwired/jtallbean/split_65/keyboard.json index c8be82da8d4e..b6560fb03a1d 100644 --- a/keyboards/handwired/jtallbean/split_65/keyboard.json +++ b/keyboards/handwired/jtallbean/split_65/keyboard.json @@ -27,6 +27,9 @@ "rows": ["F4", "F1", "F0", "C7", "B6"] }, "diode_direction": "COL2ROW", + "indicators": { + "caps_lock": "B0" + }, "split": { "enabled": true, "soft_serial_pin": "D0", diff --git a/keyboards/handwired/jtallbean/split_65/split_65.c b/keyboards/handwired/jtallbean/split_65/split_65.c deleted file mode 100644 index b75b12137f93..000000000000 --- a/keyboards/handwired/jtallbean/split_65/split_65.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2020 jtallbean - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - // Set our LED pins as output - gpio_set_pin_output(B0); - gpio_write_pin_low(B0); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - gpio_write_pin(B0, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/handwired/prime_exl_plus/keyboard.json b/keyboards/handwired/prime_exl_plus/keyboard.json index 43825a0ad885..a234bceb02a4 100644 --- a/keyboards/handwired/prime_exl_plus/keyboard.json +++ b/keyboards/handwired/prime_exl_plus/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x6579", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "B0", + "num_lock": "B1" + }, "rgblight": { "led_count": 10, "animations": { diff --git a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c index 1865b6c50250..164c954b8bdd 100644 --- a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c +++ b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c @@ -16,32 +16,17 @@ #include "quantum.h" void matrix_init_kb(void) { - // set CapsLock LED to output and low - gpio_set_pin_output(B0); - gpio_write_pin_low(B0); - // set NumLock LED to output and low - gpio_set_pin_output(B1); - gpio_write_pin_low(B1); - // set ScrollLock LED to output and low gpio_set_pin_output(B2); gpio_write_pin_low(B2); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B1, led_state.num_lock); - gpio_write_pin(B0, led_state.caps_lock); - //gpio_write_pin(B2, led_state.scroll_lock); - } - return res; + matrix_init_user(); } //function for layer indicator LED layer_state_t layer_state_set_kb(layer_state_t state) { if (get_highest_layer(state) == 1) { - gpio_write_pin_high(B2); + gpio_write_pin_high(B2); } else { gpio_write_pin_low(B2); } diff --git a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c b/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c deleted file mode 100644 index 8bdcfe070ae6..000000000000 --- a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2019 ashpil - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - /* Setting status LEDs pins to output and +5V (off) */ - gpio_set_pin_output(D5); - gpio_set_pin_output(D6); - gpio_set_pin_output(D7); - gpio_write_pin_high(D5); - gpio_write_pin_high(D6); - gpio_write_pin_high(D7); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(D5, !led_state.num_lock); - gpio_write_pin(D6, !led_state.caps_lock); - gpio_write_pin(D7, !led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/ibm/model_m/ashpil_usbc/keyboard.json b/keyboards/ibm/model_m/ashpil_usbc/keyboard.json index 451589017e4e..a43e16a04c3c 100644 --- a/keyboards/ibm/model_m/ashpil_usbc/keyboard.json +++ b/keyboards/ibm/model_m/ashpil_usbc/keyboard.json @@ -16,6 +16,12 @@ "mousekey": false, "nkro": false }, + "indicators": { + "caps_lock": "D6", + "num_lock": "D5", + "scroll_lock": "D7", + "on_state": 0 + }, "matrix_pins": { "cols": ["E6", "E7", "F0", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "A0", "A1", "A2", "A3", "A4", "A5"], "rows": ["C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0"] diff --git a/keyboards/ibm/model_m/teensypp/keyboard.json b/keyboards/ibm/model_m/teensypp/keyboard.json index 4464a299f6da..e77c43483b0e 100644 --- a/keyboards/ibm/model_m/teensypp/keyboard.json +++ b/keyboards/ibm/model_m/teensypp/keyboard.json @@ -8,6 +8,12 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "B6", + "num_lock": "B4", + "scroll_lock": "B5", + "on_state": 0 + }, "matrix_pins": { "cols": ["C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0", "E1", "E0", "D7", "D6", "D5", "D4", "D3", "D2"], "rows": ["F7", "F6", "F5", "F4", "F3", "F2", "F1", "F0"] diff --git a/keyboards/ibm/model_m/teensypp/teensypp.c b/keyboards/ibm/model_m/teensypp/teensypp.c deleted file mode 100644 index aac85424bf74..000000000000 --- a/keyboards/ibm/model_m/teensypp/teensypp.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2019 iw0rm3r - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void led_init_ports(void) { - /* Setting status LEDs pins to output and +5V (off) */ - gpio_set_pin_output(B4); - gpio_set_pin_output(B5); - gpio_set_pin_output(B6); - gpio_write_pin_high(B4); - gpio_write_pin_high(B5); - gpio_write_pin_high(B6); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B4, !led_state.num_lock); - gpio_write_pin(B6, !led_state.caps_lock); - gpio_write_pin(B5, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/ibm/model_m/yugo_m/keyboard.json b/keyboards/ibm/model_m/yugo_m/keyboard.json index 968c637b7834..10fe637f03a6 100644 --- a/keyboards/ibm/model_m/yugo_m/keyboard.json +++ b/keyboards/ibm/model_m/yugo_m/keyboard.json @@ -16,6 +16,12 @@ "mousekey": true, "nkro": false }, + "indicators": { + "caps_lock": "A1", + "num_lock": "A2", + "scroll_lock": "A0", + "on_state": 0 + }, "matrix_pins": { "cols": ["A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6", "A5", "A4", "A3"], "rows": ["B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"] diff --git a/keyboards/ibm/model_m/yugo_m/yugo_m.c b/keyboards/ibm/model_m/yugo_m/yugo_m.c deleted file mode 100644 index a725a3657bc0..000000000000 --- a/keyboards/ibm/model_m/yugo_m/yugo_m.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Nidzo Tomic - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - // Set our LED pins as output - gpio_set_pin_output(A2); - gpio_set_pin_output(A1); - gpio_set_pin_output(A0); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(A2, !led_state.num_lock); - gpio_write_pin(A1, !led_state.caps_lock); - gpio_write_pin(A0, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/jels/jels88/jels88.c b/keyboards/jels/jels88/jels88.c deleted file mode 100644 index ceb187ab176e..000000000000 --- a/keyboards/jels/jels88/jels88.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2021 Joah Nelson (Jels) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -// not much here ... just indicator LEDs - -#include "quantum.h" - -// LED indicator pins -#define CAPS_LED D5 -#define SCROLL_LED D4 - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(CAPS_LED); - gpio_set_pin_output(SCROLL_LED); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(CAPS_LED, led_state.caps_lock); - gpio_write_pin(SCROLL_LED, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/jels/jels88/keyboard.json b/keyboards/jels/jels88/keyboard.json index ee9b64ed6ae6..e4d2c6e27374 100644 --- a/keyboards/jels/jels88/keyboard.json +++ b/keyboards/jels/jels88/keyboard.json @@ -23,6 +23,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "D5", + "scroll_lock": "D4" + }, "matrix_pins": { "cols": ["C7", "C6", "F7", "F6", "F5", "F4", "B1", "D2", "D3"], "rows": ["B3", "B2", "D1", "D0", "E6", "B0", "F0", "F1", "B5", "B4", "D7", "D6"] diff --git a/keyboards/kbdfans/bella/soldered/keyboard.json b/keyboards/kbdfans/bella/soldered/keyboard.json index 31d8e9ffb7af..aa5d91598006 100644 --- a/keyboards/kbdfans/bella/soldered/keyboard.json +++ b/keyboards/kbdfans/bella/soldered/keyboard.json @@ -31,6 +31,10 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/kbdfans/bella/soldered/soldered.c b/keyboards/kbdfans/bella/soldered/soldered.c deleted file mode 100755 index bfe9f8f5d445..000000000000 --- a/keyboards/kbdfans/bella/soldered/soldered.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright 2020 dztech - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" -void matrix_init_kb(void) { - gpio_set_pin_output(E6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(E6, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/kbdfans/maja_soldered/keyboard.json b/keyboards/kbdfans/maja_soldered/keyboard.json index bf73f04d8a4e..f182ef97d134 100644 --- a/keyboards/kbdfans/maja_soldered/keyboard.json +++ b/keyboards/kbdfans/maja_soldered/keyboard.json @@ -31,6 +31,10 @@ "backlight": { "pin": "B5" }, + "indicators": { + "caps_lock": "D4", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 3, diff --git a/keyboards/kbdfans/maja_soldered/maja_soldered.c b/keyboards/kbdfans/maja_soldered/maja_soldered.c deleted file mode 100755 index 41d80e2cc8c5..000000000000 --- a/keyboards/kbdfans/maja_soldered/maja_soldered.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2020 dztech kbdfans - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(D4); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D4, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/kopibeng/mnk88/mnk88.c b/keyboards/kopibeng/mnk88/mnk88.c deleted file mode 100644 index efe32f8bfd5f..000000000000 --- a/keyboards/kopibeng/mnk88/mnk88.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2021 Samuel Lu - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - - gpio_set_pin_output(LED_CAPS_LOCK_PIN); - gpio_set_pin_output(LED_SCROLL_LOCK_PIN); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - - bool res = led_update_user(led_state); - - if(res) { - gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); - gpio_write_pin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/kopibeng/xt8x/xt8x.c b/keyboards/kopibeng/xt8x/xt8x.c index 2c4f246b6a2f..03342c40af3d 100644 --- a/keyboards/kopibeng/xt8x/xt8x.c +++ b/keyboards/kopibeng/xt8x/xt8x.c @@ -17,26 +17,11 @@ #include "quantum.h" void matrix_init_kb(void) { - // Initialize indicator LEDs to output - - gpio_set_pin_output(LED_CAPS_LOCK_PIN); // Caps - gpio_set_pin_output(LED_SCROLL_LOCK_PIN); // Scroll lock gpio_set_pin_output(INDICATOR_PIN_0); // Layer indicator on F13 matrix_init_user(); } -bool led_update_kb(led_t led_state) { - - bool res = led_update_user(led_state); - - if(res) { - gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); - gpio_write_pin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); - } - return res; -} - __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { gpio_write_pin(INDICATOR_PIN_0, layer_state_cmp(state, 1)); return state; diff --git a/keyboards/mc_76k/keyboard.json b/keyboards/mc_76k/keyboard.json index 049483bed99a..18aef48d01c0 100644 --- a/keyboards/mc_76k/keyboard.json +++ b/keyboards/mc_76k/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "D2", + "on_state": 0 + }, "matrix_pins": { "cols": ["D5", "D3", "D4", "B1", "D6", "D7", "B4", "B5", "F7", "F6", "F5", "F4", "F1", "F0"], "rows": ["C7", "C6", "B6", "B0", "D1", "D0"] diff --git a/keyboards/mc_76k/mc_76k.c b/keyboards/mc_76k/mc_76k.c deleted file mode 100644 index 44d2374b1c22..000000000000 --- a/keyboards/mc_76k/mc_76k.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 Yiancar-Designs - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void keyboard_pre_init_kb (void) { - gpio_set_pin_output(D2); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(D2, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/viktus/sp111/keyboard.json b/keyboards/viktus/sp111/keyboard.json index 8cf65a5522ad..91a70c284be9 100644 --- a/keyboards/viktus/sp111/keyboard.json +++ b/keyboards/viktus/sp111/keyboard.json @@ -17,6 +17,11 @@ "mousekey": true, "nkro": true }, + "indicators": { + "caps_lock": "F1", + "num_lock": "F0", + "scroll_lock": "F4" + }, "qmk": { "locking": { "enabled": true, diff --git a/keyboards/viktus/sp111/sp111.c b/keyboards/viktus/sp111/sp111.c index 1626683804fc..c2162429c13a 100644 --- a/keyboards/viktus/sp111/sp111.c +++ b/keyboards/viktus/sp111/sp111.c @@ -22,21 +22,3 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } - -void matrix_init_kb(void) { - gpio_set_pin_output(F0); - gpio_set_pin_output(F1); - gpio_set_pin_output(F4); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(F0, led_state.num_lock); - gpio_write_pin(F1, led_state.caps_lock); - gpio_write_pin(F4, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/wilba_tech/wt69_a/keyboard.json b/keyboards/wilba_tech/wt69_a/keyboard.json index bbe65178506f..d41f8fc90e0c 100644 --- a/keyboards/wilba_tech/wt69_a/keyboard.json +++ b/keyboards/wilba_tech/wt69_a/keyboard.json @@ -20,6 +20,9 @@ "resync": true } }, + "indicators": { + "caps_lock": "F1" + }, "matrix_pins": { "cols": ["B7", "B0", "F5", "D5", "B1", "B2", "B3", "D3", "D2", "C7", "C6", "B6", "B5", "B4", "D7", "D6", "D4"], "rows": ["F0", "E6", "F4", "F6", "F7"] diff --git a/keyboards/wilba_tech/wt69_a/wt69_a.c b/keyboards/wilba_tech/wt69_a/wt69_a.c deleted file mode 100644 index 842b62a4d12f..000000000000 --- a/keyboards/wilba_tech/wt69_a/wt69_a.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2018 Jason Williams (Wilba) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F1); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F1, led_state.caps_lock); - } - return true; -} diff --git a/keyboards/wilba_tech/wt70_jb/keyboard.json b/keyboards/wilba_tech/wt70_jb/keyboard.json index bfa27f225bea..f92281060096 100644 --- a/keyboards/wilba_tech/wt70_jb/keyboard.json +++ b/keyboards/wilba_tech/wt70_jb/keyboard.json @@ -8,6 +8,9 @@ "pid": "0x001F", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "F1" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/wilba_tech/wt70_jb/wt70_jb.c b/keyboards/wilba_tech/wt70_jb/wt70_jb.c index ae9b5dcbec09..ad480ece2277 100644 --- a/keyboards/wilba_tech/wt70_jb/wt70_jb.c +++ b/keyboards/wilba_tech/wt70_jb/wt70_jb.c @@ -17,19 +17,6 @@ bool g_first_execution = false; -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F1); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F1, led_state.caps_lock); - } - return true; -} - // This is some magic so that PCBs flashed with VIA firmware at the factory // will start with an RGB test pattern. Not relevant for non-VIA firmware. #ifdef VIA_ENABLE diff --git a/keyboards/wuque/ikki68/ikki68.c b/keyboards/wuque/ikki68/ikki68.c deleted file mode 100644 index 382ec00251b3..000000000000 --- a/keyboards/wuque/ikki68/ikki68.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2020 wuquestudio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(C6); - - matrix_init_user(); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(C6, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/wuque/ikki68/keyboard.json b/keyboards/wuque/ikki68/keyboard.json index c6070e74fa5a..d666b0b5dec0 100644 --- a/keyboards/wuque/ikki68/keyboard.json +++ b/keyboards/wuque/ikki68/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x0003", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "C6", + "on_state": 0 + }, "ws2812": { "pin": "E2" }, diff --git a/keyboards/ymdk/yd60mq/info.json b/keyboards/ymdk/yd60mq/info.json index 4152ed6e077e..1af04be687dd 100644 --- a/keyboards/ymdk/yd60mq/info.json +++ b/keyboards/ymdk/yd60mq/info.json @@ -32,6 +32,10 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "F4", + "on_state": 0 + }, "ws2812": { "pin": "E2" }, diff --git a/keyboards/ymdk/yd60mq/yd60mq.c b/keyboards/ymdk/yd60mq/yd60mq.c deleted file mode 100644 index 40c899c46f8f..000000000000 --- a/keyboards/ymdk/yd60mq/yd60mq.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "quantum.h" - -__attribute__((weak)) -void matrix_init_kb(void){ - gpio_set_pin_output(F4); - gpio_write_pin_high(F4); -} - -__attribute__((weak)) -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(F4, !led_state.caps_lock); - } - return res; -} From 7824e7ed9ba3e79103625b6f038033eb3f5c5320 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Jun 2024 12:14:17 +0100 Subject: [PATCH 0067/1205] Migrate `led_update_kb` implementations to DD (#23983) --- keyboards/acheron/austin/austin.c | 18 --------- keyboards/acheron/austin/keyboard.json | 5 +++ keyboards/cheshire/curiosity/curiosity.c | 17 -------- keyboards/cheshire/curiosity/keyboard.json | 6 +++ keyboards/doppelganger/doppelganger.c | 14 +------ keyboards/doppelganger/keyboard.json | 4 ++ .../exclusive/e85/soldered/keyboard.json | 4 ++ keyboards/exclusive/e85/soldered/soldered.c | 32 --------------- keyboards/ghs/rar/keyboard.json | 4 ++ keyboards/ghs/rar/rar.c | 36 ----------------- .../gray_studio/think65/solder/keyboard.json | 4 ++ keyboards/gray_studio/think65/solder/solder.c | 36 ----------------- keyboards/ilumkb/volcano660/keyboard.json | 6 +++ keyboards/ilumkb/volcano660/volcano660.c | 34 ---------------- keyboards/jae/j01/j01.c | 38 ------------------ keyboards/jae/j01/keyboard.json | 4 ++ keyboards/kkatano/wallaby/keyboard.json | 4 ++ keyboards/kkatano/wallaby/wallaby.c | 25 ------------ keyboards/kkatano/yurei/keyboard.json | 4 ++ keyboards/kkatano/yurei/yurei.c | 25 ------------ keyboards/marksard/leftover30/keyboard.json | 4 ++ keyboards/marksard/leftover30/leftover30.c | 37 ------------------ keyboards/noxary/220/220.c | 34 ---------------- keyboards/noxary/220/keyboard.json | 3 ++ keyboards/noxary/268_2/268_2.c | 30 -------------- keyboards/noxary/268_2/keyboard.json | 3 ++ keyboards/noxary/280/280.c | 37 ------------------ keyboards/noxary/280/keyboard.json | 4 ++ keyboards/ortho5by12/keyboard.json | 4 ++ keyboards/ortho5by12/ortho5by12.c | 30 -------------- keyboards/percent/canoe_gen2/canoe_gen2.c | 15 ------- keyboards/percent/canoe_gen2/keyboard.json | 4 ++ keyboards/pom_keyboards/tnln95/keyboard.json | 4 ++ keyboards/pom_keyboards/tnln95/tnln95.c | 35 ----------------- keyboards/projectkb/alice/alice.c | 20 ---------- keyboards/projectkb/alice/rev1/config.h | 4 -- keyboards/projectkb/alice/rev1/keyboard.json | 5 +++ keyboards/projectkb/alice/rev2/config.h | 4 -- keyboards/projectkb/alice/rev2/keyboard.json | 5 +++ keyboards/rubi/keyboard.json | 3 ++ keyboards/rubi/rubi.c | 9 ----- keyboards/team0110/p1800fl/keyboard.json | 5 +++ keyboards/team0110/p1800fl/p1800fl.c | 28 ------------- keyboards/tkc/osav2/keyboard.json | 5 +++ keyboards/tkc/osav2/osav2.c | 33 ---------------- keyboards/tr60w/keyboard.json | 6 +++ keyboards/tr60w/tr60w.c | 11 ------ keyboards/wolfmarkclub/wm1/keyboard.json | 5 +++ keyboards/wolfmarkclub/wm1/wm1.c | 16 -------- keyboards/wsk/g4m3ralpha/g4m3ralpha.c | 39 ------------------- keyboards/wsk/g4m3ralpha/keyboard.json | 5 +++ keyboards/yushakobo/navpad/navpad_prefs.c | 4 -- 52 files changed, 111 insertions(+), 660 deletions(-) delete mode 100644 keyboards/acheron/austin/austin.c delete mode 100644 keyboards/cheshire/curiosity/curiosity.c delete mode 100644 keyboards/exclusive/e85/soldered/soldered.c delete mode 100644 keyboards/ghs/rar/rar.c delete mode 100644 keyboards/gray_studio/think65/solder/solder.c delete mode 100644 keyboards/ilumkb/volcano660/volcano660.c delete mode 100644 keyboards/jae/j01/j01.c delete mode 100644 keyboards/kkatano/wallaby/wallaby.c delete mode 100644 keyboards/kkatano/yurei/yurei.c delete mode 100644 keyboards/marksard/leftover30/leftover30.c delete mode 100644 keyboards/noxary/220/220.c delete mode 100644 keyboards/noxary/268_2/268_2.c delete mode 100644 keyboards/noxary/280/280.c delete mode 100644 keyboards/ortho5by12/ortho5by12.c delete mode 100644 keyboards/pom_keyboards/tnln95/tnln95.c delete mode 100644 keyboards/projectkb/alice/alice.c delete mode 100644 keyboards/team0110/p1800fl/p1800fl.c delete mode 100644 keyboards/tkc/osav2/osav2.c delete mode 100644 keyboards/tr60w/tr60w.c delete mode 100644 keyboards/wsk/g4m3ralpha/g4m3ralpha.c diff --git a/keyboards/acheron/austin/austin.c b/keyboards/acheron/austin/austin.c deleted file mode 100644 index 9a69d1c08657..000000000000 --- a/keyboards/acheron/austin/austin.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(A0); - gpio_set_pin_output(A1); - gpio_set_pin_output(A2); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(A2, led_state.num_lock); - gpio_write_pin(A0, led_state.caps_lock); - gpio_write_pin(A1, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/acheron/austin/keyboard.json b/keyboards/acheron/austin/keyboard.json index bee675472c96..a3df5dd75d3e 100755 --- a/keyboards/acheron/austin/keyboard.json +++ b/keyboards/acheron/austin/keyboard.json @@ -33,6 +33,11 @@ "levels": 6, "breathing": true }, + "indicators": { + "caps_lock": "A0", + "num_lock": "A2", + "scroll_lock": "A1" + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/cheshire/curiosity/curiosity.c b/keyboards/cheshire/curiosity/curiosity.c deleted file mode 100644 index 2813cff9b4a0..000000000000 --- a/keyboards/cheshire/curiosity/curiosity.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "quantum.h" - -void matrix_init_board(void){ - gpio_set_pin_output(A8); - gpio_set_pin_output(A9); - gpio_set_pin_output(A10); -} - -bool led_update_kb(led_t led_state) { - bool runDefault = led_update_user(led_state); - if (runDefault) { - gpio_write_pin(A8, !led_state.num_lock); - gpio_write_pin(A9, !led_state.caps_lock); - gpio_write_pin(A10, !led_state.scroll_lock); - } - return runDefault; -} diff --git a/keyboards/cheshire/curiosity/keyboard.json b/keyboards/cheshire/curiosity/keyboard.json index 679f2a45d1a1..b408a5b6e952 100644 --- a/keyboards/cheshire/curiosity/keyboard.json +++ b/keyboards/cheshire/curiosity/keyboard.json @@ -7,6 +7,12 @@ "pid": "0x0FAD", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "A9", + "num_lock": "A8", + "scroll_lock": "A10", + "on_state": 0 + }, "rgblight": { "led_count": 14, "animations": { diff --git a/keyboards/doppelganger/doppelganger.c b/keyboards/doppelganger/doppelganger.c index 4a62fdf45f1b..de0e2cc7556b 100644 --- a/keyboards/doppelganger/doppelganger.c +++ b/keyboards/doppelganger/doppelganger.c @@ -16,21 +16,9 @@ #include "quantum.h" void keyboard_pre_init_kb(void) { - gpio_set_pin_output(C6); gpio_set_pin_output(B0); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(C6, !led_state.caps_lock); - } - return res; + keyboard_pre_init_user(); } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { diff --git a/keyboards/doppelganger/keyboard.json b/keyboards/doppelganger/keyboard.json index 9ea2241a807b..ccba77fdfa5c 100644 --- a/keyboards/doppelganger/keyboard.json +++ b/keyboards/doppelganger/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x4447", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "C6", + "on_state": 0 + }, "matrix_pins": { "cols": ["F4", "F0", "B7", "B3", "B2", "B1", "D5", "D3", "D2"], "rows": ["E6", "F1", "C7", "F7", "F6"] diff --git a/keyboards/exclusive/e85/soldered/keyboard.json b/keyboards/exclusive/e85/soldered/keyboard.json index 8b4ebbfc575e..dfd6d18826b5 100644 --- a/keyboards/exclusive/e85/soldered/keyboard.json +++ b/keyboards/exclusive/e85/soldered/keyboard.json @@ -18,6 +18,10 @@ "levels": 6, "breathing": true }, + "indicators": { + "caps_lock": "C7", + "scroll_lock": "B5" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/exclusive/e85/soldered/soldered.c b/keyboards/exclusive/e85/soldered/soldered.c deleted file mode 100644 index bdee95c26c68..000000000000 --- a/keyboards/exclusive/e85/soldered/soldered.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2020 VashtaNerada - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(C7); - gpio_set_pin_output(B5); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(C7, led_state.caps_lock); - gpio_write_pin(B5, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/ghs/rar/keyboard.json b/keyboards/ghs/rar/keyboard.json index 22b133c8f99a..96184abe6a67 100644 --- a/keyboards/ghs/rar/keyboard.json +++ b/keyboards/ghs/rar/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "B1", + "scroll_lock": "B3" + }, "rgblight": { "led_count": 17, "animations": { diff --git a/keyboards/ghs/rar/rar.c b/keyboards/ghs/rar/rar.c deleted file mode 100644 index 591932c99c28..000000000000 --- a/keyboards/ghs/rar/rar.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2020 Gone Hacking Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - // Set our LED pins as output. - gpio_set_pin_output(B1); - gpio_set_pin_output(B3); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - - if (res) { - gpio_write_pin(B1, led_state.caps_lock); - gpio_write_pin(B3, led_state.scroll_lock); - } - - return res; -} diff --git a/keyboards/gray_studio/think65/solder/keyboard.json b/keyboards/gray_studio/think65/solder/keyboard.json index 9706e8b4b499..09096a854e55 100644 --- a/keyboards/gray_studio/think65/solder/keyboard.json +++ b/keyboards/gray_studio/think65/solder/keyboard.json @@ -41,6 +41,10 @@ "nkro": false, "rgblight": true }, + "indicators": { + "caps_lock": "C7", + "on_state": 0 + }, "matrix_pins": { "cols": ["D1", "D0", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5", "F0", "F1", "B6", "F4", "F5", "F6"], "rows": ["B0", "B1", "B2", "B3", "E6"] diff --git a/keyboards/gray_studio/think65/solder/solder.c b/keyboards/gray_studio/think65/solder/solder.c deleted file mode 100644 index 84267b9db076..000000000000 --- a/keyboards/gray_studio/think65/solder/solder.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2019 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - gpio_set_pin_output(C7); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(C7, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/ilumkb/volcano660/keyboard.json b/keyboards/ilumkb/volcano660/keyboard.json index 297b28a5f92b..fa74e46fedb9 100644 --- a/keyboards/ilumkb/volcano660/keyboard.json +++ b/keyboards/ilumkb/volcano660/keyboard.json @@ -32,6 +32,12 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "D2", + "num_lock": "D0", + "scroll_lock": "D1", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": [ diff --git a/keyboards/ilumkb/volcano660/volcano660.c b/keyboards/ilumkb/volcano660/volcano660.c deleted file mode 100644 index 5e6d67c9ba95..000000000000 --- a/keyboards/ilumkb/volcano660/volcano660.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 dztech - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(D0); - gpio_set_pin_output(D1); - gpio_set_pin_output(D2); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D0, !led_state.num_lock); - gpio_write_pin(D2, !led_state.caps_lock); - gpio_write_pin(D1, !led_state.scroll_lock); - - } - return res; -} diff --git a/keyboards/jae/j01/j01.c b/keyboards/jae/j01/j01.c deleted file mode 100644 index 4d3f8ced46c9..000000000000 --- a/keyboards/jae/j01/j01.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright Evy Dekkers - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); - gpio_set_pin_output(E6); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.caps_lock); - } - - return true; -} diff --git a/keyboards/jae/j01/keyboard.json b/keyboards/jae/j01/keyboard.json index 56a5062c94c3..fd16f2a46e73 100644 --- a/keyboards/jae/j01/keyboard.json +++ b/keyboards/jae/j01/keyboard.json @@ -33,6 +33,10 @@ "levels": 4, "breathing": true }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "bootmagic": { "matrix": [0, 2] }, diff --git a/keyboards/kkatano/wallaby/keyboard.json b/keyboards/kkatano/wallaby/keyboard.json index ee475a54bc01..636fdba04225 100644 --- a/keyboards/kkatano/wallaby/keyboard.json +++ b/keyboards/kkatano/wallaby/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "B6", + "scroll_lock": "B7" + }, "matrix_pins": { "cols": ["D5", "C7", "C6", "D4", "D0", "E6", "F0", "F1", "F4", "F5", "F6", "F7", "D7", "D6", "D1", "D2", "D3"], "rows": ["B5", "B4", "B3", "B2", "B1", "B0"] diff --git a/keyboards/kkatano/wallaby/wallaby.c b/keyboards/kkatano/wallaby/wallaby.c deleted file mode 100644 index de2583903bb3..000000000000 --- a/keyboards/kkatano/wallaby/wallaby.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2020 Koichi Katano - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(B6, led_state.caps_lock); - gpio_write_pin(B7, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/kkatano/yurei/keyboard.json b/keyboards/kkatano/yurei/keyboard.json index 7bf08957872e..59084920da67 100644 --- a/keyboards/kkatano/yurei/keyboard.json +++ b/keyboards/kkatano/yurei/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "B6", + "scroll_lock": "B7" + }, "matrix_pins": { "cols": ["D5", "C7", "C6", "D4", "D0", "E6", "F0", "F1", "F4", "F5", "F6", "F7", "D7", "D6", "D1", "D2", "D3"], "rows": ["B5", "B4", "B3", "B2", "B1", "B0"] diff --git a/keyboards/kkatano/yurei/yurei.c b/keyboards/kkatano/yurei/yurei.c deleted file mode 100644 index 283726a884f7..000000000000 --- a/keyboards/kkatano/yurei/yurei.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2019 Koichi Katano - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(B6, led_state.caps_lock); - gpio_write_pin(B7, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/marksard/leftover30/keyboard.json b/keyboards/marksard/leftover30/keyboard.json index 546b3dbdd33c..ae2250a5f2c4 100644 --- a/keyboards/marksard/leftover30/keyboard.json +++ b/keyboards/marksard/leftover30/keyboard.json @@ -33,6 +33,10 @@ {"pin_a": "F4", "pin_b": "F5"} ] }, + "indicators": { + "caps_lock": "D1", + "num_lock": "D2" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/marksard/leftover30/leftover30.c b/keyboards/marksard/leftover30/leftover30.c deleted file mode 100644 index cea0de703abf..000000000000 --- a/keyboards/marksard/leftover30/leftover30.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2020 marksard - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void keyboard_pre_init_user(void) { - /* Set CAPSLOCK indicator pin as output */ - gpio_set_pin_output(D1); - /* Set NUMLOCK indicator pin as output */ - gpio_set_pin_output(D2); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D2, led_state.num_lock); - gpio_write_pin(D1, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/noxary/220/220.c b/keyboards/noxary/220/220.c deleted file mode 100644 index c5affa4344de..000000000000 --- a/keyboards/noxary/220/220.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 Rozakiin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(C6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(C6, led_state.num_lock); - } - return true; -} \ No newline at end of file diff --git a/keyboards/noxary/220/keyboard.json b/keyboards/noxary/220/keyboard.json index 75d71aac8a37..356531699982 100644 --- a/keyboards/noxary/220/keyboard.json +++ b/keyboards/noxary/220/keyboard.json @@ -32,6 +32,9 @@ "pin": "B7", "breathing": true }, + "indicators": { + "num_lock": "C6" + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "community_layouts": ["ortho_6x4"], diff --git a/keyboards/noxary/268_2/268_2.c b/keyboards/noxary/268_2/268_2.c deleted file mode 100644 index 56b42d2343db..000000000000 --- a/keyboards/noxary/268_2/268_2.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2018 Rozakiin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(B0); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(B0, led_state.caps_lock); - } - return true; -} diff --git a/keyboards/noxary/268_2/keyboard.json b/keyboards/noxary/268_2/keyboard.json index c724d07a4937..08daee6d6394 100644 --- a/keyboards/noxary/268_2/keyboard.json +++ b/keyboards/noxary/268_2/keyboard.json @@ -31,6 +31,9 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "B0" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["65_ansi_blocker"], diff --git a/keyboards/noxary/280/280.c b/keyboards/noxary/280/280.c deleted file mode 100644 index 0f29df178f49..000000000000 --- a/keyboards/noxary/280/280.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2019 %YOUR_NAME% - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(D5); - gpio_set_pin_output(D0); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(D5, led_state.caps_lock); - gpio_write_pin(D0, led_state.scroll_lock); - } - return true; -} \ No newline at end of file diff --git a/keyboards/noxary/280/keyboard.json b/keyboards/noxary/280/keyboard.json index 17acb96cdf44..4bd9257152f5 100644 --- a/keyboards/noxary/280/keyboard.json +++ b/keyboards/noxary/280/keyboard.json @@ -32,6 +32,10 @@ "pin": "B7", "breathing": true }, + "indicators": { + "caps_lock": "D5", + "scroll_lock": "D0" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/ortho5by12/keyboard.json b/keyboards/ortho5by12/keyboard.json index 49ce49441750..5bcd1e00fcdc 100644 --- a/keyboards/ortho5by12/keyboard.json +++ b/keyboards/ortho5by12/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "C5", + "num_lock": "C4" + }, "matrix_pins": { "cols": ["C2", "D0", "D1", "D4", "C3", "C1"], "rows": ["B5", "B1", "B2", "B3", "B4", "C0", "D5", "D6", "D7", "B0"] diff --git a/keyboards/ortho5by12/ortho5by12.c b/keyboards/ortho5by12/ortho5by12.c deleted file mode 100644 index d0d9ce9102dd..000000000000 --- a/keyboards/ortho5by12/ortho5by12.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.com) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(C4); - gpio_set_pin_output(C5); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(C4, led_state.num_lock); - gpio_write_pin(C5, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.c b/keyboards/percent/canoe_gen2/canoe_gen2.c index ea091c347440..435083a269de 100644 --- a/keyboards/percent/canoe_gen2/canoe_gen2.c +++ b/keyboards/percent/canoe_gen2/canoe_gen2.c @@ -17,21 +17,6 @@ along with this program. If not, see . #include "quantum.h" -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(E6); - gpio_write_pin_high(E6); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.caps_lock); - } - - return true; -} - #ifdef RGB_MATRIX_ENABLE void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); diff --git a/keyboards/percent/canoe_gen2/keyboard.json b/keyboards/percent/canoe_gen2/keyboard.json index 0b6ece2613cf..85fbfd28b9dd 100644 --- a/keyboards/percent/canoe_gen2/keyboard.json +++ b/keyboards/percent/canoe_gen2/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "ws2812": { "pin": "B7" }, diff --git a/keyboards/pom_keyboards/tnln95/keyboard.json b/keyboards/pom_keyboards/tnln95/keyboard.json index c92ac5b38f14..09b3f71f7c05 100644 --- a/keyboards/pom_keyboards/tnln95/keyboard.json +++ b/keyboards/pom_keyboards/tnln95/keyboard.json @@ -37,6 +37,10 @@ "levels": 10, "breathing": true }, + "indicators": { + "caps_lock": "B2", + "num_lock": "B1" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/pom_keyboards/tnln95/tnln95.c b/keyboards/pom_keyboards/tnln95/tnln95.c deleted file mode 100644 index b8ab8ff7a7e1..000000000000 --- a/keyboards/pom_keyboards/tnln95/tnln95.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Nguyen Minh Hoang - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(B1); - gpio_set_pin_output(B2); - /* I will add function to these later */ - // gpio_set_pin_output(B3); - // gpio_set_pin_output(E2); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B1, led_state.num_lock); - gpio_write_pin(B2, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c deleted file mode 100644 index 8ec5f16736f2..000000000000 --- a/keyboards/projectkb/alice/alice.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(INDICATOR_PIN_0); - gpio_set_pin_output(INDICATOR_PIN_1); - gpio_set_pin_output(INDICATOR_PIN_2); - - keyboard_pre_init_user(); -} - - -bool led_update_kb(led_t led_state) { - bool runDefault = led_update_user(led_state); - if (runDefault) { - gpio_write_pin(INDICATOR_PIN_0, !led_state.num_lock); - gpio_write_pin(INDICATOR_PIN_1, !led_state.caps_lock); - gpio_write_pin(INDICATOR_PIN_2, !led_state.scroll_lock); - } - return runDefault; -} diff --git a/keyboards/projectkb/alice/rev1/config.h b/keyboards/projectkb/alice/rev1/config.h index 66d3b75731ba..b8c68bc65d4f 100644 --- a/keyboards/projectkb/alice/rev1/config.h +++ b/keyboards/projectkb/alice/rev1/config.h @@ -26,10 +26,6 @@ along with this program. If not, see . #define WS2812_SPI_SCK_PAL_MODE 0 #define WS2812_SPI_SCK_PIN B13 -#define INDICATOR_PIN_0 A0 -#define INDICATOR_PIN_1 A1 -#define INDICATOR_PIN_2 A2 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/projectkb/alice/rev1/keyboard.json b/keyboards/projectkb/alice/rev1/keyboard.json index 7e957d7ff41f..01eee1300be6 100644 --- a/keyboards/projectkb/alice/rev1/keyboard.json +++ b/keyboards/projectkb/alice/rev1/keyboard.json @@ -15,6 +15,11 @@ "resync": true } }, + "indicators": { + "caps_lock": "A1", + "num_lock": "A0", + "scroll_lock": "A2" + }, "rgblight": { "led_count": 14, "animations": { diff --git a/keyboards/projectkb/alice/rev2/config.h b/keyboards/projectkb/alice/rev2/config.h index 3e786c180567..b8c68bc65d4f 100644 --- a/keyboards/projectkb/alice/rev2/config.h +++ b/keyboards/projectkb/alice/rev2/config.h @@ -26,10 +26,6 @@ along with this program. If not, see . #define WS2812_SPI_SCK_PAL_MODE 0 #define WS2812_SPI_SCK_PIN B13 -#define INDICATOR_PIN_0 A9 -#define INDICATOR_PIN_1 A8 -#define INDICATOR_PIN_2 B12 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/projectkb/alice/rev2/keyboard.json b/keyboards/projectkb/alice/rev2/keyboard.json index 639fc268779c..0e34b7104f92 100644 --- a/keyboards/projectkb/alice/rev2/keyboard.json +++ b/keyboards/projectkb/alice/rev2/keyboard.json @@ -15,6 +15,11 @@ "resync": true } }, + "indicators": { + "caps_lock": "A8", + "num_lock": "A9", + "scroll_lock": "B12" + }, "rgblight": { "led_count": 14, "animations": { diff --git a/keyboards/rubi/keyboard.json b/keyboards/rubi/keyboard.json index cb94b5861561..555376b533b4 100644 --- a/keyboards/rubi/keyboard.json +++ b/keyboards/rubi/keyboard.json @@ -22,6 +22,9 @@ "resync": true } }, + "indicators": { + "caps_lock": "C6" + }, "matrix_pins": { "cols": ["B3", "B2", "B1", "F7"], "rows": ["F0", "F1", "F4", "F5", "F6"] diff --git a/keyboards/rubi/rubi.c b/keyboards/rubi/rubi.c index 89bf9caa6d4c..4f0536397f0b 100644 --- a/keyboards/rubi/rubi.c +++ b/keyboards/rubi/rubi.c @@ -63,12 +63,3 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user_oled(keycode, record); } - - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(C6, led_state.num_lock); - } - return true; -} diff --git a/keyboards/team0110/p1800fl/keyboard.json b/keyboards/team0110/p1800fl/keyboard.json index a56864cd36af..681482db5bc1 100644 --- a/keyboards/team0110/p1800fl/keyboard.json +++ b/keyboards/team0110/p1800fl/keyboard.json @@ -34,6 +34,11 @@ "levels": 5, "breathing": true }, + "indicators": { + "caps_lock": "D5", + "num_lock": "D3", + "scroll_lock": "C6" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/team0110/p1800fl/p1800fl.c b/keyboards/team0110/p1800fl/p1800fl.c deleted file mode 100644 index 9f47b8a5c446..000000000000 --- a/keyboards/team0110/p1800fl/p1800fl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright 2020 marhalloweenvt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D3, led_state.num_lock); - gpio_write_pin(D5, led_state.caps_lock); - gpio_write_pin(C6, led_state.scroll_lock); - } - return res; -} - diff --git a/keyboards/tkc/osav2/keyboard.json b/keyboards/tkc/osav2/keyboard.json index 118eedfc8503..ef4c7897978a 100644 --- a/keyboards/tkc/osav2/keyboard.json +++ b/keyboards/tkc/osav2/keyboard.json @@ -50,6 +50,11 @@ "pin": "D6", "breathing": true }, + "indicators": { + "caps_lock": "C6", + "num_lock": "C7", + "scroll_lock": "B6" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["alice", "alice_split_bs"], diff --git a/keyboards/tkc/osav2/osav2.c b/keyboards/tkc/osav2/osav2.c deleted file mode 100644 index 99660464865c..000000000000 --- a/keyboards/tkc/osav2/osav2.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2019 jrfhoutx - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(C7); - gpio_set_pin_output(C6); - gpio_set_pin_output(B6); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(C7, led_state.num_lock); - gpio_write_pin(C6, led_state.caps_lock); - gpio_write_pin(B6, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/tr60w/keyboard.json b/keyboards/tr60w/keyboard.json index 60c01bdcfc6c..dc71e3ad7aab 100644 --- a/keyboards/tr60w/keyboard.json +++ b/keyboards/tr60w/keyboard.json @@ -32,6 +32,12 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "B2", + "num_lock": "B1", + "scroll_lock": "B3", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/tr60w/tr60w.c b/keyboards/tr60w/tr60w.c deleted file mode 100644 index ebf48cb1c7b1..000000000000 --- a/keyboards/tr60w/tr60w.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - bool runDefault = led_update_user(led_state); - if (runDefault) { - gpio_write_pin(B1, !led_state.num_lock); - gpio_write_pin(B2, !led_state.caps_lock); - gpio_write_pin(B3, !led_state.scroll_lock); - } - return runDefault; -} diff --git a/keyboards/wolfmarkclub/wm1/keyboard.json b/keyboards/wolfmarkclub/wm1/keyboard.json index 56c062e10240..0cea5546c8a0 100644 --- a/keyboards/wolfmarkclub/wm1/keyboard.json +++ b/keyboards/wolfmarkclub/wm1/keyboard.json @@ -27,6 +27,11 @@ "resync": true } }, + "indicators": { + "caps_lock": "B1", + "num_lock": "B0", + "scroll_lock": "C5" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/wolfmarkclub/wm1/wm1.c b/keyboards/wolfmarkclub/wm1/wm1.c index 9c4fb090c882..83c4c8bb4589 100644 --- a/keyboards/wolfmarkclub/wm1/wm1.c +++ b/keyboards/wolfmarkclub/wm1/wm1.c @@ -4,19 +4,3 @@ void bootloader_jump(void) { // This board doesn't use the "standard" stm32duino bootloader, and no information is available regarding how to enter bootloader mode. All we can do here is reset. NVIC_SystemReset(); } - -void matrix_init_kb(void) { - gpio_set_pin_output(B1); // Top Indicator LED - gpio_set_pin_output(B0); // Middle Indicator LED - gpio_set_pin_output(C5); // Bottom Indicator LED - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(B1, led_state.caps_lock); - gpio_write_pin(B0, led_state.num_lock); - gpio_write_pin(C5, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/wsk/g4m3ralpha/g4m3ralpha.c b/keyboards/wsk/g4m3ralpha/g4m3ralpha.c deleted file mode 100644 index 3c039a173fee..000000000000 --- a/keyboards/wsk/g4m3ralpha/g4m3ralpha.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2020 Worldspawn - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - - -void matrix_init_kb(void) { - gpio_set_pin_output(D3); - gpio_write_pin_low(D3); - gpio_set_pin_output(D2); - gpio_write_pin_low(D2); - gpio_set_pin_output(D0); - gpio_write_pin_low(D0); - - matrix_init_user(); -}; - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D3, led_state.num_lock); - gpio_write_pin(D0, led_state.caps_lock); - gpio_write_pin(D2, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/wsk/g4m3ralpha/keyboard.json b/keyboards/wsk/g4m3ralpha/keyboard.json index fcb2f26f5fde..b5cdb7ce1013 100644 --- a/keyboards/wsk/g4m3ralpha/keyboard.json +++ b/keyboards/wsk/g4m3ralpha/keyboard.json @@ -8,6 +8,11 @@ "pid": "0x56D9", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "D0", + "num_lock": "D3", + "scroll_lock": "D2" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/yushakobo/navpad/navpad_prefs.c b/keyboards/yushakobo/navpad/navpad_prefs.c index 08b7464cf95b..c7b3881621ac 100644 --- a/keyboards/yushakobo/navpad/navpad_prefs.c +++ b/keyboards/yushakobo/navpad/navpad_prefs.c @@ -37,10 +37,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return true; } -bool led_update_kb(led_t led_state) { - return led_update_user(led_state); -} - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } From 191c8cca33f07096022bab85b75d8eb1b92e9e2e Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 23 Jun 2024 12:57:50 +1000 Subject: [PATCH 0068/1205] `handwired/symmetric70_proto`: add `keyboard.json` (#23966) --- .../handwired/symmetric70_proto/promicro/base/keyboard.json | 1 + .../handwired/symmetric70_proto/promicro/fast/keyboard.json | 1 + .../handwired/symmetric70_proto/promicro/normal/keyboard.json | 1 + keyboards/handwired/symmetric70_proto/promicro/rules.mk | 2 +- .../handwired/symmetric70_proto/proton_c/base/keyboard.json | 1 + .../handwired/symmetric70_proto/proton_c/fast/keyboard.json | 1 + .../handwired/symmetric70_proto/proton_c/normal/keyboard.json | 1 + keyboards/handwired/symmetric70_proto/proton_c/rules.mk | 2 +- 8 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 keyboards/handwired/symmetric70_proto/promicro/base/keyboard.json create mode 100644 keyboards/handwired/symmetric70_proto/promicro/fast/keyboard.json create mode 100644 keyboards/handwired/symmetric70_proto/promicro/normal/keyboard.json create mode 100644 keyboards/handwired/symmetric70_proto/proton_c/base/keyboard.json create mode 100644 keyboards/handwired/symmetric70_proto/proton_c/fast/keyboard.json create mode 100644 keyboards/handwired/symmetric70_proto/proton_c/normal/keyboard.json diff --git a/keyboards/handwired/symmetric70_proto/promicro/base/keyboard.json b/keyboards/handwired/symmetric70_proto/promicro/base/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/promicro/base/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/handwired/symmetric70_proto/promicro/fast/keyboard.json b/keyboards/handwired/symmetric70_proto/promicro/fast/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/promicro/fast/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/handwired/symmetric70_proto/promicro/normal/keyboard.json b/keyboards/handwired/symmetric70_proto/promicro/normal/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/promicro/normal/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/handwired/symmetric70_proto/promicro/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/rules.mk index 6e7633bfe015..7aa985b3f1d4 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/rules.mk @@ -1 +1 @@ -# This file intentionally left blank +DEFAULT_FOLDER = handwired/symmetric70_proto/promicro/base diff --git a/keyboards/handwired/symmetric70_proto/proton_c/base/keyboard.json b/keyboards/handwired/symmetric70_proto/proton_c/base/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/proton_c/base/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/handwired/symmetric70_proto/proton_c/fast/keyboard.json b/keyboards/handwired/symmetric70_proto/proton_c/fast/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/proton_c/fast/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/handwired/symmetric70_proto/proton_c/normal/keyboard.json b/keyboards/handwired/symmetric70_proto/proton_c/normal/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/proton_c/normal/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/handwired/symmetric70_proto/proton_c/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/rules.mk index 6e7633bfe015..28c4536e4bf3 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/rules.mk @@ -1 +1 @@ -# This file intentionally left blank +DEFAULT_FOLDER = handwired/symmetric70_proto/proton_c/base From e96d6d9bd43a83c5d9ada75014bc9ef90abc8f40 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 23 Jun 2024 13:08:57 +1000 Subject: [PATCH 0069/1205] Migrate RGB Matrix layout for two boards (#23963) --- keyboards/doio/kb30/kb30.c | 28 ---------- keyboards/doio/kb30/keyboard.json | 45 ++++++++++++++- keyboards/work_louder/work_board/info.json | 56 ++++++++++++++++++- keyboards/work_louder/work_board/work_board.c | 19 ------- 4 files changed, 99 insertions(+), 49 deletions(-) diff --git a/keyboards/doio/kb30/kb30.c b/keyboards/doio/kb30/kb30.c index 53a4546e0627..671f49e8abaa 100644 --- a/keyboards/doio/kb30/kb30.c +++ b/keyboards/doio/kb30/kb30.c @@ -17,34 +17,6 @@ #include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE - - led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 1, 2, 3, 4, 5, 6}, - { 7, 8, 9, 10, 11, 12, 13}, - { 14, 15, 16, 17, 18, 19, NO_LED }, - { 20, 21, 22, 23, NO_LED, 24, NO_LED}, - { 25, 26, 27, 28, 29, NO_LED, NO_LED}, - { 30, 31, 32, 33, 34, 35} -}, { -{0,0}, {37,0}, {75,0}, {112,0}, {149,0}, {187,0}, {224,0}, -{0,16}, {37,16}, {75,16}, {112,16}, {149,16}, {187,16}, {224,16}, -{0,32}, {37,32}, {75,32}, {112,32}, {149,32}, {187,32}, -{0,48}, {37,48}, {75,48}, {112,48}, {187,48}, -{0,64}, {37,64}, {65,64}, {112,64}, {149,64}, -{187,64}, {173,64}, {186,64}, {198,64}, {211,64},{224,64}, -}, { - 4,4,4,4,4,4,4, - 4,4,4,4,4,4,4, - 4,4,4,4,4,4, - 4,4,4,4,4, - 4,4,4,4,4, - 4,4,4,4,4,4 -} }; -#endif - /* OLED */ #ifdef OLED_ENABLE uint16_t startup_timer = 0; diff --git a/keyboards/doio/kb30/keyboard.json b/keyboards/doio/kb30/keyboard.json index b14eab1c33a5..388df2d9e364 100644 --- a/keyboards/doio/kb30/keyboard.json +++ b/keyboards/doio/kb30/keyboard.json @@ -46,7 +46,50 @@ }, "driver": "ws2812", "max_brightness": 200, - "sleep": true + "sleep": true, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 37, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 187, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 224, "y": 0, "flags": 4}, + + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 37, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 75, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 149, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 187, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 224, "y": 16, "flags": 4}, + + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 37, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 75, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 149, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 187, "y": 32, "flags": 4}, + + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 37, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 187, "y": 48, "flags": 4}, + + {"matrix": [4, 0], "x": 18, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 75, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 149, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 187, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 224, "y": 64, "flags": 4}, + + {"x": 224, "y": 56, "flags": 2}, + {"x": 112, "y": 56, "flags": 2}, + {"x": 0, "y": 56, "flags": 2}, + {"x": 0, "y": 8, "flags": 2}, + {"x": 112, "y": 8, "flags": 2}, + {"x": 224, "y": 8, "flags": 2} + ] }, "features": { "bootmagic": true, diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index dc412fdabd11..0e97efa9a47d 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -58,7 +58,61 @@ }, "driver": "ws2812", "max_brightness": 120, - "sleep": true + "sleep": true, + "layout": [ + {"matrix": [3, 11], "x": 223, "y": 63, "flags": 1}, + {"matrix": [3, 10], "x": 203, "y": 63, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 63, "flags": 1}, + {"matrix": [3, 8], "x": 162, "y": 63, "flags": 1}, + {"matrix": [3, 7], "x": 142, "y": 63, "flags": 1}, + {"matrix": [3, 6], "x": 122, "y": 63, "flags": 4}, + {"x": 112, "y": 63, "flags": 4}, + {"matrix": [3, 5], "x": 101, "y": 63, "flags": 4}, + {"matrix": [3, 4], "x": 81, "y": 63, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 63, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 63, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 63, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 63, "flags": 1}, + + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 42, "flags": 4}, + {"matrix": [2, 4], "x": 81, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 101, "y": 42, "flags": 4}, + {"matrix": [2, 6], "x": 122, "y": 42, "flags": 4}, + {"matrix": [2, 7], "x": 142, "y": 42, "flags": 4}, + {"matrix": [2, 8], "x": 162, "y": 42, "flags": 4}, + {"matrix": [2, 9], "x": 183, "y": 42, "flags": 4}, + {"matrix": [2, 10], "x": 203, "y": 42, "flags": 4}, + {"matrix": [2, 11], "x": 223, "y": 42, "flags": 1}, + + {"matrix": [1, 11], "x": 223, "y": 21, "flags": 1}, + {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 101, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 122, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 142, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 223, "y": 0, "flags": 1}, + ] }, "matrix_pins": { "cols": ["D3", "D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "E6"], diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c index 975c7aa794ca..ef36b3171f21 100644 --- a/keyboards/work_louder/work_board/work_board.c +++ b/keyboards/work_louder/work_board/work_board.c @@ -67,25 +67,6 @@ bool oled_task_kb(void) { #endif #ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 }, - { 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25 }, - { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 }, - { 12, 11, 10, 9, 8, 7, 5, 4, 3, 2, 1, 0} -}, { - { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 }, { 112, 63 }, { 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }, - { 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 }, - { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 }, { 20, 21 }, { 0, 21 }, - { 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 } -}, { - 1, 1, 1, 1, 1, 4,4,4, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1 -} }; -// clang-format on - # ifdef VIA_ENABLE bool via_layout_2u = false; From f0471dd5b4e737726540d5e86f2666726808a1ba Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 23 Jun 2024 09:02:13 +0100 Subject: [PATCH 0070/1205] Remove skipped schema files (#23987) --- data/schemas/false.jsonschema | 1 - data/schemas/true.jsonschema | 1 - 2 files changed, 2 deletions(-) delete mode 100644 data/schemas/false.jsonschema delete mode 100644 data/schemas/true.jsonschema diff --git a/data/schemas/false.jsonschema b/data/schemas/false.jsonschema deleted file mode 100644 index c508d5366f70..000000000000 --- a/data/schemas/false.jsonschema +++ /dev/null @@ -1 +0,0 @@ -false diff --git a/data/schemas/true.jsonschema b/data/schemas/true.jsonschema deleted file mode 100644 index 27ba77ddaf61..000000000000 --- a/data/schemas/true.jsonschema +++ /dev/null @@ -1 +0,0 @@ -true From d5e0562a7043bf372c3f349420dd765ee3a9653d Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 24 Jun 2024 04:33:26 +1000 Subject: [PATCH 0071/1205] Rename layouts containing keyboard name (#23930) --- keyboards/boardrun/classic/keyboard.json | 5 ++++- keyboards/boardrun/classic/keymaps/default/keymap.c | 4 ++-- keyboards/boardrun/classic/keymaps/via/keymap.c | 8 ++++---- keyboards/deltasplit75/keymaps/default/keymap.c | 4 ++-- keyboards/deltasplit75/v2/keyboard.json | 5 ++++- keyboards/doro67/multi/keyboard.json | 3 ++- keyboards/doro67/multi/keymaps/default_multi/keymap.c | 4 ++-- keyboards/flehrad/tradestation/keyboard.json | 5 ++++- keyboards/handwired/concertina/64key/keyboard.json | 5 ++++- .../handwired/concertina/64key/keymaps/default/keymap.c | 8 ++++---- keyboards/handwired/dactyl/keyboard.json | 5 ++++- keyboards/handwired/dactyl/keymaps/default/keymap.c | 6 +++--- keyboards/handwired/dactyl/keymaps/dvorak/keymap.c | 6 +++--- keyboards/handwired/dactyl/keymaps/erincalling/keymap.c | 6 +++--- keyboards/handwired/owlet60/keyboard.json | 6 ++++-- keyboards/handwired/owlet60/keymaps/default/keymap.c | 4 ++-- keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c | 4 ++-- keyboards/handwired/pterodactyl/keyboard.json | 5 ++++- keyboards/handwired/pterodactyl/keymaps/default/keymap.c | 6 +++--- .../handwired/pterodactyl/keymaps/default/keymap.json | 2 +- keyboards/mode/m80v1/m80s/keyboard.json | 5 ++++- keyboards/mode/m80v1/m80s/keymaps/default/keymap.c | 4 ++-- keyboards/mode/m80v1/m80s/keymaps/via/keymap.c | 8 ++++---- keyboards/mode/m80v2/m80v2s/keyboard.json | 5 ++++- keyboards/mode/m80v2/m80v2s/keymaps/default/keymap.c | 8 ++++---- keyboards/mode/m80v2/m80v2s/keymaps/via/keymap.c | 8 ++++---- keyboards/reviung/reviung34/keyboard.json | 8 +++++--- keyboards/reviung/reviung34/keymaps/default/keymap.c | 8 ++++---- keyboards/reviung/reviung34/keymaps/default_2u/keymap.c | 8 ++++---- keyboards/reviung/reviung34/keymaps/default_jp/keymap.c | 8 ++++---- keyboards/reviung/reviung34/keymaps/default_rgb/keymap.c | 8 ++++---- .../reviung/reviung34/keymaps/default_rgb2u/keymap.c | 8 ++++---- keyboards/reviung/reviung34/keymaps/via/keymap.c | 8 ++++---- 33 files changed, 112 insertions(+), 83 deletions(-) diff --git a/keyboards/boardrun/classic/keyboard.json b/keyboards/boardrun/classic/keyboard.json index 4831131f18f0..be21483c8e33 100644 --- a/keyboards/boardrun/classic/keyboard.json +++ b/keyboards/boardrun/classic/keyboard.json @@ -52,8 +52,11 @@ "diode_direction": "COL2ROW", "processor": "atmega32u4", "bootloader": "atmel-dfu", + "layout_aliases": { + "LAYOUT_classic": "LAYOUT" + }, "layouts": { - "LAYOUT_classic": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, {"matrix": [0, 1], "x": 1.5, "y": 0}, diff --git a/keyboards/boardrun/classic/keymaps/default/keymap.c b/keyboards/boardrun/classic/keymaps/default/keymap.c index 8f7df2f5bdcb..a3b4df908631 100644 --- a/keyboards/boardrun/classic/keymaps/default/keymap.c +++ b/keyboards/boardrun/classic/keymaps/default/keymap.c @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | LGUI | DEL | ~` | LALT | SPACE | | FN | SPACE | | LEFT | DOWN | UP | RIGHT | * '--------------------------------------------------------------------------------------------------------------------' */ - [_CLASSIC] = LAYOUT_classic( + [_CLASSIC] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | RGUI | | | RALT | | | | | | | | * '--------------------------------------------------------------------------------------------------------------------' */ - [_FNCLASSIC] = LAYOUT_classic( + [_FNCLASSIC] = LAYOUT( QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, KC_APP, _______, QK_BOOT, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, KC_CAPS, _______, KC_SCRL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL, diff --git a/keyboards/boardrun/classic/keymaps/via/keymap.c b/keyboards/boardrun/classic/keymaps/via/keymap.c index 0994e925ea91..67c388bb047a 100644 --- a/keyboards/boardrun/classic/keymaps/via/keymap.c +++ b/keyboards/boardrun/classic/keymaps/via/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | LGUI | DEL | ~` | LALT | SPACE | | MO | SPACE | | LEFT | DOWN | UP | RIGHT | * '--------------------------------------------------------------------------------------------------------------------' */ - [0] = LAYOUT_classic( + [0] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * '--------------------------------------------------------------------------------------------------------------------' */ - [1] = LAYOUT_classic( + [1] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [2] = LAYOUT_classic( + [2] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [3] = LAYOUT_classic( + [3] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/deltasplit75/keymaps/default/keymap.c b/keyboards/deltasplit75/keymaps/default/keymap.c index 36031d57aef8..8bbd3e82faa4 100644 --- a/keyboards/deltasplit75/keymaps/default/keymap.c +++ b/keyboards/deltasplit75/keymaps/default/keymap.c @@ -7,7 +7,7 @@ // entirely and just use numbers. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT_v2( + 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_INS, KC_HOME, KC_PGUP, 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_DEL, KC_END, KC_PGDN, 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_BSPC, KC_SCRL, @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - LAYOUT_v2( + LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/deltasplit75/v2/keyboard.json b/keyboards/deltasplit75/v2/keyboard.json index d175633d71e1..4d3d42ad0463 100644 --- a/keyboards/deltasplit75/v2/keyboard.json +++ b/keyboards/deltasplit75/v2/keyboard.json @@ -36,8 +36,11 @@ "resync": true } }, + "layout_aliases": { + "LAYOUT_v2": "LAYOUT_all" + }, "layouts": { - "LAYOUT_v2": { + "LAYOUT_all": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/doro67/multi/keyboard.json b/keyboards/doro67/multi/keyboard.json index 81f2940b3626..a3a652e40b81 100644 --- a/keyboards/doro67/multi/keyboard.json +++ b/keyboards/doro67/multi/keyboard.json @@ -34,6 +34,7 @@ "bootloader": "atmel-dfu", "community_layouts": ["65_ansi_blocker"], "layout_aliases": { + "LAYOUT_multi": "LAYOUT_all", "LAYOUT_ansi": "LAYOUT_65_ansi_blocker" }, "layouts": { @@ -188,7 +189,7 @@ {"matrix": [4, 14], "x": 15, "y": 4} ] }, - "LAYOUT_multi": { + "LAYOUT_all": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/doro67/multi/keymaps/default_multi/keymap.c b/keyboards/doro67/multi/keymaps/default_multi/keymap.c index 918ac3936bd7..1b58b0c2d675 100644 --- a/keyboards/doro67/multi/keymaps/default_multi/keymap.c +++ b/keyboards/doro67/multi/keymaps/default_multi/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │LCtl│LGui│LAlt│ Space │Spc │ Space │RAl│Fn │RCt│ ← │ ↓ │ → │ * └────┴────┴────┴──────────┴────┴────────┴───┴───┴───┴───┴───┴───┘ */ - [0] = LAYOUT_multi( + [0] = LAYOUT_all( KC_ESC, 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_BSLS, KC_GRV, KC_INS, 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_BSPC, KC_DEL, 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_PGUP, @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ │ │ │ │ │ │ │ │ │ │ * └────┴────┴────┴──────────┴────┴────────┴───┴───┴───┴───┴───┴───┘ */ - [1] = LAYOUT_multi( + [1] = LAYOUT_all( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, BL_TOGG, BL_STEP, BL_DOWN, BL_UP, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/flehrad/tradestation/keyboard.json b/keyboards/flehrad/tradestation/keyboard.json index 24a1e07dd452..757325ceaf8e 100644 --- a/keyboards/flehrad/tradestation/keyboard.json +++ b/keyboards/flehrad/tradestation/keyboard.json @@ -30,8 +30,11 @@ "processor": "atmega32u4", "bootloader": "caterina", "community_layouts": ["ortho_4x4"], + "layout_aliases": { + "LAYOUT_tradestation": "LAYOUT_4x2u" + }, "layouts": { - "LAYOUT_tradestation": { + "LAYOUT_4x2u": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1.125, "y": 0}, diff --git a/keyboards/handwired/concertina/64key/keyboard.json b/keyboards/handwired/concertina/64key/keyboard.json index 71719c8505f7..dedc240d3f4b 100644 --- a/keyboards/handwired/concertina/64key/keyboard.json +++ b/keyboards/handwired/concertina/64key/keyboard.json @@ -29,8 +29,11 @@ "diode_direction": "COL2ROW", "processor": "atmega32u4", "bootloader": "caterina", + "layout_aliases": { + "LAYOUT_64key": "LAYOUT" + }, "layouts": { - "LAYOUT_64key": { + "LAYOUT": { "layout": [ {"matrix": [2, 2], "x": 2.5, "y": 0.4}, {"matrix": [2, 1], "x": 3.5, "y": 0}, diff --git a/keyboards/handwired/concertina/64key/keymaps/default/keymap.c b/keyboards/handwired/concertina/64key/keymaps/default/keymap.c index aced9d13c681..c9f638444007 100644 --- a/keyboards/handwired/concertina/64key/keymaps/default/keymap.c +++ b/keyboards/handwired/concertina/64key/keymaps/default/keymap.c @@ -43,7 +43,7 @@ tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = LAYOUT_64key( +[_QWERTY] = LAYOUT( SC_LSPO, KC_MINS, KC_EQL, KC_VOLD, KC_VOLU, SC_RSPC, SC_LCPO, KC_LGUI, KC_LNG1, KC_ENT, KC_MUTE, TD(PNX), LAYER_N, SC_RCPC, SC_LAPO, KC_SPC, SLQ, SRQ, KC_ESC, SC_RAPC, @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, KC_DOWN ), -[_COLEMAK] = LAYOUT_64key( +[_COLEMAK] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______ ), -[_GAMING] = LAYOUT_64key( +[_GAMING] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN, KC_PGDN ), -[_NUMERIC] = LAYOUT_64key( +[_NUMERIC] = LAYOUT( _______, _______, _______, KC_ACL1, KC_ACL2, _______, _______, _______, LAYER_C, _______, KC_ACL0, _______, _______, _______, _______, _______, _______, KC_SLEP, _______, _______, diff --git a/keyboards/handwired/dactyl/keyboard.json b/keyboards/handwired/dactyl/keyboard.json index 339119e6fd45..58baf228ca49 100644 --- a/keyboards/handwired/dactyl/keyboard.json +++ b/keyboards/handwired/dactyl/keyboard.json @@ -22,8 +22,11 @@ "tapping": { "toggle": 1 }, + "layout_aliases": { + "LAYOUT_dactyl": "LAYOUT" + }, "layouts": { - "LAYOUT_dactyl": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/handwired/dactyl/keymaps/default/keymap.c b/keyboards/handwired/dactyl/keymaps/default/keymap.c index 33a3d727d134..669f3585300b 100644 --- a/keyboards/handwired/dactyl/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/default/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |ace | End | | PgDn | | | * `--------------------' `--------------------' */ -[BASE] = LAYOUT_dactyl( // layer 0 : default +[BASE] = LAYOUT( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = LAYOUT_dactyl( +[SYMB] = LAYOUT( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ // MEDIA AND MOUSE -[MDIA] = LAYOUT_dactyl( +[MDIA] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c index ad962a1d1b8c..59cb7b34f826 100644 --- a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |ace | End | | PgDn | | | * `--------------------' `--------------------' */ -[BASE] = LAYOUT_dactyl( // layer 0 : default +[BASE] = LAYOUT( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = LAYOUT_dactyl( +[SYMB] = LAYOUT( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ // MEDIA AND MOUSE -[MDIA] = LAYOUT_dactyl( +[MDIA] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/handwired/dactyl/keymaps/erincalling/keymap.c b/keyboards/handwired/dactyl/keymaps/erincalling/keymap.c index d25bd6acd4e9..74f3d4afa0c6 100644 --- a/keyboards/handwired/dactyl/keymaps/erincalling/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/erincalling/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Space | | LGui | | RGui | | | * `--------------------' `--------------------' */ -[BASE] = LAYOUT_dactyl( // layer 0 : default +[BASE] = LAYOUT( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[CONT] = LAYOUT_dactyl( +[CONT] = LAYOUT( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ // QWERTY -[QWER] = LAYOUT_dactyl( +[QWER] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, diff --git a/keyboards/handwired/owlet60/keyboard.json b/keyboards/handwired/owlet60/keyboard.json index 8108f51985d1..fad204e6fa61 100644 --- a/keyboards/handwired/owlet60/keyboard.json +++ b/keyboards/handwired/owlet60/keyboard.json @@ -42,11 +42,13 @@ "debounce": 9, "community_layouts": ["alice", "alice_split_bs"], "layout_aliases": { + "LAYOUT_owlet60_full_bsp": "LAYOUT_full_bs", + "LAYOUT_owlet60_split_bsp": "LAYOUT_split_bs", "LAYOUT_owlet60_60_percent_full_bsp": "LAYOUT_alice", "LAYOUT_owlet60_60_percent_split_bsp": "LAYOUT_alice_split_bs" }, "layouts": { - "LAYOUT_owlet60_full_bsp": { + "LAYOUT_full_bs": { "layout": [ {"matrix": [0, 0], "x": 0.5, "y": 0}, @@ -132,7 +134,7 @@ {"matrix": [3, 7], "x": 18, "y": 4} ] }, - "LAYOUT_owlet60_split_bsp": { + "LAYOUT_split_bs": { "layout": [ {"matrix": [0, 0], "x": 0.5, "y": 0}, diff --git a/keyboards/handwired/owlet60/keymaps/default/keymap.c b/keyboards/handwired/owlet60/keymaps/default/keymap.c index b0924eb05527..e3068fd11f1e 100644 --- a/keyboards/handwired/owlet60/keymaps/default/keymap.c +++ b/keyboards/handwired/owlet60/keymaps/default/keymap.c @@ -16,7 +16,7 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_owlet60_full_bsp( + [0] = LAYOUT_full_bs( KC_1, KC_ESC, 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_PGUP, KC_2, 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_PGDN, KC_3, 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_HOME, @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_SPC, MO(1),KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT ), - [1] = LAYOUT_owlet60_full_bsp( + [1] = LAYOUT_full_bs( KC_NO, KC_GRV, 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, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, RGB_VAI, diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c index 4531a3c3f631..76a8d7c8c9e8 100644 --- a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c @@ -16,7 +16,7 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_owlet60_full_bsp( + [0] = LAYOUT_full_bs( KC_1, KC_ESC, 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_PGUP, KC_2, 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_PGDN, KC_3, 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_HOME, @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_SPC, MO(1),KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT ), - [1] = LAYOUT_owlet60_full_bsp( + [1] = LAYOUT_full_bs( KC_NO, KC_GRV, 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, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, RGB_VAI, diff --git a/keyboards/handwired/pterodactyl/keyboard.json b/keyboards/handwired/pterodactyl/keyboard.json index fac20aeebe1a..751db2aff3af 100644 --- a/keyboards/handwired/pterodactyl/keyboard.json +++ b/keyboards/handwired/pterodactyl/keyboard.json @@ -26,8 +26,11 @@ "bluetooth": { "driver": "bluefruit_le" }, + "layout_aliases": { + "LAYOUT_pterodactyl": "LAYOUT" + }, "layouts": { - "LAYOUT_pterodactyl": { + "LAYOUT": { "layout": [ {"matrix": [0, 11], "x": 0, "y": 0}, {"matrix": [0, 10], "x": 1, "y": 0}, diff --git a/keyboards/handwired/pterodactyl/keymaps/default/keymap.c b/keyboards/handwired/pterodactyl/keymaps/default/keymap.c index fd8fc812888e..61d650c76b08 100644 --- a/keyboards/handwired/pterodactyl/keymaps/default/keymap.c +++ b/keyboards/handwired/pterodactyl/keymaps/default/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |ace | End | | PgDn | | | * `--------------------' `--------------------' */ -[_BL] = LAYOUT_pterodactyl( // layer 0 : default +[_BL] = LAYOUT( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[_SYMB] = LAYOUT_pterodactyl( +[_SYMB] = LAYOUT( // left hand 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_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, @@ -99,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ // MEDIA AND MOUSE -[_MDIA] = LAYOUT_pterodactyl( +[_MDIA] = 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_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, diff --git a/keyboards/handwired/pterodactyl/keymaps/default/keymap.json b/keyboards/handwired/pterodactyl/keymaps/default/keymap.json index 2c84da113c08..181b32b8c3a3 100644 --- a/keyboards/handwired/pterodactyl/keymaps/default/keymap.json +++ b/keyboards/handwired/pterodactyl/keymaps/default/keymap.json @@ -4,7 +4,7 @@ "author": "Marcus Young", "keyboard": "handwired/pterodactyl", "keymap": "default", - "layout": "LAYOUT_pterodactyl", + "layout": "LAYOUT", "layers": [ [ "KC_EQL", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", diff --git a/keyboards/mode/m80v1/m80s/keyboard.json b/keyboards/mode/m80v1/m80s/keyboard.json index 27622de022b9..25bfd3c70a7c 100644 --- a/keyboards/mode/m80v1/m80s/keyboard.json +++ b/keyboards/mode/m80v1/m80s/keyboard.json @@ -29,8 +29,11 @@ "diode_direction": "COL2ROW", "processor": "STM32F072", "bootloader": "stm32-dfu", + "layout_aliases": { + "LAYOUT_eighty_m80s": "LAYOUT_tkl_ansi_split_bs_rshift" + }, "layouts": { - "LAYOUT_eighty_m80s": { + "LAYOUT_tkl_ansi_split_bs_rshift": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, diff --git a/keyboards/mode/m80v1/m80s/keymaps/default/keymap.c b/keyboards/mode/m80v1/m80s/keymaps/default/keymap.c index 8d13c6bb71ae..bfb7ea3c4ca7 100644 --- a/keyboards/mode/m80v1/m80s/keymaps/default/keymap.c +++ b/keyboards/mode/m80v1/m80s/keymaps/default/keymap.c @@ -23,7 +23,7 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_eighty_m80s( + [_BASE] = LAYOUT_tkl_ansi_split_bs_rshift( 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_BSPC, KC_MUTE, KC_VOLD, KC_VOLU, 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_INS, KC_HOME, KC_PGUP, 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_DEL, KC_END, KC_PGDN, @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - [_FN1] = LAYOUT_eighty_m80s( + [_FN1] = LAYOUT_tkl_ansi_split_bs_rshift( QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/mode/m80v1/m80s/keymaps/via/keymap.c b/keyboards/mode/m80v1/m80s/keymaps/via/keymap.c index ef862d3b523f..6aca52256af3 100644 --- a/keyboards/mode/m80v1/m80s/keymaps/via/keymap.c +++ b/keyboards/mode/m80v1/m80s/keymaps/via/keymap.c @@ -25,7 +25,7 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_eighty_m80s( + [_BASE] = LAYOUT_tkl_ansi_split_bs_rshift( 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_BSPC, KC_MUTE, KC_VOLD, KC_VOLU, 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_INS, KC_HOME, KC_PGUP, 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_DEL, KC_END, KC_PGDN, @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - [_FN1] = LAYOUT_eighty_m80s( + [_FN1] = LAYOUT_tkl_ansi_split_bs_rshift( QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_FN2] = LAYOUT_eighty_m80s( + [_FN2] = LAYOUT_tkl_ansi_split_bs_rshift( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_FN3] = LAYOUT_eighty_m80s( + [_FN3] = LAYOUT_tkl_ansi_split_bs_rshift( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/mode/m80v2/m80v2s/keyboard.json b/keyboards/mode/m80v2/m80v2s/keyboard.json index 8ab060668c9f..d8b4c8ee8541 100644 --- a/keyboards/mode/m80v2/m80v2s/keyboard.json +++ b/keyboards/mode/m80v2/m80v2s/keyboard.json @@ -33,8 +33,11 @@ }, "processor": "STM32F072", "bootloader": "stm32-dfu", + "layout_aliases": { + "LAYOUT_m80v2s": "LAYOUT_tkl_ansi_split_bs_lshift_rshift" + }, "layouts": { - "LAYOUT_m80v2s": { + "LAYOUT_tkl_ansi_split_bs_lshift_rshift": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, diff --git a/keyboards/mode/m80v2/m80v2s/keymaps/default/keymap.c b/keyboards/mode/m80v2/m80v2s/keymaps/default/keymap.c index 9a110cc2bccc..6b8a7d449b38 100755 --- a/keyboards/mode/m80v2/m80v2s/keymaps/default/keymap.c +++ b/keyboards/mode/m80v2/m80v2s/keymaps/default/keymap.c @@ -18,7 +18,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_m80v2s( + [0] = LAYOUT_tkl_ansi_split_bs_lshift_rshift( 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_BSPC, KC_MUTE, KC_VOLD , KC_VOLU , 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_INS , KC_HOME , KC_PGUP , 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_DEL , KC_END , KC_PGDN , @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , KC_UP , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT_m80v2s( + [1] = LAYOUT_tkl_ansi_split_bs_lshift_rshift( QK_BOOT , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = LAYOUT_m80v2s( + [2] = LAYOUT_tkl_ansi_split_bs_lshift_rshift( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [3] = LAYOUT_m80v2s( + [3] = LAYOUT_tkl_ansi_split_bs_lshift_rshift( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/mode/m80v2/m80v2s/keymaps/via/keymap.c b/keyboards/mode/m80v2/m80v2s/keymaps/via/keymap.c index 9a110cc2bccc..6b8a7d449b38 100755 --- a/keyboards/mode/m80v2/m80v2s/keymaps/via/keymap.c +++ b/keyboards/mode/m80v2/m80v2s/keymaps/via/keymap.c @@ -18,7 +18,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_m80v2s( + [0] = LAYOUT_tkl_ansi_split_bs_lshift_rshift( 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_BSPC, KC_MUTE, KC_VOLD , KC_VOLU , 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_INS , KC_HOME , KC_PGUP , 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_DEL , KC_END , KC_PGDN , @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1) , KC_UP , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT_m80v2s( + [1] = LAYOUT_tkl_ansi_split_bs_lshift_rshift( QK_BOOT , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = LAYOUT_m80v2s( + [2] = LAYOUT_tkl_ansi_split_bs_lshift_rshift( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [3] = LAYOUT_m80v2s( + [3] = LAYOUT_tkl_ansi_split_bs_lshift_rshift( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/reviung/reviung34/keyboard.json b/keyboards/reviung/reviung34/keyboard.json index 26f520d4ccf2..8b354c00df36 100755 --- a/keyboards/reviung/reviung34/keyboard.json +++ b/keyboards/reviung/reviung34/keyboard.json @@ -33,10 +33,12 @@ "split_3x5_2" ], "layout_aliases": { - "LAYOUT_split_3x5_2": "LAYOUT_reviung34" + "LAYOUT_split_3x5_2": "LAYOUT_2x1u_left", + "LAYOUT_reviung34": "LAYOUT_2x1u_left", + "LAYOUT_reviung34_2u": "LAYOUT_1x2u_left", }, "layouts": { - "LAYOUT_reviung34": { + "LAYOUT_2x1u_left": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, @@ -81,7 +83,7 @@ {"matrix": [3, 8], "x": 6, "y": 3, "w": 2} ] }, - "LAYOUT_reviung34_2u": { + "LAYOUT_1x2u_left": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/reviung/reviung34/keymaps/default/keymap.c b/keyboards/reviung/reviung34/keymaps/default/keymap.c index 004518b46463..3dd7f73e7310 100755 --- a/keyboards/reviung/reviung34/keymaps/default/keymap.c +++ b/keyboards/reviung/reviung34/keymaps/default/keymap.c @@ -35,28 +35,28 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_reviung34( + [_BASE] = LAYOUT_2x1u_left( CT_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, KC_TAB, KC_BSPC, LOWER, RA_SP ), - [_LOWER] = LAYOUT_reviung34( + [_LOWER] = LAYOUT_2x1u_left( KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, _______, _______, _______, _______ ), - [_RAISE] = LAYOUT_reviung34( + [_RAISE] = LAYOUT_2x1u_left( 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, _______, _______, _______, _______ ), - [_ADJUST] = LAYOUT_reviung34( + [_ADJUST] = LAYOUT_2x1u_left( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, diff --git a/keyboards/reviung/reviung34/keymaps/default_2u/keymap.c b/keyboards/reviung/reviung34/keymaps/default_2u/keymap.c index 2b7a46a639ea..44013b2d1fb3 100755 --- a/keyboards/reviung/reviung34/keymaps/default_2u/keymap.c +++ b/keyboards/reviung/reviung34/keymaps/default_2u/keymap.c @@ -35,28 +35,28 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_reviung34_2u( + [_BASE] = LAYOUT_1x2u_left( CT_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, KC_TAB, LOWER, RA_SP ), - [_LOWER] = LAYOUT_reviung34_2u( + [_LOWER] = LAYOUT_1x2u_left( KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, _______, _______, _______ ), - [_RAISE] = LAYOUT_reviung34_2u( + [_RAISE] = LAYOUT_1x2u_left( 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, _______, _______, _______ ), - [_ADJUST] = LAYOUT_reviung34_2u( + [_ADJUST] = LAYOUT_1x2u_left( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, diff --git a/keyboards/reviung/reviung34/keymaps/default_jp/keymap.c b/keyboards/reviung/reviung34/keymaps/default_jp/keymap.c index 72aa2bcc00ab..b5abe38ea6d9 100755 --- a/keyboards/reviung/reviung34/keymaps/default_jp/keymap.c +++ b/keyboards/reviung/reviung34/keymaps/default_jp/keymap.c @@ -36,28 +36,28 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_reviung34( + [_BASE] = LAYOUT_2x1u_left( CT_Q, JP_W, JP_E, JP_R, JP_T, JP_Y, JP_U, JP_I, JP_O, JP_P, JP_A, JP_S, JP_D, JP_F, JP_G, JP_H, JP_J, JP_K, JP_L, KC_ENT, SF_Z, AL_X, JP_C, JP_V, JP_B, JP_N, JP_M, CT_CM, AL_DT, SF_SS, KC_TAB, KC_BSPC, LOWER, RA_SP ), - [_LOWER] = LAYOUT_reviung34( + [_LOWER] = LAYOUT_2x1u_left( JP_EXLM, JP_AT, JP_HASH, JP_DLR, JP_PERC, JP_CIRC, JP_AMPR, JP_ASTR, JP_LPRN, JP_RPRN, JP_UNDS, JP_PLUS, JP_LCBR, JP_RCBR, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, JP_SCLN, KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, JP_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, _______, _______, _______, _______ ), - [_RAISE] = LAYOUT_reviung34( + [_RAISE] = LAYOUT_2x1u_left( JP_1, JP_2, JP_3, JP_4, JP_5, JP_6, JP_7, JP_8, JP_9, JP_0, JP_MINS, JP_EQL, JP_LBRC, JP_RBRC, JP_YEN, JP_BSLS, XXXXXXX, JP_GRV, JP_TILD, JP_COLN, KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, JP_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, _______, _______, _______, _______ ), - [_ADJUST] = LAYOUT_reviung34( + [_ADJUST] = LAYOUT_2x1u_left( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, diff --git a/keyboards/reviung/reviung34/keymaps/default_rgb/keymap.c b/keyboards/reviung/reviung34/keymaps/default_rgb/keymap.c index e94006e6f117..b798ab3122ba 100755 --- a/keyboards/reviung/reviung34/keymaps/default_rgb/keymap.c +++ b/keyboards/reviung/reviung34/keymaps/default_rgb/keymap.c @@ -35,28 +35,28 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_reviung34( + [_BASE] = LAYOUT_2x1u_left( CT_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, LO_TB, KC_BSPC, KC_SPC, RAISE ), - [_LOWER] = LAYOUT_reviung34( + [_LOWER] = LAYOUT_2x1u_left( KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, _______, _______, _______, _______ ), - [_RAISE] = LAYOUT_reviung34( + [_RAISE] = LAYOUT_2x1u_left( 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, _______, KC_DEL, _______, _______ ), - [_ADJUST] = LAYOUT_reviung34( + [_ADJUST] = LAYOUT_2x1u_left( RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD,XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, KC_F11, KC_F12, KC_CAPS, XXXXXXX, KC_PSCR, diff --git a/keyboards/reviung/reviung34/keymaps/default_rgb2u/keymap.c b/keyboards/reviung/reviung34/keymaps/default_rgb2u/keymap.c index cc567d6b6961..5ad92caf3aca 100755 --- a/keyboards/reviung/reviung34/keymaps/default_rgb2u/keymap.c +++ b/keyboards/reviung/reviung34/keymaps/default_rgb2u/keymap.c @@ -34,28 +34,28 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_reviung34_2u( + [_BASE] = LAYOUT_1x2u_left( CT_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, LOWER, KC_SPC, RAISE ), - [_LOWER] = LAYOUT_reviung34_2u( + [_LOWER] = LAYOUT_1x2u_left( KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, _______, _______, _______ ), - [_RAISE] = LAYOUT_reviung34_2u( + [_RAISE] = LAYOUT_1x2u_left( 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, _______, _______, _______ ), - [_ADJUST] = LAYOUT_reviung34_2u( + [_ADJUST] = LAYOUT_1x2u_left( RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD,XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, KC_F11, KC_F12, KC_CAPS, XXXXXXX, KC_PSCR, diff --git a/keyboards/reviung/reviung34/keymaps/via/keymap.c b/keyboards/reviung/reviung34/keymaps/via/keymap.c index 004518b46463..3dd7f73e7310 100644 --- a/keyboards/reviung/reviung34/keymaps/via/keymap.c +++ b/keyboards/reviung/reviung34/keymaps/via/keymap.c @@ -35,28 +35,28 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_reviung34( + [_BASE] = LAYOUT_2x1u_left( CT_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, KC_TAB, KC_BSPC, LOWER, RA_SP ), - [_LOWER] = LAYOUT_reviung34( + [_LOWER] = LAYOUT_2x1u_left( KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, _______, _______, _______, _______ ), - [_RAISE] = LAYOUT_reviung34( + [_RAISE] = LAYOUT_2x1u_left( 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, _______, _______, _______, _______ ), - [_ADJUST] = LAYOUT_reviung34( + [_ADJUST] = LAYOUT_2x1u_left( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, From 03e688e91f28d73416ada41c6db209c04d18cba7 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 24 Jun 2024 12:29:30 +1000 Subject: [PATCH 0072/1205] Add support for userspace to docker build commands. (#23988) --- lib/python/qmk/cli/__init__.py | 1 + lib/python/qmk/cli/userspace/path.py | 8 +++ lib/python/qmk/tests/test_cli_commands.py | 2 +- util/docker_build.sh | 84 +---------------------- util/docker_cmd.sh | 30 ++++++-- 5 files changed, 35 insertions(+), 90 deletions(-) create mode 100755 lib/python/qmk/cli/userspace/path.py diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 6d05a5fc21ce..b504aa5f8c63 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -86,6 +86,7 @@ 'qmk.cli.userspace.compile', 'qmk.cli.userspace.doctor', 'qmk.cli.userspace.list', + 'qmk.cli.userspace.path', 'qmk.cli.userspace.remove', 'qmk.cli.via2json', ] diff --git a/lib/python/qmk/cli/userspace/path.py b/lib/python/qmk/cli/userspace/path.py new file mode 100755 index 000000000000..df4648e8c7d4 --- /dev/null +++ b/lib/python/qmk/cli/userspace/path.py @@ -0,0 +1,8 @@ +from milc import cli +from qmk.constants import QMK_USERSPACE + + +@cli.subcommand('Detected path to QMK Userspace.', hidden=True) +def userspace_path(cli): + print(QMK_USERSPACE) + return diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 1725e3ea792e..8b50d1c340d5 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -249,7 +249,7 @@ def test_c2json_nocpp_stdin(): def test_clean(): result = check_subcommand('clean', '-a') check_returncode(result) - assert result.stdout.count('done') == 2 + assert (result.stdout.count('done') == 2 and 'userspace' not in result.stdout) or (result.stdout.count('done') == 3 and 'userspace' in result.stdout) def test_generate_api(): diff --git a/util/docker_build.sh b/util/docker_build.sh index 828b5751af53..2234fc96f674 100755 --- a/util/docker_build.sh +++ b/util/docker_build.sh @@ -1,85 +1,3 @@ #!/bin/sh -# NOTE: This script uses tabs for indentation -errcho() { - echo "$@" >&2 -} - -USAGE="Usage: $0 [keyboard[:keymap[:target]]]" - -# Check preconditions -for arg; do - if [ "$arg" = "--help" ]; then - echo "$USAGE" - exit 0 - fi -done -if [ $# -gt 1 ]; then - errcho "$USAGE" - exit 1 -fi - -# Allow $RUNTIME to be overridden by the user as an environment variable -# Else check if either podman or docker exit and set them as runtime -# if none are found error out -if [ -z "$RUNTIME" ]; then - if command -v podman >/dev/null 2>&1; then - RUNTIME="podman" - elif command -v docker >/dev/null 2>&1; then - RUNTIME="docker" - else - errcho "Error: no compatible container runtime found." - errcho "Either podman or docker are required." - errcho "See https://podman.io/getting-started/installation" - errcho "or https://docs.docker.com/install/#supported-platforms" - errcho "for installation instructions." - exit 2 - fi -fi - - -# Determine arguments -if [ $# -eq 0 ]; then - printf "keyboard=" && read -r keyboard - [ -n "$keyboard" ] && printf "keymap=" && read -r keymap - [ -n "$keymap" ] && printf "target=" && read -r target -else - IFS=':' read -r keyboard keymap target x <<-EOF - $1 - EOF - if [ -n "$x" ]; then - errcho "$USAGE" - exit 1 - fi -fi -if [ -z "$keyboard" ]; then - keyboard=all -fi -if [ -n "$target" ]; then - # IF we are using docker on non Linux and docker-machine isn't working print an error - # ELSE set usb_args - if [ ! "$(uname)" = "Linux" ] && [ "$RUNTIME" = "docker" ] && ! docker-machine active >/dev/null 2>&1; then - errcho "Error: target requires docker-machine to work on your platform" - errcho "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" - errcho "Consider flashing with QMK Toolbox (https://github.com/qmk/qmk_toolbox) instead" - exit 3 - else - usb_args="--privileged -v /dev:/dev" - fi -fi -dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows - -if [ "$RUNTIME" = "docker" ]; then - uid_arg="--user $(id -u):$(id -g)" -fi - -# Run container and build firmware -"$RUNTIME" run --rm -it $usb_args \ - $uid_arg \ - -w /qmk_firmware \ - -v "$dir":/qmk_firmware \ - -e ALT_GET_KEYBOARDS=true \ - -e SKIP_GIT="$SKIP_GIT" \ - -e MAKEFLAGS="$MAKEFLAGS" \ - ghcr.io/qmk/qmk_cli \ - make "$keyboard${keymap:+:$keymap}${target:+:$target}" +./util/docker_cmd.sh make "$@" diff --git a/util/docker_cmd.sh b/util/docker_cmd.sh index 4a82890603b8..18725db06895 100755 --- a/util/docker_cmd.sh +++ b/util/docker_cmd.sh @@ -1,4 +1,5 @@ #!/bin/sh +# vim: set ft=sh ts=4 sw=4 noexpandtab # NOTE: This script uses tabs for indentation errcho() { @@ -37,13 +38,26 @@ fi # IF we are using docker on non Linux and docker-machine isn't working print an error # ELSE set usb_args if [ ! "$(uname)" = "Linux" ] && [ "$RUNTIME" = "docker" ] && ! docker-machine active >/dev/null 2>&1; then - errcho "Error: target requires docker-machine to work on your platform" - errcho "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" - exit 3 + errcho "Error: target requires docker-machine to work on your platform" + errcho "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" + exit 3 else - usb_args="--privileged -v /dev:/dev" + usb_args="--privileged -v /dev:/dev" +fi + +qmk_firmware_dir=$(pwd -W 2>/dev/null) || qmk_firmware_dir=$PWD # Use Windows path if on Windows +qmk_userspace_dir="" +userspace_docker_args="" + +if [ -n "$QMK_USERSPACE" ] && [ -e "$QMK_USERSPACE/qmk.json" ]; then + qmk_userspace_dir=$(cd "$QMK_USERSPACE" && pwd -W 2>/dev/null) || qmk_userspace_dir=$QMK_USERSPACE # Use Windows path if on Windows +elif [ -n "$(which qmk 2>/dev/null)" ] && [ -n "$(qmk userspace-path)" ]; then + qmk_userspace_dir=$(cd "$(qmk userspace-path)" && pwd -W 2>/dev/null) || qmk_userspace_dir=$(qmk userspace-path) # Use Windows path if on Windows +fi + +if [ -n "$qmk_userspace_dir" ]; then + userspace_docker_args="-v $qmk_userspace_dir:/qmk_userspace:z -e QMK_USERSPACE=/qmk_userspace" fi -dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows if [ "$RUNTIME" = "docker" ]; then uid_arg="--user $(id -u):$(id -g)" @@ -54,6 +68,10 @@ fi $usb_args \ $uid_arg \ -w /qmk_firmware \ - -v "$dir":/qmk_firmware \ + -v "$qmk_firmware_dir":/qmk_firmware:z \ + $userspace_docker_args \ + -e SKIP_GIT="$SKIP_GIT" \ + -e SKIP_VERSION="$SKIP_VERSION" \ + -e MAKEFLAGS="$MAKEFLAGS" \ ghcr.io/qmk/qmk_cli \ "$@" From 378dbd32bdb362befabd63a481cae67d978a4568 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 24 Jun 2024 18:19:48 +1000 Subject: [PATCH 0073/1205] `custommk/ergostrafer_rgb`: move to keyboard.json (#23990) --- .../custommk/ergostrafer_rgb/{info.json => keyboard.json} | 3 +++ keyboards/custommk/ergostrafer_rgb/rules.mk | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) rename keyboards/custommk/ergostrafer_rgb/{info.json => keyboard.json} (99%) delete mode 100644 keyboards/custommk/ergostrafer_rgb/rules.mk diff --git a/keyboards/custommk/ergostrafer_rgb/info.json b/keyboards/custommk/ergostrafer_rgb/keyboard.json similarity index 99% rename from keyboards/custommk/ergostrafer_rgb/info.json rename to keyboards/custommk/ergostrafer_rgb/keyboard.json index ac058be1a40b..a0b0645e9870 100644 --- a/keyboards/custommk/ergostrafer_rgb/info.json +++ b/keyboards/custommk/ergostrafer_rgb/keyboard.json @@ -4,6 +4,9 @@ "maintainer": "customMK", "bootloader": "stm32-dfu", "diode_direction": "ROW2COL", + "audio": { + "driver": "pwm_hardware" + }, "dynamic_keymap": { "layer_count": 32 }, diff --git a/keyboards/custommk/ergostrafer_rgb/rules.mk b/keyboards/custommk/ergostrafer_rgb/rules.mk deleted file mode 100644 index 72f75f4367e0..000000000000 --- a/keyboards/custommk/ergostrafer_rgb/rules.mk +++ /dev/null @@ -1 +0,0 @@ -AUDIO_DRIVER = pwm_hardware From a2176f6a039b5f92ba4cb473f7a2de560b57dd86 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 25 Jun 2024 03:25:05 +0100 Subject: [PATCH 0074/1205] Migrate `led_update_kb` implementations to DD (#23985) --- keyboards/bear_face/info.json | 3 ++ keyboards/bear_face/v1/v1.c | 34 ---------------- keyboards/bear_face/v2/v2.c | 34 ---------------- keyboards/dztech/bocc/bocc.c | 29 -------------- keyboards/dztech/bocc/keyboard.json | 4 ++ keyboards/evyd13/gh80_3700/gh80_3700.c | 14 ++----- keyboards/evyd13/gh80_3700/keyboard.json | 4 ++ keyboards/exclusive/e85/hotswap/hotswap.c | 32 --------------- keyboards/exclusive/e85/hotswap/keyboard.json | 4 ++ keyboards/fjlabs/bolsa65/bolsa65.c | 28 ------------- keyboards/fjlabs/bolsa65/keyboard.json | 3 ++ keyboards/flx/virgo/keyboard.json | 5 +++ keyboards/flx/virgo/virgo.c | 34 ---------------- keyboards/handwired/colorlice/colorlice.c | 15 ------- keyboards/handwired/colorlice/keyboard.json | 6 +++ keyboards/handwired/evk/v1_3/v1_3.c | 9 ----- keyboards/handwired/retro_refit/keyboard.json | 6 +++ keyboards/handwired/retro_refit/retro_refit.c | 12 ------ keyboards/handwired/selene/keyboard.json | 5 +++ keyboards/handwired/selene/selene.c | 18 +-------- keyboards/handwired/selene/selene.h | 23 ----------- keyboards/handwired/z150/config.h | 38 ------------------ keyboards/handwired/z150/keyboard.json | 6 +++ keyboards/handwired/z150/z150.c | 39 ------------------- keyboards/kabedon/kabedon980/kabedon980.c | 8 ---- keyboards/kabedon/kabedon980/keyboard.json | 4 ++ keyboards/noxary/x268/keyboard.json | 3 ++ keyboards/noxary/x268/x268.c | 34 ---------------- keyboards/punk75/config.h | 20 ---------- keyboards/punk75/keyboard.json | 4 ++ keyboards/punk75/keymaps/default/keymap.c | 2 +- keyboards/punk75/keymaps/via/keymap.c | 2 +- keyboards/punk75/punk75.c | 32 --------------- keyboards/redscarf_i/keyboard.json | 4 ++ keyboards/redscarf_i/redscarf_i.c | 10 +---- keyboards/sneakbox/aliceclone/aliceclone.c | 36 ----------------- keyboards/sneakbox/aliceclone/keyboard.json | 5 +++ .../yiancardesigns/barleycorn/barleycorn.c | 37 ------------------ .../yiancardesigns/barleycorn/keyboard.json | 4 ++ 39 files changed, 77 insertions(+), 533 deletions(-) delete mode 100644 keyboards/bear_face/v1/v1.c delete mode 100644 keyboards/bear_face/v2/v2.c delete mode 100644 keyboards/dztech/bocc/bocc.c delete mode 100644 keyboards/exclusive/e85/hotswap/hotswap.c delete mode 100644 keyboards/fjlabs/bolsa65/bolsa65.c delete mode 100644 keyboards/flx/virgo/virgo.c delete mode 100644 keyboards/handwired/selene/selene.h delete mode 100644 keyboards/handwired/z150/config.h delete mode 100644 keyboards/handwired/z150/z150.c delete mode 100644 keyboards/kabedon/kabedon980/kabedon980.c delete mode 100644 keyboards/noxary/x268/x268.c delete mode 100644 keyboards/punk75/config.h delete mode 100644 keyboards/punk75/punk75.c delete mode 100644 keyboards/sneakbox/aliceclone/aliceclone.c delete mode 100644 keyboards/yiancardesigns/barleycorn/barleycorn.c diff --git a/keyboards/bear_face/info.json b/keyboards/bear_face/info.json index ad12468d56f7..ad5b1dd7d9d3 100644 --- a/keyboards/bear_face/info.json +++ b/keyboards/bear_face/info.json @@ -24,6 +24,9 @@ "resync": true } }, + "indicators": { + "caps_lock": "F7" + }, "matrix_pins": { "cols": ["B5", "C7", "C6", "F0", "E6", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"], "rows": ["F5", "F6", "F4", "F1", "B0", "B6"] diff --git a/keyboards/bear_face/v1/v1.c b/keyboards/bear_face/v1/v1.c deleted file mode 100644 index b64a63f0b430..000000000000 --- a/keyboards/bear_face/v1/v1.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2020 chemicalwill - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - //Sets LED pin as output - gpio_set_pin_output(F7); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - // Caps Lock LED indicator toggling code here - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(F7, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/bear_face/v2/v2.c b/keyboards/bear_face/v2/v2.c deleted file mode 100644 index b64a63f0b430..000000000000 --- a/keyboards/bear_face/v2/v2.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2020 chemicalwill - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - //Sets LED pin as output - gpio_set_pin_output(F7); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - // Caps Lock LED indicator toggling code here - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(F7, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/dztech/bocc/bocc.c b/keyboards/dztech/bocc/bocc.c deleted file mode 100644 index 646a7861f831..000000000000 --- a/keyboards/dztech/bocc/bocc.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2020 dztech - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(E6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(E6, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/dztech/bocc/keyboard.json b/keyboards/dztech/bocc/keyboard.json index 7e40fde49cb9..a6208b2bf7c1 100644 --- a/keyboards/dztech/bocc/keyboard.json +++ b/keyboards/dztech/bocc/keyboard.json @@ -33,6 +33,10 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/evyd13/gh80_3700/gh80_3700.c b/keyboards/evyd13/gh80_3700/gh80_3700.c index 6d903e48e1c4..8c4c81fe6438 100644 --- a/keyboards/evyd13/gh80_3700/gh80_3700.c +++ b/keyboards/evyd13/gh80_3700/gh80_3700.c @@ -15,24 +15,16 @@ */ #include "quantum.h" -void led_init_ports(void) { - gpio_set_pin_output(E6); +void keyboard_pre_init_kb(void) { gpio_set_pin_output(B1); gpio_set_pin_output(D0); gpio_set_pin_output(D1); gpio_set_pin_output(F0); - gpio_write_pin_high(E6); gpio_write_pin_high(B1); gpio_write_pin_high(D0); gpio_write_pin_high(D1); gpio_write_pin_high(F0); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.num_lock); - } - return true; -} \ No newline at end of file + keyboard_pre_init_user(); +} diff --git a/keyboards/evyd13/gh80_3700/keyboard.json b/keyboards/evyd13/gh80_3700/keyboard.json index fa11a482df02..a647f4611885 100644 --- a/keyboards/evyd13/gh80_3700/keyboard.json +++ b/keyboards/evyd13/gh80_3700/keyboard.json @@ -23,6 +23,10 @@ "resync": true } }, + "indicators": { + "num_lock": "E6", + "on_state": 0 + }, "matrix_pins": { "cols": ["B0", "D7", "D6", "D4"], "rows": ["B3", "C7", "C6", "B6", "B5", "B4"] diff --git a/keyboards/exclusive/e85/hotswap/hotswap.c b/keyboards/exclusive/e85/hotswap/hotswap.c deleted file mode 100644 index 18ca30b44cd2..000000000000 --- a/keyboards/exclusive/e85/hotswap/hotswap.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2020 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(C7); - gpio_set_pin_output(B5); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(C7, led_state.caps_lock); - gpio_write_pin(B5, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/exclusive/e85/hotswap/keyboard.json b/keyboards/exclusive/e85/hotswap/keyboard.json index 4bd8e738829a..7fcd61c8433f 100644 --- a/keyboards/exclusive/e85/hotswap/keyboard.json +++ b/keyboards/exclusive/e85/hotswap/keyboard.json @@ -18,6 +18,10 @@ "levels": 6, "breathing": true }, + "indicators": { + "caps_lock": "C7", + "scroll_lock": "B5" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/fjlabs/bolsa65/bolsa65.c b/keyboards/fjlabs/bolsa65/bolsa65.c deleted file mode 100644 index 669404192c0e..000000000000 --- a/keyboards/fjlabs/bolsa65/bolsa65.c +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2020 -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#include "quantum.h" - -void matrix_init_kb(void) { - // Initialize indicator LEDs to output - gpio_set_pin_output(F7); // Caps - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(F7, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/fjlabs/bolsa65/keyboard.json b/keyboards/fjlabs/bolsa65/keyboard.json index dfa47e90bb53..63281ae9f6d4 100644 --- a/keyboards/fjlabs/bolsa65/keyboard.json +++ b/keyboards/fjlabs/bolsa65/keyboard.json @@ -8,6 +8,9 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "F7" + }, "matrix_pins": { "cols": ["C7", "B1", "B2", "B3", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5"], "rows": ["F1", "F0", "F6", "F5", "F4"] diff --git a/keyboards/flx/virgo/keyboard.json b/keyboards/flx/virgo/keyboard.json index 8396ce51daa6..996425282d76 100644 --- a/keyboards/flx/virgo/keyboard.json +++ b/keyboards/flx/virgo/keyboard.json @@ -30,6 +30,11 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "E6", + "scroll_lock": "B2", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/flx/virgo/virgo.c b/keyboards/flx/virgo/virgo.c deleted file mode 100644 index 2f875531d0f2..000000000000 --- a/keyboards/flx/virgo/virgo.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2019 MechMerlin - * Edits etc 2020 Flexerm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - gpio_set_pin_output(E6); - gpio_set_pin_output(B2); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.caps_lock); - gpio_write_pin(B2, !led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/handwired/colorlice/colorlice.c b/keyboards/handwired/colorlice/colorlice.c index ede3fba82fb3..92914b79bc63 100644 --- a/keyboards/handwired/colorlice/colorlice.c +++ b/keyboards/handwired/colorlice/colorlice.c @@ -51,18 +51,3 @@ void suspend_wakeup_init_kb(void) suspend_wakeup_init_user(); } #endif - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(B2, !led_state.num_lock); - gpio_write_pin(C6, !led_state.caps_lock); - gpio_write_pin(B7, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/handwired/colorlice/keyboard.json b/keyboards/handwired/colorlice/keyboard.json index 77f5ded0970f..4ccc10527c14 100644 --- a/keyboards/handwired/colorlice/keyboard.json +++ b/keyboards/handwired/colorlice/keyboard.json @@ -65,6 +65,12 @@ "build": { "lto": true }, + "indicators": { + "caps_lock": "C6", + "num_lock": "B2", + "scroll_lock": "B7", + "on_state": 0 + }, "features": { "bootmagic": true, "command": false, diff --git a/keyboards/handwired/evk/v1_3/v1_3.c b/keyboards/handwired/evk/v1_3/v1_3.c index a568ba3f866e..575bf3375916 100644 --- a/keyboards/handwired/evk/v1_3/v1_3.c +++ b/keyboards/handwired/evk/v1_3/v1_3.c @@ -33,12 +33,3 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { gpio_write_pin(D5, layer_state_cmp(state, 1)); return state; } - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - gpio_write_pin(D4, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/handwired/retro_refit/keyboard.json b/keyboards/handwired/retro_refit/keyboard.json index 1e7812d578f2..7acdb48b44db 100644 --- a/keyboards/handwired/retro_refit/keyboard.json +++ b/keyboards/handwired/retro_refit/keyboard.json @@ -23,6 +23,12 @@ "resync": true } }, + "indicators": { + "caps_lock": "D0", + "num_lock": "D1", + "scroll_lock": "C6", + "on_state": 0 + }, "matrix_pins": { "cols": ["B0", "B1", "B2", "B3", "D2", "D3", "C7", "D5"], "rows": ["D4", "D7", "B4", "B5", "B6", "F7", "F6", "F5", "F4", "F1", "F0"] diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c index b62d94d7418c..08e8e1d528eb 100644 --- a/keyboards/handwired/retro_refit/retro_refit.c +++ b/keyboards/handwired/retro_refit/retro_refit.c @@ -1,5 +1,4 @@ #include "quantum.h" -#include "led.h" void matrix_init_kb(void) { // put your keyboard start-up code here @@ -11,14 +10,3 @@ void matrix_init_kb(void) { matrix_init_user(); }; - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D0, !led_state.caps_lock); - gpio_write_pin(D1, !led_state.num_lock); - gpio_write_pin(C6, !led_state.scroll_lock); - - } - return res; -} \ No newline at end of file diff --git a/keyboards/handwired/selene/keyboard.json b/keyboards/handwired/selene/keyboard.json index 592b51aaf40d..34eec11664ed 100644 --- a/keyboards/handwired/selene/keyboard.json +++ b/keyboards/handwired/selene/keyboard.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "A2", + "num_lock": "A0", + "scroll_lock": "A1" + }, "rgblight": { "led_count": 50 }, diff --git a/keyboards/handwired/selene/selene.c b/keyboards/handwired/selene/selene.c index b0924c06f499..3d0ef667cf19 100644 --- a/keyboards/handwired/selene/selene.c +++ b/keyboards/handwired/selene/selene.c @@ -15,24 +15,8 @@ */ -#include "selene.h" - -void matrix_init_kb(void){ - gpio_set_pin_output(NUM_LOCK_PIN); - gpio_set_pin_output(CAPS_LOCK_PIN); - gpio_set_pin_output(SCROLL_LOCK_PIN); -} +#include "quantum.h" void keyboard_post_init_user(void) { rgblight_setrgb(0xff, 0xff, 0xff); } - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(NUM_LOCK_PIN, led_state.num_lock); - gpio_write_pin(CAPS_LOCK_PIN, led_state.caps_lock); - gpio_write_pin(SCROLL_LOCK_PIN, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/handwired/selene/selene.h b/keyboards/handwired/selene/selene.h deleted file mode 100644 index bcd4215e3660..000000000000 --- a/keyboards/handwired/selene/selene.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2020 Bpendragon - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include "quantum.h" - -#define NUM_LOCK_PIN A0 -#define CAPS_LOCK_PIN A2 -#define SCROLL_LOCK_PIN A1 diff --git a/keyboards/handwired/z150/config.h b/keyboards/handwired/z150/config.h deleted file mode 100644 index 7a054266ea45..000000000000 --- a/keyboards/handwired/z150/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2020 DmNosachev - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#define NUM_LOCK_LED_PIN B5 -#define SCROLL_LOCK_LED_PIN B4 -#define CAPS_LOCK_LED_PIN B3 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT diff --git a/keyboards/handwired/z150/keyboard.json b/keyboards/handwired/z150/keyboard.json index 0658bb523397..38c92a6537d4 100644 --- a/keyboards/handwired/z150/keyboard.json +++ b/keyboards/handwired/z150/keyboard.json @@ -16,6 +16,12 @@ "mousekey": true, "nkro": false }, + "indicators": { + "caps_lock": "B3", + "num_lock": "B5", + "scroll_lock": "B4", + "on_state": 0 + }, "matrix_pins": { "cols": ["B11", "B10", "B1", "B0", "A7", "A6", "A5", "A4"], "rows": ["B13", "B14", "B15", "A8", "A9", "A3", "A10", "A1", "A2", "A15", "A0"] diff --git a/keyboards/handwired/z150/z150.c b/keyboards/handwired/z150/z150.c deleted file mode 100644 index ab6709eed756..000000000000 --- a/keyboards/handwired/z150/z150.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2020 DmNosachev - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(NUM_LOCK_LED_PIN); - gpio_set_pin_output(CAPS_LOCK_LED_PIN); - gpio_set_pin_output(SCROLL_LOCK_LED_PIN); - - gpio_write_pin_low(NUM_LOCK_LED_PIN); - gpio_write_pin_low(CAPS_LOCK_LED_PIN); - gpio_write_pin_low(SCROLL_LOCK_LED_PIN); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock); - gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); - gpio_write_pin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/kabedon/kabedon980/kabedon980.c b/keyboards/kabedon/kabedon980/kabedon980.c deleted file mode 100644 index 7024a2eaa99f..000000000000 --- a/keyboards/kabedon/kabedon980/kabedon980.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "quantum.h" - - bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/kabedon/kabedon980/keyboard.json b/keyboards/kabedon/kabedon980/keyboard.json index cf9def2b8fef..b8e100ceac02 100644 --- a/keyboards/kabedon/kabedon980/keyboard.json +++ b/keyboards/kabedon/kabedon980/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x3938", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/noxary/x268/keyboard.json b/keyboards/noxary/x268/keyboard.json index f5a991deff5b..7ca5799de240 100644 --- a/keyboards/noxary/x268/keyboard.json +++ b/keyboards/noxary/x268/keyboard.json @@ -32,6 +32,9 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "B0" + }, "rgblight": { "hue_steps": 16, "saturation_steps": 16, diff --git a/keyboards/noxary/x268/x268.c b/keyboards/noxary/x268/x268.c deleted file mode 100644 index 67d6dff89df8..000000000000 --- a/keyboards/noxary/x268/x268.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 Rozakiin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(B0); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(B0, led_state.caps_lock); - } - return true; -} diff --git a/keyboards/punk75/config.h b/keyboards/punk75/config.h deleted file mode 100644 index 321865330c7d..000000000000 --- a/keyboards/punk75/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 dsanchezseco - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#define LED A0 diff --git a/keyboards/punk75/keyboard.json b/keyboards/punk75/keyboard.json index dd084a147c4c..c7082e564fb8 100644 --- a/keyboards/punk75/keyboard.json +++ b/keyboards/punk75/keyboard.json @@ -32,6 +32,10 @@ {"pin_a": "B1", "pin_b": "B0"} ] }, + "indicators": { + "caps_lock": "A0", + "on_state": 0 + }, "processor": "atmega32a", "bootloader": "usbasploader", "community_layouts": ["ortho_5x15"], diff --git a/keyboards/punk75/keymaps/default/keymap.c b/keyboards/punk75/keymaps/default/keymap.c index 9a6ef29307e8..57f00e1e615d 100644 --- a/keyboards/punk75/keymaps/default/keymap.c +++ b/keyboards/punk75/keymaps/default/keymap.c @@ -74,7 +74,7 @@ void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Update LED state - led_keypress_update(LED, keycode, record); + led_keypress_update(LED_CAPS_LOCK_PIN, keycode, record); return true; } diff --git a/keyboards/punk75/keymaps/via/keymap.c b/keyboards/punk75/keymaps/via/keymap.c index 72ef91fd370a..214135b55de7 100644 --- a/keyboards/punk75/keymaps/via/keymap.c +++ b/keyboards/punk75/keymaps/via/keymap.c @@ -69,7 +69,7 @@ void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Update LED state - led_keypress_update(LED, keycode, record); + led_keypress_update(LED_CAPS_LOCK_PIN, keycode, record); return true; } diff --git a/keyboards/punk75/punk75.c b/keyboards/punk75/punk75.c deleted file mode 100644 index 8d9d09d43c4e..000000000000 --- a/keyboards/punk75/punk75.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2020 dsanchezseco - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - // Set our LED pin as output - gpio_set_pin_output(LED); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(LED, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/redscarf_i/keyboard.json b/keyboards/redscarf_i/keyboard.json index 0a268169ef19..6a186dff0bb2 100644 --- a/keyboards/redscarf_i/keyboard.json +++ b/keyboards/redscarf_i/keyboard.json @@ -25,6 +25,10 @@ "backlight": { "pin": "B5" }, + "indicators": { + "num_lock": "F7", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_5x4", "ortho_6x4", "numpad_5x4", "numpad_6x4"], diff --git a/keyboards/redscarf_i/redscarf_i.c b/keyboards/redscarf_i/redscarf_i.c index 949bc362ad2c..7544b89d1766 100644 --- a/keyboards/redscarf_i/redscarf_i.c +++ b/keyboards/redscarf_i/redscarf_i.c @@ -18,21 +18,13 @@ void keyboard_pre_init_kb(void) { // initialize top row leds - gpio_set_pin_output(F7); gpio_set_pin_output(F6); gpio_set_pin_output(F5); // and then turn them off - gpio_write_pin_high(F7); gpio_write_pin_high(F6); gpio_write_pin_high(F5); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(F7, !led_state.num_lock); - } - return res; + keyboard_pre_init_user(); } layer_state_t layer_state_set_kb(layer_state_t state) { diff --git a/keyboards/sneakbox/aliceclone/aliceclone.c b/keyboards/sneakbox/aliceclone/aliceclone.c deleted file mode 100644 index 74d19e515c12..000000000000 --- a/keyboards/sneakbox/aliceclone/aliceclone.c +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2020 Bryan Ong - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(D7); - gpio_set_pin_output(D6); - gpio_set_pin_output(D4); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D7, led_state.num_lock); - gpio_write_pin(D6, led_state.caps_lock); - gpio_write_pin(D4, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/sneakbox/aliceclone/keyboard.json b/keyboards/sneakbox/aliceclone/keyboard.json index 869b8bd20b69..bb0cd8e4b858 100644 --- a/keyboards/sneakbox/aliceclone/keyboard.json +++ b/keyboards/sneakbox/aliceclone/keyboard.json @@ -36,6 +36,11 @@ "bootmagic": { "matrix": [2, 0] }, + "indicators": { + "caps_lock": "D6", + "num_lock": "D7", + "scroll_lock": "D4" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["alice", "alice_split_bs"], diff --git a/keyboards/yiancardesigns/barleycorn/barleycorn.c b/keyboards/yiancardesigns/barleycorn/barleycorn.c deleted file mode 100644 index c73c1559c208..000000000000 --- a/keyboards/yiancardesigns/barleycorn/barleycorn.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2020 Yiancar - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - // Set our LED pins as output - gpio_set_pin_output(B5); - gpio_set_pin_output(C0); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(B5, led_state.caps_lock); - gpio_write_pin(C0, led_state.num_lock); - } - return res; -} diff --git a/keyboards/yiancardesigns/barleycorn/keyboard.json b/keyboards/yiancardesigns/barleycorn/keyboard.json index a1676840a55c..cf041b96c574 100644 --- a/keyboards/yiancardesigns/barleycorn/keyboard.json +++ b/keyboards/yiancardesigns/barleycorn/keyboard.json @@ -19,6 +19,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "B5", + "num_lock": "C0" + }, "processor": "atmega328p", "bootloader": "usbasploader", "layouts": { From 0b572a1be60b3e14c4a3b9e69637022861f20935 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 25 Jun 2024 07:38:56 +0100 Subject: [PATCH 0075/1205] Remove some redundant 'blank' files (#23995) --- keyboards/4pplet/yakiimo/rev_a/config.h | 0 keyboards/kinesis/stapelberg/config.h | 11 ----------- keyboards/mechstudio/chapter1/rules.mk | 1 - 3 files changed, 12 deletions(-) delete mode 100644 keyboards/4pplet/yakiimo/rev_a/config.h delete mode 100644 keyboards/kinesis/stapelberg/config.h delete mode 100644 keyboards/mechstudio/chapter1/rules.mk diff --git a/keyboards/4pplet/yakiimo/rev_a/config.h b/keyboards/4pplet/yakiimo/rev_a/config.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h deleted file mode 100644 index c0c78135ba17..000000000000 --- a/keyboards/kinesis/stapelberg/config.h +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -/* don't know if this should be defined at the board or top level. Assuming board -#define MOUSEKEY_DELAY 100 -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_MAX_SPEED 3 -#define MOUSEKEY_TIME_TO_MAX 10 -*/ diff --git a/keyboards/mechstudio/chapter1/rules.mk b/keyboards/mechstudio/chapter1/rules.mk deleted file mode 100644 index 6e7633bfe015..000000000000 --- a/keyboards/mechstudio/chapter1/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank From cebe521b11347453156765055b54d81de188f1aa Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 26 Jun 2024 02:34:24 +0100 Subject: [PATCH 0076/1205] Fix docker_cmd.sh when userspace is not configured (#23997) --- lib/python/qmk/cli/userspace/path.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/userspace/path.py b/lib/python/qmk/cli/userspace/path.py index df4648e8c7d4..d0c1b544fb7f 100755 --- a/lib/python/qmk/cli/userspace/path.py +++ b/lib/python/qmk/cli/userspace/path.py @@ -4,5 +4,5 @@ @cli.subcommand('Detected path to QMK Userspace.', hidden=True) def userspace_path(cli): - print(QMK_USERSPACE) + print(QMK_USERSPACE or '') return From 17ae6f9b53a7b2c747d2897b8c177034bfd721a4 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 26 Jun 2024 13:47:36 +1000 Subject: [PATCH 0077/1205] `helix/pico` and `rev2`: add `keyboard.json`s (#23964) --- keyboards/helix/pico/back/keyboard.json | 1 + keyboards/helix/pico/base/keyboard.json | 1 + keyboards/helix/pico/qmk_conf/keyboard.json | 6 ++++++ keyboards/helix/pico/qmk_conf/rules.mk | 2 -- keyboards/helix/pico/rules.mk | 2 ++ keyboards/helix/pico/sc/keyboard.json | 1 + keyboards/helix/pico/under/keyboard.json | 1 + keyboards/helix/rev2/back/keyboard.json | 1 + keyboards/helix/rev2/base/keyboard.json | 1 + keyboards/helix/rev2/qmk_conf/keyboard.json | 1 + keyboards/helix/rev2/rules.mk | 2 ++ keyboards/helix/rev2/sc/keyboard.json | 1 + keyboards/helix/rev2/under/keyboard.json | 1 + keyboards/helix/rules.mk | 15 --------------- 14 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 keyboards/helix/pico/back/keyboard.json create mode 100644 keyboards/helix/pico/base/keyboard.json create mode 100644 keyboards/helix/pico/qmk_conf/keyboard.json delete mode 100644 keyboards/helix/pico/qmk_conf/rules.mk create mode 100644 keyboards/helix/pico/sc/keyboard.json create mode 100644 keyboards/helix/pico/under/keyboard.json create mode 100644 keyboards/helix/rev2/back/keyboard.json create mode 100644 keyboards/helix/rev2/base/keyboard.json create mode 100644 keyboards/helix/rev2/qmk_conf/keyboard.json create mode 100644 keyboards/helix/rev2/sc/keyboard.json create mode 100644 keyboards/helix/rev2/under/keyboard.json diff --git a/keyboards/helix/pico/back/keyboard.json b/keyboards/helix/pico/back/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/helix/pico/back/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/helix/pico/base/keyboard.json b/keyboards/helix/pico/base/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/helix/pico/base/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/helix/pico/qmk_conf/keyboard.json b/keyboards/helix/pico/qmk_conf/keyboard.json new file mode 100644 index 000000000000..ddb722034211 --- /dev/null +++ b/keyboards/helix/pico/qmk_conf/keyboard.json @@ -0,0 +1,6 @@ +{ + "features": { + "audio": true, + "extrakey": true + } +} diff --git a/keyboards/helix/pico/qmk_conf/rules.mk b/keyboards/helix/pico/qmk_conf/rules.mk deleted file mode 100644 index 08ca8e094d94..000000000000 --- a/keyboards/helix/pico/qmk_conf/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -EXTRAKEY_ENABLE = yes # Audio control and System control -AUDIO_ENABLE = yes # Audio output diff --git a/keyboards/helix/pico/rules.mk b/keyboards/helix/pico/rules.mk index e18b8fb0c45c..449df9caa64e 100644 --- a/keyboards/helix/pico/rules.mk +++ b/keyboards/helix/pico/rules.mk @@ -3,3 +3,5 @@ LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +DEFAULT_FOLDER = helix/pico/base diff --git a/keyboards/helix/pico/sc/keyboard.json b/keyboards/helix/pico/sc/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/helix/pico/sc/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/helix/pico/under/keyboard.json b/keyboards/helix/pico/under/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/helix/pico/under/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/helix/rev2/back/keyboard.json b/keyboards/helix/rev2/back/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/helix/rev2/back/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/helix/rev2/base/keyboard.json b/keyboards/helix/rev2/base/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/helix/rev2/base/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/helix/rev2/qmk_conf/keyboard.json b/keyboards/helix/rev2/qmk_conf/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/helix/rev2/qmk_conf/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/helix/rev2/rules.mk b/keyboards/helix/rev2/rules.mk index e827ae111f17..4f830403f413 100644 --- a/keyboards/helix/rev2/rules.mk +++ b/keyboards/helix/rev2/rules.mk @@ -7,3 +7,5 @@ LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +DEFAULT_FOLDER = helix/rev2/base diff --git a/keyboards/helix/rev2/sc/keyboard.json b/keyboards/helix/rev2/sc/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/helix/rev2/sc/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/helix/rev2/under/keyboard.json b/keyboards/helix/rev2/under/keyboard.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/keyboards/helix/rev2/under/keyboard.json @@ -0,0 +1 @@ +{} diff --git a/keyboards/helix/rules.mk b/keyboards/helix/rules.mk index 8ea71064b2f1..f743d48d0e95 100644 --- a/keyboards/helix/rules.mk +++ b/keyboards/helix/rules.mk @@ -1,18 +1,3 @@ -# Build Options -# change yes to no to disable -# -# See TOP/docs/config_options.md for more information. -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no # Audio output -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - DEFAULT_FOLDER = helix/rev2 HELIX_TOP_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) From b71b81d539bde799dd8ea7713f3bed6963e25c32 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 26 Jun 2024 14:28:45 +1000 Subject: [PATCH 0078/1205] `hs60/v2/hhkb`: Adjust layout name (#23998) --- keyboards/hs60/v2/hhkb/keyboard.json | 5 ++++- keyboards/hs60/v2/hhkb/keymaps/default/keymap.c | 8 ++++---- keyboards/hs60/v2/hhkb/keymaps/via/keymap.c | 8 ++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/keyboards/hs60/v2/hhkb/keyboard.json b/keyboards/hs60/v2/hhkb/keyboard.json index d9bc040e23c6..9bd4d111c2c7 100644 --- a/keyboards/hs60/v2/hhkb/keyboard.json +++ b/keyboards/hs60/v2/hhkb/keyboard.json @@ -22,8 +22,11 @@ "nkro": true }, "board": "QMK_PROTON_C", + "layout_aliases": { + "LAYOUT_60_hhkb": "LAYOUT_60_ansi_tsangan_split_bs_rshift" + }, "layouts": { - "LAYOUT_60_hhkb": { + "LAYOUT_60_ansi_tsangan_split_bs_rshift": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/hs60/v2/hhkb/keymaps/default/keymap.c b/keyboards/hs60/v2/hhkb/keymaps/default/keymap.c index 4d3d7b8ac84c..32cd0327beba 100644 --- a/keyboards/hs60/v2/hhkb/keymaps/default/keymap.c +++ b/keyboards/hs60/v2/hhkb/keymaps/default/keymap.c @@ -18,28 +18,28 @@ //This is the HHKB version of the PCB const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT_60_hhkb( /* Base */ +[0] = LAYOUT_60_ansi_tsangan_split_bs_rshift( /* Base */ KC_ESC, 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_GRV, KC_BSLS, 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_BSPC, KC_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), -[1] = LAYOUT_60_hhkb( /* FN */ +[1] = LAYOUT_60_ansi_tsangan_split_bs_rshift( /* FN */ QK_BOOT, 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_TRNS, KC_TRNS, KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_UP, KC_TRNS, KC_DEL, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -[2] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ +[2] = LAYOUT_60_ansi_tsangan_split_bs_rshift( /* Empty for dynamic keymaps */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -[3] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ +[3] = LAYOUT_60_ansi_tsangan_split_bs_rshift( /* Empty for dynamic keymaps */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/hs60/v2/hhkb/keymaps/via/keymap.c b/keyboards/hs60/v2/hhkb/keymaps/via/keymap.c index 4d3d7b8ac84c..32cd0327beba 100644 --- a/keyboards/hs60/v2/hhkb/keymaps/via/keymap.c +++ b/keyboards/hs60/v2/hhkb/keymaps/via/keymap.c @@ -18,28 +18,28 @@ //This is the HHKB version of the PCB const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT_60_hhkb( /* Base */ +[0] = LAYOUT_60_ansi_tsangan_split_bs_rshift( /* Base */ KC_ESC, 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_GRV, KC_BSLS, 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_BSPC, KC_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), -[1] = LAYOUT_60_hhkb( /* FN */ +[1] = LAYOUT_60_ansi_tsangan_split_bs_rshift( /* FN */ QK_BOOT, 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_TRNS, KC_TRNS, KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_UP, KC_TRNS, KC_DEL, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -[2] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ +[2] = LAYOUT_60_ansi_tsangan_split_bs_rshift( /* Empty for dynamic keymaps */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -[3] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ +[3] = LAYOUT_60_ansi_tsangan_split_bs_rshift( /* Empty for dynamic keymaps */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, From 5f794217b44722d86e70ce3de12a88d8a6bae0c7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 26 Jun 2024 14:35:45 +1000 Subject: [PATCH 0079/1205] `xelus/snap96`: add matrix diagram and some additional layouts (#23992) --- keyboards/xelus/snap96/keyboard.json | 428 +++++++++++++++++++++++ keyboards/xelus/snap96/matrix_diagram.md | 27 ++ 2 files changed, 455 insertions(+) create mode 100644 keyboards/xelus/snap96/matrix_diagram.md diff --git a/keyboards/xelus/snap96/keyboard.json b/keyboards/xelus/snap96/keyboard.json index f9ce42dd15f2..0be9968c5af2 100644 --- a/keyboards/xelus/snap96/keyboard.json +++ b/keyboards/xelus/snap96/keyboard.json @@ -144,6 +144,434 @@ {"matrix": [11, 7], "x": 17, "y": 5}, {"matrix": [11, 8], "x": 18, "y": 5} ] + }, + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [6, 0], "x": 10, "y": 0}, + {"matrix": [6, 1], "x": 11, "y": 0}, + {"matrix": [6, 2], "x": 12, "y": 0}, + {"matrix": [6, 3], "x": 13, "y": 0}, + {"matrix": [6, 4], "x": 14, "y": 0}, + {"matrix": [6, 5], "x": 15, "y": 0}, + {"matrix": [6, 6], "x": 16, "y": 0}, + {"matrix": [6, 7], "x": 17, "y": 0}, + {"matrix": [6, 8], "x": 18, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [7, 0], "x": 10, "y": 1}, + {"matrix": [7, 1], "x": 11, "y": 1}, + {"matrix": [7, 2], "x": 12, "y": 1}, + {"matrix": [7, 4], "x": 13, "y": 1, "w": 2}, + {"matrix": [7, 5], "x": 15, "y": 1}, + {"matrix": [7, 6], "x": 16, "y": 1}, + {"matrix": [7, 7], "x": 17, "y": 1}, + {"matrix": [7, 8], "x": 18, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [8, 0], "x": 10.5, "y": 2}, + {"matrix": [8, 1], "x": 11.5, "y": 2}, + {"matrix": [8, 2], "x": 12.5, "y": 2}, + {"matrix": [8, 4], "x": 13.5, "y": 2, "w": 1.5}, + {"matrix": [8, 5], "x": 15, "y": 2}, + {"matrix": [8, 6], "x": 16, "y": 2}, + {"matrix": [8, 7], "x": 17, "y": 2}, + {"matrix": [9, 8], "x": 18, "y": 2, "h": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [9, 0], "x": 10.75, "y": 3}, + {"matrix": [9, 1], "x": 11.75, "y": 3}, + {"matrix": [9, 3], "x": 12.75, "y": 3, "w": 2.25}, + {"matrix": [9, 5], "x": 15, "y": 3}, + {"matrix": [9, 6], "x": 16, "y": 3}, + {"matrix": [9, 7], "x": 17, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [10, 0], "x": 10.25, "y": 4}, + {"matrix": [10, 1], "x": 11.25, "y": 4}, + {"matrix": [10, 3], "x": 12.25, "y": 4, "w": 2.75}, + {"matrix": [10, 5], "x": 15, "y": 4}, + {"matrix": [10, 6], "x": 16, "y": 4}, + {"matrix": [10, 7], "x": 17, "y": 4}, + {"matrix": [11, 8], "x": 18, "y": 4, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [11, 0], "x": 10, "y": 5, "w": 1.25}, + {"matrix": [11, 1], "x": 11.25, "y": 5, "w": 1.25}, + {"matrix": [11, 3], "x": 12.5, "y": 5, "w": 1.25}, + {"matrix": [11, 4], "x": 13.75, "y": 5, "w": 1.25}, + {"matrix": [11, 5], "x": 15, "y": 5, "w": 2}, + {"matrix": [11, 7], "x": 17, "y": 5} + ] + }, + "LAYOUT_ansi_split_bs": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [6, 0], "x": 10, "y": 0}, + {"matrix": [6, 1], "x": 11, "y": 0}, + {"matrix": [6, 2], "x": 12, "y": 0}, + {"matrix": [6, 3], "x": 13, "y": 0}, + {"matrix": [6, 4], "x": 14, "y": 0}, + {"matrix": [6, 5], "x": 15, "y": 0}, + {"matrix": [6, 6], "x": 16, "y": 0}, + {"matrix": [6, 7], "x": 17, "y": 0}, + {"matrix": [6, 8], "x": 18, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [7, 0], "x": 10, "y": 1}, + {"matrix": [7, 1], "x": 11, "y": 1}, + {"matrix": [7, 2], "x": 12, "y": 1}, + {"matrix": [7, 3], "x": 13, "y": 1}, + {"matrix": [7, 4], "x": 14, "y": 1}, + {"matrix": [7, 5], "x": 15, "y": 1}, + {"matrix": [7, 6], "x": 16, "y": 1}, + {"matrix": [7, 7], "x": 17, "y": 1}, + {"matrix": [7, 8], "x": 18, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [8, 0], "x": 10.5, "y": 2}, + {"matrix": [8, 1], "x": 11.5, "y": 2}, + {"matrix": [8, 2], "x": 12.5, "y": 2}, + {"matrix": [8, 4], "x": 13.5, "y": 2, "w": 1.5}, + {"matrix": [8, 5], "x": 15, "y": 2}, + {"matrix": [8, 6], "x": 16, "y": 2}, + {"matrix": [8, 7], "x": 17, "y": 2}, + {"matrix": [9, 8], "x": 18, "y": 2, "h": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [9, 0], "x": 10.75, "y": 3}, + {"matrix": [9, 1], "x": 11.75, "y": 3}, + {"matrix": [9, 3], "x": 12.75, "y": 3, "w": 2.25}, + {"matrix": [9, 5], "x": 15, "y": 3}, + {"matrix": [9, 6], "x": 16, "y": 3}, + {"matrix": [9, 7], "x": 17, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [10, 0], "x": 10.25, "y": 4}, + {"matrix": [10, 1], "x": 11.25, "y": 4}, + {"matrix": [10, 3], "x": 12.25, "y": 4, "w": 2.75}, + {"matrix": [10, 5], "x": 15, "y": 4}, + {"matrix": [10, 6], "x": 16, "y": 4}, + {"matrix": [10, 7], "x": 17, "y": 4}, + {"matrix": [11, 8], "x": 18, "y": 4, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [11, 0], "x": 10, "y": 5, "w": 1.25}, + {"matrix": [11, 1], "x": 11.25, "y": 5, "w": 1.25}, + {"matrix": [11, 3], "x": 12.5, "y": 5, "w": 1.25}, + {"matrix": [11, 4], "x": 13.75, "y": 5, "w": 1.25}, + {"matrix": [11, 5], "x": 15, "y": 5, "w": 2}, + {"matrix": [11, 7], "x": 17, "y": 5} + ] + }, + "LAYOUT_iso": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [6, 0], "x": 10, "y": 0}, + {"matrix": [6, 1], "x": 11, "y": 0}, + {"matrix": [6, 2], "x": 12, "y": 0}, + {"matrix": [6, 3], "x": 13, "y": 0}, + {"matrix": [6, 4], "x": 14, "y": 0}, + {"matrix": [6, 5], "x": 15, "y": 0}, + {"matrix": [6, 6], "x": 16, "y": 0}, + {"matrix": [6, 7], "x": 17, "y": 0}, + {"matrix": [6, 8], "x": 18, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [7, 0], "x": 10, "y": 1}, + {"matrix": [7, 1], "x": 11, "y": 1}, + {"matrix": [7, 2], "x": 12, "y": 1}, + {"matrix": [7, 4], "x": 13, "y": 1, "w": 2}, + {"matrix": [7, 5], "x": 15, "y": 1}, + {"matrix": [7, 6], "x": 16, "y": 1}, + {"matrix": [7, 7], "x": 17, "y": 1}, + {"matrix": [7, 8], "x": 18, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [8, 0], "x": 10.5, "y": 2}, + {"matrix": [8, 1], "x": 11.5, "y": 2}, + {"matrix": [8, 2], "x": 12.5, "y": 2}, + {"matrix": [8, 5], "x": 15, "y": 2}, + {"matrix": [8, 6], "x": 16, "y": 2}, + {"matrix": [8, 7], "x": 17, "y": 2}, + {"matrix": [9, 8], "x": 18, "y": 2, "h": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [9, 0], "x": 10.75, "y": 3}, + {"matrix": [9, 1], "x": 11.75, "y": 3}, + {"matrix": [9, 3], "x": 12.75, "y": 3}, + {"matrix": [8, 4], "x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"matrix": [9, 5], "x": 15, "y": 3}, + {"matrix": [9, 6], "x": 16, "y": 3}, + {"matrix": [9, 7], "x": 17, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [10, 0], "x": 10.25, "y": 4}, + {"matrix": [10, 1], "x": 11.25, "y": 4}, + {"matrix": [10, 3], "x": 12.25, "y": 4, "w": 2.75}, + {"matrix": [10, 5], "x": 15, "y": 4}, + {"matrix": [10, 6], "x": 16, "y": 4}, + {"matrix": [10, 7], "x": 17, "y": 4}, + {"matrix": [11, 8], "x": 18, "y": 4, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [11, 0], "x": 10, "y": 5, "w": 1.25}, + {"matrix": [11, 1], "x": 11.25, "y": 5, "w": 1.25}, + {"matrix": [11, 3], "x": 12.5, "y": 5, "w": 1.25}, + {"matrix": [11, 4], "x": 13.75, "y": 5, "w": 1.25}, + {"matrix": [11, 5], "x": 15, "y": 5, "w": 2}, + {"matrix": [11, 7], "x": 17, "y": 5} + ] + }, + "LAYOUT_iso_split_bs": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [6, 0], "x": 10, "y": 0}, + {"matrix": [6, 1], "x": 11, "y": 0}, + {"matrix": [6, 2], "x": 12, "y": 0}, + {"matrix": [6, 3], "x": 13, "y": 0}, + {"matrix": [6, 4], "x": 14, "y": 0}, + {"matrix": [6, 5], "x": 15, "y": 0}, + {"matrix": [6, 6], "x": 16, "y": 0}, + {"matrix": [6, 7], "x": 17, "y": 0}, + {"matrix": [6, 8], "x": 18, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [7, 0], "x": 10, "y": 1}, + {"matrix": [7, 1], "x": 11, "y": 1}, + {"matrix": [7, 2], "x": 12, "y": 1}, + {"matrix": [7, 3], "x": 13, "y": 1}, + {"matrix": [7, 4], "x": 14, "y": 1}, + {"matrix": [7, 5], "x": 15, "y": 1}, + {"matrix": [7, 6], "x": 16, "y": 1}, + {"matrix": [7, 7], "x": 17, "y": 1}, + {"matrix": [7, 8], "x": 18, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [8, 0], "x": 10.5, "y": 2}, + {"matrix": [8, 1], "x": 11.5, "y": 2}, + {"matrix": [8, 2], "x": 12.5, "y": 2}, + {"matrix": [8, 5], "x": 15, "y": 2}, + {"matrix": [8, 6], "x": 16, "y": 2}, + {"matrix": [8, 7], "x": 17, "y": 2}, + {"matrix": [9, 8], "x": 18, "y": 2, "h": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [9, 0], "x": 10.75, "y": 3}, + {"matrix": [9, 1], "x": 11.75, "y": 3}, + {"matrix": [9, 3], "x": 12.75, "y": 3}, + {"matrix": [8, 4], "x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"matrix": [9, 5], "x": 15, "y": 3}, + {"matrix": [9, 6], "x": 16, "y": 3}, + {"matrix": [9, 7], "x": 17, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [10, 0], "x": 10.25, "y": 4}, + {"matrix": [10, 1], "x": 11.25, "y": 4}, + {"matrix": [10, 3], "x": 12.25, "y": 4, "w": 2.75}, + {"matrix": [10, 5], "x": 15, "y": 4}, + {"matrix": [10, 6], "x": 16, "y": 4}, + {"matrix": [10, 7], "x": 17, "y": 4}, + {"matrix": [11, 8], "x": 18, "y": 4, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [11, 0], "x": 10, "y": 5, "w": 1.25}, + {"matrix": [11, 1], "x": 11.25, "y": 5, "w": 1.25}, + {"matrix": [11, 3], "x": 12.5, "y": 5, "w": 1.25}, + {"matrix": [11, 4], "x": 13.75, "y": 5, "w": 1.25}, + {"matrix": [11, 5], "x": 15, "y": 5, "w": 2}, + {"matrix": [11, 7], "x": 17, "y": 5} + ] } } } diff --git a/keyboards/xelus/snap96/matrix_diagram.md b/keyboards/xelus/snap96/matrix_diagram.md new file mode 100644 index 000000000000..123adcee01ff --- /dev/null +++ b/keyboards/xelus/snap96/matrix_diagram.md @@ -0,0 +1,27 @@ +# Matrix Diagram for Xelus Snap96 + +``` + ┌───────┐ + 2u Backspace │74 │ + └───────┘ + ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │60 │61 │62 │63 │64 │65 │66 │67 │68 │ + ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │70 │71 │72 │73 │74 │75 │76 │77 │78 │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ ┌───┐ ┌─────┐ + │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │80 │81 │82 │84 │85 │86 │87 │88 │ │98 │ │84 │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┼───┤ │ │ ┌──┴┐ │ ISO Enter + │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │90 │91 │93 │95 │96 │97 │98 │ │ │ │93 │ │ +┌────────┐ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ ├───┤ └───┴────┘ +│40 │ │40 │41 │42 │43 │44 │45 │46 │47 │48 │49 │A0 │A1 │A3 │A4 │A5 │A6 │A7 │A8 │ │B8 │┌───┬──────────┐ +└────────┘ ├────┼───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬────┬┴───┼───┼───┼───┼───┤ │ ││A1 │A3 │ + │50 │51 │52 │55 │56 │59 │B0 │B1 │B3 │B4 │B5 │B6 │B7 │B8 │ │ │├───┴──┬───┬───┤ + └────┴────┴────┴──────────┴────┴────────┴────┴────┴────┴────┴───┴───┴───┴───┘ └───┘│A1 │A3 │A4 │ + ┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐ ┌───────┬───┐ └──────┴───┴───┘ + │50 │51 │52 │56 │B1 │B3 │B4 │ │B5 │B7 │ + ├────┬┴───┼────┬┴───────────────────────┬───┴┬────┼───┴┬────┤ ├───┬───┴───┤ + │50 │51 │52 │56 │B0 │B1 │B3 │B4 │ │B5 │B7 │ + ├────┼────┼────┼────────┬────┬──────────┼────┼────┼────┼────┤ └───┴───────┘ + │50 │51 │52 │55 │56 │59 │B0 │B1 │B3 │B4 │ + └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ +``` From 90b043e01cc7f6d13473e5dc7153d2bd12ff2b4a Mon Sep 17 00:00:00 2001 From: TyraelWasTaken <96232590+TyraelWasTaken@users.noreply.github.com> Date: Thu, 27 Jun 2024 04:55:47 +0100 Subject: [PATCH 0080/1205] Add support for Equanimity (#23965) * Add Equanimity files * Update keyboard.json format * Update readme.md * CRLF to LF * Force LF and correct rules.mk * Remove config.h * Remove rules.mk * Update keymap.c * Update keyboard.json * Update name in readme.md --- .../tyraelwastaken/equanimity/keyboard.json | 104 ++++++++++++++++++ .../equanimity/keymaps/default/keymap.c | 35 ++++++ .../equanimity/keymaps/default/rules.mk | 1 + .../equanimity/keymaps/via/keymap.c | 35 ++++++ .../equanimity/keymaps/via/rules.mk | 2 + keyboards/tyraelwastaken/equanimity/readme.md | 27 +++++ 6 files changed, 204 insertions(+) create mode 100644 keyboards/tyraelwastaken/equanimity/keyboard.json create mode 100644 keyboards/tyraelwastaken/equanimity/keymaps/default/keymap.c create mode 100644 keyboards/tyraelwastaken/equanimity/keymaps/default/rules.mk create mode 100644 keyboards/tyraelwastaken/equanimity/keymaps/via/keymap.c create mode 100644 keyboards/tyraelwastaken/equanimity/keymaps/via/rules.mk create mode 100644 keyboards/tyraelwastaken/equanimity/readme.md diff --git a/keyboards/tyraelwastaken/equanimity/keyboard.json b/keyboards/tyraelwastaken/equanimity/keyboard.json new file mode 100644 index 000000000000..d9ace047142c --- /dev/null +++ b/keyboards/tyraelwastaken/equanimity/keyboard.json @@ -0,0 +1,104 @@ +{ + "manufacturer": "TyraelWasTaken", + "keyboard_name": "Equanimity", + "maintainer": "TyraelWasTaken", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "A9", "pin_b": "A10", "resolution": 1} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["B2", "B1", "B0", "A7", "A6", "A5", "A2", "B12", "B9", "B8", "B7", "B6", "B5", "B4", "B3", "A15"], + "rows": ["B11", "B10", "A1", "A3", "A4"] + }, + "processor": "STM32F072", + "url": "https://github.com/TyraelWasTaken/Equanimity", + "usb": { + "device_version": "1.0.0", + "pid": "0x5343", + "vid": "0x6571" + }, + "layouts": { + "LAYOUT": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1}, + {"matrix": [1, 14], "x": 14, "y": 1}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 6], "x": 6, "y": 2}, + {"matrix": [2, 8], "x": 8, "y": 2}, + {"matrix": [2, 9], "x": 9, "y": 2}, + {"matrix": [2, 10], "x": 10, "y": 2}, + {"matrix": [2, 11], "x": 11, "y": 2}, + {"matrix": [2, 12], "x": 12, "y": 2}, + {"matrix": [2, 13], "x": 13, "y": 2}, + {"matrix": [2, 14], "x": 14, "y": 2}, + {"matrix": [2, 15], "x": 15, "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}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + {"matrix": [3, 6], "x": 6, "y": 3}, + {"matrix": [3, 8], "x": 8, "y": 3}, + {"matrix": [3, 9], "x": 9, "y": 3}, + {"matrix": [3, 10], "x": 10, "y": 3}, + {"matrix": [3, 11], "x": 11, "y": 3}, + {"matrix": [3, 12], "x": 12, "y": 3}, + {"matrix": [3, 13], "x": 13, "y": 3}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [4, 1], "x": 1, "y": 4}, + {"matrix": [4, 3], "x": 3, "y": 4}, + {"matrix": [4, 5], "x": 5, "y": 4}, + {"matrix": [4, 7], "x": 7, "y": 4}, + {"matrix": [4, 8], "x": 8, "y": 4}, + {"matrix": [4, 10], "x": 10, "y": 4}, + {"matrix": [4, 12], "x": 12, "y": 4}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 15], "x": 5, "y": 4} + ] + } + } +} diff --git a/keyboards/tyraelwastaken/equanimity/keymaps/default/keymap.c b/keyboards/tyraelwastaken/equanimity/keymaps/default/keymap.c new file mode 100644 index 000000000000..7430554f7ab0 --- /dev/null +++ b/keyboards/tyraelwastaken/equanimity/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +// Copyright 2024 TyraelWasTaken (@TyraelWasTaken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum layer_names { + _BL, + _FL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT( + KC_DELETE, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BACKSPACE, + 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_LOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOTE, KC_ENT, KC_MEDIA_PLAY_PAUSE, + KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_SPC, MO(_FL), KC_SPC, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FL] = LAYOUT( + KC_TRNS, KC_GRAVE, 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_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_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_HOME, KC_PGDN, KC_END + ) +}; + +#ifdef ENCODER_MAP_ENABLE + const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_BL] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FL] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + }; +#endif \ No newline at end of file diff --git a/keyboards/tyraelwastaken/equanimity/keymaps/default/rules.mk b/keyboards/tyraelwastaken/equanimity/keymaps/default/rules.mk new file mode 100644 index 000000000000..a40474b4d5c7 --- /dev/null +++ b/keyboards/tyraelwastaken/equanimity/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/tyraelwastaken/equanimity/keymaps/via/keymap.c b/keyboards/tyraelwastaken/equanimity/keymaps/via/keymap.c new file mode 100644 index 000000000000..7430554f7ab0 --- /dev/null +++ b/keyboards/tyraelwastaken/equanimity/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +// Copyright 2024 TyraelWasTaken (@TyraelWasTaken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum layer_names { + _BL, + _FL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT( + KC_DELETE, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BACKSPACE, + 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_LOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOTE, KC_ENT, KC_MEDIA_PLAY_PAUSE, + KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_SPC, MO(_FL), KC_SPC, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FL] = LAYOUT( + KC_TRNS, KC_GRAVE, 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_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_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_HOME, KC_PGDN, KC_END + ) +}; + +#ifdef ENCODER_MAP_ENABLE + const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_BL] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FL] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + }; +#endif \ No newline at end of file diff --git a/keyboards/tyraelwastaken/equanimity/keymaps/via/rules.mk b/keyboards/tyraelwastaken/equanimity/keymaps/via/rules.mk new file mode 100644 index 000000000000..4253f570f0bb --- /dev/null +++ b/keyboards/tyraelwastaken/equanimity/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/tyraelwastaken/equanimity/readme.md b/keyboards/tyraelwastaken/equanimity/readme.md new file mode 100644 index 000000000000..a8662261921f --- /dev/null +++ b/keyboards/tyraelwastaken/equanimity/readme.md @@ -0,0 +1,27 @@ +# equanimity + +![equanimity](https://i.imgur.com/kIGyOi4.png) + +Arisu-ish Alice keyboard with an EC11 and some accent keys, staggered. + +* Keyboard Maintainer: [TyraelWasTaken](https://github.com/TyraelWasTaken) +* Hardware Supported: *UDB C3 or greater with Equanimity PCB, no other PCBs are supported for the case* +* Hardware Availability: *If you wish to build this, all files are available here: https://github.com/TyraelWasTaken/Equanimity* + +Make example for this keyboard (after setting up your build environment): + + make tyraelwastaken/equanimity:default + +Flashing example for this keyboard: + + make tyraelwastaken/equanimity: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **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 \ No newline at end of file From 603586800c65d32c45b0896645a6886fbe8e809c Mon Sep 17 00:00:00 2001 From: David Hoelscher Date: Wed, 26 Jun 2024 22:56:16 -0500 Subject: [PATCH 0081/1205] [Keyboard] Add Elysian (#23949) * adding Elysian * corrections from zvecr --- keyboards/custommk/elysian/config.h | 14 ++++ keyboards/custommk/elysian/halconf.h | 14 ++++ keyboards/custommk/elysian/keyboard.json | 65 +++++++++++++++++++ .../custommk/elysian/keymaps/default/keymap.c | 19 ++++++ .../custommk/elysian/keymaps/default/rules.mk | 1 + .../custommk/elysian/keymaps/via/config.h | 6 ++ .../custommk/elysian/keymaps/via/keymap.c | 19 ++++++ .../custommk/elysian/keymaps/via/rules.mk | 2 + keyboards/custommk/elysian/mcuconf.h | 10 +++ keyboards/custommk/elysian/readme.md | 27 ++++++++ 10 files changed, 177 insertions(+) create mode 100644 keyboards/custommk/elysian/config.h create mode 100644 keyboards/custommk/elysian/halconf.h create mode 100644 keyboards/custommk/elysian/keyboard.json create mode 100644 keyboards/custommk/elysian/keymaps/default/keymap.c create mode 100644 keyboards/custommk/elysian/keymaps/default/rules.mk create mode 100644 keyboards/custommk/elysian/keymaps/via/config.h create mode 100644 keyboards/custommk/elysian/keymaps/via/keymap.c create mode 100644 keyboards/custommk/elysian/keymaps/via/rules.mk create mode 100644 keyboards/custommk/elysian/mcuconf.h create mode 100644 keyboards/custommk/elysian/readme.md diff --git a/keyboards/custommk/elysian/config.h b/keyboards/custommk/elysian/config.h new file mode 100644 index 000000000000..03a7586655d8 --- /dev/null +++ b/keyboards/custommk/elysian/config.h @@ -0,0 +1,14 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// FRAM configuration +#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN B7 +#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 4 + +// SPI configuration +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN B3 +#define SPI_MOSI_PIN B5 +#define SPI_MISO_PIN B4 \ No newline at end of file diff --git a/keyboards/custommk/elysian/halconf.h b/keyboards/custommk/elysian/halconf.h new file mode 100644 index 000000000000..5b2f7eedd209 --- /dev/null +++ b/keyboards/custommk/elysian/halconf.h @@ -0,0 +1,14 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_SPI TRUE + +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#define SERIAL_BUFFERS_SIZE 256 + +#define SPI_USE_WAIT TRUE + +#include_next diff --git a/keyboards/custommk/elysian/keyboard.json b/keyboards/custommk/elysian/keyboard.json new file mode 100644 index 000000000000..4fc842149dc1 --- /dev/null +++ b/keyboards/custommk/elysian/keyboard.json @@ -0,0 +1,65 @@ +{ + "manufacturer": "customMK", + "keyboard_name": "Elysian", + "maintainer": "customMK", + "bootloader": "stm32-dfu", + "debounce": 10, + "diode_direction": "ROW2COL", + "dynamic_keymap": { + "layer_count": 32 + }, + "eeprom": { + "driver": "spi" + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true + }, + "matrix_pins": { + "cols": ["A0", "A1", "A2", "A3", "A4"], + "rows": ["B0", "B1", "B6", "B8"] + }, + "processor": "STM32F411", + "qmk": { + "tap_keycode_delay": 10 + }, + "url": "https://shop.custommk.com/collections/elysian/products/elysian", + "usb": { + "device_version": "1.0.0", + "pid": "0xFABB", + "vid": "0xF35B", + "force_nkro": true + }, + "encoder": { + "rotary": [ + { "pin_a": "A5", "pin_b": "A6", "resolution": 2}, + { "pin_a": "A7", "pin_b": "A8", "resolution": 2} + ] + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "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}, + {"matrix": [3, 4], "x": 4, "y": 3} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/custommk/elysian/keymaps/default/keymap.c b/keyboards/custommk/elysian/keymaps/default/keymap.c new file mode 100644 index 000000000000..fcb617ad9eea --- /dev/null +++ b/keyboards/custommk/elysian/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_ENT, + KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_WH_D, KC_WH_U) } +}; +#endif \ No newline at end of file diff --git a/keyboards/custommk/elysian/keymaps/default/rules.mk b/keyboards/custommk/elysian/keymaps/default/rules.mk new file mode 100644 index 000000000000..a40474b4d5c7 --- /dev/null +++ b/keyboards/custommk/elysian/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/custommk/elysian/keymaps/via/config.h b/keyboards/custommk/elysian/keymaps/via/config.h new file mode 100644 index 000000000000..c2dca3827778 --- /dev/null +++ b/keyboards/custommk/elysian/keymaps/via/config.h @@ -0,0 +1,6 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define DYNAMIC_KEYMAP_MACRO_COUNT 128 diff --git a/keyboards/custommk/elysian/keymaps/via/keymap.c b/keyboards/custommk/elysian/keymaps/via/keymap.c new file mode 100644 index 000000000000..493a7834e897 --- /dev/null +++ b/keyboards/custommk/elysian/keymaps/via/keymap.c @@ -0,0 +1,19 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, MO(1), + KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_WH_D, KC_WH_U) } +}; +#endif \ No newline at end of file diff --git a/keyboards/custommk/elysian/keymaps/via/rules.mk b/keyboards/custommk/elysian/keymaps/via/rules.mk new file mode 100644 index 000000000000..4253f570f0bb --- /dev/null +++ b/keyboards/custommk/elysian/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/custommk/elysian/mcuconf.h b/keyboards/custommk/elysian/mcuconf.h new file mode 100644 index 000000000000..42dbcf352a1d --- /dev/null +++ b/keyboards/custommk/elysian/mcuconf.h @@ -0,0 +1,10 @@ +// Copyright 2024 customMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +// FRAM +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE diff --git a/keyboards/custommk/elysian/readme.md b/keyboards/custommk/elysian/readme.md new file mode 100644 index 000000000000..7b508758ca46 --- /dev/null +++ b/keyboards/custommk/elysian/readme.md @@ -0,0 +1,27 @@ +# Elysian + +![Elysian](https://i.imgur.com/W8yx11qh.jpeg) + +Elysian is a 3x5 macropad including two rotary encoders. + +* Keyboard Maintainer: [customMK](https://github.com/customMK) +* Hardware Supported: Elysian +* Hardware Availability: [customMK](https://shop.custommk.com/collections/keyboards/products/elysian) + +Make example for this keyboard (after setting up your build environment): + + make custommk/elysian:default + +Flashing example for this keyboard: + + make custommk/elysian: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Press and hold down the rotary encoder at (0,0) in the matrix (the rotary encoder in the top left corner) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available From a7aa58cc8130b9c59bc39f41e33d9387a46b1e8c Mon Sep 17 00:00:00 2001 From: Dasky <32983009+daskygit@users.noreply.github.com> Date: Thu, 27 Jun 2024 05:10:13 +0100 Subject: [PATCH 0082/1205] Change ADNS9800 and PMW33XX SROM uploads to opt in. (#24001) Make SROM upload optional --- drivers/sensors/adns9800.c | 11 +++++++++++ drivers/sensors/pmw33xx_common.c | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/sensors/adns9800.c b/drivers/sensors/adns9800.c index f34529ee90dd..0ba26a365adf 100644 --- a/drivers/sensors/adns9800.c +++ b/drivers/sensors/adns9800.c @@ -115,6 +115,7 @@ void adns9800_init(void) { adns9800_read(REG_Delta_Y_L); adns9800_read(REG_Delta_Y_H); +#ifdef ADNS9800_UPLOAD_SROM // upload firmware // 3k firmware mode @@ -145,6 +146,16 @@ void adns9800_init(void) { spi_stop(); wait_ms(10); +#else + // write reset value to REG_Configuration_IV + adns9800_write(REG_Configuration_IV, 0x0); + + // write reset value to REG_SROM_Enable + adns9800_write(REG_SROM_Enable, 0x0); + + // wait a frame + wait_ms(10); +#endif // enable laser uint8_t laser_ctrl0 = adns9800_read(REG_LASER_CTRL0); diff --git a/drivers/sensors/pmw33xx_common.c b/drivers/sensors/pmw33xx_common.c index 82a7ec32973f..f1f2d0e8653b 100644 --- a/drivers/sensors/pmw33xx_common.c +++ b/drivers/sensors/pmw33xx_common.c @@ -154,10 +154,12 @@ bool pmw33xx_init(uint8_t sensor) { pmw33xx_read(sensor, REG_Delta_Y_L); pmw33xx_read(sensor, REG_Delta_Y_H); +#ifdef PMW33XX_UPLOAD_SROM if (!pmw33xx_upload_firmware(sensor)) { pd_dprintf("PMW33XX (%d): firmware upload failed!\n", sensor); return false; } +#endif spi_stop(); @@ -200,7 +202,7 @@ pmw33xx_report_t pmw33xx_read_burst(uint8_t sensor) { spi_write(REG_Motion_Burst); wait_us(35); // waits for tSRAD_MOTBR - spi_receive((uint8_t*)&report, sizeof(report)); + spi_receive((uint8_t *)&report, sizeof(report)); // panic recovery, sometimes burst mode works weird. if (report.motion.w & 0b111) { From 9d02ac37f7222b2dbdd10080b062bba05b2c9893 Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 27 Jun 2024 13:37:41 -0400 Subject: [PATCH 0083/1205] Add Nyquist Rev. 5 (#23971) * Add Nyquist Rev. 5 * Remove unused keymap --- .../keebio/nyquist/keymaps/tester/config.h | 20 -- .../keebio/nyquist/keymaps/tester/keymap.c | 221 ------------ .../keebio/nyquist/keymaps/tester/rules.mk | 1 - keyboards/keebio/nyquist/rev5/config.h | 20 ++ keyboards/keebio/nyquist/rev5/keyboard.json | 322 ++++++++++++++++++ keyboards/keebio/nyquist/rev5/rules.mk | 1 + 6 files changed, 343 insertions(+), 242 deletions(-) delete mode 100644 keyboards/keebio/nyquist/keymaps/tester/config.h delete mode 100644 keyboards/keebio/nyquist/keymaps/tester/keymap.c delete mode 100644 keyboards/keebio/nyquist/keymaps/tester/rules.mk create mode 100644 keyboards/keebio/nyquist/rev5/config.h create mode 100644 keyboards/keebio/nyquist/rev5/keyboard.json create mode 100644 keyboards/keebio/nyquist/rev5/rules.mk diff --git a/keyboards/keebio/nyquist/keymaps/tester/config.h b/keyboards/keebio/nyquist/keymaps/tester/config.h deleted file mode 100644 index 4f5f10cebcfd..000000000000 --- a/keyboards/keebio/nyquist/keymaps/tester/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2017 Danny Nguyen - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#define USE_I2C diff --git a/keyboards/keebio/nyquist/keymaps/tester/keymap.c b/keyboards/keebio/nyquist/keymaps/tester/keymap.c deleted file mode 100644 index 7ed85044ca63..000000000000 --- a/keyboards/keebio/nyquist/keymaps/tester/keymap.c +++ /dev/null @@ -1,221 +0,0 @@ -#include QMK_KEYBOARD_H - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 5 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - BL_STEP, KC_Q, KC_W, KC_E, KC_R, KC_T, BL_STEP, KC_U, KC_I, KC_O, KC_P, KC_DEL, - RGB_MOD, KC_A, KC_S, KC_D, KC_F, KC_G, RGB_MOD, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, QK_BOOT, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) - - -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - } - return true; -} diff --git a/keyboards/keebio/nyquist/keymaps/tester/rules.mk b/keyboards/keebio/nyquist/keymaps/tester/rules.mk deleted file mode 100644 index 1e3cebb14515..000000000000 --- a/keyboards/keebio/nyquist/keymaps/tester/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE = yes diff --git a/keyboards/keebio/nyquist/rev5/config.h b/keyboards/keebio/nyquist/rev5/config.h new file mode 100644 index 000000000000..8a88c21c8919 --- /dev/null +++ b/keyboards/keebio/nyquist/rev5/config.h @@ -0,0 +1,20 @@ +// Copyright 2024 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define SPLIT_HAND_PIN GP23 + +#define USB_VBUS_PIN GP18 + +#define SERIAL_USART_FULL_DUPLEX +#define SERIAL_USART_TX_PIN GP8 +#define SERIAL_USART_RX_PIN GP9 +#define SERIAL_USART_PIN_SWAP + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U + +#define I2C_DRIVER I2CD0 +#define I2C0_SDA_PIN GP4 +#define I2C0_SCL_PIN GP5 diff --git a/keyboards/keebio/nyquist/rev5/keyboard.json b/keyboards/keebio/nyquist/rev5/keyboard.json new file mode 100644 index 000000000000..83d88b37b8d3 --- /dev/null +++ b/keyboards/keebio/nyquist/rev5/keyboard.json @@ -0,0 +1,322 @@ +{ + "keyboard_name": "Nyquist Rev. 5", + "usb": { + "pid": "0x5156", + "device_version": "5.0.0" + }, + "processor": "RP2040", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "rgb_matrix": true + }, + "split": { + "bootmagic": { + "matrix": [9, 0] + }, + "enabled": true, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "GP1", "pin_b": "GP0" } + ] + } + }, + "matrix_pins": { + "right":{ + "cols": ["GP25", "GP29", "GP20", "GP11", "GP3", "GP2"], + "rows": ["GP24", "GP17", "GP15", "GP14", "GP12"] + } + }, + "transport": { + "sync" :{ + "matrix_state": true + } + } + }, + "matrix_pins": { + "cols": ["GP29", "GP22", "GP0", "GP3", "GP11", "GP6"], + "rows": ["GP2", "GP1", "GP17", "GP25", "GP24"] + }, + "encoder": { + "enabled": true, + "rotary": [ + {"pin_a": "GP26", "pin_b": "GP27" } + ] + }, + "ws2812": { + "driver": "vendor", + "pin": "GP28" + }, + "layouts": { + "LAYOUT_ortho_5x12": { + "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": [5, 0], "x": 7, "y": 0}, + {"matrix": [5, 1], "x": 8, "y": 0}, + {"matrix": [5, 2], "x": 9, "y": 0}, + {"matrix": [5, 3], "x": 10, "y": 0}, + {"matrix": [5, 4], "x": 11, "y": 0}, + {"matrix": [5, 5], "x": 12, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + + {"matrix": [6, 0], "x": 7, "y": 1}, + {"matrix": [6, 1], "x": 8, "y": 1}, + {"matrix": [6, 2], "x": 9, "y": 1}, + {"matrix": [6, 3], "x": 10, "y": 1}, + {"matrix": [6, 4], "x": 11, "y": 1}, + {"matrix": [6, 5], "x": 12, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + + {"matrix": [7, 0], "x": 7, "y": 2}, + {"matrix": [7, 1], "x": 8, "y": 2}, + {"matrix": [7, 2], "x": 9, "y": 2}, + {"matrix": [7, 3], "x": 10, "y": 2}, + {"matrix": [7, 4], "x": 11, "y": 2}, + {"matrix": [7, 5], "x": 12, "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}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + + {"matrix": [8, 0], "x": 7, "y": 3}, + {"matrix": [8, 1], "x": 8, "y": 3}, + {"matrix": [8, 2], "x": 9, "y": 3}, + {"matrix": [8, 3], "x": 10, "y": 3}, + {"matrix": [8, 4], "x": 11, "y": 3}, + {"matrix": [8, 5], "x": 12, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4}, + {"matrix": [4, 1], "x": 1, "y": 4}, + {"matrix": [4, 2], "x": 2, "y": 4}, + {"matrix": [4, 3], "x": 3, "y": 4}, + {"matrix": [4, 4], "x": 4, "y": 4}, + {"matrix": [4, 5], "x": 5, "y": 4}, + + {"matrix": [9, 0], "x": 7, "y": 4}, + {"matrix": [9, 1], "x": 8, "y": 4}, + {"matrix": [9, 2], "x": 9, "y": 4}, + {"matrix": [9, 3], "x": 10, "y": 4}, + {"matrix": [9, 4], "x": 11, "y": 4}, + {"matrix": [9, 5], "x": 12, "y": 4} + ] + }, + "LAYOUT_ortho_4x12": { + "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": [5, 0], "x": 7, "y": 0}, + {"matrix": [5, 1], "x": 8, "y": 0}, + {"matrix": [5, 2], "x": 9, "y": 0}, + {"matrix": [5, 3], "x": 10, "y": 0}, + {"matrix": [5, 4], "x": 11, "y": 0}, + {"matrix": [5, 5], "x": 12, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + + {"matrix": [6, 0], "x": 7, "y": 1}, + {"matrix": [6, 1], "x": 8, "y": 1}, + {"matrix": [6, 2], "x": 9, "y": 1}, + {"matrix": [6, 3], "x": 10, "y": 1}, + {"matrix": [6, 4], "x": 11, "y": 1}, + {"matrix": [6, 5], "x": 12, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + + {"matrix": [7, 0], "x": 7, "y": 2}, + {"matrix": [7, 1], "x": 8, "y": 2}, + {"matrix": [7, 2], "x": 9, "y": 2}, + {"matrix": [7, 3], "x": 10, "y": 2}, + {"matrix": [7, 4], "x": 11, "y": 2}, + {"matrix": [7, 5], "x": 12, "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}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + + {"matrix": [8, 0], "x": 7, "y": 3}, + {"matrix": [8, 1], "x": 8, "y": 3}, + {"matrix": [8, 2], "x": 9, "y": 3}, + {"matrix": [8, 3], "x": 10, "y": 3}, + {"matrix": [8, 4], "x": 11, "y": 3}, + {"matrix": [8, 5], "x": 12, "y": 3} + ] + } + }, + "rgb_matrix": { + "driver": "ws2812", + "split_count": [36, 36], + "max_brightness": 120, + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "rainbow_moving_chevron": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_fractal": true, + "pixel_flow": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "layout": [ + { "flags": 4, "matrix": [0, 0], "x": 9, "y": 6 }, + { "flags": 4, "matrix": [0, 1], "x": 28, "y": 6 }, + { "flags": 4, "matrix": [0, 2], "x": 46, "y": 6 }, + { "flags": 2, "x": 56, "y": 6 }, + { "flags": 4, "matrix": [0, 3], "x": 65, "y": 6 }, + { "flags": 4, "matrix": [0, 4], "x": 84, "y": 6 }, + { "flags": 4, "matrix": [0, 5], "x": 102, "y": 6 }, + + { "flags": 4, "matrix": [1, 5], "x": 102, "y": 19 }, + { "flags": 2, "x": 93, "y": 12 }, + { "flags": 4, "matrix": [1, 4], "x": 84, "y": 19 }, + { "flags": 4, "matrix": [1, 3], "x": 65, "y": 19 }, + { "flags": 4, "matrix": [1, 2], "x": 46, "y": 19 }, + { "flags": 4, "matrix": [1, 1], "x": 28, "y": 19 }, + { "flags": 2, "x": 18, "y": 12 }, + { "flags": 4, "matrix": [1, 0], "x": 9, "y": 19 }, + + { "flags": 4, "matrix": [2, 0], "x": 9, "y": 32 }, + { "flags": 4, "matrix": [2, 1], "x": 28, "y": 32 }, + { "flags": 4, "matrix": [2, 2], "x": 46, "y": 32 }, + { "flags": 4, "matrix": [2, 3], "x": 65, "y": 32 }, + { "flags": 4, "matrix": [2, 4], "x": 84, "y": 32 }, + { "flags": 4, "matrix": [2, 5], "x": 102, "y": 32 }, + + { "flags": 4, "matrix": [3, 5], "x": 102, "y": 44 }, + { "flags": 2, "x": 93, "y": 40 }, + { "flags": 4, "matrix": [3, 4], "x": 84, "y": 44 }, + { "flags": 4, "matrix": [3, 3], "x": 65, "y": 44 }, + { "flags": 2, "x": 56, "y": 44 }, + { "flags": 4, "matrix": [3, 2], "x": 46, "y": 44 }, + { "flags": 4, "matrix": [3, 1], "x": 28, "y": 44 }, + { "flags": 2, "x": 18, "y": 44 }, + { "flags": 4, "matrix": [3, 0], "x": 9, "y": 44 }, + + { "flags": 4, "matrix": [4, 0], "x": 9, "y": 57 }, + { "flags": 4, "matrix": [4, 1], "x": 28, "y": 57 }, + { "flags": 4, "matrix": [4, 2], "x": 46, "y": 57 }, + { "flags": 4, "matrix": [4, 3], "x": 65, "y": 57 }, + { "flags": 4, "matrix": [4, 4], "x": 81, "y": 57 }, + { "flags": 4, "matrix": [4, 5], "x": 105, "y": 57 }, + + { "flags": 4, "matrix": [5, 0], "x": 121, "y": 6 }, + { "flags": 4, "matrix": [5, 1], "x": 140, "y": 6 }, + { "flags": 4, "matrix": [5, 2], "x": 158, "y": 6 }, + { "flags": 2, "x": 168, "y": 6 }, + { "flags": 4, "matrix": [5, 3], "x": 177, "y": 6 }, + { "flags": 4, "matrix": [5, 4], "x": 196, "y": 6 }, + { "flags": 4, "matrix": [5, 5], "x": 214, "y": 6 }, + + { "flags": 4, "matrix": [6, 5], "x": 214, "y": 19 }, + { "flags": 2, "x": 205, "y": 12 }, + { "flags": 4, "matrix": [6, 4], "x": 196, "y": 19 }, + { "flags": 4, "matrix": [6, 3], "x": 177, "y": 19 }, + { "flags": 4, "matrix": [6, 2], "x": 158, "y": 19 }, + { "flags": 4, "matrix": [6, 1], "x": 140, "y": 19 }, + { "flags": 2, "x": 130, "y": 12 }, + { "flags": 4, "matrix": [6, 0], "x": 121, "y": 19 }, + + { "flags": 4, "matrix": [7, 0], "x": 121, "y": 32 }, + { "flags": 4, "matrix": [7, 1], "x": 140, "y": 32 }, + { "flags": 4, "matrix": [7, 2], "x": 158, "y": 32 }, + { "flags": 4, "matrix": [7, 3], "x": 177, "y": 32 }, + { "flags": 4, "matrix": [7, 4], "x": 196, "y": 32 }, + { "flags": 4, "matrix": [7, 5], "x": 214, "y": 32 }, + + { "flags": 4, "matrix": [8, 5], "x": 214, "y": 44 }, + { "flags": 2, "x": 205, "y": 44 }, + { "flags": 4, "matrix": [8, 4], "x": 196, "y": 44 }, + { "flags": 4, "matrix": [8, 3], "x": 177, "y": 44 }, + { "flags": 2, "x": 168, "y": 44 }, + { "flags": 4, "matrix": [8, 2], "x": 158, "y": 44 }, + { "flags": 4, "matrix": [8, 1], "x": 140, "y": 44 }, + { "flags": 2, "x": 130, "y": 40 }, + { "flags": 4, "matrix": [8, 0], "x": 121, "y": 44 }, + + { "flags": 4, "matrix": [9, 0], "x": 121, "y": 57 }, + { "flags": 4, "matrix": [9, 1], "x": 140, "y": 57 }, + { "flags": 4, "matrix": [9, 2], "x": 158, "y": 57 }, + { "flags": 4, "matrix": [9, 3], "x": 177, "y": 57 }, + { "flags": 4, "matrix": [9, 4], "x": 196, "y": 57 }, + { "flags": 4, "matrix": [9, 5], "x": 214, "y": 57 } + ], + "sleep": true + } +} diff --git a/keyboards/keebio/nyquist/rev5/rules.mk b/keyboards/keebio/nyquist/rev5/rules.mk new file mode 100644 index 000000000000..161ec22b16e2 --- /dev/null +++ b/keyboards/keebio/nyquist/rev5/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = vendor From be7728ae581aa59c6a8ba5ef370601edfd9f799a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 29 Jun 2024 03:36:28 +0100 Subject: [PATCH 0084/1205] Relocate m256wh VIA logic (#24006) --- keyboards/mode/m256wh/config.h | 2 - keyboards/mode/m256wh/keymaps/via/config.h | 20 +++ keyboards/mode/m256wh/keymaps/via/keymap.c | 132 ++++++++++++++++++ keyboards/mode/m256wh/m256wh.c | 154 --------------------- 4 files changed, 152 insertions(+), 156 deletions(-) create mode 100644 keyboards/mode/m256wh/keymaps/via/config.h delete mode 100644 keyboards/mode/m256wh/m256wh.c diff --git a/keyboards/mode/m256wh/config.h b/keyboards/mode/m256wh/config.h index 06f1658ea524..5bb3d6d1f38a 100644 --- a/keyboards/mode/m256wh/config.h +++ b/keyboards/mode/m256wh/config.h @@ -23,5 +23,3 @@ along with this program. If not, see . #define WS2812_PWM_PAL_MODE 1 #define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 #define WS2812_PWM_DMA_CHANNEL 6 - -#define EECONFIG_KB_DATA_SIZE (1) diff --git a/keyboards/mode/m256wh/keymaps/via/config.h b/keyboards/mode/m256wh/keymaps/via/config.h new file mode 100644 index 000000000000..31dfebf49af1 --- /dev/null +++ b/keyboards/mode/m256wh/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2022 Gondolindrim + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define EECONFIG_USER_DATA_SIZE (1) diff --git a/keyboards/mode/m256wh/keymaps/via/keymap.c b/keyboards/mode/m256wh/keymaps/via/keymap.c index a81d66345068..6adb5cfffa4e 100644 --- a/keyboards/mode/m256wh/keymaps/via/keymap.c +++ b/keyboards/mode/m256wh/keymaps/via/keymap.c @@ -31,3 +31,135 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; + +bool is_second_rgb_row_active; + +enum via_secondrow_enable { + id_is_second_rgb_row_active = 0 +}; + +// Sets the second RGB row on or off; done by setting effect range. +void set_second_rgb_row(bool is_active) { + rgblight_disable_noeeprom(); + switch (is_active) + { + case true: + { + rgblight_set_effect_range(0,30); + break; + } + case false: + { + rgblight_set_effect_range(0,15); + break; + } + } + rgblight_enable_noeeprom(); +} + +// At the keyboard start, retrieves PMEM stored configs +void keyboard_post_init_user(void) { + rgblight_disable_noeeprom(); + wait_ms(20); + eeconfig_read_user_datablock(&is_second_rgb_row_active); + set_second_rgb_row(is_second_rgb_row_active); + rgblight_reload_from_eeprom(); + rgblight_set(); +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + // rgblight_disable(); // Enable RGB by default + // Define the defualt value and write it to EEPROM + is_second_rgb_row_active = true; + set_second_rgb_row(is_second_rgb_row_active); + eeconfig_update_user_datablock(&is_second_rgb_row_active); + + // Disable rgblight by default on EEPROM initialization + rgblight_disable(); +} + +void secondrow_config_set_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_is_second_rgb_row_active: + { + is_second_rgb_row_active = (bool) *value_data; + break; + } + default: + { + is_second_rgb_row_active = true; + } + } + set_second_rgb_row(is_second_rgb_row_active); +} + +void secondrow_config_get_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_is_second_rgb_row_active: + { + *value_data = is_second_rgb_row_active; + break; + } + default: + { + *value_data = false; + } + } +} + +void secondrow_config_save(void) +{ + eeconfig_update_user_datablock(&is_second_rgb_row_active); +} + +void via_custom_value_command_kb(uint8_t *data, uint8_t length) { + // data = [ command_id, channel_id, value_id, value_data ] + uint8_t *command_id = &(data[0]); + uint8_t *channel_id = &(data[1]); + uint8_t *value_id_and_data = &(data[2]); + + if ( *channel_id == id_custom_channel ) { + switch ( *command_id ) + { + case id_custom_set_value: + { + secondrow_config_set_value(value_id_and_data); + break; + } + case id_custom_get_value: + { + secondrow_config_get_value(value_id_and_data); + break; + } + case id_custom_save: + { + secondrow_config_save(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + return; + } + + // Return the unhandled state + *command_id = id_unhandled; + + // DO NOT call raw_hid_send(data,length) here, let caller do this +} diff --git a/keyboards/mode/m256wh/m256wh.c b/keyboards/mode/m256wh/m256wh.c deleted file mode 100644 index cec427f329cb..000000000000 --- a/keyboards/mode/m256wh/m256wh.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright 2022 Gondolindrim - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -#ifdef VIA_ENABLE -bool is_second_rgb_row_active; -enum via_secondrow_enable { - id_is_second_rgb_row_active = 0 -}; - -// Sets the second RGB row on or off; done by setting effect range. -void set_second_rgb_row(bool is_active) { - rgblight_disable_noeeprom(); - switch (is_active) - { - case true: - { - rgblight_set_effect_range(0,30); - break; - } - case false: - { - rgblight_set_effect_range(0,15); - break; - } - } - rgblight_enable_noeeprom(); -} - -// At the keyboard start, retrieves PMEM stored configs -void keyboard_post_init_kb(void) { - rgblight_disable_noeeprom(); - wait_ms(20); - eeconfig_read_kb_datablock(&is_second_rgb_row_active); - set_second_rgb_row(is_second_rgb_row_active); - rgblight_reload_from_eeprom(); - rgblight_set(); -} - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - // rgblight_disable(); // Enable RGB by default - // Define the defualt value and write it to EEPROM - is_second_rgb_row_active = true; - set_second_rgb_row(is_second_rgb_row_active); - eeconfig_update_kb_datablock(&is_second_rgb_row_active); - - // Disable rgblight by default on EEPROM initialization - rgblight_disable(); - - // Run user code if any - eeconfig_init_user(); -} - -void secondrow_config_set_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_is_second_rgb_row_active: - { - is_second_rgb_row_active = (bool) *value_data; - break; - } - default: - { - is_second_rgb_row_active = true; - } - } - set_second_rgb_row(is_second_rgb_row_active); -} - -void secondrow_config_get_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_is_second_rgb_row_active: - { - *value_data = is_second_rgb_row_active; - break; - } - default: - { - *value_data = false; - } - } -} - -void secondrow_config_save(void) -{ - - eeconfig_update_kb_datablock(&is_second_rgb_row_active); -} - -void via_custom_value_command_kb(uint8_t *data, uint8_t length) { - // data = [ command_id, channel_id, value_id, value_data ] - uint8_t *command_id = &(data[0]); - uint8_t *channel_id = &(data[1]); - uint8_t *value_id_and_data = &(data[2]); - - if ( *channel_id == id_custom_channel ) { - switch ( *command_id ) - { - case id_custom_set_value: - { - secondrow_config_set_value(value_id_and_data); - break; - } - case id_custom_get_value: - { - secondrow_config_get_value(value_id_and_data); - break; - } - case id_custom_save: - { - secondrow_config_save(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - return; - } - - // Return the unhandled state - *command_id = id_unhandled; - - // DO NOT call raw_hid_send(data,length) here, let caller do this -} -#endif From cd374b1500b6d581c133f18d45a4a774d9e0f313 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 29 Jun 2024 13:07:42 +1000 Subject: [PATCH 0085/1205] `clueboard/card`: Swap layout and alias (#24007) --- keyboards/clueboard/card/keyboard.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/clueboard/card/keyboard.json b/keyboards/clueboard/card/keyboard.json index 106b6f823da3..0425819ed7a4 100644 --- a/keyboards/clueboard/card/keyboard.json +++ b/keyboards/clueboard/card/keyboard.json @@ -43,10 +43,10 @@ "levels": 6 }, "layout_aliases": { - "LAYOUT": "LAYOUT_all" + "LAYOUT_all": "LAYOUT" }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label": "ON/OFF", "matrix": [0, 0], "x": 0, "y": 0}, {"label": "SAT+", "matrix": [0, 1], "x": 4, "y": 0}, From 9ca1f35333e3fef675096c3ba6d149f9164af2e0 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 29 Jun 2024 04:16:52 +0100 Subject: [PATCH 0086/1205] Relocate winry315 VIA logic (#24008) --- keyboards/winry/winry315/keymaps/via/keymap.c | 5 +++++ keyboards/winry/winry315/winry315.c | 12 ++---------- keyboards/winry/winry315/winry315.h | 14 ++++++-------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/keyboards/winry/winry315/keymaps/via/keymap.c b/keyboards/winry/winry315/keymaps/via/keymap.c index 0641fbfd03ea..4585f46fb6ce 100644 --- a/keyboards/winry/winry315/keymaps/via/keymap.c +++ b/keyboards/winry/winry315/keymaps/via/keymap.c @@ -37,3 +37,8 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [2 ... 7] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) } }; #endif + +// The enum values are assumed to match the layout option values used by VIA. +void via_set_layout_options_kb(uint32_t value) { + winry315_set_orientation(value & 0x03); +} diff --git a/keyboards/winry/winry315/winry315.c b/keyboards/winry/winry315/winry315.c index e7901a2e0046..03621d3e3fd9 100644 --- a/keyboards/winry/winry315/winry315.c +++ b/keyboards/winry/winry315/winry315.c @@ -3,13 +3,11 @@ #include "winry315.h" -#include "via.h" - #if !defined(WINRY315_DEFAULT_ORIENTATION) # define WINRY315_DEFAULT_ORIENTATION WINRY315_ORIENTATION_TOP #endif -#if !defined(VIA_ENABLE) && defined(ENCODER_ENABLE) +#if defined(ENCODER_ENABLE) && !defined(ENCODER_MAP_ENABLE) # ifndef MEDIA_KEY_DELAY # define MEDIA_KEY_DELAY 10 # endif @@ -41,7 +39,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } return true; } -#endif // !defined(VIA_ENABLE) && defined(ENCODER_ENABLE) +#endif // defined(ENCODER_ENABLE) && !defined(ENCODER_MAP_ENABLE) #if defined(RGB_MATRIX_ENABLE) @@ -200,9 +198,3 @@ void winry315_set_orientation(uint8_t orientation) { } #endif // defined(RGB_MATRIX_ENABLE) } - -#if defined(VIA_ENABLE) -void via_set_layout_options_kb(uint32_t value) { - winry315_set_orientation(value & 0x03); -} -#endif // defined(VIA_ENABLE) diff --git a/keyboards/winry/winry315/winry315.h b/keyboards/winry/winry315/winry315.h index 8129c9d6e0f7..ea7b4120e240 100644 --- a/keyboards/winry/winry315/winry315.h +++ b/keyboards/winry/winry315/winry315.h @@ -5,8 +5,7 @@ #include "quantum.h" -// Supported orientations of the board. The enum values must match the layout -// option values used by VIA. +// Supported orientations of the board. enum winry315_orientation { WINRY315_ORIENTATION_TOP, // Encoders at the top side (default) WINRY315_ORIENTATION_LEFT, // Encoders at the left side @@ -17,10 +16,9 @@ enum winry315_orientation { // Set the orientation of the board (changes the RGB Matrix effect behavior to // match the new orientation). // -// This function is intended to be used in the `via` keymap, where the board -// orientation is configured dynamically using a VIA layout option. If you are -// making a custom keymap for one specific orientation, it is better to set the -// orientation in config.h (e.g., `#define WINRY315_DEFAULT_ORIENTATION -// WINRY315_ORIENTATION_LEFT`) instead of adding custom code that calls this -// function. +// This function is intended to be used to configure the orientation +// dynamically. If you are making a custom keymap for one specific orientation, +// it is better to set the orientation in config.h +// (e.g., `#define WINRY315_DEFAULT_ORIENTATION WINRY315_ORIENTATION_LEFT`) +// instead of adding custom code that calls this function. void winry315_set_orientation(uint8_t orientation); From 7bc53b8baad73c05d9587eefd3a215c06d4de9a5 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 29 Jun 2024 04:20:08 +0100 Subject: [PATCH 0087/1205] Relocate m256ws VIA logic (#24009) --- keyboards/mode/m256ws/config.h | 2 - keyboards/mode/m256ws/keymaps/via/config.h | 20 +++ keyboards/mode/m256ws/keymaps/via/keymap.c | 132 ++++++++++++++++++ keyboards/mode/m256ws/m256ws.c | 153 --------------------- 4 files changed, 152 insertions(+), 155 deletions(-) create mode 100644 keyboards/mode/m256ws/keymaps/via/config.h delete mode 100644 keyboards/mode/m256ws/m256ws.c diff --git a/keyboards/mode/m256ws/config.h b/keyboards/mode/m256ws/config.h index 06f1658ea524..5bb3d6d1f38a 100644 --- a/keyboards/mode/m256ws/config.h +++ b/keyboards/mode/m256ws/config.h @@ -23,5 +23,3 @@ along with this program. If not, see . #define WS2812_PWM_PAL_MODE 1 #define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 #define WS2812_PWM_DMA_CHANNEL 6 - -#define EECONFIG_KB_DATA_SIZE (1) diff --git a/keyboards/mode/m256ws/keymaps/via/config.h b/keyboards/mode/m256ws/keymaps/via/config.h new file mode 100644 index 000000000000..31dfebf49af1 --- /dev/null +++ b/keyboards/mode/m256ws/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2022 Gondolindrim + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define EECONFIG_USER_DATA_SIZE (1) diff --git a/keyboards/mode/m256ws/keymaps/via/keymap.c b/keyboards/mode/m256ws/keymaps/via/keymap.c index ab77f7af20ef..6766852f78d0 100644 --- a/keyboards/mode/m256ws/keymaps/via/keymap.c +++ b/keyboards/mode/m256ws/keymaps/via/keymap.c @@ -31,3 +31,135 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS ) }; + +bool is_second_rgb_row_active; + +enum via_secondrow_enable { + id_is_second_rgb_row_active = 0 +}; + +// Sets the second RGB row on or off; done by setting effect range. +void set_second_rgb_row(bool is_active) { + rgblight_disable_noeeprom(); + switch (is_active) + { + case true: + { + rgblight_set_effect_range(0,30); + break; + } + case false: + { + rgblight_set_effect_range(0,15); + break; + } + } + rgblight_enable_noeeprom(); +} + +// At the keyboard start, retrieves PMEM stored configs +void keyboard_post_init_user(void) { + rgblight_disable_noeeprom(); + wait_ms(20); + eeconfig_read_user_datablock(&is_second_rgb_row_active); + set_second_rgb_row(is_second_rgb_row_active); + rgblight_reload_from_eeprom(); + rgblight_set(); +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + // rgblight_disable(); // Enable RGB by default + // Define the defualt value and write it to EEPROM + is_second_rgb_row_active = true; + set_second_rgb_row(is_second_rgb_row_active); + eeconfig_update_user_datablock(&is_second_rgb_row_active); + + // Disable rgblight by default on EEPROM initialization + rgblight_disable(); +} + +void secondrow_config_set_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_is_second_rgb_row_active: + { + is_second_rgb_row_active = (bool) *value_data; + break; + } + default: + { + is_second_rgb_row_active = true; + } + } + set_second_rgb_row(is_second_rgb_row_active); +} + +void secondrow_config_get_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_is_second_rgb_row_active: + { + *value_data = is_second_rgb_row_active; + break; + } + default: + { + *value_data = false; + } + } +} + +void secondrow_config_save(void) +{ + eeconfig_update_user_datablock(&is_second_rgb_row_active); +} + +void via_custom_value_command_kb(uint8_t *data, uint8_t length) { + // data = [ command_id, channel_id, value_id, value_data ] + uint8_t *command_id = &(data[0]); + uint8_t *channel_id = &(data[1]); + uint8_t *value_id_and_data = &(data[2]); + + if ( *channel_id == id_custom_channel ) { + switch ( *command_id ) + { + case id_custom_set_value: + { + secondrow_config_set_value(value_id_and_data); + break; + } + case id_custom_get_value: + { + secondrow_config_get_value(value_id_and_data); + break; + } + case id_custom_save: + { + secondrow_config_save(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + return; + } + + // Return the unhandled state + *command_id = id_unhandled; + + // DO NOT call raw_hid_send(data,length) here, let caller do this +} diff --git a/keyboards/mode/m256ws/m256ws.c b/keyboards/mode/m256ws/m256ws.c deleted file mode 100644 index 5603de7b01b7..000000000000 --- a/keyboards/mode/m256ws/m256ws.c +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright 2022 Gondolindrim - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "quantum.h" - -#ifdef VIA_ENABLE -bool is_second_rgb_row_active; -enum via_secondrow_enable { - id_is_second_rgb_row_active = 0 -}; - -// Sets the second RGB row on or off; done by setting effect range. -void set_second_rgb_row(bool is_active) { - rgblight_disable_noeeprom(); - switch (is_active) - { - case true: - { - rgblight_set_effect_range(0,30); - break; - } - case false: - { - rgblight_set_effect_range(0,15); - break; - } - } - rgblight_enable_noeeprom(); -} - -// At the keyboard start, retrieves PMEM stored configs -void keyboard_post_init_kb(void) { - rgblight_disable_noeeprom(); - wait_ms(20); - eeconfig_read_kb_datablock(&is_second_rgb_row_active); - set_second_rgb_row(is_second_rgb_row_active); - rgblight_reload_from_eeprom(); - rgblight_set(); -} - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - // rgblight_disable(); // Enable RGB by default - // Define the defualt value and write it to EEPROM - is_second_rgb_row_active = true; - set_second_rgb_row(is_second_rgb_row_active); - eeconfig_update_kb_datablock(&is_second_rgb_row_active); - - // Disable rgblight by default on EEPROM initialization - rgblight_disable(); - - // Run user code, if any - eeconfig_init_user(); -} - -void secondrow_config_set_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_is_second_rgb_row_active: - { - is_second_rgb_row_active = (bool) *value_data; - break; - } - default: - { - is_second_rgb_row_active = true; - } - } - set_second_rgb_row(is_second_rgb_row_active); -} - -void secondrow_config_get_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_is_second_rgb_row_active: - { - *value_data = is_second_rgb_row_active; - break; - } - default: - { - *value_data = false; - } - } -} - -void secondrow_config_save(void) -{ - - eeconfig_update_kb_datablock(&is_second_rgb_row_active); -} - -void via_custom_value_command_kb(uint8_t *data, uint8_t length) { - // data = [ command_id, channel_id, value_id, value_data ] - uint8_t *command_id = &(data[0]); - uint8_t *channel_id = &(data[1]); - uint8_t *value_id_and_data = &(data[2]); - - if ( *channel_id == id_custom_channel ) { - switch ( *command_id ) - { - case id_custom_set_value: - { - secondrow_config_set_value(value_id_and_data); - break; - } - case id_custom_get_value: - { - secondrow_config_get_value(value_id_and_data); - break; - } - case id_custom_save: - { - secondrow_config_save(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - return; - } - - // Return the unhandled state - *command_id = id_unhandled; - -} -#endif // VIA ENABLE From af8fe44e0fc3dc461a9fdf85c601c012b5a517eb Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 29 Jun 2024 14:50:08 +1000 Subject: [PATCH 0088/1205] `atreus`: misc cleanups (#24010) --- keyboards/atreus/astar_mirrored/config.h | 19 --- keyboards/atreus/atreus.h | 51 -------- keyboards/atreus/feather/config.h | 19 --- keyboards/atreus/info.json | 142 +++++++++++++++------- keyboards/atreus/keymaps/default/keymap.c | 6 +- keyboards/atreus/keymaps/via/keymap.c | 8 +- keyboards/atreus/keymaps/workman/config.h | 1 - keyboards/atreus/keymaps/workman/keymap.c | 6 +- keyboards/atreus/promicro/keyboard.json | 3 +- 9 files changed, 110 insertions(+), 145 deletions(-) delete mode 100644 keyboards/atreus/astar_mirrored/config.h delete mode 100644 keyboards/atreus/atreus.h delete mode 100644 keyboards/atreus/feather/config.h diff --git a/keyboards/atreus/astar_mirrored/config.h b/keyboards/atreus/astar_mirrored/config.h deleted file mode 100644 index 3bd163dec358..000000000000 --- a/keyboards/atreus/astar_mirrored/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define PCBDOWN 1 diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h deleted file mode 100644 index 2a966b86414c..000000000000 --- a/keyboards/atreus/atreus.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#include "quantum.h" -#define ___ KC_NO - -// This a shortcut to help you visually see your layout. -// The first section contains all of the arguments. -// The second converts the arguments into a two-dimensional array. -// In the PCBDOWN case we need to swap the middle two keys: k35 and k36. -#if defined(PCBDOWN) -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \ - { k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \ - { k20, k21, k22, k23, k24, k36, k25, k26, k27, k28, k29 }, \ - { k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b } \ -} -#else -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, ___, k05, k06, k07, k08, k09 }, \ - { k10, k11, k12, k13, k14, ___, k15, k16, k17, k18, k19 }, \ - { k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \ - { k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \ -} -#endif diff --git a/keyboards/atreus/feather/config.h b/keyboards/atreus/feather/config.h deleted file mode 100644 index 505296a5056a..000000000000 --- a/keyboards/atreus/feather/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define OUTPUT_AUTO_ENABLE diff --git a/keyboards/atreus/info.json b/keyboards/atreus/info.json index a0f592105f10..1a33591ab564 100644 --- a/keyboards/atreus/info.json +++ b/keyboards/atreus/info.json @@ -23,58 +23,114 @@ "resync": true } }, + "layout_aliases": { + "LAYOUT": "LAYOUT_pcb_up" + }, "layouts": { - "LAYOUT": { + "LAYOUT_pcb_up": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.6}, + {"matrix": [0, 1], "x": 1, "y": 0.35}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0.35}, + {"matrix": [0, 4], "x": 4, "y": 0.7}, + + {"matrix": [0, 6], "x": 8, "y": 0.7}, + {"matrix": [0, 7], "x": 9, "y": 0.35}, + {"matrix": [0, 8], "x": 10, "y": 0}, + {"matrix": [0, 9], "x": 11, "y": 0.35}, + {"matrix": [0, 10], "x": 12, "y": 0.6}, + + {"matrix": [1, 0], "x": 0, "y": 1.6}, + {"matrix": [1, 1], "x": 1, "y": 1.35}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1.35}, + {"matrix": [1, 4], "x": 4, "y": 1.7}, + + {"matrix": [1, 6], "x": 8, "y": 1.7}, + {"matrix": [1, 7], "x": 9, "y": 1.35}, + {"matrix": [1, 8], "x": 10, "y": 1}, + {"matrix": [1, 9], "x": 11, "y": 1.35}, + {"matrix": [1, 10], "x": 12, "y": 1.6}, + + {"matrix": [2, 0], "x": 0, "y": 2.6}, + {"matrix": [2, 1], "x": 1, "y": 2.35}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2.35}, + {"matrix": [2, 4], "x": 4, "y": 2.7}, + + {"matrix": [2, 6], "x": 8, "y": 2.7}, + {"matrix": [2, 7], "x": 9, "y": 2.35}, + {"matrix": [2, 8], "x": 10, "y": 2}, + {"matrix": [2, 9], "x": 11, "y": 2.35}, + {"matrix": [2, 10], "x": 12, "y": 2.6}, + + {"matrix": [3, 0], "x": 0, "y": 3.6}, + {"matrix": [3, 1], "x": 1, "y": 3.35}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3.35}, + {"matrix": [3, 4], "x": 4, "y": 3.7}, + {"matrix": [2, 5], "x": 5, "y": 2.95, "h": 1.5}, + + {"matrix": [3, 5], "x": 7, "y": 2.95, "h": 1.5}, + {"matrix": [3, 6], "x": 8, "y": 3.7}, + {"matrix": [3, 7], "x": 9, "y": 3.35}, + {"matrix": [3, 8], "x": 10, "y": 3}, + {"matrix": [3, 9], "x": 11, "y": 3.35}, + {"matrix": [3, 10], "x": 12, "y": 3.6} + ] + }, + "LAYOUT_pcb_down": { "layout": [ - {"x": 0, "y": 0.6}, - {"x": 1, "y": 0.35}, - {"x": 2, "y": 0}, - {"x": 3, "y": 0.35}, - {"x": 4, "y": 0.7}, + {"matrix": [0, 0], "x": 0, "y": 0.6}, + {"matrix": [0, 1], "x": 1, "y": 0.35}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0.35}, + {"matrix": [0, 4], "x": 4, "y": 0.7}, - {"x": 8, "y": 0.7}, - {"x": 9, "y": 0.35}, - {"x": 10, "y": 0}, - {"x": 11, "y": 0.35}, - {"x": 12, "y": 0.6}, + {"matrix": [0, 6], "x": 8, "y": 0.7}, + {"matrix": [0, 7], "x": 9, "y": 0.35}, + {"matrix": [0, 8], "x": 10, "y": 0}, + {"matrix": [0, 9], "x": 11, "y": 0.35}, + {"matrix": [0, 10], "x": 12, "y": 0.6}, - {"x": 0, "y": 1.6}, - {"x": 1, "y": 1.35}, - {"x": 2, "y": 1}, - {"x": 3, "y": 1.35}, - {"x": 4, "y": 1.7}, + {"matrix": [1, 0], "x": 0, "y": 1.6}, + {"matrix": [1, 1], "x": 1, "y": 1.35}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1.35}, + {"matrix": [1, 4], "x": 4, "y": 1.7}, - {"x": 8, "y": 1.7}, - {"x": 9, "y": 1.35}, - {"x": 10, "y": 1}, - {"x": 11, "y": 1.35}, - {"x": 12, "y": 1.6}, + {"matrix": [1, 6], "x": 8, "y": 1.7}, + {"matrix": [1, 7], "x": 9, "y": 1.35}, + {"matrix": [1, 8], "x": 10, "y": 1}, + {"matrix": [1, 9], "x": 11, "y": 1.35}, + {"matrix": [1, 10], "x": 12, "y": 1.6}, - {"x": 0, "y": 2.6}, - {"x": 1, "y": 2.35}, - {"x": 2, "y": 2}, - {"x": 3, "y": 2.35}, - {"x": 4, "y": 2.7}, + {"matrix": [2, 0], "x": 0, "y": 2.6}, + {"matrix": [2, 1], "x": 1, "y": 2.35}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2.35}, + {"matrix": [2, 4], "x": 4, "y": 2.7}, - {"x": 8, "y": 2.7}, - {"x": 9, "y": 2.35}, - {"x": 10, "y": 2}, - {"x": 11, "y": 2.35}, - {"x": 12, "y": 2.6}, + {"matrix": [2, 6], "x": 8, "y": 2.7}, + {"matrix": [2, 7], "x": 9, "y": 2.35}, + {"matrix": [2, 8], "x": 10, "y": 2}, + {"matrix": [2, 9], "x": 11, "y": 2.35}, + {"matrix": [2, 10], "x": 12, "y": 2.6}, - {"x": 0, "y": 3.6}, - {"x": 1, "y": 3.35}, - {"x": 2, "y": 3}, - {"x": 3, "y": 3.35}, - {"x": 4, "y": 3.7}, - {"x": 5, "y": 2.95, "h": 1.5}, + {"matrix": [3, 0], "x": 0, "y": 3.6}, + {"matrix": [3, 1], "x": 1, "y": 3.35}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3.35}, + {"matrix": [3, 4], "x": 4, "y": 3.7}, + {"matrix": [3, 5], "x": 5, "y": 2.95, "h": 1.5}, - {"x": 7, "y": 2.95, "h": 1.5}, - {"x": 8, "y": 3.7}, - {"x": 9, "y": 3.35}, - {"x": 10, "y": 3}, - {"x": 11, "y": 3.35}, - {"x": 12, "y": 3.6} + {"matrix": [2, 5], "x": 7, "y": 2.95, "h": 1.5}, + {"matrix": [3, 6], "x": 8, "y": 3.7}, + {"matrix": [3, 7], "x": 9, "y": 3.35}, + {"matrix": [3, 8], "x": 10, "y": 3}, + {"matrix": [3, 9], "x": 11, "y": 3.35}, + {"matrix": [3, 10], "x": 12, "y": 3.6} ] } } diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index ca1333230c97..e4588105372b 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -12,7 +12,7 @@ #define _LW 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = LAYOUT( /* Qwerty */ + [_QW] = LAYOUT_pcb_up( /* Qwerty */ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * [ ] ( ) & || ` 1 2 3 \ * lower insert super shift bksp ctrl || alt space fn . 0 = */ - [_RS] = LAYOUT( /* [> RAISE <] */ + [_RS] = LAYOUT_pcb_up( /* [> RAISE <] */ KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * volup reset || F1 F2 F3 F12 * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause */ - [_LW] = LAYOUT( /* [> LOWER <] */ + [_LW] = LAYOUT_pcb_up( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, QK_BOOT, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , diff --git a/keyboards/atreus/keymaps/via/keymap.c b/keyboards/atreus/keymaps/via/keymap.c index 52740c5bad9c..e6093d7ac108 100644 --- a/keyboards/atreus/keymaps/via/keymap.c +++ b/keyboards/atreus/keymaps/via/keymap.c @@ -27,7 +27,7 @@ enum custom_layers { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = LAYOUT( /* Qwerty */ + [_QW] = LAYOUT_pcb_up( /* Qwerty */ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * [ ] ( ) & || ` 1 2 3 \ * lower insert super shift bksp ctrl || alt space fn . 0 = */ - [_RS] = LAYOUT( /* [> RAISE <] */ + [_RS] = LAYOUT_pcb_up( /* [> RAISE <] */ KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , @@ -51,13 +51,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * volup reset || F1 F2 F3 F12 * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause */ - [_LW] = LAYOUT( /* [> LOWER <] */ + [_LW] = LAYOUT_pcb_up( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, QK_BOOT, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SCRL, KC_PAUS ), - [_EM] = LAYOUT( /* [> EMPTY <] */ + [_EM] = LAYOUT_pcb_up( /* [> EMPTY <] */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , diff --git a/keyboards/atreus/keymaps/workman/config.h b/keyboards/atreus/keymaps/workman/config.h index cf0b5e2ac51e..f75e442456ba 100644 --- a/keyboards/atreus/keymaps/workman/config.h +++ b/keyboards/atreus/keymaps/workman/config.h @@ -1,3 +1,2 @@ #define TAPPING_TOGGLE 1 #define ONESHOT_TAP_TOGGLE 1 -#define PCBDOWN 1 diff --git a/keyboards/atreus/keymaps/workman/keymap.c b/keyboards/atreus/keymaps/workman/keymap.c index c0633f6362be..e8b5b6b4e36f 100644 --- a/keyboards/atreus/keymaps/workman/keymap.c +++ b/keyboards/atreus/keymaps/workman/keymap.c @@ -25,7 +25,7 @@ enum custom_keycodes { */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = LAYOUT( /* Workman */ + [_QW] = LAYOUT_pcb_down( /* Workman */ KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * menu caps < > del || _ 0 = */ - [_RS] = LAYOUT( /* [> RAISE <] */ + [_RS] = LAYOUT_pcb_down( /* [> RAISE <] */ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_7, KC_8, KC_9, KC_ASTR, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOT, KC_4, KC_5, KC_6, KC_PLUS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * || – ¨ reset */ - [_LW] = LAYOUT( /* [> LOWER <] */ + [_LW] = LAYOUT_pcb_down( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_F11, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_F12, diff --git a/keyboards/atreus/promicro/keyboard.json b/keyboards/atreus/promicro/keyboard.json index e614b4e2a0a8..10c0ca1b22a6 100644 --- a/keyboards/atreus/promicro/keyboard.json +++ b/keyboards/atreus/promicro/keyboard.json @@ -4,6 +4,5 @@ "rows": ["F4", "B2", "B4", "B5"] }, "diode_direction": "COL2ROW", - "processor": "atmega32u4", - "bootloader": "caterina" + "development_board": "promicro" } From 086e8e938e415551d4f2e97557e8e9a38cd52302 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 29 Jun 2024 16:00:05 +1000 Subject: [PATCH 0089/1205] `tzarc/djinn`: adjust layout name (#24012) --- keyboards/tzarc/djinn/info.json | 5 ++++- keyboards/tzarc/djinn/keymaps/default/keymap.c | 8 ++++---- keyboards/tzarc/djinn/keymaps/via/keymap.c | 8 ++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/keyboards/tzarc/djinn/info.json b/keyboards/tzarc/djinn/info.json index be0710ebef4b..b173a18de134 100644 --- a/keyboards/tzarc/djinn/info.json +++ b/keyboards/tzarc/djinn/info.json @@ -70,8 +70,11 @@ {"pin_a": "C14", "pin_b": "C15", "resolution": 2} ] }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "label": "Esc", "x": 0, "y": 0.88}, {"matrix": [0, 1], "label": "1", "x": 1, "y": 0.63}, diff --git a/keyboards/tzarc/djinn/keymaps/default/keymap.c b/keyboards/tzarc/djinn/keymaps/default/keymap.c index 626233946c78..972b9c97a674 100644 --- a/keyboards/tzarc/djinn/keymaps/default/keymap.c +++ b/keyboards/tzarc/djinn/keymaps/default/keymap.c @@ -11,7 +11,7 @@ enum { _QWERTY, _LOWER, _RAISE, _ADJUST }; // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_all( + [_QWERTY] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, _______, KC_RIGHT, KC_LEFT, _______, KC_RIGHT, KC_DOWN, KC_DOWN ), - [_LOWER] = LAYOUT_all( + [_LOWER] = LAYOUT( KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), - [_RAISE] = LAYOUT_all( + [_RAISE] = LAYOUT( KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,_______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,KC_LEFT, KC_DOWN, KC_RIGHT,_______, KC_UNDS, KC_NO, KC_NO, KC_EQL, _______, _______, _______, _______, _______, @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), - [_ADJUST] = LAYOUT_all( + [_ADJUST] = LAYOUT( _______, KC_CAPS, KC_NUM, KC_SCRL, _______, _______, _______, _______, _______, _______, _______, DB_TOGG, EE_CLR, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/tzarc/djinn/keymaps/via/keymap.c b/keyboards/tzarc/djinn/keymaps/via/keymap.c index 626233946c78..972b9c97a674 100644 --- a/keyboards/tzarc/djinn/keymaps/via/keymap.c +++ b/keyboards/tzarc/djinn/keymaps/via/keymap.c @@ -11,7 +11,7 @@ enum { _QWERTY, _LOWER, _RAISE, _ADJUST }; // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_all( + [_QWERTY] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, _______, KC_RIGHT, KC_LEFT, _______, KC_RIGHT, KC_DOWN, KC_DOWN ), - [_LOWER] = LAYOUT_all( + [_LOWER] = LAYOUT( KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), - [_RAISE] = LAYOUT_all( + [_RAISE] = LAYOUT( KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,_______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,KC_LEFT, KC_DOWN, KC_RIGHT,_______, KC_UNDS, KC_NO, KC_NO, KC_EQL, _______, _______, _______, _______, _______, @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), - [_ADJUST] = LAYOUT_all( + [_ADJUST] = LAYOUT( _______, KC_CAPS, KC_NUM, KC_SCRL, _______, _______, _______, _______, _______, _______, _______, DB_TOGG, EE_CLR, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, From 2bde8ce2068240531baf79c23b83878bb19ed0a0 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 29 Jun 2024 16:54:52 +1000 Subject: [PATCH 0090/1205] `ez_maker`: adjust layout names (#24015) --- keyboards/ez_maker/directpins/promicro/keyboard.json | 5 ++++- .../ez_maker/directpins/promicro/keymaps/default/keymap.json | 2 +- keyboards/ez_maker/directpins/proton_c/keyboard.json | 5 ++++- .../ez_maker/directpins/proton_c/keymaps/default/keymap.json | 2 +- keyboards/ez_maker/directpins/rp2040/keyboard.json | 5 ++++- .../ez_maker/directpins/rp2040/keymaps/default/keymap.json | 2 +- keyboards/ez_maker/directpins/teensy_2/keyboard.json | 5 ++++- .../ez_maker/directpins/teensy_2/keymaps/default/keymap.json | 2 +- keyboards/ez_maker/directpins/teensy_2pp/keyboard.json | 5 ++++- .../directpins/teensy_2pp/keymaps/default/keymap.json | 2 +- keyboards/ez_maker/directpins/teensy_32/keyboard.json | 5 ++++- .../directpins/teensy_32/keymaps/default/keymap.json | 2 +- keyboards/ez_maker/directpins/teensy_lc/keyboard.json | 5 ++++- .../directpins/teensy_lc/keymaps/default/keymap.json | 2 +- 14 files changed, 35 insertions(+), 14 deletions(-) diff --git a/keyboards/ez_maker/directpins/promicro/keyboard.json b/keyboards/ez_maker/directpins/promicro/keyboard.json index f6170810c7bd..aee1c0b99ffb 100644 --- a/keyboards/ez_maker/directpins/promicro/keyboard.json +++ b/keyboards/ez_maker/directpins/promicro/keyboard.json @@ -27,8 +27,11 @@ "pid": "0x2320", "vid": "0xFEED" }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label": "D3", "matrix": [0, 0], "x": 0, "y": 0}, {"label": "D2", "matrix": [1, 0], "x": 0, "y": 1}, diff --git a/keyboards/ez_maker/directpins/promicro/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/promicro/keymaps/default/keymap.json index f39a5802b9e5..cf1d83c070fe 100644 --- a/keyboards/ez_maker/directpins/promicro/keymaps/default/keymap.json +++ b/keyboards/ez_maker/directpins/promicro/keymaps/default/keymap.json @@ -1,7 +1,7 @@ { "keyboard": "ez_maker/directpins/promicro", "keymap": "default", - "layout": "LAYOUT_all", + "layout": "LAYOUT", "layers": [ [ "KC_0", diff --git a/keyboards/ez_maker/directpins/proton_c/keyboard.json b/keyboards/ez_maker/directpins/proton_c/keyboard.json index 4a46d4e1791c..8133beabfb9d 100644 --- a/keyboards/ez_maker/directpins/proton_c/keyboard.json +++ b/keyboards/ez_maker/directpins/proton_c/keyboard.json @@ -33,8 +33,11 @@ "pid": "0x2321", "vid": "0xFEED" }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label": "A9", "matrix": [0, 0], "x": 0, "y": 0}, {"label": "A10", "matrix": [1, 0], "x": 0, "y": 1}, diff --git a/keyboards/ez_maker/directpins/proton_c/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/proton_c/keymaps/default/keymap.json index 7af6d4476253..532f56369294 100644 --- a/keyboards/ez_maker/directpins/proton_c/keymaps/default/keymap.json +++ b/keyboards/ez_maker/directpins/proton_c/keymaps/default/keymap.json @@ -1,7 +1,7 @@ { "keyboard": "ez_maker/directpins/proton_c", "keymap": "default", - "layout": "LAYOUT_all", + "layout": "LAYOUT", "layers": [ [ "KC_0", diff --git a/keyboards/ez_maker/directpins/rp2040/keyboard.json b/keyboards/ez_maker/directpins/rp2040/keyboard.json index bfbec888fbd7..f48c737d0f60 100644 --- a/keyboards/ez_maker/directpins/rp2040/keyboard.json +++ b/keyboards/ez_maker/directpins/rp2040/keyboard.json @@ -38,8 +38,11 @@ "pid": "0x2326", "vid": "0xFEED" }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label": "GP0", "matrix": [0, 0], "x": 0, "y": 0}, {"label": "GP1", "matrix": [1, 0], "x": 0, "y": 1}, diff --git a/keyboards/ez_maker/directpins/rp2040/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/rp2040/keymaps/default/keymap.json index 3bae28a36094..7cd6dffb0658 100644 --- a/keyboards/ez_maker/directpins/rp2040/keymaps/default/keymap.json +++ b/keyboards/ez_maker/directpins/rp2040/keymaps/default/keymap.json @@ -1,7 +1,7 @@ { "keyboard": "ez_maker/directpins/rp2040", "keymap": "default", - "layout": "LAYOUT_all", + "layout": "LAYOUT", "layers": [ [ "KC_0", diff --git a/keyboards/ez_maker/directpins/teensy_2/keyboard.json b/keyboards/ez_maker/directpins/teensy_2/keyboard.json index de75c644c7cb..525b90aed074 100644 --- a/keyboards/ez_maker/directpins/teensy_2/keyboard.json +++ b/keyboards/ez_maker/directpins/teensy_2/keyboard.json @@ -30,8 +30,11 @@ "pid": "0x2322", "vid": "0xFEED" }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label": "B0", "matrix": [0, 0], "x": 0, "y": 0}, {"label": "F0", "matrix": [0, 1], "x": 4, "y": 0}, {"label": "B1", "matrix": [1, 0], "x": 0, "y": 1}, {"label": "F1", "matrix": [1, 1], "x": 4, "y": 1}, diff --git a/keyboards/ez_maker/directpins/teensy_2/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/teensy_2/keymaps/default/keymap.json index 9af03008e9a0..63e9ea926c89 100644 --- a/keyboards/ez_maker/directpins/teensy_2/keymaps/default/keymap.json +++ b/keyboards/ez_maker/directpins/teensy_2/keymaps/default/keymap.json @@ -1,7 +1,7 @@ { "keyboard": "ez_maker/directpins/teensy_2", "keymap": "default", - "layout": "LAYOUT_all", + "layout": "LAYOUT", "layers": [ [ "KC_0", "KC_1", diff --git a/keyboards/ez_maker/directpins/teensy_2pp/keyboard.json b/keyboards/ez_maker/directpins/teensy_2pp/keyboard.json index af288ebdbcc3..924cf221ae55 100644 --- a/keyboards/ez_maker/directpins/teensy_2pp/keyboard.json +++ b/keyboards/ez_maker/directpins/teensy_2pp/keyboard.json @@ -37,8 +37,11 @@ "pid": "0x2323", "vid": "0xFEED" }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label": "B7", "matrix": [0, 0], "x": 0, "y": 0}, {"label": "B6", "matrix": [0, 3], "x": 5, "y": 0}, {"label": "D0", "matrix": [1, 0], "x": 0, "y": 1}, {"label": "B5", "matrix": [1, 3], "x": 5, "y": 1}, diff --git a/keyboards/ez_maker/directpins/teensy_2pp/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/teensy_2pp/keymaps/default/keymap.json index 80de4c7ce49c..bbaeee04816d 100644 --- a/keyboards/ez_maker/directpins/teensy_2pp/keymaps/default/keymap.json +++ b/keyboards/ez_maker/directpins/teensy_2pp/keymaps/default/keymap.json @@ -1,7 +1,7 @@ { "keyboard": "ez_maker/directpins/teensy_2pp", "keymap": "default", - "layout": "LAYOUT_all", + "layout": "LAYOUT", "layers": [ [ "KC_0", "KC_1", diff --git a/keyboards/ez_maker/directpins/teensy_32/keyboard.json b/keyboards/ez_maker/directpins/teensy_32/keyboard.json index 917780d3a907..709da9ab4184 100644 --- a/keyboards/ez_maker/directpins/teensy_32/keyboard.json +++ b/keyboards/ez_maker/directpins/teensy_32/keyboard.json @@ -31,8 +31,11 @@ "pid": "0x2324", "vid": "0xFEED" }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label": "0", "matrix": [0, 0], "x": 0, "y": 0}, {"label": "1", "matrix": [1, 0], "x": 0, "y": 1}, diff --git a/keyboards/ez_maker/directpins/teensy_32/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/teensy_32/keymaps/default/keymap.json index 4b289997c3cc..3a5fd6f29e25 100644 --- a/keyboards/ez_maker/directpins/teensy_32/keymaps/default/keymap.json +++ b/keyboards/ez_maker/directpins/teensy_32/keymaps/default/keymap.json @@ -1,7 +1,7 @@ { "keyboard": "ez_maker/directpins/teensy_32", "keymap": "default", - "layout": "LAYOUT_all", + "layout": "LAYOUT", "layers": [ [ "KC_0", diff --git a/keyboards/ez_maker/directpins/teensy_lc/keyboard.json b/keyboards/ez_maker/directpins/teensy_lc/keyboard.json index 53e7ba397414..6fd2b45a991d 100644 --- a/keyboards/ez_maker/directpins/teensy_lc/keyboard.json +++ b/keyboards/ez_maker/directpins/teensy_lc/keyboard.json @@ -31,8 +31,11 @@ "pid": "0x2325", "vid": "0xFEED" }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label": "0", "matrix": [0, 0], "x": 0, "y": 0}, {"label": "1", "matrix": [1, 0], "x": 0, "y": 1}, diff --git a/keyboards/ez_maker/directpins/teensy_lc/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/teensy_lc/keymaps/default/keymap.json index e2f557adf55d..5a6ca52003a3 100644 --- a/keyboards/ez_maker/directpins/teensy_lc/keymaps/default/keymap.json +++ b/keyboards/ez_maker/directpins/teensy_lc/keymaps/default/keymap.json @@ -1,7 +1,7 @@ { "keyboard": "ez_maker/directpins/teensy_lc", "keymap": "default", - "layout": "LAYOUT_all", + "layout": "LAYOUT", "layers": [ [ "KC_0", From 07253bfe4aa2e7a59c6dd88a0d0db951ac0c7add Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 29 Jun 2024 09:33:20 +0100 Subject: [PATCH 0091/1205] Relocate work_louder VIA logic (#24011) --- keyboards/work_louder/rgb_functions.h | 82 ++++++------------- keyboards/work_louder/work_board/config.h | 2 - .../work_board/keymaps/via/config.h | 4 + .../work_board/keymaps/via/keymap.c | 18 ++++ keyboards/work_louder/work_board/work_board.c | 15 ---- 5 files changed, 48 insertions(+), 73 deletions(-) diff --git a/keyboards/work_louder/rgb_functions.h b/keyboards/work_louder/rgb_functions.h index eaef787a2225..20c99021fb0f 100644 --- a/keyboards/work_louder/rgb_functions.h +++ b/keyboards/work_louder/rgb_functions.h @@ -18,62 +18,32 @@ #include "keycodes.h" -#ifndef VIA_ENABLE -# ifndef RGB_MATRIX_TOGGLE -# define RGB_MATRIX_TOGGLE KC_F15 -# endif -# ifndef RGB_MATRIX_MODE_INC -# define RGB_MATRIX_MODE_INC KC_F16 -# endif -# ifndef RGB_MATRIX_MODE_DEC -# define RGB_MATRIX_MODE_DEC KC_F17 -# endif -# ifndef RGB_MATRIX_HUE_INC -# define RGB_MATRIX_HUE_INC KC_F18 -# endif -# ifndef RGB_MATRIX_HUE_DEC -# define RGB_MATRIX_HUE_DEC KC_F19 -# endif -# ifndef RGB_MATRIX_SAT_INC -# define RGB_MATRIX_SAT_INC KC_F20 -# endif -# ifndef RGB_MATRIX_SAT_DEC -# define RGB_MATRIX_SAT_DEC KC_F21 -# endif -# ifndef RGB_MATRIX_VAL_INC -# define RGB_MATRIX_VAL_INC KC_F22 -# endif -# ifndef RGB_MATRIX_VAL_DEC -# define RGB_MATRIX_VAL_DEC KC_F23 -# endif -#else -# ifndef RGB_MATRIX_TOGGLE -# define RGB_MATRIX_TOGGLE QK_KB_0 -# endif -# ifndef RGB_MATRIX_MODE_INC -# define RGB_MATRIX_MODE_INC QK_KB_1 -# endif -# ifndef RGB_MATRIX_MODE_DEC -# define RGB_MATRIX_MODE_DEC QK_KB_2 -# endif -# ifndef RGB_MATRIX_HUE_INC -# define RGB_MATRIX_HUE_INC QK_KB_3 -# endif -# ifndef RGB_MATRIX_HUE_DEC -# define RGB_MATRIX_HUE_DEC QK_KB_4 -# endif -# ifndef RGB_MATRIX_SAT_INC -# define RGB_MATRIX_SAT_INC QK_KB_5 -# endif -# ifndef RGB_MATRIX_SAT_DEC -# define RGB_MATRIX_SAT_DEC QK_KB_6 -# endif -# ifndef RGB_MATRIX_VAL_INC -# define RGB_MATRIX_VAL_INC QK_KB_7 -# endif -# ifndef RGB_MATRIX_VAL_DEC -# define RGB_MATRIX_VAL_DEC QK_KB_8 -# endif +#ifndef RGB_MATRIX_TOGGLE +# define RGB_MATRIX_TOGGLE QK_KB_0 +#endif +#ifndef RGB_MATRIX_MODE_INC +# define RGB_MATRIX_MODE_INC QK_KB_1 +#endif +#ifndef RGB_MATRIX_MODE_DEC +# define RGB_MATRIX_MODE_DEC QK_KB_2 +#endif +#ifndef RGB_MATRIX_HUE_INC +# define RGB_MATRIX_HUE_INC QK_KB_3 +#endif +#ifndef RGB_MATRIX_HUE_DEC +# define RGB_MATRIX_HUE_DEC QK_KB_4 +#endif +#ifndef RGB_MATRIX_SAT_INC +# define RGB_MATRIX_SAT_INC QK_KB_5 +#endif +#ifndef RGB_MATRIX_SAT_DEC +# define RGB_MATRIX_SAT_DEC QK_KB_6 +#endif +#ifndef RGB_MATRIX_VAL_INC +# define RGB_MATRIX_VAL_INC QK_KB_7 +#endif +#ifndef RGB_MATRIX_VAL_DEC +# define RGB_MATRIX_VAL_DEC QK_KB_8 #endif #define R_M_TOG RGB_MATRIX_TOGGLE diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index 2514a63ddece..36dadf6d4e02 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -23,5 +23,3 @@ along with this program. If not, see . #define RGB_MATRIX_LED_COUNT 49 #define RGB_MATRIX_DISABLE_KEYCODES - -#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x1 diff --git a/keyboards/work_louder/work_board/keymaps/via/config.h b/keyboards/work_louder/work_board/keymaps/via/config.h index 7aa3bebe9b8b..716aac11aaf1 100644 --- a/keyboards/work_louder/work_board/keymaps/via/config.h +++ b/keyboards/work_louder/work_board/keymaps/via/config.h @@ -1,6 +1,10 @@ // Copyright 2023 QMK // SPDX-License-Identifier: GPL-2.0-or-later #pragma once + #define NO_ACTION_ONESHOT + #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS #undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x1 diff --git a/keyboards/work_louder/work_board/keymaps/via/keymap.c b/keyboards/work_louder/work_board/keymaps/via/keymap.c index 255ee3ed7891..9ba3dcda4c22 100644 --- a/keyboards/work_louder/work_board/keymaps/via/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/via/keymap.c @@ -214,3 +214,21 @@ void via_custom_value_command_kb(uint8_t *data, uint8_t length) { } *command_id = id_unhandled; } + +bool via_layout_2u = false; + +void via_set_layout_options_kb(uint32_t value) { + via_layout_2u = (bool)value; +} + +#ifdef RGB_MATRIX_ENABLE +bool rgb_matrix_indicators_user(void) { + if (via_layout_2u) { + rgb_matrix_set_color(5, 0, 0, 0); + rgb_matrix_set_color(7, 0, 0, 0); + } else { + rgb_matrix_set_color(6, 0, 0, 0); + } + return false; +} +#endif diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c index ef36b3171f21..b34f31df5cf0 100644 --- a/keyboards/work_louder/work_board/work_board.c +++ b/keyboards/work_louder/work_board/work_board.c @@ -67,27 +67,12 @@ bool oled_task_kb(void) { #endif #ifdef RGB_MATRIX_ENABLE -# ifdef VIA_ENABLE -bool via_layout_2u = false; - -void via_set_layout_options_kb(uint32_t value) { via_layout_2u = (bool)value; } -# endif // VIA_ENABLE - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; } -# ifdef VIA_ENABLE - if (via_layout_2u) { - rgb_matrix_set_color(5, 0, 0, 0); - rgb_matrix_set_color(7, 0, 0, 0); - } else { - rgb_matrix_set_color(6, 0, 0, 0); - } -# else rgb_matrix_set_color(5, 0, 0, 0); rgb_matrix_set_color(7, 0, 0, 0); -# endif return true; } From 38f72c5d2bbae3be5a1d39284c1579616b097b75 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 29 Jun 2024 10:17:47 +0100 Subject: [PATCH 0092/1205] Relocate xelus/pachi/rgb/rev2 VIA logic (#24016) --- .../pachi/rgb/{ => rev1}/keymaps/via/config.h | 0 .../pachi/rgb/{ => rev1}/keymaps/via/keymap.c | 0 .../pachi/rgb/{ => rev1}/keymaps/via/rules.mk | 0 keyboards/xelus/pachi/rgb/rev2/config.h | 4 - .../xelus/pachi/rgb/rev2/keymaps/via/config.h | 20 + .../xelus/pachi/rgb/rev2/keymaps/via/keymap.c | 399 ++++++++++++++++++ .../xelus/pachi/rgb/rev2/keymaps/via/rules.mk | 1 + keyboards/xelus/pachi/rgb/rev2/rev2.c | 309 +------------- keyboards/xelus/pachi/rgb/rev2/rev2.h | 72 ---- 9 files changed, 421 insertions(+), 384 deletions(-) rename keyboards/xelus/pachi/rgb/{ => rev1}/keymaps/via/config.h (100%) rename keyboards/xelus/pachi/rgb/{ => rev1}/keymaps/via/keymap.c (100%) rename keyboards/xelus/pachi/rgb/{ => rev1}/keymaps/via/rules.mk (100%) create mode 100644 keyboards/xelus/pachi/rgb/rev2/keymaps/via/config.h create mode 100644 keyboards/xelus/pachi/rgb/rev2/keymaps/via/keymap.c create mode 100644 keyboards/xelus/pachi/rgb/rev2/keymaps/via/rules.mk delete mode 100644 keyboards/xelus/pachi/rgb/rev2/rev2.h diff --git a/keyboards/xelus/pachi/rgb/keymaps/via/config.h b/keyboards/xelus/pachi/rgb/rev1/keymaps/via/config.h similarity index 100% rename from keyboards/xelus/pachi/rgb/keymaps/via/config.h rename to keyboards/xelus/pachi/rgb/rev1/keymaps/via/config.h diff --git a/keyboards/xelus/pachi/rgb/keymaps/via/keymap.c b/keyboards/xelus/pachi/rgb/rev1/keymaps/via/keymap.c similarity index 100% rename from keyboards/xelus/pachi/rgb/keymaps/via/keymap.c rename to keyboards/xelus/pachi/rgb/rev1/keymaps/via/keymap.c diff --git a/keyboards/xelus/pachi/rgb/keymaps/via/rules.mk b/keyboards/xelus/pachi/rgb/rev1/keymaps/via/rules.mk similarity index 100% rename from keyboards/xelus/pachi/rgb/keymaps/via/rules.mk rename to keyboards/xelus/pachi/rgb/rev1/keymaps/via/rules.mk diff --git a/keyboards/xelus/pachi/rgb/rev2/config.h b/keyboards/xelus/pachi/rgb/rev2/config.h index a5fc38e07087..fcf4c41d8a72 100644 --- a/keyboards/xelus/pachi/rgb/rev2/config.h +++ b/keyboards/xelus/pachi/rgb/rev2/config.h @@ -33,7 +33,3 @@ // RGB Matrix defines #define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND #define IS31FL3741_LED_COUNT RGB_MATRIX_LED_COUNT // is31fl3741.h does not set this for custom driver - -// VIA KB level -#define VIA_FIRMWARE_VERSION 1 -#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 17 diff --git a/keyboards/xelus/pachi/rgb/rev2/keymaps/via/config.h b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/config.h new file mode 100644 index 000000000000..abdd8c320c32 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* Copyright 2021 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define VIA_FIRMWARE_VERSION 1 +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 17 diff --git a/keyboards/xelus/pachi/rgb/rev2/keymaps/via/keymap.c b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/keymap.c new file mode 100644 index 000000000000..f739dc4b6ab2 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/keymap.c @@ -0,0 +1,399 @@ +/* Copyright 2021 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "eeprom.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi_tsangan( + 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_SCRL, KC_PAUS, + 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_INS, KC_HOME, KC_PGUP, + 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_DEL, KC_END, KC_PGDN, + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_tkl_ansi_tsangan( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT , KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_tkl_ansi_tsangan( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +// custom ID codes +enum via_indicator_value { + id_caps_lock_enable = 1, + id_caps_lock_brightness, + id_caps_lock_color, + id_caps_lock_key, + id_caps_lock_override, + id_num_lock_enable, + id_num_lock_brightness, + id_num_lock_color, + id_num_lock_key, + id_num_lock_override, + id_scroll_lock_enable, + id_scroll_lock_brightness, + id_scroll_lock_color, + id_scroll_lock_key, + id_scroll_lock_override, + id_layer_indicator_enable, + id_layer_indicator_brightness, + id_layer_indicator_color, + id_layer_indicator_key, + id_layer_indicator_override +}; + +// struct to save things +typedef struct { + bool enable_caps_lock:1; // | + bool enable_num_lock:1; // | + bool enable_scroll_lock:1; // | + bool enable_layer_indicator:1; // | + bool caps_override_bl:1; // | + bool num_override_bl:1; // | + bool scroll_override_bl:1; // | + bool layer_override_bl:1; // 1 byte + HSV caps_lock_indicator; // 3 bytes + HSV num_lock_indicator; // 3 bytes + HSV scroll_lock_indicator; // 3 bytes + HSV layer_indicator; // 3 bytes + uint8_t caps_lock_key; // 1 byte + uint8_t num_lock_key; // 1 byte + uint8_t scroll_lock_key; // 1 byte + uint8_t layer_indicator_key;// 1 byte +} indicator_settings_config; +// total 17 bytes + +indicator_settings_config g_config = { + .caps_lock_indicator = {0, 0, 128}, + .num_lock_indicator = {60, 0, 128}, + .scroll_lock_indicator = {120, 0, 128}, + .layer_indicator = {180, 0, 128}, + .caps_lock_key = 7, + .num_lock_key = 0, + .scroll_lock_key = 78, + .layer_indicator_key = 0, + .enable_caps_lock = true, + .enable_num_lock = false, + .enable_scroll_lock = true, + .enable_layer_indicator = false, + .caps_override_bl = true, + .num_override_bl = true, + .scroll_override_bl = true, + .layer_override_bl = true +}; + + +// function declaration +void indicator_config_set_value( uint8_t *data ); +void indicator_config_get_value( uint8_t *data ); +void indicator_config_save ( void ); +void _set_color(HSV *color, uint8_t *data); +void _get_color(HSV *color, uint8_t *data); + +void values_load(void) +{ + eeprom_read_block( &g_config, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), sizeof(g_config) ); +} + +void values_save(void) +{ + eeprom_update_block( &g_config, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), sizeof(g_config) ); +} + +void via_init_kb(void) +{ + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM + if (via_eeprom_is_valid()) { + values_load(); + } else { + values_save(); + // DO NOT set EEPROM valid here, let caller do this + } +} + +void via_custom_value_command_kb(uint8_t *data, uint8_t length) { + // data = [ command_id, channel_id, value_id, value_data ] + uint8_t *command_id = &(data[0]); + uint8_t *channel_id = &(data[1]); + uint8_t *value_id_and_data = &(data[2]); + + if ( *channel_id == id_custom_channel ) { + switch ( *command_id ) + { + case id_custom_set_value: + { + indicator_config_set_value(value_id_and_data); + break; + } + case id_custom_get_value: + { + indicator_config_get_value(value_id_and_data); + break; + } + case id_custom_save: + { + values_save(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + return; + } + + // Return the unhandled state + *command_id = id_unhandled; + + // DO NOT call raw_hid_send(data,length) here, let caller do this +} + +void indicator_config_set_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_caps_lock_enable: + g_config.enable_caps_lock = *value_data; + break; + case id_num_lock_enable: + g_config.enable_num_lock = *value_data; + break; + case id_scroll_lock_enable: + g_config.enable_scroll_lock = *value_data; + break; + case id_layer_indicator_enable: + g_config.enable_layer_indicator = *value_data; + break; + case id_caps_lock_brightness: + g_config.caps_lock_indicator.v = *value_data; + break; + case id_num_lock_brightness: + g_config.num_lock_indicator.v = *value_data; + break; + case id_scroll_lock_brightness: + g_config.scroll_lock_indicator.v = *value_data; + break; + case id_layer_indicator_brightness: + g_config.layer_indicator.v = *value_data; + break; + case id_caps_lock_color: + _set_color( &(g_config.caps_lock_indicator), value_data ); + break; + case id_num_lock_color: + _set_color( &(g_config.num_lock_indicator), value_data ); + break; + case id_scroll_lock_color: + _set_color( &(g_config.scroll_lock_indicator), value_data ); + break; + case id_layer_indicator_color: + _set_color( &(g_config.layer_indicator), value_data ); + break; + case id_caps_lock_key: + g_config.caps_lock_key = *value_data; + break; + case id_num_lock_key: + g_config.num_lock_key = *value_data; + break; + case id_scroll_lock_key: + g_config.scroll_lock_key = *value_data; + break; + case id_layer_indicator_key: + g_config.layer_indicator_key = *value_data; + break; + case id_caps_lock_override: + g_config.caps_override_bl = *value_data; + break; + case id_num_lock_override: + g_config.num_override_bl = *value_data; + break; + case id_scroll_lock_override: + g_config.scroll_override_bl = *value_data; + break; + case id_layer_indicator_override: + g_config.layer_override_bl = *value_data; + break; + } +} + +void indicator_config_get_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_caps_lock_enable: + *value_data = g_config.enable_caps_lock; + break; + case id_num_lock_enable: + *value_data = g_config.enable_num_lock; + break; + case id_scroll_lock_enable: + *value_data = g_config.enable_scroll_lock; + break; + case id_layer_indicator_enable: + *value_data = g_config.enable_layer_indicator; + break; + case id_caps_lock_brightness: + *value_data = g_config.caps_lock_indicator.v; + break; + case id_num_lock_brightness: + *value_data = g_config.num_lock_indicator.v; + break; + case id_layer_indicator_brightness: + *value_data = g_config.scroll_lock_indicator.v; + break; + case id_scroll_lock_brightness: + *value_data = g_config.layer_indicator.v; + break; + case id_caps_lock_color: + _get_color( &(g_config.caps_lock_indicator), value_data ); + break; + case id_num_lock_color: + _get_color( &(g_config.num_lock_indicator), value_data ); + break; + case id_scroll_lock_color: + _get_color( &(g_config.scroll_lock_indicator), value_data ); + break; + case id_layer_indicator_color: + _get_color( &(g_config.layer_indicator), value_data ); + break; + case id_caps_lock_key: + *value_data = g_config.caps_lock_key; + break; + case id_num_lock_key: + *value_data = g_config.num_lock_key; + break; + case id_scroll_lock_key: + *value_data = g_config.scroll_lock_key; + break; + case id_layer_indicator_key: + *value_data = g_config.layer_indicator_key; + break; + case id_caps_lock_override: + *value_data = g_config.caps_override_bl; + break; + case id_num_lock_override: + *value_data = g_config.num_override_bl; + break; + case id_scroll_lock_override: + *value_data = g_config.scroll_override_bl; + break; + case id_layer_indicator_override: + *value_data = g_config.layer_override_bl; + break; + } +} + +// Some helpers for setting/getting HSV +void _set_color( HSV *color, uint8_t *data ) +{ + color->h = data[0]; + color->s = data[1]; +} + +void _get_color( HSV *color, uint8_t *data ) +{ + data[0] = color->h; + data[1] = color->s; +} + +// Set the indicators with RGB Matrix subsystem +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + // caps lock cyan + if (g_config.enable_caps_lock) { + RGB rgb_caps = hsv_to_rgb( (HSV){ .h = g_config.caps_lock_indicator.h, + .s = g_config.caps_lock_indicator.s, + .v = g_config.caps_lock_indicator.v } ); + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.caps_lock_key, rgb_caps.r, rgb_caps.g, rgb_caps.b); + } else { + if (g_config.caps_override_bl) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.caps_lock_key, 0, 0, 0); + } + } + } + + // num lock cyan + if (g_config.enable_num_lock) { + RGB rgb_num = hsv_to_rgb( (HSV){ .h = g_config.num_lock_indicator.h, + .s = g_config.num_lock_indicator.s, + .v = g_config.num_lock_indicator.v } ); + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.num_lock_key, rgb_num.r, rgb_num.g, rgb_num.b); + } else { + if (g_config.num_override_bl) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.num_lock_key, 0, 0, 0); + } + } + } + + // scroll lock cyan + if (g_config.enable_scroll_lock) { + RGB rgb_scroll = hsv_to_rgb( (HSV){ .h = g_config.scroll_lock_indicator.h, + .s = g_config.scroll_lock_indicator.s, + .v = g_config.scroll_lock_indicator.v } ); + if (host_keyboard_led_state().scroll_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.scroll_lock_key, rgb_scroll.r, rgb_scroll.g, rgb_scroll.b); + } else { + if (g_config.scroll_override_bl) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.scroll_lock_key, 0, 0, 0); + } + } + } + + // layer state + if (g_config.enable_layer_indicator) { + RGB rgb_layer = hsv_to_rgb( (HSV){ .h = g_config.layer_indicator.h, + .s = g_config.layer_indicator.s, + .v = g_config.layer_indicator.v } ); + switch (get_highest_layer(layer_state)) { + case 0: + if (g_config.layer_override_bl) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.layer_indicator_key, 0, 0, 0); + } + break; + case 1: + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.layer_indicator_key, rgb_layer.r, rgb_layer.g, rgb_layer.b); + break; + default: + // white + RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 128, 128); + break; + } + } + return false; +} diff --git a/keyboards/xelus/pachi/rgb/rev2/keymaps/via/rules.mk b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.c b/keyboards/xelus/pachi/rgb/rev2/rev2.c index f595e889c3ba..5589b271770d 100644 --- a/keyboards/xelus/pachi/rgb/rev2/rev2.c +++ b/keyboards/xelus/pachi/rgb/rev2/rev2.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "rev2.h" +#include "quantum.h" // tested and working void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } @@ -239,311 +239,4 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = is31fl3741_set_color_all }; -#ifdef VIA_ENABLE -#include "quantum.h" -#include "eeprom.h" - -indicator_settings_config g_config = { - .caps_lock_indicator = {0, 0, 128}, - .num_lock_indicator = {60, 0, 128}, - .scroll_lock_indicator = {120, 0, 128}, - .layer_indicator = {180, 0, 128}, - .caps_lock_key = 7, - .num_lock_key = 0, - .scroll_lock_key = 78, - .layer_indicator_key = 0, - .enable_caps_lock = true, - .enable_num_lock = false, - .enable_scroll_lock = true, - .enable_layer_indicator = false, - .caps_override_bl = true, - .num_override_bl = true, - .scroll_override_bl = true, - .layer_override_bl = true -}; - -void values_load(void) -{ - eeprom_read_block( &g_config, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), sizeof(g_config) ); -} - -void values_save(void) -{ - eeprom_update_block( &g_config, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), sizeof(g_config) ); -} - -void via_init_kb(void) -{ - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM - if (via_eeprom_is_valid()) { - values_load(); - } else { - values_save(); - // DO NOT set EEPROM valid here, let caller do this - } -} - -void via_custom_value_command_kb(uint8_t *data, uint8_t length) { - // data = [ command_id, channel_id, value_id, value_data ] - uint8_t *command_id = &(data[0]); - uint8_t *channel_id = &(data[1]); - uint8_t *value_id_and_data = &(data[2]); - - if ( *channel_id == id_custom_channel ) { - switch ( *command_id ) - { - case id_custom_set_value: - { - indicator_config_set_value(value_id_and_data); - break; - } - case id_custom_get_value: - { - indicator_config_get_value(value_id_and_data); - break; - } - case id_custom_save: - { - values_save(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - return; - } - - // Return the unhandled state - *command_id = id_unhandled; - - // DO NOT call raw_hid_send(data,length) here, let caller do this -} - -void indicator_config_set_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_caps_lock_enable: - g_config.enable_caps_lock = *value_data; - break; - case id_num_lock_enable: - g_config.enable_num_lock = *value_data; - break; - case id_scroll_lock_enable: - g_config.enable_scroll_lock = *value_data; - break; - case id_layer_indicator_enable: - g_config.enable_layer_indicator = *value_data; - break; - case id_caps_lock_brightness: - g_config.caps_lock_indicator.v = *value_data; - break; - case id_num_lock_brightness: - g_config.num_lock_indicator.v = *value_data; - break; - case id_scroll_lock_brightness: - g_config.scroll_lock_indicator.v = *value_data; - break; - case id_layer_indicator_brightness: - g_config.layer_indicator.v = *value_data; - break; - case id_caps_lock_color: - _set_color( &(g_config.caps_lock_indicator), value_data ); - break; - case id_num_lock_color: - _set_color( &(g_config.num_lock_indicator), value_data ); - break; - case id_scroll_lock_color: - _set_color( &(g_config.scroll_lock_indicator), value_data ); - break; - case id_layer_indicator_color: - _set_color( &(g_config.layer_indicator), value_data ); - break; - case id_caps_lock_key: - g_config.caps_lock_key = *value_data; - break; - case id_num_lock_key: - g_config.num_lock_key = *value_data; - break; - case id_scroll_lock_key: - g_config.scroll_lock_key = *value_data; - break; - case id_layer_indicator_key: - g_config.layer_indicator_key = *value_data; - break; - case id_caps_lock_override: - g_config.caps_override_bl = *value_data; - break; - case id_num_lock_override: - g_config.num_override_bl = *value_data; - break; - case id_scroll_lock_override: - g_config.scroll_override_bl = *value_data; - break; - case id_layer_indicator_override: - g_config.layer_override_bl = *value_data; - break; - } -} - -void indicator_config_get_value( uint8_t *data ) -{ - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_caps_lock_enable: - *value_data = g_config.enable_caps_lock; - break; - case id_num_lock_enable: - *value_data = g_config.enable_num_lock; - break; - case id_scroll_lock_enable: - *value_data = g_config.enable_scroll_lock; - break; - case id_layer_indicator_enable: - *value_data = g_config.enable_layer_indicator; - break; - case id_caps_lock_brightness: - *value_data = g_config.caps_lock_indicator.v; - break; - case id_num_lock_brightness: - *value_data = g_config.num_lock_indicator.v; - break; - case id_layer_indicator_brightness: - *value_data = g_config.scroll_lock_indicator.v; - break; - case id_scroll_lock_brightness: - *value_data = g_config.layer_indicator.v; - break; - case id_caps_lock_color: - _get_color( &(g_config.caps_lock_indicator), value_data ); - break; - case id_num_lock_color: - _get_color( &(g_config.num_lock_indicator), value_data ); - break; - case id_scroll_lock_color: - _get_color( &(g_config.scroll_lock_indicator), value_data ); - break; - case id_layer_indicator_color: - _get_color( &(g_config.layer_indicator), value_data ); - break; - case id_caps_lock_key: - *value_data = g_config.caps_lock_key; - break; - case id_num_lock_key: - *value_data = g_config.num_lock_key; - break; - case id_scroll_lock_key: - *value_data = g_config.scroll_lock_key; - break; - case id_layer_indicator_key: - *value_data = g_config.layer_indicator_key; - break; - case id_caps_lock_override: - *value_data = g_config.caps_override_bl; - break; - case id_num_lock_override: - *value_data = g_config.num_override_bl; - break; - case id_scroll_lock_override: - *value_data = g_config.scroll_override_bl; - break; - case id_layer_indicator_override: - *value_data = g_config.layer_override_bl; - break; - } -} - -// Some helpers for setting/getting HSV -void _set_color( HSV *color, uint8_t *data ) -{ - color->h = data[0]; - color->s = data[1]; -} - -void _get_color( HSV *color, uint8_t *data ) -{ - data[0] = color->h; - data[1] = color->s; -} - -// Set the indicators with RGB Matrix subsystem -bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { - // caps lock cyan - if (g_config.enable_caps_lock) { - RGB rgb_caps = hsv_to_rgb( (HSV){ .h = g_config.caps_lock_indicator.h, - .s = g_config.caps_lock_indicator.s, - .v = g_config.caps_lock_indicator.v } ); - if (host_keyboard_led_state().caps_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.caps_lock_key, rgb_caps.r, rgb_caps.g, rgb_caps.b); - } else { - if (g_config.caps_override_bl) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.caps_lock_key, 0, 0, 0); - } - } - } - - // num lock cyan - if (g_config.enable_num_lock) { - RGB rgb_num = hsv_to_rgb( (HSV){ .h = g_config.num_lock_indicator.h, - .s = g_config.num_lock_indicator.s, - .v = g_config.num_lock_indicator.v } ); - if (host_keyboard_led_state().num_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.num_lock_key, rgb_num.r, rgb_num.g, rgb_num.b); - } else { - if (g_config.num_override_bl) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.num_lock_key, 0, 0, 0); - } - } - } - - // scroll lock cyan - if (g_config.enable_scroll_lock) { - RGB rgb_scroll = hsv_to_rgb( (HSV){ .h = g_config.scroll_lock_indicator.h, - .s = g_config.scroll_lock_indicator.s, - .v = g_config.scroll_lock_indicator.v } ); - if (host_keyboard_led_state().scroll_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.scroll_lock_key, rgb_scroll.r, rgb_scroll.g, rgb_scroll.b); - } else { - if (g_config.scroll_override_bl) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.scroll_lock_key, 0, 0, 0); - } - } - } - - // layer state - if (g_config.enable_layer_indicator) { - RGB rgb_layer = hsv_to_rgb( (HSV){ .h = g_config.layer_indicator.h, - .s = g_config.layer_indicator.s, - .v = g_config.layer_indicator.v } ); - switch (get_highest_layer(layer_state)) { - case 0: - if (g_config.layer_override_bl) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.layer_indicator_key, 0, 0, 0); - } - break; - case 1: - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.layer_indicator_key, rgb_layer.r, rgb_layer.g, rgb_layer.b); - break; - default: - // white - RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 128, 128); - break; - } - } - return false; -} - -#endif #endif diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.h b/keyboards/xelus/pachi/rgb/rev2/rev2.h deleted file mode 100644 index fb0b8639d205..000000000000 --- a/keyboards/xelus/pachi/rgb/rev2/rev2.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright 2023 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#include "quantum.h" - -#ifdef VIA_ENABLE -// custom ID codes -enum via_indicator_value { - id_caps_lock_enable = 1, - id_caps_lock_brightness, - id_caps_lock_color, - id_caps_lock_key, - id_caps_lock_override, - id_num_lock_enable, - id_num_lock_brightness, - id_num_lock_color, - id_num_lock_key, - id_num_lock_override, - id_scroll_lock_enable, - id_scroll_lock_brightness, - id_scroll_lock_color, - id_scroll_lock_key, - id_scroll_lock_override, - id_layer_indicator_enable, - id_layer_indicator_brightness, - id_layer_indicator_color, - id_layer_indicator_key, - id_layer_indicator_override -}; - -// struct to save things -typedef struct { - bool enable_caps_lock:1; // | - bool enable_num_lock:1; // | - bool enable_scroll_lock:1; // | - bool enable_layer_indicator:1; // | - bool caps_override_bl:1; // | - bool num_override_bl:1; // | - bool scroll_override_bl:1; // | - bool layer_override_bl:1; // 1 byte - HSV caps_lock_indicator; // 3 bytes - HSV num_lock_indicator; // 3 bytes - HSV scroll_lock_indicator; // 3 bytes - HSV layer_indicator; // 3 bytes - uint8_t caps_lock_key; // 1 byte - uint8_t num_lock_key; // 1 byte - uint8_t scroll_lock_key; // 1 byte - uint8_t layer_indicator_key;// 1 byte -} indicator_settings_config; -// total 17 bytes - -// function declaration -void indicator_config_set_value( uint8_t *data ); -void indicator_config_get_value( uint8_t *data ); -void indicator_config_save ( void ); -void _set_color(HSV *color, uint8_t *data); -void _get_color(HSV *color, uint8_t *data); -#endif From 5624804c6822b68d091e77642e07dc3640bf4ca6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 29 Jun 2024 19:19:51 +1000 Subject: [PATCH 0093/1205] `h0oni/deskpad` and `hotduck`: adjust layout names (#24004) --- keyboards/h0oni/deskpad/keyboard.json | 5 ++++- keyboards/h0oni/deskpad/keymaps/default/keymap.c | 8 ++++---- keyboards/h0oni/deskpad/keymaps/via/keymap.c | 8 ++++---- keyboards/h0oni/hotduck/keyboard.json | 5 ++++- keyboards/h0oni/hotduck/keymaps/default/keymap.c | 8 ++++---- keyboards/h0oni/hotduck/keymaps/via/keymap.c | 8 ++++---- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/keyboards/h0oni/deskpad/keyboard.json b/keyboards/h0oni/deskpad/keyboard.json index d240acf9d33d..d7ad53cd43ed 100644 --- a/keyboards/h0oni/deskpad/keyboard.json +++ b/keyboards/h0oni/deskpad/keyboard.json @@ -39,8 +39,11 @@ "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 3, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/h0oni/deskpad/keymaps/default/keymap.c b/keyboards/h0oni/deskpad/keymaps/default/keymap.c index c3eba7c4a9c4..eea54cf6b19e 100644 --- a/keyboards/h0oni/deskpad/keymaps/default/keymap.c +++ b/keyboards/h0oni/deskpad/keymaps/default/keymap.c @@ -171,19 +171,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( TD(TD_CUT_REDO), TD(TD_MPRV_LEFT), TD(TD_PLAY_PAUSE_MUTE), TD(TD_MNXT_RIGHT), TD(QUAD_CVXA), TD(QUAD_LAYER_SWITCH) ), - [1] = LAYOUT_all( + [1] = LAYOUT( YOUTUBE, KC_WBAK, TD(TD_SEARCH_REFRESH), KC_WFWD, FACEBOOK, TD(QUAD_LAYER_SWITCH) ), - [2] = LAYOUT_all( + [2] = LAYOUT( A(KC_F4), SGUI(KC_S), KC_MYCM, LCA(KC_DEL), KC_CALC, TD(QUAD_LAYER_SWITCH) ), - [3] = LAYOUT_all( + [3] = LAYOUT( C(KC_SLSH), VALORANT, VSCODE, DISCORD, LSA(KC_A), TD(QUAD_LAYER_SWITCH) ), }; \ No newline at end of file diff --git a/keyboards/h0oni/deskpad/keymaps/via/keymap.c b/keyboards/h0oni/deskpad/keymaps/via/keymap.c index c3eba7c4a9c4..eea54cf6b19e 100644 --- a/keyboards/h0oni/deskpad/keymaps/via/keymap.c +++ b/keyboards/h0oni/deskpad/keymaps/via/keymap.c @@ -171,19 +171,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( TD(TD_CUT_REDO), TD(TD_MPRV_LEFT), TD(TD_PLAY_PAUSE_MUTE), TD(TD_MNXT_RIGHT), TD(QUAD_CVXA), TD(QUAD_LAYER_SWITCH) ), - [1] = LAYOUT_all( + [1] = LAYOUT( YOUTUBE, KC_WBAK, TD(TD_SEARCH_REFRESH), KC_WFWD, FACEBOOK, TD(QUAD_LAYER_SWITCH) ), - [2] = LAYOUT_all( + [2] = LAYOUT( A(KC_F4), SGUI(KC_S), KC_MYCM, LCA(KC_DEL), KC_CALC, TD(QUAD_LAYER_SWITCH) ), - [3] = LAYOUT_all( + [3] = LAYOUT( C(KC_SLSH), VALORANT, VSCODE, DISCORD, LSA(KC_A), TD(QUAD_LAYER_SWITCH) ), }; \ No newline at end of file diff --git a/keyboards/h0oni/hotduck/keyboard.json b/keyboards/h0oni/hotduck/keyboard.json index 605d614d6af3..bdb238602143 100644 --- a/keyboards/h0oni/hotduck/keyboard.json +++ b/keyboards/h0oni/hotduck/keyboard.json @@ -51,8 +51,11 @@ }, "processor": "atmega32u4", "bootloader": "atmel-dfu", + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/h0oni/hotduck/keymaps/default/keymap.c b/keyboards/h0oni/hotduck/keymaps/default/keymap.c index 503f0bc74cd8..de979ade4384 100644 --- a/keyboards/h0oni/hotduck/keymaps/default/keymap.c +++ b/keyboards/h0oni/hotduck/keymaps/default/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC, 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, MO(1), KC_HOME, KC_PGUP, 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_SLSH, KC_DEL, KC_END, KC_PGDN, 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, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), - [1] = LAYOUT_all( + [1] = LAYOUT( KC_GRV, 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_TRNS, MO(1), TG(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, @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ), - [2] = LAYOUT_all( + [2] = 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,TG(2), MO(4), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ), - [3] = LAYOUT_all( + [3] = 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,MO(4), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, diff --git a/keyboards/h0oni/hotduck/keymaps/via/keymap.c b/keyboards/h0oni/hotduck/keymaps/via/keymap.c index 503f0bc74cd8..de979ade4384 100644 --- a/keyboards/h0oni/hotduck/keymaps/via/keymap.c +++ b/keyboards/h0oni/hotduck/keymaps/via/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC, 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, MO(1), KC_HOME, KC_PGUP, 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_SLSH, KC_DEL, KC_END, KC_PGDN, 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, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), - [1] = LAYOUT_all( + [1] = LAYOUT( KC_GRV, 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_TRNS, MO(1), TG(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, @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ), - [2] = LAYOUT_all( + [2] = 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,TG(2), MO(4), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ), - [3] = LAYOUT_all( + [3] = 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,MO(4), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, From cc0b2f981446620f73b7531f9205a14134fedbae Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 29 Jun 2024 19:20:11 +1000 Subject: [PATCH 0094/1205] `jels/boaty`: adjust layout name (#24013) --- keyboards/jels/boaty/keyboard.json | 5 ++++- keyboards/jels/boaty/keymaps/default/keymap.c | 4 ++-- keyboards/jels/boaty/keymaps/via/keymap.c | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/keyboards/jels/boaty/keyboard.json b/keyboards/jels/boaty/keyboard.json index 11a6e0aa151e..36fa9288ab25 100644 --- a/keyboards/jels/boaty/keyboard.json +++ b/keyboards/jels/boaty/keyboard.json @@ -29,8 +29,11 @@ "rows": ["D6", "B0", "D7", "B5", "B3", "B4", "B2"] }, "diode_direction": "COL2ROW", + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label": "Num Lock", "matrix": [2, 10], "x": 6.75, "y": 0}, {"label": "-", "matrix": [1, 10], "x": 6.75, "y": 1}, diff --git a/keyboards/jels/boaty/keymaps/default/keymap.c b/keyboards/jels/boaty/keymaps/default/keymap.c index 9c2dfc1d4478..3dcf144e392d 100644 --- a/keyboards/jels/boaty/keymaps/default/keymap.c +++ b/keyboards/jels/boaty/keymaps/default/keymap.c @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //base layer - [0] = LAYOUT_all( + [0] = LAYOUT( KC_NUM, KC_PAST, KC_PSLS, KC_P7, KC_P8, KC_P9, @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_1, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RSFT, KC_LCTL, KC_LALT, KC_SPC, KC_1, KC_RALT, KC_RCTL ), - [1] = LAYOUT_all( + [1] = LAYOUT( KC_F2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/jels/boaty/keymaps/via/keymap.c b/keyboards/jels/boaty/keymaps/via/keymap.c index a2e557086bd7..870642b49bf7 100644 --- a/keyboards/jels/boaty/keymaps/via/keymap.c +++ b/keyboards/jels/boaty/keymaps/via/keymap.c @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //base layer - [0] = LAYOUT_all( + [0] = LAYOUT( KC_NUM, KC_PAST, KC_PSLS, KC_P7, KC_P8, KC_P9, @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL ), - [1] = LAYOUT_all( + [1] = LAYOUT( KC_F2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = LAYOUT_all( + [2] = LAYOUT( KC_F2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [3] = LAYOUT_all( + [3] = LAYOUT( KC_F2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, From d6bfbdb6b15967e649b54e9cea6643a8dc48ba0b Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 29 Jun 2024 20:56:29 +1000 Subject: [PATCH 0095/1205] `horrortroll/handwired_k552`: fix RGB Matrix LED config (#24014) --- .../handwired_k552/handwired_k552.c | 23 --------------- .../horrortroll/handwired_k552/keyboard.json | 28 ++++++++++++++++++- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/keyboards/horrortroll/handwired_k552/handwired_k552.c b/keyboards/horrortroll/handwired_k552/handwired_k552.c index c6181d178e31..b4735bac05af 100644 --- a/keyboards/horrortroll/handwired_k552/handwired_k552.c +++ b/keyboards/horrortroll/handwired_k552/handwired_k552.c @@ -19,29 +19,6 @@ // OLED animation #include "lib/logo.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } -}, { - {152, 0}, {165, 0}, {190, 0}, {205, 0}, - {224, 21}, {224, 43}, {224, 54}, - {188, 64}, {172, 64}, {156, 64}, {140, 64}, {115, 64}, {99 , 64}, {75 , 64}, {59 , 64}, {43 , 64}, {26 , 64}, - {0 , 15}, {0 , 50}, {0 , 39}, - {18 , 0}, {36 , 0}, {57 , 0}, {67 , 0} -}, { - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, - 2, 2, - 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -} }; -#endif - #ifdef OLED_ENABLE uint16_t startup_timer; diff --git a/keyboards/horrortroll/handwired_k552/keyboard.json b/keyboards/horrortroll/handwired_k552/keyboard.json index 6bbfa86e1244..213cdf808602 100644 --- a/keyboards/horrortroll/handwired_k552/keyboard.json +++ b/keyboards/horrortroll/handwired_k552/keyboard.json @@ -34,7 +34,33 @@ "pixel_rain": true }, "driver": "ws2812", - "max_brightness": 200 + "max_brightness": 200, + "layout": [ + {"x": 152, "y": 0, "flags": 2}, + {"x": 165, "y": 0, "flags": 2}, + {"x": 190, "y": 0, "flags": 2}, + {"x": 205, "y": 0, "flags": 2}, + {"x": 224, "y": 21, "flags": 2}, + {"x": 224, "y": 43, "flags": 2}, + {"x": 224, "y": 54, "flags": 2}, + {"x": 188, "y": 64, "flags": 2}, + {"x": 172, "y": 64, "flags": 2}, + {"x": 156, "y": 64, "flags": 2}, + {"x": 140, "y": 64, "flags": 2}, + {"x": 115, "y": 64, "flags": 2}, + {"x": 99, "y": 64, "flags": 2}, + {"x": 75, "y": 64, "flags": 2}, + {"x": 59, "y": 64, "flags": 2}, + {"x": 43, "y": 64, "flags": 2}, + {"x": 26, "y": 64, "flags": 2}, + {"x": 0, "y": 50, "flags": 2}, + {"x": 0, "y": 39, "flags": 2}, + {"x": 0, "y": 15, "flags": 2}, + {"x": 18, "y": 0, "flags": 2}, + {"x": 36, "y": 0, "flags": 2}, + {"x": 57, "y": 0, "flags": 2}, + {"x": 67, "y": 0, "flags": 2} + ] }, "matrix_pins": { "cols": ["B15", "C6", "C7", "A3", "A1", "C3", "C1", "B14", "B13", "A9", "B3", "B4", "A0", "C11", "C4", "C0", "C2"], From 0947299864c81a93ee5a6f13bab8d71b72299191 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 29 Jun 2024 14:25:24 +0100 Subject: [PATCH 0096/1205] Remove custom keycodes from nullbitsco/snap (#24017) --- keyboards/nullbitsco/snap/snap.c | 84 ++++++++------------------------ keyboards/nullbitsco/snap/snap.h | 12 ----- 2 files changed, 19 insertions(+), 77 deletions(-) diff --git a/keyboards/nullbitsco/snap/snap.c b/keyboards/nullbitsco/snap/snap.c index 7308572f9544..bd0ea5b73176 100644 --- a/keyboards/nullbitsco/snap/snap.c +++ b/keyboards/nullbitsco/snap/snap.c @@ -15,11 +15,6 @@ */ #include "snap.h" -// Macro variables -bool is_alt_tab_active = false; -uint16_t alt_tab_timer = 0; -bool muted = false; - void matrix_init_kb(void) { set_bitc_LED(LED_OFF); matrix_init_remote_kb(); @@ -27,23 +22,16 @@ void matrix_init_kb(void) { } void keyboard_post_init_kb(void) { - #ifdef CONSOLE_ENABLE +#ifdef CONSOLE_ENABLE debug_enable = true; debug_matrix = true; - #endif +#endif keyboard_post_init_user(); } void matrix_scan_kb(void) { matrix_scan_remote_kb(); matrix_scan_user(); - - if (is_alt_tab_active) { - if (timer_elapsed(alt_tab_timer) > 1000) { - unregister_code(KC_LALT); - is_alt_tab_active = false; - } - } } // Use Bit-C LED to show CAPS LOCK and NUM LOCK status @@ -51,63 +39,29 @@ void led_update_ports(led_t led_state) { set_bitc_LED(led_state.caps_lock ? LED_DIM : LED_OFF); } +bool shutdown_kb(bool jump_to_bootloader) { + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + + set_bitc_LED(LED_DIM); +#ifdef RGBLIGHT_ENABLE + rgblight_disable_noeeprom(); +#endif +#ifdef OLED_ENABLE + oled_off(); +#endif + return true; +} + bool process_record_kb(uint16_t keycode, keyrecord_t *record) { // If console is enabled, it will print the matrix position and status of each key pressed - #ifdef CONSOLE_ENABLE +#ifdef CONSOLE_ENABLE dprintf("kc: 0x%04X, col: %u, row: %u, pressed: %b, time: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time); - #endif +#endif process_record_remote_kb(keycode, record); if (!process_record_user(keycode, record)) return false; - switch (keycode) { - case QK_BOOT: - if (record->event.pressed) { - set_bitc_LED(LED_DIM); - #ifdef RGBLIGHT_ENABLE - rgblight_disable_noeeprom(); - #endif - #ifdef OLED_ENABLE - oled_off(); - #endif - bootloader_jump(); // jump to bootloader - } - return false; - - case DISC_MUTE: - if (record->event.pressed) { - tap_code(KC_F23); - #ifdef RGBLIGHT_ENABLE - if (!rgblight_is_enabled()) break; - - if (muted) { - rgblight_enable_noeeprom(); - } else { - rgblight_timer_disable(); - uint8_t val = rgblight_get_val(); - rgblight_sethsv_range(255, 255, val, 1, 5); - } - #endif - muted = !muted; - } - break; - - case SUPER_ALT_TAB: - if (record->event.pressed) { - if (!is_alt_tab_active) { - is_alt_tab_active = true; - register_code(KC_LALT); - } - alt_tab_timer = timer_read(); - register_code(KC_TAB); - } else { - unregister_code(KC_TAB); - } - break; - - default: - break; - } - return true; } diff --git a/keyboards/nullbitsco/snap/snap.h b/keyboards/nullbitsco/snap/snap.h index e593257368d7..c1fa22e0c1e2 100644 --- a/keyboards/nullbitsco/snap/snap.h +++ b/keyboards/nullbitsco/snap/snap.h @@ -18,15 +18,3 @@ #include "quantum.h" #include "common/remote_kb.h" #include "common/bitc_led.h" - -#ifdef VIA_ENABLE -enum custom_keycodes { - DISC_MUTE = QK_USER_0, - SUPER_ALT_TAB -}; -#else -enum custom_keycodes { - DISC_MUTE = SAFE_RANGE, - SUPER_ALT_TAB -}; -#endif From 12379dc1ebd5bb1257eed5f7400510ee535d5d50 Mon Sep 17 00:00:00 2001 From: Danylo Kondratiev Date: Sun, 30 Jun 2024 04:57:35 +0300 Subject: [PATCH 0097/1205] Fix ploopy Adept/Madromys link (#24018) --- keyboards/ploopyco/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ploopyco/readme.md b/keyboards/ploopyco/readme.md index a468058ce049..b6eecf080e94 100644 --- a/keyboards/ploopyco/readme.md +++ b/keyboards/ploopyco/readme.md @@ -5,7 +5,7 @@ * [Trackball Mini](trackball_mini/) * [Trackball Nano](trackball_nano/) * [Trackball Thumb](trackball_thumb/) -* [Adept/Madromys](manromys/) +* [Adept/Madromys](madromys/) # Customizing your PloopyCo Device From 3ffe8d917a7c43e56b11ada82ac57b86003719a3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 30 Jun 2024 03:39:49 +0100 Subject: [PATCH 0098/1205] Fix 'qmk new-keyboard' processing of development_board (#23996) --- data/templates/keyboard/keyboard.json | 2 -- lib/python/qmk/cli/new/keyboard.py | 34 ++++++++++----------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/data/templates/keyboard/keyboard.json b/data/templates/keyboard/keyboard.json index 65f935fb42a1..94085d7f5a2b 100644 --- a/data/templates/keyboard/keyboard.json +++ b/data/templates/keyboard/keyboard.json @@ -2,8 +2,6 @@ "keyboard_name": "%KEYBOARD%", "maintainer": "%USER_NAME%", "manufacturer": "%REAL_NAME%", - "processor": "%MCU%", - "bootloader": "%BOOTLOADER%", "diode_direction": "COL2ROW", "matrix_pins": { "cols": ["C2"], diff --git a/lib/python/qmk/cli/new/keyboard.py b/lib/python/qmk/cli/new/keyboard.py index 56bd05e1e3e3..b84b130f8ec5 100644 --- a/lib/python/qmk/cli/new/keyboard.py +++ b/lib/python/qmk/cli/new/keyboard.py @@ -14,7 +14,7 @@ from qmk.json_schema import load_jsonschema from qmk.path import keyboard from qmk.json_encoders import InfoJSONEncoder -from qmk.json_schema import deep_update, json_load +from qmk.json_schema import deep_update from qmk.constants import MCU2BOOTLOADER, QMK_FIRMWARE COMMUNITY = Path('layouts/default/') @@ -78,7 +78,7 @@ def replace_string(src, token, value): src.write_text(src.read_text().replace(token, value)) -def augment_community_info(src, dest): +def augment_community_info(config, src, dest): """Splice in any additional data into info.json """ info = json.loads(src.read_text()) @@ -86,6 +86,7 @@ def augment_community_info(src, dest): # merge community with template deep_update(info, template) + deep_update(info, config) # avoid assumptions on macro name by using the first available first_layout = next(iter(info["layouts"].values()))["layout"] @@ -105,7 +106,7 @@ def augment_community_info(src, dest): for item in first_layout: item["matrix"] = [int(item["y"]), int(item["x"])] - # finally write out the updated info.json + # finally write out the updated json dest.write_text(json.dumps(info, cls=InfoJSONEncoder, sort_keys=True)) @@ -212,15 +213,12 @@ def new_keyboard(cli): default_layout = cli.args.layout if cli.args.layout else prompt_layout() mcu = cli.args.type if cli.args.type else prompt_mcu() - # Preprocess any development_board presets + config = {} if mcu in dev_boards: - defaults_map = json_load(Path('data/mappings/defaults.hjson')) - board = defaults_map['development_board'][mcu] - - mcu = board['processor'] - bootloader = board['bootloader'] + config['development_board'] = mcu else: - bootloader = select_default_bootloader(mcu) + config['processor'] = mcu + config['bootloader'] = select_default_bootloader(mcu) detach_layout = False if default_layout == 'none of the above': @@ -231,17 +229,9 @@ def new_keyboard(cli): 'YEAR': str(date.today().year), 'KEYBOARD': kb_name, 'USER_NAME': user_name, - 'REAL_NAME': real_name, - 'LAYOUT': default_layout, - 'MCU': mcu, - 'BOOTLOADER': bootloader + 'REAL_NAME': real_name } - if cli.config.general.verbose: - cli.log.info("Creating keyboard with:") - for key, value in tokens.items(): - cli.echo(f" {key.ljust(10)}: {value}") - # begin with making the deepest folder in the tree keymaps_path = keyboard(kb_name) / 'keymaps/' keymaps_path.mkdir(parents=True) @@ -256,7 +246,7 @@ def new_keyboard(cli): # merge in infos community_info = Path(COMMUNITY / f'{default_layout}/info.json') - augment_community_info(community_info, keyboard(kb_name) / 'keyboard.json') + augment_community_info(config, community_info, keyboard(kb_name) / 'keyboard.json') # detach community layout and rename to just "LAYOUT" if detach_layout: @@ -265,5 +255,5 @@ def new_keyboard(cli): cli.log.info(f'{{fg_green}}Created a new keyboard called {{fg_cyan}}{kb_name}{{fg_green}}.{{fg_reset}}') cli.log.info(f"Build Command: {{fg_yellow}}qmk compile -kb {kb_name} -km default{{fg_reset}}.") - cli.log.info(f'Project Location: {{fg_cyan}}{QMK_FIRMWARE}/{keyboard(kb_name)}{{fg_reset}},') - cli.log.info("{{fg_yellow}}Now update the config files to match the hardware!{{fg_reset}}") + cli.log.info(f'Project Location: {{fg_cyan}}{QMK_FIRMWARE}/{keyboard(kb_name)}{{fg_reset}}.') + cli.log.info("{fg_yellow}Now update the config files to match the hardware!{fg_reset}") From 7bc3eef8cc262e12b0f823ba4c92cf97ca3dc1fa Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 2 Jul 2024 10:16:41 +1000 Subject: [PATCH 0099/1205] SPI flash API cleanup, add async erase capability. (#23894) --- builddefs/common_features.mk | 9 +- drivers/flash/flash.h | 126 ++++++++++++++++++ drivers/flash/flash_spi.c | 89 +++++++------ drivers/flash/flash_spi.h | 31 +---- .../wear_leveling/wear_leveling_flash_spi.c | 4 +- 5 files changed, 182 insertions(+), 77 deletions(-) create mode 100644 drivers/flash/flash.h diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 68f9a1dd08a8..498614dd2641 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -282,18 +282,17 @@ ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none) endif endif -VALID_FLASH_DRIVER_TYPES := spi +VALID_FLASH_DRIVER_TYPES := spi custom FLASH_DRIVER ?= none ifneq ($(strip $(FLASH_DRIVER)), none) ifeq ($(filter $(FLASH_DRIVER),$(VALID_FLASH_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid FLASH_DRIVER,FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid flash driver) else - OPT_DEFS += -DFLASH_ENABLE + OPT_DEFS += -DFLASH_ENABLE -DFLASH_DRIVER -DFLASH_DRIVER_$(strip $(shell echo $(FLASH_DRIVER) | tr '[:lower:]' '[:upper:]')) + COMMON_VPATH += $(DRIVER_PATH)/flash ifeq ($(strip $(FLASH_DRIVER)),spi) - SPI_DRIVER_REQUIRED = yes - OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI - COMMON_VPATH += $(DRIVER_PATH)/flash SRC += flash_spi.c + SPI_DRIVER_REQUIRED = yes endif endif endif diff --git a/drivers/flash/flash.h b/drivers/flash/flash.h new file mode 100644 index 000000000000..4d6247513987 --- /dev/null +++ b/drivers/flash/flash.h @@ -0,0 +1,126 @@ +// Copyright 2024 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +/** + * @brief The status of a flash operation. + */ +enum { + FLASH_STATUS_SUCCESS = 0, //< The operation completed successfully. + FLASH_STATUS_ERROR = -1, //< An error occurred during the operation. + FLASH_STATUS_TIMEOUT = -2, //< The operation timed out. + FLASH_STATUS_BAD_ADDRESS = -3, //< The address is out of bounds. + FLASH_STATUS_BUSY = -4, //< The flash is busy. +}; + +/** + * @brief The status of a flash operation. + */ +typedef int16_t flash_status_t; + +/** + * @brief Initializes the flash driver. + * + * This function initializes the flash driver and prepares it for use. + * It should be called before any other flash-related functions are used. + */ +void flash_init(void); + +/** + * @brief Checks if the flash is busy. + * + * This function checks if the flash is currently busy with an operation. + * + * @return FLASH_STATUS_SUCCESS if the flash is not busy, FLASH_STATUS_BUSY if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_is_busy(void); + +/** + * @brief Initiates a chip erase operation. + * + * This function does not wait for the flash to become ready. + * + * @return FLASH_STATUS_SUCCESS if the erase command was successfully sent, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_begin_erase_chip(void); + +/** + * @brief Waits for the chip erase operation to complete. + * + * This function waits for the chip erase operation to complete. + * + * @return FLASH_STATUS_SUCCESS if the chip erase operation completed successfully, FLASH_STATUS_TIMEOUT if the flash was still busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_wait_erase_chip(void); + +/** + * @brief Erases the entire flash memory chip. + * + * This function initiates an erase operation to erase the entire flash memory chip. + * It waits for the operation to complete. + * + * @return FLASH_STATUS_SUCCESS if the erase was successfully executed, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_erase_chip(void); + +/** + * @brief Erases a block of flash memory. + * + * This function initiates an erase operation to erase a block of flash memory. + * It waits for the operation to complete. + * + * @param addr The address of the block to erase. + * + * @return FLASH_STATUS_SUCCESS if the erase was successfully executed, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_erase_block(uint32_t addr); + +/** + * @brief Erases a sector of flash memory. + * + * This function initiates an erase operation to erase a sector of flash memory. + * It waits for the operation to complete. + * + * @param addr The address of the sector to erase. + * + * @return FLASH_STATUS_SUCCESS if the erase was successfully executed, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_erase_sector(uint32_t addr); + +/** + * @brief Reads a range of flash memory. + * + * This function reads a range of flash memory into a buffer. + * + * @param addr The address of the range to read. + * @param buf A pointer to the buffer to read the range into. + * @param len The length of the range to read. + * + * @return FLASH_STATUS_SUCCESS if the range was successfully read, FLASH_STATUS_BAD_ADDRESS if the address is out of bounds, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_read_range(uint32_t addr, void *buf, size_t len); + +/** + * @brief Writes a range of flash memory. + * + * This function writes a range of flash memory from a buffer. + * + * @param addr The address of the range to write. + * @param buf A pointer to the buffer to write to the range. + * @param len The length of the range to write. + * + * @return FLASH_STATUS_SUCCESS if the range was successfully written, FLASH_STATUS_BAD_ADDRESS if the address is out of bounds, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_write_range(uint32_t addr, const void *buf, size_t len); + +#ifdef __cplusplus +} +#endif diff --git a/drivers/flash/flash_spi.c b/drivers/flash/flash_spi.c index 0c0eb8a99e5b..7226773ff412 100644 --- a/drivers/flash/flash_spi.c +++ b/drivers/flash/flash_spi.c @@ -1,22 +1,10 @@ -/* -Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +// Copyright 2021 Westberry Technology (ChangZhou) Corp., Ltd +// Copyright 2024 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later #include +#include "flash.h" #include "util.h" #include "wait.h" #include "debug.h" @@ -69,33 +57,43 @@ static bool spi_flash_start(void) { return spi_start(EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN, EXTERNAL_FLASH_SPI_LSBFIRST, EXTERNAL_FLASH_SPI_MODE, EXTERNAL_FLASH_SPI_CLOCK_DIVISOR); } -static flash_status_t spi_flash_wait_while_busy(void) { - uint32_t deadline = timer_read32() + EXTERNAL_FLASH_SPI_TIMEOUT; +static flash_status_t spi_flash_wait_while_busy_multiplier(int multiplier) { flash_status_t response = FLASH_STATUS_SUCCESS; - uint8_t retval; - + uint32_t deadline = timer_read32() + ((EXTERNAL_FLASH_SPI_TIMEOUT)*multiplier); do { - bool res = spi_flash_start(); - if (!res) { - dprint("Failed to start SPI! [spi flash wait while busy]\n"); - return FLASH_STATUS_ERROR; - } - - spi_write(FLASH_CMD_RDSR); - - retval = (uint8_t)spi_read(); - - spi_stop(); - if (timer_read32() >= deadline) { response = FLASH_STATUS_TIMEOUT; break; } - } while (retval & FLASH_FLAG_WIP); + response = flash_is_busy(); + } while (response == FLASH_STATUS_BUSY); return response; } +static flash_status_t spi_flash_wait_while_busy(void) { + return spi_flash_wait_while_busy_multiplier(1); +} + +flash_status_t flash_is_busy(void) { + bool res = spi_flash_start(); + if (!res) { + dprint("Failed to start SPI! [spi flash wait while busy]\n"); + return FLASH_STATUS_ERROR; + } + + spi_write(FLASH_CMD_RDSR); + spi_status_t status = spi_read(); + spi_stop(); + + if (status < 0) { + return status; + } + + uint8_t sr = (uint8_t)status; + return (sr & FLASH_FLAG_WIP) ? FLASH_STATUS_BUSY : FLASH_STATUS_SUCCESS; +} + static flash_status_t spi_flash_write_enable(void) { bool res = spi_flash_start(); if (!res) { @@ -104,7 +102,6 @@ static flash_status_t spi_flash_write_enable(void) { } spi_write(FLASH_CMD_WREN); - spi_stop(); return FLASH_STATUS_SUCCESS; @@ -118,7 +115,6 @@ static flash_status_t spi_flash_write_disable(void) { } spi_write(FLASH_CMD_WRDI); - spi_stop(); return FLASH_STATUS_SUCCESS; @@ -166,7 +162,7 @@ void flash_init(void) { spi_init(); } -flash_status_t flash_erase_chip(void) { +flash_status_t flash_begin_erase_chip(void) { flash_status_t response = FLASH_STATUS_SUCCESS; /* Wait for the write-in-progress bit to be cleared. */ @@ -191,17 +187,28 @@ flash_status_t flash_erase_chip(void) { } spi_write(FLASH_CMD_CE); spi_stop(); + return FLASH_STATUS_SUCCESS; +} - /* Wait for the write-in-progress bit to be cleared.*/ - response = spi_flash_wait_while_busy(); +flash_status_t flash_wait_erase_chip(void) { + flash_status_t response = spi_flash_wait_while_busy_multiplier(250); // Chip erase can take a long time, wait 250x the usual timeout if (response != FLASH_STATUS_SUCCESS) { dprint("Failed to check WIP flag! [spi flash erase chip]\n"); return response; } - return response; } +flash_status_t flash_erase_chip(void) { + flash_status_t response = flash_begin_erase_chip(); + if (response != FLASH_STATUS_SUCCESS) { + dprint("Failed to begin erase chip! [spi flash erase chip]\n"); + return response; + } + + return flash_wait_erase_chip(); +} + flash_status_t flash_erase_sector(uint32_t addr) { flash_status_t response = FLASH_STATUS_SUCCESS; @@ -282,7 +289,7 @@ flash_status_t flash_erase_block(uint32_t addr) { return response; } -flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len) { +flash_status_t flash_read_range(uint32_t addr, void *buf, size_t len) { flash_status_t response = FLASH_STATUS_SUCCESS; uint8_t * read_buf = (uint8_t *)buf; @@ -313,7 +320,7 @@ flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len) { return response; } -flash_status_t flash_write_block(uint32_t addr, const void *buf, size_t len) { +flash_status_t flash_write_range(uint32_t addr, const void *buf, size_t len) { flash_status_t response = FLASH_STATUS_SUCCESS; uint8_t * write_buf = (uint8_t *)buf; diff --git a/drivers/flash/flash_spi.h b/drivers/flash/flash_spi.h index 87460fc210ee..7a979daf0f70 100644 --- a/drivers/flash/flash_spi.h +++ b/drivers/flash/flash_spi.h @@ -17,6 +17,8 @@ along with this program. If not, see . #pragma once +#include "flash.h" + /* All the following default configurations are based on MX25L4006E Nor FLASH. */ /* @@ -105,32 +107,3 @@ along with this program. If not, see . The page count of the FLASH, calculated by total FLASH size and page size. */ #define EXTERNAL_FLASH_PAGE_COUNT ((EXTERNAL_FLASH_SIZE) / (EXTERNAL_FLASH_PAGE_SIZE)) - -typedef int16_t flash_status_t; - -#define FLASH_STATUS_SUCCESS (0) -#define FLASH_STATUS_ERROR (-1) -#define FLASH_STATUS_TIMEOUT (-2) -#define FLASH_STATUS_BAD_ADDRESS (-3) - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void flash_init(void); - -flash_status_t flash_erase_chip(void); - -flash_status_t flash_erase_block(uint32_t addr); - -flash_status_t flash_erase_sector(uint32_t addr); - -flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len); - -flash_status_t flash_write_block(uint32_t addr, const void *buf, size_t len); - -#ifdef __cplusplus -} -#endif diff --git a/drivers/wear_leveling/wear_leveling_flash_spi.c b/drivers/wear_leveling/wear_leveling_flash_spi.c index 6191f8bf0958..304aed1641fb 100644 --- a/drivers/wear_leveling/wear_leveling_flash_spi.c +++ b/drivers/wear_leveling/wear_leveling_flash_spi.c @@ -58,7 +58,7 @@ bool backing_store_read(uint32_t address, backing_store_int_t *value) { bool backing_store_read_bulk(uint32_t address, backing_store_int_t *values, size_t item_count) { bs_dprintf("Read "); uint32_t offset = (WEAR_LEVELING_EXTERNAL_FLASH_BLOCK_OFFSET) * (EXTERNAL_FLASH_BLOCK_SIZE) + address; - flash_status_t status = flash_read_block(offset, values, sizeof(backing_store_int_t) * item_count); + flash_status_t status = flash_read_range(offset, values, sizeof(backing_store_int_t) * item_count); if (status == FLASH_STATUS_SUCCESS) { for (size_t i = 0; i < item_count; ++i) { values[i] = ~values[i]; @@ -88,7 +88,7 @@ bool backing_store_write_bulk(uint32_t address, backing_store_int_t *values, siz } // Write out the block - if (flash_write_block(offset, temp, sizeof(backing_store_int_t) * this_loop) != FLASH_STATUS_SUCCESS) { + if (flash_write_range(offset, temp, sizeof(backing_store_int_t) * this_loop) != FLASH_STATUS_SUCCESS) { return false; } From 869b7d9ae63f2d5990934f938e44ecfe6d1d9e1f Mon Sep 17 00:00:00 2001 From: Cipulot <40441626+Cipulot@users.noreply.github.com> Date: Wed, 3 Jul 2024 06:35:26 +0900 Subject: [PATCH 0100/1205] Fix index EC Dolice (#24033) * Update keyboard.json Fixed wrong index in keyboard.json * Small touch layout --- keyboards/cipulot/ec_dolice/keyboard.json | 8 ++++---- keyboards/cipulot/ec_dolice/keymaps/default/keymap.c | 2 +- keyboards/cipulot/ec_dolice/keymaps/via/keymap.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/cipulot/ec_dolice/keyboard.json b/keyboards/cipulot/ec_dolice/keyboard.json index e81422e2c546..cebaa50ba830 100644 --- a/keyboards/cipulot/ec_dolice/keyboard.json +++ b/keyboards/cipulot/ec_dolice/keyboard.json @@ -100,7 +100,7 @@ {"matrix": [3, 13], "x": 15.5, "y": 3, "w": 1.75}, {"matrix": [3, 14], "x": 17.25, "y": 3}, {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.5}, - {"matrix": [4, 2], "x": 4.25, "y": 4, "w": 1.5}, + {"matrix": [4, 3], "x": 4.25, "y": 4, "w": 1.5}, {"matrix": [4, 5], "x": 5.75, "y": 4, "w": 2}, {"matrix": [4, 6], "x": 7.75, "y": 4, "w": 1.25}, {"matrix": [4, 8], "x": 9.5, "y": 4, "w": 2.75}, @@ -170,7 +170,7 @@ {"matrix": [3, 13], "x": 15.5, "y": 3, "w": 1.75}, {"matrix": [3, 14], "x": 17.25, "y": 3}, {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.5}, - {"matrix": [4, 2], "x": 4.25, "y": 4, "w": 1.5}, + {"matrix": [4, 3], "x": 4.25, "y": 4, "w": 1.5}, {"matrix": [4, 5], "x": 5.75, "y": 4, "w": 2}, {"matrix": [4, 6], "x": 7.75, "y": 4, "w": 1.25}, {"matrix": [4, 8], "x": 9.5, "y": 4, "w": 2.75}, @@ -238,7 +238,7 @@ {"matrix": [3, 12], "x": 14.5, "y": 3}, {"matrix": [3, 13], "x": 15.5, "y": 3, "w": 2.75}, {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.5}, - {"matrix": [4, 2], "x": 4.25, "y": 4, "w": 1.5}, + {"matrix": [4, 3], "x": 4.25, "y": 4, "w": 1.5}, {"matrix": [4, 5], "x": 5.75, "y": 4, "w": 2}, {"matrix": [4, 6], "x": 7.75, "y": 4, "w": 1.25}, {"matrix": [4, 8], "x": 9.5, "y": 4, "w": 2.75}, @@ -307,7 +307,7 @@ {"matrix": [3, 12], "x": 14.5, "y": 3}, {"matrix": [3, 13], "x": 15.5, "y": 3, "w": 2.75}, {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.5}, - {"matrix": [4, 2], "x": 4.25, "y": 4, "w": 1.5}, + {"matrix": [4, 3], "x": 4.25, "y": 4, "w": 1.5}, {"matrix": [4, 5], "x": 5.75, "y": 4, "w": 2}, {"matrix": [4, 6], "x": 7.75, "y": 4, "w": 1.25}, {"matrix": [4, 8], "x": 9.5, "y": 4, "w": 2.75}, diff --git a/keyboards/cipulot/ec_dolice/keymaps/default/keymap.c b/keyboards/cipulot/ec_dolice/keymaps/default/keymap.c index 5a501e29823c..8e6745b68191 100644 --- a/keyboards/cipulot/ec_dolice/keymaps/default/keymap.c +++ b/keyboards/cipulot/ec_dolice/keymaps/default/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - KC_PSCR, KC_ESC, 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_DEL, + KC_PSCR, KC_ESC, 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_PGUP, 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_PGDN, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), diff --git a/keyboards/cipulot/ec_dolice/keymaps/via/keymap.c b/keyboards/cipulot/ec_dolice/keymaps/via/keymap.c index 5a501e29823c..8e6745b68191 100644 --- a/keyboards/cipulot/ec_dolice/keymaps/via/keymap.c +++ b/keyboards/cipulot/ec_dolice/keymaps/via/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - KC_PSCR, KC_ESC, 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_DEL, + KC_PSCR, KC_ESC, 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_PGUP, 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_PGDN, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), From bc0c69570b8a8b1d9a754a280053e49a825b24d7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 3 Jul 2024 17:18:27 +1000 Subject: [PATCH 0101/1205] Rename encoder pins defines (#24003) --- docs/features/encoders.md | 28 ++++++++--------- docs/features/split_keyboard.md | 4 +-- drivers/encoder/encoder_quadrature.c | 18 +++++------ .../wings42/rev2/keymaps/via/config.h | 4 +-- .../handwired/sick68/keymaps/via/config.h | 4 +-- .../gskt00/keymaps/default-poly/config.h | 4 +-- keyboards/pica40/rev2/rev2.c | 4 +-- keyboards/ploopyco/mouse/config.h | 4 +-- keyboards/ploopyco/ploopyco.c | 4 +-- keyboards/ploopyco/trackball/config.h | 4 +-- keyboards/ploopyco/trackball_mini/config.h | 4 +-- keyboards/ploopyco/trackball_thumb/config.h | 4 +-- keyboards/rgbkb/sol/keymaps/default/keymap.c | 2 +- keyboards/rgbkb/sol/rev2/config.h | 8 ++--- keyboards/terrazzo/readme.md | 4 +-- lib/python/qmk/cli/generate/config_h.py | 4 +-- lib/python/qmk/info.py | 4 +-- quantum/encoder.h | 31 ++++++++++++------- quantum/encoder/tests/config_mock.h | 4 +-- .../tests/config_mock_split_left_eq_right.h | 8 ++--- .../tests/config_mock_split_left_gt_right.h | 8 ++--- .../tests/config_mock_split_left_lt_right.h | 8 ++--- .../encoder/tests/config_mock_split_no_left.h | 8 ++--- .../tests/config_mock_split_no_right.h | 8 ++--- .../encoder/tests/config_mock_split_role.h | 8 ++--- 25 files changed, 100 insertions(+), 91 deletions(-) diff --git a/docs/features/encoders.md b/docs/features/encoders.md index 3d1cac79af7a..eea70dafecfd 100644 --- a/docs/features/encoders.md +++ b/docs/features/encoders.md @@ -9,15 +9,15 @@ ENCODER_ENABLE = yes and this to your `config.h`: ```c -#define ENCODERS_PAD_A { B12 } -#define ENCODERS_PAD_B { B13 } +#define ENCODER_A_PINS { B12 } +#define ENCODER_B_PINS { B13 } ``` Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.: ```c -#define ENCODERS_PAD_A { encoder1a, encoder2a } -#define ENCODERS_PAD_B { encoder1b, encoder2b } +#define ENCODER_A_PINS { encoder1a, encoder2a } +#define ENCODER_B_PINS { encoder1b, encoder2b } ``` If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions. They can also be flipped with a define: @@ -49,8 +49,8 @@ For 4× encoders you also can assign default position if encoder skips pulses wh If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this: ```c -#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } -#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +#define ENCODER_A_PINS_RIGHT { encoder1a, encoder2a } +#define ENCODER_B_PINS_RIGHT { encoder1b, encoder2b } #define ENCODER_RESOLUTIONS_RIGHT { 2, 4 } ``` @@ -59,11 +59,11 @@ If the `_RIGHT` definitions aren't specified in your `config.h`, then the non-`_ Additionally, if one side does not have an encoder, you can specify `{}` for the pins/resolution -- for example, a split keyboard with only a right-side encoder: ```c -#define ENCODERS_PAD_A { } -#define ENCODERS_PAD_B { } +#define ENCODER_A_PINS { } +#define ENCODER_B_PINS { } #define ENCODER_RESOLUTIONS { } -#define ENCODERS_PAD_A_RIGHT { B12 } -#define ENCODERS_PAD_B_RIGHT { B13 } +#define ENCODER_A_PINS_RIGHT { B12 } +#define ENCODER_B_PINS_RIGHT { B13 } #define ENCODER_RESOLUTIONS_RIGHT { 4 } ``` @@ -174,13 +174,13 @@ Multiple encoders may share pins so long as each encoder has a distinct pair of For example you can support two encoders using only 3 pins like this ``` -#define ENCODERS_PAD_A { B1, B1 } -#define ENCODERS_PAD_B { B2, B3 } +#define ENCODER_A_PINS { B1, B1 } +#define ENCODER_B_PINS { B2, B3 } ``` You could even support three encoders using only three pins (one per encoder) however in this configuration, rotating two encoders which share pins simultaneously will often generate incorrect output. For example: ``` -#define ENCODERS_PAD_A { B1, B1, B2 } -#define ENCODERS_PAD_B { B2, B3, B3 } +#define ENCODER_A_PINS { B1, B1, B2 } +#define ENCODER_B_PINS { B2, B3, B3 } ``` Here rotating Encoder 0 `B1 B2` and Encoder 1 `B1 B3` could be interpreted as rotating Encoder 2 `B2 B3` or `B3 B2` depending on the timing. This may still be a useful configuration depending on your use case diff --git a/docs/features/split_keyboard.md b/docs/features/split_keyboard.md index 6efa1c2a35c3..49582c3946f5 100644 --- a/docs/features/split_keyboard.md +++ b/docs/features/split_keyboard.md @@ -417,8 +417,8 @@ This allows you to specify a different set of pins for the matrix on the right s This allows you to specify a different set of direct pins for the right side. ```c -#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } -#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +#define ENCODER_A_PINS_RIGHT { encoder1a, encoder2a } +#define ENCODER_B_PINS_RIGHT { encoder1b, encoder2b } ``` This allows you to specify a different set of encoder pins for the right side. diff --git a/drivers/encoder/encoder_quadrature.c b/drivers/encoder/encoder_quadrature.c index cd589bf1e205..086f500391c7 100644 --- a/drivers/encoder/encoder_quadrature.c +++ b/drivers/encoder/encoder_quadrature.c @@ -22,7 +22,7 @@ #endif #undef ENCODER_DEFAULT_PIN_API_IMPL -#if defined(ENCODERS_PAD_A) && defined(ENCODERS_PAD_B) +#if defined(ENCODER_A_PINS) && defined(ENCODER_B_PINS) // Inform the quadrature driver that it needs to implement pin init/read functions # define ENCODER_DEFAULT_PIN_API_IMPL #endif @@ -34,8 +34,8 @@ __attribute__((weak)) uint8_t encoder_quadrature_read_pin(uint8_t index, bool pa #ifdef ENCODER_DEFAULT_PIN_API_IMPL -static pin_t encoders_pad_a[NUM_ENCODERS_MAX_PER_SIDE] = ENCODERS_PAD_A; -static pin_t encoders_pad_b[NUM_ENCODERS_MAX_PER_SIDE] = ENCODERS_PAD_B; +static pin_t encoders_pad_a[NUM_ENCODERS_MAX_PER_SIDE] = ENCODER_A_PINS; +static pin_t encoders_pad_b[NUM_ENCODERS_MAX_PER_SIDE] = ENCODER_B_PINS; __attribute__((weak)) void encoder_wait_pullup_charge(void) { wait_us(100); @@ -123,25 +123,25 @@ void encoder_driver_init(void) { // here, but it's the simplest solution. memset(encoder_state, 0, sizeof(encoder_state)); memset(encoder_pulses, 0, sizeof(encoder_pulses)); - const pin_t encoders_pad_a_left[] = ENCODERS_PAD_A; - const pin_t encoders_pad_b_left[] = ENCODERS_PAD_B; + const pin_t encoders_pad_a_left[] = ENCODER_A_PINS; + const pin_t encoders_pad_b_left[] = ENCODER_B_PINS; for (uint8_t i = 0; i < thisCount; i++) { encoders_pad_a[i] = encoders_pad_a_left[i]; encoders_pad_b[i] = encoders_pad_b_left[i]; } #endif -#if defined(SPLIT_KEYBOARD) && defined(ENCODERS_PAD_A_RIGHT) && defined(ENCODERS_PAD_B_RIGHT) +#if defined(SPLIT_KEYBOARD) && defined(ENCODER_A_PINS_RIGHT) && defined(ENCODER_B_PINS_RIGHT) // Re-initialise the pads if it's the right-hand side if (!isLeftHand) { - const pin_t encoders_pad_a_right[] = ENCODERS_PAD_A_RIGHT; - const pin_t encoders_pad_b_right[] = ENCODERS_PAD_B_RIGHT; + const pin_t encoders_pad_a_right[] = ENCODER_A_PINS_RIGHT; + const pin_t encoders_pad_b_right[] = ENCODER_B_PINS_RIGHT; for (uint8_t i = 0; i < thisCount; i++) { encoders_pad_a[i] = encoders_pad_a_right[i]; encoders_pad_b[i] = encoders_pad_b_right[i]; } } -#endif // defined(SPLIT_KEYBOARD) && defined(ENCODERS_PAD_A_RIGHT) && defined(ENCODERS_PAD_B_RIGHT) +#endif // defined(SPLIT_KEYBOARD) && defined(ENCODER_A_PINS_RIGHT) && defined(ENCODER_B_PINS_RIGHT) // Encoder resolutions is defined differently in config.h, so concatenate #if defined(SPLIT_KEYBOARD) && defined(ENCODER_RESOLUTIONS) diff --git a/keyboards/dailycraft/wings42/rev2/keymaps/via/config.h b/keyboards/dailycraft/wings42/rev2/keymaps/via/config.h index 3e0c8d146af0..6a9ab04738da 100644 --- a/keyboards/dailycraft/wings42/rev2/keymaps/via/config.h +++ b/keyboards/dailycraft/wings42/rev2/keymaps/via/config.h @@ -15,6 +15,6 @@ */ #pragma once -#define ENCODERS_PAD_A { B5, B6 } -#define ENCODERS_PAD_B { B4, B2 } +#define ENCODER_A_PINS { B5, B6 } +#define ENCODER_B_PINS { B4, B2 } #define ENCODER_RESOLUTION 4 diff --git a/keyboards/handwired/sick68/keymaps/via/config.h b/keyboards/handwired/sick68/keymaps/via/config.h index 4ce1e3e78595..bf6fd3ea4f7c 100644 --- a/keyboards/handwired/sick68/keymaps/via/config.h +++ b/keyboards/handwired/sick68/keymaps/via/config.h @@ -15,6 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F1 } +#define ENCODER_A_PINS { F0 } +#define ENCODER_B_PINS { F1 } #define ENCODER_RESOLUTION 4 diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/config.h b/keyboards/kapcave/gskt00/keymaps/default-poly/config.h index 40a7c6ec47e7..9d03a669c85c 100644 --- a/keyboards/kapcave/gskt00/keymaps/default-poly/config.h +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/config.h @@ -16,8 +16,8 @@ along with this program. If not, see . */ #pragma once -#define ENCODERS_PAD_A { D5 } -#define ENCODERS_PAD_B { D3 } +#define ENCODER_A_PINS { D5 } +#define ENCODER_B_PINS { D3 } #define WS2812_DI_PIN D0 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/pica40/rev2/rev2.c b/keyboards/pica40/rev2/rev2.c index 0ba9a537341f..b5d79508fcaf 100644 --- a/keyboards/pica40/rev2/rev2.c +++ b/keyboards/pica40/rev2/rev2.c @@ -6,8 +6,8 @@ #ifdef ENCODER_ENABLE // code based on encoder.c -#define ENCODER_PIN_A (((pin_t[])ENCODERS_PAD_A)[0]) -#define ENCODER_PIN_B (((pin_t[])ENCODERS_PAD_B)[0]) +#define ENCODER_PIN_A (((pin_t[])ENCODER_A_PINS)[0]) +#define ENCODER_PIN_B (((pin_t[])ENCODER_B_PINS)[0]) // custom handler that returns encoder B pin status from slave side void encoder_sync_slave_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { diff --git a/keyboards/ploopyco/mouse/config.h b/keyboards/ploopyco/mouse/config.h index 0375a8875a47..0f8774dcd7fd 100644 --- a/keyboards/ploopyco/mouse/config.h +++ b/keyboards/ploopyco/mouse/config.h @@ -38,5 +38,5 @@ /* Custom encoder needs to specify just how many encoders we have */ #define NUM_ENCODERS 1 -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F4 } +#define ENCODER_A_PINS { F0 } +#define ENCODER_B_PINS { F4 } diff --git a/keyboards/ploopyco/ploopyco.c b/keyboards/ploopyco/ploopyco.c index e4726238f267..a6f76203d644 100644 --- a/keyboards/ploopyco/ploopyco.c +++ b/keyboards/ploopyco/ploopyco.c @@ -71,8 +71,8 @@ float scroll_accumulated_v = 0; #ifdef ENCODER_ENABLE uint16_t lastScroll = 0; // Previous confirmed wheel event uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed -pin_t encoder_pins_a[1] = ENCODERS_PAD_A; -pin_t encoder_pins_b[1] = ENCODERS_PAD_B; +pin_t encoder_pins_a[1] = ENCODER_A_PINS; +pin_t encoder_pins_b[1] = ENCODER_B_PINS; bool debug_encoder = false; bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/ploopyco/trackball/config.h b/keyboards/ploopyco/trackball/config.h index 80457d062aa8..2aac27437ab6 100644 --- a/keyboards/ploopyco/trackball/config.h +++ b/keyboards/ploopyco/trackball/config.h @@ -38,5 +38,5 @@ /* Custom encoder needs to specify just how many encoders we have */ #define NUM_ENCODERS 1 -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F4 } +#define ENCODER_A_PINS { F0 } +#define ENCODER_B_PINS { F4 } diff --git a/keyboards/ploopyco/trackball_mini/config.h b/keyboards/ploopyco/trackball_mini/config.h index c5d2d5694e4c..2e0b570bbae2 100644 --- a/keyboards/ploopyco/trackball_mini/config.h +++ b/keyboards/ploopyco/trackball_mini/config.h @@ -38,5 +38,5 @@ /* Custom encoder needs to specify just how many encoders we have */ #define NUM_ENCODERS 1 -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F4 } +#define ENCODER_A_PINS { F0 } +#define ENCODER_B_PINS { F4 } diff --git a/keyboards/ploopyco/trackball_thumb/config.h b/keyboards/ploopyco/trackball_thumb/config.h index 631456d9d318..f03ffc769903 100644 --- a/keyboards/ploopyco/trackball_thumb/config.h +++ b/keyboards/ploopyco/trackball_thumb/config.h @@ -42,5 +42,5 @@ /* Custom encoder needs to specify just how many encoders we have */ #define NUM_ENCODERS 1 -#define ENCODERS_PAD_A { F4 } -#define ENCODERS_PAD_B { F0 } +#define ENCODER_A_PINS { F4 } +#define ENCODER_B_PINS { F0 } diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index 4a6511cbfc74..8997e9a582e4 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -201,7 +201,7 @@ const rgb_matrix_f rgb_matrix_functions[6][2] = { #ifdef ENCODER_ENABLE -static pin_t encoders_pad_a[] = ENCODERS_PAD_A; +static pin_t encoders_pad_a[] = ENCODER_A_PINS; #define NUMBER_OF_ENCODERS ARRAY_SIZE(encoders_pad_a) const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { diff --git a/keyboards/rgbkb/sol/rev2/config.h b/keyboards/rgbkb/sol/rev2/config.h index ab5150051a04..5867c6dfe368 100644 --- a/keyboards/rgbkb/sol/rev2/config.h +++ b/keyboards/rgbkb/sol/rev2/config.h @@ -49,12 +49,12 @@ along with this program. If not, see . // Encoder support #ifndef EXTRA_ENCODERS_ENABLE -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D6 } +#define ENCODER_A_PINS { D2 } +#define ENCODER_B_PINS { D6 } #else #ifdef OLED_ENABLE #error Extra encoders cannot be enabled at the same time as the OLED Driver as they use the same pins. #endif -#define ENCODERS_PAD_A { D2, D1, B0 } -#define ENCODERS_PAD_B { D6, B1, D0 } +#define ENCODER_A_PINS { D2, D1, B0 } +#define ENCODER_B_PINS { D6, B1, D0 } #endif diff --git a/keyboards/terrazzo/readme.md b/keyboards/terrazzo/readme.md index e0f4f3457f06..828819f7b455 100644 --- a/keyboards/terrazzo/readme.md +++ b/keyboards/terrazzo/readme.md @@ -82,8 +82,8 @@ Change pinouts, Pro Micro does not have the "F0" pin. Set encoder to just top or bottom position. ``` -#define ENCODERS_PAD_A { C6 } -#define ENCODERS_PAD_B { D4 } +#define ENCODER_A_PINS { C6 } +#define ENCODER_B_PINS { D4 } ``` ## Encoder Setup diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index fc681300a371..d613f7b92c1c 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -135,8 +135,8 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''): b_pads.append(encoder["pin_b"]) resolutions.append(encoder.get("resolution", None)) - config_h_lines.append(generate_define(f'ENCODERS_PAD_A{postfix}', f'{{ {", ".join(a_pads)} }}')) - config_h_lines.append(generate_define(f'ENCODERS_PAD_B{postfix}', f'{{ {", ".join(b_pads)} }}')) + config_h_lines.append(generate_define(f'ENCODER_A_PINS{postfix}', f'{{ {", ".join(a_pads)} }}')) + config_h_lines.append(generate_define(f'ENCODER_B_PINS{postfix}', f'{{ {", ".join(b_pads)} }}')) if None in resolutions: cli.log.debug(f"Unable to generate ENCODER_RESOLUTION{postfix} configuration") diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 091a11854c01..5b3b2490150f 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -375,8 +375,8 @@ def _extract_audio(info_data, config_c): def _extract_encoders_values(config_c, postfix=''): """Common encoder extraction logic """ - a_pad = config_c.get(f'ENCODERS_PAD_A{postfix}', '').replace(' ', '')[1:-1] - b_pad = config_c.get(f'ENCODERS_PAD_B{postfix}', '').replace(' ', '')[1:-1] + a_pad = config_c.get(f'ENCODER_A_PINS{postfix}', '').replace(' ', '')[1:-1] + b_pad = config_c.get(f'ENCODER_B_PINS{postfix}', '').replace(' ', '')[1:-1] resolutions = config_c.get(f'ENCODER_RESOLUTIONS{postfix}', '').replace(' ', '')[1:-1] default_resolution = config_c.get('ENCODER_RESOLUTION', None) diff --git a/quantum/encoder.h b/quantum/encoder.h index 317a91f1da54..1d2f1f46c7f5 100644 --- a/quantum/encoder.h +++ b/quantum/encoder.h @@ -22,6 +22,21 @@ #include "gpio.h" #include "util.h" +// ======== DEPRECATED DEFINES - DO NOT USE ======== +#ifdef ENCODERS_PAD_A +# define ENCODER_A_PINS ENCODERS_PAD_A +#endif +#ifdef ENCODERS_PAD_B +# define ENCODER_B_PINS ENCODERS_PAD_B +#endif +#ifdef ENCODERS_PAD_A_RIGHT +# define ENCODER_A_PINS_RIGHT ENCODERS_PAD_A_RIGHT +#endif +#ifdef ENCODERS_PAD_B_RIGHT +# define ENCODER_B_PINS_RIGHT ENCODERS_PAD_B_RIGHT +#endif +// ======== + #ifdef ENCODER_ENABLE __attribute__((weak)) bool should_process_encoder(void); @@ -36,16 +51,16 @@ bool encoder_update_user(uint8_t index, bool clockwise); # ifdef SPLIT_KEYBOARD -# if defined(ENCODERS_PAD_A_RIGHT) +# if defined(ENCODER_A_PINS_RIGHT) # ifndef NUM_ENCODERS_LEFT -# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A)) +# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODER_A_PINS)) # endif # ifndef NUM_ENCODERS_RIGHT -# define NUM_ENCODERS_RIGHT ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A_RIGHT)) +# define NUM_ENCODERS_RIGHT ARRAY_SIZE(((pin_t[])ENCODER_A_PINS_RIGHT)) # endif # else # ifndef NUM_ENCODERS_LEFT -# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A)) +# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODER_A_PINS)) # endif # ifndef NUM_ENCODERS_RIGHT # define NUM_ENCODERS_RIGHT NUM_ENCODERS_LEFT @@ -58,19 +73,13 @@ bool encoder_update_user(uint8_t index, bool clockwise); # else // SPLIT_KEYBOARD # ifndef NUM_ENCODERS -# define NUM_ENCODERS ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A)) +# define NUM_ENCODERS ARRAY_SIZE(((pin_t[])ENCODER_A_PINS)) # endif # define NUM_ENCODERS_LEFT NUM_ENCODERS # define NUM_ENCODERS_RIGHT 0 # endif // SPLIT_KEYBOARD -# ifndef NUM_ENCODERS -# define NUM_ENCODERS 0 -# define NUM_ENCODERS_LEFT 0 -# define NUM_ENCODERS_RIGHT 0 -# endif // NUM_ENCODERS - # define NUM_ENCODERS_MAX_PER_SIDE MAX(NUM_ENCODERS_LEFT, NUM_ENCODERS_RIGHT) # ifndef MAX_QUEUED_ENCODER_EVENTS diff --git a/quantum/encoder/tests/config_mock.h b/quantum/encoder/tests/config_mock.h index 9eb59ddc8813..b5a1537d8a24 100644 --- a/quantum/encoder/tests/config_mock.h +++ b/quantum/encoder/tests/config_mock.h @@ -7,9 +7,9 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_left_eq_right.h b/quantum/encoder/tests/config_mock_split_left_eq_right.h index ea795657ef17..a4aa051ef1af 100644 --- a/quantum/encoder/tests/config_mock_split_left_eq_right.h +++ b/quantum/encoder/tests/config_mock_split_left_eq_right.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 4, 6 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 5, 7 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_left_gt_right.h b/quantum/encoder/tests/config_mock_split_left_gt_right.h index abcfe0391896..77190797add9 100644 --- a/quantum/encoder/tests/config_mock_split_left_gt_right.h +++ b/quantum/encoder/tests/config_mock_split_left_gt_right.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2, 4 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3, 5 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 6, 8 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 7, 9 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_left_lt_right.h b/quantum/encoder/tests/config_mock_split_left_lt_right.h index 075c774b0d11..61808e866e15 100644 --- a/quantum/encoder/tests/config_mock_split_left_lt_right.h +++ b/quantum/encoder/tests/config_mock_split_left_lt_right.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 4, 6, 8 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 5, 7, 9 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_no_left.h b/quantum/encoder/tests/config_mock_split_no_left.h index dfd8358929bc..599e584ff16a 100644 --- a/quantum/encoder/tests/config_mock_split_no_left.h +++ b/quantum/encoder/tests/config_mock_split_no_left.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ {} -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ {} -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 0, 2 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 1, 3 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_no_right.h b/quantum/encoder/tests/config_mock_split_no_right.h index 5683eade8c97..c3f753014c0c 100644 --- a/quantum/encoder/tests/config_mock_split_no_right.h +++ b/quantum/encoder/tests/config_mock_split_no_right.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ {} -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ {} #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_role.h b/quantum/encoder/tests/config_mock_split_role.h index ea795657ef17..a4aa051ef1af 100644 --- a/quantum/encoder/tests/config_mock_split_role.h +++ b/quantum/encoder/tests/config_mock_split_role.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 4, 6 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 5, 7 } #ifdef __cplusplus From f8596b40a4bb15a1881138baa8b8787277e2e622 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 3 Jul 2024 18:35:54 +1000 Subject: [PATCH 0102/1205] Normalise mouse keycodes (#23975) --- data/constants/keycodes/keycodes_0.0.5.hjson | 0 .../keycodes/keycodes_0.0.5_basic.hjson | 175 ++++++++++++++++++ docs/features/encoders.md | 8 +- docs/features/mouse_keys.md | 82 ++++---- docs/features/repeat_key.md | 8 +- docs/keycodes.md | 39 ++-- drivers/sensors/cirque_pinnacle_gestures.h | 2 +- .../lib/satisfaction75/satisfaction_encoder.c | 6 +- keyboards/dichotomy/keymaps/default/keymap.c | 16 +- quantum/action.c | 6 +- quantum/encoder.c | 4 +- quantum/keycode.h | 8 +- quantum/keycodes.h | 80 ++++---- quantum/mousekey.c | 112 +++++------ quantum/pointing_device/pointing_device.c | 2 +- .../pointing_device_auto_mouse.h | 2 +- quantum/quantum_keycodes_legacy.h | 39 ++++ quantum/repeat_key.c | 8 +- tests/test_common/keycode_table.cpp | 38 ++-- 19 files changed, 426 insertions(+), 209 deletions(-) create mode 100644 data/constants/keycodes/keycodes_0.0.5.hjson create mode 100644 data/constants/keycodes/keycodes_0.0.5_basic.hjson diff --git a/data/constants/keycodes/keycodes_0.0.5.hjson b/data/constants/keycodes/keycodes_0.0.5.hjson new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/data/constants/keycodes/keycodes_0.0.5_basic.hjson b/data/constants/keycodes/keycodes_0.0.5_basic.hjson new file mode 100644 index 000000000000..79b6bf6596ef --- /dev/null +++ b/data/constants/keycodes/keycodes_0.0.5_basic.hjson @@ -0,0 +1,175 @@ +{ + "keycodes": { + "0x00CD": { + "group": "mouse", + "key": "QK_MOUSE_CURSOR_UP", + "label": "Mouse cursor up", + "aliases": [ + "!reset!", + "MS_UP" + ] + }, + "0x00CE": { + "group": "mouse", + "key": "QK_MOUSE_CURSOR_DOWN", + "label": "Mouse cursor down", + "aliases": [ + "!reset!", + "MS_DOWN" + ] + }, + "0x00CF": { + "group": "mouse", + "key": "QK_MOUSE_CURSOR_LEFT", + "label": "Mouse cursor left", + "aliases": [ + "!reset!", + "MS_LEFT" + ] + }, + "0x00D0": { + "group": "mouse", + "key": "QK_MOUSE_CURSOR_RIGHT", + "label": "Mouse cursor right", + "aliases": [ + "!reset!", + "MS_RGHT" + ] + }, + "0x00D1": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_1", + "label": "Mouse button 1", + "aliases": [ + "!reset!", + "MS_BTN1" + ] + }, + "0x00D2": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_2", + "label": "Mouse button 2", + "aliases": [ + "!reset!", + "MS_BTN2" + ] + }, + "0x00D3": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_3", + "label": "Mouse button 3", + "aliases": [ + "!reset!", + "MS_BTN3" + ] + }, + "0x00D4": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_4", + "label": "Mouse button 4", + "aliases": [ + "!reset!", + "MS_BTN4" + ] + }, + "0x00D5": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_5", + "label": "Mouse button 5", + "aliases": [ + "!reset!", + "MS_BTN5" + ] + }, + "0x00D6": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_6", + "label": "Mouse button 6", + "aliases": [ + "!reset!", + "MS_BTN6" + ] + }, + "0x00D7": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_7", + "label": "Mouse button 7", + "aliases": [ + "!reset!", + "MS_BTN7" + ] + }, + "0x00D8": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_8", + "label": "Mouse button 8", + "aliases": [ + "!reset!", + "MS_BTN8" + ] + }, + "0x00D9": { + "group": "mouse", + "key": "QK_MOUSE_WHEEL_UP", + "label": "Mouse wheel up", + "aliases": [ + "!reset!", + "MS_WHLU" + ] + }, + "0x00DA": { + "group": "mouse", + "key": "QK_MOUSE_WHEEL_DOWN", + "label": "Mouse wheel down", + "aliases": [ + "!reset!", + "MS_WHLD" + ] + }, + "0x00DB": { + "group": "mouse", + "key": "QK_MOUSE_WHEEL_LEFT", + "label": "Mouse wheel left", + "aliases": [ + "!reset!", + "MS_WHLL" + ] + }, + "0x00DC": { + "group": "mouse", + "key": "QK_MOUSE_WHEEL_RIGHT", + "label": "Mouse wheel right", + "aliases": [ + "!reset!", + "MS_WHLR" + ] + }, + "0x00DD": { + "group": "mouse", + "key": "QK_MOUSE_ACCELERATION_0", + "label": "Set mouse acceleration to 0", + "aliases": [ + "!reset!", + "MS_ACL0" + ] + }, + "0x00DE": { + "group": "mouse", + "key": "QK_MOUSE_ACCELERATION_1", + "label": "Set mouse acceleration to 1", + "aliases": [ + "!reset!", + "MS_ACL1" + ] + }, + "0x00DF": { + "group": "mouse", + "key": "QK_MOUSE_ACCELERATION_2", + "label": "Set mouse acceleration to 2", + "aliases": [ + "!reset!", + "MS_ACL2" + ] + } + } +} diff --git a/docs/features/encoders.md b/docs/features/encoders.md index eea70dafecfd..73cbb4f3f3f7 100644 --- a/docs/features/encoders.md +++ b/docs/features/encoders.md @@ -84,10 +84,10 @@ Your `keymap.c` will then need an encoder mapping defined (for four layers and t ```c #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, - [2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) }, - [3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) }, + [0] = { ENCODER_CCW_CW(MS_WHLU, MS_WHLD), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, + [2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) }, + [3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) }, }; #endif ``` diff --git a/docs/features/mouse_keys.md b/docs/features/mouse_keys.md index c2b3e98f4241..4cc06c992aed 100644 --- a/docs/features/mouse_keys.md +++ b/docs/features/mouse_keys.md @@ -18,27 +18,27 @@ MOUSEKEY_ENABLE = yes In your keymap you can use the following keycodes to map key presses to mouse actions: -|Key |Aliases |Description | -|----------------|---------|-----------------| -|`KC_MS_UP` |`KC_MS_U`|Move cursor up | -|`KC_MS_DOWN` |`KC_MS_D`|Move cursor down | -|`KC_MS_LEFT` |`KC_MS_L`|Move cursor left | -|`KC_MS_RIGHT` |`KC_MS_R`|Move cursor right| -|`KC_MS_BTN1` |`KC_BTN1`|Press button 1 | -|`KC_MS_BTN2` |`KC_BTN2`|Press button 2 | -|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 | -|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 | -|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 | -|`KC_MS_BTN6` |`KC_BTN6`|Press button 6 | -|`KC_MS_BTN7` |`KC_BTN7`|Press button 7 | -|`KC_MS_BTN8` |`KC_BTN8`|Press button 8 | -|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up | -|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down | -|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left | -|`KC_MS_WH_RIGHT`|`KC_WH_R`|Move wheel right | -|`KC_MS_ACCEL0` |`KC_ACL0`|Set speed to 0 | -|`KC_MS_ACCEL1` |`KC_ACL1`|Set speed to 1 | -|`KC_MS_ACCEL2` |`KC_ACL2`|Set speed to 2 | +|Key |Aliases |Description | +|-------------------------|---------|---------------------------| +|`QK_MOUSE_CURSOR_UP` |`MS_UP` |Mouse cursor up | +|`QK_MOUSE_CURSOR_DOWN` |`MS_DOWN`|Mouse cursor down | +|`QK_MOUSE_CURSOR_LEFT` |`MS_LEFT`|Mouse cursor left | +|`QK_MOUSE_CURSOR_RIGHT` |`MS_RGHT`|Mouse cursor right | +|`QK_MOUSE_BUTTON_1` |`MS_BTN1`|Mouse button 1 | +|`QK_MOUSE_BUTTON_2` |`MS_BTN2`|Mouse button 2 | +|`QK_MOUSE_BUTTON_3` |`MS_BTN3`|Mouse button 3 | +|`QK_MOUSE_BUTTON_4` |`MS_BTN4`|Mouse button 4 | +|`QK_MOUSE_BUTTON_5` |`MS_BTN5`|Mouse button 5 | +|`QK_MOUSE_BUTTON_6` |`MS_BTN6`|Mouse button 6 | +|`QK_MOUSE_BUTTON_7` |`MS_BTN7`|Mouse button 7 | +|`QK_MOUSE_BUTTON_8` |`MS_BTN8`|Mouse button 8 | +|`QK_MOUSE_WHEEL_UP` |`MS_WHLU`|Mouse wheel up | +|`QK_MOUSE_WHEEL_DOWN` |`MS_WHLD`|Mouse wheel down | +|`QK_MOUSE_WHEEL_LEFT` |`MS_WHLL`|Mouse wheel left | +|`QK_MOUSE_WHEEL_RIGHT` |`MS_WHLR`|Mouse wheel right | +|`QK_MOUSE_ACCELERATION_0`|`MS_ACL0`|Set mouse acceleration to 0| +|`QK_MOUSE_ACCELERATION_1`|`MS_ACL1`|Set mouse acceleration to 1| +|`QK_MOUSE_ACCELERATION_2`|`MS_ACL2`|Set mouse acceleration to 2| ## Configuring mouse keys @@ -106,17 +106,17 @@ Tips: ### Constant mode -In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `KC_ACL0`, `KC_ACL1` and `KC_ACL2` change the cursor and scroll speed to their respective setting. +In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `MS_ACL0`, `MS_ACL1` and `MS_ACL2` change the cursor and scroll speed to their respective setting. You can choose whether speed selection is momentary or tap-to-select: * **Momentary:** The chosen speed is only active while you hold the respective key. When the key is raised, mouse keys returns to the unmodified speed. -* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `KC_ACL1`. There is no unmodified speed. +* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `MS_ACL1`. There is no unmodified speed. The default speeds from slowest to fastest are as follows: -* **Momentary:** `KC_ACL0` < `KC_ACL1` < *unmodified* < `KC_ACL2` -* **Tap-to-select:** `KC_ACL0` < `KC_ACL1` < `KC_ACL2` +* **Momentary:** `MS_ACL0` < `MS_ACL1` < *unmodified* < `MS_ACL2` +* **Tap-to-select:** `MS_ACL0` < `MS_ACL1` < `MS_ACL2` To use constant speed mode, you must at least define `MK_3_SPEED` in your keymap’s `config.h` file: @@ -138,32 +138,32 @@ Use the following settings if you want to adjust cursor movement or scrolling: |`MK_MOMENTARY_ACCEL` |*Not defined*|Enable momentary speed selection | |`MK_C_OFFSET_UNMOD` |16 |Cursor offset per movement (unmodified) | |`MK_C_INTERVAL_UNMOD`|16 |Time between cursor movements (unmodified) | -|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`KC_ACL0`) | -|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`KC_ACL0`) | -|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`KC_ACL1`) | -|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`KC_ACL1`) | -|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`KC_ACL2`) | -|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`KC_ACL2`) | +|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`MS_ACL0`) | +|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`MS_ACL0`) | +|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`MS_ACL1`) | +|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`MS_ACL1`) | +|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`MS_ACL2`) | +|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`MS_ACL2`) | |`MK_W_OFFSET_UNMOD` |1 |Scroll steps per scroll action (unmodified)| |`MK_W_INTERVAL_UNMOD`|40 |Time between scroll steps (unmodified) | -|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`KC_ACL0`) | -|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`KC_ACL0`) | -|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`KC_ACL1`) | -|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) | -|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) | -|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) | +|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`MS_ACL0`) | +|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`MS_ACL0`) | +|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`MS_ACL1`) | +|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`MS_ACL1`) | +|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`MS_ACL2`) | +|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`MS_ACL2`) | ### Combined mode -This mode functions like **Accelerated** mode, however, you can hold `KC_ACL0`, `KC_ACL1` and `KC_ACL2` +This mode functions like **Accelerated** mode, however, you can hold `MS_ACL0`, `MS_ACL1` and `MS_ACL2` to momentarily (while held) set the cursor and scroll speeds to constant speeds. When no acceleration keys are held, this mode is identical to **Accelerated** mode, and can be modified using all of the relevant settings. -* **KC_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very +* **MS_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very small and detailed movements of the cursor. -* **KC_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed. -* **KC_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is +* **MS_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed. +* **MS_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is useful for moving the cursor large distances without much accuracy. To use combined speed mode, you must at least define `MK_COMBINED` in your keymap’s `config.h` file: diff --git a/docs/features/repeat_key.md b/docs/features/repeat_key.md index 53495e0f4d6c..7f2bdc44e655 100644 --- a/docs/features/repeat_key.md +++ b/docs/features/repeat_key.md @@ -60,10 +60,10 @@ with mods, like Ctrl + Left ↔ Ctrl + Right Arrow. |`KC_UP` ↔ `KC_DOWN` | Up ↔ Down Arrow | |`KC_HOME` ↔ `KC_END` | Home ↔ End | |`KC_PGUP` ↔ `KC_PGDN` | Page Up ↔ Page Down | -|`KC_MS_L` ↔ `KC_MS_R` | Mouse Cursor Left ↔ Right | -|`KC_MS_U` ↔ `KC_MS_D` | Mouse Cursor Up ↔ Down | -|`KC_WH_L` ↔ `KC_WH_R` | Mouse Wheel Left ↔ Right | -|`KC_WH_U` ↔ `KC_WH_D` | Mouse Wheel Up ↔ Down | +|`MS_LEFT` ↔ `MS_RGHT` | Mouse Cursor Left ↔ Right | +|`MS_UP` ↔ `MS_DOWN` | Mouse Cursor Up ↔ Down | +|`MS_WHLL` ↔ `MS_WHLR` | Mouse Wheel Left ↔ Right | +|`MS_WHLU` ↔ `MS_WHLD` | Mouse Wheel Up ↔ Down | **Misc** diff --git a/docs/keycodes.md b/docs/keycodes.md index 4c91d98fa7a4..ea8b2e7b6507 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -611,24 +611,27 @@ See also: [MIDI](features/midi) See also: [Mouse Keys](features/mouse_keys) -|Key |Aliases |Description | -|----------------|---------|---------------------------| -|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up | -|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down | -|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left | -|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right | -|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 | -|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 | -|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 | -|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 | -|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 | -|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up | -|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down | -|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left | -|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right | -|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0| -|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1| -|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2| +|Key |Aliases |Description | +|-------------------------|---------|---------------------------| +|`QK_MOUSE_CURSOR_UP` |`MS_UP` |Mouse cursor up | +|`QK_MOUSE_CURSOR_DOWN` |`MS_DOWN`|Mouse cursor down | +|`QK_MOUSE_CURSOR_LEFT` |`MS_LEFT`|Mouse cursor left | +|`QK_MOUSE_CURSOR_RIGHT` |`MS_RGHT`|Mouse cursor right | +|`QK_MOUSE_BUTTON_1` |`MS_BTN1`|Mouse button 1 | +|`QK_MOUSE_BUTTON_2` |`MS_BTN2`|Mouse button 2 | +|`QK_MOUSE_BUTTON_3` |`MS_BTN3`|Mouse button 3 | +|`QK_MOUSE_BUTTON_4` |`MS_BTN4`|Mouse button 4 | +|`QK_MOUSE_BUTTON_5` |`MS_BTN5`|Mouse button 5 | +|`QK_MOUSE_BUTTON_6` |`MS_BTN6`|Mouse button 6 | +|`QK_MOUSE_BUTTON_7` |`MS_BTN7`|Mouse button 7 | +|`QK_MOUSE_BUTTON_8` |`MS_BTN8`|Mouse button 8 | +|`QK_MOUSE_WHEEL_UP` |`MS_WHLU`|Mouse wheel up | +|`QK_MOUSE_WHEEL_DOWN` |`MS_WHLD`|Mouse wheel down | +|`QK_MOUSE_WHEEL_LEFT` |`MS_WHLL`|Mouse wheel left | +|`QK_MOUSE_WHEEL_RIGHT` |`MS_WHLR`|Mouse wheel right | +|`QK_MOUSE_ACCELERATION_0`|`MS_ACL0`|Set mouse acceleration to 0| +|`QK_MOUSE_ACCELERATION_1`|`MS_ACL1`|Set mouse acceleration to 1| +|`QK_MOUSE_ACCELERATION_2`|`MS_ACL2`|Set mouse acceleration to 2| ## Modifiers {#modifiers} diff --git a/drivers/sensors/cirque_pinnacle_gestures.h b/drivers/sensors/cirque_pinnacle_gestures.h index d2aa206b2be6..1412c86f7ebd 100644 --- a/drivers/sensors/cirque_pinnacle_gestures.h +++ b/drivers/sensors/cirque_pinnacle_gestures.h @@ -28,7 +28,7 @@ typedef struct { # ifndef CIRQUE_PINNACLE_TAPPING_TERM # include "action.h" # include "action_tapping.h" -# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(KC_BTN1, &(keyrecord_t){}) +# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(QK_MOUSE_BUTTON_1, &(keyrecord_t){}) # endif # ifndef CIRQUE_PINNACLE_TOUCH_DEBOUNCE # define CIRQUE_PINNACLE_TOUCH_DEBOUNCE (CIRQUE_PINNACLE_TAPPING_TERM * 8) diff --git a/keyboards/cannonkeys/lib/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/lib/satisfaction75/satisfaction_encoder.c index aab005ebd87f..7e0b82e9e7a9 100644 --- a/keyboards/cannonkeys/lib/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/lib/satisfaction75/satisfaction_encoder.c @@ -101,7 +101,7 @@ uint16_t handle_encoder_clockwise(void){ mapped_code = KC_MEDIA_NEXT_TRACK; break; case ENC_MODE_SCROLL: - mapped_code = KC_WH_D; + mapped_code = QK_MOUSE_WHEEL_DOWN; break; #ifdef BACKLIGHT_ENABLE case ENC_MODE_BACKLIGHT: @@ -143,7 +143,7 @@ uint16_t handle_encoder_ccw(void){ mapped_code = KC_MEDIA_PREV_TRACK; break; case ENC_MODE_SCROLL: - mapped_code = KC_WH_U; + mapped_code = QK_MOUSE_WHEEL_UP; break; #ifdef BACKLIGHT_ENABLE case ENC_MODE_BACKLIGHT: @@ -186,7 +186,7 @@ uint16_t handle_encoder_press(void){ mapped_code = KC_MEDIA_PLAY_PAUSE; break; case ENC_MODE_SCROLL: - mapped_code = KC_BTN3; + mapped_code = QK_MOUSE_BUTTON_3; break; #ifdef BACKLIGHT_ENABLE case ENC_MODE_BACKLIGHT: diff --git a/keyboards/dichotomy/keymaps/default/keymap.c b/keyboards/dichotomy/keymaps/default/keymap.c index b83f7b82e9ea..b92beb73ccc7 100755 --- a/keyboards/dichotomy/keymaps/default/keymap.c +++ b/keyboards/dichotomy/keymaps/default/keymap.c @@ -28,9 +28,9 @@ enum dichotomy_keycodes NUMKEY, SFTKEY, MOUKEY, - MS_BTN1, - MS_BTN2, - MS_BTN3 + CK_MSE1, + CK_MSE2, + CK_MSE3 }; #define CUSTOM_LONGPRESS 150 @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NUMKEY, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CK_QE, SFTKEY, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MOUKEY, KC_LCTL, KC_LALT, KC_LGUI, KC_RGUI, KC_RALT, KC_RCTL, - MS_BTN3, KC_LBRC, KC_LPRN, KC_SPC, KC_SPC, KC_RPRN, KC_RBRC, MS_BTN3 + CK_MSE3, KC_LBRC, KC_LPRN, KC_SPC, KC_SPC, KC_RPRN, KC_RBRC, CK_MSE3 ), [_SF] = LAYOUT( /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */ @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MS] = LAYOUT( /* Mouse layer, including buttons for clicking. */ _______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, CK_MSE1, CK_MSE2, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______ @@ -311,7 +311,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; //mouse buttons, for 1-3, to update the mouse report: - case MS_BTN1: + case CK_MSE1: currentReport = pointing_device_get_report(); if (record->event.pressed) { if (shift_held && shift_suspended){ @@ -327,7 +327,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { pointing_device_set_report(currentReport); returnVal = false; break; - case MS_BTN2: + case CK_MSE2: currentReport = pointing_device_get_report(); if (record->event.pressed) { if (shift_held && shift_suspended){ @@ -343,7 +343,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { pointing_device_set_report(currentReport); returnVal = false; break; - case MS_BTN3: + case CK_MSE3: currentReport = pointing_device_get_report(); if (record->event.pressed) { if (shift_held && shift_suspended){ diff --git a/quantum/action.c b/quantum/action.c index 74ef55e5eb2e..a39631ba3e9b 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -329,7 +329,7 @@ void register_mouse(uint8_t mouse_keycode, bool pressed) { // should mousekeys send report, or does something else handle this? switch (mouse_keycode) { # if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE) - case KC_MS_BTN1 ... KC_MS_BTN8: + case QK_MOUSE_BUTTON_1 ... QK_MOUSE_BUTTON_8: // let pointing device handle the buttons // expand if/when it handles more of the code # if defined(POINTING_DEVICE_ENABLE) @@ -351,8 +351,8 @@ void register_mouse(uint8_t mouse_keycode, bool pressed) { #ifdef PS2_MOUSE_ENABLE // make sure that ps2 mouse has button report synced - if (KC_MS_BTN1 <= mouse_keycode && mouse_keycode <= KC_MS_BTN3) { - uint8_t tmp_button_msk = MOUSE_BTN_MASK(mouse_keycode - KC_MS_BTN1); + if (QK_MOUSE_BUTTON_1 <= mouse_keycode && mouse_keycode <= QK_MOUSE_BUTTON_3) { + uint8_t tmp_button_msk = MOUSE_BTN_MASK(mouse_keycode - QK_MOUSE_BUTTON_1); tp_buttons = pressed ? tp_buttons | tmp_button_msk : tp_buttons & ~tmp_button_msk; } #endif diff --git a/quantum/encoder.c b/quantum/encoder.c index 2ddbf3ee1e02..27d7b1fc8091 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -160,7 +160,7 @@ __attribute__((weak)) bool encoder_update_kb(uint8_t index, bool clockwise) { # if defined(EXTRAKEY_ENABLE) tap_code_delay(KC_VOLU, 10); # elif defined(MOUSEKEY_ENABLE) - tap_code_delay(KC_MS_WH_UP, 10); + tap_code_delay(QK_MOUSE_WHEEL_UP, 10); # else tap_code_delay(KC_PGDN, 10); # endif @@ -168,7 +168,7 @@ __attribute__((weak)) bool encoder_update_kb(uint8_t index, bool clockwise) { # if defined(EXTRAKEY_ENABLE) tap_code_delay(KC_VOLD, 10); # elif defined(MOUSEKEY_ENABLE) - tap_code_delay(KC_MS_WH_DOWN, 10); + tap_code_delay(QK_MOUSE_WHEEL_DOWN, 10); # else tap_code_delay(KC_PGUP, 10); # endif diff --git a/quantum/keycode.h b/quantum/keycode.h index df1452d2965c..4ff6894a0117 100644 --- a/quantum/keycode.h +++ b/quantum/keycode.h @@ -29,10 +29,10 @@ along with this program. If not, see . #define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF) #define IS_MOUSEKEY(code) IS_MOUSE_KEYCODE(code) -#define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT) -#define IS_MOUSEKEY_BUTTON(code) (KC_MS_BTN1 <= (code) && (code) <= KC_MS_BTN8) -#define IS_MOUSEKEY_WHEEL(code) (KC_MS_WH_UP <= (code) && (code) <= KC_MS_WH_RIGHT) -#define IS_MOUSEKEY_ACCEL(code) (KC_MS_ACCEL0 <= (code) && (code) <= KC_MS_ACCEL2) +#define IS_MOUSEKEY_MOVE(code) (QK_MOUSE_CURSOR_UP <= (code) && (code) <= QK_MOUSE_CURSOR_RIGHT) +#define IS_MOUSEKEY_BUTTON(code) (QK_MOUSE_BUTTON_1 <= (code) && (code) <= QK_MOUSE_BUTTON_8) +#define IS_MOUSEKEY_WHEEL(code) (QK_MOUSE_WHEEL_UP <= (code) && (code) <= QK_MOUSE_WHEEL_RIGHT) +#define IS_MOUSEKEY_ACCEL(code) (QK_MOUSE_ACCELERATION_0 <= (code) && (code) <= QK_MOUSE_ACCELERATION_2) #define MOD_BIT(code) (1 << ((code)&0x07)) diff --git a/quantum/keycodes.h b/quantum/keycodes.h index c92028ab4399..f461e4a586e2 100644 --- a/quantum/keycodes.h +++ b/quantum/keycodes.h @@ -283,25 +283,25 @@ enum qk_keycode_defines { KC_ASSISTANT = 0x00C0, KC_MISSION_CONTROL = 0x00C1, KC_LAUNCHPAD = 0x00C2, - KC_MS_UP = 0x00CD, - KC_MS_DOWN = 0x00CE, - KC_MS_LEFT = 0x00CF, - KC_MS_RIGHT = 0x00D0, - KC_MS_BTN1 = 0x00D1, - KC_MS_BTN2 = 0x00D2, - KC_MS_BTN3 = 0x00D3, - KC_MS_BTN4 = 0x00D4, - KC_MS_BTN5 = 0x00D5, - KC_MS_BTN6 = 0x00D6, - KC_MS_BTN7 = 0x00D7, - KC_MS_BTN8 = 0x00D8, - KC_MS_WH_UP = 0x00D9, - KC_MS_WH_DOWN = 0x00DA, - KC_MS_WH_LEFT = 0x00DB, - KC_MS_WH_RIGHT = 0x00DC, - KC_MS_ACCEL0 = 0x00DD, - KC_MS_ACCEL1 = 0x00DE, - KC_MS_ACCEL2 = 0x00DF, + QK_MOUSE_CURSOR_UP = 0x00CD, + QK_MOUSE_CURSOR_DOWN = 0x00CE, + QK_MOUSE_CURSOR_LEFT = 0x00CF, + QK_MOUSE_CURSOR_RIGHT = 0x00D0, + QK_MOUSE_BUTTON_1 = 0x00D1, + QK_MOUSE_BUTTON_2 = 0x00D2, + QK_MOUSE_BUTTON_3 = 0x00D3, + QK_MOUSE_BUTTON_4 = 0x00D4, + QK_MOUSE_BUTTON_5 = 0x00D5, + QK_MOUSE_BUTTON_6 = 0x00D6, + QK_MOUSE_BUTTON_7 = 0x00D7, + QK_MOUSE_BUTTON_8 = 0x00D8, + QK_MOUSE_WHEEL_UP = 0x00D9, + QK_MOUSE_WHEEL_DOWN = 0x00DA, + QK_MOUSE_WHEEL_LEFT = 0x00DB, + QK_MOUSE_WHEEL_RIGHT = 0x00DC, + QK_MOUSE_ACCELERATION_0 = 0x00DD, + QK_MOUSE_ACCELERATION_1 = 0x00DE, + QK_MOUSE_ACCELERATION_2 = 0x00DF, KC_LEFT_CTRL = 0x00E0, KC_LEFT_SHIFT = 0x00E1, KC_LEFT_ALT = 0x00E2, @@ -926,25 +926,25 @@ enum qk_keycode_defines { KC_ASST = KC_ASSISTANT, KC_MCTL = KC_MISSION_CONTROL, KC_LPAD = KC_LAUNCHPAD, - KC_MS_U = KC_MS_UP, - KC_MS_D = KC_MS_DOWN, - KC_MS_L = KC_MS_LEFT, - KC_MS_R = KC_MS_RIGHT, - KC_BTN1 = KC_MS_BTN1, - KC_BTN2 = KC_MS_BTN2, - KC_BTN3 = KC_MS_BTN3, - KC_BTN4 = KC_MS_BTN4, - KC_BTN5 = KC_MS_BTN5, - KC_BTN6 = KC_MS_BTN6, - KC_BTN7 = KC_MS_BTN7, - KC_BTN8 = KC_MS_BTN8, - KC_WH_U = KC_MS_WH_UP, - KC_WH_D = KC_MS_WH_DOWN, - KC_WH_L = KC_MS_WH_LEFT, - KC_WH_R = KC_MS_WH_RIGHT, - KC_ACL0 = KC_MS_ACCEL0, - KC_ACL1 = KC_MS_ACCEL1, - KC_ACL2 = KC_MS_ACCEL2, + MS_UP = QK_MOUSE_CURSOR_UP, + MS_DOWN = QK_MOUSE_CURSOR_DOWN, + MS_LEFT = QK_MOUSE_CURSOR_LEFT, + MS_RGHT = QK_MOUSE_CURSOR_RIGHT, + MS_BTN1 = QK_MOUSE_BUTTON_1, + MS_BTN2 = QK_MOUSE_BUTTON_2, + MS_BTN3 = QK_MOUSE_BUTTON_3, + MS_BTN4 = QK_MOUSE_BUTTON_4, + MS_BTN5 = QK_MOUSE_BUTTON_5, + MS_BTN6 = QK_MOUSE_BUTTON_6, + MS_BTN7 = QK_MOUSE_BUTTON_7, + MS_BTN8 = QK_MOUSE_BUTTON_8, + MS_WHLU = QK_MOUSE_WHEEL_UP, + MS_WHLD = QK_MOUSE_WHEEL_DOWN, + MS_WHLL = QK_MOUSE_WHEEL_LEFT, + MS_WHLR = QK_MOUSE_WHEEL_RIGHT, + MS_ACL0 = QK_MOUSE_ACCELERATION_0, + MS_ACL1 = QK_MOUSE_ACCELERATION_1, + MS_ACL2 = QK_MOUSE_ACCELERATION_2, KC_LCTL = KC_LEFT_CTRL, KC_LSFT = KC_LEFT_SHIFT, KC_LALT = KC_LEFT_ALT, @@ -1457,7 +1457,7 @@ enum qk_keycode_defines { #define IS_BASIC_KEYCODE(code) ((code) >= KC_A && (code) <= KC_EXSEL) #define IS_SYSTEM_KEYCODE(code) ((code) >= KC_SYSTEM_POWER && (code) <= KC_SYSTEM_WAKE) #define IS_CONSUMER_KEYCODE(code) ((code) >= KC_AUDIO_MUTE && (code) <= KC_LAUNCHPAD) -#define IS_MOUSE_KEYCODE(code) ((code) >= KC_MS_UP && (code) <= KC_MS_ACCEL2) +#define IS_MOUSE_KEYCODE(code) ((code) >= QK_MOUSE_CURSOR_UP && (code) <= QK_MOUSE_ACCELERATION_2) #define IS_MODIFIER_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI) #define IS_SWAP_HANDS_KEYCODE(code) ((code) >= QK_SWAP_HANDS_TOGGLE && (code) <= QK_SWAP_HANDS_ONE_SHOT) #define IS_MAGIC_KEYCODE(code) ((code) >= QK_MAGIC_SWAP_CONTROL_CAPS_LOCK && (code) <= QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK) @@ -1482,7 +1482,7 @@ enum qk_keycode_defines { #define BASIC_KEYCODE_RANGE KC_A ... KC_EXSEL #define SYSTEM_KEYCODE_RANGE KC_SYSTEM_POWER ... KC_SYSTEM_WAKE #define CONSUMER_KEYCODE_RANGE KC_AUDIO_MUTE ... KC_LAUNCHPAD -#define MOUSE_KEYCODE_RANGE KC_MS_UP ... KC_MS_ACCEL2 +#define MOUSE_KEYCODE_RANGE QK_MOUSE_CURSOR_UP ... QK_MOUSE_ACCELERATION_2 #define MODIFIER_KEYCODE_RANGE KC_LEFT_CTRL ... KC_RIGHT_GUI #define SWAP_HANDS_KEYCODE_RANGE QK_SWAP_HANDS_TOGGLE ... QK_SWAP_HANDS_ONE_SHOT #define MAGIC_KEYCODE_RANGE QK_MAGIC_SWAP_CONTROL_CAPS_LOCK ... QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK diff --git a/quantum/mousekey.c b/quantum/mousekey.c index 39108117524b..8683cfdffacb 100644 --- a/quantum/mousekey.c +++ b/quantum/mousekey.c @@ -407,42 +407,42 @@ void mousekey_on(uint8_t code) { # ifdef MOUSEKEY_INERTIA // initial keypress sets impulse and activates first frame of movement - if ((code == KC_MS_UP) || (code == KC_MS_DOWN)) { - mousekey_y_dir = (code == KC_MS_DOWN) ? 1 : -1; + if ((code == QK_MOUSE_CURSOR_UP) || (code == QK_MOUSE_CURSOR_DOWN)) { + mousekey_y_dir = (code == QK_MOUSE_CURSOR_DOWN) ? 1 : -1; if (mousekey_frame < 2) mouse_report.y = move_unit(1); - } else if ((code == KC_MS_LEFT) || (code == KC_MS_RIGHT)) { - mousekey_x_dir = (code == KC_MS_RIGHT) ? 1 : -1; + } else if ((code == QK_MOUSE_CURSOR_LEFT) || (code == QK_MOUSE_CURSOR_RIGHT)) { + mousekey_x_dir = (code == QK_MOUSE_CURSOR_RIGHT) ? 1 : -1; if (mousekey_frame < 2) mouse_report.x = move_unit(0); } # else // no inertia - if (code == KC_MS_UP) + if (code == QK_MOUSE_CURSOR_UP) mouse_report.y = move_unit() * -1; - else if (code == KC_MS_DOWN) + else if (code == QK_MOUSE_CURSOR_DOWN) mouse_report.y = move_unit(); - else if (code == KC_MS_LEFT) + else if (code == QK_MOUSE_CURSOR_LEFT) mouse_report.x = move_unit() * -1; - else if (code == KC_MS_RIGHT) + else if (code == QK_MOUSE_CURSOR_RIGHT) mouse_report.x = move_unit(); # endif // inertia or not - else if (code == KC_MS_WH_UP) + else if (code == QK_MOUSE_WHEEL_UP) mouse_report.v = wheel_unit(); - else if (code == KC_MS_WH_DOWN) + else if (code == QK_MOUSE_WHEEL_DOWN) mouse_report.v = wheel_unit() * -1; - else if (code == KC_MS_WH_LEFT) + else if (code == QK_MOUSE_WHEEL_LEFT) mouse_report.h = wheel_unit() * -1; - else if (code == KC_MS_WH_RIGHT) + else if (code == QK_MOUSE_WHEEL_RIGHT) mouse_report.h = wheel_unit(); else if (IS_MOUSEKEY_BUTTON(code)) - mouse_report.buttons |= 1 << (code - KC_MS_BTN1); - else if (code == KC_MS_ACCEL0) + mouse_report.buttons |= 1 << (code - QK_MOUSE_BUTTON_1); + else if (code == QK_MOUSE_ACCELERATION_0) mousekey_accel |= (1 << 0); - else if (code == KC_MS_ACCEL1) + else if (code == QK_MOUSE_ACCELERATION_1) mousekey_accel |= (1 << 1); - else if (code == KC_MS_ACCEL2) + else if (code == QK_MOUSE_ACCELERATION_2) mousekey_accel |= (1 << 2); } @@ -450,43 +450,43 @@ void mousekey_off(uint8_t code) { # ifdef MOUSEKEY_INERTIA // key release clears impulse unless opposite direction is held - if ((code == KC_MS_UP) && (mousekey_y_dir < 1)) + if ((code == QK_MOUSE_CURSOR_UP) && (mousekey_y_dir < 1)) mousekey_y_dir = 0; - else if ((code == KC_MS_DOWN) && (mousekey_y_dir > -1)) + else if ((code == QK_MOUSE_CURSOR_DOWN) && (mousekey_y_dir > -1)) mousekey_y_dir = 0; - else if ((code == KC_MS_LEFT) && (mousekey_x_dir < 1)) + else if ((code == QK_MOUSE_CURSOR_LEFT) && (mousekey_x_dir < 1)) mousekey_x_dir = 0; - else if ((code == KC_MS_RIGHT) && (mousekey_x_dir > -1)) + else if ((code == QK_MOUSE_CURSOR_RIGHT) && (mousekey_x_dir > -1)) mousekey_x_dir = 0; # else // no inertia - if (code == KC_MS_UP && mouse_report.y < 0) + if (code == QK_MOUSE_CURSOR_UP && mouse_report.y < 0) mouse_report.y = 0; - else if (code == KC_MS_DOWN && mouse_report.y > 0) + else if (code == QK_MOUSE_CURSOR_DOWN && mouse_report.y > 0) mouse_report.y = 0; - else if (code == KC_MS_LEFT && mouse_report.x < 0) + else if (code == QK_MOUSE_CURSOR_LEFT && mouse_report.x < 0) mouse_report.x = 0; - else if (code == KC_MS_RIGHT && mouse_report.x > 0) + else if (code == QK_MOUSE_CURSOR_RIGHT && mouse_report.x > 0) mouse_report.x = 0; # endif // inertia or not - else if (code == KC_MS_WH_UP && mouse_report.v > 0) + else if (code == QK_MOUSE_WHEEL_UP && mouse_report.v > 0) mouse_report.v = 0; - else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) + else if (code == QK_MOUSE_WHEEL_DOWN && mouse_report.v < 0) mouse_report.v = 0; - else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) + else if (code == QK_MOUSE_WHEEL_LEFT && mouse_report.h < 0) mouse_report.h = 0; - else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) + else if (code == QK_MOUSE_WHEEL_RIGHT && mouse_report.h > 0) mouse_report.h = 0; else if (IS_MOUSEKEY_BUTTON(code)) - mouse_report.buttons &= ~(1 << (code - KC_MS_BTN1)); - else if (code == KC_MS_ACCEL0) + mouse_report.buttons &= ~(1 << (code - QK_MOUSE_BUTTON_1)); + else if (code == QK_MOUSE_ACCELERATION_0) mousekey_accel &= ~(1 << 0); - else if (code == KC_MS_ACCEL1) + else if (code == QK_MOUSE_ACCELERATION_1) mousekey_accel &= ~(1 << 1); - else if (code == KC_MS_ACCEL2) + else if (code == QK_MOUSE_ACCELERATION_2) mousekey_accel &= ~(1 << 2); if (mouse_report.x == 0 && mouse_report.y == 0) { mousekey_repeat = 0; @@ -568,29 +568,29 @@ void mousekey_on(uint8_t code) { uint16_t const c_offset = c_offsets[mk_speed]; uint16_t const w_offset = w_offsets[mk_speed]; uint8_t const old_speed = mk_speed; - if (code == KC_MS_UP) + if (code == QK_MOUSE_CURSOR_UP) mouse_report.y = c_offset * -1; - else if (code == KC_MS_DOWN) + else if (code == QK_MOUSE_CURSOR_DOWN) mouse_report.y = c_offset; - else if (code == KC_MS_LEFT) + else if (code == QK_MOUSE_CURSOR_LEFT) mouse_report.x = c_offset * -1; - else if (code == KC_MS_RIGHT) + else if (code == QK_MOUSE_CURSOR_RIGHT) mouse_report.x = c_offset; - else if (code == KC_MS_WH_UP) + else if (code == QK_MOUSE_WHEEL_UP) mouse_report.v = w_offset; - else if (code == KC_MS_WH_DOWN) + else if (code == QK_MOUSE_WHEEL_DOWN) mouse_report.v = w_offset * -1; - else if (code == KC_MS_WH_LEFT) + else if (code == QK_MOUSE_WHEEL_LEFT) mouse_report.h = w_offset * -1; - else if (code == KC_MS_WH_RIGHT) + else if (code == QK_MOUSE_WHEEL_RIGHT) mouse_report.h = w_offset; else if (IS_MOUSEKEY_BUTTON(code)) - mouse_report.buttons |= 1 << (code - KC_MS_BTN1); - else if (code == KC_MS_ACCEL0) + mouse_report.buttons |= 1 << (code - QK_MOUSE_BUTTON_1); + else if (code == QK_MOUSE_ACCELERATION_0) mk_speed = mkspd_0; - else if (code == KC_MS_ACCEL1) + else if (code == QK_MOUSE_ACCELERATION_1) mk_speed = mkspd_1; - else if (code == KC_MS_ACCEL2) + else if (code == QK_MOUSE_ACCELERATION_2) mk_speed = mkspd_2; if (mk_speed != old_speed) adjust_speed(); } @@ -599,30 +599,30 @@ void mousekey_off(uint8_t code) { # ifdef MK_MOMENTARY_ACCEL uint8_t const old_speed = mk_speed; # endif - if (code == KC_MS_UP && mouse_report.y < 0) + if (code == QK_MOUSE_CURSOR_UP && mouse_report.y < 0) mouse_report.y = 0; - else if (code == KC_MS_DOWN && mouse_report.y > 0) + else if (code == QK_MOUSE_CURSOR_DOWN && mouse_report.y > 0) mouse_report.y = 0; - else if (code == KC_MS_LEFT && mouse_report.x < 0) + else if (code == QK_MOUSE_CURSOR_LEFT && mouse_report.x < 0) mouse_report.x = 0; - else if (code == KC_MS_RIGHT && mouse_report.x > 0) + else if (code == QK_MOUSE_CURSOR_RIGHT && mouse_report.x > 0) mouse_report.x = 0; - else if (code == KC_MS_WH_UP && mouse_report.v > 0) + else if (code == QK_MOUSE_WHEEL_UP && mouse_report.v > 0) mouse_report.v = 0; - else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) + else if (code == QK_MOUSE_WHEEL_DOWN && mouse_report.v < 0) mouse_report.v = 0; - else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) + else if (code == QK_MOUSE_WHEEL_LEFT && mouse_report.h < 0) mouse_report.h = 0; - else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) + else if (code == QK_MOUSE_WHEEL_RIGHT && mouse_report.h > 0) mouse_report.h = 0; else if (IS_MOUSEKEY_BUTTON(code)) - mouse_report.buttons &= ~(1 << (code - KC_MS_BTN1)); + mouse_report.buttons &= ~(1 << (code - QK_MOUSE_BUTTON_1)); # ifdef MK_MOMENTARY_ACCEL - else if (code == KC_MS_ACCEL0) + else if (code == QK_MOUSE_ACCELERATION_0) mk_speed = mkspd_DEFAULT; - else if (code == KC_MS_ACCEL1) + else if (code == QK_MOUSE_ACCELERATION_1) mk_speed = mkspd_DEFAULT; - else if (code == KC_MS_ACCEL2) + else if (code == QK_MOUSE_ACCELERATION_2) mk_speed = mkspd_DEFAULT; if (mk_speed != old_speed) adjust_speed(); # endif diff --git a/quantum/pointing_device/pointing_device.c b/quantum/pointing_device/pointing_device.c index 4682aceb14d9..74ce9108a9cf 100644 --- a/quantum/pointing_device/pointing_device.c +++ b/quantum/pointing_device/pointing_device.c @@ -498,7 +498,7 @@ __attribute__((weak)) report_mouse_t pointing_device_task_combined_user(report_m __attribute__((weak)) void pointing_device_keycode_handler(uint16_t keycode, bool pressed) { if IS_MOUSEKEY_BUTTON (keycode) { - local_mouse_report.buttons = pointing_device_handle_buttons(local_mouse_report.buttons, pressed, keycode - KC_MS_BTN1); + local_mouse_report.buttons = pointing_device_handle_buttons(local_mouse_report.buttons, pressed, keycode - QK_MOUSE_BUTTON_1); pointing_device_send(); } } diff --git a/quantum/pointing_device/pointing_device_auto_mouse.h b/quantum/pointing_device/pointing_device_auto_mouse.h index a596c065a310..2c0d4d10434f 100644 --- a/quantum/pointing_device/pointing_device_auto_mouse.h +++ b/quantum/pointing_device/pointing_device_auto_mouse.h @@ -37,7 +37,7 @@ # define AUTO_MOUSE_TIME 650 #endif #ifndef AUTO_MOUSE_DELAY -# define AUTO_MOUSE_DELAY GET_TAPPING_TERM(KC_MS_BTN1, &(keyrecord_t){}) +# define AUTO_MOUSE_DELAY GET_TAPPING_TERM(QK_MOUSE_BUTTON_1, &(keyrecord_t){}) #endif #ifndef AUTO_MOUSE_DEBOUNCE # define AUTO_MOUSE_DEBOUNCE 25 diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h index 6ea5e13f3a96..e1562077e5f3 100644 --- a/quantum/quantum_keycodes_legacy.h +++ b/quantum/quantum_keycodes_legacy.h @@ -16,3 +16,42 @@ #define RGB_VAD QK_UNDERGLOW_VALUE_DOWN #define RGB_SPI QK_UNDERGLOW_SPEED_UP #define RGB_SPD QK_UNDERGLOW_SPEED_DOWN + +#define KC_MS_UP QK_MOUSE_CURSOR_UP +#define KC_MS_U QK_MOUSE_CURSOR_UP +#define KC_MS_DOWN QK_MOUSE_CURSOR_DOWN +#define KC_MS_D QK_MOUSE_CURSOR_DOWN +#define KC_MS_LEFT QK_MOUSE_CURSOR_LEFT +#define KC_MS_L QK_MOUSE_CURSOR_LEFT +#define KC_MS_RIGHT QK_MOUSE_CURSOR_RIGHT +#define KC_MS_R QK_MOUSE_CURSOR_RIGHT +#define KC_MS_BTN1 QK_MOUSE_BUTTON_1 +#define KC_BTN1 QK_MOUSE_BUTTON_1 +#define KC_MS_BTN2 QK_MOUSE_BUTTON_2 +#define KC_BTN2 QK_MOUSE_BUTTON_2 +#define KC_MS_BTN3 QK_MOUSE_BUTTON_3 +#define KC_BTN3 QK_MOUSE_BUTTON_3 +#define KC_MS_BTN4 QK_MOUSE_BUTTON_4 +#define KC_BTN4 QK_MOUSE_BUTTON_4 +#define KC_MS_BTN5 QK_MOUSE_BUTTON_5 +#define KC_BTN5 QK_MOUSE_BUTTON_5 +#define KC_MS_BTN6 QK_MOUSE_BUTTON_6 +#define KC_BTN6 QK_MOUSE_BUTTON_6 +#define KC_MS_BTN7 QK_MOUSE_BUTTON_7 +#define KC_BTN7 QK_MOUSE_BUTTON_7 +#define KC_MS_BTN8 QK_MOUSE_BUTTON_8 +#define KC_BTN8 QK_MOUSE_BUTTON_8 +#define KC_MS_WH_UP QK_MOUSE_WHEEL_UP +#define KC_WH_U QK_MOUSE_WHEEL_UP +#define KC_MS_WH_DOWN QK_MOUSE_WHEEL_DOWN +#define KC_WH_D QK_MOUSE_WHEEL_DOWN +#define KC_MS_WH_LEFT QK_MOUSE_WHEEL_LEFT +#define KC_WH_L QK_MOUSE_WHEEL_LEFT +#define KC_MS_WH_RIGHT QK_MOUSE_WHEEL_RIGHT +#define KC_WH_R QK_MOUSE_WHEEL_RIGHT +#define KC_MS_ACCEL0 QK_MOUSE_ACCELERATION_0 +#define KC_ACL0 QK_MOUSE_ACCELERATION_0 +#define KC_MS_ACCEL1 QK_MOUSE_ACCELERATION_1 +#define KC_ACL1 QK_MOUSE_ACCELERATION_1 +#define KC_MS_ACCEL2 QK_MOUSE_ACCELERATION_2 +#define KC_ACL2 QK_MOUSE_ACCELERATION_2 diff --git a/quantum/repeat_key.c b/quantum/repeat_key.c index 4567428723ac..56f242f8b847 100644 --- a/quantum/repeat_key.c +++ b/quantum/repeat_key.c @@ -220,10 +220,10 @@ uint16_t get_alt_repeat_key_keycode(void) { {KC_BRIU, KC_BRID}, // Brightness Up / Down. #endif // EXTRAKEY_ENABLE #ifdef MOUSEKEY_ENABLE - {KC_MS_L, KC_MS_R}, // Mouse Cursor Left / Right. - {KC_MS_U, KC_MS_D}, // Mouse Cursor Up / Down. - {KC_WH_L, KC_WH_R}, // Mouse Wheel Left / Right. - {KC_WH_U, KC_WH_D}, // Mouse Wheel Up / Down. + {MS_LEFT, MS_RGHT}, // Mouse Cursor Left / Right. + {MS_UP, MS_DOWN}, // Mouse Cursor Up / Down. + {MS_WHLL, MS_WHLR}, // Mouse Wheel Left / Right. + {MS_WHLU, MS_WHLD}, // Mouse Wheel Up / Down. #endif // MOUSEKEY_ENABLE }; // clang-format on diff --git a/tests/test_common/keycode_table.cpp b/tests/test_common/keycode_table.cpp index 18dd5360277b..4c28ab4d20dd 100644 --- a/tests/test_common/keycode_table.cpp +++ b/tests/test_common/keycode_table.cpp @@ -225,25 +225,25 @@ std::map KEYCODE_ID_TABLE = { {KC_ASSISTANT, "KC_ASSISTANT"}, {KC_MISSION_CONTROL, "KC_MISSION_CONTROL"}, {KC_LAUNCHPAD, "KC_LAUNCHPAD"}, - {KC_MS_UP, "KC_MS_UP"}, - {KC_MS_DOWN, "KC_MS_DOWN"}, - {KC_MS_LEFT, "KC_MS_LEFT"}, - {KC_MS_RIGHT, "KC_MS_RIGHT"}, - {KC_MS_BTN1, "KC_MS_BTN1"}, - {KC_MS_BTN2, "KC_MS_BTN2"}, - {KC_MS_BTN3, "KC_MS_BTN3"}, - {KC_MS_BTN4, "KC_MS_BTN4"}, - {KC_MS_BTN5, "KC_MS_BTN5"}, - {KC_MS_BTN6, "KC_MS_BTN6"}, - {KC_MS_BTN7, "KC_MS_BTN7"}, - {KC_MS_BTN8, "KC_MS_BTN8"}, - {KC_MS_WH_UP, "KC_MS_WH_UP"}, - {KC_MS_WH_DOWN, "KC_MS_WH_DOWN"}, - {KC_MS_WH_LEFT, "KC_MS_WH_LEFT"}, - {KC_MS_WH_RIGHT, "KC_MS_WH_RIGHT"}, - {KC_MS_ACCEL0, "KC_MS_ACCEL0"}, - {KC_MS_ACCEL1, "KC_MS_ACCEL1"}, - {KC_MS_ACCEL2, "KC_MS_ACCEL2"}, + {QK_MOUSE_CURSOR_UP, "QK_MOUSE_CURSOR_UP"}, + {QK_MOUSE_CURSOR_DOWN, "QK_MOUSE_CURSOR_DOWN"}, + {QK_MOUSE_CURSOR_LEFT, "QK_MOUSE_CURSOR_LEFT"}, + {QK_MOUSE_CURSOR_RIGHT, "QK_MOUSE_CURSOR_RIGHT"}, + {QK_MOUSE_BUTTON_1, "QK_MOUSE_BUTTON_1"}, + {QK_MOUSE_BUTTON_2, "QK_MOUSE_BUTTON_2"}, + {QK_MOUSE_BUTTON_3, "QK_MOUSE_BUTTON_3"}, + {QK_MOUSE_BUTTON_4, "QK_MOUSE_BUTTON_4"}, + {QK_MOUSE_BUTTON_5, "QK_MOUSE_BUTTON_5"}, + {QK_MOUSE_BUTTON_6, "QK_MOUSE_BUTTON_6"}, + {QK_MOUSE_BUTTON_7, "QK_MOUSE_BUTTON_7"}, + {QK_MOUSE_BUTTON_8, "QK_MOUSE_BUTTON_8"}, + {QK_MOUSE_WHEEL_UP, "QK_MOUSE_WHEEL_UP"}, + {QK_MOUSE_WHEEL_DOWN, "QK_MOUSE_WHEEL_DOWN"}, + {QK_MOUSE_WHEEL_LEFT, "QK_MOUSE_WHEEL_LEFT"}, + {QK_MOUSE_WHEEL_RIGHT, "QK_MOUSE_WHEEL_RIGHT"}, + {QK_MOUSE_ACCELERATION_0, "QK_MOUSE_ACCELERATION_0"}, + {QK_MOUSE_ACCELERATION_1, "QK_MOUSE_ACCELERATION_1"}, + {QK_MOUSE_ACCELERATION_2, "QK_MOUSE_ACCELERATION_2"}, {KC_LEFT_CTRL, "KC_LEFT_CTRL"}, {KC_LEFT_SHIFT, "KC_LEFT_SHIFT"}, {KC_LEFT_ALT, "KC_LEFT_ALT"}, From e754c9f2b4bb63e5b63d09f596b6b67a0e1c56be Mon Sep 17 00:00:00 2001 From: kopibeng <52724926+kopibeng@users.noreply.github.com> Date: Wed, 3 Jul 2024 16:38:57 +0800 Subject: [PATCH 0103/1205] Update keymap for KLC x TGR Lena (#23688) --- keyboards/kopibeng/tgr_lena/keymaps/default/keymap.c | 2 +- keyboards/kopibeng/tgr_lena/keymaps/via/keymap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/kopibeng/tgr_lena/keymaps/default/keymap.c b/keyboards/kopibeng/tgr_lena/keymaps/default/keymap.c index 33a1ccd6f77b..7b4fd9db819c 100644 --- a/keyboards/kopibeng/tgr_lena/keymaps/default/keymap.c +++ b/keyboards/kopibeng/tgr_lena/keymaps/default/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { QK_BOOT, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; diff --git a/keyboards/kopibeng/tgr_lena/keymaps/via/keymap.c b/keyboards/kopibeng/tgr_lena/keymaps/via/keymap.c index 33a1ccd6f77b..7b4fd9db819c 100644 --- a/keyboards/kopibeng/tgr_lena/keymaps/via/keymap.c +++ b/keyboards/kopibeng/tgr_lena/keymaps/via/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { QK_BOOT, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; From 33adb8cba08130f3bdcf949b5c1a0ec9a60cbd30 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 3 Jul 2024 20:31:49 +1000 Subject: [PATCH 0104/1205] `vertex/arc60h`: add additional layouts (#24023) --- keyboards/vertex/arc60h/keyboard.json | 348 ++++++++++++++++++++++++++ 1 file changed, 348 insertions(+) diff --git a/keyboards/vertex/arc60h/keyboard.json b/keyboards/vertex/arc60h/keyboard.json index e79d8f0dc5e9..4d4d903dc47e 100644 --- a/keyboards/vertex/arc60h/keyboard.json +++ b/keyboards/vertex/arc60h/keyboard.json @@ -49,6 +49,10 @@ "diode_direction": "COL2ROW", "processor": "STM32F103", "bootloader": "stm32duino", + "layout_aliases": { + "LAYOUT_60_tsangan_hhkb": "LAYOUT_60_ansi_tsangan_split_bs_rshift" + }, + "community_layouts": ["60_ansi_tsangan", "60_tsangan_hhkb", "60_ansi_wkl", "60_ansi_wkl_split_bs_rshift", "60_hhkb"], "layouts": { "LAYOUT_all": { "layout": [ @@ -120,6 +124,350 @@ {"matrix": [4, 12], "x": 12.5, "y": 4}, {"matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5} ] + }, + "LAYOUT_60_ansi_tsangan": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 14], "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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4}, + {"matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_ansi_tsangan_split_bs_rshift": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4}, + {"matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_ansi_wkl": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 14], "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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + + {"matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_ansi_wkl_split_bs_rshift": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + + {"matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_hhkb": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4} + ] } } } From bc8ac8642242516e0fe61f1b97b75374c9150647 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 3 Jul 2024 22:00:53 +1000 Subject: [PATCH 0105/1205] Minimum python version listing. (#23989) --- lib/python/qmk/cli/__init__.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index b504aa5f8c63..f33144587017 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -189,20 +189,22 @@ def _eprint(errmsg): # Supported version information # # Based on the OSes we support these are the minimum python version available by default. -# Last update: 2021 Jan 02 +# Last update: 2024 Jun 24 # -# Arch: 3.9 -# Debian: 3.7 -# Fedora 31: 3.7 -# Fedora 32: 3.8 -# Fedora 33: 3.9 -# FreeBSD: 3.7 -# Gentoo: 3.7 -# macOS: 3.9 (from homebrew) -# msys2: 3.8 -# Slackware: 3.7 -# solus: 3.7 -# void: 3.9 +# Arch: 3.12 +# Debian 11: 3.9 +# Debian 12: 3.11 +# Fedora 39: 3.12 +# Fedora 40: 3.12 +# FreeBSD: 3.11 +# Gentoo: 3.12 +# macOS: 3.12 (from homebrew) +# msys2: 3.11 +# Slackware: 3.9 +# solus: 3.10 +# Ubuntu 22.04: 3.10 +# Ubuntu 24.04: 3.12 +# void: 3.12 if sys.version_info[0] != 3 or sys.version_info[1] < 7: _eprint('Error: Your Python is too old! Please upgrade to Python 3.7 or later.') From e07f752a5704640052963ff7777bd3b87a429f6f Mon Sep 17 00:00:00 2001 From: DavidSannier Date: Thu, 4 Jul 2024 01:15:44 +0200 Subject: [PATCH 0106/1205] [build_test] set CONSOLE_ENABLE=yes if DEBUG > 0 (#23097) --- builddefs/build_test.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk index 2cc1134da5b3..d0de63c6f58b 100644 --- a/builddefs/build_test.mk +++ b/builddefs/build_test.mk @@ -47,7 +47,8 @@ PLATFORM:=TEST PLATFORM_KEY:=test BOOTLOADER_TYPE:=none -ifeq ($(strip $(DEBUG)), 1) +DEBUG ?= 0 +ifneq ($(strip $(DEBUG)), 0) CONSOLE_ENABLE = yes endif From bdca9318f9f6a7b4ea697113a2e0b3117a67e093 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 3 Jul 2024 19:13:00 -0700 Subject: [PATCH 0107/1205] Change suspend condition check order on ChibiOS (#24020) --- tmk_core/protocol/chibios/chibios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c index a249af8d38cc..b879bdac7787 100644 --- a/tmk_core/protocol/chibios/chibios.c +++ b/tmk_core/protocol/chibios/chibios.c @@ -184,7 +184,7 @@ void protocol_pre_task(void) { /* Do this in the suspended state */ suspend_power_down(); // on AVR this deep sleeps for 15ms /* Remote wakeup */ - if ((USB_DRIVER.status & USB_GETSTATUS_REMOTE_WAKEUP_ENABLED) && suspend_wakeup_condition()) { + if (suspend_wakeup_condition() && (USB_DRIVER.status & USB_GETSTATUS_REMOTE_WAKEUP_ENABLED)) { usbWakeupHost(&USB_DRIVER); # if USB_SUSPEND_WAKEUP_DELAY > 0 // Some hubs, kvm switches, and monitors do From c2f7974c8eb5154c5a79c74150fc934086175024 Mon Sep 17 00:00:00 2001 From: James Gzowski Date: Thu, 4 Jul 2024 03:34:17 +0100 Subject: [PATCH 0108/1205] [Keyboard] Add Ashwing66 (#24031) * Create hello.txt * Add files via upload * Create keymap.c * Ashwing66 * Update readme.md * Update keymap.c * Ashwing66 addition * Ashwing66 addition * Changes as per request * Changes as per request * Changes as per request, Updated repo, fixed filenames * 02-Jul-11:04:08 --- keyboards/ashwing66/config.h | 6 + keyboards/ashwing66/keyboard.json | 166 +++++++++++++++++++ keyboards/ashwing66/keymaps/default/keymap.c | 41 +++++ keyboards/ashwing66/keymaps/default/rules.mk | 1 + keyboards/ashwing66/keymaps/via/keymap.c | 41 +++++ keyboards/ashwing66/keymaps/via/rules.mk | 2 + keyboards/ashwing66/readme.md | 23 +++ 7 files changed, 280 insertions(+) create mode 100644 keyboards/ashwing66/config.h create mode 100644 keyboards/ashwing66/keyboard.json create mode 100644 keyboards/ashwing66/keymaps/default/keymap.c create mode 100644 keyboards/ashwing66/keymaps/default/rules.mk create mode 100644 keyboards/ashwing66/keymaps/via/keymap.c create mode 100644 keyboards/ashwing66/keymaps/via/rules.mk create mode 100644 keyboards/ashwing66/readme.md diff --git a/keyboards/ashwing66/config.h b/keyboards/ashwing66/config.h new file mode 100644 index 000000000000..344ff3270691 --- /dev/null +++ b/keyboards/ashwing66/config.h @@ -0,0 +1,6 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define ENCODER_MAP_KEY_DELAY 10 +#define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/ashwing66/keyboard.json b/keyboards/ashwing66/keyboard.json new file mode 100644 index 000000000000..27a5799964a6 --- /dev/null +++ b/keyboards/ashwing66/keyboard.json @@ -0,0 +1,166 @@ +{ + "manufacturer": "gzowski", + "keyboard_name": "Ashwing66", + "maintainer": "gzowski", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "GP12", "pin_b": "GP11"} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["GP2", "GP3", "GP4", "GP5", "GP6", "GP7", "GP14", "GP15", "GP16", "GP17", "GP19", "GP20", "GP21", "GP22", "GP26", "GP27"], + "rows": ["GP28", "GP8", "GP9", "GP10", "GP13"] + }, + "processor": "RP2040", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 1, "flags": 4}, + {"matrix": [0, 2], "x": 33, "y": 2, "flags": 4}, + {"matrix": [0, 3], "x": 49, "y": 4, "flags": 4}, + {"matrix": [0, 4], "x": 65, "y": 7, "flags": 4}, + {"matrix": [0, 5], "x": 81, "y": 11, "flags": 4}, + {"matrix": [3, 6], "x": 86, "y": 39, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 56, "flags": 4}, + {"matrix": [4, 7], "x": 96, "y": 63, "flags": 4}, + {"matrix": [4, 8], "x": 126, "y": 63, "flags": 4}, + {"matrix": [4, 9], "x": 141, "y": 56, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 39, "flags": 4}, + {"matrix": [0, 10], "x": 141, "y": 11, "flags": 4}, + {"matrix": [0, 11], "x": 157, "y": 7, "flags": 4}, + {"matrix": [0, 12], "x": 173, "y": 4, "flags": 4}, + {"matrix": [0, 13], "x": 189, "y": 2, "flags": 4}, + {"matrix": [0, 14], "x": 206, "y": 1, "flags": 4}, + {"matrix": [0, 15], "x": 223, "y": 0, "flags": 4} + ], + "led_flush_limit": 16, + "led_process_limit": 5, + "max_brightness": 125, + "sleep": true + }, + "url": "https://github.com/gzowski", + "usb": { + "device_version": "1.0.0", + "pid": "0x6F64", + "vid": "0x7372" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP0" + }, + "layouts": { + "LAYOUT_5x16": { + "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, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1}, + {"matrix": [1, 14], "x": 14, "y": 1}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 10], "x": 10, "y": 2}, + {"matrix": [2, 11], "x": 11, "y": 2}, + {"matrix": [2, 12], "x": 12, "y": 2}, + {"matrix": [2, 13], "x": 13, "y": 2}, + {"matrix": [2, 14], "x": 14, "y": 2}, + {"matrix": [2, 15], "x": 15, "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}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + {"matrix": [3, 6], "x": 6, "y": 3}, + {"matrix": [3, 8], "x": 8, "y": 3}, + {"matrix": [3, 9], "x": 9, "y": 3}, + {"matrix": [3, 10], "x": 10, "y": 3}, + {"matrix": [3, 11], "x": 11, "y": 3}, + {"matrix": [3, 12], "x": 12, "y": 3}, + {"matrix": [3, 13], "x": 13, "y": 3}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4}, + {"matrix": [4, 1], "x": 1, "y": 4}, + {"matrix": [4, 2], "x": 2, "y": 4}, + {"matrix": [4, 3], "x": 3, "y": 4}, + {"matrix": [4, 4], "x": 4, "y": 4}, + {"matrix": [4, 5], "x": 5, "y": 4}, + {"matrix": [4, 6], "x": 6, "y": 4}, + {"matrix": [4, 7], "x": 7, "y": 4}, + {"matrix": [4, 8], "x": 8, "y": 4}, + {"matrix": [4, 9], "x": 9, "y": 4}, + {"matrix": [4, 10], "x": 10, "y": 4}, + {"matrix": [4, 11], "x": 11, "y": 4}, + {"matrix": [4, 12], "x": 12, "y": 4}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/ashwing66/keymaps/default/keymap.c b/keyboards/ashwing66/keymaps/default/keymap.c new file mode 100644 index 000000000000..2b317e19ebab --- /dev/null +++ b/keyboards/ashwing66/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2023 James GzowskiMO(_LAYERB) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +enum custom_layer { + _LAYERA, + _LAYERB, + _LAYERC, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYERA] = LAYOUT_5x16( + KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_GRV , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_MINS , + KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT , + KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LBRC ,KC_MUTE ,KC_RBRC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + KC_LBRC,KC_PSCR,KC_CAPS ,MO(_LAYERB),KC_LGUI ,KC_LALT ,KC_SPC ,KC_PGDN ,KC_PGUP ,KC_ENT ,KC_BSPC ,MO(_LAYERC),KC_INS ,KC_DEL ,KC_BSLS ,KC_RBRC +), + [_LAYERB] = LAYOUT_5x16( + KC_ESC ,RGB_TOG,RGB_RMOD,RGB_MOD ,RGB_VAD ,RGB_VAI ,RGB_SPD ,RGB_SPI ,RGB_HUD ,RGB_HUI ,RGB_SAD ,RGB_SAI , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_BTN1 ,KC_MS_U ,KC_BTN2 ,KC_P ,KC_EQL , + KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_SCLN ,KC_QUOT , + KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LBRC ,KC_MUTE ,KC_RBRC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + KC_LBRC,KC_PSCR,KC_CAPS ,_______ ,KC_LGUI ,KC_LALT ,KC_SPC ,KC_END ,KC_HOME ,KC_ENT ,KC_BSPC ,_______ ,KC_INS ,KC_DEL ,KC_BSLS ,KC_RBRC +), + [_LAYERC] = LAYOUT_5x16( + KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_GRV , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_UP ,KC_O ,KC_P ,KC_EQL , + KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_SCLN ,KC_QUOT , + KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LBRC ,KC_MUTE ,KC_RBRC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + KC_F11 ,KC_PSCR,KC_CAPS ,_______ ,KC_LGUI ,KC_LALT ,KC_SPC ,KC_END ,KC_HOME ,KC_ENT ,KC_BSPC ,_______ ,KC_INS ,KC_DEL ,KC_BSLS ,KC_F12 +) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_LAYERA] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [_LAYERB] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI)}, + [_LAYERC] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI)} +}; +#endif diff --git a/keyboards/ashwing66/keymaps/default/rules.mk b/keyboards/ashwing66/keymaps/default/rules.mk new file mode 100644 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/ashwing66/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/ashwing66/keymaps/via/keymap.c b/keyboards/ashwing66/keymaps/via/keymap.c new file mode 100644 index 000000000000..2b317e19ebab --- /dev/null +++ b/keyboards/ashwing66/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2023 James GzowskiMO(_LAYERB) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +enum custom_layer { + _LAYERA, + _LAYERB, + _LAYERC, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYERA] = LAYOUT_5x16( + KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_GRV , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_MINS , + KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT , + KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LBRC ,KC_MUTE ,KC_RBRC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + KC_LBRC,KC_PSCR,KC_CAPS ,MO(_LAYERB),KC_LGUI ,KC_LALT ,KC_SPC ,KC_PGDN ,KC_PGUP ,KC_ENT ,KC_BSPC ,MO(_LAYERC),KC_INS ,KC_DEL ,KC_BSLS ,KC_RBRC +), + [_LAYERB] = LAYOUT_5x16( + KC_ESC ,RGB_TOG,RGB_RMOD,RGB_MOD ,RGB_VAD ,RGB_VAI ,RGB_SPD ,RGB_SPI ,RGB_HUD ,RGB_HUI ,RGB_SAD ,RGB_SAI , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_BTN1 ,KC_MS_U ,KC_BTN2 ,KC_P ,KC_EQL , + KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_SCLN ,KC_QUOT , + KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LBRC ,KC_MUTE ,KC_RBRC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + KC_LBRC,KC_PSCR,KC_CAPS ,_______ ,KC_LGUI ,KC_LALT ,KC_SPC ,KC_END ,KC_HOME ,KC_ENT ,KC_BSPC ,_______ ,KC_INS ,KC_DEL ,KC_BSLS ,KC_RBRC +), + [_LAYERC] = LAYOUT_5x16( + KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_GRV , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_UP ,KC_O ,KC_P ,KC_EQL , + KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_SCLN ,KC_QUOT , + KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LBRC ,KC_MUTE ,KC_RBRC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + KC_F11 ,KC_PSCR,KC_CAPS ,_______ ,KC_LGUI ,KC_LALT ,KC_SPC ,KC_END ,KC_HOME ,KC_ENT ,KC_BSPC ,_______ ,KC_INS ,KC_DEL ,KC_BSLS ,KC_F12 +) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_LAYERA] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [_LAYERB] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI)}, + [_LAYERC] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI)} +}; +#endif diff --git a/keyboards/ashwing66/keymaps/via/rules.mk b/keyboards/ashwing66/keymaps/via/rules.mk new file mode 100644 index 000000000000..f1adcab005e8 --- /dev/null +++ b/keyboards/ashwing66/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/ashwing66/readme.md b/keyboards/ashwing66/readme.md new file mode 100644 index 000000000000..a65769c9cc97 --- /dev/null +++ b/keyboards/ashwing66/readme.md @@ -0,0 +1,23 @@ +# Ashwing66 + +66 key winged unibody split + +* Keyboard Maintainer: [James Gzowski](https://github.com/gzowski) +* Hardware Supported: Pi Pico or equivilent +* Build Guide: [Ashwing66](https://github.com/gzowski/Ashwing66) + +Make example for this keyboard (after setting up your build environment): + + make ashwing66:default + +Flashing example for this keyboard: + + make ashwing66: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). + +## Bootloader + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the PCB, if using a RP2040 press repeatidly to enter boot mode. +* **Hold down boot loader button on MCU** Hold down the boot loader button on the MCU while plugging in the keyboard From 26c114a2b47377db2ef337f3e22e3685e70852bd Mon Sep 17 00:00:00 2001 From: Will Hedges <36576135+will-hedges@users.noreply.github.com> Date: Wed, 3 Jul 2024 21:38:03 -0500 Subject: [PATCH 0109/1205] [keyboard] added bear_face/v3 (#24032) * added keyboard.json, default, default_iso, and keymap READMEs --- keyboards/bear_face/v3/keyboard.json | 287 ++++++++++++++++++ .../bear_face/v3/keymaps/default/keymap.c | 92 ++++++ .../bear_face/v3/keymaps/default/readme.md | 18 ++ .../bear_face/v3/keymaps/default_iso/keymap.c | 92 ++++++ .../v3/keymaps/default_iso/readme.md | 18 ++ 5 files changed, 507 insertions(+) create mode 100644 keyboards/bear_face/v3/keyboard.json create mode 100644 keyboards/bear_face/v3/keymaps/default/keymap.c create mode 100644 keyboards/bear_face/v3/keymaps/default/readme.md create mode 100644 keyboards/bear_face/v3/keymaps/default_iso/keymap.c create mode 100644 keyboards/bear_face/v3/keymaps/default_iso/readme.md diff --git a/keyboards/bear_face/v3/keyboard.json b/keyboards/bear_face/v3/keyboard.json new file mode 100644 index 000000000000..0a0bda8df901 --- /dev/null +++ b/keyboards/bear_face/v3/keyboard.json @@ -0,0 +1,287 @@ +{ + "keyboard_name": "bear_face v3", + "usb": { + "device_version": "3.2.0" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0}, + {"matrix": [0, 14], "x": 14.5, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1, "w": 2}, + {"matrix": [1, 14], "x": 15, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5}, + {"matrix": [2, 14], "x": 15, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3}, + {"matrix": [3, 12], "x": 12.75, "y": 3}, + {"matrix": [3, 13], "x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"matrix": [3, 14], "x": 15, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [4, 10], "x": 10.25, "y": 4}, + {"matrix": [4, 11], "x": 11.25, "y": 4}, + {"matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [5, 9], "x": 10, "y": 5}, + {"matrix": [5, 10], "x": 11, "y": 5}, + {"matrix": [5, 11], "x": 12, "y": 5}, + {"matrix": [5, 12], "x": 13, "y": 5}, + {"matrix": [5, 13], "x": 14, "y": 5}, + {"matrix": [5, 14], "x": 15, "y": 5} + ] + }, + "LAYOUT_83_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0}, + {"matrix": [0, 14], "x": 14.5, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1, "w": 2}, + {"matrix": [1, 14], "x": 15, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5}, + {"matrix": [2, 14], "x": 15, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3}, + {"matrix": [3, 13], "x": 12.75, "y": 3, "w": 2.25}, + {"matrix": [3, 14], "x": 15, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [4, 10], "x": 10.25, "y": 4}, + {"matrix": [4, 11], "x": 11.25, "y": 4}, + {"matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [5, 9], "x": 10, "y": 5}, + {"matrix": [5, 10], "x": 11, "y": 5}, + {"matrix": [5, 11], "x": 12, "y": 5}, + {"matrix": [5, 12], "x": 13, "y": 5}, + {"matrix": [5, 13], "x": 14, "y": 5}, + {"matrix": [5, 14], "x": 15, "y": 5} + ] + }, + "LAYOUT_84_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0}, + {"matrix": [0, 14], "x": 14.5, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1, "w": 2}, + {"matrix": [1, 14], "x": 15, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 14], "x": 15, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3}, + {"matrix": [3, 12], "x": 12.75, "y": 3}, + {"matrix": [3, 13], "x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"matrix": [3, 14], "x": 15, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [4, 10], "x": 10.25, "y": 4}, + {"matrix": [4, 11], "x": 11.25, "y": 4}, + {"matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [5, 9], "x": 10, "y": 5}, + {"matrix": [5, 10], "x": 11, "y": 5}, + {"matrix": [5, 11], "x": 12, "y": 5}, + {"matrix": [5, 12], "x": 13, "y": 5}, + {"matrix": [5, 13], "x": 14, "y": 5}, + {"matrix": [5, 14], "x": 15, "y": 5} + ] + } + } +} diff --git a/keyboards/bear_face/v3/keymaps/default/keymap.c b/keyboards/bear_face/v3/keymaps/default/keymap.c new file mode 100644 index 000000000000..77f161a7104a --- /dev/null +++ b/keyboards/bear_face/v3/keymaps/default/keymap.c @@ -0,0 +1,92 @@ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layers { + _QWER, + _COLE, + _DVOR, + _FN1, +}; + +#define FN1_CAPS LT(_FN1, KC_CAPS) + +//custom keycode enums +enum custom_keycodes { + BASE_QWER = QK_KB_0, + BASE_COLE, + BASE_DVOR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWER] = LAYOUT_83_ansi( + 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_NO, KC_DEL, + 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_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, + FN1_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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_COLE] = LAYOUT_83_ansi( + 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_NO, KC_DEL, + 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_HOME, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_DVOR] = LAYOUT_83_ansi( + 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_NO, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_HOME, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGUP, + FN1_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGDN, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_83_ansi( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, + _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, BASE_COLE, + _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BASE_DVOR, + _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + [_BLANK] = LAYOUT_83_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +*/ +}; + + +// Macros to allow the user to set whatever default layer they want, even after reboot +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BASE_QWER: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWER); + } + break; + case BASE_COLE: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLE); + } + break; + case BASE_DVOR: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVOR); + } + break; + } + return true; +}; diff --git a/keyboards/bear_face/v3/keymaps/default/readme.md b/keyboards/bear_face/v3/keymaps/default/readme.md new file mode 100644 index 000000000000..a86b77bb1917 --- /dev/null +++ b/keyboards/bear_face/v3/keymaps/default/readme.md @@ -0,0 +1,18 @@ +# default bear_face layout + +This layout replaces the stock layout on the Vortex Race 3. + +- Caps Lock indicator LED is enabled by default +- Layer Tap on Caps Lock (tap for Caps Lock, hold for _FN1) +- FORCE_NKRO enabled by default + +- Pn key is set to 'KC_NO' by default + * Might be a good place for a macro, or to put your PC to sleep, etc. + +- A combined function layer that mimics the sublegends on the stock caps (regardless of layout) + * 'Reset' will put the keyboard into DFU mode + * 'APP' sends 'KC_APP' + * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) + +- New things in v3: + * v3.1c PCB is compatible with both rev1 (Micro-USB) and rev2 (USB-C) stock cases diff --git a/keyboards/bear_face/v3/keymaps/default_iso/keymap.c b/keyboards/bear_face/v3/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..73a1155b6a56 --- /dev/null +++ b/keyboards/bear_face/v3/keymaps/default_iso/keymap.c @@ -0,0 +1,92 @@ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layers { + _QWER, + _COLE, + _DVOR, + _FN1, +}; + +#define FN1_CAPS LT(_FN1, KC_CAPS) + +//custom keycode enums +enum custom_keycodes { + BASE_QWER = SAFE_RANGE, + BASE_COLE, + BASE_DVOR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWER] = LAYOUT_84_iso( + 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_NO, KC_DEL, + 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_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_PGUP, + FN1_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_COLE] = LAYOUT_84_iso( + 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_NO, KC_DEL, + 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_HOME, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_PGUP, + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_DVOR] = LAYOUT_84_iso( + 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_NO, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_HOME, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_PGUP, + FN1_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_84_iso( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, + _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, BASE_COLE, + _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BASE_DVOR, + _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + [_BLANK] = LAYOUT_84_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +*/ +}; + + +// Macros to allow the user to set whatever default layer they want, even after reboot +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BASE_QWER: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWER); + } + break; + case BASE_COLE: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLE); + } + break; + case BASE_DVOR: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVOR); + } + break; + } + return true; +}; diff --git a/keyboards/bear_face/v3/keymaps/default_iso/readme.md b/keyboards/bear_face/v3/keymaps/default_iso/readme.md new file mode 100644 index 000000000000..a86b77bb1917 --- /dev/null +++ b/keyboards/bear_face/v3/keymaps/default_iso/readme.md @@ -0,0 +1,18 @@ +# default bear_face layout + +This layout replaces the stock layout on the Vortex Race 3. + +- Caps Lock indicator LED is enabled by default +- Layer Tap on Caps Lock (tap for Caps Lock, hold for _FN1) +- FORCE_NKRO enabled by default + +- Pn key is set to 'KC_NO' by default + * Might be a good place for a macro, or to put your PC to sleep, etc. + +- A combined function layer that mimics the sublegends on the stock caps (regardless of layout) + * 'Reset' will put the keyboard into DFU mode + * 'APP' sends 'KC_APP' + * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) + +- New things in v3: + * v3.1c PCB is compatible with both rev1 (Micro-USB) and rev2 (USB-C) stock cases From 977918982d0ee38ade3eeb178ca572645d0f9553 Mon Sep 17 00:00:00 2001 From: Guanzhong Chen Date: Wed, 3 Jul 2024 22:38:38 -0400 Subject: [PATCH 0110/1205] monsgeek/m5: make numlock and capslock LEDs work (#24027) --- keyboards/monsgeek/m5/m5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/monsgeek/m5/m5.c b/keyboards/monsgeek/m5/m5.c index 3e1d752581cc..5113e322a5a2 100644 --- a/keyboards/monsgeek/m5/m5.c +++ b/keyboards/monsgeek/m5/m5.c @@ -157,6 +157,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { + led_update_ports(led_state); gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui); } return res; From c663f5e9f33384a1589b4b476610f3069c8c2542 Mon Sep 17 00:00:00 2001 From: chalex <68408520+gaclee3b@users.noreply.github.com> Date: Wed, 3 Jul 2024 22:40:24 -0400 Subject: [PATCH 0111/1205] [Keyboard] Add chlx lfn merro (#24026) * add previous working files to new branch * update config files. tested via version * update per qmk PR requested changes - 1. rename info.json -> keyboard.json, move config.h -> keyamps/via/config.h, remove rules.mk * update photo link for pcb * remove redundant community keymaps * Update keyboards/chlx/lfn_merro60/keymaps/default/keymap.c correct keycode for iso keys Co-authored-by: Duncan Sutherland * switch image url to source from imgur instead of github --------- Co-authored-by: chalex Co-authored-by: Duncan Sutherland --- keyboards/chlx/lfn_merro60/keyboard.json | 957 ++++++++++++++++++ .../chlx/lfn_merro60/keymaps/default/keymap.c | 35 + .../chlx/lfn_merro60/keymaps/via/config.h | 21 + .../chlx/lfn_merro60/keymaps/via/keymap.c | 35 + .../chlx/lfn_merro60/keymaps/via/rules.mk | 2 + keyboards/chlx/lfn_merro60/readme.md | 27 + 6 files changed, 1077 insertions(+) create mode 100644 keyboards/chlx/lfn_merro60/keyboard.json create mode 100644 keyboards/chlx/lfn_merro60/keymaps/default/keymap.c create mode 100644 keyboards/chlx/lfn_merro60/keymaps/via/config.h create mode 100644 keyboards/chlx/lfn_merro60/keymaps/via/keymap.c create mode 100644 keyboards/chlx/lfn_merro60/keymaps/via/rules.mk create mode 100644 keyboards/chlx/lfn_merro60/readme.md diff --git a/keyboards/chlx/lfn_merro60/keyboard.json b/keyboards/chlx/lfn_merro60/keyboard.json new file mode 100644 index 000000000000..a35b598f0eb4 --- /dev/null +++ b/keyboards/chlx/lfn_merro60/keyboard.json @@ -0,0 +1,957 @@ +{ + "manufacturer": "chlx bsmt", + "keyboard_name": "lfn.merro60", + "maintainer": "gaclee3b", + "bootloader": "atmel-dfu", + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "qmk": { + "locking": { + "enabled": true, + "resync": true + } + }, + "indicators": { + "caps_lock": "B2", + "on_state": 0, + "compose": "B0" + }, + "matrix_pins": { + "rows": ["F5", "F1", "F4", "F0", "F7", "F6", "D3", "D5", "B3", "B7"], + "cols": ["C6", "B6", "B5", "B4", "D7", "D6", "D4"] + }, + "processor": "atmega32u4", + "url": "www.github.com/gaclee3b", + "usb": { + "device_version": "2.0.1", + "pid": "0x0604", + "vid": "0x4358" + }, + "community_layouts": ["60_ansi", "60_ansi_split_bs_rshift", "60_ansi_tsangan", "60_tsangan_hhkb", "60_ansi_wkl", "60_ansi_wkl_split_bs_rshift", "60_hhkb", "60_iso", "60_iso_split_bs_rshift", "60_iso_tsangan", "60_iso_tsangan_split_bs_rshift", "60_iso_wkl", "60_iso_wkl_split_bs_rshift"], + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [8, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [9, 4], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [9, 6], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [8, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [9, 4], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi_tsangan": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [8, 0], "x": 1.5, "y": 4}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [9, 5], "x": 12.5, "y": 4}, + {"matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_ansi_wkl": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_ansi_wkl_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [9, 6], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_hhkb": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [9, 6], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [8, 0], "x": 1.5, "y": 4}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [9, 5], "x": 12.5, "y": 4} + ] + }, + "LAYOUT_60_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [8, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [9, 4], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [9, 6], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [8, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [9, 4], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_iso_tsangan": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [8, 0], "x": 1.5, "y": 4}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [9, 5], "x": 12.5, "y": 4}, + {"matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_iso_tsangan_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [9, 6], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [8, 0], "x": 1.5, "y": 4}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [9, 5], "x": 12.5, "y": 4}, + {"matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_iso_wkl": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_iso_wkl_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [9, 6], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_tsangan_hhkb": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [9, 6], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [8, 0], "x": 1.5, "y": 4}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [9, 5], "x": 12.5, "y": 4}, + {"matrix": [8, 6], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [9, 6], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 2, "w": 1.25}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [9, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [8, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [9, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [8, 2], "x": 3.75, "y": 4, "w": 2.75}, + {"matrix": [8, 3], "x": 6.5, "y": 4, "w": 1.25}, + {"matrix": [9, 3], "x": 7.75, "y": 4, "w": 2.25}, + {"matrix": [9, 4], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/chlx/lfn_merro60/keymaps/default/keymap.c b/keyboards/chlx/lfn_merro60/keymaps/default/keymap.c new file mode 100644 index 000000000000..8cddabd62ba2 --- /dev/null +++ b/keyboards/chlx/lfn_merro60/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2024 Alexander Lee + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_all( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL), + +[1] = LAYOUT_all( + KC_GRV, 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_CAPS, _______, KC_HOME, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_UP, _______, QK_BOOT, + _______, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/chlx/lfn_merro60/keymaps/via/config.h b/keyboards/chlx/lfn_merro60/keymaps/via/config.h new file mode 100644 index 000000000000..bdeed0c824e1 --- /dev/null +++ b/keyboards/chlx/lfn_merro60/keymaps/via/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2024 Alexander Lee + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* VIA related config */ +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/chlx/lfn_merro60/keymaps/via/keymap.c b/keyboards/chlx/lfn_merro60/keymaps/via/keymap.c new file mode 100644 index 000000000000..2163e4289f76 --- /dev/null +++ b/keyboards/chlx/lfn_merro60/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2024 Alexander Lee + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = 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_BSLS, KC_GRV, + 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_BSPC, + 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_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_LSCR, KC_RALT, KC_RGUI, KC_APP, KC_RCTL), + +[1] = LAYOUT_all( + KC_GRV, 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_CAPS, _______, KC_HOME, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_UP, _______, QK_BOOT, + _______, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/chlx/lfn_merro60/keymaps/via/rules.mk b/keyboards/chlx/lfn_merro60/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/chlx/lfn_merro60/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/chlx/lfn_merro60/readme.md b/keyboards/chlx/lfn_merro60/readme.md new file mode 100644 index 000000000000..1c59ac550e78 --- /dev/null +++ b/keyboards/chlx/lfn_merro60/readme.md @@ -0,0 +1,27 @@ +# lfn.merro60 + +![lfn.merro60 PCB](https://i.imgur.com/naIgvKy.jpg) + +- Standard 60% format keyboard PCB with USB-C and unified daughterboard compatibility. +- Modified cutouts to allow usage of certain tray mount cases into gummy gasket o-ring mount. +- Meant to be manufactured in 2mm thickness. + +* Keyboard Maintainer: [Alexander Lee](https://github.com/gaclee3b) +* Hardware Supported: chlx PCB lfn.merro60.x.x.x + +Make example for this keyboard (after setting up your build environment): + + make chlx/lfn_merro60:default + +Flashing example for this keyboard: + + make chlx/lfn_merro60: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). + +## Bootloader + +Enter bootloader mode by any of the following options - +- When unplugged, holding the top-left key (typically ESC) while plugging in the keyboard +- After plugging in, press and release the reset button on the pcb top-side near the spacebar switch locations +- After plugging in, short out the two reset metal contacts near the 'z' key (accessible through the switch LED slot) From 1c6cdb8d74ae58583fb99c194aa94224a03f0162 Mon Sep 17 00:00:00 2001 From: Cipulot <40441626+Cipulot@users.noreply.github.com> Date: Thu, 4 Jul 2024 11:42:07 +0900 Subject: [PATCH 0112/1205] [Keyboard] Addition of EC 60X (#24028) * Addition of EC 60X * Update keyboards/cipulot/ec_60x/keymaps/via/keymap.c Co-authored-by: Duncan Sutherland * Update keyboards/cipulot/ec_60x/keymaps/default/keymap.c Co-authored-by: Duncan Sutherland * Update keyboards/cipulot/ec_60x/keyboard.json Co-authored-by: Duncan Sutherland * Update keyboards/cipulot/ec_60x/keyboard.json Co-authored-by: Duncan Sutherland * Update keyboards/cipulot/ec_60x/keyboard.json Co-authored-by: Duncan Sutherland * Update keyboards/cipulot/ec_60x/keyboard.json Co-authored-by: Duncan Sutherland * Revert "Update keyboards/cipulot/ec_60x/keyboard.json" This reverts commit 5f49ef63cdcc4ff99d8056b243d255fd9b30420c. * Revert "Update keyboards/cipulot/ec_60x/keyboard.json" This reverts commit 5fb9706acd7bcd40f60edfe2d8c46bffc460ee5e. * revert of what was done with the layouts * Update keyboards/cipulot/ec_60x/mcuconf.h Co-authored-by: Drashna Jaelre --------- Co-authored-by: Duncan Sutherland Co-authored-by: Drashna Jaelre --- keyboards/cipulot/ec_60x/config.h | 71 ++++ keyboards/cipulot/ec_60x/halconf.h | 23 ++ keyboards/cipulot/ec_60x/keyboard.json | 330 ++++++++++++++++++ .../ec_60x/keymaps/60_ansi_tsangan/keymap.c | 42 +++ .../ec_60x/keymaps/60_iso_tsangan/keymap.c | 42 +++ .../cipulot/ec_60x/keymaps/60_jis/keymap.c | 42 +++ .../cipulot/ec_60x/keymaps/default/keymap.c | 42 +++ keyboards/cipulot/ec_60x/keymaps/via/keymap.c | 42 +++ keyboards/cipulot/ec_60x/keymaps/via/rules.mk | 1 + keyboards/cipulot/ec_60x/mcuconf.h | 25 ++ keyboards/cipulot/ec_60x/post_rules.mk | 3 + keyboards/cipulot/ec_60x/readme.md | 26 ++ keyboards/cipulot/ec_60x/rules.mk | 5 + 13 files changed, 694 insertions(+) create mode 100644 keyboards/cipulot/ec_60x/config.h create mode 100644 keyboards/cipulot/ec_60x/halconf.h create mode 100644 keyboards/cipulot/ec_60x/keyboard.json create mode 100644 keyboards/cipulot/ec_60x/keymaps/60_ansi_tsangan/keymap.c create mode 100644 keyboards/cipulot/ec_60x/keymaps/60_iso_tsangan/keymap.c create mode 100644 keyboards/cipulot/ec_60x/keymaps/60_jis/keymap.c create mode 100644 keyboards/cipulot/ec_60x/keymaps/default/keymap.c create mode 100644 keyboards/cipulot/ec_60x/keymaps/via/keymap.c create mode 100644 keyboards/cipulot/ec_60x/keymaps/via/rules.mk create mode 100644 keyboards/cipulot/ec_60x/mcuconf.h create mode 100644 keyboards/cipulot/ec_60x/post_rules.mk create mode 100644 keyboards/cipulot/ec_60x/readme.md create mode 100644 keyboards/cipulot/ec_60x/rules.mk diff --git a/keyboards/cipulot/ec_60x/config.h b/keyboards/cipulot/ec_60x/config.h new file mode 100644 index 000000000000..1a8d105d6801 --- /dev/null +++ b/keyboards/cipulot/ec_60x/config.h @@ -0,0 +1,71 @@ +/* Copyright 2024 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS \ + { A8, A15, B12, B8, B9} + +#define AMUX_COUNT 1 +#define AMUX_MAX_COLS_COUNT 16 + +#define AMUX_EN_PINS \ + { B5 } + +#define AMUX_SEL_PINS \ + { B6, B7, B4, B3 } + +#define AMUX_COL_CHANNELS_SIZES \ + { 15 } + +#define AMUX_0_COL_CHANNELS \ + { 7, 6, 5, 4, 3, 2, 1, 0, 8, 14, 13, 10, 9, 12, 11} + +#define AMUX_COL_CHANNELS AMUX_0_COL_CHANNELS + +#define DISCHARGE_PIN A2 +#define ANALOG_PORT A3 + +#define DEFAULT_ACTUATION_MODE 0 +#define DEFAULT_MODE_0_ACTUATION_LEVEL 550 +#define DEFAULT_MODE_0_RELEASE_LEVEL 500 +#define DEFAULT_MODE_1_INITIAL_DEADZONE_OFFSET DEFAULT_MODE_0_ACTUATION_LEVEL +#define DEFAULT_MODE_1_ACTUATION_OFFSET 70 +#define DEFAULT_MODE_1_RELEASE_OFFSET 70 +#define DEFAULT_EXTREMUM 1023 +#define EXPECTED_NOISE_FLOOR 0 +#define NOISE_FLOOR_THRESHOLD 50 +#define BOTTOMING_CALIBRATION_THRESHOLD 50 +#define DEFAULT_NOISE_FLOOR_SAMPLING_COUNT 30 +#define DEFAULT_BOTTOMING_READING 1023 +#define DEFAULT_CALIBRATION_STARTER true + +#define DISCHARGE_TIME 10 + +// #define DEBUG_MATRIX_SCAN_RATE +#define EECONFIG_KB_DATA_SIZE 159 + +// PWM driver with direct memory access (DMA) support +#define WS2812_PWM_COMPLEMENTARY_OUTPUT +#define WS2812_PWM_DRIVER PWMD1 +#define WS2812_PWM_CHANNEL 3 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 +#define WS2812_DMA_CHANNEL 6 +#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM1_UP diff --git a/keyboards/cipulot/ec_60x/halconf.h b/keyboards/cipulot/ec_60x/halconf.h new file mode 100644 index 000000000000..fb0f77d82f93 --- /dev/null +++ b/keyboards/cipulot/ec_60x/halconf.h @@ -0,0 +1,23 @@ +/* Copyright 2024 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_ADC TRUE +#define HAL_USE_PAL TRUE +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/cipulot/ec_60x/keyboard.json b/keyboards/cipulot/ec_60x/keyboard.json new file mode 100644 index 000000000000..1d121800fcc5 --- /dev/null +++ b/keyboards/cipulot/ec_60x/keyboard.json @@ -0,0 +1,330 @@ +{ + "manufacturer": "Cipulot", + "keyboard_name": "EC 60X", + "maintainer": "Cipulot", + "bootloader": "stm32-dfu", + "build": { + "lto": true + }, + "diode_direction": "COL2ROW", + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, + "features": { + "bootmagic": false, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "processor": "STM32F411", + "qmk": { + "locking": { + "enabled": true, + "resync": true + } + }, + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "led_count": 22 + }, + "usb": { + "device_version": "0.0.1", + "pid": "0x6BC7", + "shared_endpoint": { + "keyboard": true + }, + "vid": "0x6369" + }, + "ws2812": { + "driver": "pwm", + "pin": "B15" + }, + "layouts": { + "LAYOUT_60_ansi_tsangan": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 14], "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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_iso_tsangan": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 14], "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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_jis": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3}, + {"matrix": [3, 13], "x": 13.25, "y": 3, "w": 1.75}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 4], "x": 4, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 5.5, "y": 4, "w": 2.5}, + {"matrix": [4, 8], "x": 8, "y": 4, "w": 1.5}, + {"matrix": [4, 10], "x": 9.5, "y": 4, "w": 1.5}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 0.75}, + {"matrix": [1, 14], "x": 14.25, "y": 1, "w": 0.75}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"matrix": [2, 13], "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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3}, + {"matrix": [3, 13], "x": 13.25, "y": 3, "w": 0.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 4], "x": 4, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 5.5, "y": 4, "w": 2.5}, + {"matrix": [4, 8], "x": 8, "y": 4, "w": 1.5}, + {"matrix": [4, 10], "x": 9.5, "y": 4, "w": 1.5}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + } + } +} diff --git a/keyboards/cipulot/ec_60x/keymaps/60_ansi_tsangan/keymap.c b/keyboards/cipulot/ec_60x/keymaps/60_ansi_tsangan/keymap.c new file mode 100644 index 000000000000..5c1c44cda9ad --- /dev/null +++ b/keyboards/cipulot/ec_60x/keymaps/60_ansi_tsangan/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2024 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = LAYOUT_60_ansi_tsangan( + 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, + 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_ENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL), + + [1] = LAYOUT_60_ansi_tsangan( + _______, 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_UP, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, + _______, _______, _______, _______, MO(2), _______, _______), + + [2] = LAYOUT_60_ansi_tsangan( + QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/ec_60x/keymaps/60_iso_tsangan/keymap.c b/keyboards/cipulot/ec_60x/keymaps/60_iso_tsangan/keymap.c new file mode 100644 index 000000000000..cc3eea74d755 --- /dev/null +++ b/keyboards/cipulot/ec_60x/keymaps/60_iso_tsangan/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2024 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = LAYOUT_60_iso_tsangan( + 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_ENTER, + 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_NUHS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL), + + [1] = LAYOUT_60_iso_tsangan( + _______, 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_UP, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, + _______, _______, _______, _______, MO(2), _______, _______), + + [2] = LAYOUT_60_iso_tsangan( + QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/ec_60x/keymaps/60_jis/keymap.c b/keyboards/cipulot/ec_60x/keymaps/60_jis/keymap.c new file mode 100644 index 000000000000..f75581b00610 --- /dev/null +++ b/keyboards/cipulot/ec_60x/keymaps/60_jis/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2024 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = LAYOUT_60_jis( + 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_INT3, 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_ENTER, + 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_NUHS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_INT5, KC_SPC, KC_INT4, KC_INT2, KC_RALT, MO(1), KC_RCTL), + + [1] = LAYOUT_60_jis( + _______, 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_UP, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(2), _______, _______), + + [2] = LAYOUT_60_jis( + QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/ec_60x/keymaps/default/keymap.c b/keyboards/cipulot/ec_60x/keymaps/default/keymap.c new file mode 100644 index 000000000000..33e9ed7c511a --- /dev/null +++ b/keyboards/cipulot/ec_60x/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2024 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = 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_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, KC_ENTER, + 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_NUHS, KC_ENTER, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RALT, MO(1), KC_RCTL), + + [1] = LAYOUT_all( + _______, 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_UP, _______, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, MO(2), _______), + + [2] = LAYOUT_all( + QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/ec_60x/keymaps/via/keymap.c b/keyboards/cipulot/ec_60x/keymaps/via/keymap.c new file mode 100644 index 000000000000..33e9ed7c511a --- /dev/null +++ b/keyboards/cipulot/ec_60x/keymaps/via/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2024 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = 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_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, KC_ENTER, + 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_NUHS, KC_ENTER, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RALT, MO(1), KC_RCTL), + + [1] = LAYOUT_all( + _______, 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_UP, _______, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, MO(2), _______), + + [2] = LAYOUT_all( + QK_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + // clang-format on +}; diff --git a/keyboards/cipulot/ec_60x/keymaps/via/rules.mk b/keyboards/cipulot/ec_60x/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/cipulot/ec_60x/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/cipulot/ec_60x/mcuconf.h b/keyboards/cipulot/ec_60x/mcuconf.h new file mode 100644 index 000000000000..88185d8e9dac --- /dev/null +++ b/keyboards/cipulot/ec_60x/mcuconf.h @@ -0,0 +1,25 @@ +/* Copyright 2024 Cipulot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +#undef STM32_ADC_USE_ADC1 +#define STM32_ADC_USE_ADC1 TRUE + +#undef STM32_PWM_USE_TIM1 +#define STM32_PWM_USE_TIM1 TRUE diff --git a/keyboards/cipulot/ec_60x/post_rules.mk b/keyboards/cipulot/ec_60x/post_rules.mk new file mode 100644 index 000000000000..d726a112a8c7 --- /dev/null +++ b/keyboards/cipulot/ec_60x/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(VIA_ENABLE)), yes) + SRC += keyboards/cipulot/common/via_ec.c +endif diff --git a/keyboards/cipulot/ec_60x/readme.md b/keyboards/cipulot/ec_60x/readme.md new file mode 100644 index 000000000000..311665757196 --- /dev/null +++ b/keyboards/cipulot/ec_60x/readme.md @@ -0,0 +1,26 @@ +# EC 60X + +![EC 60X PCB](https://i.imgur.com/aYQgeSn.png) + +Universal 60% Electrostatic Capacitive PCB, with multi-layout support. + +* Keyboard Maintainer: [cipulot](https://github.com/cipulot) +* Hardware Supported: EC 60X +* Hardware Availability: TBD + +Make example for this keyboard (after setting up your build environment): + + make cipulot/ec_60x:default + +Flashing example for this keyboard: + + make cipulot/ec_60x: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). + +## Bootloader + +Enter the bootloader in 2 ways: + +* **Physical reset**: Long short the exposed pins on the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/cipulot/ec_60x/rules.mk b/keyboards/cipulot/ec_60x/rules.mk new file mode 100644 index 000000000000..318e0215ce90 --- /dev/null +++ b/keyboards/cipulot/ec_60x/rules.mk @@ -0,0 +1,5 @@ +CUSTOM_MATRIX = lite +ANALOG_DRIVER_REQUIRED = yes +VPATH += keyboards/cipulot/common +SRC += matrix.c ec_board.c ec_switch_matrix.c +OPT = 2 From 4ced8d9371441000d5f03a5b61c7ddceb490cbbc Mon Sep 17 00:00:00 2001 From: Ryan Neff Date: Thu, 4 Jul 2024 12:49:55 -0700 Subject: [PATCH 0113/1205] Fixes duplicate pid/vid for sofle_choc (#24030) --- keyboards/sofle_choc/keyboard.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/sofle_choc/keyboard.json b/keyboards/sofle_choc/keyboard.json index f0ce6d78e04a..c4d9822371b8 100644 --- a/keyboards/sofle_choc/keyboard.json +++ b/keyboards/sofle_choc/keyboard.json @@ -130,8 +130,8 @@ "url": "https://github.com/josefadamcik/SofleKeyboard", "usb": { "device_version": "0.0.1", - "pid": "0x0287", - "vid": "0xFC32" + "pid": "0x5343", + "vid": "0x424C" }, "ws2812": { "pin": "D3" From 43fc7b5a4f6d1d9079b09beb2a7eb24864f5222b Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jul 2024 09:44:23 +1000 Subject: [PATCH 0114/1205] `kikoslab/kl90`: add additional layouts (#24024) --- keyboards/kikoslab/kl90/keyboard.json | 1048 ++++++++++++++++++++++++- 1 file changed, 1037 insertions(+), 11 deletions(-) diff --git a/keyboards/kikoslab/kl90/keyboard.json b/keyboards/kikoslab/kl90/keyboard.json index 391008b58f57..0a107dfba8ef 100644 --- a/keyboards/kikoslab/kl90/keyboard.json +++ b/keyboards/kikoslab/kl90/keyboard.json @@ -117,17 +117,17 @@ {"matrix": [4, 0], "x": 0, "y": 4.5}, {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 1.25}, - {"matrix": [4, 2], "x": 2.75, "y": 4.5}, - {"matrix": [4, 3], "x": 3.75, "y": 4.5}, - {"matrix": [4, 4], "x": 4.75, "y": 4.5}, - {"matrix": [4, 5], "x": 5.75, "y": 4.5}, - {"matrix": [4, 6], "x": 6.75, "y": 4.5}, - {"matrix": [4, 7], "x": 7.75, "y": 4.5}, - {"matrix": [4, 8], "x": 8.75, "y": 4.5}, - {"matrix": [4, 9], "x": 9.75, "y": 4.5}, - {"matrix": [4, 10], "x": 10.75, "y": 4.5}, - {"matrix": [4, 11], "x": 11.75, "y": 4.5}, - {"matrix": [4, 12], "x": 12.75, "y": 4.5}, + {"matrix": [4, 12], "x": 2.75, "y": 4.5}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, {"matrix": [4, 14], "x": 15.75, "y": 4.75}, @@ -147,6 +147,1032 @@ {"matrix": [5, 11], "x": 12.5, "y": 5.5}, {"matrix": [5, 12], "x": 13.5, "y": 5.5}, + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, + {"matrix": [5, 14], "x": 15.75, "y": 5.75}, + {"matrix": [5, 15], "x": 16.75, "y": 5.75} + ] + }, + "LAYOUT_solder_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 3.75, "y": 0}, + {"matrix": [0, 4], "x": 4.75, "y": 0}, + {"matrix": [0, 5], "x": 5.75, "y": 0}, + + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 8, "y": 0}, + {"matrix": [0, 8], "x": 9, "y": 0}, + {"matrix": [0, 9], "x": 10, "y": 0}, + + {"matrix": [0, 10], "x": 11.25, "y": 0}, + {"matrix": [0, 11], "x": 12.25, "y": 0}, + {"matrix": [0, 12], "x": 13.25, "y": 0}, + {"matrix": [0, 13], "x": 14.25, "y": 0}, + + {"matrix": [0, 14], "x": 15.5, "y": 0}, + + {"matrix": [0, 15], "x": 17, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + + {"matrix": [1, 1], "x": 1.5, "y": 1.5}, + {"matrix": [1, 2], "x": 2.5, "y": 1.5}, + {"matrix": [1, 3], "x": 3.5, "y": 1.5}, + {"matrix": [1, 4], "x": 4.5, "y": 1.5}, + {"matrix": [1, 5], "x": 5.5, "y": 1.5}, + {"matrix": [1, 6], "x": 6.5, "y": 1.5}, + {"matrix": [1, 7], "x": 7.5, "y": 1.5}, + {"matrix": [1, 8], "x": 8.5, "y": 1.5}, + {"matrix": [1, 9], "x": 9.5, "y": 1.5}, + {"matrix": [1, 10], "x": 10.5, "y": 1.5}, + {"matrix": [1, 11], "x": 11.5, "y": 1.5}, + {"matrix": [1, 12], "x": 12.5, "y": 1.5}, + {"matrix": [1, 13], "x": 13.5, "y": 1.5}, + {"matrix": [1, 14], "x": 14.5, "y": 1.5, "w": 2}, + + {"matrix": [1, 15], "x": 17, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5}, + + {"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 3, "y": 2.5}, + {"matrix": [2, 3], "x": 4, "y": 2.5}, + {"matrix": [2, 4], "x": 5, "y": 2.5}, + {"matrix": [2, 5], "x": 6, "y": 2.5}, + {"matrix": [2, 6], "x": 7, "y": 2.5}, + {"matrix": [2, 7], "x": 8, "y": 2.5}, + {"matrix": [2, 8], "x": 9, "y": 2.5}, + {"matrix": [2, 9], "x": 10, "y": 2.5}, + {"matrix": [2, 10], "x": 11, "y": 2.5}, + {"matrix": [2, 11], "x": 12, "y": 2.5}, + {"matrix": [2, 12], "x": 13, "y": 2.5}, + {"matrix": [2, 13], "x": 14, "y": 2.5}, + {"matrix": [2, 14], "x": 15, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 15], "x": 17, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + + {"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75}, + {"matrix": [3, 2], "x": 3.25, "y": 3.5}, + {"matrix": [3, 3], "x": 4.25, "y": 3.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3.5}, + {"matrix": [3, 5], "x": 6.25, "y": 3.5}, + {"matrix": [3, 6], "x": 7.25, "y": 3.5}, + {"matrix": [3, 7], "x": 8.25, "y": 3.5}, + {"matrix": [3, 8], "x": 9.25, "y": 3.5}, + {"matrix": [3, 9], "x": 10.25, "y": 3.5}, + {"matrix": [3, 10], "x": 11.25, "y": 3.5}, + {"matrix": [3, 11], "x": 12.25, "y": 3.5}, + {"matrix": [3, 12], "x": 13.25, "y": 3.5}, + {"matrix": [3, 14], "x": 14.25, "y": 3.5, "w": 2.25}, + + {"matrix": [3, 15], "x": 17, "y": 3.5}, + + {"matrix": [4, 0], "x": 0, "y": 4.5}, + + {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, + {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, + + {"matrix": [4, 14], "x": 15.75, "y": 4.75}, + + {"matrix": [4, 15], "x": 17, "y": 4.5}, + + {"matrix": [5, 0], "x": 0, "y": 5.5}, + + {"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 4, "y": 5.5, "w": 1.25}, + {"matrix": [5, 6], "x": 5.25, "y": 5.5, "w": 6.25}, + {"matrix": [5, 10], "x": 11.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 11], "x": 13, "y": 5.5, "w": 1.5}, + + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, + {"matrix": [5, 14], "x": 15.75, "y": 5.75}, + {"matrix": [5, 15], "x": 16.75, "y": 5.75} + ] + }, + "LAYOUT_solder_ansi_split_space": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 3.75, "y": 0}, + {"matrix": [0, 4], "x": 4.75, "y": 0}, + {"matrix": [0, 5], "x": 5.75, "y": 0}, + + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 8, "y": 0}, + {"matrix": [0, 8], "x": 9, "y": 0}, + {"matrix": [0, 9], "x": 10, "y": 0}, + + {"matrix": [0, 10], "x": 11.25, "y": 0}, + {"matrix": [0, 11], "x": 12.25, "y": 0}, + {"matrix": [0, 12], "x": 13.25, "y": 0}, + {"matrix": [0, 13], "x": 14.25, "y": 0}, + + {"matrix": [0, 14], "x": 15.5, "y": 0}, + + {"matrix": [0, 15], "x": 17, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + + {"matrix": [1, 1], "x": 1.5, "y": 1.5}, + {"matrix": [1, 2], "x": 2.5, "y": 1.5}, + {"matrix": [1, 3], "x": 3.5, "y": 1.5}, + {"matrix": [1, 4], "x": 4.5, "y": 1.5}, + {"matrix": [1, 5], "x": 5.5, "y": 1.5}, + {"matrix": [1, 6], "x": 6.5, "y": 1.5}, + {"matrix": [1, 7], "x": 7.5, "y": 1.5}, + {"matrix": [1, 8], "x": 8.5, "y": 1.5}, + {"matrix": [1, 9], "x": 9.5, "y": 1.5}, + {"matrix": [1, 10], "x": 10.5, "y": 1.5}, + {"matrix": [1, 11], "x": 11.5, "y": 1.5}, + {"matrix": [1, 12], "x": 12.5, "y": 1.5}, + {"matrix": [1, 13], "x": 13.5, "y": 1.5}, + {"matrix": [1, 14], "x": 14.5, "y": 1.5, "w": 2}, + + {"matrix": [1, 15], "x": 17, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5}, + + {"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 3, "y": 2.5}, + {"matrix": [2, 3], "x": 4, "y": 2.5}, + {"matrix": [2, 4], "x": 5, "y": 2.5}, + {"matrix": [2, 5], "x": 6, "y": 2.5}, + {"matrix": [2, 6], "x": 7, "y": 2.5}, + {"matrix": [2, 7], "x": 8, "y": 2.5}, + {"matrix": [2, 8], "x": 9, "y": 2.5}, + {"matrix": [2, 9], "x": 10, "y": 2.5}, + {"matrix": [2, 10], "x": 11, "y": 2.5}, + {"matrix": [2, 11], "x": 12, "y": 2.5}, + {"matrix": [2, 12], "x": 13, "y": 2.5}, + {"matrix": [2, 13], "x": 14, "y": 2.5}, + {"matrix": [2, 14], "x": 15, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 15], "x": 17, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + + {"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75}, + {"matrix": [3, 2], "x": 3.25, "y": 3.5}, + {"matrix": [3, 3], "x": 4.25, "y": 3.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3.5}, + {"matrix": [3, 5], "x": 6.25, "y": 3.5}, + {"matrix": [3, 6], "x": 7.25, "y": 3.5}, + {"matrix": [3, 7], "x": 8.25, "y": 3.5}, + {"matrix": [3, 8], "x": 9.25, "y": 3.5}, + {"matrix": [3, 9], "x": 10.25, "y": 3.5}, + {"matrix": [3, 10], "x": 11.25, "y": 3.5}, + {"matrix": [3, 11], "x": 12.25, "y": 3.5}, + {"matrix": [3, 12], "x": 13.25, "y": 3.5}, + {"matrix": [3, 14], "x": 14.25, "y": 3.5, "w": 2.25}, + + {"matrix": [3, 15], "x": 17, "y": 3.5}, + + {"matrix": [4, 0], "x": 0, "y": 4.5}, + + {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, + {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, + + {"matrix": [4, 14], "x": 15.75, "y": 4.75}, + + {"matrix": [4, 15], "x": 17, "y": 4.5}, + + {"matrix": [5, 0], "x": 0, "y": 5.5}, + + {"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 4, "y": 5.5, "w": 1.25}, + {"matrix": [5, 4], "x": 5.25, "y": 5.5, "w": 2.25}, + {"matrix": [5, 6], "x": 7.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 8], "x": 8.75, "y": 5.5, "w": 2.75}, + {"matrix": [5, 10], "x": 11.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 11], "x": 13, "y": 5.5, "w": 1.5}, + + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, + {"matrix": [5, 14], "x": 15.75, "y": 5.75}, + {"matrix": [5, 15], "x": 16.75, "y": 5.75} + ] + }, + "LAYOUT_solder_ansi_oled": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 3.75, "y": 0}, + {"matrix": [0, 4], "x": 4.75, "y": 0}, + {"matrix": [0, 5], "x": 5.75, "y": 0}, + + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 8, "y": 0}, + {"matrix": [0, 8], "x": 9, "y": 0}, + {"matrix": [0, 9], "x": 10, "y": 0}, + + {"matrix": [0, 10], "x": 11.25, "y": 0}, + {"matrix": [0, 11], "x": 12.25, "y": 0}, + {"matrix": [0, 12], "x": 13.25, "y": 0}, + {"matrix": [0, 13], "x": 14.25, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + + {"matrix": [1, 1], "x": 1.5, "y": 1.5}, + {"matrix": [1, 2], "x": 2.5, "y": 1.5}, + {"matrix": [1, 3], "x": 3.5, "y": 1.5}, + {"matrix": [1, 4], "x": 4.5, "y": 1.5}, + {"matrix": [1, 5], "x": 5.5, "y": 1.5}, + {"matrix": [1, 6], "x": 6.5, "y": 1.5}, + {"matrix": [1, 7], "x": 7.5, "y": 1.5}, + {"matrix": [1, 8], "x": 8.5, "y": 1.5}, + {"matrix": [1, 9], "x": 9.5, "y": 1.5}, + {"matrix": [1, 10], "x": 10.5, "y": 1.5}, + {"matrix": [1, 11], "x": 11.5, "y": 1.5}, + {"matrix": [1, 12], "x": 12.5, "y": 1.5}, + {"matrix": [1, 13], "x": 13.5, "y": 1.5}, + {"matrix": [1, 14], "x": 14.5, "y": 1.5, "w": 2}, + + {"matrix": [1, 15], "x": 17, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5}, + + {"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 3, "y": 2.5}, + {"matrix": [2, 3], "x": 4, "y": 2.5}, + {"matrix": [2, 4], "x": 5, "y": 2.5}, + {"matrix": [2, 5], "x": 6, "y": 2.5}, + {"matrix": [2, 6], "x": 7, "y": 2.5}, + {"matrix": [2, 7], "x": 8, "y": 2.5}, + {"matrix": [2, 8], "x": 9, "y": 2.5}, + {"matrix": [2, 9], "x": 10, "y": 2.5}, + {"matrix": [2, 10], "x": 11, "y": 2.5}, + {"matrix": [2, 11], "x": 12, "y": 2.5}, + {"matrix": [2, 12], "x": 13, "y": 2.5}, + {"matrix": [2, 13], "x": 14, "y": 2.5}, + {"matrix": [2, 14], "x": 15, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 15], "x": 17, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + + {"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75}, + {"matrix": [3, 2], "x": 3.25, "y": 3.5}, + {"matrix": [3, 3], "x": 4.25, "y": 3.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3.5}, + {"matrix": [3, 5], "x": 6.25, "y": 3.5}, + {"matrix": [3, 6], "x": 7.25, "y": 3.5}, + {"matrix": [3, 7], "x": 8.25, "y": 3.5}, + {"matrix": [3, 8], "x": 9.25, "y": 3.5}, + {"matrix": [3, 9], "x": 10.25, "y": 3.5}, + {"matrix": [3, 10], "x": 11.25, "y": 3.5}, + {"matrix": [3, 11], "x": 12.25, "y": 3.5}, + {"matrix": [3, 12], "x": 13.25, "y": 3.5}, + {"matrix": [3, 14], "x": 14.25, "y": 3.5, "w": 2.25}, + + {"matrix": [3, 15], "x": 17, "y": 3.5}, + + {"matrix": [4, 0], "x": 0, "y": 4.5}, + + {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, + {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, + + {"matrix": [4, 14], "x": 15.75, "y": 4.75}, + + {"matrix": [4, 15], "x": 17, "y": 4.5}, + + {"matrix": [5, 0], "x": 0, "y": 5.5}, + + {"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 4, "y": 5.5, "w": 1.25}, + {"matrix": [5, 6], "x": 5.25, "y": 5.5, "w": 6.25}, + {"matrix": [5, 10], "x": 11.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 11], "x": 13, "y": 5.5, "w": 1.5}, + + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, + {"matrix": [5, 14], "x": 15.75, "y": 5.75}, + {"matrix": [5, 15], "x": 16.75, "y": 5.75} + ] + }, + "LAYOUT_solder_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 3.75, "y": 0}, + {"matrix": [0, 4], "x": 4.75, "y": 0}, + {"matrix": [0, 5], "x": 5.75, "y": 0}, + + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 8, "y": 0}, + {"matrix": [0, 8], "x": 9, "y": 0}, + {"matrix": [0, 9], "x": 10, "y": 0}, + + {"matrix": [0, 10], "x": 11.25, "y": 0}, + {"matrix": [0, 11], "x": 12.25, "y": 0}, + {"matrix": [0, 12], "x": 13.25, "y": 0}, + {"matrix": [0, 13], "x": 14.25, "y": 0}, + + {"matrix": [0, 14], "x": 15.5, "y": 0}, + + {"matrix": [0, 15], "x": 17, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + + {"matrix": [1, 1], "x": 1.5, "y": 1.5}, + {"matrix": [1, 2], "x": 2.5, "y": 1.5}, + {"matrix": [1, 3], "x": 3.5, "y": 1.5}, + {"matrix": [1, 4], "x": 4.5, "y": 1.5}, + {"matrix": [1, 5], "x": 5.5, "y": 1.5}, + {"matrix": [1, 6], "x": 6.5, "y": 1.5}, + {"matrix": [1, 7], "x": 7.5, "y": 1.5}, + {"matrix": [1, 8], "x": 8.5, "y": 1.5}, + {"matrix": [1, 9], "x": 9.5, "y": 1.5}, + {"matrix": [1, 10], "x": 10.5, "y": 1.5}, + {"matrix": [1, 11], "x": 11.5, "y": 1.5}, + {"matrix": [1, 12], "x": 12.5, "y": 1.5}, + {"matrix": [1, 13], "x": 13.5, "y": 1.5}, + {"matrix": [1, 14], "x": 14.5, "y": 1.5, "w": 2}, + + {"matrix": [1, 15], "x": 17, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5}, + + {"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 3, "y": 2.5}, + {"matrix": [2, 3], "x": 4, "y": 2.5}, + {"matrix": [2, 4], "x": 5, "y": 2.5}, + {"matrix": [2, 5], "x": 6, "y": 2.5}, + {"matrix": [2, 6], "x": 7, "y": 2.5}, + {"matrix": [2, 7], "x": 8, "y": 2.5}, + {"matrix": [2, 8], "x": 9, "y": 2.5}, + {"matrix": [2, 9], "x": 10, "y": 2.5}, + {"matrix": [2, 10], "x": 11, "y": 2.5}, + {"matrix": [2, 11], "x": 12, "y": 2.5}, + {"matrix": [2, 12], "x": 13, "y": 2.5}, + {"matrix": [2, 13], "x": 14, "y": 2.5}, + {"matrix": [2, 14], "x": 15, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 15], "x": 17, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + + {"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75}, + {"matrix": [3, 2], "x": 3.25, "y": 3.5}, + {"matrix": [3, 3], "x": 4.25, "y": 3.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3.5}, + {"matrix": [3, 5], "x": 6.25, "y": 3.5}, + {"matrix": [3, 6], "x": 7.25, "y": 3.5}, + {"matrix": [3, 7], "x": 8.25, "y": 3.5}, + {"matrix": [3, 8], "x": 9.25, "y": 3.5}, + {"matrix": [3, 9], "x": 10.25, "y": 3.5}, + {"matrix": [3, 10], "x": 11.25, "y": 3.5}, + {"matrix": [3, 11], "x": 12.25, "y": 3.5}, + {"matrix": [3, 12], "x": 13.25, "y": 3.5}, + {"matrix": [3, 13], "x": 14.25, "y": 3.5}, + {"matrix": [3, 14], "x": 15.25, "y": 2.5, "w": 1.25, "h": 2}, + + {"matrix": [3, 15], "x": 17, "y": 3.5}, + + {"matrix": [4, 0], "x": 0, "y": 4.5}, + + {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 1.25}, + {"matrix": [4, 12], "x": 2.75, "y": 4.5}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, + {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, + + {"matrix": [4, 14], "x": 15.75, "y": 4.75}, + + {"matrix": [4, 15], "x": 17, "y": 4.5}, + + {"matrix": [5, 0], "x": 0, "y": 5.5}, + + {"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 4, "y": 5.5, "w": 1.25}, + {"matrix": [5, 6], "x": 5.25, "y": 5.5, "w": 6.25}, + {"matrix": [5, 10], "x": 11.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 11], "x": 13, "y": 5.5, "w": 1.5}, + + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, + {"matrix": [5, 14], "x": 15.75, "y": 5.75}, + {"matrix": [5, 15], "x": 16.75, "y": 5.75} + ] + }, + "LAYOUT_solder_iso_split_space": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 3.75, "y": 0}, + {"matrix": [0, 4], "x": 4.75, "y": 0}, + {"matrix": [0, 5], "x": 5.75, "y": 0}, + + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 8, "y": 0}, + {"matrix": [0, 8], "x": 9, "y": 0}, + {"matrix": [0, 9], "x": 10, "y": 0}, + + {"matrix": [0, 10], "x": 11.25, "y": 0}, + {"matrix": [0, 11], "x": 12.25, "y": 0}, + {"matrix": [0, 12], "x": 13.25, "y": 0}, + {"matrix": [0, 13], "x": 14.25, "y": 0}, + + {"matrix": [0, 14], "x": 15.5, "y": 0}, + + {"matrix": [0, 15], "x": 17, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + + {"matrix": [1, 1], "x": 1.5, "y": 1.5}, + {"matrix": [1, 2], "x": 2.5, "y": 1.5}, + {"matrix": [1, 3], "x": 3.5, "y": 1.5}, + {"matrix": [1, 4], "x": 4.5, "y": 1.5}, + {"matrix": [1, 5], "x": 5.5, "y": 1.5}, + {"matrix": [1, 6], "x": 6.5, "y": 1.5}, + {"matrix": [1, 7], "x": 7.5, "y": 1.5}, + {"matrix": [1, 8], "x": 8.5, "y": 1.5}, + {"matrix": [1, 9], "x": 9.5, "y": 1.5}, + {"matrix": [1, 10], "x": 10.5, "y": 1.5}, + {"matrix": [1, 11], "x": 11.5, "y": 1.5}, + {"matrix": [1, 12], "x": 12.5, "y": 1.5}, + {"matrix": [1, 13], "x": 13.5, "y": 1.5}, + {"matrix": [1, 14], "x": 14.5, "y": 1.5, "w": 2}, + + {"matrix": [1, 15], "x": 17, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5}, + + {"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 3, "y": 2.5}, + {"matrix": [2, 3], "x": 4, "y": 2.5}, + {"matrix": [2, 4], "x": 5, "y": 2.5}, + {"matrix": [2, 5], "x": 6, "y": 2.5}, + {"matrix": [2, 6], "x": 7, "y": 2.5}, + {"matrix": [2, 7], "x": 8, "y": 2.5}, + {"matrix": [2, 8], "x": 9, "y": 2.5}, + {"matrix": [2, 9], "x": 10, "y": 2.5}, + {"matrix": [2, 10], "x": 11, "y": 2.5}, + {"matrix": [2, 11], "x": 12, "y": 2.5}, + {"matrix": [2, 12], "x": 13, "y": 2.5}, + {"matrix": [2, 13], "x": 14, "y": 2.5}, + {"matrix": [2, 14], "x": 15, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 15], "x": 17, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + + {"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75}, + {"matrix": [3, 2], "x": 3.25, "y": 3.5}, + {"matrix": [3, 3], "x": 4.25, "y": 3.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3.5}, + {"matrix": [3, 5], "x": 6.25, "y": 3.5}, + {"matrix": [3, 6], "x": 7.25, "y": 3.5}, + {"matrix": [3, 7], "x": 8.25, "y": 3.5}, + {"matrix": [3, 8], "x": 9.25, "y": 3.5}, + {"matrix": [3, 9], "x": 10.25, "y": 3.5}, + {"matrix": [3, 10], "x": 11.25, "y": 3.5}, + {"matrix": [3, 11], "x": 12.25, "y": 3.5}, + {"matrix": [3, 12], "x": 13.25, "y": 3.5}, + {"matrix": [3, 13], "x": 14.25, "y": 3.5}, + {"matrix": [3, 14], "x": 15.25, "y": 2.5, "w": 1.25, "h": 2}, + + {"matrix": [3, 15], "x": 17, "y": 3.5}, + + {"matrix": [4, 0], "x": 0, "y": 4.5}, + + {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 1.25}, + {"matrix": [4, 12], "x": 2.75, "y": 4.5}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, + {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, + + {"matrix": [4, 14], "x": 15.75, "y": 4.75}, + + {"matrix": [4, 15], "x": 17, "y": 4.5}, + + {"matrix": [5, 0], "x": 0, "y": 5.5}, + + {"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 4, "y": 5.5, "w": 1.25}, + {"matrix": [5, 4], "x": 5.25, "y": 5.5, "w": 2.25}, + {"matrix": [5, 6], "x": 7.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 8], "x": 8.75, "y": 5.5, "w": 2.75}, + {"matrix": [5, 10], "x": 11.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 11], "x": 13, "y": 5.5, "w": 1.5}, + + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, + {"matrix": [5, 14], "x": 15.75, "y": 5.75}, + {"matrix": [5, 15], "x": 16.75, "y": 5.75} + ] + }, + "LAYOUT_solder_iso_oled": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 3.75, "y": 0}, + {"matrix": [0, 4], "x": 4.75, "y": 0}, + {"matrix": [0, 5], "x": 5.75, "y": 0}, + + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 8, "y": 0}, + {"matrix": [0, 8], "x": 9, "y": 0}, + {"matrix": [0, 9], "x": 10, "y": 0}, + + {"matrix": [0, 10], "x": 11.25, "y": 0}, + {"matrix": [0, 11], "x": 12.25, "y": 0}, + {"matrix": [0, 12], "x": 13.25, "y": 0}, + {"matrix": [0, 13], "x": 14.25, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + + {"matrix": [1, 1], "x": 1.5, "y": 1.5}, + {"matrix": [1, 2], "x": 2.5, "y": 1.5}, + {"matrix": [1, 3], "x": 3.5, "y": 1.5}, + {"matrix": [1, 4], "x": 4.5, "y": 1.5}, + {"matrix": [1, 5], "x": 5.5, "y": 1.5}, + {"matrix": [1, 6], "x": 6.5, "y": 1.5}, + {"matrix": [1, 7], "x": 7.5, "y": 1.5}, + {"matrix": [1, 8], "x": 8.5, "y": 1.5}, + {"matrix": [1, 9], "x": 9.5, "y": 1.5}, + {"matrix": [1, 10], "x": 10.5, "y": 1.5}, + {"matrix": [1, 11], "x": 11.5, "y": 1.5}, + {"matrix": [1, 12], "x": 12.5, "y": 1.5}, + {"matrix": [1, 13], "x": 13.5, "y": 1.5}, + {"matrix": [1, 14], "x": 14.5, "y": 1.5, "w": 2}, + + {"matrix": [1, 15], "x": 17, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5}, + + {"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 3, "y": 2.5}, + {"matrix": [2, 3], "x": 4, "y": 2.5}, + {"matrix": [2, 4], "x": 5, "y": 2.5}, + {"matrix": [2, 5], "x": 6, "y": 2.5}, + {"matrix": [2, 6], "x": 7, "y": 2.5}, + {"matrix": [2, 7], "x": 8, "y": 2.5}, + {"matrix": [2, 8], "x": 9, "y": 2.5}, + {"matrix": [2, 9], "x": 10, "y": 2.5}, + {"matrix": [2, 10], "x": 11, "y": 2.5}, + {"matrix": [2, 11], "x": 12, "y": 2.5}, + {"matrix": [2, 12], "x": 13, "y": 2.5}, + {"matrix": [2, 13], "x": 14, "y": 2.5}, + {"matrix": [2, 14], "x": 15, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 15], "x": 17, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + + {"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75}, + {"matrix": [3, 2], "x": 3.25, "y": 3.5}, + {"matrix": [3, 3], "x": 4.25, "y": 3.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3.5}, + {"matrix": [3, 5], "x": 6.25, "y": 3.5}, + {"matrix": [3, 6], "x": 7.25, "y": 3.5}, + {"matrix": [3, 7], "x": 8.25, "y": 3.5}, + {"matrix": [3, 8], "x": 9.25, "y": 3.5}, + {"matrix": [3, 9], "x": 10.25, "y": 3.5}, + {"matrix": [3, 10], "x": 11.25, "y": 3.5}, + {"matrix": [3, 11], "x": 12.25, "y": 3.5}, + {"matrix": [3, 12], "x": 13.25, "y": 3.5}, + {"matrix": [3, 13], "x": 14.25, "y": 3.5}, + {"matrix": [3, 14], "x": 15.25, "y": 2.5, "w": 1.25, "h": 2}, + + {"matrix": [3, 15], "x": 17, "y": 3.5}, + + {"matrix": [4, 0], "x": 0, "y": 4.5}, + + {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 1.25}, + {"matrix": [4, 12], "x": 2.75, "y": 4.5}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, + {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, + + {"matrix": [4, 14], "x": 15.75, "y": 4.75}, + + {"matrix": [4, 15], "x": 17, "y": 4.5}, + + {"matrix": [5, 0], "x": 0, "y": 5.5}, + + {"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 4, "y": 5.5, "w": 1.25}, + {"matrix": [5, 6], "x": 5.25, "y": 5.5, "w": 6.25}, + {"matrix": [5, 10], "x": 11.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 11], "x": 13, "y": 5.5, "w": 1.5}, + + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, + {"matrix": [5, 14], "x": 15.75, "y": 5.75}, + {"matrix": [5, 15], "x": 16.75, "y": 5.75} + ] + }, + "LAYOUT_hotswap_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 3.75, "y": 0}, + {"matrix": [0, 4], "x": 4.75, "y": 0}, + {"matrix": [0, 5], "x": 5.75, "y": 0}, + + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 8, "y": 0}, + {"matrix": [0, 8], "x": 9, "y": 0}, + {"matrix": [0, 9], "x": 10, "y": 0}, + + {"matrix": [0, 10], "x": 11.25, "y": 0}, + {"matrix": [0, 11], "x": 12.25, "y": 0}, + {"matrix": [0, 12], "x": 13.25, "y": 0}, + {"matrix": [0, 13], "x": 14.25, "y": 0}, + + {"matrix": [0, 14], "x": 15.5, "y": 0}, + + {"matrix": [0, 15], "x": 17, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + + {"matrix": [1, 1], "x": 1.5, "y": 1.5}, + {"matrix": [1, 2], "x": 2.5, "y": 1.5}, + {"matrix": [1, 3], "x": 3.5, "y": 1.5}, + {"matrix": [1, 4], "x": 4.5, "y": 1.5}, + {"matrix": [1, 5], "x": 5.5, "y": 1.5}, + {"matrix": [1, 6], "x": 6.5, "y": 1.5}, + {"matrix": [1, 7], "x": 7.5, "y": 1.5}, + {"matrix": [1, 8], "x": 8.5, "y": 1.5}, + {"matrix": [1, 9], "x": 9.5, "y": 1.5}, + {"matrix": [1, 10], "x": 10.5, "y": 1.5}, + {"matrix": [1, 11], "x": 11.5, "y": 1.5}, + {"matrix": [1, 12], "x": 12.5, "y": 1.5}, + {"matrix": [1, 13], "x": 13.5, "y": 1.5}, + {"matrix": [1, 14], "x": 14.5, "y": 1.5, "w": 2}, + + {"matrix": [1, 15], "x": 17, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5}, + + {"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 3, "y": 2.5}, + {"matrix": [2, 3], "x": 4, "y": 2.5}, + {"matrix": [2, 4], "x": 5, "y": 2.5}, + {"matrix": [2, 5], "x": 6, "y": 2.5}, + {"matrix": [2, 6], "x": 7, "y": 2.5}, + {"matrix": [2, 7], "x": 8, "y": 2.5}, + {"matrix": [2, 8], "x": 9, "y": 2.5}, + {"matrix": [2, 9], "x": 10, "y": 2.5}, + {"matrix": [2, 10], "x": 11, "y": 2.5}, + {"matrix": [2, 11], "x": 12, "y": 2.5}, + {"matrix": [2, 12], "x": 13, "y": 2.5}, + {"matrix": [2, 13], "x": 14, "y": 2.5}, + {"matrix": [2, 14], "x": 15, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 15], "x": 17, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + + {"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75}, + {"matrix": [3, 2], "x": 3.25, "y": 3.5}, + {"matrix": [3, 3], "x": 4.25, "y": 3.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3.5}, + {"matrix": [3, 5], "x": 6.25, "y": 3.5}, + {"matrix": [3, 6], "x": 7.25, "y": 3.5}, + {"matrix": [3, 7], "x": 8.25, "y": 3.5}, + {"matrix": [3, 8], "x": 9.25, "y": 3.5}, + {"matrix": [3, 9], "x": 10.25, "y": 3.5}, + {"matrix": [3, 10], "x": 11.25, "y": 3.5}, + {"matrix": [3, 11], "x": 12.25, "y": 3.5}, + {"matrix": [3, 12], "x": 13.25, "y": 3.5}, + {"matrix": [3, 14], "x": 14.25, "y": 3.5, "w": 2.25}, + + {"matrix": [3, 15], "x": 17, "y": 3.5}, + + {"matrix": [4, 0], "x": 0, "y": 4.5}, + + {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, + {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, + + {"matrix": [4, 14], "x": 15.75, "y": 4.75}, + + {"matrix": [4, 15], "x": 17, "y": 4.5}, + + {"matrix": [5, 0], "x": 0, "y": 5.5}, + + {"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 4, "y": 5.5, "w": 1.25}, + {"matrix": [5, 5], "x": 5.25, "y": 5.5, "w": 6.25}, + {"matrix": [5, 10], "x": 11.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 11], "x": 13, "y": 5.5, "w": 1.5}, + + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, + {"matrix": [5, 14], "x": 15.75, "y": 5.75}, + {"matrix": [5, 15], "x": 16.75, "y": 5.75} + ] + }, + "LAYOUT_hotswap_ansi_split_space": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 3.75, "y": 0}, + {"matrix": [0, 4], "x": 4.75, "y": 0}, + {"matrix": [0, 5], "x": 5.75, "y": 0}, + + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 8, "y": 0}, + {"matrix": [0, 8], "x": 9, "y": 0}, + {"matrix": [0, 9], "x": 10, "y": 0}, + + {"matrix": [0, 10], "x": 11.25, "y": 0}, + {"matrix": [0, 11], "x": 12.25, "y": 0}, + {"matrix": [0, 12], "x": 13.25, "y": 0}, + {"matrix": [0, 13], "x": 14.25, "y": 0}, + + {"matrix": [0, 14], "x": 15.5, "y": 0}, + + {"matrix": [0, 15], "x": 17, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + + {"matrix": [1, 1], "x": 1.5, "y": 1.5}, + {"matrix": [1, 2], "x": 2.5, "y": 1.5}, + {"matrix": [1, 3], "x": 3.5, "y": 1.5}, + {"matrix": [1, 4], "x": 4.5, "y": 1.5}, + {"matrix": [1, 5], "x": 5.5, "y": 1.5}, + {"matrix": [1, 6], "x": 6.5, "y": 1.5}, + {"matrix": [1, 7], "x": 7.5, "y": 1.5}, + {"matrix": [1, 8], "x": 8.5, "y": 1.5}, + {"matrix": [1, 9], "x": 9.5, "y": 1.5}, + {"matrix": [1, 10], "x": 10.5, "y": 1.5}, + {"matrix": [1, 11], "x": 11.5, "y": 1.5}, + {"matrix": [1, 12], "x": 12.5, "y": 1.5}, + {"matrix": [1, 13], "x": 13.5, "y": 1.5}, + {"matrix": [1, 14], "x": 14.5, "y": 1.5, "w": 2}, + + {"matrix": [1, 15], "x": 17, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5}, + + {"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 3, "y": 2.5}, + {"matrix": [2, 3], "x": 4, "y": 2.5}, + {"matrix": [2, 4], "x": 5, "y": 2.5}, + {"matrix": [2, 5], "x": 6, "y": 2.5}, + {"matrix": [2, 6], "x": 7, "y": 2.5}, + {"matrix": [2, 7], "x": 8, "y": 2.5}, + {"matrix": [2, 8], "x": 9, "y": 2.5}, + {"matrix": [2, 9], "x": 10, "y": 2.5}, + {"matrix": [2, 10], "x": 11, "y": 2.5}, + {"matrix": [2, 11], "x": 12, "y": 2.5}, + {"matrix": [2, 12], "x": 13, "y": 2.5}, + {"matrix": [2, 13], "x": 14, "y": 2.5}, + {"matrix": [2, 14], "x": 15, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 15], "x": 17, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + + {"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75}, + {"matrix": [3, 2], "x": 3.25, "y": 3.5}, + {"matrix": [3, 3], "x": 4.25, "y": 3.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3.5}, + {"matrix": [3, 5], "x": 6.25, "y": 3.5}, + {"matrix": [3, 6], "x": 7.25, "y": 3.5}, + {"matrix": [3, 7], "x": 8.25, "y": 3.5}, + {"matrix": [3, 8], "x": 9.25, "y": 3.5}, + {"matrix": [3, 9], "x": 10.25, "y": 3.5}, + {"matrix": [3, 10], "x": 11.25, "y": 3.5}, + {"matrix": [3, 11], "x": 12.25, "y": 3.5}, + {"matrix": [3, 12], "x": 13.25, "y": 3.5}, + {"matrix": [3, 14], "x": 14.25, "y": 3.5, "w": 2.25}, + + {"matrix": [3, 15], "x": 17, "y": 3.5}, + + {"matrix": [4, 0], "x": 0, "y": 4.5}, + + {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, + {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, + + {"matrix": [4, 14], "x": 15.75, "y": 4.75}, + + {"matrix": [4, 15], "x": 17, "y": 4.5}, + + {"matrix": [5, 0], "x": 0, "y": 5.5}, + + {"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 4, "y": 5.5, "w": 1.25}, + {"matrix": [5, 4], "x": 5.25, "y": 5.5, "w": 2.25}, + {"matrix": [5, 5], "x": 7.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 8], "x": 8.75, "y": 5.5, "w": 2.75}, + {"matrix": [5, 10], "x": 11.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 11], "x": 13, "y": 5.5, "w": 1.5}, + + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, + {"matrix": [5, 14], "x": 15.75, "y": 5.75}, + {"matrix": [5, 15], "x": 16.75, "y": 5.75} + ] + }, + "LAYOUT_hotswap_ansi_oled": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.5, "y": 0}, + + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 3.75, "y": 0}, + {"matrix": [0, 4], "x": 4.75, "y": 0}, + {"matrix": [0, 5], "x": 5.75, "y": 0}, + + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 8, "y": 0}, + {"matrix": [0, 8], "x": 9, "y": 0}, + {"matrix": [0, 9], "x": 10, "y": 0}, + + {"matrix": [0, 10], "x": 11.25, "y": 0}, + {"matrix": [0, 11], "x": 12.25, "y": 0}, + {"matrix": [0, 12], "x": 13.25, "y": 0}, + {"matrix": [0, 13], "x": 14.25, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + + {"matrix": [1, 1], "x": 1.5, "y": 1.5}, + {"matrix": [1, 2], "x": 2.5, "y": 1.5}, + {"matrix": [1, 3], "x": 3.5, "y": 1.5}, + {"matrix": [1, 4], "x": 4.5, "y": 1.5}, + {"matrix": [1, 5], "x": 5.5, "y": 1.5}, + {"matrix": [1, 6], "x": 6.5, "y": 1.5}, + {"matrix": [1, 7], "x": 7.5, "y": 1.5}, + {"matrix": [1, 8], "x": 8.5, "y": 1.5}, + {"matrix": [1, 9], "x": 9.5, "y": 1.5}, + {"matrix": [1, 10], "x": 10.5, "y": 1.5}, + {"matrix": [1, 11], "x": 11.5, "y": 1.5}, + {"matrix": [1, 12], "x": 12.5, "y": 1.5}, + {"matrix": [1, 13], "x": 13.5, "y": 1.5}, + {"matrix": [1, 14], "x": 14.5, "y": 1.5, "w": 2}, + + {"matrix": [1, 15], "x": 17, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5}, + + {"matrix": [2, 1], "x": 1.5, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 3, "y": 2.5}, + {"matrix": [2, 3], "x": 4, "y": 2.5}, + {"matrix": [2, 4], "x": 5, "y": 2.5}, + {"matrix": [2, 5], "x": 6, "y": 2.5}, + {"matrix": [2, 6], "x": 7, "y": 2.5}, + {"matrix": [2, 7], "x": 8, "y": 2.5}, + {"matrix": [2, 8], "x": 9, "y": 2.5}, + {"matrix": [2, 9], "x": 10, "y": 2.5}, + {"matrix": [2, 10], "x": 11, "y": 2.5}, + {"matrix": [2, 11], "x": 12, "y": 2.5}, + {"matrix": [2, 12], "x": 13, "y": 2.5}, + {"matrix": [2, 13], "x": 14, "y": 2.5}, + {"matrix": [2, 14], "x": 15, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 15], "x": 17, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + + {"matrix": [3, 1], "x": 1.5, "y": 3.5, "w": 1.75}, + {"matrix": [3, 2], "x": 3.25, "y": 3.5}, + {"matrix": [3, 3], "x": 4.25, "y": 3.5}, + {"matrix": [3, 4], "x": 5.25, "y": 3.5}, + {"matrix": [3, 5], "x": 6.25, "y": 3.5}, + {"matrix": [3, 6], "x": 7.25, "y": 3.5}, + {"matrix": [3, 7], "x": 8.25, "y": 3.5}, + {"matrix": [3, 8], "x": 9.25, "y": 3.5}, + {"matrix": [3, 9], "x": 10.25, "y": 3.5}, + {"matrix": [3, 10], "x": 11.25, "y": 3.5}, + {"matrix": [3, 11], "x": 12.25, "y": 3.5}, + {"matrix": [3, 12], "x": 13.25, "y": 3.5}, + {"matrix": [3, 14], "x": 14.25, "y": 3.5, "w": 2.25}, + + {"matrix": [3, 15], "x": 17, "y": 3.5}, + + {"matrix": [4, 0], "x": 0, "y": 4.5}, + + {"matrix": [4, 1], "x": 1.5, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 3.75, "y": 4.5}, + {"matrix": [4, 3], "x": 4.75, "y": 4.5}, + {"matrix": [4, 4], "x": 5.75, "y": 4.5}, + {"matrix": [4, 5], "x": 6.75, "y": 4.5}, + {"matrix": [4, 6], "x": 7.75, "y": 4.5}, + {"matrix": [4, 7], "x": 8.75, "y": 4.5}, + {"matrix": [4, 8], "x": 9.75, "y": 4.5}, + {"matrix": [4, 9], "x": 10.75, "y": 4.5}, + {"matrix": [4, 10], "x": 11.75, "y": 4.5}, + {"matrix": [4, 11], "x": 12.75, "y": 4.5}, + {"matrix": [4, 13], "x": 13.75, "y": 4.5, "w": 1.75}, + + {"matrix": [4, 14], "x": 15.75, "y": 4.75}, + + {"matrix": [4, 15], "x": 17, "y": 4.5}, + + {"matrix": [5, 0], "x": 0, "y": 5.5}, + + {"matrix": [5, 1], "x": 1.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.75, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 4, "y": 5.5, "w": 1.25}, + {"matrix": [5, 5], "x": 5.25, "y": 5.5, "w": 6.25}, + {"matrix": [5, 10], "x": 11.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 11], "x": 13, "y": 5.5, "w": 1.5}, + {"matrix": [5, 13], "x": 14.75, "y": 5.75}, {"matrix": [5, 14], "x": 15.75, "y": 5.75}, {"matrix": [5, 15], "x": 16.75, "y": 5.75} From 031ccd48879d29539ce478cf7d3d33b406ea993c Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jul 2024 09:49:05 +1000 Subject: [PATCH 0115/1205] `salicylic_acid3/setta21`: fix RGB Matrix LED config (#24041) --- .../setta21/rev1/keyboard.json | 30 ++++++++++++++++++- keyboards/salicylic_acid3/setta21/rev1/rev1.c | 21 ------------- 2 files changed, 29 insertions(+), 22 deletions(-) delete mode 100644 keyboards/salicylic_acid3/setta21/rev1/rev1.c diff --git a/keyboards/salicylic_acid3/setta21/rev1/keyboard.json b/keyboards/salicylic_acid3/setta21/rev1/keyboard.json index 452d0211c37e..75517a7d407b 100644 --- a/keyboards/salicylic_acid3/setta21/rev1/keyboard.json +++ b/keyboards/salicylic_acid3/setta21/rev1/keyboard.json @@ -41,7 +41,35 @@ "pin": "D3" }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [0, 4], "x": 0, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 75, "y": 13, "flags": 4}, + {"matrix": [2, 4], "x": 149, "y": 13, "flags": 4}, + {"matrix": [3, 4], "x": 224, "y": 13, "flags": 4}, + + {"matrix": [2, 3], "x": 149, "y": 26, "flags": 4}, + {"matrix": [1, 3], "x": 75, "y": 26, "flags": 4}, + {"matrix": [0, 3], "x": 0, "y": 26, "flags": 4}, + + {"matrix": [0, 2], "x": 0, "y": 38, "flags": 4}, + {"matrix": [1, 2], "x": 75, "y": 38, "flags": 4}, + {"matrix": [2, 2], "x": 149, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 224, "y": 32, "flags": 4}, + + {"matrix": [2, 1], "x": 149, "y": 51, "flags": 4}, + {"matrix": [1, 1], "x": 75, "y": 51, "flags": 4}, + {"matrix": [0, 1], "x": 0, "y": 51, "flags": 4}, + + {"matrix": [0, 0], "x": 38, "y": 64, "flags": 4}, + {"matrix": [2, 0], "x": 149, "y": 64, "flags": 4}, + {"matrix": [3, 0], "x": 224, "y": 58, "flags": 4}, + + {"matrix": [3, 5], "x": 224, "y": 0, "flags": 4}, + {"matrix": [2, 5], "x": 149, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 0, "y": 0, "flags": 4} + ] }, "matrix_pins": { "cols": ["F4", "F5", "F6", "F7", "B1", "B3"], diff --git a/keyboards/salicylic_acid3/setta21/rev1/rev1.c b/keyboards/salicylic_acid3/setta21/rev1/rev1.c deleted file mode 100644 index c31fe5c8f38b..000000000000 --- a/keyboards/salicylic_acid3/setta21/rev1/rev1.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE - led_config_t g_led_config = { { - // Key Matrix to LED Index - { 14,13, 7, 6, 0,20 }, - { 12, 8, 5, 1,19 }, - { 15,11, 9, 4, 2,18 }, - { 16, 10, 3,17 } - }, { - // LED Index to Physical Position - { 0, 179 }, { 21, 179 }, { 43, 179 }, { 64, 179 }, { 43, 134 }, { 21, 134 }, { 0, 134 }, { 0, 90 }, { 21, 90 }, { 43, 90 }, - { 64, 112 }, { 43, 45 }, { 21, 45 }, { 0, 45 }, { 11, 0 }, { 43, 0 }, { 64, 23 }, { 64, 224 }, { 43, 224 }, { 21, 224 }, - { 0, 224 } - }, { - // LED Index to Flag - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4 -} }; -#endif From 3a711f4cfa71419a22a22139d68c647ffa3f1fe4 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Fri, 5 Jul 2024 11:22:08 +1000 Subject: [PATCH 0116/1205] Allow overriding `get_hardware_id()`. (#24051) --- platforms/arm_atsam/hardware_id.c | 2 +- platforms/avr/hardware_id.c | 2 +- platforms/chibios/hardware_id.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platforms/arm_atsam/hardware_id.c b/platforms/arm_atsam/hardware_id.c index 8b3b35a4924a..fc193e46d8ab 100644 --- a/platforms/arm_atsam/hardware_id.c +++ b/platforms/arm_atsam/hardware_id.c @@ -3,7 +3,7 @@ #include "hardware_id.h" -hardware_id_t get_hardware_id(void) { +__attribute__((weak)) hardware_id_t get_hardware_id(void) { hardware_id_t id = {0}; return id; } diff --git a/platforms/avr/hardware_id.c b/platforms/avr/hardware_id.c index b61f0d92df85..302a800e0bb2 100644 --- a/platforms/avr/hardware_id.c +++ b/platforms/avr/hardware_id.c @@ -10,7 +10,7 @@ #include #include "hardware_id.h" -hardware_id_t get_hardware_id(void) { +__attribute__((weak)) hardware_id_t get_hardware_id(void) { hardware_id_t id = {0}; for (uint8_t i = 0; i < 10; i += 1) { ((uint8_t*)&id)[i] = boot_signature_byte_get(i + 0x0E); diff --git a/platforms/chibios/hardware_id.c b/platforms/chibios/hardware_id.c index 1097db5966e4..fb67a0a63ebb 100644 --- a/platforms/chibios/hardware_id.c +++ b/platforms/chibios/hardware_id.c @@ -4,7 +4,7 @@ #include #include "hardware_id.h" -hardware_id_t get_hardware_id(void) { +__attribute__((weak)) hardware_id_t get_hardware_id(void) { hardware_id_t id = {0}; #if defined(RP2040) // Forward declare as including "hardware/flash.h" here causes more issues... From 8fe667a1a449a1f767d2f1e79bf6c8f7391ebb34 Mon Sep 17 00:00:00 2001 From: Coby Sher <63015754+CobyPear@users.noreply.github.com> Date: Thu, 4 Jul 2024 20:35:29 -0500 Subject: [PATCH 0117/1205] Add Sleepy Craft Studios Sleepy Keeb Split (#23844) --- .../sleepy_keeb_split/config.h | 6 ++ .../sleepy_keeb_split/keyboard.json | 101 ++++++++++++++++++ .../keymaps/default/keymap.c | 31 ++++++ .../sleepy_keeb_split/keymaps/via/keymap.c | 31 ++++++ .../sleepy_keeb_split/keymaps/via/rules.mk | 1 + .../sleepy_keeb_split/readme.md | 31 ++++++ 6 files changed, 201 insertions(+) create mode 100644 keyboards/sleepy_craft_studios/sleepy_keeb_split/config.h create mode 100644 keyboards/sleepy_craft_studios/sleepy_keeb_split/keyboard.json create mode 100644 keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/default/keymap.c create mode 100644 keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/via/keymap.c create mode 100644 keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/via/rules.mk create mode 100644 keyboards/sleepy_craft_studios/sleepy_keeb_split/readme.md diff --git a/keyboards/sleepy_craft_studios/sleepy_keeb_split/config.h b/keyboards/sleepy_craft_studios/sleepy_keeb_split/config.h new file mode 100644 index 000000000000..5e3eb67255b5 --- /dev/null +++ b/keyboards/sleepy_craft_studios/sleepy_keeb_split/config.h @@ -0,0 +1,6 @@ +// Copyright 2024 Sleepy Craft Studios (@Sleepy Craft Studios) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define EE_HANDS diff --git a/keyboards/sleepy_craft_studios/sleepy_keeb_split/keyboard.json b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keyboard.json new file mode 100644 index 000000000000..c645bfbaff53 --- /dev/null +++ b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keyboard.json @@ -0,0 +1,101 @@ +{ + "manufacturer": "Sleepy Craft Studios", + "keyboard_name": "sleepy_keeb_split", + "maintainer": "Sleepy Craft Studios", + "development_board": "promicro", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["B5", "B6", "B2", "B3", "B1", "F7"], + "rows": ["C6", "D7", "E6", "B4"] + }, + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "static_gradient": true, + "twinkle": true + }, + "led_count": 18, + "split_count": [9, 9] + }, + "split": { + "enabled": true, + "soft_serial_pin": "D2", + "usb_detect": { + "enabled": true + } + }, + "url": "https://sleepycraftstudios.com", + "usb": { + "device_version": "1.0.0", + "pid": "0x0002", + "vid": "0x7373" + }, + "ws2812": { + "pin": "F4" + }, + "community_layouts": ["ortho_4x12"], + "layouts": { + "LAYOUT_ortho_4x12": { + "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": [4, 0], "x": 6, "y": 0}, + {"matrix": [4, 1], "x": 7, "y": 0}, + {"matrix": [4, 2], "x": 8, "y": 0}, + {"matrix": [4, 3], "x": 9, "y": 0}, + {"matrix": [4, 4], "x": 10, "y": 0}, + {"matrix": [4, 5], "x": 11, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [5, 0], "x": 6, "y": 1}, + {"matrix": [5, 1], "x": 7, "y": 1}, + {"matrix": [5, 2], "x": 8, "y": 1}, + {"matrix": [5, 3], "x": 9, "y": 1}, + {"matrix": [5, 4], "x": 10, "y": 1}, + {"matrix": [5, 5], "x": 11, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [6, 0], "x": 6, "y": 2}, + {"matrix": [6, 1], "x": 7, "y": 2}, + {"matrix": [6, 2], "x": 8, "y": 2}, + {"matrix": [6, 3], "x": 9, "y": 2}, + {"matrix": [6, 4], "x": 10, "y": 2}, + {"matrix": [6, 5], "x": 11, "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}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + {"matrix": [7, 0], "x": 6, "y": 3}, + {"matrix": [7, 1], "x": 7, "y": 3}, + {"matrix": [7, 2], "x": 8, "y": 3}, + {"matrix": [7, 3], "x": 9, "y": 3}, + {"matrix": [7, 4], "x": 10, "y": 3}, + {"matrix": [7, 5], "x": 11, "y": 3} + ] + } + } +} diff --git a/keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/default/keymap.c b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/default/keymap.c new file mode 100644 index 000000000000..65bd5c460971 --- /dev/null +++ b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +// Copyright 2024 Sleepy Craft Studios +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum keeb_layers { + _BASE, + _RAISE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_UP, KC_DOWN, KC_LEFT, KC_RGHT + ), + [_RAISE] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, RGB_MOD, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [_FN] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_TOG, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), +}; diff --git a/keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/via/keymap.c b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/via/keymap.c new file mode 100644 index 000000000000..65bd5c460971 --- /dev/null +++ b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/via/keymap.c @@ -0,0 +1,31 @@ +// Copyright 2024 Sleepy Craft Studios +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum keeb_layers { + _BASE, + _RAISE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_UP, KC_DOWN, KC_LEFT, KC_RGHT + ), + [_RAISE] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, RGB_MOD, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [_FN] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_TOG, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), +}; diff --git a/keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/via/rules.mk b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/sleepy_craft_studios/sleepy_keeb_split/readme.md b/keyboards/sleepy_craft_studios/sleepy_keeb_split/readme.md new file mode 100644 index 000000000000..15e311bd1f58 --- /dev/null +++ b/keyboards/sleepy_craft_studios/sleepy_keeb_split/readme.md @@ -0,0 +1,31 @@ +# sleepy_keeb_split + +![sleepy_keeb_split](https://i.imgur.com/f5VEA8C.jpeg) + + +The Sleepy Keeb Split is an ortholinear 4x6 split keyboard inspired by the Planck. This is a hand-wired keyboard using the pro-micro or similar microcontrollers. The keyboard is designed to be used with a 3d printed case, which is also available on the Sleepy Craft Studios website. The unique element to this design is the integrated hotswap holders present in the 3d printed plate. The plate also includes diode holders for easy soldering. + +This keyboard is available as a kit as on the sleepycraftstudios.com, and is designed to be a beginner friendly hand-wired keyboard. The keyboard is also compatible with VIA, and the keymap is designed to be easily modified. + +The STL files are made available under the CC BY-NC-SA 4.0 license. + +* Keyboard Maintainer: [Sleepy Craft Studios](https://github.com/sleepy-craft-studios) +* Hardware Supported: Pro-micro (tested), Elite-C, any other ATMega32U4 based microcontroller should work. +* Hardware Availability: Kits can be purchased at [Sleepy Craft Studios](https://sleepycraftstudios.com/shop/sleepy-keeb-split-(diy)) + +Make example for this keyboard (after setting up your build environment): + + make sleepy_craft_studios/sleepy_keeb_split:default + +Flashing example for this keyboard: + + make sleepy_craft_studios/sleepy_keeb_split: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). + +## Bootloader + +Enter the bootloader in 2 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Short GND and RST**: Short these two pins twice quickly with a pair of pliers or paperclip to enter the bootloader. From 62c1787d72088123744fb0d938990b796cd8ab01 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jul 2024 15:10:02 +1000 Subject: [PATCH 0118/1205] `dc01/arrow`: fix layout name (#24025) --- keyboards/dc01/arrow/keyboard.json | 5 +++- keyboards/dc01/arrow/keymaps/default/keymap.c | 2 +- keyboards/dc01/arrow/keymaps/via/keymap.c | 25 ++----------------- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/keyboards/dc01/arrow/keyboard.json b/keyboards/dc01/arrow/keyboard.json index 72fa1b4e22c8..f56646367fc5 100644 --- a/keyboards/dc01/arrow/keyboard.json +++ b/keyboards/dc01/arrow/keyboard.json @@ -23,8 +23,11 @@ "resync": true } }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/dc01/arrow/keymaps/default/keymap.c b/keyboards/dc01/arrow/keymaps/default/keymap.c index b7f539e85c3c..65f778a5a616 100644 --- a/keyboards/dc01/arrow/keymaps/default/keymap.c +++ b/keyboards/dc01/arrow/keymaps/default/keymap.c @@ -16,7 +16,7 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT_all( /* Base */ +[0] = LAYOUT( /* Base */ KC_INS, KC_HOME, KC_PGUP, KC_DEL, KC_END, KC_PGDN, diff --git a/keyboards/dc01/arrow/keymaps/via/keymap.c b/keyboards/dc01/arrow/keymaps/via/keymap.c index a086ffc07446..79ef05e2c52d 100644 --- a/keyboards/dc01/arrow/keymaps/via/keymap.c +++ b/keyboards/dc01/arrow/keymaps/via/keymap.c @@ -16,31 +16,10 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT_all( /* Base */ +[0] = LAYOUT( /* Base */ KC_INS, KC_HOME, KC_PGUP, KC_DEL, KC_END, KC_PGDN, KC_UP, - KC_LEFT, KC_DOWN, KC_RIGHT), - -[1] = LAYOUT_all( /* Empty for Dynamic keymap */ - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS), - -[2] = LAYOUT_all( /* Empty for Dynamic keymap */ - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS), - -[3] = LAYOUT_all( /* Empty for Dynamic keymap */ - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS) + KC_LEFT, KC_DOWN, KC_RIGHT) }; From 15af5d7d0da08f05c5a6998f693c3d383b358451 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jul 2024 15:25:00 +1000 Subject: [PATCH 0119/1205] `handwired/tkk`: fix layout name (#24056) --- keyboards/handwired/tkk/keyboard.json | 5 +++- .../handwired/tkk/keymaps/default/keymap.c | 24 +++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/keyboards/handwired/tkk/keyboard.json b/keyboards/handwired/tkk/keyboard.json index 911c95426d51..91e495081f62 100644 --- a/keyboards/handwired/tkk/keyboard.json +++ b/keyboards/handwired/tkk/keyboard.json @@ -23,8 +23,11 @@ "pid": "0x0000", "vid": "0xFEED" }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/handwired/tkk/keymaps/default/keymap.c b/keyboards/handwired/tkk/keymaps/default/keymap.c index 14367413da93..220daab62799 100644 --- a/keyboards/handwired/tkk/keymaps/default/keymap.c +++ b/keyboards/handwired/tkk/keymaps/default/keymap.c @@ -11,40 +11,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * LP, LR, LM, LI, LT, RT, RI, RM, RR, RP * */ - [0] = LAYOUT_all( + [0] = LAYOUT( LT(8, KC_A), LT(7, KC_O), LT(6, KC_E), LT(5, KC_U), LT(10,KC_BSPC), LT(9, KC_SPC), LT(1, KC_H), LT(2, KC_T), LT(3, KC_N), LT(4, KC_S) ), - [1] = LAYOUT_all( + [1] = LAYOUT( KC_Q, KC_K, KC_J, KC_I, KC_ESC, KC_TAB, KC_NO, KC_RGUI, KC_RGUI, KC_RGUI ), - [2] = LAYOUT_all( + [2] = LAYOUT( KC_Z, KC_Y, KC_X, KC_P, KC_NO, KC_NO, KC_RCTL, KC_NO, KC_RCTL, KC_RCTL ), - [3] = LAYOUT_all( + [3] = LAYOUT( KC_QUOT, KC_COMM, KC_DOT, KC_F, KC_NO, KC_NO, KC_RALT, KC_RALT, KC_NO, KC_RALT ), - [4] = LAYOUT_all( + [4] = LAYOUT( KC_SCLN, KC_LPRN, KC_RPRN, KC_GRV, KC_NO, MO(11), KC_RSFT, KC_RSFT, KC_RSFT, KC_NO ), - [5] = LAYOUT_all( + [5] = LAYOUT( KC_LGUI, KC_LGUI, KC_LGUI, KC_NO, LGUI(KC_GRV), LGUI(KC_TAB), KC_D, KC_G, KC_C, KC_ENT ), - [6] = LAYOUT_all( + [6] = LAYOUT( KC_LCTL, KC_LCTL, KC_NO, KC_LCTL, KC_NO, KC_NO, KC_M, KC_B, KC_V, KC_W ), - [7] = LAYOUT_all( + [7] = LAYOUT( KC_LALT, KC_NO, KC_LALT, KC_LALT, KC_NO, KC_NO, KC_SLSH, KC_L, KC_R, KC_BSLS ), - [8] = LAYOUT_all( + [8] = LAYOUT( KC_NO, KC_LSFT, KC_LSFT, KC_LSFT, MO(11), KC_NO, KC_MINS, KC_LBRC, KC_RBRC, KC_EQL ), - [9] = LAYOUT_all( + [9] = LAYOUT( KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_LEFT, KC_RGHT, KC_UP, KC_DOWN ), - [10] = LAYOUT_all( + [10] = LAYOUT( KC_PGDN, KC_PGUP, KC_HOME, KC_END, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0 ), - [11] = LAYOUT_all( + [11] = LAYOUT( KC_WH_D, KC_WH_U, KC_WH_L, KC_WH_R, KC_BTN2, KC_BTN1, KC_MS_L, KC_MS_R, KC_MS_U, KC_MS_D ) }; From 5e2368984ed3c84f3d88c16b7b9783d4d87173fa Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jul 2024 16:35:15 +1000 Subject: [PATCH 0120/1205] `ash_xiix`: add additional layouts (#24057) --- keyboards/ash_xiix/keyboard.json | 492 +++++++++++++++++++++++++++ keyboards/ash_xiix/matrix_diagram.md | 26 ++ 2 files changed, 518 insertions(+) create mode 100644 keyboards/ash_xiix/matrix_diagram.md diff --git a/keyboards/ash_xiix/keyboard.json b/keyboards/ash_xiix/keyboard.json index 5cb21b488e9a..e743b80a8f8e 100644 --- a/keyboards/ash_xiix/keyboard.json +++ b/keyboards/ash_xiix/keyboard.json @@ -156,6 +156,498 @@ {"matrix": [11, 8], "x": 14.25, "y": 6.25}, {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + {"matrix": [11, 5], "x": 16.5, "y": 6}, + {"matrix": [11, 6], "x": 17.5, "y": 6} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [6, 0], "x": 4.25, "y": 0}, + + {"matrix": [6, 1], "x": 5.5, "y": 0}, + {"matrix": [6, 2], "x": 6.5, "y": 0}, + {"matrix": [6, 3], "x": 7.5, "y": 0}, + {"matrix": [0, 4], "x": 8.5, "y": 0}, + + {"matrix": [0, 5], "x": 9.75, "y": 0}, + {"matrix": [0, 6], "x": 10.75, "y": 0}, + {"matrix": [0, 7], "x": 11.75, "y": 0}, + {"matrix": [0, 8], "x": 12.75, "y": 0}, + + {"matrix": [5, 4], "x": 15.5, "y": 0}, + {"matrix": [5, 5], "x": 16.5, "y": 0}, + {"matrix": [5, 6], "x": 17.5, "y": 0}, + {"matrix": [5, 7], "x": 18.5, "y": 0}, + + {"matrix": [6, 4], "x": 15.5, "y": 1}, + {"matrix": [6, 5], "x": 16.5, "y": 1}, + {"matrix": [6, 6], "x": 17.5, "y": 1}, + {"matrix": [6, 7], "x": 18.5, "y": 1}, + + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 2}, + {"matrix": [7, 0], "x": 4, "y": 2}, + {"matrix": [7, 1], "x": 5, "y": 2}, + {"matrix": [7, 2], "x": 6, "y": 2}, + {"matrix": [7, 3], "x": 7, "y": 2}, + {"matrix": [1, 4], "x": 8, "y": 2}, + {"matrix": [1, 5], "x": 9, "y": 2}, + {"matrix": [1, 6], "x": 10, "y": 2}, + {"matrix": [1, 7], "x": 11, "y": 2}, + {"matrix": [1, 8], "x": 12, "y": 2}, + {"matrix": [1, 9], "x": 13, "y": 2, "w": 2}, + + {"matrix": [7, 4], "x": 15.5, "y": 2}, + {"matrix": [7, 5], "x": 16.5, "y": 2}, + {"matrix": [7, 6], "x": 17.5, "y": 2}, + {"matrix": [7, 7], "x": 18.5, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 3}, + {"matrix": [2, 2], "x": 2.5, "y": 3}, + {"matrix": [2, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 0], "x": 4.5, "y": 3}, + {"matrix": [8, 1], "x": 5.5, "y": 3}, + {"matrix": [8, 2], "x": 6.5, "y": 3}, + {"matrix": [8, 3], "x": 7.5, "y": 3}, + {"matrix": [2, 4], "x": 8.5, "y": 3}, + {"matrix": [2, 5], "x": 9.5, "y": 3}, + {"matrix": [2, 6], "x": 10.5, "y": 3}, + {"matrix": [2, 7], "x": 11.5, "y": 3}, + {"matrix": [2, 8], "x": 12.5, "y": 3}, + {"matrix": [2, 9], "x": 13.5, "y": 3, "w": 1.5}, + + {"matrix": [8, 4], "x": 15.5, "y": 3}, + {"matrix": [8, 5], "x": 16.5, "y": 3}, + {"matrix": [8, 6], "x": 17.5, "y": 3}, + {"matrix": [8, 7], "x": 18.5, "y": 3}, + + {"matrix": [3, 0], "x": 0, "y": 4, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 4}, + {"matrix": [3, 2], "x": 2.75, "y": 4}, + {"matrix": [3, 3], "x": 3.75, "y": 4}, + {"matrix": [9, 0], "x": 4.75, "y": 4}, + {"matrix": [9, 1], "x": 5.75, "y": 4}, + {"matrix": [9, 2], "x": 6.75, "y": 4}, + {"matrix": [9, 3], "x": 7.75, "y": 4}, + {"matrix": [3, 4], "x": 8.75, "y": 4}, + {"matrix": [3, 5], "x": 9.75, "y": 4}, + {"matrix": [3, 6], "x": 10.75, "y": 4}, + {"matrix": [3, 7], "x": 11.75, "y": 4}, + {"matrix": [3, 8], "x": 12.75, "y": 4, "w": 2.25}, + + {"matrix": [9, 4], "x": 15.5, "y": 4}, + {"matrix": [9, 5], "x": 16.5, "y": 4}, + {"matrix": [9, 6], "x": 17.5, "y": 4}, + {"matrix": [9, 7], "x": 18.5, "y": 4}, + + {"matrix": [4, 0], "x": 0, "y": 5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 5}, + {"matrix": [4, 3], "x": 3.25, "y": 5}, + {"matrix": [10, 0], "x": 4.25, "y": 5}, + {"matrix": [10, 1], "x": 5.25, "y": 5}, + {"matrix": [10, 2], "x": 6.25, "y": 5}, + {"matrix": [10, 3], "x": 7.25, "y": 5}, + {"matrix": [4, 4], "x": 8.25, "y": 5}, + {"matrix": [4, 5], "x": 9.25, "y": 5}, + {"matrix": [4, 6], "x": 10.25, "y": 5}, + {"matrix": [4, 7], "x": 11.25, "y": 5}, + {"matrix": [4, 8], "x": 12.25, "y": 5, "w": 1.75}, + + {"matrix": [10, 9], "x": 14.25, "y": 5.25}, + + {"matrix": [10, 4], "x": 15.5, "y": 5}, + {"matrix": [10, 5], "x": 16.5, "y": 5}, + {"matrix": [10, 6], "x": 17.5, "y": 5}, + {"matrix": [10, 7], "x": 18.5, "y": 5, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 6, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 6, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 6, "w": 1.25}, + {"matrix": [5, 3], "x": 3.75, "y": 6, "w": 6.25}, + {"matrix": [11, 4], "x": 10, "y": 6, "w": 1.5}, + {"matrix": [11, 7], "x": 11.5, "y": 6, "w": 1.5}, + + {"matrix": [10, 8], "x": 13.25, "y": 6.25}, + {"matrix": [11, 8], "x": 14.25, "y": 6.25}, + {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + + {"matrix": [11, 5], "x": 16.5, "y": 6}, + {"matrix": [11, 6], "x": 17.5, "y": 6} + ] + }, + "LAYOUT_ansi_wkl": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [6, 0], "x": 4.25, "y": 0}, + + {"matrix": [6, 1], "x": 5.5, "y": 0}, + {"matrix": [6, 2], "x": 6.5, "y": 0}, + {"matrix": [6, 3], "x": 7.5, "y": 0}, + {"matrix": [0, 4], "x": 8.5, "y": 0}, + + {"matrix": [0, 5], "x": 9.75, "y": 0}, + {"matrix": [0, 6], "x": 10.75, "y": 0}, + {"matrix": [0, 7], "x": 11.75, "y": 0}, + {"matrix": [0, 8], "x": 12.75, "y": 0}, + + {"matrix": [5, 4], "x": 15.5, "y": 0}, + {"matrix": [5, 5], "x": 16.5, "y": 0}, + {"matrix": [5, 6], "x": 17.5, "y": 0}, + {"matrix": [5, 7], "x": 18.5, "y": 0}, + + {"matrix": [6, 4], "x": 15.5, "y": 1}, + {"matrix": [6, 5], "x": 16.5, "y": 1}, + {"matrix": [6, 6], "x": 17.5, "y": 1}, + {"matrix": [6, 7], "x": 18.5, "y": 1}, + + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 2}, + {"matrix": [7, 0], "x": 4, "y": 2}, + {"matrix": [7, 1], "x": 5, "y": 2}, + {"matrix": [7, 2], "x": 6, "y": 2}, + {"matrix": [7, 3], "x": 7, "y": 2}, + {"matrix": [1, 4], "x": 8, "y": 2}, + {"matrix": [1, 5], "x": 9, "y": 2}, + {"matrix": [1, 6], "x": 10, "y": 2}, + {"matrix": [1, 7], "x": 11, "y": 2}, + {"matrix": [1, 8], "x": 12, "y": 2}, + {"matrix": [1, 9], "x": 13, "y": 2, "w": 2}, + + {"matrix": [7, 4], "x": 15.5, "y": 2}, + {"matrix": [7, 5], "x": 16.5, "y": 2}, + {"matrix": [7, 6], "x": 17.5, "y": 2}, + {"matrix": [7, 7], "x": 18.5, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 3}, + {"matrix": [2, 2], "x": 2.5, "y": 3}, + {"matrix": [2, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 0], "x": 4.5, "y": 3}, + {"matrix": [8, 1], "x": 5.5, "y": 3}, + {"matrix": [8, 2], "x": 6.5, "y": 3}, + {"matrix": [8, 3], "x": 7.5, "y": 3}, + {"matrix": [2, 4], "x": 8.5, "y": 3}, + {"matrix": [2, 5], "x": 9.5, "y": 3}, + {"matrix": [2, 6], "x": 10.5, "y": 3}, + {"matrix": [2, 7], "x": 11.5, "y": 3}, + {"matrix": [2, 8], "x": 12.5, "y": 3}, + {"matrix": [2, 9], "x": 13.5, "y": 3, "w": 1.5}, + + {"matrix": [8, 4], "x": 15.5, "y": 3}, + {"matrix": [8, 5], "x": 16.5, "y": 3}, + {"matrix": [8, 6], "x": 17.5, "y": 3}, + {"matrix": [8, 7], "x": 18.5, "y": 3}, + + {"matrix": [3, 0], "x": 0, "y": 4, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 4}, + {"matrix": [3, 2], "x": 2.75, "y": 4}, + {"matrix": [3, 3], "x": 3.75, "y": 4}, + {"matrix": [9, 0], "x": 4.75, "y": 4}, + {"matrix": [9, 1], "x": 5.75, "y": 4}, + {"matrix": [9, 2], "x": 6.75, "y": 4}, + {"matrix": [9, 3], "x": 7.75, "y": 4}, + {"matrix": [3, 4], "x": 8.75, "y": 4}, + {"matrix": [3, 5], "x": 9.75, "y": 4}, + {"matrix": [3, 6], "x": 10.75, "y": 4}, + {"matrix": [3, 7], "x": 11.75, "y": 4}, + {"matrix": [3, 8], "x": 12.75, "y": 4, "w": 2.25}, + + {"matrix": [9, 4], "x": 15.5, "y": 4}, + {"matrix": [9, 5], "x": 16.5, "y": 4}, + {"matrix": [9, 6], "x": 17.5, "y": 4}, + {"matrix": [9, 7], "x": 18.5, "y": 4}, + + {"matrix": [4, 0], "x": 0, "y": 5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 5}, + {"matrix": [4, 3], "x": 3.25, "y": 5}, + {"matrix": [10, 0], "x": 4.25, "y": 5}, + {"matrix": [10, 1], "x": 5.25, "y": 5}, + {"matrix": [10, 2], "x": 6.25, "y": 5}, + {"matrix": [10, 3], "x": 7.25, "y": 5}, + {"matrix": [4, 4], "x": 8.25, "y": 5}, + {"matrix": [4, 5], "x": 9.25, "y": 5}, + {"matrix": [4, 6], "x": 10.25, "y": 5}, + {"matrix": [4, 7], "x": 11.25, "y": 5}, + {"matrix": [4, 8], "x": 12.25, "y": 5, "w": 1.75}, + + {"matrix": [10, 9], "x": 14.25, "y": 5.25}, + + {"matrix": [10, 4], "x": 15.5, "y": 5}, + {"matrix": [10, 5], "x": 16.5, "y": 5}, + {"matrix": [10, 6], "x": 17.5, "y": 5}, + {"matrix": [10, 7], "x": 18.5, "y": 5, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 6, "w": 1.5}, + {"matrix": [5, 1], "x": 1.5, "y": 6, "w": 1.5}, + {"matrix": [5, 3], "x": 3, "y": 6, "w": 7}, + {"matrix": [11, 4], "x": 10, "y": 6, "w": 1.5}, + {"matrix": [11, 7], "x": 11.5, "y": 6, "w": 1.5}, + + {"matrix": [10, 8], "x": 13.25, "y": 6.25}, + {"matrix": [11, 8], "x": 14.25, "y": 6.25}, + {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + + {"matrix": [11, 5], "x": 16.5, "y": 6}, + {"matrix": [11, 6], "x": 17.5, "y": 6} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [6, 0], "x": 4.25, "y": 0}, + + {"matrix": [6, 1], "x": 5.5, "y": 0}, + {"matrix": [6, 2], "x": 6.5, "y": 0}, + {"matrix": [6, 3], "x": 7.5, "y": 0}, + {"matrix": [0, 4], "x": 8.5, "y": 0}, + + {"matrix": [0, 5], "x": 9.75, "y": 0}, + {"matrix": [0, 6], "x": 10.75, "y": 0}, + {"matrix": [0, 7], "x": 11.75, "y": 0}, + {"matrix": [0, 8], "x": 12.75, "y": 0}, + + {"matrix": [5, 4], "x": 15.5, "y": 0}, + {"matrix": [5, 5], "x": 16.5, "y": 0}, + {"matrix": [5, 6], "x": 17.5, "y": 0}, + {"matrix": [5, 7], "x": 18.5, "y": 0}, + + {"matrix": [6, 4], "x": 15.5, "y": 1}, + {"matrix": [6, 5], "x": 16.5, "y": 1}, + {"matrix": [6, 6], "x": 17.5, "y": 1}, + {"matrix": [6, 7], "x": 18.5, "y": 1}, + + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 2}, + {"matrix": [7, 0], "x": 4, "y": 2}, + {"matrix": [7, 1], "x": 5, "y": 2}, + {"matrix": [7, 2], "x": 6, "y": 2}, + {"matrix": [7, 3], "x": 7, "y": 2}, + {"matrix": [1, 4], "x": 8, "y": 2}, + {"matrix": [1, 5], "x": 9, "y": 2}, + {"matrix": [1, 6], "x": 10, "y": 2}, + {"matrix": [1, 7], "x": 11, "y": 2}, + {"matrix": [1, 8], "x": 12, "y": 2}, + {"matrix": [1, 9], "x": 13, "y": 2, "w": 2}, + + {"matrix": [7, 4], "x": 15.5, "y": 2}, + {"matrix": [7, 5], "x": 16.5, "y": 2}, + {"matrix": [7, 6], "x": 17.5, "y": 2}, + {"matrix": [7, 7], "x": 18.5, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 3}, + {"matrix": [2, 2], "x": 2.5, "y": 3}, + {"matrix": [2, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 0], "x": 4.5, "y": 3}, + {"matrix": [8, 1], "x": 5.5, "y": 3}, + {"matrix": [8, 2], "x": 6.5, "y": 3}, + {"matrix": [8, 3], "x": 7.5, "y": 3}, + {"matrix": [2, 4], "x": 8.5, "y": 3}, + {"matrix": [2, 5], "x": 9.5, "y": 3}, + {"matrix": [2, 6], "x": 10.5, "y": 3}, + {"matrix": [2, 7], "x": 11.5, "y": 3}, + {"matrix": [2, 8], "x": 12.5, "y": 3}, + + {"matrix": [8, 4], "x": 15.5, "y": 3}, + {"matrix": [8, 5], "x": 16.5, "y": 3}, + {"matrix": [8, 6], "x": 17.5, "y": 3}, + {"matrix": [8, 7], "x": 18.5, "y": 3}, + + {"matrix": [3, 0], "x": 0, "y": 4, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 4}, + {"matrix": [3, 2], "x": 2.75, "y": 4}, + {"matrix": [3, 3], "x": 3.75, "y": 4}, + {"matrix": [9, 0], "x": 4.75, "y": 4}, + {"matrix": [9, 1], "x": 5.75, "y": 4}, + {"matrix": [9, 2], "x": 6.75, "y": 4}, + {"matrix": [9, 3], "x": 7.75, "y": 4}, + {"matrix": [3, 4], "x": 8.75, "y": 4}, + {"matrix": [3, 5], "x": 9.75, "y": 4}, + {"matrix": [3, 6], "x": 10.75, "y": 4}, + {"matrix": [3, 7], "x": 11.75, "y": 4}, + {"matrix": [2, 9], "x": 12.75, "y": 4}, + {"matrix": [3, 8], "x": 13.75, "y": 3, "w": 1.25, "h": 2}, + + {"matrix": [9, 4], "x": 15.5, "y": 4}, + {"matrix": [9, 5], "x": 16.5, "y": 4}, + {"matrix": [9, 6], "x": 17.5, "y": 4}, + {"matrix": [9, 7], "x": 18.5, "y": 4}, + + {"matrix": [4, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 5}, + {"matrix": [4, 2], "x": 2.25, "y": 5}, + {"matrix": [4, 3], "x": 3.25, "y": 5}, + {"matrix": [10, 0], "x": 4.25, "y": 5}, + {"matrix": [10, 1], "x": 5.25, "y": 5}, + {"matrix": [10, 2], "x": 6.25, "y": 5}, + {"matrix": [10, 3], "x": 7.25, "y": 5}, + {"matrix": [4, 4], "x": 8.25, "y": 5}, + {"matrix": [4, 5], "x": 9.25, "y": 5}, + {"matrix": [4, 6], "x": 10.25, "y": 5}, + {"matrix": [4, 7], "x": 11.25, "y": 5}, + {"matrix": [4, 8], "x": 12.25, "y": 5, "w": 1.75}, + + {"matrix": [10, 9], "x": 14.25, "y": 5.25}, + + {"matrix": [10, 4], "x": 15.5, "y": 5}, + {"matrix": [10, 5], "x": 16.5, "y": 5}, + {"matrix": [10, 6], "x": 17.5, "y": 5}, + {"matrix": [10, 7], "x": 18.5, "y": 5, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 6, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 6, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 6, "w": 1.25}, + {"matrix": [5, 3], "x": 3.75, "y": 6, "w": 6.25}, + {"matrix": [11, 4], "x": 10, "y": 6, "w": 1.5}, + {"matrix": [11, 7], "x": 11.5, "y": 6, "w": 1.5}, + + {"matrix": [10, 8], "x": 13.25, "y": 6.25}, + {"matrix": [11, 8], "x": 14.25, "y": 6.25}, + {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + + {"matrix": [11, 5], "x": 16.5, "y": 6}, + {"matrix": [11, 6], "x": 17.5, "y": 6} + ] + }, + "LAYOUT_iso_wkl": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [6, 0], "x": 4.25, "y": 0}, + + {"matrix": [6, 1], "x": 5.5, "y": 0}, + {"matrix": [6, 2], "x": 6.5, "y": 0}, + {"matrix": [6, 3], "x": 7.5, "y": 0}, + {"matrix": [0, 4], "x": 8.5, "y": 0}, + + {"matrix": [0, 5], "x": 9.75, "y": 0}, + {"matrix": [0, 6], "x": 10.75, "y": 0}, + {"matrix": [0, 7], "x": 11.75, "y": 0}, + {"matrix": [0, 8], "x": 12.75, "y": 0}, + + {"matrix": [5, 4], "x": 15.5, "y": 0}, + {"matrix": [5, 5], "x": 16.5, "y": 0}, + {"matrix": [5, 6], "x": 17.5, "y": 0}, + {"matrix": [5, 7], "x": 18.5, "y": 0}, + + {"matrix": [6, 4], "x": 15.5, "y": 1}, + {"matrix": [6, 5], "x": 16.5, "y": 1}, + {"matrix": [6, 6], "x": 17.5, "y": 1}, + {"matrix": [6, 7], "x": 18.5, "y": 1}, + + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 2}, + {"matrix": [7, 0], "x": 4, "y": 2}, + {"matrix": [7, 1], "x": 5, "y": 2}, + {"matrix": [7, 2], "x": 6, "y": 2}, + {"matrix": [7, 3], "x": 7, "y": 2}, + {"matrix": [1, 4], "x": 8, "y": 2}, + {"matrix": [1, 5], "x": 9, "y": 2}, + {"matrix": [1, 6], "x": 10, "y": 2}, + {"matrix": [1, 7], "x": 11, "y": 2}, + {"matrix": [1, 8], "x": 12, "y": 2}, + {"matrix": [1, 9], "x": 13, "y": 2, "w": 2}, + + {"matrix": [7, 4], "x": 15.5, "y": 2}, + {"matrix": [7, 5], "x": 16.5, "y": 2}, + {"matrix": [7, 6], "x": 17.5, "y": 2}, + {"matrix": [7, 7], "x": 18.5, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 3}, + {"matrix": [2, 2], "x": 2.5, "y": 3}, + {"matrix": [2, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 0], "x": 4.5, "y": 3}, + {"matrix": [8, 1], "x": 5.5, "y": 3}, + {"matrix": [8, 2], "x": 6.5, "y": 3}, + {"matrix": [8, 3], "x": 7.5, "y": 3}, + {"matrix": [2, 4], "x": 8.5, "y": 3}, + {"matrix": [2, 5], "x": 9.5, "y": 3}, + {"matrix": [2, 6], "x": 10.5, "y": 3}, + {"matrix": [2, 7], "x": 11.5, "y": 3}, + {"matrix": [2, 8], "x": 12.5, "y": 3}, + + {"matrix": [8, 4], "x": 15.5, "y": 3}, + {"matrix": [8, 5], "x": 16.5, "y": 3}, + {"matrix": [8, 6], "x": 17.5, "y": 3}, + {"matrix": [8, 7], "x": 18.5, "y": 3}, + + {"matrix": [3, 0], "x": 0, "y": 4, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 4}, + {"matrix": [3, 2], "x": 2.75, "y": 4}, + {"matrix": [3, 3], "x": 3.75, "y": 4}, + {"matrix": [9, 0], "x": 4.75, "y": 4}, + {"matrix": [9, 1], "x": 5.75, "y": 4}, + {"matrix": [9, 2], "x": 6.75, "y": 4}, + {"matrix": [9, 3], "x": 7.75, "y": 4}, + {"matrix": [3, 4], "x": 8.75, "y": 4}, + {"matrix": [3, 5], "x": 9.75, "y": 4}, + {"matrix": [3, 6], "x": 10.75, "y": 4}, + {"matrix": [3, 7], "x": 11.75, "y": 4}, + {"matrix": [2, 9], "x": 12.75, "y": 4}, + {"matrix": [3, 8], "x": 13.75, "y": 3, "w": 1.25, "h": 2}, + + {"matrix": [9, 4], "x": 15.5, "y": 4}, + {"matrix": [9, 5], "x": 16.5, "y": 4}, + {"matrix": [9, 6], "x": 17.5, "y": 4}, + {"matrix": [9, 7], "x": 18.5, "y": 4}, + + {"matrix": [4, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 5}, + {"matrix": [4, 2], "x": 2.25, "y": 5}, + {"matrix": [4, 3], "x": 3.25, "y": 5}, + {"matrix": [10, 0], "x": 4.25, "y": 5}, + {"matrix": [10, 1], "x": 5.25, "y": 5}, + {"matrix": [10, 2], "x": 6.25, "y": 5}, + {"matrix": [10, 3], "x": 7.25, "y": 5}, + {"matrix": [4, 4], "x": 8.25, "y": 5}, + {"matrix": [4, 5], "x": 9.25, "y": 5}, + {"matrix": [4, 6], "x": 10.25, "y": 5}, + {"matrix": [4, 7], "x": 11.25, "y": 5}, + {"matrix": [4, 8], "x": 12.25, "y": 5, "w": 1.75}, + + {"matrix": [10, 9], "x": 14.25, "y": 5.25}, + + {"matrix": [10, 4], "x": 15.5, "y": 5}, + {"matrix": [10, 5], "x": 16.5, "y": 5}, + {"matrix": [10, 6], "x": 17.5, "y": 5}, + {"matrix": [10, 7], "x": 18.5, "y": 5, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 6, "w": 1.5}, + {"matrix": [5, 1], "x": 1.5, "y": 6, "w": 1.5}, + {"matrix": [5, 3], "x": 3, "y": 6, "w": 7}, + {"matrix": [11, 4], "x": 10, "y": 6, "w": 1.5}, + {"matrix": [11, 7], "x": 11.5, "y": 6, "w": 1.5}, + + {"matrix": [10, 8], "x": 13.25, "y": 6.25}, + {"matrix": [11, 8], "x": 14.25, "y": 6.25}, + {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + {"matrix": [11, 5], "x": 16.5, "y": 6}, {"matrix": [11, 6], "x": 17.5, "y": 6} ] diff --git a/keyboards/ash_xiix/matrix_diagram.md b/keyboards/ash_xiix/matrix_diagram.md new file mode 100644 index 000000000000..408857c8b437 --- /dev/null +++ b/keyboards/ash_xiix/matrix_diagram.md @@ -0,0 +1,26 @@ +# Matrix Diagram for ASH-XIIX + +``` +┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ +│00 ││01 │02 │03 │60 ││61 │62 │63 │04 ││05 │06 │07 │08 │ │54 │55 │56 │57 │ +└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘ ├───┼───┼───┼───┤ + │64 │65 │66 │67 │ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ├───┼───┼───┼───┤ +│10 │11 │12 │13 │70 │71 │72 │73 │14 │15 │16 │17 │18 │19 │ │74 │75 │76 │77 │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┼───┤ ┌─────┐ +│20 │21 │22 │23 │80 │81 │82 │83 │24 │25 │26 │27 │28 │29 │ │84 │85 │86 │87 │ │38 │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ ├───┼───┼───┼───┤ ┌──┴┐ │ ISO Enter +│30 │31 │32 │33 │90 │91 │92 │93 │34 │35 │36 │37 │38 │ │94 │95 │96 │97 │ │29 │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ ├───┼───┼───┼───┤ └───┴────┘ +│40 │41 │42 │43 │A0 │A1 │A2 │A3 │44 │45 │46 │47 │48 │┌───┐│A4 │A5 │A6 │A7 │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│A9 │└───┼───┼───┤ │ +│50 │51 │52 │53 │B4 │B7 │┌───┼───┼───┐│B5 │B6 │ │ +└────┴────┴────┴────────────────────────┴─────┴─────┘│A8 │B8 │B9 │└───┴───┴───┘ + └───┴───┴───┘ +┌────────┐ +│40 │ 2.25u LShift +└────────┘ +┌─────┬─────┬───────────────────────────┬─────┬─────┐ +│50 │51 │53 │B4 │B7 │ WKL +└─────┴─────┴───────────────────────────┴─────┴─────┘ +``` From 8e64ff574ab444f3dd1b4b7b71ec274ced3e99df Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jul 2024 16:35:35 +1000 Subject: [PATCH 0121/1205] `kakunpc/angel64`: add additional layouts (#24058) --- keyboards/kakunpc/angel64/rev1/keyboard.json | 138 ++++++++++++++++++ .../kakunpc/angel64/rev1/matrix_diagram.md | 22 +++ 2 files changed, 160 insertions(+) create mode 100644 keyboards/kakunpc/angel64/rev1/matrix_diagram.md diff --git a/keyboards/kakunpc/angel64/rev1/keyboard.json b/keyboards/kakunpc/angel64/rev1/keyboard.json index 9ed4904c686d..ca7f7dcb2858 100644 --- a/keyboards/kakunpc/angel64/rev1/keyboard.json +++ b/keyboards/kakunpc/angel64/rev1/keyboard.json @@ -117,6 +117,144 @@ {"matrix": [2, 5], "x": 12.25, "y": 4, "w": 1.5}, {"matrix": [3, 5], "x": 13.75, "y": 4, "w": 1.25} ] + }, + "LAYOUT_5u5_space_left": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [2, 0], "x": 2, "y": 0}, + {"matrix": [3, 0], "x": 3, "y": 0}, + {"matrix": [4, 0], "x": 4, "y": 0}, + {"matrix": [5, 0], "x": 5, "y": 0}, + {"matrix": [6, 0], "x": 6, "y": 0}, + {"matrix": [7, 0], "x": 7, "y": 0}, + {"matrix": [8, 0], "x": 8, "y": 0}, + {"matrix": [9, 0], "x": 9, "y": 0}, + {"matrix": [10, 0], "x": 10, "y": 0}, + {"matrix": [11, 0], "x": 11, "y": 0}, + {"matrix": [0, 1], "x": 12, "y": 0}, + {"matrix": [1, 1], "x": 13, "y": 0, "w": 2}, + + {"matrix": [2, 1], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 1], "x": 1.5, "y": 1}, + {"matrix": [4, 1], "x": 2.5, "y": 1}, + {"matrix": [5, 1], "x": 3.5, "y": 1}, + {"matrix": [6, 1], "x": 4.5, "y": 1}, + {"matrix": [7, 1], "x": 5.5, "y": 1}, + {"matrix": [8, 1], "x": 6.5, "y": 1}, + {"matrix": [9, 1], "x": 7.5, "y": 1}, + {"matrix": [10, 1], "x": 8.5, "y": 1}, + {"matrix": [11, 1], "x": 9.5, "y": 1}, + {"matrix": [0, 2], "x": 10.5, "y": 1}, + {"matrix": [1, 2], "x": 11.5, "y": 1}, + {"matrix": [2, 2], "x": 12.5, "y": 1}, + {"matrix": [3, 2], "x": 13.5, "y": 1, "w": 1.5}, + + {"matrix": [4, 2], "x": 0, "y": 2, "w": 2}, + {"matrix": [5, 2], "x": 2, "y": 2}, + {"matrix": [6, 2], "x": 3, "y": 2}, + {"matrix": [7, 2], "x": 4, "y": 2}, + {"matrix": [8, 2], "x": 5, "y": 2}, + {"matrix": [9, 2], "x": 6, "y": 2}, + {"matrix": [10, 2], "x": 7, "y": 2}, + {"matrix": [11, 2], "x": 8, "y": 2}, + {"matrix": [0, 3], "x": 9, "y": 2}, + {"matrix": [1, 3], "x": 10, "y": 2}, + {"matrix": [2, 3], "x": 11, "y": 2}, + {"matrix": [3, 3], "x": 12, "y": 2}, + {"matrix": [4, 3], "x": 13, "y": 2, "w": 2}, + + {"matrix": [5, 3], "x": 0, "y": 3, "w": 2.5}, + {"matrix": [6, 3], "x": 2.5, "y": 3}, + {"matrix": [7, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 3], "x": 4.5, "y": 3}, + {"matrix": [9, 3], "x": 5.5, "y": 3}, + {"matrix": [10, 3], "x": 6.5, "y": 3}, + {"matrix": [11, 3], "x": 7.5, "y": 3}, + {"matrix": [0, 4], "x": 8.5, "y": 3}, + {"matrix": [1, 4], "x": 9.5, "y": 3}, + {"matrix": [2, 4], "x": 10.5, "y": 3}, + {"matrix": [3, 4], "x": 11.5, "y": 3}, + {"matrix": [4, 4], "x": 12.5, "y": 3, "w": 2.5}, + + {"matrix": [5, 4], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [6, 4], "x": 1.25, "y": 4, "w": 1.5}, + {"matrix": [7, 4], "x": 2.75, "y": 4, "w": 1.5}, + {"matrix": [10, 4], "x": 4.25, "y": 4, "w": 5.5}, + {"matrix": [0, 5], "x": 9.75, "y": 4}, + {"matrix": [1, 5], "x": 10.75, "y": 4, "w": 1.5}, + {"matrix": [2, 5], "x": 12.25, "y": 4, "w": 1.5}, + {"matrix": [3, 5], "x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_5u5_space_right": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [2, 0], "x": 2, "y": 0}, + {"matrix": [3, 0], "x": 3, "y": 0}, + {"matrix": [4, 0], "x": 4, "y": 0}, + {"matrix": [5, 0], "x": 5, "y": 0}, + {"matrix": [6, 0], "x": 6, "y": 0}, + {"matrix": [7, 0], "x": 7, "y": 0}, + {"matrix": [8, 0], "x": 8, "y": 0}, + {"matrix": [9, 0], "x": 9, "y": 0}, + {"matrix": [10, 0], "x": 10, "y": 0}, + {"matrix": [11, 0], "x": 11, "y": 0}, + {"matrix": [0, 1], "x": 12, "y": 0}, + {"matrix": [1, 1], "x": 13, "y": 0, "w": 2}, + + {"matrix": [2, 1], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 1], "x": 1.5, "y": 1}, + {"matrix": [4, 1], "x": 2.5, "y": 1}, + {"matrix": [5, 1], "x": 3.5, "y": 1}, + {"matrix": [6, 1], "x": 4.5, "y": 1}, + {"matrix": [7, 1], "x": 5.5, "y": 1}, + {"matrix": [8, 1], "x": 6.5, "y": 1}, + {"matrix": [9, 1], "x": 7.5, "y": 1}, + {"matrix": [10, 1], "x": 8.5, "y": 1}, + {"matrix": [11, 1], "x": 9.5, "y": 1}, + {"matrix": [0, 2], "x": 10.5, "y": 1}, + {"matrix": [1, 2], "x": 11.5, "y": 1}, + {"matrix": [2, 2], "x": 12.5, "y": 1}, + {"matrix": [3, 2], "x": 13.5, "y": 1, "w": 1.5}, + + {"matrix": [4, 2], "x": 0, "y": 2, "w": 2}, + {"matrix": [5, 2], "x": 2, "y": 2}, + {"matrix": [6, 2], "x": 3, "y": 2}, + {"matrix": [7, 2], "x": 4, "y": 2}, + {"matrix": [8, 2], "x": 5, "y": 2}, + {"matrix": [9, 2], "x": 6, "y": 2}, + {"matrix": [10, 2], "x": 7, "y": 2}, + {"matrix": [11, 2], "x": 8, "y": 2}, + {"matrix": [0, 3], "x": 9, "y": 2}, + {"matrix": [1, 3], "x": 10, "y": 2}, + {"matrix": [2, 3], "x": 11, "y": 2}, + {"matrix": [3, 3], "x": 12, "y": 2}, + {"matrix": [4, 3], "x": 13, "y": 2, "w": 2}, + + {"matrix": [5, 3], "x": 0, "y": 3, "w": 2.5}, + {"matrix": [6, 3], "x": 2.5, "y": 3}, + {"matrix": [7, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 3], "x": 4.5, "y": 3}, + {"matrix": [9, 3], "x": 5.5, "y": 3}, + {"matrix": [10, 3], "x": 6.5, "y": 3}, + {"matrix": [11, 3], "x": 7.5, "y": 3}, + {"matrix": [0, 4], "x": 8.5, "y": 3}, + {"matrix": [1, 4], "x": 9.5, "y": 3}, + {"matrix": [2, 4], "x": 10.5, "y": 3}, + {"matrix": [3, 4], "x": 11.5, "y": 3}, + {"matrix": [4, 4], "x": 12.5, "y": 3, "w": 2.5}, + + {"matrix": [5, 4], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [6, 4], "x": 1.25, "y": 4, "w": 1.5}, + {"matrix": [7, 4], "x": 2.75, "y": 4, "w": 1.5}, + {"matrix": [8, 4], "x": 4.25, "y": 4}, + {"matrix": [10, 4], "x": 5.25, "y": 4, "w": 5.5}, + {"matrix": [1, 5], "x": 10.75, "y": 4, "w": 1.5}, + {"matrix": [2, 5], "x": 12.25, "y": 4, "w": 1.5}, + {"matrix": [3, 5], "x": 13.75, "y": 4, "w": 1.25} + ] } } } diff --git a/keyboards/kakunpc/angel64/rev1/matrix_diagram.md b/keyboards/kakunpc/angel64/rev1/matrix_diagram.md new file mode 100644 index 000000000000..d9efcc6a55a3 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/matrix_diagram.md @@ -0,0 +1,22 @@ +# Matrix Diagram for Angel64 Rev1 + +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│00 │10 │20 │30 │40 │50 │60 │70 │80 │90 │A0 │B0 │01 │11 │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│21 │31 │41 │51 │61 │71 │81 │91 │A1 │B1 │02 │12 │22 │32 │ +├─────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─────┤ +│42 │52 │62 │72 │82 │92 │A2 │B2 │03 │13 │23 │33 │43 │ +├───────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┤ +│53 │63 │73 │83 │93 │A3 │B3 │04 │14 │24 │34 │44 │ +├────┬────┴┬──┴──┬┴──┬┴───┴┬──┴──┬┴───┴┬──┴┬──┴──┬┴────┬────┤ +│54 │64 │74 │84 │94 │A4 │B4 │05 │15 │25 │35 │ +└────┴─────┴─────┴───┴─────┴─────┴─────┴───┴─────┴─────┴────┘ + +┌────┬─────┬─────┬─────────────────────┬───┬─────┬─────┬────┐ +│54 │64 │74 │A4 │05 │15 │25 │35 │ 5.5u Space (Left) +└────┴─────┴─────┴─────────────────────┴───┴─────┴─────┴────┘ +┌────┬─────┬─────┬───┬─────────────────────┬─────┬─────┬────┐ +│54 │64 │74 │84 │A4 │15 │25 │35 │ 5.5u Space (Right) +└────┴─────┴─────┴───┴─────────────────────┴─────┴─────┴────┘ +``` From 096dc672c14f6e29dc85cd7e82aebb20b5bebf35 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jul 2024 16:35:48 +1000 Subject: [PATCH 0122/1205] `kakunpc/rabbit_capture_plan`: add additional layouts (#24059) --- .../kakunpc/rabbit_capture_plan/keyboard.json | 255 +++++++++++++++++- .../rabbit_capture_plan/matrix_diagram.md | 16 ++ 2 files changed, 270 insertions(+), 1 deletion(-) create mode 100644 keyboards/kakunpc/rabbit_capture_plan/matrix_diagram.md diff --git a/keyboards/kakunpc/rabbit_capture_plan/keyboard.json b/keyboards/kakunpc/rabbit_capture_plan/keyboard.json index 16364fb71fec..3d6e7958f475 100644 --- a/keyboards/kakunpc/rabbit_capture_plan/keyboard.json +++ b/keyboards/kakunpc/rabbit_capture_plan/keyboard.json @@ -57,8 +57,94 @@ }, "processor": "atmega32u4", "bootloader": "caterina", + "layout_aliases": { + "LAYOUT_all": "LAYOUT_ansi_split_rshift" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0.41, "y": 0}, + {"matrix": [0, 1], "x": 1.41, "y": 0}, + {"matrix": [0, 2], "x": 2.72, "y": 0}, + {"matrix": [0, 3], "x": 3.72, "y": 0}, + {"matrix": [0, 4], "x": 4.72, "y": 0}, + {"matrix": [0, 5], "x": 5.72, "y": 0}, + {"matrix": [0, 6], "x": 6.72, "y": 0}, + + {"matrix": [5, 0], "x": 9.62, "y": 0}, + {"matrix": [5, 1], "x": 10.62, "y": 0}, + {"matrix": [5, 2], "x": 11.62, "y": 0}, + {"matrix": [5, 3], "x": 12.62, "y": 0}, + {"matrix": [5, 4], "x": 14.07, "y": 0}, + {"matrix": [5, 5], "x": 15.07, "y": 0}, + {"matrix": [5, 6], "x": 16.07, "y": 0}, + {"matrix": [5, 7], "x": 17.07, "y": 0}, + + {"matrix": [1, 0], "x": 0.28, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.78, "y": 1}, + {"matrix": [1, 2], "x": 3.22, "y": 1}, + {"matrix": [1, 3], "x": 4.22, "y": 1}, + {"matrix": [1, 4], "x": 5.22, "y": 1}, + {"matrix": [1, 5], "x": 6.22, "y": 1}, + {"matrix": [1, 6], "x": 7.22, "y": 1}, + + {"matrix": [6, 0], "x": 9.12, "y": 1}, + {"matrix": [6, 1], "x": 10.12, "y": 1}, + {"matrix": [6, 2], "x": 11.12, "y": 1}, + {"matrix": [6, 3], "x": 12.12, "y": 1}, + {"matrix": [6, 4], "x": 13.72, "y": 1}, + {"matrix": [6, 5], "x": 14.72, "y": 1}, + {"matrix": [6, 6], "x": 15.72, "y": 1}, + {"matrix": [6, 7], "x": 16.72, "y": 1, "w": 1.5}, + + {"matrix": [2, 0], "x": 0.14, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.89, "y": 2}, + {"matrix": [2, 2], "x": 3.47, "y": 2}, + {"matrix": [2, 3], "x": 4.47, "y": 2}, + {"matrix": [2, 4], "x": 5.47, "y": 2}, + {"matrix": [2, 5], "x": 6.47, "y": 2}, + {"matrix": [4, 5], "x": 7.47, "y": 2}, + + {"matrix": [7, 0], "x": 9.37, "y": 2}, + {"matrix": [7, 1], "x": 10.37, "y": 2}, + {"matrix": [7, 2], "x": 11.37, "y": 2}, + {"matrix": [7, 3], "x": 12.37, "y": 2}, + {"matrix": [7, 4], "x": 14.09, "y": 2}, + {"matrix": [7, 5], "x": 15.09, "y": 2}, + {"matrix": [7, 6], "x": 16.09, "y": 2, "w": 2.25}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.97, "y": 3}, + {"matrix": [3, 3], "x": 4.97, "y": 3}, + {"matrix": [3, 4], "x": 5.97, "y": 3}, + {"matrix": [3, 5], "x": 6.97, "y": 3}, + + {"matrix": [8, 0], "x": 8.87, "y": 3}, + {"matrix": [8, 1], "x": 9.87, "y": 3}, + {"matrix": [8, 2], "x": 10.87, "y": 3}, + {"matrix": [8, 3], "x": 11.87, "y": 3}, + {"matrix": [8, 4], "x": 13.72, "y": 3}, + {"matrix": [8, 5], "x": 14.72, "y": 3}, + {"matrix": [8, 6], "x": 15.72, "y": 3, "w": 1.75}, + + {"matrix": [9, 0], "x": 18, "y": 3.25}, + + {"matrix": [4, 0], "x": 0.25, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.5, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 4.47, "y": 4}, + {"matrix": [4, 3], "x": 5.47, "y": 4, "w": 2}, + {"matrix": [4, 4], "x": 7.47, "y": 4}, + + {"matrix": [9, 1], "x": 9.35, "y": 4, "w": 2.75}, + {"matrix": [9, 2], "x": 12.1, "y": 4}, + + {"matrix": [9, 3], "x": 17, "y": 4.25}, + {"matrix": [9, 4], "x": 18, "y": 4.25}, + {"matrix": [9, 5], "x": 19, "y": 4.25} + ] + }, + "LAYOUT_ansi_split_rshift": { "layout": [ {"matrix": [0, 0], "x": 0.41, "y": 0}, {"matrix": [0, 1], "x": 1.41, "y": 0}, @@ -137,6 +223,173 @@ {"matrix": [9, 1], "x": 9.35, "y": 4, "w": 2.75}, {"matrix": [9, 2], "x": 12.1, "y": 4}, + {"matrix": [9, 3], "x": 17, "y": 4.25}, + {"matrix": [9, 4], "x": 18, "y": 4.25}, + {"matrix": [9, 5], "x": 19, "y": 4.25} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0.41, "y": 0}, + {"matrix": [0, 1], "x": 1.41, "y": 0}, + {"matrix": [0, 2], "x": 2.72, "y": 0}, + {"matrix": [0, 3], "x": 3.72, "y": 0}, + {"matrix": [0, 4], "x": 4.72, "y": 0}, + {"matrix": [0, 5], "x": 5.72, "y": 0}, + {"matrix": [0, 6], "x": 6.72, "y": 0}, + + {"matrix": [5, 0], "x": 9.62, "y": 0}, + {"matrix": [5, 1], "x": 10.62, "y": 0}, + {"matrix": [5, 2], "x": 11.62, "y": 0}, + {"matrix": [5, 3], "x": 12.62, "y": 0}, + {"matrix": [5, 4], "x": 14.07, "y": 0}, + {"matrix": [5, 5], "x": 15.07, "y": 0}, + {"matrix": [5, 6], "x": 16.07, "y": 0}, + {"matrix": [5, 7], "x": 17.07, "y": 0}, + + {"matrix": [1, 0], "x": 0.28, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.78, "y": 1}, + {"matrix": [1, 2], "x": 3.22, "y": 1}, + {"matrix": [1, 3], "x": 4.22, "y": 1}, + {"matrix": [1, 4], "x": 5.22, "y": 1}, + {"matrix": [1, 5], "x": 6.22, "y": 1}, + {"matrix": [1, 6], "x": 7.22, "y": 1}, + + {"matrix": [6, 0], "x": 9.12, "y": 1}, + {"matrix": [6, 1], "x": 10.12, "y": 1}, + {"matrix": [6, 2], "x": 11.12, "y": 1}, + {"matrix": [6, 3], "x": 12.12, "y": 1}, + {"matrix": [6, 4], "x": 13.72, "y": 1}, + {"matrix": [6, 5], "x": 14.72, "y": 1}, + {"matrix": [6, 6], "x": 15.72, "y": 1}, + + {"matrix": [2, 0], "x": 0.14, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.89, "y": 2}, + {"matrix": [2, 2], "x": 3.47, "y": 2}, + {"matrix": [2, 3], "x": 4.47, "y": 2}, + {"matrix": [2, 4], "x": 5.47, "y": 2}, + {"matrix": [2, 5], "x": 6.47, "y": 2}, + {"matrix": [4, 5], "x": 7.47, "y": 2}, + + {"matrix": [7, 0], "x": 9.37, "y": 2}, + {"matrix": [7, 1], "x": 10.37, "y": 2}, + {"matrix": [7, 2], "x": 11.37, "y": 2}, + {"matrix": [7, 3], "x": 12.37, "y": 2}, + {"matrix": [7, 4], "x": 14.09, "y": 2}, + {"matrix": [7, 5], "x": 15.09, "y": 2}, + {"matrix": [7, 6], "x": 16.09, "y": 2}, + {"matrix": [6, 7], "x": 17.09, "y": 1, "w": 1.25, "h": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.97, "y": 3}, + {"matrix": [3, 3], "x": 4.97, "y": 3}, + {"matrix": [3, 4], "x": 5.97, "y": 3}, + {"matrix": [3, 5], "x": 6.97, "y": 3}, + + {"matrix": [8, 0], "x": 8.87, "y": 3}, + {"matrix": [8, 1], "x": 9.87, "y": 3}, + {"matrix": [8, 2], "x": 10.87, "y": 3}, + {"matrix": [8, 3], "x": 11.87, "y": 3}, + {"matrix": [8, 4], "x": 13.72, "y": 3}, + {"matrix": [8, 5], "x": 14.72, "y": 3}, + {"matrix": [8, 6], "x": 15.72, "y": 3, "w": 1.75}, + + {"matrix": [9, 0], "x": 18, "y": 3.25}, + + {"matrix": [4, 0], "x": 0.25, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.5, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 4.47, "y": 4}, + {"matrix": [4, 3], "x": 5.47, "y": 4, "w": 2}, + {"matrix": [4, 4], "x": 7.47, "y": 4}, + + {"matrix": [9, 1], "x": 9.35, "y": 4, "w": 2.75}, + {"matrix": [9, 2], "x": 12.1, "y": 4}, + + {"matrix": [9, 3], "x": 17, "y": 4.25}, + {"matrix": [9, 4], "x": 18, "y": 4.25}, + {"matrix": [9, 5], "x": 19, "y": 4.25} + ] + }, + "LAYOUT_iso_split_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0.41, "y": 0}, + {"matrix": [0, 1], "x": 1.41, "y": 0}, + {"matrix": [0, 2], "x": 2.72, "y": 0}, + {"matrix": [0, 3], "x": 3.72, "y": 0}, + {"matrix": [0, 4], "x": 4.72, "y": 0}, + {"matrix": [0, 5], "x": 5.72, "y": 0}, + {"matrix": [0, 6], "x": 6.72, "y": 0}, + + {"matrix": [5, 0], "x": 9.62, "y": 0}, + {"matrix": [5, 1], "x": 10.62, "y": 0}, + {"matrix": [5, 2], "x": 11.62, "y": 0}, + {"matrix": [5, 3], "x": 12.62, "y": 0}, + {"matrix": [5, 4], "x": 14.07, "y": 0}, + {"matrix": [5, 5], "x": 15.07, "y": 0}, + {"matrix": [5, 6], "x": 16.07, "y": 0}, + {"matrix": [5, 7], "x": 17.07, "y": 0}, + + {"matrix": [1, 0], "x": 0.28, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.78, "y": 1}, + {"matrix": [1, 2], "x": 3.22, "y": 1}, + {"matrix": [1, 3], "x": 4.22, "y": 1}, + {"matrix": [1, 4], "x": 5.22, "y": 1}, + {"matrix": [1, 5], "x": 6.22, "y": 1}, + {"matrix": [1, 6], "x": 7.22, "y": 1}, + + {"matrix": [6, 0], "x": 9.12, "y": 1}, + {"matrix": [6, 1], "x": 10.12, "y": 1}, + {"matrix": [6, 2], "x": 11.12, "y": 1}, + {"matrix": [6, 3], "x": 12.12, "y": 1}, + {"matrix": [6, 4], "x": 13.72, "y": 1}, + {"matrix": [6, 5], "x": 14.72, "y": 1}, + {"matrix": [6, 6], "x": 15.72, "y": 1}, + + {"matrix": [2, 0], "x": 0.14, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.89, "y": 2}, + {"matrix": [2, 2], "x": 3.47, "y": 2}, + {"matrix": [2, 3], "x": 4.47, "y": 2}, + {"matrix": [2, 4], "x": 5.47, "y": 2}, + {"matrix": [2, 5], "x": 6.47, "y": 2}, + {"matrix": [4, 5], "x": 7.47, "y": 2}, + + {"matrix": [7, 0], "x": 9.37, "y": 2}, + {"matrix": [7, 1], "x": 10.37, "y": 2}, + {"matrix": [7, 2], "x": 11.37, "y": 2}, + {"matrix": [7, 3], "x": 12.37, "y": 2}, + {"matrix": [7, 4], "x": 14.09, "y": 2}, + {"matrix": [7, 5], "x": 15.09, "y": 2}, + {"matrix": [7, 6], "x": 16.09, "y": 2}, + {"matrix": [6, 7], "x": 17.09, "y": 1, "w": 1.25, "h": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.97, "y": 3}, + {"matrix": [3, 3], "x": 4.97, "y": 3}, + {"matrix": [3, 4], "x": 5.97, "y": 3}, + {"matrix": [3, 5], "x": 6.97, "y": 3}, + + {"matrix": [8, 0], "x": 8.87, "y": 3}, + {"matrix": [8, 1], "x": 9.87, "y": 3}, + {"matrix": [8, 2], "x": 10.87, "y": 3}, + {"matrix": [8, 3], "x": 11.87, "y": 3}, + {"matrix": [8, 4], "x": 13.72, "y": 3}, + {"matrix": [8, 5], "x": 14.72, "y": 3}, + {"matrix": [8, 6], "x": 15.72, "y": 3}, + {"matrix": [8, 7], "x": 16.72, "y": 3}, + + {"matrix": [9, 0], "x": 18, "y": 3.25}, + + {"matrix": [4, 0], "x": 0.25, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.5, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 4.47, "y": 4}, + {"matrix": [4, 3], "x": 5.47, "y": 4, "w": 2}, + {"matrix": [4, 4], "x": 7.47, "y": 4}, + + {"matrix": [9, 1], "x": 9.35, "y": 4, "w": 2.75}, + {"matrix": [9, 2], "x": 12.1, "y": 4}, + {"matrix": [9, 3], "x": 17, "y": 4.25}, {"matrix": [9, 4], "x": 18, "y": 4.25}, {"matrix": [9, 5], "x": 19, "y": 4.25} diff --git a/keyboards/kakunpc/rabbit_capture_plan/matrix_diagram.md b/keyboards/kakunpc/rabbit_capture_plan/matrix_diagram.md new file mode 100644 index 000000000000..9b28372360e2 --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/matrix_diagram.md @@ -0,0 +1,16 @@ +# Matrix Diagram for rabbit_capture_plan + +``` + ┌───┬───┐ ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ + │00 │01 │ │02 │03 │04 │05 │06 │ │50 │51 │52 │53 │ │54 │55 │56 │57 │ + ┌┴───┴┬──┴┐└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴───┤ ┌─────┐ + │10 │11 │ │12 │13 │14 │15 │16 │ │60 │61 │62 │63 │ │64 │65 │66 │67 │ │67 │ + ┌┴─────┼───┤ └┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┐ └─┬─┴─┬─┴─┬─┴─────┴┐ ┌──┴┐ │ ISO Enter + │20 │21 │ │22 │23 │24 │25 │26 │ │70 │71 │72 │73 │ │74 │75 │76 │ │76 │ │ +┌┴──────┴┬──┴┐ └─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬───┬──┘ └───┴────┘ +│30 │31 │ │32 │33 │34 │35 │ │80 │81 │82 │83 │ │84 │85 │86 │87 │ ┌───┐ ┌──────┐ +└┬────┬──┴─┬─┘ └─┬─┴─┬─┴───┴─┬─┴─┐ └─┬─┴───┴───┴┬──┴┐ └───┴───┴───┴───┘ │90 │ │86 │ 1.75u Right Shift + │40 │41 │ │42 │43 │44 │ │91 │92 │ ┌───┼───┼───┐ └──────┘ + └────┴────┘ └───┴───────┴───┘ └──────────┴───┘ │93 │94 │95 │ + └───┴───┴───┘ +``` From 6d21898c146856b5679d38af073643107bc9dd83 Mon Sep 17 00:00:00 2001 From: ai03 Date: Fri, 5 Jul 2024 03:55:25 -0700 Subject: [PATCH 0123/1205] Add support for Equinox XL (#23695) --- keyboards/ai03/equinox_xl/keyboard.json | 89 +++++++++++++++++++ .../ai03/equinox_xl/keymaps/default/keymap.c | 15 ++++ .../ai03/equinox_xl/keymaps/via/keymap.c | 15 ++++ .../ai03/equinox_xl/keymaps/via/rules.mk | 1 + keyboards/ai03/equinox_xl/readme.md | 28 ++++++ 5 files changed, 148 insertions(+) create mode 100644 keyboards/ai03/equinox_xl/keyboard.json create mode 100644 keyboards/ai03/equinox_xl/keymaps/default/keymap.c create mode 100644 keyboards/ai03/equinox_xl/keymaps/via/keymap.c create mode 100644 keyboards/ai03/equinox_xl/keymaps/via/rules.mk create mode 100644 keyboards/ai03/equinox_xl/readme.md diff --git a/keyboards/ai03/equinox_xl/keyboard.json b/keyboards/ai03/equinox_xl/keyboard.json new file mode 100644 index 000000000000..e6abf4a0c214 --- /dev/null +++ b/keyboards/ai03/equinox_xl/keyboard.json @@ -0,0 +1,89 @@ +{ + "manufacturer": "ai03 Design Studio", + "keyboard_name": "Equinox XL", + "maintainer": "ai03", + "bootloader": "atmel-dfu", + "build": { + "debounce_type": "asym_eager_defer_pk" + }, + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "indicators": { + "caps_lock": "F1", + "on_state": 0 + }, + "matrix_pins": { + "cols": ["F5", "C7", "C6", "B6", "B5", "B4", "D7", "D6", "D4", "D5", "D3", "D2", "D1", "D0"], + "rows": ["B7", "F4", "F6", "F7"] + }, + "processor": "atmega32u4", + "url": "https://ai03.com/projects/equinox-xl/", + "usb": { + "device_version": "0.0.1", + "pid": "0x0020", + "vid": "0xA103" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0, "w": 1.5}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.75}, + {"matrix": [1, 1], "x": 1.75, "y": 1}, + {"matrix": [1, 2], "x": 2.75, "y": 1}, + {"matrix": [1, 3], "x": 3.75, "y": 1}, + {"matrix": [1, 4], "x": 4.75, "y": 1}, + {"matrix": [1, 5], "x": 5.75, "y": 1}, + {"matrix": [1, 6], "x": 6.75, "y": 1}, + {"matrix": [1, 7], "x": 7.75, "y": 1}, + {"matrix": [1, 8], "x": 8.75, "y": 1}, + {"matrix": [1, 9], "x": 9.75, "y": 1}, + {"matrix": [1, 10], "x": 10.75, "y": 1}, + {"matrix": [1, 11], "x": 11.75, "y": 1}, + {"matrix": [1, 13], "x": 12.75, "y": 1, "w": 2.25}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.25}, + {"matrix": [2, 1], "x": 1.25, "y": 2}, + {"matrix": [2, 2], "x": 2.25, "y": 2}, + {"matrix": [2, 3], "x": 3.25, "y": 2}, + {"matrix": [2, 4], "x": 4.25, "y": 2}, + {"matrix": [2, 5], "x": 5.25, "y": 2}, + {"matrix": [2, 6], "x": 6.25, "y": 2}, + {"matrix": [2, 7], "x": 7.25, "y": 2}, + {"matrix": [2, 8], "x": 8.25, "y": 2}, + {"matrix": [2, 9], "x": 9.25, "y": 2}, + {"matrix": [2, 10], "x": 10.25, "y": 2}, + {"matrix": [2, 11], "x": 11.25, "y": 2}, + {"matrix": [2, 12], "x": 12.25, "y": 2, "w": 1.75}, + {"matrix": [2, 13], "x": 14, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.5}, + {"matrix": [3, 1], "x": 1.5, "y": 3}, + {"matrix": [3, 2], "x": 2.5, "y": 3, "w": 1.5}, + {"matrix": [3, 5], "x": 4, "y": 3, "w": 3}, + {"matrix": [3, 7], "x": 7, "y": 3}, + {"matrix": [3, 9], "x": 8, "y": 3, "w": 3}, + {"matrix": [3, 11], "x": 11, "y": 3, "w": 1.5}, + {"matrix": [3, 12], "x": 12.5, "y": 3}, + {"matrix": [3, 13], "x": 13.5, "y": 3, "w": 1.5} + ] + } + } +} diff --git a/keyboards/ai03/equinox_xl/keymaps/default/keymap.c b/keyboards/ai03/equinox_xl/keymaps/default/keymap.c new file mode 100644 index 000000000000..be2f1cb7e0bf --- /dev/null +++ b/keyboards/ai03/equinox_xl/keymaps/default/keymap.c @@ -0,0 +1,15 @@ +// Copyright 2024 ai03 +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_BSPC, + 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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_GRV, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + +}; diff --git a/keyboards/ai03/equinox_xl/keymaps/via/keymap.c b/keyboards/ai03/equinox_xl/keymaps/via/keymap.c new file mode 100644 index 000000000000..be2f1cb7e0bf --- /dev/null +++ b/keyboards/ai03/equinox_xl/keymaps/via/keymap.c @@ -0,0 +1,15 @@ +// Copyright 2024 ai03 +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_BSPC, + 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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_GRV, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + +}; diff --git a/keyboards/ai03/equinox_xl/keymaps/via/rules.mk b/keyboards/ai03/equinox_xl/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/ai03/equinox_xl/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ai03/equinox_xl/readme.md b/keyboards/ai03/equinox_xl/readme.md new file mode 100644 index 000000000000..84ceef680907 --- /dev/null +++ b/keyboards/ai03/equinox_xl/readme.md @@ -0,0 +1,28 @@ +# Equinox XL + +![Cover image](https://i.imgur.com/sQpe0Zv.jpg) + +A numrowless 50% keyboard + +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +* Hardware Supported: The Equinox XL PCB, powered by the Atmega32u4 +* Hardware Availability: Available via group buy + + +Make example for this keyboard (after setting up your build environment): + + make ai03/equinox_xl:default + +Flashing example for this keyboard: + + make ai03/equinox_xl: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Press the reset button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available From 9fb51cfe2b6f3138bd706d0902d3ba749e2ef513 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jul 2024 20:57:39 +1000 Subject: [PATCH 0124/1205] `kbdfans/baguette66`: fix layout name (#24061) --- keyboards/kbdfans/baguette66/rgb/keyboard.json | 5 ++++- keyboards/kbdfans/baguette66/rgb/keymaps/default/keymap.c | 8 ++++---- keyboards/kbdfans/baguette66/rgb/keymaps/via/keymap.c | 8 ++++---- keyboards/kbdfans/baguette66/soldered/keyboard.json | 5 ++++- .../kbdfans/baguette66/soldered/keymaps/default/keymap.c | 8 ++++---- .../kbdfans/baguette66/soldered/keymaps/via/keymap.c | 8 ++++---- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/keyboards/kbdfans/baguette66/rgb/keyboard.json b/keyboards/kbdfans/baguette66/rgb/keyboard.json index e72d56e6f96c..61579473cd92 100644 --- a/keyboards/kbdfans/baguette66/rgb/keyboard.json +++ b/keyboards/kbdfans/baguette66/rgb/keyboard.json @@ -80,8 +80,11 @@ "diode_direction": "COL2ROW", "processor": "atmega32u4", "bootloader": "atmel-dfu", + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/kbdfans/baguette66/rgb/keymaps/default/keymap.c b/keyboards/kbdfans/baguette66/rgb/keymaps/default/keymap.c index cc93228ad02e..a420edfa7b2b 100644 --- a/keyboards/kbdfans/baguette66/rgb/keymaps/default/keymap.c +++ b/keyboards/kbdfans/baguette66/rgb/keymaps/default/keymap.c @@ -17,25 +17,25 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC, 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_GRAVE, 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_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN, KC_RIGHT), - [1] = LAYOUT_all( + [1] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [2] = LAYOUT_all( + [2] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [3] = LAYOUT_all( + [3] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, diff --git a/keyboards/kbdfans/baguette66/rgb/keymaps/via/keymap.c b/keyboards/kbdfans/baguette66/rgb/keymaps/via/keymap.c index eefda15f523a..267ada99c9b3 100644 --- a/keyboards/kbdfans/baguette66/rgb/keymaps/via/keymap.c +++ b/keyboards/kbdfans/baguette66/rgb/keymaps/via/keymap.c @@ -17,25 +17,25 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC, 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_GRAVE, 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_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN, KC_RIGHT), - [1] = LAYOUT_all( + [1] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [2] = LAYOUT_all( + [2] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [3] = LAYOUT_all( + [3] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, diff --git a/keyboards/kbdfans/baguette66/soldered/keyboard.json b/keyboards/kbdfans/baguette66/soldered/keyboard.json index da473daf9157..f9c87dad06ec 100644 --- a/keyboards/kbdfans/baguette66/soldered/keyboard.json +++ b/keyboards/kbdfans/baguette66/soldered/keyboard.json @@ -26,8 +26,11 @@ }, "processor": "atmega32u4", "bootloader": "atmel-dfu", + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/kbdfans/baguette66/soldered/keymaps/default/keymap.c b/keyboards/kbdfans/baguette66/soldered/keymaps/default/keymap.c index 87879b109a99..3d5b45ebab66 100644 --- a/keyboards/kbdfans/baguette66/soldered/keymaps/default/keymap.c +++ b/keyboards/kbdfans/baguette66/soldered/keymaps/default/keymap.c @@ -17,25 +17,25 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC, 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_GRAVE, 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_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN, KC_RIGHT), - [1] = LAYOUT_all( + [1] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [2] = LAYOUT_all( + [2] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [3] = LAYOUT_all( + [3] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, diff --git a/keyboards/kbdfans/baguette66/soldered/keymaps/via/keymap.c b/keyboards/kbdfans/baguette66/soldered/keymaps/via/keymap.c index 87879b109a99..3d5b45ebab66 100644 --- a/keyboards/kbdfans/baguette66/soldered/keymaps/via/keymap.c +++ b/keyboards/kbdfans/baguette66/soldered/keymaps/via/keymap.c @@ -17,25 +17,25 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC, 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_GRAVE, 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_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN, KC_RIGHT), - [1] = LAYOUT_all( + [1] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [2] = LAYOUT_all( + [2] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [3] = LAYOUT_all( + [3] = LAYOUT( QK_GESC, 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_GRAVE, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, From d0e89aeccada3f0df906dd4ff8fa7708b0d8234e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 5 Jul 2024 12:02:39 +0100 Subject: [PATCH 0125/1205] Align LUFA suspend logic (#24055) --- tmk_core/protocol/lufa/lufa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 2142b04460a1..b0c9758d2fd5 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -836,7 +836,7 @@ void protocol_pre_task(void) { dprintln("suspending keyboard"); while (USB_DeviceState == DEVICE_STATE_Suspended) { suspend_power_down(); - if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition()) { + if (suspend_wakeup_condition() && USB_Device_RemoteWakeupEnabled) { USB_Device_SendRemoteWakeup(); clear_keyboard(); From af72a58c8f932dc55401bb1197a466b615f660e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 23:25:48 +0100 Subject: [PATCH 0126/1205] Bump JamesIves/github-pages-deploy-action from 4.6.1 to 4.6.3 (#24063) Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.1 to 4.6.3. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.6.1...v4.6.3) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0fdd2c7b37d9..7f588fda6087 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -56,7 +56,7 @@ jobs: - name: Deploy if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }} - uses: JamesIves/github-pages-deploy-action@v4.6.1 + uses: JamesIves/github-pages-deploy-action@v4.6.3 with: token: ${{ secrets.GITHUB_TOKEN }} branch: gh-pages From be967d42d27b7391e544bf5499caea2026d4cf27 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 6 Jul 2024 08:41:32 +1000 Subject: [PATCH 0127/1205] `playkbtw/pk64rgb`: move RGB Matrix LED config to data driven (#24062) --- keyboards/playkbtw/pk64rgb/config.h | 2 - keyboards/playkbtw/pk64rgb/keyboard.json | 72 +++++++++++++++++++++++- keyboards/playkbtw/pk64rgb/pk64rgb.c | 20 ------- 3 files changed, 71 insertions(+), 23 deletions(-) diff --git a/keyboards/playkbtw/pk64rgb/config.h b/keyboards/playkbtw/pk64rgb/config.h index 76f02334b4dd..e234999f2fc9 100644 --- a/keyboards/playkbtw/pk64rgb/config.h +++ b/keyboards/playkbtw/pk64rgb/config.h @@ -17,5 +17,3 @@ #pragma once #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND - -#define RGB_MATRIX_LED_COUNT 64 diff --git a/keyboards/playkbtw/pk64rgb/keyboard.json b/keyboards/playkbtw/pk64rgb/keyboard.json index 1f200e2089f3..81ac5be5963c 100644 --- a/keyboards/playkbtw/pk64rgb/keyboard.json +++ b/keyboards/playkbtw/pk64rgb/keyboard.json @@ -12,7 +12,77 @@ "driver": "is31fl3733", "led_flush_limit": 26, "led_process_limit": 20, - "max_brightness": 160 + "max_brightness": 160, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 1}, + + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 214, "y": 32, "flags": 1}, + + {"matrix": [3, 0], "x": 8, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 176, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4} + ] }, "build": { "lto": true diff --git a/keyboards/playkbtw/pk64rgb/pk64rgb.c b/keyboards/playkbtw/pk64rgb/pk64rgb.c index b745c82b9d5c..e8ac5eb4e25f 100644 --- a/keyboards/playkbtw/pk64rgb/pk64rgb.c +++ b/keyboards/playkbtw/pk64rgb/pk64rgb.c @@ -94,24 +94,4 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {0, SW10_CS10, SW11_CS10, SW12_CS10}, {0, SW10_CS15, SW11_CS15, SW12_CS15} }; - -led_config_t g_led_config = {{ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, - { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, - { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40}, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 }, - { 55, 56, 57, 58, 59, 60, 61, 62, 63} -}, { - { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 216, 0 }, - { 4, 16 }, { 18, 16 }, { 34, 16 }, { 50, 16 }, { 66, 16 }, { 82, 16 }, { 98, 16 }, { 114, 16 }, { 130, 16 }, { 146, 16 }, { 162, 16 }, { 178, 16 }, { 194, 16 }, { 220, 16 }, - { 6, 32 }, { 20, 32 }, { 36, 32 }, { 52, 32 }, { 68, 32 }, { 84, 32 }, { 100, 32 }, { 116, 32 }, { 132, 32 }, { 148, 32 }, { 164, 32 }, { 180, 32 }, { 212, 32 }, - { 9, 48 }, { 27, 48 }, { 43, 48 }, { 59, 48 }, { 75, 48 }, { 91, 48 }, { 107, 48 }, { 123, 48 }, { 139, 48 }, { 155, 48 }, { 171, 48 }, { 187, 48 }, { 203, 48 }, { 219, 48 }, - { 2, 64 }, { 16, 64 }, { 32, 64 }, { 64, 64 }, { 114, 64 }, { 130, 64 }, { 146, 64 }, { 204, 64 }, { 224, 64 } -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 4, 4, 4, -}}; #endif \ No newline at end of file From 4ae0ca5a11c475ee49bbce13d29edbf9bd6fc636 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 6 Jul 2024 09:57:54 +1000 Subject: [PATCH 0128/1205] Tap dance introspection (#24049) --- quantum/keymap_introspection.c | 23 +++++++++++++++++++ quantum/keymap_introspection.h | 25 +++++++++++++++++++-- quantum/process_keycode/process_tap_dance.c | 12 +++++++--- quantum/process_keycode/process_tap_dance.h | 4 +--- tests/tap_dance/examples.c | 3 ++- tests/tap_dance/tap_dance_layers/test.mk | 2 +- tests/tap_dance/test.mk | 3 +-- 7 files changed, 60 insertions(+), 12 deletions(-) diff --git a/quantum/keymap_introspection.c b/quantum/keymap_introspection.c index 71e3b429ead5..4e95125335d2 100644 --- a/quantum/keymap_introspection.c +++ b/quantum/keymap_introspection.c @@ -109,3 +109,26 @@ __attribute__((weak)) combo_t* combo_get(uint16_t combo_idx) { } #endif // defined(COMBO_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Tap Dance + +#if defined(TAP_DANCE_ENABLE) + +uint16_t tap_dance_count_raw(void) { + return sizeof(tap_dance_actions) / sizeof(tap_dance_action_t); +} + +uint16_t tap_dance_count(void) { + return tap_dance_count_raw(); +} + +tap_dance_action_t* tap_dance_get_raw(uint16_t tap_dance_idx) { + return &tap_dance_actions[tap_dance_idx]; +} + +tap_dance_action_t* tap_dance_get(uint16_t tap_dance_idx) { + return tap_dance_get_raw(tap_dance_idx); +} + +#endif // defined(TAP_DANCE_ENABLE) diff --git a/quantum/keymap_introspection.h b/quantum/keymap_introspection.h index f7516bf42af7..bc4dd93b4c85 100644 --- a/quantum/keymap_introspection.h +++ b/quantum/keymap_introspection.h @@ -61,9 +61,30 @@ uint16_t combo_count_raw(void); // Get the number of combos defined in the user's keymap, potentially stored dynamically uint16_t combo_count(void); -// Get the keycode for the encoder mapping location, stored in firmware rather than any other persistent storage +// Get the combo definition, stored in firmware rather than any other persistent storage combo_t* combo_get_raw(uint16_t combo_idx); -// Get the keycode for the encoder mapping location, potentially stored dynamically +// Get the combo definition, potentially stored dynamically combo_t* combo_get(uint16_t combo_idx); #endif // defined(COMBO_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Tap Dance + +#if defined(TAP_DANCE_ENABLE) + +// Forward declaration of tap_dance_action_t so we don't need to deal with header reordering +struct tap_dance_action_t; +typedef struct tap_dance_action_t tap_dance_action_t; + +// Get the number of tap dances defined in the user's keymap, stored in firmware rather than any other persistent storage +uint16_t tap_dance_count_raw(void); +// Get the number of tap dances defined in the user's keymap, potentially stored dynamically +uint16_t tap_dance_count(void); + +// Get the tap dance definitions, stored in firmware rather than any other persistent storage +tap_dance_action_t* tap_dance_get_raw(uint16_t tap_dance_idx); +// Get the tap dance definitions, potentially stored dynamically +tap_dance_action_t* tap_dance_get(uint16_t tap_dance_idx); + +#endif // defined(TAP_DANCE_ENABLE) diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index ce3b8fc81f70..11df62763dd1 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -21,6 +21,7 @@ #include "action_util.h" #include "timer.h" #include "wait.h" +#include "keymap_introspection.h" static uint16_t active_td; static uint16_t last_tap_time; @@ -133,7 +134,7 @@ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { if (!active_td || keycode == active_td) return false; - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(active_td)]; + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(active_td)); action->state.interrupted = true; action->state.interrupting_keycode = keycode; process_tap_dance_action_on_dance_finished(action); @@ -150,11 +151,16 @@ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { } bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { + int td_index; tap_dance_action_t *action; switch (keycode) { case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)]; + td_index = QK_TAP_DANCE_GET_INDEX(keycode); + if (td_index >= tap_dance_count()) { + return false; + } + action = tap_dance_get(td_index); action->state.pressed = record->event.pressed; if (record->event.pressed) { @@ -182,7 +188,7 @@ void tap_dance_task(void) { if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return; - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(active_td)]; + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(active_td)); if (!action->state.interrupted) { process_tap_dance_action_on_dance_finished(action); } diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index c0137c14a332..5cccbdf439a2 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -35,7 +35,7 @@ typedef struct { typedef void (*tap_dance_user_fn_t)(tap_dance_state_t *state, void *user_data); -typedef struct { +typedef struct tap_dance_action_t { tap_dance_state_t state; struct { tap_dance_user_fn_t on_each_tap; @@ -78,8 +78,6 @@ typedef struct { #define TD_INDEX(code) QK_TAP_DANCE_GET_INDEX(code) #define TAP_DANCE_KEYCODE(state) TD(((tap_dance_action_t *)state) - tap_dance_actions) -extern tap_dance_action_t tap_dance_actions[]; - void reset_tap_dance(tap_dance_state_t *state); /* To be used internally */ diff --git a/tests/tap_dance/examples.c b/tests/tap_dance/examples.c index 5377b397d3cb..4b6bdb20908f 100644 --- a/tests/tap_dance/examples.c +++ b/tests/tap_dance/examples.c @@ -16,6 +16,7 @@ #include "quantum.h" #include "examples.h" +#include "keymap_introspection.h" // Example code from the tap dance documentation, adapted for testing @@ -83,7 +84,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case TD(CT_CLN): - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)]; + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); if (!record->event.pressed && action->state.count && !action->state.finished) { tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; tap_code16(tap_hold->tap); diff --git a/tests/tap_dance/tap_dance_layers/test.mk b/tests/tap_dance/tap_dance_layers/test.mk index b4cdc9b0880e..a677fda64826 100644 --- a/tests/tap_dance/tap_dance_layers/test.mk +++ b/tests/tap_dance/tap_dance_layers/test.mk @@ -7,4 +7,4 @@ TAP_DANCE_ENABLE = yes -SRC += tap_dance_defs.c +INTROSPECTION_KEYMAP_C = tap_dance_defs.c diff --git a/tests/tap_dance/test.mk b/tests/tap_dance/test.mk index 041d9b4dc9a2..0e727da9e8f3 100644 --- a/tests/tap_dance/test.mk +++ b/tests/tap_dance/test.mk @@ -18,5 +18,4 @@ # -------------------------------------------------------------------------------- TAP_DANCE_ENABLE = yes - -SRC += examples.c +INTROSPECTION_KEYMAP_C = examples.c From b82f6ac40244269427fe6436bc5e7b1b3c04a9f7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 6 Jul 2024 11:14:09 +1000 Subject: [PATCH 0129/1205] [docs] Update RGBLight (Underglow) keycode names (#23999) --- docs/features/encoders.md | 6 ++--- docs/features/rgblight.md | 48 ++++++++++++++++++++------------------- docs/keycodes.md | 43 +++++++++++++++++++---------------- 3 files changed, 51 insertions(+), 46 deletions(-) diff --git a/docs/features/encoders.md b/docs/features/encoders.md index 3d1cac79af7a..9157fe67c8bc 100644 --- a/docs/features/encoders.md +++ b/docs/features/encoders.md @@ -85,9 +85,9 @@ Your `keymap.c` will then need an encoder mapping defined (for four layers and t #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, - [2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) }, - [3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) }, + [1] = { ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, + [2] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) }, + [3] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) }, }; #endif ``` diff --git a/docs/features/rgblight.md b/docs/features/rgblight.md index ece1c1046776..794398a0f958 100644 --- a/docs/features/rgblight.md +++ b/docs/features/rgblight.md @@ -59,30 +59,32 @@ Changing the **Value** sets the overall brightness.
## Keycodes -|Key |Aliases |Description | -|-------------------|----------|--------------------------------------------------------------------| -|`RGB_TOG` | |Toggle RGB lighting on or off | -|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | -|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| -|`RGB_HUI` | |Increase hue, decrease hue when Shift is held | -|`RGB_HUD` | |Decrease hue, increase hue when Shift is held | -|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held | -|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held | -|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held | -|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held | -|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | -|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | -|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | -|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode | -|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode | -|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode | -|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode | -|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode | -|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode | -|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode | +|Key |Aliases |Description | +|------------------------------|----------|---------------------------------------------------------------------| +|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off | +|`QK_UNDERGLOW_MODE_NEXT` |`UG_NEXT` |Cycle through modes, reverse direction when Shift is held | +|`QK_UNDERGLOW_MODE_PREVIOUS` |`UG_PREV` |Cycle through modes in reverse, forward direction when Shift is held | +|`QK_UNDERGLOW_HUE_UP` |`UG_HUEU` |Increase hue, decrease hue when Shift is held | +|`QK_UNDERGLOW_HUE_DOWN` |`UG_HUED` |Decrease hue, increase hue when Shift is held | +|`QK_UNDERGLOW_SATURATION_UP` |`UG_SATU` |Increase saturation, decrease saturation when Shift is held | +|`QK_UNDERGLOW_SATURATION_DOWN`|`UG_SATD` |Decrease saturation, increase saturation when Shift is held | +|`QK_UNDERGLOW_VALUE_UP` |`UG_VALU` |Increase value (brightness), decrease value when Shift is held | +|`QK_UNDERGLOW_VALUE_DOWN` |`UG_VALD` |Decrease value (brightness), increase value when Shift is held | +|`QK_UNDERGLOW_SPEED_UP` |`UG_SPDU` |Increase effect speed (brightness), decrease speed when Shift is held| +|`QK_UNDERGLOW_SPEED_DOWN` |`UG_SPDD` |Decrease effect speed (brightness), increase speed when Shift is held| +|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode (deprecated) | +|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode (deprecated) | +|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode (deprecated) | +|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode (deprecated) | +|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode (deprecated) | +|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode (deprecated) | +|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode (deprecated) | +|`RGB_MODE_GRADIENT` |`RGB_M_G` |Static gradient animation mode (deprecated) | +|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode (deprecated) | +|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode (deprecated) | ::: tip -`RGB_*` keycodes cannot be used with functions like `tap_code16(RGB_HUI)` as they're not USB HID keycodes. If you wish to replicate similar behaviour in custom code within your firmware (e.g. inside `encoder_update_user()` or `process_record_user()`), the equivalent [RGB functions](#functions) should be used instead. +These keycodes cannot be used with functions like `tap_code16()` as they are not USB HID keycodes. If you wish to replicate similar behaviour in custom code within your firmware (e.g. inside `encoder_update_user()` or `process_record_user()`), the equivalent [RGB functions](#functions) should be used instead. ::: @@ -358,7 +360,7 @@ Lighting layers on split keyboards will require layer state synced to the slave ### Overriding RGB Lighting on/off status -Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`. +Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `UG_TOGG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`. ### Retain brightness diff --git a/docs/keycodes.md b/docs/keycodes.md index 4c91d98fa7a4..95268952289b 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -701,26 +701,29 @@ See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term) See also: [RGB Lighting](features/rgblight) -|Key |Aliases |Description | -|-------------------|----------|--------------------------------------------------------------------| -|`RGB_TOG` | |Toggle RGB lighting on or off | -|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | -|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| -|`RGB_HUI` | |Increase hue, decrease hue when Shift is held | -|`RGB_HUD` | |Decrease hue, increase hue when Shift is held | -|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held | -|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held | -|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held | -|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held | -|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | -|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | -|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | -|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode | -|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode | -|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode | -|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode | -|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode | -|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red,Green,Blue test animation mode | +|Key |Aliases |Description | +|------------------------------|----------|---------------------------------------------------------------------| +|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off | +|`QK_UNDERGLOW_MODE_NEXT` |`UG_NEXT` |Cycle through modes, reverse direction when Shift is held | +|`QK_UNDERGLOW_MODE_PREVIOUS` |`UG_PREV` |Cycle through modes in reverse, forward direction when Shift is held | +|`QK_UNDERGLOW_HUE_UP` |`UG_HUEU` |Increase hue, decrease hue when Shift is held | +|`QK_UNDERGLOW_HUE_DOWN` |`UG_HUED` |Decrease hue, increase hue when Shift is held | +|`QK_UNDERGLOW_SATURATION_UP` |`UG_SATU` |Increase saturation, decrease saturation when Shift is held | +|`QK_UNDERGLOW_SATURATION_DOWN`|`UG_SATD` |Decrease saturation, increase saturation when Shift is held | +|`QK_UNDERGLOW_VALUE_UP` |`UG_VALU` |Increase value (brightness), decrease value when Shift is held | +|`QK_UNDERGLOW_VALUE_DOWN` |`UG_VALD` |Decrease value (brightness), increase value when Shift is held | +|`QK_UNDERGLOW_SPEED_UP` |`UG_SPDU` |Increase effect speed (brightness), decrease speed when Shift is held| +|`QK_UNDERGLOW_SPEED_DOWN` |`UG_SPDD` |Decrease effect speed (brightness), increase speed when Shift is held| +|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode (deprecated) | +|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode (deprecated) | +|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode (deprecated) | +|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode (deprecated) | +|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode (deprecated) | +|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode (deprecated) | +|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode (deprecated) | +|`RGB_MODE_GRADIENT` |`RGB_M_G` |Static gradient animation mode (deprecated) | +|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode (deprecated) | +|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode (deprecated) | ## RGB Matrix Lighting {#rgb-matrix-lighting} From 38f07e1fd27b40c3a66707b2e1478832a4f927cb Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 6 Jul 2024 12:23:54 +1000 Subject: [PATCH 0130/1205] `handwired/swiftrax/bumblebee`: fix layout name (#24064) --- .../handwired/swiftrax/bumblebee/keyboard.json | 5 ++++- .../swiftrax/bumblebee/keymaps/default/keymap.c | 6 +++--- .../swiftrax/bumblebee/keymaps/via/keymap.c | 14 ++++---------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/keyboards/handwired/swiftrax/bumblebee/keyboard.json b/keyboards/handwired/swiftrax/bumblebee/keyboard.json index 9a68fe1b4fe6..6dec52b59a4e 100644 --- a/keyboards/handwired/swiftrax/bumblebee/keyboard.json +++ b/keyboards/handwired/swiftrax/bumblebee/keyboard.json @@ -36,8 +36,11 @@ }, "processor": "atmega32u4", "bootloader": "atmel-dfu", + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [1, 0], "x": 1, "y": 0, "w": 1.5}, diff --git a/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c index fef24f402fa5..b3976f33db5e 100644 --- a/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c +++ b/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c @@ -26,19 +26,19 @@ along with this program. If not, see . #define DRV2605L_V_PEAK 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC , 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_BSPC, KC_DEL , KC_F13 , 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_HOME, KC_F14 , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , KC_F15 , KC_LCTL, KC_LALT, KC_SPC , KC_MUTE, MO(1) , MO(2) , KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT_all( + [1] = LAYOUT( _______, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [2] = LAYOUT_all( + [2] = LAYOUT( _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c index 12791a69dd64..e25de6d7bd2f 100644 --- a/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c +++ b/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c @@ -26,28 +26,22 @@ along with this program. If not, see . #define DRV2605L_V_PEAK 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC , 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_BSPC, KC_DEL , KC_F13 , 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_HOME, KC_F14 , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , KC_F15 , KC_LCTL, KC_LALT, KC_SPC , KC_MUTE, MO(1) , MO(2) , KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT_all( + [1] = LAYOUT( _______, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [2] = LAYOUT_all( + [2] = LAYOUT( _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [3] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + ) }; From 300505bd9eab51585e36e82a1f3f58e9dbd76d0e Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 6 Jul 2024 16:08:55 +1000 Subject: [PATCH 0131/1205] [docs] Fixup home link. (#24068) --- builddefs/docsgen/.vitepress/config.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builddefs/docsgen/.vitepress/config.mts b/builddefs/docsgen/.vitepress/config.mts index 289e08ef9196..54ecae2e86bd 100644 --- a/builddefs/docsgen/.vitepress/config.mts +++ b/builddefs/docsgen/.vitepress/config.mts @@ -33,7 +33,7 @@ export default defineConfig(({ mode }) => { }, title: 'QMK Firmware', - nav: [{ text: "Home", link: "./" }], + nav: [{ text: "Home", link: "/" }], search: { provider: "local", From 2477aa91617f51fc945b844c325455a2db90a55b Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 6 Jul 2024 11:14:09 +1000 Subject: [PATCH 0132/1205] [docs] Update RGBLight (Underglow) keycode names (#23999) --- docs/features/encoders.md | 6 ++--- docs/features/rgblight.md | 48 ++++++++++++++++++++------------------- docs/keycodes.md | 43 +++++++++++++++++++---------------- 3 files changed, 51 insertions(+), 46 deletions(-) diff --git a/docs/features/encoders.md b/docs/features/encoders.md index 73cbb4f3f3f7..a674eaa4a642 100644 --- a/docs/features/encoders.md +++ b/docs/features/encoders.md @@ -85,9 +85,9 @@ Your `keymap.c` will then need an encoder mapping defined (for four layers and t #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(MS_WHLU, MS_WHLD), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, - [2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) }, - [3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) }, + [1] = { ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, + [2] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) }, + [3] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) }, }; #endif ``` diff --git a/docs/features/rgblight.md b/docs/features/rgblight.md index ece1c1046776..794398a0f958 100644 --- a/docs/features/rgblight.md +++ b/docs/features/rgblight.md @@ -59,30 +59,32 @@ Changing the **Value** sets the overall brightness.
## Keycodes -|Key |Aliases |Description | -|-------------------|----------|--------------------------------------------------------------------| -|`RGB_TOG` | |Toggle RGB lighting on or off | -|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | -|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| -|`RGB_HUI` | |Increase hue, decrease hue when Shift is held | -|`RGB_HUD` | |Decrease hue, increase hue when Shift is held | -|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held | -|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held | -|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held | -|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held | -|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | -|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | -|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | -|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode | -|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode | -|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode | -|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode | -|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode | -|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode | -|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode | +|Key |Aliases |Description | +|------------------------------|----------|---------------------------------------------------------------------| +|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off | +|`QK_UNDERGLOW_MODE_NEXT` |`UG_NEXT` |Cycle through modes, reverse direction when Shift is held | +|`QK_UNDERGLOW_MODE_PREVIOUS` |`UG_PREV` |Cycle through modes in reverse, forward direction when Shift is held | +|`QK_UNDERGLOW_HUE_UP` |`UG_HUEU` |Increase hue, decrease hue when Shift is held | +|`QK_UNDERGLOW_HUE_DOWN` |`UG_HUED` |Decrease hue, increase hue when Shift is held | +|`QK_UNDERGLOW_SATURATION_UP` |`UG_SATU` |Increase saturation, decrease saturation when Shift is held | +|`QK_UNDERGLOW_SATURATION_DOWN`|`UG_SATD` |Decrease saturation, increase saturation when Shift is held | +|`QK_UNDERGLOW_VALUE_UP` |`UG_VALU` |Increase value (brightness), decrease value when Shift is held | +|`QK_UNDERGLOW_VALUE_DOWN` |`UG_VALD` |Decrease value (brightness), increase value when Shift is held | +|`QK_UNDERGLOW_SPEED_UP` |`UG_SPDU` |Increase effect speed (brightness), decrease speed when Shift is held| +|`QK_UNDERGLOW_SPEED_DOWN` |`UG_SPDD` |Decrease effect speed (brightness), increase speed when Shift is held| +|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode (deprecated) | +|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode (deprecated) | +|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode (deprecated) | +|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode (deprecated) | +|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode (deprecated) | +|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode (deprecated) | +|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode (deprecated) | +|`RGB_MODE_GRADIENT` |`RGB_M_G` |Static gradient animation mode (deprecated) | +|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode (deprecated) | +|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode (deprecated) | ::: tip -`RGB_*` keycodes cannot be used with functions like `tap_code16(RGB_HUI)` as they're not USB HID keycodes. If you wish to replicate similar behaviour in custom code within your firmware (e.g. inside `encoder_update_user()` or `process_record_user()`), the equivalent [RGB functions](#functions) should be used instead. +These keycodes cannot be used with functions like `tap_code16()` as they are not USB HID keycodes. If you wish to replicate similar behaviour in custom code within your firmware (e.g. inside `encoder_update_user()` or `process_record_user()`), the equivalent [RGB functions](#functions) should be used instead. ::: @@ -358,7 +360,7 @@ Lighting layers on split keyboards will require layer state synced to the slave ### Overriding RGB Lighting on/off status -Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`. +Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `UG_TOGG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`. ### Retain brightness diff --git a/docs/keycodes.md b/docs/keycodes.md index ea8b2e7b6507..9038c2b6d739 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -704,26 +704,29 @@ See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term) See also: [RGB Lighting](features/rgblight) -|Key |Aliases |Description | -|-------------------|----------|--------------------------------------------------------------------| -|`RGB_TOG` | |Toggle RGB lighting on or off | -|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | -|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| -|`RGB_HUI` | |Increase hue, decrease hue when Shift is held | -|`RGB_HUD` | |Decrease hue, increase hue when Shift is held | -|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held | -|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held | -|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held | -|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held | -|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | -|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | -|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | -|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode | -|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode | -|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode | -|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode | -|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode | -|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red,Green,Blue test animation mode | +|Key |Aliases |Description | +|------------------------------|----------|---------------------------------------------------------------------| +|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off | +|`QK_UNDERGLOW_MODE_NEXT` |`UG_NEXT` |Cycle through modes, reverse direction when Shift is held | +|`QK_UNDERGLOW_MODE_PREVIOUS` |`UG_PREV` |Cycle through modes in reverse, forward direction when Shift is held | +|`QK_UNDERGLOW_HUE_UP` |`UG_HUEU` |Increase hue, decrease hue when Shift is held | +|`QK_UNDERGLOW_HUE_DOWN` |`UG_HUED` |Decrease hue, increase hue when Shift is held | +|`QK_UNDERGLOW_SATURATION_UP` |`UG_SATU` |Increase saturation, decrease saturation when Shift is held | +|`QK_UNDERGLOW_SATURATION_DOWN`|`UG_SATD` |Decrease saturation, increase saturation when Shift is held | +|`QK_UNDERGLOW_VALUE_UP` |`UG_VALU` |Increase value (brightness), decrease value when Shift is held | +|`QK_UNDERGLOW_VALUE_DOWN` |`UG_VALD` |Decrease value (brightness), increase value when Shift is held | +|`QK_UNDERGLOW_SPEED_UP` |`UG_SPDU` |Increase effect speed (brightness), decrease speed when Shift is held| +|`QK_UNDERGLOW_SPEED_DOWN` |`UG_SPDD` |Decrease effect speed (brightness), increase speed when Shift is held| +|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode (deprecated) | +|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode (deprecated) | +|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode (deprecated) | +|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode (deprecated) | +|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode (deprecated) | +|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode (deprecated) | +|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode (deprecated) | +|`RGB_MODE_GRADIENT` |`RGB_M_G` |Static gradient animation mode (deprecated) | +|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode (deprecated) | +|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode (deprecated) | ## RGB Matrix Lighting {#rgb-matrix-lighting} From e4dfbb075e13f79f6a18cfa9f210016fb66dffef Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 6 Jul 2024 12:23:54 +1000 Subject: [PATCH 0133/1205] `handwired/swiftrax/bumblebee`: fix layout name (#24064) --- .../handwired/swiftrax/bumblebee/keyboard.json | 5 ++++- .../swiftrax/bumblebee/keymaps/default/keymap.c | 6 +++--- .../swiftrax/bumblebee/keymaps/via/keymap.c | 14 ++++---------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/keyboards/handwired/swiftrax/bumblebee/keyboard.json b/keyboards/handwired/swiftrax/bumblebee/keyboard.json index 9a68fe1b4fe6..6dec52b59a4e 100644 --- a/keyboards/handwired/swiftrax/bumblebee/keyboard.json +++ b/keyboards/handwired/swiftrax/bumblebee/keyboard.json @@ -36,8 +36,11 @@ }, "processor": "atmega32u4", "bootloader": "atmel-dfu", + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [1, 0], "x": 1, "y": 0, "w": 1.5}, diff --git a/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c index fef24f402fa5..b3976f33db5e 100644 --- a/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c +++ b/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c @@ -26,19 +26,19 @@ along with this program. If not, see . #define DRV2605L_V_PEAK 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC , 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_BSPC, KC_DEL , KC_F13 , 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_HOME, KC_F14 , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , KC_F15 , KC_LCTL, KC_LALT, KC_SPC , KC_MUTE, MO(1) , MO(2) , KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT_all( + [1] = LAYOUT( _______, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [2] = LAYOUT_all( + [2] = LAYOUT( _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c index 12791a69dd64..e25de6d7bd2f 100644 --- a/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c +++ b/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c @@ -26,28 +26,22 @@ along with this program. If not, see . #define DRV2605L_V_PEAK 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( KC_ESC , 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_BSPC, KC_DEL , KC_F13 , 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_HOME, KC_F14 , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , KC_F15 , KC_LCTL, KC_LALT, KC_SPC , KC_MUTE, MO(1) , MO(2) , KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT_all( + [1] = LAYOUT( _______, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [2] = LAYOUT_all( + [2] = LAYOUT( _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [3] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + ) }; From 1c02c3dfaddc3b781d49d4bd44303734c2ebf51a Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 6 Jul 2024 16:08:55 +1000 Subject: [PATCH 0134/1205] [docs] Fixup home link. (#24068) --- builddefs/docsgen/.vitepress/config.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builddefs/docsgen/.vitepress/config.mts b/builddefs/docsgen/.vitepress/config.mts index 289e08ef9196..54ecae2e86bd 100644 --- a/builddefs/docsgen/.vitepress/config.mts +++ b/builddefs/docsgen/.vitepress/config.mts @@ -33,7 +33,7 @@ export default defineConfig(({ mode }) => { }, title: 'QMK Firmware', - nav: [{ text: "Home", link: "./" }], + nav: [{ text: "Home", link: "/" }], search: { provider: "local", From 4fbb3956025627250e7a0d2439266006ebf3efc4 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 6 Jul 2024 18:21:11 +1000 Subject: [PATCH 0135/1205] `ano`: fix layout name (#24067) --- keyboards/ano/keyboard.json | 5 ++++- keyboards/ano/keymaps/default/keymap.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/keyboards/ano/keyboard.json b/keyboards/ano/keyboard.json index e676ce72707d..9c46895f1af3 100644 --- a/keyboards/ano/keyboard.json +++ b/keyboards/ano/keyboard.json @@ -36,8 +36,11 @@ }, "processor": "STM32F303", "bootloader": "stm32-dfu", + "layout_aliases": { + "LAYOUT_all": "LAYOUT" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, diff --git a/keyboards/ano/keymaps/default/keymap.c b/keyboards/ano/keymaps/default/keymap.c index 3e9907fa917d..5832f764401b 100644 --- a/keyboards/ano/keymaps/default/keymap.c +++ b/keyboards/ano/keymaps/default/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT( 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_DEL, KC_MEDIA_PLAY_PAUSE, 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_NUM, KC_PSLS, KC_PAST, KC_B, 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_P7, KC_P8, KC_P9, KC_PMNS, @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT ), - [1] = LAYOUT_all( + [1] = 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, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, From e643fa03ef9ee9c1589aa4c9622bd62e52fd2e91 Mon Sep 17 00:00:00 2001 From: takashicompany Date: Sun, 7 Jul 2024 08:56:57 +0900 Subject: [PATCH 0136/1205] Fix dogtag/info.json (#23520) --- keyboards/takashicompany/dogtag/keyboard.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/takashicompany/dogtag/keyboard.json b/keyboards/takashicompany/dogtag/keyboard.json index d65092ecca2b..675b8e6bd256 100644 --- a/keyboards/takashicompany/dogtag/keyboard.json +++ b/keyboards/takashicompany/dogtag/keyboard.json @@ -19,7 +19,7 @@ }, "matrix_pins": { "cols": ["F4", "F5", "F6", "F7", "B1"], - "rows": ["B2", "B6", "B3"] + "rows": ["B2", "B6"] }, "diode_direction": "COL2ROW", "encoder": { @@ -34,7 +34,7 @@ "matrix_pins": { "right": { "cols": ["B1", "F7", "F6", "F5", "F4"], - "rows": ["B2", "B6", "B3"] + "rows": ["B2", "B6"] } } }, @@ -65,10 +65,10 @@ {"matrix": [0, 2], "x": 2, "y": 0}, {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [3, 1], "x": 8, "y": 0}, - {"matrix": [3, 2], "x": 9, "y": 0}, - {"matrix": [3, 3], "x": 10, "y": 0}, - {"matrix": [3, 4], "x": 11, "y": 0}, + {"matrix": [2, 1], "x": 8, "y": 0}, + {"matrix": [2, 2], "x": 9, "y": 0}, + {"matrix": [2, 3], "x": 10, "y": 0}, + {"matrix": [2, 4], "x": 11, "y": 0}, {"matrix": [1, 0], "x": 0, "y": 1}, {"matrix": [1, 1], "x": 1, "y": 1}, @@ -76,11 +76,11 @@ {"matrix": [1, 3], "x": 3, "y": 1}, {"matrix": [1, 4], "x": 4, "y": 2}, - {"matrix": [4, 0], "x": 7, "y": 2}, - {"matrix": [4, 1], "x": 8, "y": 1}, - {"matrix": [4, 2], "x": 9, "y": 1}, - {"matrix": [4, 3], "x": 10, "y": 1}, - {"matrix": [4, 4], "x": 11, "y": 1} + {"matrix": [3, 0], "x": 7, "y": 2}, + {"matrix": [3, 1], "x": 8, "y": 1}, + {"matrix": [3, 2], "x": 9, "y": 1}, + {"matrix": [3, 3], "x": 10, "y": 1}, + {"matrix": [3, 4], "x": 11, "y": 1} ] } } From 67d512e639806b24e68cb35170789f614e779638 Mon Sep 17 00:00:00 2001 From: Lex Brugman Date: Sun, 7 Jul 2024 01:58:04 +0200 Subject: [PATCH 0137/1205] Fix enter for two ANSI layouts on the TKD Cycle7 (#24070) --- keyboards/vertex/cycle7/keyboard.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/vertex/cycle7/keyboard.json b/keyboards/vertex/cycle7/keyboard.json index d9b2f3016848..9d55b63fecd3 100644 --- a/keyboards/vertex/cycle7/keyboard.json +++ b/keyboards/vertex/cycle7/keyboard.json @@ -252,7 +252,7 @@ {"matrix": [2, 9], "x": 9.75, "y": 2}, {"matrix": [2, 10], "x": 10.75, "y": 2}, {"matrix": [2, 11], "x": 11.75, "y": 2}, - {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [2, 13], "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}, @@ -557,7 +557,7 @@ {"matrix": [2, 9], "x": 9.75, "y": 2}, {"matrix": [2, 10], "x": 10.75, "y": 2}, {"matrix": [2, 11], "x": 11.75, "y": 2}, - {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [2, 13], "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}, From b23ddb9ad8b55717cc750f0b146fb5bbc503340b Mon Sep 17 00:00:00 2001 From: Less/Rikki <86894501+lesshonor@users.noreply.github.com> Date: Sun, 7 Jul 2024 15:09:48 -0400 Subject: [PATCH 0138/1205] [keyboard] mechwild/bbpad (#24072) * Initial bbpad commit * refactor: bbpad --------- Co-authored-by: Kyle McCreery --- keyboards/mechwild/bbpad/config.h | 10 + keyboards/mechwild/bbpad/f401/keyboard.json | 3 + keyboards/mechwild/bbpad/f411/keyboard.json | 3 + keyboards/mechwild/bbpad/halconf.h | 8 + keyboards/mechwild/bbpad/info.json | 195 ++++++++++++++++++ .../bbpad/keymaps/default/keymap.json | 29 +++ keyboards/mechwild/bbpad/mcuconf.h | 10 + keyboards/mechwild/bbpad/readme.md | 23 +++ 8 files changed, 281 insertions(+) create mode 100644 keyboards/mechwild/bbpad/config.h create mode 100644 keyboards/mechwild/bbpad/f401/keyboard.json create mode 100644 keyboards/mechwild/bbpad/f411/keyboard.json create mode 100644 keyboards/mechwild/bbpad/halconf.h create mode 100644 keyboards/mechwild/bbpad/info.json create mode 100644 keyboards/mechwild/bbpad/keymaps/default/keymap.json create mode 100644 keyboards/mechwild/bbpad/mcuconf.h create mode 100644 keyboards/mechwild/bbpad/readme.md diff --git a/keyboards/mechwild/bbpad/config.h b/keyboards/mechwild/bbpad/config.h new file mode 100644 index 000000000000..a0dd1826eb6c --- /dev/null +++ b/keyboards/mechwild/bbpad/config.h @@ -0,0 +1,10 @@ +// Copyright 2024 QMK Contributors (@qmk) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define WS2812_PWM_DRIVER PWMD4 +#define WS2812_PWM_CHANNEL 1 +#define WS2812_PWM_PAL_MODE 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM6 +#define WS2812_DMA_CHANNEL 2 diff --git a/keyboards/mechwild/bbpad/f401/keyboard.json b/keyboards/mechwild/bbpad/f401/keyboard.json new file mode 100644 index 000000000000..797e9900595e --- /dev/null +++ b/keyboards/mechwild/bbpad/f401/keyboard.json @@ -0,0 +1,3 @@ +{ + "development_board": "blackpill_f401" +} diff --git a/keyboards/mechwild/bbpad/f411/keyboard.json b/keyboards/mechwild/bbpad/f411/keyboard.json new file mode 100644 index 000000000000..a41c5f4dd142 --- /dev/null +++ b/keyboards/mechwild/bbpad/f411/keyboard.json @@ -0,0 +1,3 @@ +{ + "development_board": "blackpill_f411" +} diff --git a/keyboards/mechwild/bbpad/halconf.h b/keyboards/mechwild/bbpad/halconf.h new file mode 100644 index 000000000000..db4caea1d05a --- /dev/null +++ b/keyboards/mechwild/bbpad/halconf.h @@ -0,0 +1,8 @@ +// Copyright 2023 QMK Contributors (@qmk) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/mechwild/bbpad/info.json b/keyboards/mechwild/bbpad/info.json new file mode 100644 index 000000000000..73a383f311b0 --- /dev/null +++ b/keyboards/mechwild/bbpad/info.json @@ -0,0 +1,195 @@ +{ + "manufacturer": "MechWild", + "keyboard_name": "BBPad", + "maintainer": "kylemccreery", + "bootloader_instructions": "Hold down the BOOT button, then tap the NRST button on the BlackPill. Avoid touching the A11 and A12 pins.", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B0"} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["A4", "A3", "A2", "A1", "C15"], + "rows": ["B12", "B13", "B14", "B15", "A8"] + }, + "rgb_matrix": { + "animations": { + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "flower_blooming": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "riverflow": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "starlight": true, + "starlight_dual_hue": true, + "starlight_dual_sat": true, + "typing_heatmap": true + }, + "center_point": [112, 75], + "driver": "ws2812", + "layout": [ + {"x": 195, "y": 53, "flags": 2}, + {"x": 195, "y": 97, "flags": 2}, + {"x": 142, "y": 144, "flags": 2}, + {"x": 74, "y": 144, "flags": 2}, + {"x": 8, "y": 97, "flags": 2}, + {"x": 8, "y": 53, "flags": 2}, + {"x": 74, "y": 9, "flags": 2}, + {"x": 142, "y": 9, "flags": 2}, + {"matrix": [0, 0], "x": 147, "y": 24, "flags": 4}, + {"matrix": [0, 1], "x": 147, "y": 58, "flags": 4}, + {"matrix": [0, 2], "x": 147, "y": 90, "flags": 4}, + {"matrix": [0, 3], "x": 147, "y": 124, "flags": 4}, + {"matrix": [1, 3], "x": 115, "y": 124, "flags": 4}, + {"matrix": [1, 2], "x": 115, "y": 90, "flags": 4}, + {"matrix": [1, 1], "x": 115, "y": 58, "flags": 4}, + {"matrix": [1, 0], "x": 115, "y": 24, "flags": 4}, + {"matrix": [2, 0], "x": 83, "y": 24, "flags": 4}, + {"matrix": [2, 1], "x": 83, "y": 58, "flags": 4}, + {"matrix": [2, 2], "x": 83, "y": 90, "flags": 4}, + {"matrix": [2, 3], "x": 83, "y": 124, "flags": 4}, + {"matrix": [3, 3], "x": 51, "y": 124, "flags": 4}, + {"matrix": [3, 2], "x": 51, "y": 90, "flags": 4}, + {"matrix": [3, 1], "x": 51, "y": 58, "flags": 4}, + {"matrix": [3, 0], "x": 51, "y": 24, "flags": 4}, + {"matrix": [4, 0], "x": 17, "y": 31, "flags": 4}, + {"matrix": [4, 1], "x": 17, "y": 53, "flags": 4}, + {"matrix": [4, 2], "x": 17, "y": 90, "flags": 4}, + {"matrix": [4, 3], "x": 17, "y": 124, "flags": 4} + ], + "max_brightness": 120 + }, + "url": "https://mechwild.com/product/bbpad/", + "usb": { + "device_version": "1.0.0", + "pid": "0x1713", + "vid": "0x6D77" + }, + "ws2812": { + "driver": "pwm", + "pin": "B6" + }, + "layout_aliases": { + "LAYOUT": "LAYOUT_vert" + }, + "layouts": { + "LAYOUT_horiz": { + "layout": [ + {"matrix": [4, 0], "x": 0, "y": 0}, + {"matrix": [3, 0], "x": 1, "y": 0}, + {"matrix": [2, 0], "x": 2, "y": 0}, + {"matrix": [1, 0], "x": 3, "y": 0}, + {"matrix": [0, 0], "x": 4, "y": 0}, + {"matrix": [4, 1], "x": 0, "y": 1}, + {"matrix": [3, 1], "x": 1, "y": 1}, + {"matrix": [2, 1], "x": 2, "y": 1}, + {"matrix": [1, 1], "x": 3, "y": 1}, + {"matrix": [0, 1], "x": 4, "y": 1}, + {"matrix": [4, 2], "x": 0, "y": 2}, + {"matrix": [3, 2], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [1, 2], "x": 3, "y": 2}, + {"matrix": [0, 2], "x": 4, "y": 2}, + {"matrix": [4, 3], "x": 0, "y": 3}, + {"matrix": [3, 3], "x": 1, "y": 3}, + {"matrix": [2, 3], "x": 2, "y": 3}, + {"matrix": [1, 3], "x": 3, "y": 3}, + {"matrix": [0, 3], "x": 4, "y": 3}, + {"matrix": [0, 4], "x": 5, "y": 3, "encoder": 0} + ] + }, + "LAYOUT_numpad": { + "layout": [ + {"matrix": [0, 4], "x": 3, "y": 0, "encoder": 0}, + {"matrix": [0, 0], "x": 0, "y": 1}, + {"matrix": [0, 1], "x": 1, "y": 1}, + {"matrix": [0, 2], "x": 2, "y": 1}, + {"matrix": [0, 3], "x": 3, "y": 1}, + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2, "h": 2}, + {"matrix": [2, 0], "x": 0, "y": 3}, + {"matrix": [2, 1], "x": 1, "y": 3}, + {"matrix": [2, 2], "x": 2, "y": 3}, + {"matrix": [3, 0], "x": 0, "y": 4}, + {"matrix": [3, 1], "x": 1, "y": 4}, + {"matrix": [3, 2], "x": 2, "y": 4}, + {"matrix": [4, 3], "x": 3, "y": 4, "h": 2}, + {"matrix": [4, 0], "x": 0, "y": 5, "w": 2}, + {"matrix": [4, 2], "x": 2, "y": 5} + ] + }, + "LAYOUT_vert": { + "layout": [ + {"matrix": [0, 4], "x": 3, "y": 0, "encoder": 0}, + {"matrix": [0, 0], "x": 0, "y": 1}, + {"matrix": [0, 1], "x": 1, "y": 1}, + {"matrix": [0, 2], "x": 2, "y": 1}, + {"matrix": [0, 3], "x": 3, "y": 1}, + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 2}, + {"matrix": [2, 0], "x": 0, "y": 3}, + {"matrix": [2, 1], "x": 1, "y": 3}, + {"matrix": [2, 2], "x": 2, "y": 3}, + {"matrix": [2, 3], "x": 3, "y": 3}, + {"matrix": [3, 0], "x": 0, "y": 4}, + {"matrix": [3, 1], "x": 1, "y": 4}, + {"matrix": [3, 2], "x": 2, "y": 4}, + {"matrix": [3, 3], "x": 3, "y": 4}, + {"matrix": [4, 0], "x": 0, "y": 5}, + {"matrix": [4, 1], "x": 1, "y": 5}, + {"matrix": [4, 2], "x": 2, "y": 5}, + {"matrix": [4, 3], "x": 3, "y": 5} + ] + } + } +} diff --git a/keyboards/mechwild/bbpad/keymaps/default/keymap.json b/keyboards/mechwild/bbpad/keymaps/default/keymap.json new file mode 100644 index 000000000000..bffab8d66e72 --- /dev/null +++ b/keyboards/mechwild/bbpad/keymaps/default/keymap.json @@ -0,0 +1,29 @@ +{ + "keyboard": "mechwild/bbpad", + "keymap": "default", + "version": 1, + "layout": "LAYOUT_horiz", + "layers": [ + [ + "KC_P7", "KC_P8", "KC_P9", "KC_PSLS", "KC_CALC", + "KC_P4", "KC_P5", "KC_P6", "KC_PAST", "TG(1)", + "KC_P1", "KC_P2", "KC_P3", "KC_PPLS", "KC_BSPC", + "KC_P0", "KC_PDOT", "KC_NUM", "KC_PMNS", "KC_PENT", "KC_MUTE" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "RGB_RMOD", "KC_TRNS", "RGB_MOD", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_NUM", "RGB_TOG" + ] + ], + "config": { + "features": { + "encoder_map": true + } + }, + "encoders": [ + [{"ccw": "KC_VOLD", "cw": "KC_VOLU"}], + [{"ccw": "RGB_VAD", "cw": "RGB_VAI"}] + ] +} diff --git a/keyboards/mechwild/bbpad/mcuconf.h b/keyboards/mechwild/bbpad/mcuconf.h new file mode 100644 index 000000000000..ea8856635de2 --- /dev/null +++ b/keyboards/mechwild/bbpad/mcuconf.h @@ -0,0 +1,10 @@ +// Copyright 2023 QMK Contributors (@qmk) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +// WS2812 +#undef STM32_PWM_USE_TIM4 +#define STM32_PWM_USE_TIM4 TRUE diff --git a/keyboards/mechwild/bbpad/readme.md b/keyboards/mechwild/bbpad/readme.md new file mode 100644 index 000000000000..5655bc2ddea7 --- /dev/null +++ b/keyboards/mechwild/bbpad/readme.md @@ -0,0 +1,23 @@ +# BBPad + +![BBPad](https://i.imgur.com/FTrK1TC.png) + +A completely normal BlackPill-powered DIY numpad kit. + +The `f401` version is the standard for this kit, using an STM32F401 BlackPill. The `f411` version will not run on an STM32F401 BlackPill; if in doubt, use `f401`. + +* Keyboard Maintainer: [Kyle McCreery](https://github.com/kylemccreery) +* Hardware Supported: BBPad 1.0 +* Hardware Availability: [BBPad on MechWild](https://mechwild.com/product/bbpad/) + +Make example for this keyboard (after setting up your build environment): + + make mechwild/bbpad/f401:default + make mechwild/bbpad/f411:default + +Flashing example for this keyboard: + + make mechwild/bbpad/f401:default:flash + make mechwild/bbpad/f411: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). From 54f907bfe91f9cf452f7cee18f2534187763c2bc Mon Sep 17 00:00:00 2001 From: "Y.KEISUKE" Date: Mon, 8 Jul 2024 07:45:35 +0900 Subject: [PATCH 0139/1205] Fix for encoders and support ENCODER_MAP_ENABLE on Planck rev7 (#23967) Co-authored-by: Nick Brassel --- .../planck/rev7/keymaps/default/config.h | 7 ++ .../planck/rev7/keymaps/default/keymap.c | 89 ++++++++++++++++--- keyboards/planck/rev7/matrix.c | 22 +++-- keyboards/planck/rev7/readme.md | 37 +++++++- 4 files changed, 133 insertions(+), 22 deletions(-) diff --git a/keyboards/planck/rev7/keymaps/default/config.h b/keyboards/planck/rev7/keymaps/default/config.h index fbbab996e1e7..937d6a5e419f 100644 --- a/keyboards/planck/rev7/keymaps/default/config.h +++ b/keyboards/planck/rev7/keymaps/default/config.h @@ -41,3 +41,10 @@ - etc. */ // #define MIDI_ADVANCED + +/* + * Encoder options + */ +// #define PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY 20 +// #define ENCODER_MAP_KEY_DELAY 10 +// #define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/rev7/keymaps/default/keymap.c b/keyboards/planck/rev7/keymaps/default/keymap.c index 4ac4c0de4f88..85f5097332c0 100644 --- a/keyboards/planck/rev7/keymaps/default/keymap.c +++ b/keyboards/planck/rev7/keymaps/default/keymap.c @@ -147,13 +147,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( - _______, QK_BOOT, DB_TOGG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, QK_BOOT, DB_TOGG, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_SPDU, UG_SPDD, KC_DEL , _______, EE_CLR, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, _______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; + +#ifdef ENCODER_MAP_ENABLE +/* Rotary Encoders + */ +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + /* Qwerty + * v- (index) Clockwise / Counter Clockwise v- (index) Clockwise / Counter Clockwise + * ,---------------------------------------------------------------------------------------. + * | (0) Vol- / Vol+ | | | | | | | | | | | (4) Vol- / Vol+ | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (1) KC_MNXT / KC_MPRV | | | | | | | | | | | (5) KC_MNXT / KC_MPRV | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (2) KC_WBAK / KC_WFWD | | | | | | | | | | | (6) KC_SPC / KC_ENT | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (3) KC_LEFT / KC_RGHT | | | | | | | | | | (7) KC_DOWN / KC_UP | + * `---------------------------------------------------------------------------------------' + */ + [_QWERTY] = { + // LEFT SIDE (index 0 to 3) + ENCODER_CCW_CW(KC_VOLU, KC_VOLD), + ENCODER_CCW_CW(KC_MNXT, KC_MPRV), + ENCODER_CCW_CW(KC_WBAK, KC_WFWD), + ENCODER_CCW_CW(KC_LEFT, KC_RGHT), + // RIGHT SIDE (index 4 to 7) + ENCODER_CCW_CW(KC_VOLU, KC_VOLD), + ENCODER_CCW_CW(KC_MNXT, KC_MPRV), + ENCODER_CCW_CW(KC_SPC, KC_ENT), + ENCODER_CCW_CW(KC_DOWN, KC_UP) + }, + + /* Adjust (Lower + Raise) + * v- (index) Clockwise / Counter Clockwise v- (index) Clockwise / Counter Clockwise + * ,---------------------------------------------------------------------------------------. + * | (0) _______ / _______ | | | | | | | | | | | (4) _______ / _______ | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (1) _______ / _______ | | | | | | | | | | | (5) _______ / _______ | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (2) UG_NEXT / UG_PREV | | | | | | | | | | | (6) SAT- / SAT+ | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (3) UG_VALD / UG_VALU | | | | | | | | | | (7) HUE- / HUE+ | + * `---------------------------------------------------------------------------------------' + */ + [_ADJUST] = { + // LEFT SIDE (index 0 to 3) + ENCODER_CCW_CW(_______, _______), + ENCODER_CCW_CW(_______, _______), + ENCODER_CCW_CW(UG_NEXT, UG_PREV), + ENCODER_CCW_CW(UG_VALD, UG_VALU), + // RIGHT SIDE (index 4 to 7) + ENCODER_CCW_CW(_______, _______), + ENCODER_CCW_CW(_______, _______), + ENCODER_CCW_CW(UG_SATD, UG_SATU), + ENCODER_CCW_CW(UG_HUEU, UG_HUED) + } +}; +#endif /* clang-format on */ #ifdef AUDIO_ENABLE @@ -161,11 +217,18 @@ float plover_song[][2] = SONG(PLOVER_SOUND); float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif +bool play_encoder_melody(uint8_t index, bool clockwise); + layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef ENCODER_MAP_ENABLE + if (IS_ENCODEREVENT(record->event) && record->event.pressed) { + play_encoder_melody(record->event.key.col, record->event.type == ENCODER_CCW_EVENT); + } +#endif switch (keycode) { case QWERTY: if (record->event.pressed) { @@ -228,13 +291,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { /* clang-format off */ float melody[8][2][2] = { - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, {{440.0f, 8}, {440.0f, 24}}, }; /* clang-format on */ @@ -251,7 +314,7 @@ float melody[8][2][2] = { #define ET12_MAJOR_THIRD 1.259921 #define ET12_PERFECT_FOURTH 1.33484 #define ET12_TRITONE 1.414214 -#define ET12_PERFECT_FIFTH 1.498307 +#define ET12_PERFECT_FIFTH 1.498307 deferred_token tokens[8]; @@ -260,7 +323,7 @@ uint32_t reset_note(uint32_t trigger_time, void *note) { return 0; } -bool encoder_update_user(uint8_t index, bool clockwise) { +bool play_encoder_melody(uint8_t index, bool clockwise) { cancel_deferred_exec(tokens[index]); if (clockwise) { melody[index][1][0] = melody[index][1][0] * ET12_MINOR_SECOND; @@ -275,6 +338,10 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return false; } +bool encoder_update_user(uint8_t index, bool clockwise) { + return play_encoder_melody(index, clockwise); +} + bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { @@ -303,4 +370,4 @@ bool dip_switch_update_user(uint8_t index, bool active) { } } return true; -} \ No newline at end of file +} diff --git a/keyboards/planck/rev7/matrix.c b/keyboards/planck/rev7/matrix.c index 777bd6a7fe80..44f532db6565 100644 --- a/keyboards/planck/rev7/matrix.c +++ b/keyboards/planck/rev7/matrix.c @@ -111,13 +111,21 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { return changed; } +#if defined(ENCODER_ENABLE) || defined(ENCODER_MAP_ENABLE) +#if !defined(PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY) +# define PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY 10 +#endif + +void encoder_quadrature_init_pin(uint8_t index, bool pad_b) { +} + uint8_t encoder_quadrature_read_pin(uint8_t index, bool pad_b) { - pin_t pin = pad_b ? B13: B12; - gpio_set_pin_input_high(pin); - gpio_write_pin_low(matrix_row_pins[index]); - wait_us(10); - uint8_t ret = gpio_read_pin(pin) ? 1 : 0; - gpio_set_pin_input_low(matrix_row_pins[index]); - gpio_set_pin_input_low(pin); + pin_t col_pin = pad_b ? B13 : B12; + gpio_set_pin_output(col_pin); + gpio_write_pin_high(col_pin); + wait_us(PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY); + uint8_t ret = gpio_read_pin(matrix_row_pins[index]) ? 0 : 1; + gpio_set_pin_input_low(col_pin); return ret; } +#endif // ENCODER_ENABLE || ENCODER_MAP_ENABLE diff --git a/keyboards/planck/rev7/readme.md b/keyboards/planck/rev7/readme.md index 6a4df377046a..940976bfce8f 100644 --- a/keyboards/planck/rev7/readme.md +++ b/keyboards/planck/rev7/readme.md @@ -14,7 +14,8 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to ## Encoders -Encoders must have matching pulse & detent resolutions (e.g. 24/24) for the scanning to work properly. Multiple encoders can be used at the same time, and are zero-indexed (compared to being one-indexed on the PCB's silkscreen) in the `encoder_update_user(uint8_t index, bool clockwise)` function: +Encoders must have matching pulse & detent resolutions (e.g. 24/24) for the scanning to work properly. Multiple encoders can be used at the same time. +If an encoder has a switch built-in, it's connected to the key at that location with index number: ``` ,-----------------------------------------------------------------------------------. @@ -28,7 +29,35 @@ Encoders must have matching pulse & detent resolutions (e.g. 24/24) for the scan `-----------------------------------------------------------------------------------' ``` -If an encoder has a switch built-in, it's connected to the key at that location. On the default keymap, each encoder will play its own rising/falling tone sequence when rotated, and will reset the pitch after one second of inactivity. The encoder map feature is not currently supported. +Planck rev7 supports `ENCODER_ENABLE` and `ENCODER_MAP_ENABLE`. If both `ENCODER_MAP_ENABLE` and `ENCODER_ENABLE` are defined, `ENCODER_MAP_ENABLE` takes precedence. On the default keymap, each encoder will play its own rising/falling tone sequence when rotated, and will reset the pitch after one second of inactivity. + +### With ENCODER_ENABLE + +Define it as follows in `rules.mk`: + +``` +ENCODER_ENABLE = yes +``` + +Zero-indexed (compared to being one-indexed on the PCB's silkscreen) in the `encoder_update_user(uint8_t index, bool clockwise)` function. + +### With ENCODER_MAP_ENABLE + +Define it as follows in `rules.mk`: + +``` +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes +``` + +If you enable `ENCODER_MAP_ENABLE`, define `const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS]` and configure your keycodes. If you enable `ENCODER_MAP_ENABLE`, `encoder_update_user` is not used directly. + +Additionally, you can use the following `config.h` options: + +```c +#define ENCODER_MAP_KEY_DELAY 10 +#define ENCODER_RESOLUTION 4 +``` ## Some Planck-specific config.h options: @@ -37,6 +66,6 @@ If an encoder has a switch built-in, it's connected to the key at that location. #define PLANCK_WATCHDOG_TIMEOUT 1.0 // disables the watchdog timer - you may want to disable the watchdog timer if you use longer macros #define PLANCK_WATCHDOG_DISABLE -// the resolution of the encoders used in the encoder matrix -#define PLANCK_ENCODER_RESOLUTION 4 +// Sets the time to wait for the rotary encoder pin state to stabilize while scanning (Default is 20(us)) +#define PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY 20 ``` From 8336b5c72f85ff89e20148930d2746d3c373404c Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 8 Jul 2024 15:56:57 +1000 Subject: [PATCH 0140/1205] `ash1800`: add additional layouts (#24065) --- keyboards/ash1800/keyboard.json | 492 ++++++++++++++++++++++++++++ keyboards/ash1800/matrix_diagram.md | 26 ++ 2 files changed, 518 insertions(+) create mode 100644 keyboards/ash1800/matrix_diagram.md diff --git a/keyboards/ash1800/keyboard.json b/keyboards/ash1800/keyboard.json index c2244a7ad70f..7156172173dd 100644 --- a/keyboards/ash1800/keyboard.json +++ b/keyboards/ash1800/keyboard.json @@ -155,6 +155,498 @@ {"matrix": [11, 8], "x": 14.25, "y": 6.25}, {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + {"matrix": [11, 5], "x": 16.5, "y": 6}, + {"matrix": [11, 6], "x": 17.5, "y": 6} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [6, 0], "x": 4.25, "y": 0}, + + {"matrix": [6, 1], "x": 5.5, "y": 0}, + {"matrix": [6, 2], "x": 6.5, "y": 0}, + {"matrix": [6, 3], "x": 7.5, "y": 0}, + {"matrix": [0, 4], "x": 8.5, "y": 0}, + + {"matrix": [0, 5], "x": 9.75, "y": 0}, + {"matrix": [0, 6], "x": 10.75, "y": 0}, + {"matrix": [0, 7], "x": 11.75, "y": 0}, + {"matrix": [0, 8], "x": 12.75, "y": 0}, + + {"matrix": [5, 4], "x": 15.5, "y": 0}, + {"matrix": [5, 5], "x": 16.5, "y": 0}, + {"matrix": [5, 6], "x": 17.5, "y": 0}, + {"matrix": [5, 7], "x": 18.5, "y": 0}, + + {"matrix": [6, 4], "x": 15.5, "y": 1}, + {"matrix": [6, 5], "x": 16.5, "y": 1}, + {"matrix": [6, 6], "x": 17.5, "y": 1}, + {"matrix": [6, 7], "x": 18.5, "y": 1}, + + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 2}, + {"matrix": [7, 0], "x": 4, "y": 2}, + {"matrix": [7, 1], "x": 5, "y": 2}, + {"matrix": [7, 2], "x": 6, "y": 2}, + {"matrix": [7, 3], "x": 7, "y": 2}, + {"matrix": [1, 4], "x": 8, "y": 2}, + {"matrix": [1, 5], "x": 9, "y": 2}, + {"matrix": [1, 6], "x": 10, "y": 2}, + {"matrix": [1, 7], "x": 11, "y": 2}, + {"matrix": [1, 8], "x": 12, "y": 2}, + {"matrix": [1, 9], "x": 13, "y": 2, "w": 2}, + + {"matrix": [7, 4], "x": 15.5, "y": 2}, + {"matrix": [7, 5], "x": 16.5, "y": 2}, + {"matrix": [7, 6], "x": 17.5, "y": 2}, + {"matrix": [7, 7], "x": 18.5, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 3}, + {"matrix": [2, 2], "x": 2.5, "y": 3}, + {"matrix": [2, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 0], "x": 4.5, "y": 3}, + {"matrix": [8, 1], "x": 5.5, "y": 3}, + {"matrix": [8, 2], "x": 6.5, "y": 3}, + {"matrix": [8, 3], "x": 7.5, "y": 3}, + {"matrix": [2, 4], "x": 8.5, "y": 3}, + {"matrix": [2, 5], "x": 9.5, "y": 3}, + {"matrix": [2, 6], "x": 10.5, "y": 3}, + {"matrix": [2, 7], "x": 11.5, "y": 3}, + {"matrix": [2, 8], "x": 12.5, "y": 3}, + {"matrix": [2, 9], "x": 13.5, "y": 3, "w": 1.5}, + + {"matrix": [8, 4], "x": 15.5, "y": 3}, + {"matrix": [8, 5], "x": 16.5, "y": 3}, + {"matrix": [8, 6], "x": 17.5, "y": 3}, + {"matrix": [8, 7], "x": 18.5, "y": 3}, + + {"matrix": [3, 0], "x": 0, "y": 4, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 4}, + {"matrix": [3, 2], "x": 2.75, "y": 4}, + {"matrix": [3, 3], "x": 3.75, "y": 4}, + {"matrix": [9, 0], "x": 4.75, "y": 4}, + {"matrix": [9, 1], "x": 5.75, "y": 4}, + {"matrix": [9, 2], "x": 6.75, "y": 4}, + {"matrix": [9, 3], "x": 7.75, "y": 4}, + {"matrix": [3, 4], "x": 8.75, "y": 4}, + {"matrix": [3, 5], "x": 9.75, "y": 4}, + {"matrix": [3, 6], "x": 10.75, "y": 4}, + {"matrix": [3, 7], "x": 11.75, "y": 4}, + {"matrix": [3, 8], "x": 12.75, "y": 4, "w": 2.25}, + + {"matrix": [9, 4], "x": 15.5, "y": 4}, + {"matrix": [9, 5], "x": 16.5, "y": 4}, + {"matrix": [9, 6], "x": 17.5, "y": 4}, + {"matrix": [9, 7], "x": 18.5, "y": 4}, + + {"matrix": [4, 0], "x": 0, "y": 5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 5}, + {"matrix": [4, 3], "x": 3.25, "y": 5}, + {"matrix": [10, 0], "x": 4.25, "y": 5}, + {"matrix": [10, 1], "x": 5.25, "y": 5}, + {"matrix": [10, 2], "x": 6.25, "y": 5}, + {"matrix": [10, 3], "x": 7.25, "y": 5}, + {"matrix": [4, 4], "x": 8.25, "y": 5}, + {"matrix": [4, 5], "x": 9.25, "y": 5}, + {"matrix": [4, 6], "x": 10.25, "y": 5}, + {"matrix": [4, 7], "x": 11.25, "y": 5}, + {"matrix": [4, 8], "x": 12.25, "y": 5, "w": 1.75}, + + {"matrix": [10, 9], "x": 14.25, "y": 5.25}, + + {"matrix": [10, 4], "x": 15.5, "y": 5}, + {"matrix": [10, 5], "x": 16.5, "y": 5}, + {"matrix": [10, 6], "x": 17.5, "y": 5}, + {"matrix": [10, 7], "x": 18.5, "y": 5, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 6, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 6, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 6, "w": 1.25}, + {"matrix": [5, 3], "x": 3.75, "y": 6, "w": 6.25}, + {"matrix": [11, 4], "x": 10, "y": 6, "w": 1.5}, + {"matrix": [11, 7], "x": 11.5, "y": 6, "w": 1.5}, + + {"matrix": [10, 8], "x": 13.25, "y": 6.25}, + {"matrix": [11, 8], "x": 14.25, "y": 6.25}, + {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + + {"matrix": [11, 5], "x": 16.5, "y": 6}, + {"matrix": [11, 6], "x": 17.5, "y": 6} + ] + }, + "LAYOUT_ansi_wkl": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [6, 0], "x": 4.25, "y": 0}, + + {"matrix": [6, 1], "x": 5.5, "y": 0}, + {"matrix": [6, 2], "x": 6.5, "y": 0}, + {"matrix": [6, 3], "x": 7.5, "y": 0}, + {"matrix": [0, 4], "x": 8.5, "y": 0}, + + {"matrix": [0, 5], "x": 9.75, "y": 0}, + {"matrix": [0, 6], "x": 10.75, "y": 0}, + {"matrix": [0, 7], "x": 11.75, "y": 0}, + {"matrix": [0, 8], "x": 12.75, "y": 0}, + + {"matrix": [5, 4], "x": 15.5, "y": 0}, + {"matrix": [5, 5], "x": 16.5, "y": 0}, + {"matrix": [5, 6], "x": 17.5, "y": 0}, + {"matrix": [5, 7], "x": 18.5, "y": 0}, + + {"matrix": [6, 4], "x": 15.5, "y": 1}, + {"matrix": [6, 5], "x": 16.5, "y": 1}, + {"matrix": [6, 6], "x": 17.5, "y": 1}, + {"matrix": [6, 7], "x": 18.5, "y": 1}, + + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 2}, + {"matrix": [7, 0], "x": 4, "y": 2}, + {"matrix": [7, 1], "x": 5, "y": 2}, + {"matrix": [7, 2], "x": 6, "y": 2}, + {"matrix": [7, 3], "x": 7, "y": 2}, + {"matrix": [1, 4], "x": 8, "y": 2}, + {"matrix": [1, 5], "x": 9, "y": 2}, + {"matrix": [1, 6], "x": 10, "y": 2}, + {"matrix": [1, 7], "x": 11, "y": 2}, + {"matrix": [1, 8], "x": 12, "y": 2}, + {"matrix": [1, 9], "x": 13, "y": 2, "w": 2}, + + {"matrix": [7, 4], "x": 15.5, "y": 2}, + {"matrix": [7, 5], "x": 16.5, "y": 2}, + {"matrix": [7, 6], "x": 17.5, "y": 2}, + {"matrix": [7, 7], "x": 18.5, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 3}, + {"matrix": [2, 2], "x": 2.5, "y": 3}, + {"matrix": [2, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 0], "x": 4.5, "y": 3}, + {"matrix": [8, 1], "x": 5.5, "y": 3}, + {"matrix": [8, 2], "x": 6.5, "y": 3}, + {"matrix": [8, 3], "x": 7.5, "y": 3}, + {"matrix": [2, 4], "x": 8.5, "y": 3}, + {"matrix": [2, 5], "x": 9.5, "y": 3}, + {"matrix": [2, 6], "x": 10.5, "y": 3}, + {"matrix": [2, 7], "x": 11.5, "y": 3}, + {"matrix": [2, 8], "x": 12.5, "y": 3}, + {"matrix": [2, 9], "x": 13.5, "y": 3, "w": 1.5}, + + {"matrix": [8, 4], "x": 15.5, "y": 3}, + {"matrix": [8, 5], "x": 16.5, "y": 3}, + {"matrix": [8, 6], "x": 17.5, "y": 3}, + {"matrix": [8, 7], "x": 18.5, "y": 3}, + + {"matrix": [3, 0], "x": 0, "y": 4, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 4}, + {"matrix": [3, 2], "x": 2.75, "y": 4}, + {"matrix": [3, 3], "x": 3.75, "y": 4}, + {"matrix": [9, 0], "x": 4.75, "y": 4}, + {"matrix": [9, 1], "x": 5.75, "y": 4}, + {"matrix": [9, 2], "x": 6.75, "y": 4}, + {"matrix": [9, 3], "x": 7.75, "y": 4}, + {"matrix": [3, 4], "x": 8.75, "y": 4}, + {"matrix": [3, 5], "x": 9.75, "y": 4}, + {"matrix": [3, 6], "x": 10.75, "y": 4}, + {"matrix": [3, 7], "x": 11.75, "y": 4}, + {"matrix": [3, 8], "x": 12.75, "y": 4, "w": 2.25}, + + {"matrix": [9, 4], "x": 15.5, "y": 4}, + {"matrix": [9, 5], "x": 16.5, "y": 4}, + {"matrix": [9, 6], "x": 17.5, "y": 4}, + {"matrix": [9, 7], "x": 18.5, "y": 4}, + + {"matrix": [4, 0], "x": 0, "y": 5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 5}, + {"matrix": [4, 3], "x": 3.25, "y": 5}, + {"matrix": [10, 0], "x": 4.25, "y": 5}, + {"matrix": [10, 1], "x": 5.25, "y": 5}, + {"matrix": [10, 2], "x": 6.25, "y": 5}, + {"matrix": [10, 3], "x": 7.25, "y": 5}, + {"matrix": [4, 4], "x": 8.25, "y": 5}, + {"matrix": [4, 5], "x": 9.25, "y": 5}, + {"matrix": [4, 6], "x": 10.25, "y": 5}, + {"matrix": [4, 7], "x": 11.25, "y": 5}, + {"matrix": [4, 8], "x": 12.25, "y": 5, "w": 1.75}, + + {"matrix": [10, 9], "x": 14.25, "y": 5.25}, + + {"matrix": [10, 4], "x": 15.5, "y": 5}, + {"matrix": [10, 5], "x": 16.5, "y": 5}, + {"matrix": [10, 6], "x": 17.5, "y": 5}, + {"matrix": [10, 7], "x": 18.5, "y": 5, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 6, "w": 1.5}, + {"matrix": [5, 1], "x": 1.5, "y": 6, "w": 1.5}, + {"matrix": [5, 3], "x": 3, "y": 6, "w": 7}, + {"matrix": [11, 4], "x": 10, "y": 6, "w": 1.5}, + {"matrix": [11, 7], "x": 11.5, "y": 6, "w": 1.5}, + + {"matrix": [10, 8], "x": 13.25, "y": 6.25}, + {"matrix": [11, 8], "x": 14.25, "y": 6.25}, + {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + + {"matrix": [11, 5], "x": 16.5, "y": 6}, + {"matrix": [11, 6], "x": 17.5, "y": 6} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [6, 0], "x": 4.25, "y": 0}, + + {"matrix": [6, 1], "x": 5.5, "y": 0}, + {"matrix": [6, 2], "x": 6.5, "y": 0}, + {"matrix": [6, 3], "x": 7.5, "y": 0}, + {"matrix": [0, 4], "x": 8.5, "y": 0}, + + {"matrix": [0, 5], "x": 9.75, "y": 0}, + {"matrix": [0, 6], "x": 10.75, "y": 0}, + {"matrix": [0, 7], "x": 11.75, "y": 0}, + {"matrix": [0, 8], "x": 12.75, "y": 0}, + + {"matrix": [5, 4], "x": 15.5, "y": 0}, + {"matrix": [5, 5], "x": 16.5, "y": 0}, + {"matrix": [5, 6], "x": 17.5, "y": 0}, + {"matrix": [5, 7], "x": 18.5, "y": 0}, + + {"matrix": [6, 4], "x": 15.5, "y": 1}, + {"matrix": [6, 5], "x": 16.5, "y": 1}, + {"matrix": [6, 6], "x": 17.5, "y": 1}, + {"matrix": [6, 7], "x": 18.5, "y": 1}, + + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 2}, + {"matrix": [7, 0], "x": 4, "y": 2}, + {"matrix": [7, 1], "x": 5, "y": 2}, + {"matrix": [7, 2], "x": 6, "y": 2}, + {"matrix": [7, 3], "x": 7, "y": 2}, + {"matrix": [1, 4], "x": 8, "y": 2}, + {"matrix": [1, 5], "x": 9, "y": 2}, + {"matrix": [1, 6], "x": 10, "y": 2}, + {"matrix": [1, 7], "x": 11, "y": 2}, + {"matrix": [1, 8], "x": 12, "y": 2}, + {"matrix": [1, 9], "x": 13, "y": 2, "w": 2}, + + {"matrix": [7, 4], "x": 15.5, "y": 2}, + {"matrix": [7, 5], "x": 16.5, "y": 2}, + {"matrix": [7, 6], "x": 17.5, "y": 2}, + {"matrix": [7, 7], "x": 18.5, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 3}, + {"matrix": [2, 2], "x": 2.5, "y": 3}, + {"matrix": [2, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 0], "x": 4.5, "y": 3}, + {"matrix": [8, 1], "x": 5.5, "y": 3}, + {"matrix": [8, 2], "x": 6.5, "y": 3}, + {"matrix": [8, 3], "x": 7.5, "y": 3}, + {"matrix": [2, 4], "x": 8.5, "y": 3}, + {"matrix": [2, 5], "x": 9.5, "y": 3}, + {"matrix": [2, 6], "x": 10.5, "y": 3}, + {"matrix": [2, 7], "x": 11.5, "y": 3}, + {"matrix": [2, 8], "x": 12.5, "y": 3}, + + {"matrix": [8, 4], "x": 15.5, "y": 3}, + {"matrix": [8, 5], "x": 16.5, "y": 3}, + {"matrix": [8, 6], "x": 17.5, "y": 3}, + {"matrix": [8, 7], "x": 18.5, "y": 3}, + + {"matrix": [3, 0], "x": 0, "y": 4, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 4}, + {"matrix": [3, 2], "x": 2.75, "y": 4}, + {"matrix": [3, 3], "x": 3.75, "y": 4}, + {"matrix": [9, 0], "x": 4.75, "y": 4}, + {"matrix": [9, 1], "x": 5.75, "y": 4}, + {"matrix": [9, 2], "x": 6.75, "y": 4}, + {"matrix": [9, 3], "x": 7.75, "y": 4}, + {"matrix": [3, 4], "x": 8.75, "y": 4}, + {"matrix": [3, 5], "x": 9.75, "y": 4}, + {"matrix": [3, 6], "x": 10.75, "y": 4}, + {"matrix": [3, 7], "x": 11.75, "y": 4}, + {"matrix": [2, 9], "x": 12.75, "y": 4}, + {"matrix": [3, 8], "x": 13.75, "y": 3, "w": 1.25, "h": 2}, + + {"matrix": [9, 4], "x": 15.5, "y": 4}, + {"matrix": [9, 5], "x": 16.5, "y": 4}, + {"matrix": [9, 6], "x": 17.5, "y": 4}, + {"matrix": [9, 7], "x": 18.5, "y": 4}, + + {"matrix": [4, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 5}, + {"matrix": [4, 2], "x": 2.25, "y": 5}, + {"matrix": [4, 3], "x": 3.25, "y": 5}, + {"matrix": [10, 0], "x": 4.25, "y": 5}, + {"matrix": [10, 1], "x": 5.25, "y": 5}, + {"matrix": [10, 2], "x": 6.25, "y": 5}, + {"matrix": [10, 3], "x": 7.25, "y": 5}, + {"matrix": [4, 4], "x": 8.25, "y": 5}, + {"matrix": [4, 5], "x": 9.25, "y": 5}, + {"matrix": [4, 6], "x": 10.25, "y": 5}, + {"matrix": [4, 7], "x": 11.25, "y": 5}, + {"matrix": [4, 8], "x": 12.25, "y": 5, "w": 1.75}, + + {"matrix": [10, 9], "x": 14.25, "y": 5.25}, + + {"matrix": [10, 4], "x": 15.5, "y": 5}, + {"matrix": [10, 5], "x": 16.5, "y": 5}, + {"matrix": [10, 6], "x": 17.5, "y": 5}, + {"matrix": [10, 7], "x": 18.5, "y": 5, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 6, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 6, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 6, "w": 1.25}, + {"matrix": [5, 3], "x": 3.75, "y": 6, "w": 6.25}, + {"matrix": [11, 4], "x": 10, "y": 6, "w": 1.5}, + {"matrix": [11, 7], "x": 11.5, "y": 6, "w": 1.5}, + + {"matrix": [10, 8], "x": 13.25, "y": 6.25}, + {"matrix": [11, 8], "x": 14.25, "y": 6.25}, + {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + + {"matrix": [11, 5], "x": 16.5, "y": 6}, + {"matrix": [11, 6], "x": 17.5, "y": 6} + ] + }, + "LAYOUT_iso_wkl": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [6, 0], "x": 4.25, "y": 0}, + + {"matrix": [6, 1], "x": 5.5, "y": 0}, + {"matrix": [6, 2], "x": 6.5, "y": 0}, + {"matrix": [6, 3], "x": 7.5, "y": 0}, + {"matrix": [0, 4], "x": 8.5, "y": 0}, + + {"matrix": [0, 5], "x": 9.75, "y": 0}, + {"matrix": [0, 6], "x": 10.75, "y": 0}, + {"matrix": [0, 7], "x": 11.75, "y": 0}, + {"matrix": [0, 8], "x": 12.75, "y": 0}, + + {"matrix": [5, 4], "x": 15.5, "y": 0}, + {"matrix": [5, 5], "x": 16.5, "y": 0}, + {"matrix": [5, 6], "x": 17.5, "y": 0}, + {"matrix": [5, 7], "x": 18.5, "y": 0}, + + {"matrix": [6, 4], "x": 15.5, "y": 1}, + {"matrix": [6, 5], "x": 16.5, "y": 1}, + {"matrix": [6, 6], "x": 17.5, "y": 1}, + {"matrix": [6, 7], "x": 18.5, "y": 1}, + + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 2}, + {"matrix": [1, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 2}, + {"matrix": [7, 0], "x": 4, "y": 2}, + {"matrix": [7, 1], "x": 5, "y": 2}, + {"matrix": [7, 2], "x": 6, "y": 2}, + {"matrix": [7, 3], "x": 7, "y": 2}, + {"matrix": [1, 4], "x": 8, "y": 2}, + {"matrix": [1, 5], "x": 9, "y": 2}, + {"matrix": [1, 6], "x": 10, "y": 2}, + {"matrix": [1, 7], "x": 11, "y": 2}, + {"matrix": [1, 8], "x": 12, "y": 2}, + {"matrix": [1, 9], "x": 13, "y": 2, "w": 2}, + + {"matrix": [7, 4], "x": 15.5, "y": 2}, + {"matrix": [7, 5], "x": 16.5, "y": 2}, + {"matrix": [7, 6], "x": 17.5, "y": 2}, + {"matrix": [7, 7], "x": 18.5, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 3}, + {"matrix": [2, 2], "x": 2.5, "y": 3}, + {"matrix": [2, 3], "x": 3.5, "y": 3}, + {"matrix": [8, 0], "x": 4.5, "y": 3}, + {"matrix": [8, 1], "x": 5.5, "y": 3}, + {"matrix": [8, 2], "x": 6.5, "y": 3}, + {"matrix": [8, 3], "x": 7.5, "y": 3}, + {"matrix": [2, 4], "x": 8.5, "y": 3}, + {"matrix": [2, 5], "x": 9.5, "y": 3}, + {"matrix": [2, 6], "x": 10.5, "y": 3}, + {"matrix": [2, 7], "x": 11.5, "y": 3}, + {"matrix": [2, 8], "x": 12.5, "y": 3}, + + {"matrix": [8, 4], "x": 15.5, "y": 3}, + {"matrix": [8, 5], "x": 16.5, "y": 3}, + {"matrix": [8, 6], "x": 17.5, "y": 3}, + {"matrix": [8, 7], "x": 18.5, "y": 3}, + + {"matrix": [3, 0], "x": 0, "y": 4, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 4}, + {"matrix": [3, 2], "x": 2.75, "y": 4}, + {"matrix": [3, 3], "x": 3.75, "y": 4}, + {"matrix": [9, 0], "x": 4.75, "y": 4}, + {"matrix": [9, 1], "x": 5.75, "y": 4}, + {"matrix": [9, 2], "x": 6.75, "y": 4}, + {"matrix": [9, 3], "x": 7.75, "y": 4}, + {"matrix": [3, 4], "x": 8.75, "y": 4}, + {"matrix": [3, 5], "x": 9.75, "y": 4}, + {"matrix": [3, 6], "x": 10.75, "y": 4}, + {"matrix": [3, 7], "x": 11.75, "y": 4}, + {"matrix": [2, 9], "x": 12.75, "y": 4}, + {"matrix": [3, 8], "x": 13.75, "y": 3, "w": 1.25, "h": 2}, + + {"matrix": [9, 4], "x": 15.5, "y": 4}, + {"matrix": [9, 5], "x": 16.5, "y": 4}, + {"matrix": [9, 6], "x": 17.5, "y": 4}, + {"matrix": [9, 7], "x": 18.5, "y": 4}, + + {"matrix": [4, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 5}, + {"matrix": [4, 2], "x": 2.25, "y": 5}, + {"matrix": [4, 3], "x": 3.25, "y": 5}, + {"matrix": [10, 0], "x": 4.25, "y": 5}, + {"matrix": [10, 1], "x": 5.25, "y": 5}, + {"matrix": [10, 2], "x": 6.25, "y": 5}, + {"matrix": [10, 3], "x": 7.25, "y": 5}, + {"matrix": [4, 4], "x": 8.25, "y": 5}, + {"matrix": [4, 5], "x": 9.25, "y": 5}, + {"matrix": [4, 6], "x": 10.25, "y": 5}, + {"matrix": [4, 7], "x": 11.25, "y": 5}, + {"matrix": [4, 8], "x": 12.25, "y": 5, "w": 1.75}, + + {"matrix": [10, 9], "x": 14.25, "y": 5.25}, + + {"matrix": [10, 4], "x": 15.5, "y": 5}, + {"matrix": [10, 5], "x": 16.5, "y": 5}, + {"matrix": [10, 6], "x": 17.5, "y": 5}, + {"matrix": [10, 7], "x": 18.5, "y": 5, "h": 2}, + + {"matrix": [5, 0], "x": 0, "y": 6, "w": 1.5}, + {"matrix": [5, 1], "x": 1.5, "y": 6, "w": 1.5}, + {"matrix": [5, 3], "x": 3, "y": 6, "w": 7}, + {"matrix": [11, 4], "x": 10, "y": 6, "w": 1.5}, + {"matrix": [11, 7], "x": 11.5, "y": 6, "w": 1.5}, + + {"matrix": [10, 8], "x": 13.25, "y": 6.25}, + {"matrix": [11, 8], "x": 14.25, "y": 6.25}, + {"matrix": [11, 9], "x": 15.25, "y": 6.25}, + {"matrix": [11, 5], "x": 16.5, "y": 6}, {"matrix": [11, 6], "x": 17.5, "y": 6} ] diff --git a/keyboards/ash1800/matrix_diagram.md b/keyboards/ash1800/matrix_diagram.md new file mode 100644 index 000000000000..4141116663c5 --- /dev/null +++ b/keyboards/ash1800/matrix_diagram.md @@ -0,0 +1,26 @@ +# Matrix Diagram for ASH1800 + +``` +┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ +│00 ││01 │02 │03 │60 ││61 │62 │63 │04 ││05 │06 │07 │08 │ │54 │55 │56 │57 │ +└───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘ ├───┼───┼───┼───┤ + │64 │65 │66 │67 │ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ├───┼───┼───┼───┤ +│10 │11 │12 │13 │70 │71 │72 │73 │14 │15 │16 │17 │18 │19 │ │74 │75 │76 │77 │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┼───┤ ┌─────┐ +│20 │21 │22 │23 │80 │81 │82 │83 │24 │25 │26 │27 │28 │29 │ │84 │85 │86 │87 │ │38 │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ ├───┼───┼───┼───┤ ┌──┴┐ │ ISO Enter +│30 │31 │32 │33 │90 │91 │92 │93 │34 │35 │36 │37 │38 │ │94 │95 │96 │97 │ │29 │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ ├───┼───┼───┼───┤ └───┴────┘ +│40 │41 │42 │43 │A0 │A1 │A2 │A3 │44 │45 │46 │47 │48 │┌───┐│A4 │A5 │A6 │A7 │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│A9 │└───┼───┼───┤ │ +│50 │51 │52 │53 │B4 │B7 │┌───┼───┼───┐│B5 │B6 │ │ +└────┴────┴────┴────────────────────────┴─────┴─────┘│A8 │B8 │B9 │└───┴───┴───┘ + └───┴───┴───┘ +┌────────┐ +│40 │ 2.25u LShift +└────────┘ +┌─────┬─────┬───────────────────────────┬─────┬─────┐ +│50 │51 │53 │B4 │B7 │ WKL +└─────┴─────┴───────────────────────────┴─────┴─────┘ +``` From d08da05cb8cff3f03670b1303d418996695834b4 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 8 Jul 2024 15:57:13 +1000 Subject: [PATCH 0141/1205] `mechlovin/olly/octagon`: move LED Matrix LED config to data driven (#24069) --- keyboards/mechlovin/olly/octagon/config.h | 2 - .../mechlovin/olly/octagon/keyboard.json | 105 +++++++++++++++++- keyboards/mechlovin/olly/octagon/octagon.c | 27 ----- 3 files changed, 104 insertions(+), 30 deletions(-) diff --git a/keyboards/mechlovin/olly/octagon/config.h b/keyboards/mechlovin/olly/octagon/config.h index 6f9d5f9a0272..791bfee784d3 100644 --- a/keyboards/mechlovin/olly/octagon/config.h +++ b/keyboards/mechlovin/olly/octagon/config.h @@ -19,8 +19,6 @@ along with this program. If not, see . #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_SDA -#define LED_MATRIX_LED_COUNT 94 - #define I2C_DRIVER I2CD2 #define I2C1_SCL_PIN B10 #define I2C1_SDA_PIN B11 diff --git a/keyboards/mechlovin/olly/octagon/keyboard.json b/keyboards/mechlovin/olly/octagon/keyboard.json index 81b78b0b1cbf..4bc7d88ed77f 100644 --- a/keyboards/mechlovin/olly/octagon/keyboard.json +++ b/keyboards/mechlovin/olly/octagon/keyboard.json @@ -57,7 +57,110 @@ "wave_up_down": true }, "driver": "is31fl3731", - "react_on_keyup": true + "react_on_keyup": true, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 134, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 164, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 179, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 194, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 209, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 4}, + + {"matrix": [1, 0], "x": 0, "y": 13, "flags": 4}, + {"matrix": [1, 1], "x": 15, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 30, "y": 13, "flags": 4}, + {"matrix": [1, 3], "x": 45, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 60, "y": 13, "flags": 4}, + {"matrix": [1, 5], "x": 75, "y": 13, "flags": 4}, + {"matrix": [1, 6], "x": 90, "y": 13, "flags": 4}, + {"matrix": [1, 7], "x": 105, "y": 13, "flags": 4}, + {"matrix": [1, 8], "x": 120, "y": 13, "flags": 4}, + {"matrix": [1, 9], "x": 134, "y": 13, "flags": 4}, + {"matrix": [1, 10], "x": 149, "y": 13, "flags": 4}, + {"matrix": [1, 11], "x": 164, "y": 13, "flags": 4}, + {"matrix": [1, 12], "x": 179, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 194, "y": 13, "flags": 4}, + {"matrix": [1, 14], "x": 209, "y": 13, "flags": 4}, + {"matrix": [1, 15], "x": 224, "y": 13, "flags": 4}, + + {"matrix": [2, 0], "x": 4, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 22, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 67, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 82, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 97, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 142, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 157, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 172, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 187, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 205, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 26, "flags": 4}, + + {"matrix": [3, 0], "x": 6, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 41, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 71, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 86, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 101, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 116, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 131, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 146, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 161, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 175, "y": 38, "flags": 4}, + {"matrix": [3, 12], "x": 190, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 207, "y": 38, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 38, "flags": 4}, + + {"matrix": [4, 0], "x": 2, "y": 51, "flags": 4}, + {"matrix": [4, 1], "x": 19, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 34, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 49, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 64, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 78, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 93, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 108, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 123, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 138, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 153, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 168, "y": 51, "flags": 4}, + {"matrix": [4, 12], "x": 189, "y": 51, "flags": 4}, + {"matrix": [4, 14], "x": 209, "y": 51, "flags": 4}, + {"matrix": [4, 15], "x": 224, "y": 51, "flags": 4}, + + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 21, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 39, "y": 64, "flags": 4}, + {"matrix": [5, 6], "x": 95, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 149, "y": 64, "flags": 4}, + {"matrix": [5, 11], "x": 164, "y": 64, "flags": 4}, + {"matrix": [5, 12], "x": 179, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 194, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 209, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 4}, + + {"x": 113, "y": 0, "flags": 8}, + {"x": 127, "y": 0, "flags": 8}, + {"x": 142, "y": 0, "flags": 8}, + + {"x": 172, "y": 0, "flags": 8}, + {"x": 187, "y": 0, "flags": 8}, + {"x": 202, "y": 0, "flags": 8}, + {"x": 217, "y": 0, "flags": 8} + ] }, "matrix_pins": { "cols": ["A10", "A9", "A8", "B15", "B14", "B13", "B2", "B1", "A15", "B3", "B9", "B8", "B7", "B6", "B5", "B4"], diff --git a/keyboards/mechlovin/olly/octagon/octagon.c b/keyboards/mechlovin/olly/octagon/octagon.c index c89565168b24..a8ff139c01b8 100644 --- a/keyboards/mechlovin/olly/octagon/octagon.c +++ b/keyboards/mechlovin/olly/octagon/octagon.c @@ -31,33 +31,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { { 0, C7_13 }, { 0, C7_14 }, { 0, C7_15 }, { 0, C7_16 }, // Layer Indicator }; -led_config_t g_led_config = { -{ - // Key Matrix to LED Index - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46}, - {47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61}, - {62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76}, - {77, 78, 79, 80, 81, 82, 83, 84, 85, 86}, -}, { - //LED Index to Physical Positon - {0, 0}, {15, 0}, {30, 0}, {45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {194, 0}, {209, 0}, {224, 0}, - {0,13}, {15, 13}, {30, 13}, {45, 13}, {60, 13}, {75, 13}, {90, 13}, {105,13}, {119,13}, {134,13}, {149,13}, {164,13}, {179,13}, {194,13}, {209,13}, {224,13}, - {0,26}, {15, 26}, {30, 26}, {45, 26}, {60, 26}, {75, 26}, {90, 26}, {105,26}, {119,26}, {134,26}, {149,26}, {164,26}, {179,26}, {194,26}, {224,26}, - {0,38}, {15, 38}, {30, 38}, {45, 38}, {60, 38}, {75, 38}, {90, 38}, {105,38}, {119,38}, {134,38}, {149,38}, {164,38}, {179,38}, {194,38}, {224,38}, - {0,51}, {15, 51}, {30, 51}, {45, 51}, {60, 51}, {75, 51}, {90, 51}, {105,51}, {119,51}, {134,51}, {149,51}, {164,51}, {179,51}, {194,51}, {224,51}, - {0,64}, {15, 64}, {30, 64}, {90, 64}, {149,64}, {164,64}, {179,64}, {194,64}, {209,64}, {224,64}, - }, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - } -}; - bool led_matrix_indicators_kb(void) { if (!led_matrix_indicators_user()) { return false; From 6eb6e3048a730c39190914663d5aabceecc9b52e Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 8 Jul 2024 15:57:29 +1000 Subject: [PATCH 0142/1205] `pearlboards/zeuspad`: add additional layouts (#24066) --- keyboards/pearlboards/zeuspad/keyboard.json | 36 ++++++++++++++++++- .../zeuspad/keymaps/default/keymap.c | 4 +-- .../pearlboards/zeuspad/keymaps/via/keymap.c | 18 +--------- .../pearlboards/zeuspad/matrix_diagram.md | 21 +++++++++++ 4 files changed, 59 insertions(+), 20 deletions(-) create mode 100644 keyboards/pearlboards/zeuspad/matrix_diagram.md diff --git a/keyboards/pearlboards/zeuspad/keyboard.json b/keyboards/pearlboards/zeuspad/keyboard.json index 6f67bd74b08f..93e1e6443324 100644 --- a/keyboards/pearlboards/zeuspad/keyboard.json +++ b/keyboards/pearlboards/zeuspad/keyboard.json @@ -61,8 +61,12 @@ "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 0, + "community_layouts": ["numpad_6x4"], + "layout_aliases": { + "LAYOUT_all": "LAYOUT_ortho_6x4" + }, "layouts": { - "LAYOUT_all": { + "LAYOUT_ortho_6x4": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, @@ -94,6 +98,36 @@ {"matrix": [5, 2], "x": 2, "y": 5.25}, {"matrix": [5, 3], "x": 3, "y": 5.25} ] + }, + "LAYOUT_numpad_6x4": { + "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": [1, 0], "x": 0, "y": 1.25}, + {"matrix": [1, 1], "x": 1, "y": 1.25}, + {"matrix": [1, 2], "x": 2, "y": 1.25}, + {"matrix": [1, 3], "x": 3, "y": 1.25}, + + {"matrix": [2, 0], "x": 0, "y": 2.25}, + {"matrix": [2, 1], "x": 1, "y": 2.25}, + {"matrix": [2, 2], "x": 2, "y": 2.25}, + + {"matrix": [3, 0], "x": 0, "y": 3.25}, + {"matrix": [3, 1], "x": 1, "y": 3.25}, + {"matrix": [3, 2], "x": 2, "y": 3.25}, + {"matrix": [3, 3], "x": 3, "y": 2.25, "h": 2}, + + {"matrix": [4, 0], "x": 0, "y": 4.25}, + {"matrix": [4, 1], "x": 1, "y": 4.25}, + {"matrix": [4, 2], "x": 2, "y": 4.25}, + + {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 2}, + {"matrix": [5, 2], "x": 2, "y": 5.25}, + {"matrix": [5, 3], "x": 3, "y": 4.25, "h": 2} + ] } } } diff --git a/keyboards/pearlboards/zeuspad/keymaps/default/keymap.c b/keyboards/pearlboards/zeuspad/keymaps/default/keymap.c index 88c243cdc593..850c96237c47 100644 --- a/keyboards/pearlboards/zeuspad/keymaps/default/keymap.c +++ b/keyboards/pearlboards/zeuspad/keymaps/default/keymap.c @@ -18,7 +18,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT_ortho_6x4( LT(1, KC_ESC), KC_LCTL, KC_LALT, KC_MEDIA_PLAY_PAUSE, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_PPLS, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P1, KC_P2, KC_P3, KC_PENT, KC_P0, KC_P0, KC_PDOT, KC_PENT), - [1] = LAYOUT_all( + [1] = LAYOUT_ortho_6x4( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, RGB_TOG, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/pearlboards/zeuspad/keymaps/via/keymap.c b/keyboards/pearlboards/zeuspad/keymaps/via/keymap.c index ee0165b28ebd..d7489b342461 100644 --- a/keyboards/pearlboards/zeuspad/keymaps/via/keymap.c +++ b/keyboards/pearlboards/zeuspad/keymaps/via/keymap.c @@ -14,7 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include + #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -33,20 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [2] = 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), - - [3] = 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) }; diff --git a/keyboards/pearlboards/zeuspad/matrix_diagram.md b/keyboards/pearlboards/zeuspad/matrix_diagram.md new file mode 100644 index 000000000000..1dde3faef85a --- /dev/null +++ b/keyboards/pearlboards/zeuspad/matrix_diagram.md @@ -0,0 +1,21 @@ +# Matrix Diagram for Pearl Boards Zeuspad + +``` +┌───┬───┬───┬───┐ +│00 │01 │02 │03 │ +└───┴───┴───┴───┘ +┌───┬───┬───┬───┐ +│10 │11 │12 │13 │ +├───┼───┼───┼───┤┌───┐ +│20 │21 │22 │23 ││33 │ +├───┼───┼───┼───┤│ │ 2uh + +│30 │31 │32 │33 ││ │ +├───┼───┼───┼───┤├───┤ +│40 │41 │42 │43 ││53 │ +├───┼───┼───┼───┤│ │ 2uh Enter +│50 │51 │52 │53 ││ │ +└───┴───┴───┴───┘└───┘ +┌───────┐ +│50 │ 2u P0 +└───────┘ +``` \ No newline at end of file From a0bb7ff9925c8e32664aa2020e5ece848ea1d60b Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 8 Jul 2024 15:57:45 +1000 Subject: [PATCH 0143/1205] `latinpad/latin60rgb`: move RGB Matrix LED config to data driven (#24076) --- keyboards/latincompass/latin60rgb/config.h | 2 - .../latincompass/latin60rgb/keyboard.json | 66 ++++++++ .../latincompass/latin60rgb/latin60rgb.c | 142 ++++++++---------- 3 files changed, 126 insertions(+), 84 deletions(-) diff --git a/keyboards/latincompass/latin60rgb/config.h b/keyboards/latincompass/latin60rgb/config.h index 94ea00468ca0..b2636abe1a38 100644 --- a/keyboards/latincompass/latin60rgb/config.h +++ b/keyboards/latincompass/latin60rgb/config.h @@ -16,5 +16,3 @@ #pragma once #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND - -#define RGB_MATRIX_LED_COUNT 60 diff --git a/keyboards/latincompass/latin60rgb/keyboard.json b/keyboards/latincompass/latin60rgb/keyboard.json index 3197b3979d30..764a7c882a69 100644 --- a/keyboards/latincompass/latin60rgb/keyboard.json +++ b/keyboards/latincompass/latin60rgb/keyboard.json @@ -40,6 +40,72 @@ "solid_reactive": true }, "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 1}, + + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 214, "y": 32, "flags": 1}, + + {"matrix": [3, 0], "x": 8, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 4}, + + {"matrix": [4, 0], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 162, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 180, "y": 64, "flags": 1} + ], "sleep": true }, "features": { diff --git a/keyboards/latincompass/latin60rgb/latin60rgb.c b/keyboards/latincompass/latin60rgb/latin60rgb.c index 8a032d76b14b..305aaff5f210 100644 --- a/keyboards/latincompass/latin60rgb/latin60rgb.c +++ b/keyboards/latincompass/latin60rgb/latin60rgb.c @@ -17,92 +17,70 @@ #ifdef RGB_MATRIX_ENABLE const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { - { 0, SW11_CS13, SW10_CS13, SW12_CS13 }, - { 0, SW11_CS12, SW10_CS12, SW12_CS12 }, - { 0, SW11_CS11, SW10_CS11, SW12_CS11 }, - { 0, SW11_CS10, SW10_CS10, SW12_CS10 }, - { 0, SW11_CS9, SW10_CS9, SW12_CS9 }, - { 0, SW11_CS8, SW10_CS8, SW12_CS8 }, - { 0, SW11_CS7, SW10_CS7, SW12_CS7 }, - { 0, SW11_CS6, SW10_CS6, SW12_CS6 }, - { 0, SW11_CS5, SW10_CS5, SW12_CS5 }, - { 0, SW11_CS4, SW10_CS4, SW12_CS4 }, - { 0, SW11_CS3, SW10_CS3, SW12_CS3 }, - { 0, SW11_CS2, SW10_CS2, SW12_CS2 }, - { 0, SW11_CS1, SW10_CS1, SW12_CS1 }, - - { 0, SW8_CS16, SW7_CS16, SW9_CS16 }, - { 0, SW8_CS15, SW7_CS15, SW9_CS15 }, - { 0, SW8_CS14, SW7_CS14, SW9_CS14 }, - { 0, SW8_CS13, SW7_CS13, SW9_CS13 }, - { 0, SW8_CS12, SW7_CS12, SW9_CS12 }, - { 0, SW8_CS11, SW7_CS11, SW9_CS11 }, - { 0, SW8_CS10, SW7_CS10, SW9_CS10 }, - { 0, SW8_CS9, SW7_CS9, SW9_CS9 }, - { 0, SW8_CS8, SW7_CS8, SW9_CS8 }, - { 0, SW8_CS7, SW7_CS7, SW9_CS7 }, - { 0, SW8_CS6, SW7_CS6, SW9_CS6 }, - { 0, SW8_CS5, SW7_CS5, SW9_CS5 }, - { 0, SW8_CS4, SW7_CS4, SW9_CS4 }, - { 0, SW8_CS3, SW7_CS3, SW9_CS3 }, - { 0, SW8_CS2, SW7_CS2, SW9_CS2 }, - { 0, SW8_CS1, SW7_CS1, SW9_CS1 }, + { 0, SW2_CS1, SW1_CS1, SW3_CS1 }, + { 0, SW2_CS2, SW1_CS2, SW3_CS2 }, + { 0, SW2_CS3, SW1_CS3, SW3_CS3 }, + { 0, SW2_CS4, SW1_CS4, SW3_CS4 }, + { 0, SW2_CS5, SW1_CS5, SW3_CS5 }, + { 0, SW2_CS6, SW1_CS6, SW3_CS6 }, + { 0, SW2_CS7, SW1_CS7, SW3_CS7 }, + { 0, SW2_CS8, SW1_CS8, SW3_CS8 }, + { 0, SW2_CS9, SW1_CS9, SW3_CS9 }, + { 0, SW2_CS10, SW1_CS10, SW3_CS10 }, + { 0, SW2_CS11, SW1_CS11, SW3_CS11 }, + { 0, SW2_CS12, SW1_CS12, SW3_CS12 }, + { 0, SW2_CS13, SW1_CS13, SW3_CS13 }, + { 0, SW2_CS14, SW1_CS14, SW3_CS14 }, - { 0, SW5_CS16, SW4_CS16, SW6_CS16 }, - { 0, SW5_CS15, SW4_CS15, SW6_CS15 }, - { 0, SW5_CS14, SW4_CS14, SW6_CS14 }, - { 0, SW5_CS13, SW4_CS13, SW6_CS13 }, - { 0, SW5_CS12, SW4_CS12, SW6_CS12 }, - { 0, SW5_CS11, SW4_CS11, SW6_CS11 }, - { 0, SW5_CS10, SW4_CS10, SW6_CS10 }, - { 0, SW5_CS9, SW4_CS9, SW6_CS9 }, - { 0, SW5_CS8, SW4_CS8, SW6_CS8 }, - { 0, SW5_CS7, SW4_CS7, SW6_CS7 }, - { 0, SW5_CS6, SW4_CS6, SW6_CS6 }, - { 0, SW5_CS5, SW4_CS5, SW6_CS5 }, - { 0, SW5_CS4, SW4_CS4, SW6_CS4 }, - { 0, SW5_CS3, SW4_CS3, SW6_CS3 }, - { 0, SW5_CS2, SW4_CS2, SW6_CS2 }, + { 0, SW2_CS16, SW1_CS16, SW3_CS16 }, { 0, SW5_CS1, SW4_CS1, SW6_CS1 }, + { 0, SW5_CS2, SW4_CS2, SW6_CS2 }, + { 0, SW5_CS3, SW4_CS3, SW6_CS3 }, + { 0, SW5_CS4, SW4_CS4, SW6_CS4 }, + { 0, SW5_CS5, SW4_CS5, SW6_CS5 }, + { 0, SW5_CS6, SW4_CS6, SW6_CS6 }, + { 0, SW5_CS7, SW4_CS7, SW6_CS7 }, + { 0, SW5_CS8, SW4_CS8, SW6_CS8 }, + { 0, SW5_CS9, SW4_CS9, SW6_CS9 }, + { 0, SW5_CS10, SW4_CS10, SW6_CS10 }, + { 0, SW5_CS11, SW4_CS11, SW6_CS11 }, + { 0, SW5_CS12, SW4_CS12, SW6_CS12 }, + { 0, SW5_CS13, SW4_CS13, SW6_CS13 }, - { 0, SW2_CS16, SW1_CS16, SW3_CS16 }, - { 0, SW2_CS14, SW1_CS14, SW3_CS14 }, - { 0, SW2_CS13, SW1_CS13, SW3_CS13 }, - { 0, SW2_CS12, SW1_CS12, SW3_CS12 }, - { 0, SW2_CS11, SW1_CS11, SW3_CS11 }, - { 0, SW2_CS10, SW1_CS10, SW3_CS10 }, - { 0, SW2_CS9, SW1_CS9, SW3_CS9 }, - { 0, SW2_CS8, SW1_CS8, SW3_CS8 }, - { 0, SW2_CS7, SW1_CS7, SW3_CS7 }, - { 0, SW2_CS6, SW1_CS6, SW3_CS6 }, - { 0, SW2_CS5, SW1_CS5, SW3_CS5 }, - { 0, SW2_CS4, SW1_CS4, SW3_CS4 }, - { 0, SW2_CS3, SW1_CS3, SW3_CS3 }, - { 0, SW2_CS2, SW1_CS2, SW3_CS2 }, - { 0, SW2_CS1, SW1_CS1, SW3_CS1 } + { 0, SW5_CS14, SW4_CS14, SW6_CS14 }, + { 0, SW5_CS15, SW4_CS15, SW6_CS15 }, + { 0, SW5_CS16, SW4_CS16, SW6_CS16 }, + { 0, SW8_CS1, SW7_CS1, SW9_CS1 }, + { 0, SW8_CS2, SW7_CS2, SW9_CS2 }, + { 0, SW8_CS3, SW7_CS3, SW9_CS3 }, + { 0, SW8_CS4, SW7_CS4, SW9_CS4 }, + { 0, SW8_CS5, SW7_CS5, SW9_CS5 }, + { 0, SW8_CS6, SW7_CS6, SW9_CS6 }, + { 0, SW8_CS7, SW7_CS7, SW9_CS7 }, + { 0, SW8_CS8, SW7_CS8, SW9_CS8 }, + { 0, SW8_CS9, SW7_CS9, SW9_CS9 }, + { 0, SW8_CS10, SW7_CS10, SW9_CS10 }, -}; + { 0, SW8_CS11, SW7_CS11, SW9_CS11 }, + { 0, SW8_CS12, SW7_CS12, SW9_CS12 }, + { 0, SW8_CS13, SW7_CS13, SW9_CS13 }, + { 0, SW8_CS14, SW7_CS14, SW9_CS14 }, + { 0, SW8_CS15, SW7_CS15, SW9_CS15 }, + { 0, SW8_CS16, SW7_CS16, SW9_CS16 }, + { 0, SW11_CS1, SW10_CS1, SW12_CS1 }, + { 0, SW11_CS2, SW10_CS2, SW12_CS2 }, + { 0, SW11_CS3, SW10_CS3, SW12_CS3 }, + { 0, SW11_CS4, SW10_CS4, SW12_CS4 }, + { 0, SW11_CS5, SW10_CS5, SW12_CS5 }, + { 0, SW11_CS6, SW10_CS6, SW12_CS6 }, + { 0, SW11_CS7, SW10_CS7, SW12_CS7 }, + { 0, SW11_CS8, SW10_CS8, SW12_CS8 }, -led_config_t g_led_config = { - { - { 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46 }, - { 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32 }, - { 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19 }, - { 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5 }, - { 4, 3, 2, 1 ,0 } - }, { - { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, - { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, - { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, - { 224, 48 }, { 198, 64 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, - { 218, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 } - }, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 4, 1, 1 - } + { 0, SW11_CS9, SW10_CS9, SW12_CS9 }, + { 0, SW11_CS10, SW10_CS10, SW12_CS10 }, + { 0, SW11_CS11, SW10_CS11, SW12_CS11 }, + { 0, SW11_CS12, SW10_CS12, SW12_CS12 }, + { 0, SW11_CS13, SW10_CS13, SW12_CS13 } }; void suspend_power_down_kb(void) { @@ -120,7 +98,7 @@ bool rgb_matrix_indicators_kb(void) { return false; } if (host_keyboard_led_state().caps_lock) { - rgb_matrix_set_color(41, 0xFF, 0xFF, 0xFF); + rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } return true; } From fbbc71ec34e1e9dc5450e9620e71526f5488fe81 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 9 Jul 2024 02:27:09 +1000 Subject: [PATCH 0144/1205] `kakunpc/rabbit_capture_plan`: update keymap layout name (#24079) `kakunpc/rabbit_capture_plan`: update keymap layout names --- .../kakunpc/rabbit_capture_plan/keymaps/default/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/keymap.c b/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/keymap.c index 649ea50c429a..aba1a40e15ca 100644 --- a/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/keymap.c +++ b/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/keymap.c @@ -22,14 +22,14 @@ enum layers{ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ - [_BASE] = LAYOUT_all( + [_BASE] = LAYOUT_ansi_split_rshift( KC_ESC, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT ), - [_FN] = LAYOUT_all( + [_FN] = LAYOUT_ansi_split_rshift( QK_BOOT, _______, 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, From c97ec805cd1096bb60bf55ab19973dc01bd043b4 Mon Sep 17 00:00:00 2001 From: jack Date: Wed, 10 Jul 2024 13:19:06 -0600 Subject: [PATCH 0145/1205] [Keyboard] Add boardsource/the_q (#23782) * initial unsplit keyboard * move shared code * unsplit: fix underglow led x,y & remove unecessary code * unsplit: remove split code & tidy readme * unsplit: limit brightness & community layout * rename keyboard * the_q: tidy keymap & readme * lulu: remove accidental build target * rename file --- keyboards/boardsource/lib/oled.c | 20 ++ .../{unicorne/unicorne.h => lib/oled.h} | 95 ++++---- keyboards/boardsource/lulu/avr/rules.mk | 1 + keyboards/boardsource/lulu/lulu.c | 222 +----------------- keyboards/boardsource/lulu/rp2040/rules.mk | 1 + keyboards/boardsource/the_q/keyboard.json | 142 +++++++++++ .../the_q/keymaps/default/keymap.json | 25 ++ .../boardsource/the_q/keymaps/via/keymap.json | 30 +++ keyboards/boardsource/the_q/readme.md | 23 ++ keyboards/boardsource/the_q/rules.mk | 1 + keyboards/boardsource/the_q/the_q.c | 14 ++ keyboards/boardsource/unicorne/rules.mk | 1 + keyboards/boardsource/unicorne/unicorne.c | 22 +- 13 files changed, 314 insertions(+), 283 deletions(-) create mode 100644 keyboards/boardsource/lib/oled.c rename keyboards/boardsource/{unicorne/unicorne.h => lib/oled.h} (84%) create mode 100644 keyboards/boardsource/lulu/avr/rules.mk create mode 100644 keyboards/boardsource/the_q/keyboard.json create mode 100644 keyboards/boardsource/the_q/keymaps/default/keymap.json create mode 100644 keyboards/boardsource/the_q/keymaps/via/keymap.json create mode 100644 keyboards/boardsource/the_q/readme.md create mode 100644 keyboards/boardsource/the_q/rules.mk create mode 100644 keyboards/boardsource/the_q/the_q.c diff --git a/keyboards/boardsource/lib/oled.c b/keyboards/boardsource/lib/oled.c new file mode 100644 index 000000000000..c0fb6ab4a61b --- /dev/null +++ b/keyboards/boardsource/lib/oled.c @@ -0,0 +1,20 @@ +// Copyright 2024 jack (@waffle87) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "oled.h" + +void render_layer_state(void) { + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_raw_P(layer0_img, sizeof(layer0_img)); + break; + case 1: + oled_write_raw_P(layer1_img, sizeof(layer1_img)); + break; + case 2: + oled_write_raw_P(layer2_img, sizeof(layer2_img)); + break; + case 3: + oled_write_raw_P(layer3_img, sizeof(layer3_img)); + break; + } +} diff --git a/keyboards/boardsource/unicorne/unicorne.h b/keyboards/boardsource/lib/oled.h similarity index 84% rename from keyboards/boardsource/unicorne/unicorne.h rename to keyboards/boardsource/lib/oled.h index 68bbeeb18ab1..4778be20b0df 100644 --- a/keyboards/boardsource/unicorne/unicorne.h +++ b/keyboards/boardsource/lib/oled.h @@ -1,54 +1,12 @@ -// Copyright 2023 jack (@waffle87) +// Copyright 2024 jack (@waffle87) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "quantum.h" -#ifdef OLED_ENABLE -// clang-format off -static const char PROGMEM logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x01, 0xe3, 0xe7, 0xe7, 0xe3, - 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, - 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, - 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x7e, 0xff, 0xff, 0xff, 0xe7, 0xc1, 0x81, 0x81, 0x81, 0xc1, 0x00, 0x00, 0x7f, - 0xff, 0xff, 0xff, 0xe3, 0xc1, 0x81, 0x81, 0xc1, 0xe3, 0xff, 0xff, 0xff, 0xff, 0x3c, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x03, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, - 0xcd, 0x8c, 0x8c, 0x8c, 0x8d, 0xcf, 0xcf, 0xcf, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; +void render_layer_state(void); -static const char PROGMEM layer_zero[] = { +// clang-format off +static const char PROGMEM layer0_img[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -83,8 +41,7 @@ static const char PROGMEM layer_zero[] = { 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }; - -static const char PROGMEM layer_one[] = { +static const char PROGMEM layer1_img[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -119,8 +76,7 @@ static const char PROGMEM layer_one[] = { 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }; - -static const char PROGMEM layer_two[] = { +static const char PROGMEM layer2_img[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -155,8 +111,7 @@ static const char PROGMEM layer_two[] = { 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }; - -static const char PROGMEM layer_three[] = { +static const char PROGMEM layer3_img[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, @@ -190,5 +145,39 @@ static const char PROGMEM layer_three[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +static const char PROGMEM bs_logo_img[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, + 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0xe0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfc, 0x1e, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc0, + 0x80, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, + 0xe0, 0xc0, 0x80, 0x80, 0xc0, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x1f, 0xff, 0xff, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x78, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, 0x78, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; // clang-format on -#endif diff --git a/keyboards/boardsource/lulu/avr/rules.mk b/keyboards/boardsource/lulu/avr/rules.mk new file mode 100644 index 000000000000..de6a3d8afcad --- /dev/null +++ b/keyboards/boardsource/lulu/avr/rules.mk @@ -0,0 +1 @@ +SRC += lib/oled.c diff --git a/keyboards/boardsource/lulu/lulu.c b/keyboards/boardsource/lulu/lulu.c index 8d011268c4b1..b20228a7d7fc 100644 --- a/keyboards/boardsource/lulu/lulu.c +++ b/keyboards/boardsource/lulu/lulu.c @@ -1,6 +1,7 @@ // Copyright 2022 Cole Smith // SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" +#include "lib/oled.h" #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { @@ -24,225 +25,20 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #ifdef OLED_ENABLE oled_rotation_t oled_init_kb(oled_rotation_t rotation) { - if (!is_keyboard_master()) { - return OLED_ROTATION_180; - } - return rotation; -} - -void render_layer1_logo(void){ - static const char PROGMEM layer_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, - 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0xfc, 0x0e, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, - 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, - 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, - 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, - 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(layer_logo, sizeof(layer_logo)); -} - -void render_layer2_logo(void){ - static const char PROGMEM layer_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, - 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, - 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x3f, 0x70, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, - 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, - 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, - 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(layer_logo, sizeof(layer_logo)); -} - -void render_layer3_logo(void){ - static const char PROGMEM layer_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, - 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, - 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0x70, 0x38, 0x1f, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, - 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, - 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, - 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(layer_logo, sizeof(layer_logo)); -} - -void render_layer4_logo(void){ - static const char PROGMEM layer_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, - 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x07, 0x0e, 0xfc, 0xf0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, - 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, - 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, - 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, - 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(layer_logo, sizeof(layer_logo)); -} - -void render_logo(void) { - static const char PROGMEM logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, - 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xe0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfc, 0x1e, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc0, - 0x80, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, - 0xe0, 0xc0, 0x80, 0x80, 0xc0, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x1f, 0xff, 0xff, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x78, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x01, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, 0x78, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(logo, sizeof(logo)); -} - -void process_layer_state(void) { - switch (get_highest_layer(layer_state)) { - case 0: - render_layer1_logo(); - break; - case 1: - render_layer2_logo(); - break; - case 2: - render_layer3_logo(); - break; - case 3: - render_layer4_logo(); - break; + if (!is_keyboard_master()) { + return OLED_ROTATION_180; } + return rotation; } bool oled_task_kb(void) { - if (!oled_task_user()) { return false; } + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { - process_layer_state(); + render_layer_state(); } else { - render_logo(); + oled_write_raw_P(bs_logo_img, sizeof(bs_logo_img)); } return false; } diff --git a/keyboards/boardsource/lulu/rp2040/rules.mk b/keyboards/boardsource/lulu/rp2040/rules.mk index 161ec22b16e2..118c27fc6a2e 100644 --- a/keyboards/boardsource/lulu/rp2040/rules.mk +++ b/keyboards/boardsource/lulu/rp2040/rules.mk @@ -1 +1,2 @@ SERIAL_DRIVER = vendor +SRC += lib/oled.c diff --git a/keyboards/boardsource/the_q/keyboard.json b/keyboards/boardsource/the_q/keyboard.json new file mode 100644 index 000000000000..61ff49330edf --- /dev/null +++ b/keyboards/boardsource/the_q/keyboard.json @@ -0,0 +1,142 @@ +{ + "manufacturer": "Boardsource", + "keyboard_name": "The Q", + "maintainer": "waffle87", + "development_board": "promicro", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "oled": true + }, + "matrix_pins": { + "rows": ["B2", "B3", "B1", "F7", "F6", "F5", "F4"], + "cols": ["D4", "C6", "D7", "E6", "B4", "B5"] + }, + "url": "https://boardsource.xyz", + "usb": { + "device_version": "1.0.0", + "pid": "0x7552", + "vid": "0x4273" + }, + "ws2812": { + "pin": "B6" + }, + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_sat": true, + "band_val": true, + "breathing": true, + "gradient_left_right": true, + "gradient_up_down": true + }, + "default": { + "animation": "alphas_mods" + }, + "max_brightness": 150, + "driver": "ws2812", + "layout": [ + {"x": 112.2, "y": 10.6, "flags": 2}, + {"x": 181, "y": 5.3, "flags": 2}, + {"x": 215.4, "y": 53.3, "flags": 2}, + {"x": 112.2, "y": 64, "flags": 2}, + {"x": 26.2, "y": 53.3, "flags": 2}, + {"x": 43.4, "y": 5.3, "flags": 2}, + {"matrix": [0, 1], "x": 17.6, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 17.6, "y": 42.7, "flags": 4}, + {"matrix": [2, 1], "x": 17.6, "y": 21.4, "flags": 4}, + {"matrix": [2, 2], "x": 34.8, "y": 21.4, "flags": 4}, + {"matrix": [1, 2], "x": 34.8, "y": 42.7, "flags": 4}, + {"matrix": [0, 2], "x": 34.8, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 42.7, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 21.4, "flags": 4}, + {"matrix": [2, 4], "x": 69.2, "y": 21.4, "flags": 4}, + {"matrix": [1, 4], "x": 69.2, "y": 42.7, "flags": 4}, + {"matrix": [0, 4], "x": 69.2, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 86.4, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 86.4, "y": 42.7, "flags": 4}, + {"matrix": [2, 5], "x": 86.4, "y": 21.4, "flags": 4}, + {"matrix": [3, 0], "x": 69.2, "y": 20, "flags": 1}, + {"matrix": [3, 1], "x": 86.4, "y": 20, "flags": 1}, + {"matrix": [3, 2], "x": 103.6, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 120.8, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 138, "y": 20, "flags": 1}, + {"matrix": [3, 5], "x": 155.2, "y": 20, "flags": 1}, + {"matrix": [4, 5], "x": 138, "y": 21.4, "flags": 4}, + {"matrix": [5, 5], "x": 138, "y": 42.7, "flags": 4}, + {"matrix": [6, 5], "x": 138, "y": 0, "flags": 4}, + {"matrix": [6, 4], "x": 155.2, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 155.2, "y": 42.7, "flags": 4}, + {"matrix": [4, 4], "x": 155.2, "y": 21.4, "flags": 4}, + {"matrix": [4, 3], "x": 172.4, "y": 21.4, "flags": 4}, + {"matrix": [5, 3], "x": 172.4, "y": 42.7, "flags": 4}, + {"matrix": [6, 3], "x": 172.4, "y": 0, "flags": 4}, + {"matrix": [6, 2], "x": 189.6, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 189.6, "y": 42.7, "flags": 4}, + {"matrix": [4, 2], "x": 189.6, "y": 21.4, "flags": 4}, + {"matrix": [4, 1], "x": 206.8, "y": 21.4, "flags": 4}, + {"matrix": [5, 1], "x": 206.8, "y": 42.7, "flags": 4}, + {"matrix": [6, 1], "x": 206.8, "y": 0, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 0, "flags": 1}, + {"matrix": [5, 0], "x": 224, "y": 42.7, "flags": 1}, + {"matrix": [4, 0], "x": 224, "y": 21.4, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 21.4, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 42.7, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1} + ] + }, + "community_layouts": ["split_3x6_3"], + "layouts": { + "LAYOUT_split_3x6_3": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.25}, + {"matrix": [0, 1], "x": 1, "y": 0.25}, + {"matrix": [0, 2], "x": 2, "y": 0.125}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.125}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [6, 5], "x": 8, "y": 0.25}, + {"matrix": [6, 4], "x": 9, "y": 0.125}, + {"matrix": [6, 3], "x": 10, "y": 0}, + {"matrix": [6, 2], "x": 11, "y": 0.125}, + {"matrix": [6, 1], "x": 12, "y": 0.25}, + {"matrix": [6, 0], "x": 13, "y": 0.25}, + {"matrix": [1, 0], "x": 0, "y": 1.25}, + {"matrix": [1, 1], "x": 1, "y": 1.25}, + {"matrix": [1, 2], "x": 2, "y": 1.125}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.125}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [5, 5], "x": 8, "y": 1.25}, + {"matrix": [5, 4], "x": 9, "y": 1.125}, + {"matrix": [5, 3], "x": 10, "y": 1}, + {"matrix": [5, 2], "x": 11, "y": 1.125}, + {"matrix": [5, 1], "x": 12, "y": 1.25}, + {"matrix": [5, 0], "x": 13, "y": 1.25}, + {"matrix": [2, 0], "x": 0, "y": 2.25}, + {"matrix": [2, 1], "x": 1, "y": 2.25}, + {"matrix": [2, 2], "x": 2, "y": 2.125}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.125}, + {"matrix": [2, 5], "x": 5, "y": 2.25}, + {"matrix": [4, 5], "x": 8, "y": 2.25}, + {"matrix": [4, 4], "x": 9, "y": 2.125}, + {"matrix": [4, 3], "x": 10, "y": 2}, + {"matrix": [4, 2], "x": 11, "y": 2.125}, + {"matrix": [4, 1], "x": 12, "y": 2.25}, + {"matrix": [4, 0], "x": 13, "y": 2.25}, + {"matrix": [3, 0], "x": 3.5, "y": 3.25}, + {"matrix": [3, 1], "x": 4.5, "y": 3.5}, + {"matrix": [3, 2], "x": 5.5, "y": 3.75}, + {"matrix": [3, 3], "x": 7.5, "y": 3.75}, + {"matrix": [3, 4], "x": 8.5, "y": 3.5}, + {"matrix": [3, 5], "x": 9.5, "y": 3.25} + ] + } + } +} diff --git a/keyboards/boardsource/the_q/keymaps/default/keymap.json b/keyboards/boardsource/the_q/keymaps/default/keymap.json new file mode 100644 index 000000000000..69aa6f862968 --- /dev/null +++ b/keyboards/boardsource/the_q/keymaps/default/keymap.json @@ -0,0 +1,25 @@ +{ + "keyboard": "boardsource/the_q", + "keymap": "default", + "layout": "LAYOUT_split_3x6_3", + "layers": [ + [ + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC", + "KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ESC", + "KC_LGUI", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)", "KC_RALT" + ], + [ + "_______", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "_______", + "_______", "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "QK_BOOT", "_______", "_______", "_______", "_______", "_______", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_MOD", "RGB_TOG", "_______", + "EE_CLR", "_______", "_______", "_______", "_______", "_______", "RGB_VAD", "RGB_HUD", "RGB_SAD", "RGB_RMOD", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/boardsource/the_q/keymaps/via/keymap.json b/keyboards/boardsource/the_q/keymaps/via/keymap.json new file mode 100644 index 000000000000..40a68c3f51f2 --- /dev/null +++ b/keyboards/boardsource/the_q/keymaps/via/keymap.json @@ -0,0 +1,30 @@ +{ + "keyboard": "boardsource/the_q", + "keymap": "via", + "layout": "LAYOUT_split_3x6_3", + "config": { + "features": { + "via": true + } + }, + "layers": [ + [ + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC", + "KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ESC", + "KC_LGUI", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)", "KC_RALT" + ], + [ + "_______", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "_______", + "_______", "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "QK_BOOT", "_______", "_______", "_______", "_______", "_______", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_MOD", "RGB_TOG", "_______", + "EE_CLR", "_______", "_______", "_______", "_______", "_______", "RGB_VAD", "RGB_HUD", "RGB_SAD", "RGB_RMOD", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/boardsource/the_q/readme.md b/keyboards/boardsource/the_q/readme.md new file mode 100644 index 000000000000..9ec8fe8eda55 --- /dev/null +++ b/keyboards/boardsource/the_q/readme.md @@ -0,0 +1,23 @@ +# The Q + +* Keyboard Maintainer: [waffle87](https://github.com/waffle87) +* Hardware Supported: The Q PCB w/ Pro Micro style microcontroller +* Hardware Availability: [boardsource.xyz](https://boardsource.xyz) + +Make example for this keyboard (after setting up your build environment): + + make boardsource/the_q:default + +Flashing example for this keyboard: + + mke boardsource/the_q: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (top left key) +* **Physical reset button**: Briefly press the button on the front of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` diff --git a/keyboards/boardsource/the_q/rules.mk b/keyboards/boardsource/the_q/rules.mk new file mode 100644 index 000000000000..de6a3d8afcad --- /dev/null +++ b/keyboards/boardsource/the_q/rules.mk @@ -0,0 +1 @@ +SRC += lib/oled.c diff --git a/keyboards/boardsource/the_q/the_q.c b/keyboards/boardsource/the_q/the_q.c new file mode 100644 index 000000000000..09294569114a --- /dev/null +++ b/keyboards/boardsource/the_q/the_q.c @@ -0,0 +1,14 @@ +// Copyright 2024 jack (@waffle87) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "quantum.h" +#include "lib/oled.h" + +#ifdef OLED_ENABLE +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + render_layer_state(); + return false; +} +#endif diff --git a/keyboards/boardsource/unicorne/rules.mk b/keyboards/boardsource/unicorne/rules.mk index 48b30dcd51a7..448962cf002e 100644 --- a/keyboards/boardsource/unicorne/rules.mk +++ b/keyboards/boardsource/unicorne/rules.mk @@ -1,2 +1,3 @@ SERIAL_DRIVER = vendor POINTING_DEVICE_DRIVER = analog_joystick +SRC += lib/oled.c diff --git a/keyboards/boardsource/unicorne/unicorne.c b/keyboards/boardsource/unicorne/unicorne.c index 22cd1e4a37d8..f9dac8d3efbc 100644 --- a/keyboards/boardsource/unicorne/unicorne.c +++ b/keyboards/boardsource/unicorne/unicorne.c @@ -1,6 +1,7 @@ -// Copyright 2023 jack (@waffle87) +// Copyright 2024 jack (@waffle87) // SPDX-License-Identifier: GPL-2.0-or-later -#include "unicorne.h" +#include "quantum.h" +#include "lib/oled.h" #ifdef OLED_ENABLE oled_rotation_t oled_init_kb(oled_rotation_t rotation) { @@ -15,22 +16,9 @@ bool oled_task_kb(void) { return false; } if (is_keyboard_master()) { - switch (get_highest_layer(layer_state)) { - case 0: - oled_write_raw(layer_zero, sizeof(layer_zero)); - break; - case 1: - oled_write_raw(layer_one, sizeof(layer_one)); - break; - case 2: - oled_write_raw(layer_two, sizeof(layer_two)); - break; - case 3: - oled_write_raw(layer_three, sizeof(layer_three)); - break; - } + render_layer_state(); } else { - oled_write_raw(logo, sizeof(logo)); + oled_write_raw_P(bs_logo_img, sizeof(bs_logo_img)); } return false; } From fb54a59bba20d83be7a42da52faf3e6afebc1c26 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 11 Jul 2024 10:09:41 +1000 Subject: [PATCH 0146/1205] `jadookb/jkb65`: move RGB Matrix LED config to data driven (#24080) --- keyboards/jadookb/jkb65/config.h | 19 -------- keyboards/jadookb/jkb65/info.json | 73 +++++++++++++++++++++++++++++++ keyboards/jadookb/jkb65/jkb65.c | 29 +----------- 3 files changed, 74 insertions(+), 47 deletions(-) delete mode 100644 keyboards/jadookb/jkb65/config.h diff --git a/keyboards/jadookb/jkb65/config.h b/keyboards/jadookb/jkb65/config.h deleted file mode 100644 index a0793c586110..000000000000 --- a/keyboards/jadookb/jkb65/config.h +++ /dev/null @@ -1,19 +0,0 @@ - /* Copyright 2021 Wizad-GG - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define RGB_MATRIX_LED_COUNT 67 diff --git a/keyboards/jadookb/jkb65/info.json b/keyboards/jadookb/jkb65/info.json index 054b1c5452cd..c4a44a0d7446 100644 --- a/keyboards/jadookb/jkb65/info.json +++ b/keyboards/jadookb/jkb65/info.json @@ -77,6 +77,79 @@ "animation": "cycle_all" }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 134, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 164, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 179, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 202, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 67, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 82, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 97, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 127, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 142, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 157, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 172, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 187, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 205, "y": 16, "flags": 4}, + {"matrix": [1, 15], "x": 224, "y": 16, "flags": 1}, + + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 175, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 200, "y": 32, "flags": 1}, + {"matrix": [2, 15], "x": 224, "y": 32, "flags": 1}, + + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 63, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 78, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 93, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 108, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 123, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 138, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 153, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 168, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 209, "y": 48, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 48, "flags": 1}, + + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 39, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 95, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 151, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 170, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 194, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 15], "x": 224, "y": 64, "flags": 1} + ], "led_process_limit": 4, "led_flush_limit": 26, "sleep": true, diff --git a/keyboards/jadookb/jkb65/jkb65.c b/keyboards/jadookb/jkb65/jkb65.c index 0e76162b5abd..54037899dca4 100644 --- a/keyboards/jadookb/jkb65/jkb65.c +++ b/keyboards/jadookb/jkb65/jkb65.c @@ -17,38 +17,11 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE - -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, - { 30, NO_LED, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 }, - { NO_LED, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66 } -}, { - // LED Index to Physical Position - { 0, 0}, { 15, 0}, { 30, 0}, { 45, 0}, { 60, 0}, { 75, 0}, { 90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {202, 0}, {225, 0}, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete - { 4, 16}, { 22, 16}, { 37, 16}, { 52, 16}, { 67, 16}, { 82, 16}, { 97, 16}, {112, 16}, {127, 16}, {142, 16}, {157, 16}, {172, 16}, {187, 16}, {206, 16}, {225, 16}, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home - { 6, 32}, { 26, 32}, { 41, 32}, { 56, 32}, { 71, 32}, { 86, 32}, {101, 32}, {116, 32}, {131, 32}, {146, 32}, {161, 32}, {176, 32}, {201, 32}, {225, 32}, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up - { 9, 48}, { 34, 48}, { 49, 48}, { 64, 48}, { 79, 48}, { 94, 48}, {109, 48}, {124, 48}, {139, 48}, {154, 48}, {169, 48}, {189, 48}, {208, 48}, {225, 48}, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down - { 2, 64}, { 21, 64}, { 39, 64}, { 94, 64}, {148, 64}, {163, 64}, {193, 64}, {208, 64}, {225, 64}, // Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right - -}, { - // LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down - 1, 1, 1, 4, 1, 1, 1, 1, 1, // Ctrl, GUI, Alt, Space, Alt, FN, Left, Down, Right - -} }; - - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; } - if (host_keyboard_led_state().caps_lock) { + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } return true; From d69b44e68a3e00a229df860b1f0af01790bf49ca Mon Sep 17 00:00:00 2001 From: Will Hedges <36576135+will-hedges@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:15:35 -0500 Subject: [PATCH 0147/1205] refactor bear_face/v1, v2 (#24060) Co-authored-by: jack --- keyboards/bear_face/info.json | 22 ++-- keyboards/bear_face/rules.mk | 1 - keyboards/bear_face/v1/keyboard.json | 6 +- .../bear_face/v1/keymaps/default/keymap.c | 32 ++---- keyboards/bear_face/v2/keyboard.json | 100 +++++++++++++++++- .../bear_face/v2/keymaps/default/keymap.c | 22 +--- .../bear_face/v2/keymaps/default/readme.md | 4 + .../bear_face/v2/keymaps/default_iso/keymap.c | 22 +--- .../bear_face/v3/keymaps/default/keymap.c | 2 +- .../bear_face/v3/keymaps/default_iso/keymap.c | 2 +- 10 files changed, 135 insertions(+), 78 deletions(-) delete mode 100644 keyboards/bear_face/rules.mk diff --git a/keyboards/bear_face/info.json b/keyboards/bear_face/info.json index ad5b1dd7d9d3..90191299d87d 100644 --- a/keyboards/bear_face/info.json +++ b/keyboards/bear_face/info.json @@ -1,22 +1,18 @@ { - "keyboard_name": "bear_face", - "manufacturer": "chemicalwill", - "url": "https://github.com/chemicalwill/bear_face_pcb", - "maintainer": "chemicalwill", - "debounce": 6, + "manufacturer": "will-hedges", + "url": "https://github.com/will-hedges", + "maintainer": "will-hedges", "usb": { "vid": "0xFEED", - "pid": "0x09F5", - "force_nkro": true + "pid": "0x09F5" }, "features": { "backlight": true, - "bootmagic": false, + "bootmagic": true, "command": false, "console": false, "extrakey": true, - "mousekey": false, - "nkro": true + "mousekey": false }, "qmk": { "locking": { @@ -24,16 +20,14 @@ "resync": true } }, - "indicators": { - "caps_lock": "F7" - }, "matrix_pins": { "cols": ["B5", "C7", "C6", "F0", "E6", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"], "rows": ["F5", "F6", "F4", "F1", "B0", "B6"] }, "diode_direction": "COL2ROW", "backlight": { - "driver": "timer", + "as_caps_lock": true, + "driver": "software", "pin": "F7" }, "processor": "atmega32u4", diff --git a/keyboards/bear_face/rules.mk b/keyboards/bear_face/rules.mk deleted file mode 100644 index f11303978e88..000000000000 --- a/keyboards/bear_face/rules.mk +++ /dev/null @@ -1 +0,0 @@ -DEFAULT_FOLDER = bear_face/v1 diff --git a/keyboards/bear_face/v1/keyboard.json b/keyboards/bear_face/v1/keyboard.json index 8dedc0b1c7b7..8c60089bbbbe 100644 --- a/keyboards/bear_face/v1/keyboard.json +++ b/keyboards/bear_face/v1/keyboard.json @@ -1,9 +1,13 @@ { + "keyboard_name": "bear_face v1", "usb": { "device_version": "1.0.0" }, + "backlight": { + "on_state": 0 + }, "layouts": { - "LAYOUT_83_ansi": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, {"matrix": [0, 1], "x": 1.5, "y": 0}, diff --git a/keyboards/bear_face/v1/keymaps/default/keymap.c b/keyboards/bear_face/v1/keymaps/default/keymap.c index fc92c783dbe4..e615a3915d83 100644 --- a/keyboards/bear_face/v1/keymaps/default/keymap.c +++ b/keyboards/bear_face/v1/keymaps/default/keymap.c @@ -1,19 +1,5 @@ -/* -Copyright 2020 chemicalwill - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #include QMK_KEYBOARD_H @@ -28,13 +14,13 @@ enum layers { //custom keycode enums enum custom_keycodes { - BASE_QWER = SAFE_RANGE, + BASE_QWER = QK_USER, BASE_COLE, BASE_DVOR }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWER] = LAYOUT_83_ansi( + [_QWER] = LAYOUT( 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_NO, KC_DEL, 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_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, @@ -43,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_COLE] = LAYOUT_83_ansi( + [_COLE] = LAYOUT( 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_NO, KC_DEL, 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_HOME, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, @@ -52,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_DVOR] = LAYOUT_83_ansi( + [_DVOR] = LAYOUT( 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_NO, KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_HOME, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGUP, @@ -61,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_FN1] = LAYOUT_83_ansi( + [_FN1] = LAYOUT( _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, BASE_COLE, @@ -71,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* - [_BLANK] = LAYOUT_83_ansi( + [_BLANK] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -82,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -//macros to allow the user to set whatever default layer they want, even after reboot +// macros to allow the user to set whatever default layer they want, even after reboot bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BASE_QWER: diff --git a/keyboards/bear_face/v2/keyboard.json b/keyboards/bear_face/v2/keyboard.json index 908165babb05..456c920066f9 100644 --- a/keyboards/bear_face/v2/keyboard.json +++ b/keyboards/bear_face/v2/keyboard.json @@ -1,8 +1,106 @@ { + "keyboard_name": "bear_face v2", "usb": { - "device_version": "2.0.0" + "device_version": "2.1.0" + }, + "backlight": { + "on_state": 0 }, "layouts": { + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0}, + {"matrix": [0, 14], "x": 14.5, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1, "w": 2}, + {"matrix": [1, 14], "x": 15, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5}, + {"matrix": [2, 14], "x": 15, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3}, + {"matrix": [3, 12], "x": 12.75, "y": 3}, + {"matrix": [3, 13], "x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"matrix": [3, 14], "x": 15, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [4, 10], "x": 10.25, "y": 4}, + {"matrix": [4, 11], "x": 11.25, "y": 4}, + {"matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [5, 9], "x": 10, "y": 5}, + {"matrix": [5, 10], "x": 11, "y": 5}, + {"matrix": [5, 11], "x": 12, "y": 5}, + {"matrix": [5, 12], "x": 13, "y": 5}, + {"matrix": [5, 13], "x": 14, "y": 5}, + {"matrix": [5, 14], "x": 15, "y": 5} + ] + }, "LAYOUT_83_ansi": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, diff --git a/keyboards/bear_face/v2/keymaps/default/keymap.c b/keyboards/bear_face/v2/keymaps/default/keymap.c index 0d536b68f382..08f193052ada 100644 --- a/keyboards/bear_face/v2/keymaps/default/keymap.c +++ b/keyboards/bear_face/v2/keymaps/default/keymap.c @@ -1,19 +1,5 @@ -/* -Copyright 2020 chemicalwill - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #include QMK_KEYBOARD_H @@ -28,7 +14,7 @@ enum layers { //custom keycode enums enum custom_keycodes { - BASE_QWER = SAFE_RANGE, + BASE_QWER = QK_USER, BASE_COLE, BASE_DVOR }; @@ -82,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -//macros to allow the user to set whatever default layer they want, even after reboot +// macros to allow the user to set whatever default layer they want, even after reboot bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BASE_QWER: diff --git a/keyboards/bear_face/v2/keymaps/default/readme.md b/keyboards/bear_face/v2/keymaps/default/readme.md index 5f9e635dfec2..517baa5726c8 100644 --- a/keyboards/bear_face/v2/keymaps/default/readme.md +++ b/keyboards/bear_face/v2/keymaps/default/readme.md @@ -13,3 +13,7 @@ This layout replaces the stock layout on the Vortex Race 3. * 'Reset' will put the keyboard into DFU mode * 'APP' sends 'KC_APP' * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) + +- New things in v2: + * Option of ANSI or ISO layout + * Optional stepped caps (will require compatible plate) diff --git a/keyboards/bear_face/v2/keymaps/default_iso/keymap.c b/keyboards/bear_face/v2/keymaps/default_iso/keymap.c index e9e6c837f4d3..a5e96207f695 100644 --- a/keyboards/bear_face/v2/keymaps/default_iso/keymap.c +++ b/keyboards/bear_face/v2/keymaps/default_iso/keymap.c @@ -1,19 +1,5 @@ -/* -Copyright 2020 chemicalwill - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #include QMK_KEYBOARD_H @@ -28,7 +14,7 @@ enum layers { //custom keycode enums enum custom_keycodes { - BASE_QWER = SAFE_RANGE, + BASE_QWER = QK_USER, BASE_COLE, BASE_DVOR }; @@ -82,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -//macros to allow the user to set whatever default layer they want, even after reboot +//macros to allow the user to set whatever default layer they want, even after reboot bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BASE_QWER: diff --git a/keyboards/bear_face/v3/keymaps/default/keymap.c b/keyboards/bear_face/v3/keymaps/default/keymap.c index 77f161a7104a..f6e71f1b34eb 100644 --- a/keyboards/bear_face/v3/keymaps/default/keymap.c +++ b/keyboards/bear_face/v3/keymaps/default/keymap.c @@ -14,7 +14,7 @@ enum layers { //custom keycode enums enum custom_keycodes { - BASE_QWER = QK_KB_0, + BASE_QWER = QK_USER, BASE_COLE, BASE_DVOR }; diff --git a/keyboards/bear_face/v3/keymaps/default_iso/keymap.c b/keyboards/bear_face/v3/keymaps/default_iso/keymap.c index 73a1155b6a56..cc97d54a9be9 100644 --- a/keyboards/bear_face/v3/keymaps/default_iso/keymap.c +++ b/keyboards/bear_face/v3/keymaps/default_iso/keymap.c @@ -14,7 +14,7 @@ enum layers { //custom keycode enums enum custom_keycodes { - BASE_QWER = SAFE_RANGE, + BASE_QWER = QK_USER, BASE_COLE, BASE_DVOR }; From f5319d891185d4c8099861a303701d312bfca9d1 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 11 Jul 2024 01:17:08 +0100 Subject: [PATCH 0148/1205] Remove DEFAULT_FOLDER from maple_computing/lets_split_eh (#24054) --- data/mappings/keyboard_aliases.hjson | 5 ++++- keyboards/maple_computing/lets_split_eh/{eh => }/config.h | 0 keyboards/maple_computing/lets_split_eh/eh/rules.mk | 2 -- .../maple_computing/lets_split_eh/{eh => }/keyboard.json | 3 ++- .../lets_split_eh/{eh/eh.c => lets_split_eh.c} | 0 keyboards/maple_computing/lets_split_eh/readme.md | 2 +- keyboards/maple_computing/lets_split_eh/rules.mk | 3 ++- 7 files changed, 9 insertions(+), 6 deletions(-) rename keyboards/maple_computing/lets_split_eh/{eh => }/config.h (100%) delete mode 100644 keyboards/maple_computing/lets_split_eh/eh/rules.mk rename keyboards/maple_computing/lets_split_eh/{eh => }/keyboard.json (98%) rename keyboards/maple_computing/lets_split_eh/{eh/eh.c => lets_split_eh.c} (100%) diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index 57585aae9235..14eec52e3134 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -1060,7 +1060,7 @@ "target": "lyso1/lefishe" }, "lets_split_eh/eh": { - "target": "maple_computing/lets_split_eh/eh" + "target": "maple_computing/lets_split_eh" }, "ls_60": { "target": "weirdo/ls_60" @@ -1080,6 +1080,9 @@ "macro1": { "target": "laneware/macro1" }, + "maple_computing/lets_split_eh/eh": { + "target": "maple_computing/lets_split_eh" + }, "massdrop/thekey": { "target": "drop/thekey/v1" }, diff --git a/keyboards/maple_computing/lets_split_eh/eh/config.h b/keyboards/maple_computing/lets_split_eh/config.h similarity index 100% rename from keyboards/maple_computing/lets_split_eh/eh/config.h rename to keyboards/maple_computing/lets_split_eh/config.h diff --git a/keyboards/maple_computing/lets_split_eh/eh/rules.mk b/keyboards/maple_computing/lets_split_eh/eh/rules.mk deleted file mode 100644 index 271780b75ecd..000000000000 --- a/keyboards/maple_computing/lets_split_eh/eh/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -# Disable unsupported hardware -AUDIO_SUPPORTED = no diff --git a/keyboards/maple_computing/lets_split_eh/eh/keyboard.json b/keyboards/maple_computing/lets_split_eh/keyboard.json similarity index 98% rename from keyboards/maple_computing/lets_split_eh/eh/keyboard.json rename to keyboards/maple_computing/lets_split_eh/keyboard.json index f40b15098f51..62d489d60c47 100644 --- a/keyboards/maple_computing/lets_split_eh/eh/keyboard.json +++ b/keyboards/maple_computing/lets_split_eh/keyboard.json @@ -19,6 +19,7 @@ "rgblight": { "led_count": 12, "split_count": [6, 6], + "sleep": true, "animations": { "breathing": true, "rainbow_mood": true, @@ -42,7 +43,7 @@ "processor": "atmega32u4", "bootloader": "atmel-dfu", "features": { - "bootmagic": false, + "bootmagic": true, "mousekey": false, "extrakey": true, "nkro": true, diff --git a/keyboards/maple_computing/lets_split_eh/eh/eh.c b/keyboards/maple_computing/lets_split_eh/lets_split_eh.c similarity index 100% rename from keyboards/maple_computing/lets_split_eh/eh/eh.c rename to keyboards/maple_computing/lets_split_eh/lets_split_eh.c diff --git a/keyboards/maple_computing/lets_split_eh/readme.md b/keyboards/maple_computing/lets_split_eh/readme.md index 90ae5393d1c5..dc769b72c444 100644 --- a/keyboards/maple_computing/lets_split_eh/readme.md +++ b/keyboards/maple_computing/lets_split_eh/readme.md @@ -8,6 +8,6 @@ Keyboard Maintainer: [Christopher Poole (That-Canadian)](https://github.com/That Make example for this keyboard (after setting up your build environment): - make maple_computing/lets_split_eh/eh:default + make maple_computing/lets_split_eh:default See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/maple_computing/lets_split_eh/rules.mk b/keyboards/maple_computing/lets_split_eh/rules.mk index 9bae45fde845..271780b75ecd 100644 --- a/keyboards/maple_computing/lets_split_eh/rules.mk +++ b/keyboards/maple_computing/lets_split_eh/rules.mk @@ -1 +1,2 @@ -DEFAULT_FOLDER = maple_computing/lets_split_eh/eh +# Disable unsupported hardware +AUDIO_SUPPORTED = no From efa5b30cfdc0649c18ba5315a11cb3294c928dbd Mon Sep 17 00:00:00 2001 From: era <73109780+eerraa@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:50:09 +0900 Subject: [PATCH 0149/1205] [Keyboard] Add Linx3 FAve65S (#24034) Co-authored-by: Duncan Sutherland --- keyboards/era/linx3/fave65s/config.h | 8 + keyboards/era/linx3/fave65s/fave65s.c | 16 + keyboards/era/linx3/fave65s/keyboard.json | 771 ++++++++++++++++++ .../linx3/fave65s/keymaps/default/keymap.c | 21 + .../era/linx3/fave65s/keymaps/via/keymap.c | 21 + .../era/linx3/fave65s/keymaps/via/rules.mk | 1 + keyboards/era/linx3/fave65s/readme.md | 26 + 7 files changed, 864 insertions(+) create mode 100644 keyboards/era/linx3/fave65s/config.h create mode 100644 keyboards/era/linx3/fave65s/fave65s.c create mode 100644 keyboards/era/linx3/fave65s/keyboard.json create mode 100644 keyboards/era/linx3/fave65s/keymaps/default/keymap.c create mode 100644 keyboards/era/linx3/fave65s/keymaps/via/keymap.c create mode 100644 keyboards/era/linx3/fave65s/keymaps/via/rules.mk create mode 100644 keyboards/era/linx3/fave65s/readme.md diff --git a/keyboards/era/linx3/fave65s/config.h b/keyboards/era/linx3/fave65s/config.h new file mode 100644 index 000000000000..28d7f4f370df --- /dev/null +++ b/keyboards/era/linx3/fave65s/config.h @@ -0,0 +1,8 @@ +// Copyright 2024 Hyojin Bak (@eerraa) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* Reset */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 2000U diff --git a/keyboards/era/linx3/fave65s/fave65s.c b/keyboards/era/linx3/fave65s/fave65s.c new file mode 100644 index 000000000000..751594bc933c --- /dev/null +++ b/keyboards/era/linx3/fave65s/fave65s.c @@ -0,0 +1,16 @@ +// Copyright 2024 Hyojin Bak (@eerraa) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(0, 0, 128, 128); + } else { + rgb_matrix_set_color(0, 0, 0, 0); + } + return true; +} diff --git a/keyboards/era/linx3/fave65s/keyboard.json b/keyboards/era/linx3/fave65s/keyboard.json new file mode 100644 index 000000000000..9bb1e456949a --- /dev/null +++ b/keyboards/era/linx3/fave65s/keyboard.json @@ -0,0 +1,771 @@ +{ + "manufacturer": "eerraa", + "keyboard_name": "FAve65S", + "maintainer": "eerraa", + "bootloader": "rp2040", + "build": { + "debounce_type": "sym_defer_pk" + }, + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["GP28", "GP27", "GP26", "GP0", "GP1", "GP2", "GP3", "GP4", "GP5", "GP6", "GP7", "GP8", "GP9", "GP12", "GP11", "GP10"], + "rows": ["GP25", "GP29", "GP18", "GP23", "GP24"] + }, + "processor": "RP2040", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "dual_beacon": true, + "flower_blooming": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "riverflow": true, + "starlight": true, + "starlight_dual_hue": true, + "starlight_dual_sat": true + }, + "default": { + "animation": "rainbow_moving_chevron" + }, + "driver": "ws2812", + "layout": [ + {"matrix": [2, 0], "x": 10, "y": 39, "flags": 8}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 13, "y": 0, "flags": 2}, + {"x": 26, "y": 0, "flags": 2}, + {"x": 40, "y": 0, "flags": 2}, + {"x": 53, "y": 0, "flags": 2}, + {"x": 66, "y": 0, "flags": 2}, + {"x": 79, "y": 0, "flags": 2}, + {"x": 92, "y": 0, "flags": 2}, + {"x": 105, "y": 0, "flags": 2}, + {"x": 119, "y": 0, "flags": 2}, + {"x": 132, "y": 0, "flags": 2}, + {"x": 145, "y": 0, "flags": 2}, + {"x": 158, "y": 0, "flags": 2}, + {"x": 171, "y": 0, "flags": 2}, + {"x": 184, "y": 0, "flags": 2}, + {"x": 198, "y": 0, "flags": 2}, + {"x": 211, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 13, "flags": 2}, + {"x": 224, "y": 26, "flags": 2}, + {"x": 224, "y": 38, "flags": 2}, + {"x": 224, "y": 51, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 211, "y": 64, "flags": 2}, + {"x": 198, "y": 64, "flags": 2}, + {"x": 184, "y": 64, "flags": 2}, + {"x": 171, "y": 64, "flags": 2}, + {"x": 158, "y": 64, "flags": 2}, + {"x": 145, "y": 64, "flags": 2}, + {"x": 132, "y": 64, "flags": 2}, + {"x": 119, "y": 64, "flags": 2}, + {"x": 105, "y": 64, "flags": 2}, + {"x": 92, "y": 64, "flags": 2}, + {"x": 79, "y": 64, "flags": 2}, + {"x": 66, "y": 64, "flags": 2}, + {"x": 53, "y": 64, "flags": 2}, + {"x": 40, "y": 64, "flags": 2}, + {"x": 26, "y": 64, "flags": 2}, + {"x": 13, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 0, "y": 51, "flags": 2}, + {"x": 0, "y": 38, "flags": 2}, + {"x": 0, "y": 26, "flags": 2}, + {"x": 0, "y": 13, "flags": 2} + ], + "sleep": true + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0011", + "vid": "0x4552" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP19" + }, + "community_layouts": ["65_ansi_blocker", "65_ansi_blocker_split_bs", "65_ansi_blocker_tsangan", "65_ansi_blocker_tsangan_split_bs", "65_iso_blocker", "65_iso_blocker_split_bs", "65_iso_blocker_tsangan", "65_iso_blocker_tsangan_split_bs"], + "layouts": { + "LAYOUT_65_ansi_blocker": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 14], "x": 13, "y": 0, "w": 2}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [2, 15], "x": 15, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"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, 10], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_ansi_blocker_split_bs": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [2, 15], "x": 15, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"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, 10], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_ansi_blocker_tsangan": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 14], "x": 13, "y": 0, "w": 2}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [2, 15], "x": 15, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 5], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_ansi_blocker_tsangan_split_bs": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [2, 15], "x": 15, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 5], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_iso_blocker": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 14], "x": 13, "y": 0, "w": 2}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [2, 15], "x": 15, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"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, 10], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [2, 15], "x": 15, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"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, 10], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_iso_blocker_tsangan": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 14], "x": 13, "y": 0, "w": 2}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [2, 15], "x": 15, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 5], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_iso_blocker_tsangan_split_bs": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [2, 15], "x": 15, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 5], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + }, + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [0, 14], "x": 14, "y": 0}, + {"matrix": [0, 15], "x": 15, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [1, 15], "x": 15, "y": 1}, + {"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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"matrix": [2, 13], "x": 13.75, "y": 2, "w": 1.25}, + {"matrix": [2, 15], "x": 15, "y": 2}, + {"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": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 14], "x": 14, "y": 3}, + {"matrix": [3, 15], "x": 15, "y": 3}, + {"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, 10], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13, "y": 4}, + {"matrix": [4, 14], "x": 14, "y": 4}, + {"matrix": [4, 15], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/era/linx3/fave65s/keymaps/default/keymap.c b/keyboards/era/linx3/fave65s/keymaps/default/keymap.c new file mode 100644 index 000000000000..85eb4fb4ee25 --- /dev/null +++ b/keyboards/era/linx3/fave65s/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +// Copyright 2024 QMK (@qmk) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_BSPC, KC_INS, + 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_DEL, + 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_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_GRV, 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/era/linx3/fave65s/keymaps/via/keymap.c b/keyboards/era/linx3/fave65s/keymaps/via/keymap.c new file mode 100644 index 000000000000..85eb4fb4ee25 --- /dev/null +++ b/keyboards/era/linx3/fave65s/keymaps/via/keymap.c @@ -0,0 +1,21 @@ +// Copyright 2024 QMK (@qmk) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_BSPC, KC_INS, + 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_DEL, + 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_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_GRV, 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/era/linx3/fave65s/keymaps/via/rules.mk b/keyboards/era/linx3/fave65s/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/era/linx3/fave65s/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/era/linx3/fave65s/readme.md b/keyboards/era/linx3/fave65s/readme.md new file mode 100644 index 000000000000..e31b3acef94b --- /dev/null +++ b/keyboards/era/linx3/fave65s/readme.md @@ -0,0 +1,26 @@ +# FAve 65S, Solder Ver + +![head](https://i.imgur.com/4Sc42zO.jpg) +![tail](https://i.imgur.com/hgCPtWg.jpg) + +* Keyboard Maintainer: [ERA](https://github.com/eerraa) +* Hardware supported: LINWORKS +* Hardware availability: [LINWORKS](https://allthatkeyboard.com/) + +Make example for this keyboard (after setting up your build environment): + + make era/linx3/fave65s:default + +Flashing example for this keyboard: + + make era/linx3/fave65s: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at ESC(0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly short the `RESET` and `GND` pads on the SWD header twice, or short the `BOOT` header and plug in keyboard +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available \ No newline at end of file From 494af672ced0f10bf5c60f9d5a8dac68d579640f Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 11 Jul 2024 00:14:49 -0600 Subject: [PATCH 0150/1205] Fixup boardsource/the_q RGB matrix coordinates (#24086) --- keyboards/boardsource/the_q/keyboard.json | 86 +++++++++++------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/keyboards/boardsource/the_q/keyboard.json b/keyboards/boardsource/the_q/keyboard.json index 61ff49330edf..b48b5e080b47 100644 --- a/keyboards/boardsource/the_q/keyboard.json +++ b/keyboards/boardsource/the_q/keyboard.json @@ -40,53 +40,53 @@ "max_brightness": 150, "driver": "ws2812", "layout": [ - {"x": 112.2, "y": 10.6, "flags": 2}, - {"x": 181, "y": 5.3, "flags": 2}, - {"x": 215.4, "y": 53.3, "flags": 2}, - {"x": 112.2, "y": 64, "flags": 2}, - {"x": 26.2, "y": 53.3, "flags": 2}, - {"x": 43.4, "y": 5.3, "flags": 2}, - {"matrix": [0, 1], "x": 17.6, "y": 0, "flags": 4}, - {"matrix": [1, 1], "x": 17.6, "y": 42.7, "flags": 4}, - {"matrix": [2, 1], "x": 17.6, "y": 21.4, "flags": 4}, - {"matrix": [2, 2], "x": 34.8, "y": 21.4, "flags": 4}, - {"matrix": [1, 2], "x": 34.8, "y": 42.7, "flags": 4}, - {"matrix": [0, 2], "x": 34.8, "y": 0, "flags": 4}, + {"x": 112, "y": 10, "flags": 2}, + {"x": 181, "y": 5, "flags": 2}, + {"x": 215, "y": 53, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 26, "y": 53, "flags": 2}, + {"x": 43, "y": 5, "flags": 2}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 42, "flags": 4}, + {"matrix": [2, 1], "x": 17, "y": 21, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 42, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, - {"matrix": [1, 3], "x": 52, "y": 42.7, "flags": 4}, - {"matrix": [2, 3], "x": 52, "y": 21.4, "flags": 4}, - {"matrix": [2, 4], "x": 69.2, "y": 21.4, "flags": 4}, - {"matrix": [1, 4], "x": 69.2, "y": 42.7, "flags": 4}, - {"matrix": [0, 4], "x": 69.2, "y": 0, "flags": 4}, - {"matrix": [0, 5], "x": 86.4, "y": 0, "flags": 4}, - {"matrix": [1, 5], "x": 86.4, "y": 42.7, "flags": 4}, - {"matrix": [2, 5], "x": 86.4, "y": 21.4, "flags": 4}, - {"matrix": [3, 0], "x": 69.2, "y": 20, "flags": 1}, - {"matrix": [3, 1], "x": 86.4, "y": 20, "flags": 1}, - {"matrix": [3, 2], "x": 103.6, "y": 64, "flags": 1}, - {"matrix": [3, 3], "x": 120.8, "y": 64, "flags": 1}, + {"matrix": [1, 3], "x": 52, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 21, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 69, "y": 42, "flags": 4}, + {"matrix": [0, 4], "x": 69, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 86, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 86, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 21, "flags": 4}, + {"matrix": [3, 0], "x": 69, "y": 20, "flags": 1}, + {"matrix": [3, 1], "x": 86, "y": 20, "flags": 1}, + {"matrix": [3, 2], "x": 103, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 120, "y": 64, "flags": 1}, {"matrix": [3, 4], "x": 138, "y": 20, "flags": 1}, - {"matrix": [3, 5], "x": 155.2, "y": 20, "flags": 1}, - {"matrix": [4, 5], "x": 138, "y": 21.4, "flags": 4}, - {"matrix": [5, 5], "x": 138, "y": 42.7, "flags": 4}, + {"matrix": [3, 5], "x": 155, "y": 20, "flags": 1}, + {"matrix": [4, 5], "x": 138, "y": 21, "flags": 4}, + {"matrix": [5, 5], "x": 138, "y": 42, "flags": 4}, {"matrix": [6, 5], "x": 138, "y": 0, "flags": 4}, - {"matrix": [6, 4], "x": 155.2, "y": 0, "flags": 4}, - {"matrix": [5, 4], "x": 155.2, "y": 42.7, "flags": 4}, - {"matrix": [4, 4], "x": 155.2, "y": 21.4, "flags": 4}, - {"matrix": [4, 3], "x": 172.4, "y": 21.4, "flags": 4}, - {"matrix": [5, 3], "x": 172.4, "y": 42.7, "flags": 4}, - {"matrix": [6, 3], "x": 172.4, "y": 0, "flags": 4}, - {"matrix": [6, 2], "x": 189.6, "y": 0, "flags": 4}, - {"matrix": [5, 2], "x": 189.6, "y": 42.7, "flags": 4}, - {"matrix": [4, 2], "x": 189.6, "y": 21.4, "flags": 4}, - {"matrix": [4, 1], "x": 206.8, "y": 21.4, "flags": 4}, - {"matrix": [5, 1], "x": 206.8, "y": 42.7, "flags": 4}, - {"matrix": [6, 1], "x": 206.8, "y": 0, "flags": 4}, + {"matrix": [6, 4], "x": 155, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 155, "y": 42, "flags": 4}, + {"matrix": [4, 4], "x": 155, "y": 21, "flags": 4}, + {"matrix": [4, 3], "x": 172, "y": 21, "flags": 4}, + {"matrix": [5, 3], "x": 172, "y": 42, "flags": 4}, + {"matrix": [6, 3], "x": 172, "y": 0, "flags": 4}, + {"matrix": [6, 2], "x": 189, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 189, "y": 42, "flags": 4}, + {"matrix": [4, 2], "x": 189, "y": 21, "flags": 4}, + {"matrix": [4, 1], "x": 206, "y": 21, "flags": 4}, + {"matrix": [5, 1], "x": 206, "y": 42, "flags": 4}, + {"matrix": [6, 1], "x": 206, "y": 0, "flags": 4}, {"matrix": [6, 0], "x": 224, "y": 0, "flags": 1}, - {"matrix": [5, 0], "x": 224, "y": 42.7, "flags": 1}, - {"matrix": [4, 0], "x": 224, "y": 21.4, "flags": 1}, - {"matrix": [2, 0], "x": 0, "y": 21.4, "flags": 1}, - {"matrix": [1, 0], "x": 0, "y": 42.7, "flags": 1}, + {"matrix": [5, 0], "x": 224, "y": 42, "flags": 1}, + {"matrix": [4, 0], "x": 224, "y": 21, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 42, "flags": 1}, {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1} ] }, From b066c86e432347e8abd52eb0faffc3db26dd4ede Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 11 Jul 2024 11:03:11 +0100 Subject: [PATCH 0151/1205] bad_kb_funcs1 --- keyboards/40percentclub/ut47/ut47.c | 2 ++ keyboards/acheron/athena/alpha/alpha.c | 2 ++ keyboards/acheron/elongate/delta/delta.c | 2 ++ keyboards/clueboard/2x1800/2021/2021.c | 2 ++ keyboards/converter/xmk/xmk.c | 2 ++ keyboards/durgod/k310/k310.c | 2 ++ keyboards/durgod/k320/k320.c | 2 ++ keyboards/evyd13/gud70/gud70.c | 2 ++ keyboards/handwired/aek64/aek64.c | 13 +++++-------- .../battleship_gamepad/battleship_gamepad.c | 2 ++ keyboards/ibm/model_m/mschwingen/mschwingen.c | 2 ++ keyboards/idb/idb_60/idb_60.c | 2 ++ keyboards/kbdfans/phaseone/phaseone.c | 2 ++ keyboards/matrix/falcon/falcon.c | 1 + keyboards/mechlovin/zed1800/zed1800.c | 4 ++++ keyboards/monsgeek/m3/m3.c | 2 ++ keyboards/system76/launch_1/launch_1.c | 6 +++++- .../overnumpad_1xb/overnumpad_1xb.c | 2 ++ .../overnumpad_1xb/overnumpad_1xb.c | 2 ++ keyboards/wilba_tech/wt70_jb/wt70_jb.c | 2 ++ keyboards/yandrstudio/nz64/nz64.c | 4 ++++ keyboards/yandrstudio/nz67v2/nz67v2.c | 4 ++++ 22 files changed, 55 insertions(+), 9 deletions(-) diff --git a/keyboards/40percentclub/ut47/ut47.c b/keyboards/40percentclub/ut47/ut47.c index d5675e1047cd..867d8c020241 100644 --- a/keyboards/40percentclub/ut47/ut47.c +++ b/keyboards/40percentclub/ut47/ut47.c @@ -19,6 +19,8 @@ void matrix_init_kb(void) { uart_init(9600); + + matrix_init_user(); } #endif diff --git a/keyboards/acheron/athena/alpha/alpha.c b/keyboards/acheron/athena/alpha/alpha.c index 8fe47eff8219..4dea24b93d68 100644 --- a/keyboards/acheron/athena/alpha/alpha.c +++ b/keyboards/acheron/athena/alpha/alpha.c @@ -24,6 +24,8 @@ void board_init(void) { void keyboard_post_init_kb(void){ // Defining the backlight pin (A6) as an floating (no pullup or pulldown resistor) opendrain output pin palSetLineMode(BACKLIGHT_PIN, PAL_MODE_ALTERNATE(2) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING); + + keyboard_post_init_user(); } void led_init_ports(void) { diff --git a/keyboards/acheron/elongate/delta/delta.c b/keyboards/acheron/elongate/delta/delta.c index 98b60bae6147..839151521a21 100755 --- a/keyboards/acheron/elongate/delta/delta.c +++ b/keyboards/acheron/elongate/delta/delta.c @@ -74,4 +74,6 @@ layer_state_t layer_state_set_kb(layer_state_t state) { // Since the keyboard starts at layer 0, the init function starts LED4 as lit up. void keyboard_post_init_kb(void){ gpio_write_pin(LED4_PIN, 0); + + keyboard_post_init_user(); } diff --git a/keyboards/clueboard/2x1800/2021/2021.c b/keyboards/clueboard/2x1800/2021/2021.c index 2a3f1304c7ee..e575a7544cb5 100644 --- a/keyboards/clueboard/2x1800/2021/2021.c +++ b/keyboards/clueboard/2x1800/2021/2021.c @@ -90,6 +90,8 @@ void matrix_init_kb(void) { #elif defined(DRAWING_TOY_MODE) max7219_set_led(0, 0, true); #endif + + matrix_init_user(); } __attribute__ ((weak)) diff --git a/keyboards/converter/xmk/xmk.c b/keyboards/converter/xmk/xmk.c index e0df96fc2d2a..8a24e5f9648d 100644 --- a/keyboards/converter/xmk/xmk.c +++ b/keyboards/converter/xmk/xmk.c @@ -10,5 +10,7 @@ void keyboard_post_init_kb(void) { debug_enable=true; debug_matrix=true; debug_keyboard=true; + + keyboard_post_init_user(); } #endif diff --git a/keyboards/durgod/k310/k310.c b/keyboards/durgod/k310/k310.c index 7879b13f4ea7..c176587ef274 100644 --- a/keyboards/durgod/k310/k310.c +++ b/keyboards/durgod/k310/k310.c @@ -87,4 +87,6 @@ void keyboard_pre_init_kb(void) { bootloader_jump(); } #endif + + keyboard_pre_init_user(); } diff --git a/keyboards/durgod/k320/k320.c b/keyboards/durgod/k320/k320.c index 0a544fe31892..50b87d7241b6 100644 --- a/keyboards/durgod/k320/k320.c +++ b/keyboards/durgod/k320/k320.c @@ -87,4 +87,6 @@ void keyboard_pre_init_kb(void) { bootloader_jump(); } #endif + + keyboard_pre_init_user(); } diff --git a/keyboards/evyd13/gud70/gud70.c b/keyboards/evyd13/gud70/gud70.c index 5c400455211c..118c68e56676 100644 --- a/keyboards/evyd13/gud70/gud70.c +++ b/keyboards/evyd13/gud70/gud70.c @@ -19,4 +19,6 @@ void keyboard_pre_init_kb(void) { // Enable top LED gpio_set_pin_output(B3); gpio_write_pin_low(B3); + + keyboard_pre_init_user(); } diff --git a/keyboards/handwired/aek64/aek64.c b/keyboards/handwired/aek64/aek64.c index 130d014616c7..21589b6910b7 100644 --- a/keyboards/handwired/aek64/aek64.c +++ b/keyboards/handwired/aek64/aek64.c @@ -16,21 +16,18 @@ along with this program. If not, see . */ #include "quantum.h" -/* - * Hardware function pre initialisation. - * See https://docs.qmk.fm/#/custom_quantum_functions?id=example-keyboard_pre_init_user-implementation - */ -void keyboard_pre_init_user(void) { - // Call the keyboard pre init code. - +void keyboard_pre_init_kb(void) { // Set our LED pins as output gpio_set_pin_output(C3); + + keyboard_pre_init_user(); } void matrix_init_kb(void) { - // Flash the led 1 sec on startup. gpio_write_pin_high(C3); wait_ms(1000); gpio_write_pin_low(C3); + + matrix_init_user(); } diff --git a/keyboards/handwired/battleship_gamepad/battleship_gamepad.c b/keyboards/handwired/battleship_gamepad/battleship_gamepad.c index 7b5e65a9907a..6bfcb17fd43b 100644 --- a/keyboards/handwired/battleship_gamepad/battleship_gamepad.c +++ b/keyboards/handwired/battleship_gamepad/battleship_gamepad.c @@ -19,4 +19,6 @@ /* joystick button code (thumbstick pressed) */ void keyboard_pre_init_kb(void) { gpio_set_pin_input_high(F6); + + keyboard_pre_init_user(); } diff --git a/keyboards/ibm/model_m/mschwingen/mschwingen.c b/keyboards/ibm/model_m/mschwingen/mschwingen.c index 7112ab63a577..11407d120622 100644 --- a/keyboards/ibm/model_m/mschwingen/mschwingen.c +++ b/keyboards/ibm/model_m/mschwingen/mschwingen.c @@ -114,6 +114,8 @@ void keyboard_pre_init_kb(void) { gpio_set_pin_output(SR_CLK_PIN); gpio_set_pin_output(SR_DOUT_PIN); // MOSI - unused gpio_write_pin_low(SR_CLK_PIN); + + keyboard_pre_init_user(); } #ifdef KEYBOARD_ibm_model_m_mschwingen_led_ws2812 diff --git a/keyboards/idb/idb_60/idb_60.c b/keyboards/idb/idb_60/idb_60.c index 77485a427341..183892f3632e 100644 --- a/keyboards/idb/idb_60/idb_60.c +++ b/keyboards/idb/idb_60/idb_60.c @@ -3,6 +3,8 @@ void keyboard_pre_init_kb(void) { gpio_set_pin_output(C4); gpio_set_pin_output(C5); + + keyboard_pre_init_user(); } inline void _idb_60_caps_led_on(void) { diff --git a/keyboards/kbdfans/phaseone/phaseone.c b/keyboards/kbdfans/phaseone/phaseone.c index a44e50110901..97cc7d2d2ac1 100644 --- a/keyboards/kbdfans/phaseone/phaseone.c +++ b/keyboards/kbdfans/phaseone/phaseone.c @@ -18,4 +18,6 @@ void keyboard_pre_init_kb(void) { gpio_set_pin_output(D4); + + keyboard_pre_init_user(); } diff --git a/keyboards/matrix/falcon/falcon.c b/keyboards/matrix/falcon/falcon.c index 74677ab0d1f0..bfc878a79c74 100644 --- a/keyboards/matrix/falcon/falcon.c +++ b/keyboards/matrix/falcon/falcon.c @@ -25,4 +25,5 @@ void matrix_init_kb(void) gpio_set_pin_output(LED_POWER_PIN); gpio_write_pin_high(LED_POWER_PIN); + matrix_init_user(); } diff --git a/keyboards/mechlovin/zed1800/zed1800.c b/keyboards/mechlovin/zed1800/zed1800.c index e86b4d5a5a89..a7b526b7a6f5 100644 --- a/keyboards/mechlovin/zed1800/zed1800.c +++ b/keyboards/mechlovin/zed1800/zed1800.c @@ -27,9 +27,13 @@ RGBLIGHT_LAYERS_LIST( my_numlock_layer, my_scroll_layer ); + void keyboard_post_init_kb(void) { rgblight_layers = my_rgb_layers; + + keyboard_post_init_user(); } + // Activate rgb layer for caps when capslock is enabled bool led_update_kb(led_t led_state) { rgblight_set_layer_state(0, led_state.caps_lock); diff --git a/keyboards/monsgeek/m3/m3.c b/keyboards/monsgeek/m3/m3.c index 04a9f0ca96f0..1752ddc3b3a2 100644 --- a/keyboards/monsgeek/m3/m3.c +++ b/keyboards/monsgeek/m3/m3.c @@ -140,6 +140,8 @@ void matrix_init_kb(void) { gpio_write_pin_low(LED_MAC_OS_PIN); gpio_set_pin_output(LED_WIN_LOCK_PIN); // LED3 Win Lock gpio_write_pin_low(LED_WIN_LOCK_PIN); + + matrix_init_user(); } void housekeeping_task_kb(void){ diff --git a/keyboards/system76/launch_1/launch_1.c b/keyboards/system76/launch_1/launch_1.c index 7a5000d9baaf..630305194eaf 100644 --- a/keyboards/system76/launch_1/launch_1.c +++ b/keyboards/system76/launch_1/launch_1.c @@ -139,6 +139,8 @@ void matrix_init_kb(void) { } system76_ec_rgb_layer(layer_state); + + matrix_init_user(); } void matrix_scan_kb(void) { @@ -238,9 +240,11 @@ layer_state_t layer_state_set_kb(layer_state_t layer_state) { } #ifdef CONSOLE_ENABLE -void keyboard_post_init_user(void) { +void keyboard_post_init_kb(void) { debug_enable = true; debug_matrix = false; debug_keyboard = false; + + keyboard_post_init_user(); } #endif // CONSOLE_ENABLE diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c index f441285c9ad5..488ace3f91db 100644 --- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c @@ -23,6 +23,8 @@ void keyboard_post_init_kb(void) gpio_set_pin_output(C11); // middle led, always off on Spacesaver M gpio_write_pin(C11, 0); gpio_set_pin_output(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer + + keyboard_post_init_user(); } diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c index bad0c76e433a..9f5f592ff6b3 100644 --- a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c @@ -23,6 +23,8 @@ void keyboard_post_init_kb(void) gpio_set_pin_output(C11); // middle led, always off on Spacesaver M gpio_write_pin(C11, 0); gpio_set_pin_output(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer + + keyboard_post_init_user(); } layer_state_t layer_state_set_kb(layer_state_t state) { diff --git a/keyboards/wilba_tech/wt70_jb/wt70_jb.c b/keyboards/wilba_tech/wt70_jb/wt70_jb.c index ad480ece2277..e4d0efc5e48a 100644 --- a/keyboards/wilba_tech/wt70_jb/wt70_jb.c +++ b/keyboards/wilba_tech/wt70_jb/wt70_jb.c @@ -42,6 +42,8 @@ void keyboard_post_init_kb(void) { if ( g_first_execution ) { rgblight_mode(RGBLIGHT_MODE_RGB_TEST); } + + keyboard_post_init_user(); } #endif // VIA_ENABLE diff --git a/keyboards/yandrstudio/nz64/nz64.c b/keyboards/yandrstudio/nz64/nz64.c index b5a53273dfcf..66ba9fb6ee0c 100644 --- a/keyboards/yandrstudio/nz64/nz64.c +++ b/keyboards/yandrstudio/nz64/nz64.c @@ -84,10 +84,14 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { void eeconfig_init_kb(void) { kb_cums.raw = 0; eeconfig_update_kb(kb_cums.raw); + + eeconfig_init_user(); } void keyboard_post_init_kb(void) { kb_cums.underground_rgb_sw = eeconfig_read_kb(); + + keyboard_post_init_user(); } #endif diff --git a/keyboards/yandrstudio/nz67v2/nz67v2.c b/keyboards/yandrstudio/nz67v2/nz67v2.c index 346556c25ed5..c3162dd96118 100644 --- a/keyboards/yandrstudio/nz67v2/nz67v2.c +++ b/keyboards/yandrstudio/nz67v2/nz67v2.c @@ -85,10 +85,14 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { void eeconfig_init_kb(void) { kb_cums.raw = 0; eeconfig_update_kb(kb_cums.raw); + + eeconfig_init_user(); } void keyboard_post_init_kb(void) { kb_cums.underground_rgb_sw = eeconfig_read_kb(); + + keyboard_post_init_user(); } #endif From f8cf58a512d3e85f491b884672353acefab2f7bc Mon Sep 17 00:00:00 2001 From: Dasky <32983009+daskygit@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:10:28 +0100 Subject: [PATCH 0152/1205] Remove a user keymap from crkbd. (#24091) remove personal keymap --- keyboards/crkbd/keymaps/colemak_luna/config.h | 115 ------ keyboards/crkbd/keymaps/colemak_luna/keymap.c | 385 ------------------ .../crkbd/keymaps/colemak_luna/readme.md | 17 - keyboards/crkbd/keymaps/colemak_luna/rules.mk | 7 - 4 files changed, 524 deletions(-) delete mode 100644 keyboards/crkbd/keymaps/colemak_luna/config.h delete mode 100644 keyboards/crkbd/keymaps/colemak_luna/keymap.c delete mode 100644 keyboards/crkbd/keymaps/colemak_luna/readme.md delete mode 100644 keyboards/crkbd/keymaps/colemak_luna/rules.mk diff --git a/keyboards/crkbd/keymaps/colemak_luna/config.h b/keyboards/crkbd/keymaps/colemak_luna/config.h deleted file mode 100644 index 546e01bdba96..000000000000 --- a/keyboards/crkbd/keymaps/colemak_luna/config.h +++ /dev/null @@ -1,115 +0,0 @@ -/* -Copyright 2019 @foostan -Copyright 2023 @asdfire1 - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - #define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - #define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// #define RGBLIGHT_EFFECT_TWINKLE - #define RGBLIGHT_LIMIT_VAL 120 - #define RGBLIGHT_HUE_STEP 10 - #define RGBLIGHT_SAT_STEP 17 - #define RGBLIGHT_VAL_STEP 17 -#endif - -#ifdef RGB_MATRIX_ENABLE -//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses -// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) -// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_MATRIX_SLEEP // turn off effects when suspended -//# define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) -// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. -# define RGB_MATRIX_HUE_STEP 8 -# define RGB_MATRIX_SAT_STEP 8 -# define RGB_MATRIX_VAL_STEP 8 -# define RGB_MATRIX_SPD_STEP 10 - -/* Enable the animations you want/need. You may need to enable only a small number of these because * - * they take up a lot of space. Enable and confirm that you can still successfully compile your firmware. */ -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -# define ENABLE_RGB_MATRIX_ALPHAS_MODS -//# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -//# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -//# define ENABLE_RGB_MATRIX_BREATHING -//# define ENABLE_RGB_MATRIX_BAND_SAT -//# define ENABLE_RGB_MATRIX_BAND_VAL -//# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -//# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -//# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -//# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -//# define ENABLE_RGB_MATRIX_CYCLE_ALL -//# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -//# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -//# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -//# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -//# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -//# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -//# define ENABLE_RGB_MATRIX_DUAL_BEACON -//# define ENABLE_RGB_MATRIX_RAINBOW_BEACON -//# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -//# define ENABLE_RGB_MATRIX_RAINDROPS -//# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -//# define ENABLE_RGB_MATRIX_HUE_BREATHING -//# define ENABLE_RGB_MATRIX_HUE_PENDULUM -//# define ENABLE_RGB_MATRIX_HUE_WAVE -//# define ENABLE_RGB_MATRIX_PIXEL_RAIN -//# define ENABLE_RGB_MATRIX_PIXEL_FLOW -//# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -//# define ENABLE_RGB_MATRIX_TYPING_HEATMAP -//# define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE -//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -//# define ENABLE_RGB_MATRIX_SPLASH -//# define ENABLE_RGB_MATRIX_MULTISPLASH -//# define ENABLE_RGB_MATRIX_SOLID_SPLASH -//# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif -#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" -#define SPLIT_LAYER_STATE_ENABLE -#define SPLIT_WPM_ENABLE //Enable WPM across split keyboards (+268). -#define NO_ACTION_ONESHOT -//#define SPLIT_OLED_ENABLE - -#define DYNAMIC_KEYMAP_LAYER_COUNT 6 \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/colemak_luna/keymap.c b/keyboards/crkbd/keymaps/colemak_luna/keymap.c deleted file mode 100644 index 39cfd1ca2565..000000000000 --- a/keyboards/crkbd/keymaps/colemak_luna/keymap.c +++ /dev/null @@ -1,385 +0,0 @@ -/* -Copyright 2019 @foostan -Copyright 2021 @HellSingCoder -Copyright 2023 @asdfire1 - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H -//#include - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - //COLEMAK - [0] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, MO(3), KC_SPC, KC_ENT, MO(4), KC_RALT - //`--------------------------' `--------------------------' - - ), - //GAME1 - [1] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LALT, MO(2), KC_SPC, KC_ENT, MO(4), KC_RALT - //`--------------------------' `--------------------------' - ), - //GAME2 - [2] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_F1, KC_F2, XXXXXXX, XXXXXXX, KC_6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F13, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F13, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_ENT, MO(5), KC_RALT - //`--------------------------' `--------------------------' - ), - //LOWER - [3] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, KC_MPRV, XXXXXXX, KC_MINS, KC_P7, KC_P8, KC_P9, KC_DEL, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, KC_MPLY, XXXXXXX, KC_PLUS, KC_P4, KC_P5, KC_P6, XXXXXXX, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MNXT, XXXXXXX, KC_EQL, KC_P1, KC_P2, KC_P3, KC_F13, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_SPC, MO(5), KC_P0 - //`--------------------------' `--------------------------' - ), - //RAISE - [4] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_CAPS, KC_CIRC, KC_AMPR, KC_LCBR, KC_LBRC, KC_LPRN, KC_RPRN, KC_RBRC, KC_RCBR, XXXXXXX, KC_END, KC_PGDN, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_ASTR, KC_UNDS, KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, MO(5), KC_BSPC, _______, _______, KC_LALT - //`--------------------------' `--------------------------' - ), - //ADJUST - [5] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - QK_BOOT, TG(1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, _______, _______, _______, KC_LALT - //`--------------------------' `--------------------------' - ) -}; -// clang-format on - -#ifdef OLED_ENABLE - - -/* 32 * 32 logo */ -static void render_logo(void) { - static const char PROGMEM hexagram_logo[] = { - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x70, 0x18, 0x06, - 0x06, 0x18, 0x70, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x07, 0x1f, 0x32, 0x66, 0xc4, 0x6c, 0x38, 0x1e, 0x37, 0x61, 0xc0, 0x80, 0x80, - 0x80, 0x80, 0xc0, 0x61, 0x37, 0x1e, 0x38, 0x6c, 0xc4, 0x66, 0x32, 0x1f, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xe0, 0xf8, 0x4c, 0x66, 0x23, 0x36, 0x1c, 0x78, 0xec, 0x86, 0x03, 0x01, 0x01, - 0x01, 0x01, 0x03, 0x86, 0xec, 0x78, 0x1c, 0x36, 0x23, 0x66, 0x4c, 0xf8, 0xe0, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x0e, 0x18, 0x60, - 0x60, 0x18, 0x0e, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 -}; - oled_write_raw_P(hexagram_logo, sizeof(hexagram_logo)); -} - - - -/* KEYBOARD PET START */ - -/* settings */ -# define MIN_WALK_SPEED 10 -# define MIN_RUN_SPEED 40 - -/* advanced settings */ -# define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms -# define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 - -/* timers */ -uint32_t anim_timer = 0; -uint32_t anim_sleep = 0; - -/* current frame */ -uint8_t current_frame = 0; - -/* status variables */ -int current_wpm = 0; -led_t led_usb_state; - -bool isSneaking = false; -bool isJumping = false; -bool showedJump = true; -bool isBarking = false; - -/* logic */ -static void render_luna(int LUNA_X, int LUNA_Y) { - /* Sit */ - static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, - - /* 'sit2', 32x22px */ - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; - - /* Walk */ - static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, - - /* 'walk2', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }}; - - /* Run */ - static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, - }, - - /* 'run2', 32x22px */ - { - 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }}; - - /* Bark */ - static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */ - { - 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, - - /* 'bark2', 32x22px */ - { - 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }}; - - /* Sneak */ - static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, - }, - - /* 'sneak2', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - }}; - - /* animation */ - void animate_luna(void) { - /* jump */ - if (isJumping || !showedJump) { - /* clear */ - oled_set_cursor(LUNA_X, LUNA_Y + 2); - oled_write(" ", false); - - oled_set_cursor(LUNA_X, LUNA_Y - 1); - - showedJump = true; - } else { - /* clear */ - oled_set_cursor(LUNA_X, LUNA_Y - 1); - oled_write(" ", false); - - oled_set_cursor(LUNA_X, LUNA_Y); - } - - /* switch frame */ - current_frame = (current_frame + 1) % 2; - - /* current status */ - if (led_usb_state.caps_lock) { - oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE); - - } else if (isSneaking) { - oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE); - - } else if (current_wpm <= MIN_WALK_SPEED) { - oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE); - - } else if (current_wpm <= MIN_RUN_SPEED) { - oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE); - - } else { - oled_write_raw_P(run[abs(1 - current_frame)], ANIM_SIZE); - } - } - - /* animation timer */ - if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { - anim_timer = timer_read32(); - animate_luna(); - } - - /* this fixes the screen on and off bug */ - if (current_wpm > 0) { - oled_on(); - anim_sleep = timer_read32(); - } else if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { - /* clear */ - oled_set_cursor(0,0); - oled_write(" ", false); - oled_off(); - oled_set_cursor(LUNA_X,LUNA_Y); - } -} - -/* KEYBOARD PET END */ - -static void print_logo_narrow(void) { - render_logo(); -if (current_wpm > 0) { - anim_sleep = timer_read32(); - /* wpm counter */ - oled_set_cursor(0, 14); - oled_write(get_u8_str(get_current_wpm(), '0'), false); - - oled_set_cursor(0, 15); - oled_write(" wpm", false); - - /* this fixes the screen on and off bug */ - - } else if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { - /* clear */ - oled_set_cursor(0,0); - oled_write(" ", false); - oled_off(); - - - } -} - -layer_state_t layer_state_set_user(layer_state_t state) { - switch (get_highest_layer(state)) { - case 0: - rgb_matrix_reload_from_eeprom(); - break; - case 1: - rgb_matrix_mode_noeeprom(RGB_MATRIX_ALPHAS_MODS); - rgb_matrix_sethsv_noeeprom(HSV_TEAL); - break; - case 2: - rgb_matrix_mode_noeeprom(RGB_MATRIX_ALPHAS_MODS); - rgb_matrix_sethsv_noeeprom(HSV_PURPLE); - break; - case 5: - rgb_matrix_mode_noeeprom(RGB_MATRIX_ALPHAS_MODS); - rgb_matrix_sethsv_noeeprom(HSV_YELLOW); - break; - } - return state; -} - -static void print_status_narrow(void) { - - - /* Print current layer */ - oled_write("LAYER", false); - - oled_set_cursor(0, 6); - - switch (get_highest_layer(layer_state)) { - case 0: - oled_write("Base ", false); - break; - case 1: - oled_write("Game ", false); - break; - case 2: - oled_write("Game2", false); - break; - case 3: - oled_write("Lower", false); - break; - case 4: - oled_write("Raise", false); - break; - case 5: - oled_write("Adj ", false); - break; - default: - oled_write("Undef", false); - } - - - /* KEYBOARD PET RENDER START */ - - render_luna(0, 13); - - /* KEYBOARD PET RENDER END */ -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } - -bool oled_task_user(void) { - /* KEYBOARD PET VARIABLES START */ - - current_wpm = get_current_wpm(); - led_usb_state = host_keyboard_led_state(); - - /* KEYBOARD PET VARIABLES END */ - - if (is_keyboard_master()) { - print_status_narrow(); - } else { - print_logo_narrow(); - } - return false; -} - -#endif - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - /* KEYBOARD PET STATUS START */ - - case KC_LCTL: - isSneaking = record->event.pressed; - break; - case KC_SPC: - isJumping = record->event.pressed; - if (isJumping) { - showedJump = false; - } - break; - case KC_CAPS: - isBarking = record->event.pressed; - break; - - /* KEYBOARD PET STATUS END */ -} - -return true; -} diff --git a/keyboards/crkbd/keymaps/colemak_luna/readme.md b/keyboards/crkbd/keymaps/colemak_luna/readme.md deleted file mode 100644 index 0f729e702ce6..000000000000 --- a/keyboards/crkbd/keymaps/colemak_luna/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# Personal keymap for the CRKBD -My own keymap with some custom OLED features, Colemak base layer and gaming layers. The F13 key on multiple layers can be bound to something, I use it as toggle mute microphone on Discord. -## Layers -- Colemak - Default layer -- Lower - Has numbers and arrows -- Raise - Has symbols -- Game1 - A QWERTY Gaming layer -- Game2 - An alternate lower layer when Game1 is active, has numbers and other keys that may be needed -- Adjust - Has F-keys and settings, allows to set the Game1 as base layer. -## Custom OLED -- Left side: - - Layer indicator - - Keyboard pet Luna from @HellSingCoder -- Right side - - Unicursal hexagram pixel art logo - - WPM counter - diff --git a/keyboards/crkbd/keymaps/colemak_luna/rules.mk b/keyboards/crkbd/keymaps/colemak_luna/rules.mk deleted file mode 100644 index 9ff3128931ae..000000000000 --- a/keyboards/crkbd/keymaps/colemak_luna/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -MOUSEKEY_ENABLE = no # Mouse keys -RGBLIGHT_ENABLE = no -RGB_MATRIX_ENABLE = yes # Enable WS2812 RGB underlight. -VIA_ENABLE = yes # Enable VIA -OLED_ENABLE = yes -LTO_ENABLE = yes -WPM_ENABLE = yes From e3ef5b2d9d3e9d97f86b0da42d1a2e2bd2ae194b Mon Sep 17 00:00:00 2001 From: tarxvf Date: Thu, 11 Jul 2024 08:46:54 -0400 Subject: [PATCH 0153/1205] mntre_v3: fix matrix bottom row (#24077) --- keyboards/mntre_v3/keyboard.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/mntre_v3/keyboard.json b/keyboards/mntre_v3/keyboard.json index d9cee6aede85..e00fe1deb282 100644 --- a/keyboards/mntre_v3/keyboard.json +++ b/keyboards/mntre_v3/keyboard.json @@ -108,12 +108,12 @@ {"matrix": [5, 2], "x": 2.75, "y": 5, "w": 1.5}, {"matrix": [5, 3], "x": 4.25, "y": 5, "w": 1.5}, {"matrix": [5, 4], "x": 5.75, "y": 5,"w": 2}, - {"matrix": [5, 5], "x": 7.75, "y": 5,"w": 1.5}, - {"matrix": [5, 6], "x": 9.25, "y": 5}, - {"matrix": [5, 7], "x": 10.25, "y": 5}, - {"matrix": [5, 8], "x": 11.25, "y": 5}, - {"matrix": [5, 9], "x": 12.25, "y": 5}, - {"matrix": [5, 10], "x": 13.25, "y": 5,"w": 1.25} + {"matrix": [5, 6], "x": 7.75, "y": 5,"w": 1.5}, + {"matrix": [5, 7], "x": 9.25, "y": 5}, + {"matrix": [5, 8], "x": 10.25, "y": 5}, + {"matrix": [5, 9], "x": 11.25, "y": 5}, + {"matrix": [5, 10], "x": 12.25, "y": 5}, + {"matrix": [5, 11], "x": 13.25, "y": 5,"w": 1.25} ] } } From e0809eade5b054035a2bc0d00b1a8e9a02ba0d19 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 11 Jul 2024 13:47:53 +0100 Subject: [PATCH 0154/1205] Various fixes for keyboards not implementing callbacks correctly (#24092) --- keyboards/aeboards/ext65/rev3/rev3.c | 4 +++- keyboards/clueboard/2x1800/2021/2021.c | 2 ++ .../commissions/mini1800/mini1800.c | 18 +++++++++++------- keyboards/exclusive/e6_rgb/e6_rgb.c | 4 ++++ keyboards/handwired/selene/selene.c | 4 +++- keyboards/inett_studio/sqx/hotswap/hotswap.c | 4 ++++ .../inett_studio/sqx/universal/universal.c | 4 ++++ .../mechlovin/adelais/rgb_led/rev2/rev2.c | 4 ++++ keyboards/mechlovin/hannah60rgb/rev2/rev2.c | 4 ++++ keyboards/mechlovin/kay65/kay65.c | 6 +++--- .../zed65/no_backlight/wearhaus66/wearhaus66.c | 5 +++-- keyboards/omnikeyish/omnikeyish.c | 8 ++++++-- keyboards/projectd/75/ansi/ansi.c | 3 +++ keyboards/yandrstudio/nz64/nz64.c | 4 ++++ 14 files changed, 58 insertions(+), 16 deletions(-) diff --git a/keyboards/aeboards/ext65/rev3/rev3.c b/keyboards/aeboards/ext65/rev3/rev3.c index f8fc2ef50231..7b0f2018c2ca 100644 --- a/keyboards/aeboards/ext65/rev3/rev3.c +++ b/keyboards/aeboards/ext65/rev3/rev3.c @@ -19,10 +19,12 @@ // Tested and verified working on EXT65 Rev3 void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } -void keyboard_pre_init_user(void) { +void keyboard_pre_init_kb(void) { // Call the keyboard pre init code. // Set our LED pins as output gpio_set_pin_output(LED_LAYERS_PIN); + + keyboard_pre_init_user(); } layer_state_t layer_state_set_kb(layer_state_t state) { diff --git a/keyboards/clueboard/2x1800/2021/2021.c b/keyboards/clueboard/2x1800/2021/2021.c index e575a7544cb5..5274f76e9c22 100644 --- a/keyboards/clueboard/2x1800/2021/2021.c +++ b/keyboards/clueboard/2x1800/2021/2021.c @@ -26,6 +26,8 @@ void matrix_scan_kb(void) { max7219_message_sign_task(true); led_frame_timer = timer_read(); } + + matrix_scan_user(); } #endif diff --git a/keyboards/enviousdesign/commissions/mini1800/mini1800.c b/keyboards/enviousdesign/commissions/mini1800/mini1800.c index 86757dab8af8..4f4be779ca73 100644 --- a/keyboards/enviousdesign/commissions/mini1800/mini1800.c +++ b/keyboards/enviousdesign/commissions/mini1800/mini1800.c @@ -1,23 +1,27 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ +// SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" -void matrix_init_user(void) { +void matrix_init_kb(void) { gpio_set_pin_output(GP9); //init gpio gpio_write_pin_low(GP9); gpio_set_pin_output(GP11); //init and turn off inverted power led gpio_write_pin_high(GP11); + + matrix_init_user(); } //layer, capslock and numlock -layer_state_t layer_state_set_user(layer_state_t state) { +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { gpio_write_pin(GP9, layer_state_cmp(state, 1)); - return state; + return state; } -bool led_update_user(led_t led_state) { +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { led_state.num_lock = !led_state.num_lock; led_update_ports(led_state); - return false; + } + return res; } - diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c index 19dd96a073dc..9a7856306bb7 100644 --- a/keyboards/exclusive/e6_rgb/e6_rgb.c +++ b/keyboards/exclusive/e6_rgb/e6_rgb.c @@ -168,6 +168,10 @@ led_config_t g_led_config = { { #endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) diff --git a/keyboards/handwired/selene/selene.c b/keyboards/handwired/selene/selene.c index 3d0ef667cf19..49df43314b37 100644 --- a/keyboards/handwired/selene/selene.c +++ b/keyboards/handwired/selene/selene.c @@ -17,6 +17,8 @@ #include "quantum.h" -void keyboard_post_init_user(void) { +void keyboard_post_init_kb(void) { rgblight_setrgb(0xff, 0xff, 0xff); + + keyboard_post_init_user(); } diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c index 079889e72747..c04d7ef02cc5 100644 --- a/keyboards/inett_studio/sqx/hotswap/hotswap.c +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c @@ -165,6 +165,10 @@ bool rgb_matrix_indicators_kb(void) { #endif //RGB_MATRIX_ENABLE bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #if defined(RGB_MATRIX_DISABLE_KEYCODES) diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c index 519df5750558..6c2af3a3b997 100644 --- a/keyboards/inett_studio/sqx/universal/universal.c +++ b/keyboards/inett_studio/sqx/universal/universal.c @@ -169,6 +169,10 @@ bool rgb_matrix_indicators_kb(void) { #endif //RGB_MATRIX_ENABLE bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #if defined(RGB_MATRIX_DISABLE_KEYCODES) diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c index d49d16e85a1a..cc3853cacd1d 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c @@ -131,6 +131,10 @@ bool rgb_matrix_indicators_kb(void) { #endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c index c6943cc35786..3fdc57138014 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c +++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c @@ -223,6 +223,10 @@ layer_state_t layer_state_set_user(layer_state_t state) { #endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #ifdef RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/mechlovin/kay65/kay65.c b/keyboards/mechlovin/kay65/kay65.c index f59f23e13d91..b125cf1f798c 100644 --- a/keyboards/mechlovin/kay65/kay65.c +++ b/keyboards/mechlovin/kay65/kay65.c @@ -17,9 +17,9 @@ along with this program. If not, see . #include "quantum.h" -void keyboard_pre_init_user(void) { - // Call the keyboard pre init code. - +void keyboard_pre_init_kb(void) { // Set our LED pins as output gpio_set_pin_output(D7); + + keyboard_pre_init_user(); } diff --git a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/wearhaus66.c b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/wearhaus66.c index a6942a2cb827..de1c73a0e031 100644 --- a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/wearhaus66.c +++ b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/wearhaus66.c @@ -17,8 +17,9 @@ along with this program. If not, see . #include "quantum.h" -void keyboard_pre_init_user(void) { - // Call the keyboard pre init code. +void keyboard_pre_init_kb(void) { // Set our LED pins as output gpio_set_pin_output(B7); + + keyboard_pre_init_user(); } diff --git a/keyboards/omnikeyish/omnikeyish.c b/keyboards/omnikeyish/omnikeyish.c index 4a8a7fa4d6cf..8e7e316524e9 100644 --- a/keyboards/omnikeyish/omnikeyish.c +++ b/keyboards/omnikeyish/omnikeyish.c @@ -1,10 +1,12 @@ #include "omnikeyish.h" -void keyboard_pre_init_user(void) { +void keyboard_pre_init_kb(void) { dynamic_macro_init(); + + keyboard_pre_init_user(); } -void keyboard_post_init_user(void) { +void keyboard_post_init_kb(void) { /* Customise these values to desired behaviour */ //debug_enable = true; //debug_matrix=true; @@ -19,6 +21,8 @@ void keyboard_post_init_user(void) { /* Send numlock keycode to attempt to force numlock back on. */ register_code(KC_NUM_LOCK); unregister_code(KC_NUM_LOCK); + + keyboard_post_init_user(); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/projectd/75/ansi/ansi.c b/keyboards/projectd/75/ansi/ansi.c index 8257cf39c26a..3bb695b55907 100644 --- a/keyboards/projectd/75/ansi/ansi.c +++ b/keyboards/projectd/75/ansi/ansi.c @@ -162,6 +162,9 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } switch (keycode) { diff --git a/keyboards/yandrstudio/nz64/nz64.c b/keyboards/yandrstudio/nz64/nz64.c index 66ba9fb6ee0c..928b0b5114f5 100644 --- a/keyboards/yandrstudio/nz64/nz64.c +++ b/keyboards/yandrstudio/nz64/nz64.c @@ -97,6 +97,10 @@ void keyboard_post_init_kb(void) { #endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch(keycode) { #ifdef RGB_MATRIX_ENABLE case URGB_K: From 3d10171e2ced2923568d197a5a5f53d8d9355243 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 11 Jul 2024 22:49:45 +1000 Subject: [PATCH 0155/1205] `mt/mt84`: move RGB Matrix config to data driven (#24090) --- keyboards/mt/mt84/config.h | 2 - keyboards/mt/mt84/keyboard.json | 91 +++++++++++++++++++++++++++++++++ keyboards/mt/mt84/mt84.c | 23 --------- 3 files changed, 91 insertions(+), 25 deletions(-) diff --git a/keyboards/mt/mt84/config.h b/keyboards/mt/mt84/config.h index 9b115d527d5d..e2b30400a93e 100644 --- a/keyboards/mt/mt84/config.h +++ b/keyboards/mt/mt84/config.h @@ -18,8 +18,6 @@ #define IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND #define IS31FL3737_I2C_ADDRESS_2 IS31FL3737_I2C_ADDRESS_VCC -#define RGB_MATRIX_LED_COUNT 84 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/mt/mt84/keyboard.json b/keyboards/mt/mt84/keyboard.json index 8833f77ed98f..fd03c2cf71fd 100644 --- a/keyboards/mt/mt84/keyboard.json +++ b/keyboards/mt/mt84/keyboard.json @@ -57,6 +57,97 @@ "animation": "cycle_all" }, "driver": "is31fl3737", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 134, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 149, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 164, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 179, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 194, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 209, "y": 0, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 0, "y": 13, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 30, "y": 13, "flags": 4}, + {"matrix": [1, 3], "x": 45, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 60, "y": 13, "flags": 4}, + {"matrix": [1, 5], "x": 75, "y": 13, "flags": 4}, + {"matrix": [1, 6], "x": 90, "y": 13, "flags": 4}, + {"matrix": [1, 7], "x": 105, "y": 13, "flags": 4}, + {"matrix": [1, 8], "x": 119, "y": 13, "flags": 4}, + {"matrix": [1, 9], "x": 134, "y": 13, "flags": 4}, + {"matrix": [1, 10], "x": 149, "y": 13, "flags": 4}, + {"matrix": [1, 11], "x": 164, "y": 13, "flags": 4}, + {"matrix": [1, 12], "x": 179, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 202, "y": 13, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 13, "flags": 1}, + + {"matrix": [2, 0], "x": 4, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 22, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 67, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 82, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 97, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 142, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 157, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 172, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 187, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 205, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 26, "flags": 1}, + + {"matrix": [3, 0], "x": 6, "y": 38, "flags": 1}, + {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 41, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 71, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 86, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 101, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 116, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 131, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 146, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 161, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 175, "y": 38, "flags": 4}, + {"matrix": [3, 12], "x": 200, "y": 38, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1}, + + {"matrix": [4, 0], "x": 9, "y": 51, "flags": 1}, + {"matrix": [4, 1], "x": 34, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 49, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 63, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 78, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 93, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 108, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 123, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 138, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 153, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 168, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 189, "y": 51, "flags": 4}, + {"matrix": [4, 12], "x": 209, "y": 51, "flags": 4}, + {"matrix": [4, 13], "x": 224, "y": 51, "flags": 1}, + + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 39, "y": 64, "flags": 1}, + {"matrix": [5, 5], "x": 95, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 149, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 179, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 194, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 209, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 224, "y": 64, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 20, "max_brightness": 200 diff --git a/keyboards/mt/mt84/mt84.c b/keyboards/mt/mt84/mt84.c index 276c92fc065b..1ac61e87c02d 100644 --- a/keyboards/mt/mt84/mt84.c +++ b/keyboards/mt/mt84/mt84.c @@ -114,27 +114,4 @@ const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = { {1, SW4_CS10, SW5_CS10, SW6_CS10}, {1, SW7_CS10, SW8_CS10, SW9_CS10} }; - -led_config_t g_led_config = {{ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 }, - { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 }, - { 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 }, - {74, 75, 76, 77, 78, 79, 80, 81, 82, 83 } -}, { - { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 195, 0 }, { 210, 0 }, { 224, 0 }, - { 0, 13 }, { 15, 13 }, { 30, 13 }, { 45, 13 }, { 60, 13 }, { 75, 13 }, { 90, 13 }, { 105, 13 }, { 120, 13 }, { 135, 13 }, { 150, 13 }, { 165, 13 }, { 180, 13 }, { 205, 13 }, { 224, 13 }, - { 3, 26 }, { 18, 26 }, { 33, 26 }, { 48, 26 }, { 63, 26 }, { 78, 26 }, { 93, 26 }, { 108, 26 }, { 123, 26 }, { 138, 26 }, { 153, 26 }, { 168, 26 }, { 183, 26 }, { 205, 26 },{ 224, 26 }, - { 6, 39 }, { 20, 39 }, { 36, 39 }, { 52, 39 }, { 68, 39 }, { 84, 39 }, { 100, 39 }, { 116, 39 }, { 132, 39 }, { 148, 39 }, { 164, 39 }, { 180, 39 }, { 212, 39 }, { 224, 39 }, - { 9, 52 }, { 27, 52 }, { 43, 52 }, { 59, 52 }, { 75, 52 }, { 91, 52 }, { 107, 52 }, { 123, 52 }, { 139, 52 }, { 155, 52 }, { 171, 52 }, { 187, 52 }, { 212, 52 }, { 224, 52 }, -{ 2, 64 }, { 18, 64 }, { 33, 64 }, { 93, 64 }, { 150, 64 }, { 165, 64 }, { 180, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, -}}; #endif From 9be6d76c61f5b760e7ceaf03fe80da3f07a29d8a Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 11 Jul 2024 22:50:26 +1000 Subject: [PATCH 0156/1205] `mt/mt64rgb`: move RGB Matrix config to data driven (#24089) --- keyboards/mt/mt64rgb/config.h | 2 - keyboards/mt/mt64rgb/keyboard.json | 70 +++++++++++++++++++ keyboards/mt/mt64rgb/keymaps/default/keymap.c | 3 - keyboards/mt/mt64rgb/keymaps/via/keymap.c | 3 - keyboards/mt/mt64rgb/mt64rgb.c | 20 ------ 5 files changed, 70 insertions(+), 28 deletions(-) diff --git a/keyboards/mt/mt64rgb/config.h b/keyboards/mt/mt64rgb/config.h index f69c778b8b64..ad034ceec8d2 100644 --- a/keyboards/mt/mt64rgb/config.h +++ b/keyboards/mt/mt64rgb/config.h @@ -16,5 +16,3 @@ #pragma once #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND - -#define RGB_MATRIX_LED_COUNT 64 diff --git a/keyboards/mt/mt64rgb/keyboard.json b/keyboards/mt/mt64rgb/keyboard.json index 0858e85ecaef..451be59f8f5d 100644 --- a/keyboards/mt/mt64rgb/keyboard.json +++ b/keyboards/mt/mt64rgb/keyboard.json @@ -60,6 +60,76 @@ "solid_multisplash": true }, "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 1}, + + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 214, "y": 32, "flags": 1}, + + {"matrix": [3, 0], "x": 8, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 176, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 20, "max_brightness": 160 diff --git a/keyboards/mt/mt64rgb/keymaps/default/keymap.c b/keyboards/mt/mt64rgb/keymaps/default/keymap.c index 7cff3be34c81..6c0d1a83fd7a 100644 --- a/keyboards/mt/mt64rgb/keymaps/default/keymap.c +++ b/keyboards/mt/mt64rgb/keymaps/default/keymap.c @@ -37,9 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool rgb_matrix_indicators_user(void) { - if (layer_state_is(1)) { - rgb_matrix_set_color(77,0xFF, 0x80, 0x00); - } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } diff --git a/keyboards/mt/mt64rgb/keymaps/via/keymap.c b/keyboards/mt/mt64rgb/keymaps/via/keymap.c index df4884a3a35d..7340b89ebbb6 100644 --- a/keyboards/mt/mt64rgb/keymaps/via/keymap.c +++ b/keyboards/mt/mt64rgb/keymaps/via/keymap.c @@ -34,9 +34,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool rgb_matrix_indicators_user(void) { - if (layer_state_is(1)) { - rgb_matrix_set_color(77,0xFF, 0x80, 0x00); - } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } diff --git a/keyboards/mt/mt64rgb/mt64rgb.c b/keyboards/mt/mt64rgb/mt64rgb.c index bcf26de23132..d08d87de46df 100644 --- a/keyboards/mt/mt64rgb/mt64rgb.c +++ b/keyboards/mt/mt64rgb/mt64rgb.c @@ -93,24 +93,4 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {0, SW10_CS10, SW11_CS10, SW12_CS10}, {0, SW10_CS15, SW11_CS15, SW12_CS15} }; - -led_config_t g_led_config = {{ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, - { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, - { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40}, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 }, - { 55, 56, 57, 58, 59, 60, 61, 62, 63} -}, { - { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 216, 0 }, - { 4, 16 }, { 18, 16 }, { 34, 16 }, { 50, 16 }, { 66, 16 }, { 82, 16 }, { 98, 16 }, { 114, 16 }, { 130, 16 }, { 146, 16 }, { 162, 16 }, { 178, 16 }, { 194, 16 }, { 220, 16 }, - { 6, 32 }, { 20, 32 }, { 36, 32 }, { 52, 32 }, { 68, 32 }, { 84, 32 }, { 100, 32 }, { 116, 32 }, { 132, 32 }, { 148, 32 }, { 164, 32 }, { 180, 32 }, { 212, 32 }, - { 9, 48 }, { 27, 48 }, { 43, 48 }, { 59, 48 }, { 75, 48 }, { 91, 48 }, { 107, 48 }, { 123, 48 }, { 139, 48 }, { 155, 48 }, { 171, 48 }, { 187, 48 }, { 203, 48 }, { 219, 48 }, - { 2, 64 }, { 16, 64 }, { 32, 64 }, { 64, 64 }, { 114, 64 }, { 130, 64 }, { 146, 64 }, { 204, 64 }, { 224, 64 } -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 4, 4, 4, -}}; #endif From 0c4fd514f1146224c8407591a5e42a0db456b536 Mon Sep 17 00:00:00 2001 From: 4pplet Date: Thu, 11 Jul 2024 14:51:43 +0200 Subject: [PATCH 0157/1205] Adding support for IBE60 (#24075) --- keyboards/4pplet/ibe60/keyboard.json | 94 +++++++++++++++++++ .../4pplet/ibe60/keymaps/default/keymap.c | 34 +++++++ keyboards/4pplet/ibe60/keymaps/via/keymap.c | 35 +++++++ keyboards/4pplet/ibe60/keymaps/via/rules.mk | 1 + keyboards/4pplet/ibe60/readme.md | 24 +++++ keyboards/4pplet/ibe60/rules.mk | 2 + 6 files changed, 190 insertions(+) create mode 100644 keyboards/4pplet/ibe60/keyboard.json create mode 100644 keyboards/4pplet/ibe60/keymaps/default/keymap.c create mode 100644 keyboards/4pplet/ibe60/keymaps/via/keymap.c create mode 100644 keyboards/4pplet/ibe60/keymaps/via/rules.mk create mode 100644 keyboards/4pplet/ibe60/readme.md create mode 100644 keyboards/4pplet/ibe60/rules.mk diff --git a/keyboards/4pplet/ibe60/keyboard.json b/keyboards/4pplet/ibe60/keyboard.json new file mode 100644 index 000000000000..dd674c6ab98a --- /dev/null +++ b/keyboards/4pplet/ibe60/keyboard.json @@ -0,0 +1,94 @@ +{ + "manufacturer": "4pplet", + "keyboard_name": "IBE60 Rev A", + "maintainer": "4pplet", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "key_lock": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["B2", "A5", "A4", "A3", "F1", "F0", "C15", "C14", "C13", "B9", "B8", "B7", "A15", "B3"], + "rows": ["B14", "A9", "B6", "B5", "B4"] + }, + "processor": "STM32F072", + "usb": { + "device_version": "0.0.1", + "pid": "0x0001", + "vid": "0x4448" + }, + "indicators": { + "caps_lock": "A8" + }, + "community_layouts": ["60_hhkb"], + "layouts": { + "LAYOUT_60_hhkb": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "!", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "@", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "#", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "$", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "%", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "^", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "&", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "*", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "(", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": ")", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "_", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "|", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "~", "matrix": [2, 13], "x": 14, "y": 0}, + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [3, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [4, 13], "x": 14, "y": 3}, + {"label": "Win", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"label": "Alt", "matrix": [4, 9], "x": 11, "y": 4, "w": 1.5}, + {"label": "Win", "matrix": [4, 10], "x": 12.5, "y": 4} + ] + } + } +} diff --git a/keyboards/4pplet/ibe60/keymaps/default/keymap.c b/keyboards/4pplet/ibe60/keymaps/default/keymap.c new file mode 100644 index 000000000000..9ec56d480996 --- /dev/null +++ b/keyboards/4pplet/ibe60/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// main layer +[0] = LAYOUT_60_hhkb( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI), +// basic function layer +[1] = LAYOUT_60_hhkb( + QK_BOOT, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; \ No newline at end of file diff --git a/keyboards/4pplet/ibe60/keymaps/via/keymap.c b/keyboards/4pplet/ibe60/keymaps/via/keymap.c new file mode 100644 index 000000000000..710b5ce84978 --- /dev/null +++ b/keyboards/4pplet/ibe60/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// main layer +[0] = LAYOUT_60_hhkb( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI), +// basic function layer +[1] = LAYOUT_60_hhkb( + QK_BOOT, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + diff --git a/keyboards/4pplet/ibe60/keymaps/via/rules.mk b/keyboards/4pplet/ibe60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/4pplet/ibe60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/4pplet/ibe60/readme.md b/keyboards/4pplet/ibe60/readme.md new file mode 100644 index 000000000000..24ed159952df --- /dev/null +++ b/keyboards/4pplet/ibe60/readme.md @@ -0,0 +1,24 @@ +# IBE60 + +PCB mounted 60% PCB for the IBE60 in fixed true HHKB layout + +* Keyboard Maintainer: [Stefan Sundin](https://github.com/4pplet) +* Hardware Supported: IBE60 Solder PCB + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/ibe60:default + +Flashing example for this keyboard: + + make 4pplet/ibe60: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the Escape key and plug in the keyboard +* **Physical reset button**: Short the reset-header (labled BL/RESET) on the back of the PCB for about 2 seconds for the keyboard to enter bootloader +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/4pplet/ibe60/rules.mk b/keyboards/4pplet/ibe60/rules.mk new file mode 100644 index 000000000000..04fe1eba2acd --- /dev/null +++ b/keyboards/4pplet/ibe60/rules.mk @@ -0,0 +1,2 @@ +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF From cc62eb503d8e0b1cb1be869597a5a972ebbca5f6 Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 11 Jul 2024 07:39:45 -0600 Subject: [PATCH 0158/1205] [Keyboard] Add boardsource/sessenta (#23823) --- keyboards/boardsource/sessanta/keyboard.json | 255 ++++++++++++++++++ .../sessanta/keymaps/default/keymap.json | 21 ++ .../sessanta/keymaps/via/keymap.json | 26 ++ keyboards/boardsource/sessanta/readme.md | 27 ++ 4 files changed, 329 insertions(+) create mode 100644 keyboards/boardsource/sessanta/keyboard.json create mode 100644 keyboards/boardsource/sessanta/keymaps/default/keymap.json create mode 100644 keyboards/boardsource/sessanta/keymaps/via/keymap.json create mode 100644 keyboards/boardsource/sessanta/readme.md diff --git a/keyboards/boardsource/sessanta/keyboard.json b/keyboards/boardsource/sessanta/keyboard.json new file mode 100644 index 000000000000..c129e3acf595 --- /dev/null +++ b/keyboards/boardsource/sessanta/keyboard.json @@ -0,0 +1,255 @@ +{ + "manufacturer": "Boardsource", + "keyboard_name": "Sessanta", + "maintainer": "waffle87", + "development_board": "promicro", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2", "B6", "D3"], + "rows": ["D1", "D0", "D4", "C6", "D7", "E6", "B4", "B5"] + }, + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_sat": true, + "band_val": true, + "breathing": true, + "gradient_left_right": true + }, + "driver": "ws2812", + "layout": [ + {"x": 224, "y": 4, "flags": 2}, + {"x": 156, "y": 0, "flags": 2}, + {"x": 82, "y": 0, "flags": 2}, + {"x": 13, "y": 4, "flags": 2}, + {"x": 24, "y": 50, "flags": 2}, + {"x": 68, "y": 52, "flags": 2}, + {"x": 121, "y": 52, "flags": 2}, + {"x": 220, "y": 52, "flags": 2}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 134, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 149, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 164, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 179, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 202, "y": 0, "flags": 1}, + {"matrix": [1, 5], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 6], "x": 22, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 37, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 52, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 67, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 82, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 97, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 112, "y": 16, "flags": 4}, + {"matrix": [2, 4], "x": 127, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 142, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 157, "y": 16, "flags": 4}, + {"matrix": [2, 7], "x": 172, "y": 16, "flags": 4}, + {"matrix": [2, 8], "x": 187, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 205, "y": 16, "flags": 1}, + {"matrix": [3, 1], "x": 6, "y": 32, "flags": 1}, + {"matrix": [3, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [3, 3], "x": 41, "y": 32, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 32, "flags": 4}, + {"matrix": [3, 5], "x": 71, "y": 32, "flags": 4}, + {"matrix": [3, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 32, "flags": 4}, + {"matrix": [3, 8], "x": 116, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 131, "y": 32, "flags": 4}, + {"matrix": [4, 1], "x": 146, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 161, "y": 32, "flags": 4}, + {"matrix": [4, 3], "x": 175, "y": 32, "flags": 4}, + {"matrix": [4, 4], "x": 200, "y": 32, "flags": 1}, + {"matrix": [4, 5], "x": 224, "y": 32, "flags": 1}, + {"matrix": [4, 6], "x": 9, "y": 48, "flags": 1}, + {"matrix": [4, 7], "x": 34, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 49, "y": 48, "flags": 4}, + {"matrix": [5, 0], "x": 63, "y": 48, "flags": 4}, + {"matrix": [5, 1], "x": 78, "y": 48, "flags": 4}, + {"matrix": [5, 2], "x": 93, "y": 48, "flags": 4}, + {"matrix": [5, 3], "x": 108, "y": 48, "flags": 4}, + {"matrix": [5, 4], "x": 123, "y": 48, "flags": 4}, + {"matrix": [5, 5], "x": 138, "y": 48, "flags": 4}, + {"matrix": [5, 6], "x": 153, "y": 48, "flags": 4}, + {"matrix": [5, 7], "x": 168, "y": 48, "flags": 4}, + {"matrix": [5, 8], "x": 196, "y": 48, "flags": 1}, + {"matrix": [6, 0], "x": 224, "y": 48, "flags": 1}, + {"matrix": [6, 1], "x": 2, "y": 64, "flags": 1}, + {"matrix": [6, 2], "x": 21, "y": 64, "flags": 1}, + {"matrix": [6, 3], "x": 39, "y": 64, "flags": 1}, + {"matrix": [6, 4], "x": 95, "y": 64, "flags": 4}, + {"matrix": [6, 5], "x": 151, "y": 64, "flags": 1}, + {"matrix": [6, 6], "x": 170, "y": 64, "flags": 1}, + {"matrix": [6, 7], "x": 189, "y": 64, "flags": 1}, + {"matrix": [6, 8], "x": 207, "y": 64, "flags": 1}, + {"matrix": [7, 0], "x": 224, "y": 64, "flags": 1} + ], + "max_brightness": 150, + "sleep": true + }, + "url": "https://boardsource.xyz", + "usb": { + "device_version": "1.0.0", + "pid": "0x17AC", + "vid": "0x4273" + }, + "ws2812": { + "pin": "D2" + }, + "layouts": { + "LAYOUT_625_bar": { + "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": [1, 0], "x": 9, "y": 0}, + {"matrix": [1, 1], "x": 10, "y": 0}, + {"matrix": [1, 2], "x": 11, "y": 0}, + {"matrix": [1, 3], "x": 12, "y": 0}, + {"matrix": [1, 4], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 5], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 6], "x": 1.5, "y": 1}, + {"matrix": [1, 7], "x": 2.5, "y": 1}, + {"matrix": [1, 8], "x": 3.5, "y": 1}, + {"matrix": [2, 0], "x": 4.5, "y": 1}, + {"matrix": [2, 1], "x": 5.5, "y": 1}, + {"matrix": [2, 2], "x": 6.5, "y": 1}, + {"matrix": [2, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [2, 5], "x": 9.5, "y": 1}, + {"matrix": [2, 6], "x": 10.5, "y": 1}, + {"matrix": [2, 7], "x": 11.5, "y": 1}, + {"matrix": [2, 8], "x": 12.5, "y": 1}, + {"matrix": [3, 0], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [3, 1], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [3, 2], "x": 1.75, "y": 2}, + {"matrix": [3, 3], "x": 2.75, "y": 2}, + {"matrix": [3, 4], "x": 3.75, "y": 2}, + {"matrix": [3, 5], "x": 4.75, "y": 2}, + {"matrix": [3, 6], "x": 5.75, "y": 2}, + {"matrix": [3, 7], "x": 6.75, "y": 2}, + {"matrix": [3, 8], "x": 7.75, "y": 2}, + {"matrix": [4, 0], "x": 8.75, "y": 2}, + {"matrix": [4, 1], "x": 9.75, "y": 2}, + {"matrix": [4, 2], "x": 10.75, "y": 2}, + {"matrix": [4, 3], "x": 11.75, "y": 2}, + {"matrix": [4, 4], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [4, 5], "x": 15, "y": 2}, + {"matrix": [4, 6], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [4, 7], "x": 2.25, "y": 3}, + {"matrix": [4, 8], "x": 3.25, "y": 3}, + {"matrix": [5, 0], "x": 4.25, "y": 3}, + {"matrix": [5, 1], "x": 5.25, "y": 3}, + {"matrix": [5, 2], "x": 6.25, "y": 3}, + {"matrix": [5, 3], "x": 7.25, "y": 3}, + {"matrix": [5, 4], "x": 8.25, "y": 3}, + {"matrix": [5, 5], "x": 9.25, "y": 3}, + {"matrix": [5, 6], "x": 10.25, "y": 3}, + {"matrix": [5, 7], "x": 11.25, "y": 3}, + {"matrix": [5, 8], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [6, 0], "x": 15, "y": 3}, + {"matrix": [6, 1], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [6, 2], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [6, 3], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [6, 4], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [6, 5], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [6, 6], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [6, 7], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [6, 8], "x": 13.75, "y": 4, "w": 1.25}, + {"matrix": [7, 0], "x": 15, "y": 4} + ] + }, + "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": [1, 0], "x": 9, "y": 0}, + {"matrix": [1, 1], "x": 10, "y": 0}, + {"matrix": [1, 2], "x": 11, "y": 0}, + {"matrix": [1, 3], "x": 12, "y": 0}, + {"matrix": [1, 4], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 5], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 6], "x": 1.5, "y": 1}, + {"matrix": [1, 7], "x": 2.5, "y": 1}, + {"matrix": [1, 8], "x": 3.5, "y": 1}, + {"matrix": [2, 0], "x": 4.5, "y": 1}, + {"matrix": [2, 1], "x": 5.5, "y": 1}, + {"matrix": [2, 2], "x": 6.5, "y": 1}, + {"matrix": [2, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [2, 5], "x": 9.5, "y": 1}, + {"matrix": [2, 6], "x": 10.5, "y": 1}, + {"matrix": [2, 7], "x": 11.5, "y": 1}, + {"matrix": [2, 8], "x": 12.5, "y": 1}, + {"matrix": [3, 0], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [3, 1], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [3, 2], "x": 1.75, "y": 2}, + {"matrix": [3, 3], "x": 2.75, "y": 2}, + {"matrix": [3, 4], "x": 3.75, "y": 2}, + {"matrix": [3, 5], "x": 4.75, "y": 2}, + {"matrix": [3, 6], "x": 5.75, "y": 2}, + {"matrix": [3, 7], "x": 6.75, "y": 2}, + {"matrix": [3, 8], "x": 7.75, "y": 2}, + {"matrix": [4, 0], "x": 8.75, "y": 2}, + {"matrix": [4, 1], "x": 9.75, "y": 2}, + {"matrix": [4, 2], "x": 10.75, "y": 2}, + {"matrix": [4, 3], "x": 11.75, "y": 2}, + {"matrix": [4, 4], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [4, 5], "x": 15, "y": 2}, + {"matrix": [4, 6], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [4, 7], "x": 2.25, "y": 3}, + {"matrix": [4, 8], "x": 3.25, "y": 3}, + {"matrix": [5, 0], "x": 4.25, "y": 3}, + {"matrix": [5, 1], "x": 5.25, "y": 3}, + {"matrix": [5, 2], "x": 6.25, "y": 3}, + {"matrix": [5, 3], "x": 7.25, "y": 3}, + {"matrix": [5, 4], "x": 8.25, "y": 3}, + {"matrix": [5, 5], "x": 9.25, "y": 3}, + {"matrix": [5, 6], "x": 10.25, "y": 3}, + {"matrix": [5, 7], "x": 11.25, "y": 3}, + {"matrix": [5, 8], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [6, 0], "x": 15, "y": 3}, + {"matrix": [6, 1], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [6, 2], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [6, 3], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [7, 1], "x": 3.75, "y": 4, "w": 1.5}, + {"matrix": [7, 2], "x": 5.25, "y": 4}, + {"matrix": [6, 4], "x": 6.25, "y": 4, "w": 1.25}, + {"matrix": [7, 3], "x": 7.5, "y": 4}, + {"matrix": [7, 4], "x": 8.5, "y": 4, "w": 1.5}, + {"matrix": [6, 5], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [6, 6], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [6, 7], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [6, 8], "x": 13.75, "y": 4, "w": 1.25}, + {"matrix": [7, 0], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/boardsource/sessanta/keymaps/default/keymap.json b/keyboards/boardsource/sessanta/keymaps/default/keymap.json new file mode 100644 index 000000000000..b99333c46d77 --- /dev/null +++ b/keyboards/boardsource/sessanta/keymaps/default/keymap.json @@ -0,0 +1,21 @@ +{ + "keyboard": "boardsource/sessanta", + "keymap": "default", + "layout": "LAYOUT_625_bar", + "layers": [ + [ + "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_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_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_VOLU", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_MPLY", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "MO(1)", "KC_RALT", "KC_RGUI", "KC_RCTL", "KC_VOLD" + ], + [ + "QK_BOOT", "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_F13", + "QK_RBT", "RGB_MOD", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "EE_CLR", "RGB_RMOD", "RGB_VAD", "RGB_HUD", "RGB_SAD", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/boardsource/sessanta/keymaps/via/keymap.json b/keyboards/boardsource/sessanta/keymaps/via/keymap.json new file mode 100644 index 000000000000..68e8e5fb2085 --- /dev/null +++ b/keyboards/boardsource/sessanta/keymaps/via/keymap.json @@ -0,0 +1,26 @@ +{ + "keyboard": "boardsource/sessanta", + "keymap": "via", + "layout": "LAYOUT_all", + "config": { + "features": { + "via": true + } + }, + "layers": [ + [ + "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_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_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_VOLU", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_MPLY", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "MO(1)", "KC_RALT", "KC_RGUI", "KC_RCTL", "KC_VOLD" + ], + [ + "QK_BOOT", "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_F13", + "QK_RBT", "RGB_MOD", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "EE_CLR", "RGB_RMOD", "RGB_VAD", "RGB_HUD", "RGB_SAD", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/boardsource/sessanta/readme.md b/keyboards/boardsource/sessanta/readme.md new file mode 100644 index 000000000000..35c841271c36 --- /dev/null +++ b/keyboards/boardsource/sessanta/readme.md @@ -0,0 +1,27 @@ +# Sessanta + +![image](https://i.imgur.com/ALvvC53.jpeg) + +A 60% keyboard offered in an MX or Choc PCB with per-key RGB + +* Keyboard Maintainer: [waffle87](https://github.com/waffle87) +* Hardware Supported: Sessanta PCB w/ Pro Micro compatible microcontroller +* Hardware Availability: [boardsource.xyz](https://boardsource.xyz) + +Make example for this keyboard (after setting up your build environment): + + make boardsource/sessanta:default + +Flashing example for this keyboard: + + make boardsource/sessanta: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB near microcontroller +* **Keycode in layout**: Press the key mapped to `QK_BOOT` From 2623a258f1cc2a1687ef4529892b8fe6fb9be5f0 Mon Sep 17 00:00:00 2001 From: leyew <102467346+itsme-zeix@users.noreply.github.com> Date: Thu, 11 Jul 2024 21:40:54 +0800 Subject: [PATCH 0159/1205] [Keyboard] Rename dnworks/9973 to dnworks/tkl87 (#23692) --- data/mappings/keyboard_aliases.hjson | 3 +++ keyboards/dnworks/{9973 => tkl87}/config.h | 0 keyboards/dnworks/{9973 => tkl87}/keyboard.json | 2 +- .../{9973 => tkl87}/keymaps/default/keymap.c | 0 .../dnworks/{9973 => tkl87}/keymaps/via/keymap.c | 0 .../dnworks/{9973 => tkl87}/keymaps/via/rules.mk | 0 keyboards/dnworks/{9973 => tkl87}/readme.md | 16 ++++++++-------- 7 files changed, 12 insertions(+), 9 deletions(-) rename keyboards/dnworks/{9973 => tkl87}/config.h (100%) rename keyboards/dnworks/{9973 => tkl87}/keyboard.json (99%) rename keyboards/dnworks/{9973 => tkl87}/keymaps/default/keymap.c (100%) rename keyboards/dnworks/{9973 => tkl87}/keymaps/via/keymap.c (100%) rename keyboards/dnworks/{9973 => tkl87}/keymaps/via/rules.mk (100%) rename keyboards/dnworks/{9973 => tkl87}/readme.md (55%) diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index 14eec52e3134..174704e99acc 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -1528,5 +1528,8 @@ }, "kprepublic/jj50": { "target": "kprepublic/jj50/rev1" + }, + "dnworks/9973": { + "target": "dnworks/tkl87" } } diff --git a/keyboards/dnworks/9973/config.h b/keyboards/dnworks/tkl87/config.h similarity index 100% rename from keyboards/dnworks/9973/config.h rename to keyboards/dnworks/tkl87/config.h diff --git a/keyboards/dnworks/9973/keyboard.json b/keyboards/dnworks/tkl87/keyboard.json similarity index 99% rename from keyboards/dnworks/9973/keyboard.json rename to keyboards/dnworks/tkl87/keyboard.json index 616960602623..6b56435ae3f1 100644 --- a/keyboards/dnworks/9973/keyboard.json +++ b/keyboards/dnworks/tkl87/keyboard.json @@ -1,5 +1,5 @@ { - "keyboard_name": "DN 997.3", + "keyboard_name": "DN TKL F12", "maintainer": "itsme-zeix", "manufacturer": "dnworks", "processor": "RP2040", diff --git a/keyboards/dnworks/9973/keymaps/default/keymap.c b/keyboards/dnworks/tkl87/keymaps/default/keymap.c similarity index 100% rename from keyboards/dnworks/9973/keymaps/default/keymap.c rename to keyboards/dnworks/tkl87/keymaps/default/keymap.c diff --git a/keyboards/dnworks/9973/keymaps/via/keymap.c b/keyboards/dnworks/tkl87/keymaps/via/keymap.c similarity index 100% rename from keyboards/dnworks/9973/keymaps/via/keymap.c rename to keyboards/dnworks/tkl87/keymaps/via/keymap.c diff --git a/keyboards/dnworks/9973/keymaps/via/rules.mk b/keyboards/dnworks/tkl87/keymaps/via/rules.mk similarity index 100% rename from keyboards/dnworks/9973/keymaps/via/rules.mk rename to keyboards/dnworks/tkl87/keymaps/via/rules.mk diff --git a/keyboards/dnworks/9973/readme.md b/keyboards/dnworks/tkl87/readme.md similarity index 55% rename from keyboards/dnworks/9973/readme.md rename to keyboards/dnworks/tkl87/readme.md index 790f236cb776..121cdccddfa8 100644 --- a/keyboards/dnworks/9973/readme.md +++ b/keyboards/dnworks/tkl87/readme.md @@ -1,20 +1,20 @@ -# 997.3 TKL +# dnworks TKL (F12) ![997.3 TKL](https://i.imgur.com/iPPLKg1h.jpeg) -PCB that supports the 997.3 TKL designed by dnworks, including its variants. +PCB that supports the F12 TKLs designed by dnworks. * Keyboard Maintainer: [Zeix](https://github.com/itsme-zeix) -* Hardware Supported: 997.3 Solder PCB rev1 -* Hardware Availability: dnworks.co +* Hardware Supported: 997.3 Solder PCB rev1, 765LT Solder PCB rev1 and Best Friend Solder PCB Rev1. +* Hardware Availability: https://dnworks.co/products Make example for this keyboard (after setting up your build environment): - make dnworks/997pt3:default + make dnworks/tkl87:default Flashing example for this keyboard: - make dnworks/997pt3:default:flash + make dnworks/tkl87: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). @@ -22,6 +22,6 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to Enter the bootloader in 3 ways: -* **Bootmagic reset**: Hold down the top left key and plug in the keyboard -* **Physical reset button**: Briefly press the `RESET` button twice or short the `USB_BOOT` and `GND` pads and plug in the keyboard +* **Bootmagic reset**: Hold down escape and plug in the keyboard +* **Physical reset button**: Short the 'USB_BOOT' button and plug in keyboard or press the 'RESET' button twice with the keyboard plugged in. * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available \ No newline at end of file From 1b8b6801d4f896409a765d302e7e0d50ff089692 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 11 Jul 2024 23:43:26 +1000 Subject: [PATCH 0160/1205] [CI] Add index page generator. (#23737) --- .github/workflows/ci_build_major_branch.yml | 24 +++- .gitignore | 1 + util/ci/index_generator.py | 109 +++++++++++++++ util/ci/requirements.txt | 2 + util/ci/templates/index.html.j2 | 139 ++++++++++++++++++++ 5 files changed, 269 insertions(+), 6 deletions(-) create mode 100755 util/ci/index_generator.py create mode 100644 util/ci/templates/index.html.j2 diff --git a/.github/workflows/ci_build_major_branch.yml b/.github/workflows/ci_build_major_branch.yml index 77755ba71f41..0e772c7d5361 100644 --- a/.github/workflows/ci_build_major_branch.yml +++ b/.github/workflows/ci_build_major_branch.yml @@ -77,44 +77,56 @@ jobs: runs-on: ubuntu-latest steps: + - name: Disable safe.directory check + run: | + git config --global --add safe.directory '*' + + - name: Checkout QMK Firmware + uses: actions/checkout@v4 + - name: Download firmwares uses: actions/download-artifact@v4 with: pattern: firmware-* - path: firmwares + path: . merge-multiple: true + - name: Generate index page + run: | + python3 -m pip install -r ./util/ci/requirements.txt + ./util/ci/index_generator.py > index.html + - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }} uses: jakejarvis/s3-sync-action@master with: - args: --acl public-read --follow-symlinks --delete + args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2' env: AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }} AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }} AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }} - SOURCE_DIR: firmwares + SOURCE_DIR: . DEST_DIR: ${{ inputs.branch || github.ref_name }}/${{ github.sha }} - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest uses: jakejarvis/s3-sync-action@master with: - args: --acl public-read --follow-symlinks --delete + args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2' env: AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }} AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }} AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }} - SOURCE_DIR: firmwares + SOURCE_DIR: . DEST_DIR: ${{ inputs.branch || github.ref_name }}/latest - name: Check if failure marker file exists id: check_failure_marker uses: andstor/file-existence-action@v3 with: - files: firmwares/.failed + files: ./.failed - name: Fail build if needed if: steps.check_failure_marker.outputs.files_exists == 'true' diff --git a/.gitignore b/.gitignore index 35b128606d7d..5de38c161cdd 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ *.la *.stackdump *.sym +index.html # QMK-specific api_data/v1 diff --git a/util/ci/index_generator.py b/util/ci/index_generator.py new file mode 100755 index 000000000000..b6440bbffb71 --- /dev/null +++ b/util/ci/index_generator.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 + +import os +import re +import shlex +import subprocess +from pathlib import Path + +from ansi2html import Ansi2HTMLConverter +from jinja2 import Environment, FileSystemLoader, select_autoescape + +orig_cwd = os.getcwd() +qmk_firmware_dir = Path(os.path.realpath(__file__)).parents[2] +build_dir = qmk_firmware_dir / ".build" + +KEYBOARD_PATTERN = re.compile("CI Metadata: KEYBOARD=(?P.*)\r?\n") +KEYMAP_PATTERN = re.compile("CI Metadata: KEYMAP=(?P.*)\r?\n") + +env = Environment( + loader=FileSystemLoader(Path(os.path.realpath(__file__)).parent / "templates"), + autoescape=select_autoescape(), +) + + +def _run(command, capture_output=True, combined_output=False, text=True, **kwargs): + if isinstance(command, str): + command = shlex.split(command) + if capture_output: + kwargs["stdout"] = subprocess.PIPE + kwargs["stderr"] = subprocess.PIPE + if combined_output: + kwargs["stderr"] = subprocess.STDOUT + if "stdin" in kwargs and kwargs["stdin"] is None: + del kwargs["stdin"] + if text: + kwargs["universal_newlines"] = True + return subprocess.run(command, **kwargs) + + +def _ansi2html(value): + return Ansi2HTMLConverter().convert(value, full=False) + + +def _ansi2html_styles(): + from ansi2html.style import get_styles + + styles = get_styles(scheme="dracula") + return "\n".join([str(s) for s in styles]) + + +def _git_log(count = 4): + os.chdir(qmk_firmware_dir) + ret = _run(f"git log -n {count} --color=always --no-merges --topo-order --stat").stdout.strip() + os.chdir(orig_cwd) + return ret + +def _git_describe(): + os.chdir(qmk_firmware_dir) + ret = _run("git describe --tags --always --dirty").stdout.strip() + os.chdir(orig_cwd) + return ret + +def _git_revision(): + os.chdir(qmk_firmware_dir) + ret = _run("git rev-parse HEAD").stdout.strip() + os.chdir(orig_cwd) + return ret + + +env.filters["ansi2html"] = _ansi2html + +binaries = [] +binaries.extend(qmk_firmware_dir.glob("*.bin")) +binaries.extend(qmk_firmware_dir.glob("*.hex")) +binaries.extend(qmk_firmware_dir.glob("*.uf2")) +binaries = list(sorted(binaries)) + +failures = [] +for mdfile in list(sorted(build_dir.glob("failed.log.*"))): + txt = Path(mdfile).read_text() + + m_kb = KEYBOARD_PATTERN.search(txt) + if not m_kb: + raise Exception("Couldn't determine the keyboard from the failure output") + m_km = KEYMAP_PATTERN.search(txt) + if not m_km: + raise Exception("Couldn't determine the keymap from the failure output") + + txt = KEYBOARD_PATTERN.sub("", KEYMAP_PATTERN.sub("", txt)).strip() + + failures.append( + { + "stdout": txt, + "keyboard": m_kb.group("keyboard"), + "keymap": m_km.group("keymap"), + } + ) + +template = env.get_template("index.html.j2") +print( + template.render( + ansi2html_styles=_ansi2html_styles(), + git_log=_git_log(), + git_describe=_git_describe(), + git_revision=_git_revision(), + binaries=binaries, + failures=failures, + ) +) diff --git a/util/ci/requirements.txt b/util/ci/requirements.txt index 3196568e1a7c..47acf85644f5 100644 --- a/util/ci/requirements.txt +++ b/util/ci/requirements.txt @@ -1 +1,3 @@ discord-webhook +Jinja2 +ansi2html diff --git a/util/ci/templates/index.html.j2 b/util/ci/templates/index.html.j2 new file mode 100644 index 000000000000..18086987db06 --- /dev/null +++ b/util/ci/templates/index.html.j2 @@ -0,0 +1,139 @@ + + + + + + + + + +
+
+
+ +
+
+
+ CI Build {% if failures | length > 0 %}❌{% else %}✅{% endif %} +
+
+ {{ git_describe }} +
+
+ {{ git_revision }} +
+
+ {{ failures | length }} failure{% if failures | length != 1 %}s{% endif %} +
+
+ + {% if binaries | length > 0 %}Firmwares | {% endif %} + Commit info + {% if failures | length > 0 %} | Failure Logs{% endif %} + +
+
+
+ +
+

Git commit

+
+
{{ git_log | ansi2html }}
+
+
+ {% if failures | length > 0 %} + +
+

Build failure logs

+ +
+ {% for failure in failures %} + +
+

Build failure — {{ failure.keyboard }}:{{ failure.keymap }}

+
+
{{ failure.stdout | ansi2html }}
+
+
+ {% endfor %} + {% endif %} +
+ {% if binaries | length > 0 %} +
+ +
+

Firmware downloads

+
+ {% for binary in binaries %} + + {%- endfor %} +
+
+
+ {% endif %} + + + From 2e671cfd8be1a867cb6717732f1045fc026aeba0 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Thu, 11 Jul 2024 23:50:39 +1000 Subject: [PATCH 0161/1205] [CI] Format code according to conventions (#24095) Format code according to conventions --- util/ci/index_generator.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/util/ci/index_generator.py b/util/ci/index_generator.py index b6440bbffb71..f2f7f4d41671 100755 --- a/util/ci/index_generator.py +++ b/util/ci/index_generator.py @@ -48,18 +48,20 @@ def _ansi2html_styles(): return "\n".join([str(s) for s in styles]) -def _git_log(count = 4): +def _git_log(count=4): os.chdir(qmk_firmware_dir) ret = _run(f"git log -n {count} --color=always --no-merges --topo-order --stat").stdout.strip() os.chdir(orig_cwd) return ret + def _git_describe(): os.chdir(qmk_firmware_dir) ret = _run("git describe --tags --always --dirty").stdout.strip() os.chdir(orig_cwd) return ret + def _git_revision(): os.chdir(qmk_firmware_dir) ret = _run("git rev-parse HEAD").stdout.strip() @@ -88,22 +90,18 @@ def _git_revision(): txt = KEYBOARD_PATTERN.sub("", KEYMAP_PATTERN.sub("", txt)).strip() - failures.append( - { - "stdout": txt, - "keyboard": m_kb.group("keyboard"), - "keymap": m_km.group("keymap"), - } - ) + failures.append({ + "stdout": txt, + "keyboard": m_kb.group("keyboard"), + "keymap": m_km.group("keymap"), + }) template = env.get_template("index.html.j2") -print( - template.render( - ansi2html_styles=_ansi2html_styles(), - git_log=_git_log(), - git_describe=_git_describe(), - git_revision=_git_revision(), - binaries=binaries, - failures=failures, - ) -) +print(template.render( + ansi2html_styles=_ansi2html_styles(), + git_log=_git_log(), + git_describe=_git_describe(), + git_revision=_git_revision(), + binaries=binaries, + failures=failures, +)) From 063f1444c68a64a02fe2f5c3de2f8fa765f53533 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 11 Jul 2024 23:48:43 +0100 Subject: [PATCH 0162/1205] Add json index of files to CI uploads (#24097) --- .github/workflows/ci_build_major_branch.yml | 5 ++-- .gitignore | 1 + util/ci/firmware_list_generator.py | 26 +++++++++++++++++++++ util/ci/templates/index.html.j2 | 3 ++- 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 util/ci/firmware_list_generator.py diff --git a/.github/workflows/ci_build_major_branch.yml b/.github/workflows/ci_build_major_branch.yml index 0e772c7d5361..ba5d1c246fe4 100644 --- a/.github/workflows/ci_build_major_branch.yml +++ b/.github/workflows/ci_build_major_branch.yml @@ -95,11 +95,12 @@ jobs: run: | python3 -m pip install -r ./util/ci/requirements.txt ./util/ci/index_generator.py > index.html + ./util/ci/firmware_list_generator.py > firmware_list.json - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }} uses: jakejarvis/s3-sync-action@master with: - args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2' + args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2' env: AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} @@ -112,7 +113,7 @@ jobs: - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest uses: jakejarvis/s3-sync-action@master with: - args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2' + args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2' env: AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} diff --git a/.gitignore b/.gitignore index 5de38c161cdd..c3f2f063cd18 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ *.stackdump *.sym index.html +firmware_list.json # QMK-specific api_data/v1 diff --git a/util/ci/firmware_list_generator.py b/util/ci/firmware_list_generator.py new file mode 100644 index 000000000000..926939f4c3e5 --- /dev/null +++ b/util/ci/firmware_list_generator.py @@ -0,0 +1,26 @@ +import os +import json +from pathlib import Path +from time import gmtime, strftime + +DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S %Z' + +def current_datetime(): + return strftime(DATETIME_FORMAT, gmtime()) + + +qmk_firmware_dir = Path(os.path.realpath(__file__)).parents[2] + +binaries = [] +binaries.extend(qmk_firmware_dir.glob("*.bin")) +binaries.extend(qmk_firmware_dir.glob("*.hex")) +binaries.extend(qmk_firmware_dir.glob("*.uf2")) +binaries = list(sorted(binaries)) + +data = [] +for binary in binaries: + data.append(binary.name) + +keyboard_all_json = json.dumps({'last_updated': current_datetime(), 'files': data}, separators=(',', ':')) + +print(keyboard_all_json) diff --git a/util/ci/templates/index.html.j2 b/util/ci/templates/index.html.j2 index 18086987db06..1199a0819d38 100644 --- a/util/ci/templates/index.html.j2 +++ b/util/ci/templates/index.html.j2 @@ -3,6 +3,7 @@ + pinsBDCFF75710D3D2D1D0D4C6D7E6B4B5F4F5F6F7B1B3B2B6 \ No newline at end of file diff --git a/docs/public/pin_compatible_promicro.svg b/docs/public/pin_compatible_promicro.svg new file mode 100644 index 000000000000..044b265a574e --- /dev/null +++ b/docs/public/pin_compatible_promicro.svg @@ -0,0 +1,61 @@ +pinsLEDsB0D5D3D2D1D0D4C6D7E6B4B5F4F5F6F7B1B3B2B6 \ No newline at end of file From 1a991ffd24b8a5414b72c10dfc0fbea0afc085c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Fri, 7 Nov 2025 07:03:28 +0800 Subject: [PATCH 1101/1205] Guard remapping logic with MAGIC_ENABLE (#25537) * Only perform key and mod remapping in keycode_config() and mod_config() when MAGIC_ENABLE is defined. * If not set, these functions now return the original keycode or modifier unchanged. * Reduces firmware size, and unnecessary code when MAGIC_ENABLE is not enabled. * Removed space saving suggestion with magic functions from squeezing AVR documentation --- docs/squeezing_avr.md | 20 -------------------- quantum/keycode_config.c | 6 ++++++ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/docs/squeezing_avr.md b/docs/squeezing_avr.md index 458b442d59b2..3eed847f0769 100644 --- a/docs/squeezing_avr.md +++ b/docs/squeezing_avr.md @@ -87,26 +87,6 @@ Or if you're not using layers at all, you can outright remove the functionality #define NO_ACTION_LAYER ``` -## Magic Functions - -There are two `__attribute__ ((weak))` placeholder functions available to customize magic keycodes. If you are not using that feature to swap keycodes, such as backslash with backspace, add the following to your `keymap.c` or user space code: -```c -#ifndef MAGIC_ENABLE -uint16_t keycode_config(uint16_t keycode) { - return keycode; -} -#endif -``` -Likewise, if you are not using magic keycodes to swap modifiers, such as Control with GUI, add the following to your `keymap.c` or user space code: -```c -#ifndef MAGIC_ENABLE -uint8_t mod_config(uint8_t mod) { - return mod; -} -#endif -``` -Both of them will overwrite the placeholder functions with a simple return statement to reduce firmware size. - ## OLED tweaks One place you can save a bunch of space here is by not using `sprintf` or `snprintf`. This function call takes up ~1.5kB of firmware space, and can be rewritten. For instance, WPM uses this a lot. diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c index cbfbcc814072..f5068902d5e9 100644 --- a/quantum/keycode_config.c +++ b/quantum/keycode_config.c @@ -24,6 +24,7 @@ keymap_config_t keymap_config; * and will return the corrected keycode, when appropriate. */ __attribute__((weak)) uint16_t keycode_config(uint16_t keycode) { +#ifdef MAGIC_ENABLE switch (keycode) { case KC_CAPS_LOCK: case KC_LOCKING_CAPS_LOCK: @@ -115,6 +116,9 @@ __attribute__((weak)) uint16_t keycode_config(uint16_t keycode) { default: return keycode; } +#else + return keycode; +#endif // MAGIC_ENABLE } /** \brief mod_config @@ -124,6 +128,7 @@ __attribute__((weak)) uint16_t keycode_config(uint16_t keycode) { */ __attribute__((weak)) uint8_t mod_config(uint8_t mod) { +#ifdef MAGIC_ENABLE /** * Note: This function is for the 5-bit packed mods, NOT the full 8-bit mods. * More info about the mods can be seen in modifiers.h. @@ -161,5 +166,6 @@ __attribute__((weak)) uint8_t mod_config(uint8_t mod) { mod &= ~MOD_RGUI; } +#endif // MAGIC_ENABLE return mod; } From 01952bf39aadc42a70221f91d8cc0536ad458b04 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 6 Nov 2025 23:34:23 +0000 Subject: [PATCH 1102/1205] Implement minimal connection update logic (#25334) --- quantum/keyboard.c | 4 ++++ tmk_core/protocol/host.c | 44 ++++++++++++++++++++++++++++++++++++++-- tmk_core/protocol/host.h | 3 +++ 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 173c696e2d25..ce8c8efa68e8 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -29,6 +29,7 @@ along with this program. If not, see . #include "debug.h" #include "command.h" #include "util.h" +#include "host.h" #include "sendchar.h" #include "eeconfig.h" #include "action_layer.h" @@ -471,6 +472,7 @@ void keyboard_init(void) { #ifdef CONNECTION_ENABLE connection_init(); #endif + host_init(); led_init_ports(); #ifdef BACKLIGHT_ENABLE backlight_init_ports(); @@ -699,6 +701,8 @@ void quantum_task(void) { #ifdef LAYER_LOCK_ENABLE layer_lock_task(); #endif + + host_task(); } /** \brief Main task that is repeatedly called as fast as possible. */ diff --git a/tmk_core/protocol/host.c b/tmk_core/protocol/host.c index 4874d7c1d36a..f4fa9064e03e 100644 --- a/tmk_core/protocol/host.c +++ b/tmk_core/protocol/host.c @@ -18,6 +18,7 @@ along with this program. If not, see . #include #include "keyboard.h" #include "keycode.h" +#include "action.h" #include "host.h" #include "util.h" #include "debug.h" @@ -78,9 +79,48 @@ host_driver_t *host_get_driver(void) { return driver; } +#ifdef CONNECTION_ENABLE +static connection_host_t active_host = CONNECTION_HOST_NONE; + +__attribute__((weak)) void host_disconnect_active_driver_user(connection_host_t host) {} +__attribute__((weak)) void host_disconnect_active_driver_kb(connection_host_t host) {} + +__attribute__((weak)) void host_connect_active_driver_user(connection_host_t host) {} +__attribute__((weak)) void host_connect_active_driver_kb(connection_host_t host) {} + +// TODO: Additionally have host_driver_t handle swap +static void host_update_active_driver(connection_host_t current, connection_host_t next) { + host_disconnect_active_driver_user(current); + host_disconnect_active_driver_kb(current); + + if (current != CONNECTION_HOST_NONE) { + clear_keyboard(); + } + + host_connect_active_driver_user(next); + host_connect_active_driver_kb(next); +} + +#endif + +void host_init(void) { + // currently do nothing +} + +void host_task(void) { +#ifdef CONNECTION_ENABLE + connection_host_t next_host = connection_get_host(); + if (next_host != active_host) { + host_update_active_driver(active_host, next_host); + + active_host = next_host; + } +#endif +} + static host_driver_t *host_get_active_driver(void) { #ifdef CONNECTION_ENABLE - switch (connection_get_host()) { + switch (active_host) { # ifdef BLUETOOTH_ENABLE case CONNECTION_HOST_BLUETOOTH: return &bt_driver; @@ -96,7 +136,7 @@ static host_driver_t *host_get_active_driver(void) { bool host_can_send_nkro(void) { #ifdef CONNECTION_ENABLE - switch (connection_get_host()) { + switch (active_host) { # ifdef BLUETOOTH_ENABLE case CONNECTION_HOST_BLUETOOTH: return bluetooth_can_send_nkro(); diff --git a/tmk_core/protocol/host.h b/tmk_core/protocol/host.h index a0b1e73dccc7..7ff6d0df08d7 100644 --- a/tmk_core/protocol/host.h +++ b/tmk_core/protocol/host.h @@ -27,6 +27,9 @@ along with this program. If not, see . extern "C" { #endif +void host_init(void); +void host_task(void); + /* host driver */ void host_set_driver(host_driver_t *driver); host_driver_t *host_get_driver(void); From cbeab2ac4f69292283ed94049675aaa89128ec34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 23:38:23 +0000 Subject: [PATCH 1103/1205] Bump actions/upload-artifact from 4 to 5 (#25745) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci_build_major_branch_keymap.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_build_major_branch_keymap.yml b/.github/workflows/ci_build_major_branch_keymap.yml index 1a0b44b90802..228dd0025d67 100644 --- a/.github/workflows/ci_build_major_branch_keymap.yml +++ b/.github/workflows/ci_build_major_branch_keymap.yml @@ -62,7 +62,7 @@ jobs: echo "targets=$(jq -c 'keys' targets.json)" >> $GITHUB_OUTPUT - name: Upload targets json - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: targets-${{ inputs.keymap }} path: targets.json @@ -112,7 +112,7 @@ jobs: qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $(jq -r '.["${{ matrix.target }}"].targets' targets.json) || touch .failed - name: Upload binaries - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: firmware-${{ inputs.keymap }}-${{ matrix.target }} if-no-files-found: ignore @@ -146,7 +146,7 @@ jobs: merge-multiple: true - name: Upload all firmwares - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: firmware-${{ inputs.keymap }} if-no-files-found: ignore From 8522449ccfa36d19c82317e8a49e58862e366c66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 23:38:36 +0000 Subject: [PATCH 1104/1205] Bump actions/download-artifact from 5 to 6 (#25746) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci_build_major_branch.yml | 2 +- .github/workflows/ci_build_major_branch_keymap.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_build_major_branch.yml b/.github/workflows/ci_build_major_branch.yml index c37e1377b150..6cefd589019e 100644 --- a/.github/workflows/ci_build_major_branch.yml +++ b/.github/workflows/ci_build_major_branch.yml @@ -87,7 +87,7 @@ jobs: fetch-depth: 0 - name: Download firmwares - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: pattern: firmware-* path: . diff --git a/.github/workflows/ci_build_major_branch_keymap.yml b/.github/workflows/ci_build_major_branch_keymap.yml index 228dd0025d67..f5533cf07ac6 100644 --- a/.github/workflows/ci_build_major_branch_keymap.yml +++ b/.github/workflows/ci_build_major_branch_keymap.yml @@ -92,7 +92,7 @@ jobs: uses: actions/checkout@v5 - name: Get target definitions - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: targets-${{ inputs.keymap }} path: . @@ -139,7 +139,7 @@ jobs: uses: actions/checkout@v5 - name: Download firmwares - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: pattern: firmware-${{ inputs.keymap }}-* path: . From 22b213e1915a49cc8419fe0d449ca26fb372b43c Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Date: Sat, 8 Nov 2025 15:43:34 -0300 Subject: [PATCH 1105/1205] Add LED index map to `qmk info` cli command (#25743) --- lib/python/qmk/cli/info.py | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/lib/python/qmk/cli/info.py b/lib/python/qmk/cli/info.py index 5925b5725898..26f7f0269d00 100755 --- a/lib/python/qmk/cli/info.py +++ b/lib/python/qmk/cli/info.py @@ -102,6 +102,48 @@ def show_matrix(kb_info_json, title_caps=True): print(render_layout(kb_info_json['layouts'][layout_name]['layout'], cli.config.info.ascii, labels)) +def show_leds(kb_info_json, title_caps=True): + """Render LED indices per key, using the keyboard's key layout geometry. + + We build a map from (row, col) -> LED index using rgb_matrix/led_matrix layout, + then label each key with its LED index. Keys without an associated LED are left blank. + """ + # Prefer rgb_matrix, fall back to led_matrix + led_feature = None + for feature in ['rgb_matrix', 'led_matrix']: + if 'layout' in kb_info_json.get(feature, {}): + led_feature = feature + break + + if not led_feature: + cli.echo('{fg_yellow}No rgb_matrix/led_matrix layout found to derive LED indices.{fg_reset}') + return + + # Build mapping from matrix position -> LED indices for faster lookup later + by_matrix = {} + for idx, led in enumerate(kb_info_json[led_feature]['layout']): + if 'matrix' in led: + led_key = tuple(led.get('matrix')) + by_matrix[led_key] = idx + + # For each keyboard layout (e.g., LAYOUT), render keys labeled with LED index (or blank) + for layout_name, layout in kb_info_json['layouts'].items(): + labels = [] + for key in layout['layout']: + led_key = tuple(key.get('matrix')) + label = str(by_matrix[led_key]) if led_key in by_matrix else '' + + labels.append(label) + + # Header + if title_caps: + cli.echo('{fg_blue}LED indices for "%s"{fg_reset}:', layout_name) + else: + cli.echo('{fg_blue}leds_%s{fg_reset}:', layout_name) + + print(render_layout(kb_info_json['layouts'][layout_name]['layout'], cli.config.info.ascii, labels)) + + def print_friendly_output(kb_info_json): """Print the info.json in a friendly text format. """ @@ -169,6 +211,7 @@ def print_parsed_rules_mk(keyboard_name): @cli.argument('-km', '--keymap', help='Keymap to show info for (Optional).') @cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.') @cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.') +@cli.argument('-L', '--leds', action='store_true', help='Render the LED layout with LED indices (rgb_matrix/led_matrix).') @cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).') @cli.argument('--ascii', action='store_true', default=not UNICODE_SUPPORT, help='Render layout box drawings in ASCII only.') @cli.argument('-r', '--rules-mk', action='store_true', help='Render the parsed values of the keyboard\'s rules.mk file.') @@ -227,5 +270,8 @@ def info(cli): if cli.config.info.matrix: show_matrix(kb_info_json, title_caps) + if cli.config.info.leds: + show_leds(kb_info_json, title_caps) + if cli.config.info.keymap: show_keymap(kb_info_json, title_caps) From 6e35013bc2e30af022cdb8c176e869c5c94ee17a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 8 Nov 2025 20:48:48 +0000 Subject: [PATCH 1106/1205] Generate `CUSTOM_MATRIX = lite` without `matrix_pins.custom` (#25453) --- keyboards/argyle/keyboard.json | 1 - keyboards/keychron/c2_pro/info.json | 1 - keyboards/keychron/q1v2/info.json | 1 - lib/python/qmk/cli/generate/rules_mk.py | 9 +++--- lib/python/qmk/info.py | 42 ++++++++++++++++--------- 5 files changed, 31 insertions(+), 23 deletions(-) diff --git a/keyboards/argyle/keyboard.json b/keyboards/argyle/keyboard.json index a7bfc335df99..d97f067be8b4 100755 --- a/keyboards/argyle/keyboard.json +++ b/keyboards/argyle/keyboard.json @@ -11,7 +11,6 @@ }, "matrix_pins": { "cols": ["D1", "D4", "D5", "D6", "D7", "B0", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN"], - "custom": true, "custom_lite": true, "rows": ["D0", "C3", "B1", "B2", "B3"] }, diff --git a/keyboards/keychron/c2_pro/info.json b/keyboards/keychron/c2_pro/info.json index 9c0e1ac72eb8..8a7d0968b142 100644 --- a/keyboards/keychron/c2_pro/info.json +++ b/keyboards/keychron/c2_pro/info.json @@ -26,7 +26,6 @@ "matrix_pins": { "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "C14"], "rows": ["B5", "B4", "B3", "A15", "A14", "A13"], - "custom": true, "custom_lite": true }, "diode_direction": "ROW2COL" diff --git a/keyboards/keychron/q1v2/info.json b/keyboards/keychron/q1v2/info.json index f0342254fac8..ba6f908bbbe2 100644 --- a/keyboards/keychron/q1v2/info.json +++ b/keyboards/keychron/q1v2/info.json @@ -27,7 +27,6 @@ "matrix_pins": { "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", null, null, null, null, null, null, null, null], "rows": ["B5", "B4", "B3", "A15", "A14", "A13"], - "custom": true, "custom_lite": true }, "diode_direction": "ROW2COL", diff --git a/lib/python/qmk/cli/generate/rules_mk.py b/lib/python/qmk/cli/generate/rules_mk.py index 358a22fd1d70..16084bded183 100755 --- a/lib/python/qmk/cli/generate/rules_mk.py +++ b/lib/python/qmk/cli/generate/rules_mk.py @@ -96,11 +96,10 @@ def generate_rules_mk(cli): rules_mk_lines.append(generate_rule('SPLIT_TRANSPORT', 'custom')) # Set CUSTOM_MATRIX, if needed - if kb_info_json.get('matrix_pins', {}).get('custom'): - if kb_info_json.get('matrix_pins', {}).get('custom_lite'): - rules_mk_lines.append(generate_rule('CUSTOM_MATRIX', 'lite')) - else: - rules_mk_lines.append(generate_rule('CUSTOM_MATRIX', 'yes')) + if kb_info_json.get('matrix_pins', {}).get('custom_lite'): + rules_mk_lines.append(generate_rule('CUSTOM_MATRIX', 'lite')) + elif kb_info_json.get('matrix_pins', {}).get('custom'): + rules_mk_lines.append(generate_rule('CUSTOM_MATRIX', 'yes')) if converter: rules_mk_lines.append(generate_rule('CONVERT_TO', converter)) diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 59a64095e774..e6d51e123970 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -302,6 +302,24 @@ def _extract_features(info_data, rules): return info_data +def _extract_matrix_rules(info_data, rules): + """Find all the features enabled in rules.mk. + """ + if rules.get('CUSTOM_MATRIX', 'no') != 'no': + if 'matrix_pins' in info_data and 'custom' in info_data['matrix_pins']: + _log_warning(info_data, 'Custom Matrix is specified in both info.json and rules.mk, the rules.mk values win.') + + if 'matrix_pins' not in info_data: + info_data['matrix_pins'] = {} + + if rules['CUSTOM_MATRIX'] == 'lite': + info_data['matrix_pins']['custom_lite'] = True + else: + info_data['matrix_pins']['custom'] = True + + return info_data + + def _pin_name(pin): """Returns the proper representation for a pin. """ @@ -552,7 +570,6 @@ def _extract_matrix_info(info_data, config_c): row_pins = config_c.get('MATRIX_ROW_PINS', '').replace('{', '').replace('}', '').strip() col_pins = config_c.get('MATRIX_COL_PINS', '').replace('{', '').replace('}', '').strip() direct_pins = config_c.get('DIRECT_PINS', '').replace(' ', '')[1:-1] - info_snippet = {} if 'MATRIX_ROWS' in config_c and 'MATRIX_COLS' in config_c: if 'matrix_size' in info_data: @@ -567,26 +584,20 @@ def _extract_matrix_info(info_data, config_c): if 'matrix_pins' in info_data and 'cols' in info_data['matrix_pins'] and 'rows' in info_data['matrix_pins']: _log_warning(info_data, 'Matrix pins are specified in both info.json and config.h, the config.h values win.') - info_snippet['cols'] = _extract_pins(col_pins) - info_snippet['rows'] = _extract_pins(row_pins) + if 'matrix_pins' not in info_data: + info_data['matrix_pins'] = {} + + info_data['matrix_pins']['cols'] = _extract_pins(col_pins) + info_data['matrix_pins']['rows'] = _extract_pins(row_pins) if direct_pins: if 'matrix_pins' in info_data and 'direct' in info_data['matrix_pins']: _log_warning(info_data, 'Direct pins are specified in both info.json and config.h, the config.h values win.') - info_snippet['direct'] = _extract_direct_matrix(direct_pins) - - if config_c.get('CUSTOM_MATRIX', 'no') != 'no': - if 'matrix_pins' in info_data and 'custom' in info_data['matrix_pins']: - _log_warning(info_data, 'Custom Matrix is specified in both info.json and config.h, the config.h values win.') - - info_snippet['custom'] = True - - if config_c['CUSTOM_MATRIX'] == 'lite': - info_snippet['custom_lite'] = True + if 'matrix_pins' not in info_data: + info_data['matrix_pins'] = {} - if info_snippet: - info_data['matrix_pins'] = info_snippet + info_data['matrix_pins']['direct'] = _extract_direct_matrix(direct_pins) return info_data @@ -755,6 +766,7 @@ def _extract_rules_mk(info_data, rules): # Merge in config values that can't be easily mapped _extract_features(info_data, rules) + _extract_matrix_rules(info_data, rules) return info_data From 00eebfb575d6ea0660755cee2c6ccf3b21110312 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 8 Nov 2025 20:49:15 +0000 Subject: [PATCH 1107/1205] Fix pmw33xx sensor initialisation (#25777) --- drivers/sensors/pmw33xx_common.c | 2 +- platforms/progmem.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/sensors/pmw33xx_common.c b/drivers/sensors/pmw33xx_common.c index 61e309ea27df..95d0fe6b4b56 100644 --- a/drivers/sensors/pmw33xx_common.c +++ b/drivers/sensors/pmw33xx_common.c @@ -108,7 +108,7 @@ __attribute__((weak)) bool pmw33xx_check_signature(uint8_t sensor) { pmw33xx_read(sensor, REG_Inverse_Product_ID), }; - return memcmp(pmw33xx_firmware_signature, signature_dump, sizeof(signature_dump)) == 0; + return memcmp_P(signature_dump, pmw33xx_firmware_signature, sizeof(signature_dump)) == 0; } bool pmw33xx_upload_firmware(uint8_t sensor) { diff --git a/platforms/progmem.h b/platforms/progmem.h index 3a7a169682ce..6c4ebcaa01db 100644 --- a/platforms/progmem.h +++ b/platforms/progmem.h @@ -7,6 +7,7 @@ # define PROGMEM # define PSTR(x) x # define PGM_P const char* +# define memcmp_P(s1, s2, n) memcmp(s1, s2, n) # define memcpy_P(dest, src, n) memcpy(dest, src, n) # define pgm_read_byte(address_short) *((uint8_t*)(address_short)) # define pgm_read_word(address_short) *((uint16_t*)(address_short)) From 024c4ef85395f3230ab1599a4f1c87ffeab7e553 Mon Sep 17 00:00:00 2001 From: leyew <102467346+itsme-zeix@users.noreply.github.com> Date: Sun, 9 Nov 2025 05:01:36 +0800 Subject: [PATCH 1108/1205] [Keyboard] Add Rubrehaku (#24907) --- keyboards/zeix/singa/rubrehaku/config.h | 20 + keyboards/zeix/singa/rubrehaku/keyboard.json | 694 ++++++++++++++++++ .../singa/rubrehaku/keymaps/default/keymap.c | 35 + .../zeix/singa/rubrehaku/matrix_diagram.md | 30 + keyboards/zeix/singa/rubrehaku/readme.md | 27 + 5 files changed, 806 insertions(+) create mode 100644 keyboards/zeix/singa/rubrehaku/config.h create mode 100644 keyboards/zeix/singa/rubrehaku/keyboard.json create mode 100644 keyboards/zeix/singa/rubrehaku/keymaps/default/keymap.c create mode 100644 keyboards/zeix/singa/rubrehaku/matrix_diagram.md create mode 100644 keyboards/zeix/singa/rubrehaku/readme.md diff --git a/keyboards/zeix/singa/rubrehaku/config.h b/keyboards/zeix/singa/rubrehaku/config.h new file mode 100644 index 000000000000..e47dae35e667 --- /dev/null +++ b/keyboards/zeix/singa/rubrehaku/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2024 zeix (@itsme-zeix) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U diff --git a/keyboards/zeix/singa/rubrehaku/keyboard.json b/keyboards/zeix/singa/rubrehaku/keyboard.json new file mode 100644 index 000000000000..3dbed82aaba4 --- /dev/null +++ b/keyboards/zeix/singa/rubrehaku/keyboard.json @@ -0,0 +1,694 @@ +{ + "manufacturer": "KLC", + "keyboard_name": "Rubrehaku", + "maintainer": "itsme-zeix", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "indicators": { + "caps_lock": "GP29" + }, + "matrix_pins": { + "cols": ["GP7", "GP6", "GP5", "GP4", "GP3", "GP2", "GP1", "GP0"], + "rows": ["GP27", "GP28", "GP10", "GP11", "GP18", "GP19", "GP23", "GP24", "GP25", "GP26"] + }, + "processor": "RP2040", + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "default": { + "hue": 210, + "sat": 100, + "val": 8 + }, + "driver": "ws2812", + "led_count": 16, + "sleep": true + }, + "url": "https://klc-playground.com", + "usb": { + "device_version": "0.0.1", + "pid": "0x8889", + "vid": "0x4C27" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP20" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [0, 7], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [3, 7], "x": 15, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 2, "w": 1.25}, + {"matrix": [5, 7], "x": 15, "y": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [7, 7], "x": 15, "y": 3}, + {"matrix": [8, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [9, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [8, 1], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [9, 2], "x": 3.75, "y": 4, "w": 2.75}, + {"matrix": [8, 3], "x": 6.5, "y": 4, "w": 1.25}, + {"matrix": [9, 4], "x": 7.75, "y": 4, "w": 2.25}, + {"matrix": [8, 5], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13, "y": 4}, + {"matrix": [9, 6], "x": 14, "y": 4}, + {"matrix": [9, 7], "x": 15, "y": 4} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [0, 7], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [3, 7], "x": 15, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [5, 7], "x": 15, "y": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [7, 7], "x": 15, "y": 3}, + {"matrix": [8, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [9, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [8, 1], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [8, 5], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13, "y": 4}, + {"matrix": [9, 6], "x": 14, "y": 4}, + {"matrix": [9, 7], "x": 15, "y": 4} + ] + }, + "LAYOUT_ansi_split_bs": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [0, 7], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [3, 7], "x": 15, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [5, 7], "x": 15, "y": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [7, 7], "x": 15, "y": 3}, + {"matrix": [8, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [9, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [8, 1], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [8, 5], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13, "y": 4}, + {"matrix": [9, 6], "x": 14, "y": 4}, + {"matrix": [9, 7], "x": 15, "y": 4} + ] + }, + "LAYOUT_ansi_tsangan": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [0, 7], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [3, 7], "x": 15, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [5, 7], "x": 15, "y": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [7, 7], "x": 15, "y": 3}, + {"matrix": [8, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [9, 0], "x": 1.5, "y": 4}, + {"matrix": [8, 1], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [8, 6], "x": 13, "y": 4}, + {"matrix": [9, 6], "x": 14, "y": 4}, + {"matrix": [9, 7], "x": 15, "y": 4} + ] + }, + "LAYOUT_ansi_tsangan_split_bs": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [0, 7], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 6], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [3, 7], "x": 15, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [5, 6], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [5, 7], "x": 15, "y": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [7, 7], "x": 15, "y": 3}, + {"matrix": [8, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [9, 0], "x": 1.5, "y": 4}, + {"matrix": [8, 1], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [8, 6], "x": 13, "y": 4}, + {"matrix": [9, 6], "x": 14, "y": 4}, + {"matrix": [9, 7], "x": 15, "y": 4} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [0, 7], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 7], "x": 15, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [5, 7], "x": 15, "y": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [7, 7], "x": 15, "y": 3}, + {"matrix": [8, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [9, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [8, 1], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [8, 5], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13, "y": 4}, + {"matrix": [9, 6], "x": 14, "y": 4}, + {"matrix": [9, 7], "x": 15, "y": 4} + ] + }, + "LAYOUT_iso_split_bs": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [0, 7], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 7], "x": 15, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [5, 7], "x": 15, "y": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [7, 7], "x": 15, "y": 3}, + {"matrix": [8, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [9, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [8, 1], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [8, 5], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [8, 6], "x": 13, "y": 4}, + {"matrix": [9, 6], "x": 14, "y": 4}, + {"matrix": [9, 7], "x": 15, "y": 4} + ] + }, + "LAYOUT_iso_tsangan": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [0, 7], "x": 13, "y": 0, "w": 2}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 7], "x": 15, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [5, 7], "x": 15, "y": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [7, 7], "x": 15, "y": 3}, + {"matrix": [8, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [9, 0], "x": 1.5, "y": 4}, + {"matrix": [8, 1], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [8, 6], "x": 13, "y": 4}, + {"matrix": [9, 6], "x": 14, "y": 4}, + {"matrix": [9, 7], "x": 15, "y": 4} + ] + }, + "LAYOUT_iso_tsangan_split_bs": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [1, 0], "x": 1, "y": 0}, + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [1, 1], "x": 3, "y": 0}, + {"matrix": [0, 2], "x": 4, "y": 0}, + {"matrix": [1, 2], "x": 5, "y": 0}, + {"matrix": [0, 3], "x": 6, "y": 0}, + {"matrix": [1, 3], "x": 7, "y": 0}, + {"matrix": [0, 4], "x": 8, "y": 0}, + {"matrix": [1, 4], "x": 9, "y": 0}, + {"matrix": [0, 5], "x": 10, "y": 0}, + {"matrix": [1, 5], "x": 11, "y": 0}, + {"matrix": [0, 6], "x": 12, "y": 0}, + {"matrix": [1, 6], "x": 13, "y": 0}, + {"matrix": [0, 7], "x": 14, "y": 0}, + {"matrix": [2, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [3, 0], "x": 1.5, "y": 1}, + {"matrix": [2, 1], "x": 2.5, "y": 1}, + {"matrix": [3, 1], "x": 3.5, "y": 1}, + {"matrix": [2, 2], "x": 4.5, "y": 1}, + {"matrix": [3, 2], "x": 5.5, "y": 1}, + {"matrix": [2, 3], "x": 6.5, "y": 1}, + {"matrix": [3, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [3, 4], "x": 9.5, "y": 1}, + {"matrix": [2, 5], "x": 10.5, "y": 1}, + {"matrix": [3, 5], "x": 11.5, "y": 1}, + {"matrix": [2, 6], "x": 12.5, "y": 1}, + {"matrix": [3, 7], "x": 15, "y": 1}, + {"matrix": [4, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [5, 0], "x": 1.75, "y": 2}, + {"matrix": [4, 1], "x": 2.75, "y": 2}, + {"matrix": [5, 1], "x": 3.75, "y": 2}, + {"matrix": [4, 2], "x": 4.75, "y": 2}, + {"matrix": [5, 2], "x": 5.75, "y": 2}, + {"matrix": [4, 3], "x": 6.75, "y": 2}, + {"matrix": [5, 3], "x": 7.75, "y": 2}, + {"matrix": [4, 4], "x": 8.75, "y": 2}, + {"matrix": [5, 4], "x": 9.75, "y": 2}, + {"matrix": [4, 5], "x": 10.75, "y": 2}, + {"matrix": [5, 5], "x": 11.75, "y": 2}, + {"matrix": [4, 6], "x": 12.75, "y": 2}, + {"matrix": [5, 6], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [5, 7], "x": 15, "y": 2}, + {"matrix": [6, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [7, 0], "x": 1.25, "y": 3}, + {"matrix": [6, 1], "x": 2.25, "y": 3}, + {"matrix": [7, 1], "x": 3.25, "y": 3}, + {"matrix": [6, 2], "x": 4.25, "y": 3}, + {"matrix": [7, 2], "x": 5.25, "y": 3}, + {"matrix": [6, 3], "x": 6.25, "y": 3}, + {"matrix": [7, 3], "x": 7.25, "y": 3}, + {"matrix": [6, 4], "x": 8.25, "y": 3}, + {"matrix": [7, 4], "x": 9.25, "y": 3}, + {"matrix": [6, 5], "x": 10.25, "y": 3}, + {"matrix": [7, 5], "x": 11.25, "y": 3}, + {"matrix": [6, 6], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [7, 6], "x": 14, "y": 3}, + {"matrix": [7, 7], "x": 15, "y": 3}, + {"matrix": [8, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [9, 0], "x": 1.5, "y": 4}, + {"matrix": [8, 1], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [8, 3], "x": 4, "y": 4, "w": 7}, + {"matrix": [8, 5], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [8, 6], "x": 13, "y": 4}, + {"matrix": [9, 6], "x": 14, "y": 4}, + {"matrix": [9, 7], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/zeix/singa/rubrehaku/keymaps/default/keymap.c b/keyboards/zeix/singa/rubrehaku/keymaps/default/keymap.c new file mode 100644 index 000000000000..17e226b98c7f --- /dev/null +++ b/keyboards/zeix/singa/rubrehaku/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2024 zeix (@itsme-zeix) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_all( + KC_ESC, 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_BSLS, 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, 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_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + +[1] = 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_TRNS, 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, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/zeix/singa/rubrehaku/matrix_diagram.md b/keyboards/zeix/singa/rubrehaku/matrix_diagram.md new file mode 100644 index 000000000000..cd11c0070a20 --- /dev/null +++ b/keyboards/zeix/singa/rubrehaku/matrix_diagram.md @@ -0,0 +1,30 @@ +# Matrix Diagram for Rubrehaku + +``` + ┌───┬───┐ + Split Backspace │16 │07 │ + └───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│00 │10 │01 │11 │02 │12 │03 │13 │04 │14 │05 │15 │06 │07 │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┐ ┌─────┐ +│20 │30 │21 │31 │22 │32 │23 │33 │24 │34 │25 │35 │26 │36 │37 │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ ┌──┴┐56 │ ISO Enter +│40 │50 │41 │51 │42 │52 │43 │53 │44 │54 │45 │55 │56 │57 │ │46 │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ └───┴────┘ +│60 │61 │71 │62 │72 │63 │73 │64 │74 │65 │75 │66 │76 │77 │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬─┬───┼───┼───┤ +│80 │90 │81 │83 │95 │ │86 │96 │97 │ +└─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘ +┌────┬───┐ +│60 │70 │ Split Left Shift +└────┴───┘ +┌────┬────┬────┬────────────────────────┬────┬────┐ +│80 │90 │81 │83 │85 │95 │ 6.25u +└────┴────┴────┴────────────────────────┴────┴────┘ +┌────┬────┬────┬───────────┬────┬───────┬────┬────┐ +│80 │90 │81 │92 │83 │94 │85 │95 │ Split Space (Left 2.75u) +└────┴────┴────┴───────────┴────┴───────┴────┴────┘ +┌────┬────┬────┬───────┬────┬───────────┬────┬────┐ +│80 │90 │81 │92 │83 │94 │85 │95 │ Split Space (Left 2.25u) +└────┴────┴────┴───────┴────┴───────────┴────┴────┘ +``` diff --git a/keyboards/zeix/singa/rubrehaku/readme.md b/keyboards/zeix/singa/rubrehaku/readme.md new file mode 100644 index 000000000000..f7fcc1f8718c --- /dev/null +++ b/keyboards/zeix/singa/rubrehaku/readme.md @@ -0,0 +1,27 @@ +# SINGA Rubrehaku (PCB designed by Zeix) + +![Layout Compatibility](https://i.imgur.com/jTkWkJd.png) + +65% PCB designed to support Rubrehaku + +* Keyboard Maintainer: [Zeix](https://github.com/itsme-zeix) +* Hardware Supported: KLC x SINGA x Rubrehose Rubrehaku +* Hardware Availability: https://klc-playground.com/ + +Make example for this keyboard (after setting up your build environment): + + make zeix/singa/rubrehaku:default + +Flashing example for this keyboard: + + make zeix/singa/rubrehaku: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the top left key and plug in the keyboard. +* **Physical reset button**: Briefly press the `RESET` button twice or short the 'USB_BOOT' and `GND` pads and plug in the keyboard. +* **Keycode in layout**: Press the key mapped to `QK_BOOT`. From efc5d63383b64291f25c8377bcfae8178dd63302 Mon Sep 17 00:00:00 2001 From: Pascal Getreuer <50221757+getreuer@users.noreply.github.com> Date: Tue, 11 Nov 2025 03:27:12 -0800 Subject: [PATCH 1109/1205] [Core] Speculative Hold option for mod-taps: hold mods instantly while unsettled. (#25572) --- data/mappings/info_config.hjson | 1 + docs/tap_hold.md | 33 + quantum/action.c | 5 + quantum/action.h | 2 +- quantum/action_tapping.c | 171 +++ quantum/action_tapping.h | 30 + quantum/action_util.c | 5 + .../speculative_hold/default/config.h | 23 + .../speculative_hold/default/test.mk | 21 + .../speculative_hold/default/test_keymap.c | 20 + .../default/test_tap_hold.cpp | 794 ++++++++++++ .../speculative_hold/flow_tap/config.h | 25 + .../speculative_hold/flow_tap/test.mk | 15 + .../flow_tap/test_tap_hold.cpp | 1114 +++++++++++++++++ .../retro_shift_permissive_hold/config.h | 30 + .../retro_shift_permissive_hold/test.mk | 17 + .../test_retro_shift.cpp | 689 ++++++++++ .../speculative_hold/retro_tapping/config.h | 24 + .../speculative_hold/retro_tapping/test.mk | 15 + .../retro_tapping/test_tap_hold.cpp | 629 ++++++++++ 20 files changed, 3662 insertions(+), 1 deletion(-) create mode 100644 tests/tap_hold_configurations/speculative_hold/default/config.h create mode 100644 tests/tap_hold_configurations/speculative_hold/default/test.mk create mode 100644 tests/tap_hold_configurations/speculative_hold/default/test_keymap.c create mode 100644 tests/tap_hold_configurations/speculative_hold/default/test_tap_hold.cpp create mode 100644 tests/tap_hold_configurations/speculative_hold/flow_tap/config.h create mode 100644 tests/tap_hold_configurations/speculative_hold/flow_tap/test.mk create mode 100644 tests/tap_hold_configurations/speculative_hold/flow_tap/test_tap_hold.cpp create mode 100644 tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/config.h create mode 100644 tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/test.mk create mode 100644 tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/test_retro_shift.cpp create mode 100644 tests/tap_hold_configurations/speculative_hold/retro_tapping/config.h create mode 100644 tests/tap_hold_configurations/speculative_hold/retro_tapping/test.mk create mode 100644 tests/tap_hold_configurations/speculative_hold/retro_tapping/test_tap_hold.cpp diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index 1c6e86d876a3..8a0c93e5ac36 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -224,6 +224,7 @@ "PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "flag"}, "RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "flag"}, "RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "flag"}, + "SPECULATIVE_HOLD": {"info_key": "tapping.speculative_hold", "value_type": "flag"}, "TAP_CODE_DELAY": {"info_key": "qmk.tap_keycode_delay", "value_type": "int"}, "TAP_HOLD_CAPS_DELAY": {"info_key": "qmk.tap_capslock_delay", "value_type": "int"}, "TAPPING_TERM": {"info_key": "tapping.term", "value_type": "int"}, diff --git a/docs/tap_hold.md b/docs/tap_hold.md index bc2c50504089..2aa628c5354c 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -779,6 +779,39 @@ Do not use `MOD_xxx` constants like `MOD_LSFT` or `MOD_RALT`, since they're 5-bi [Auto Shift](features/auto_shift) has its own version of `retro tapping` called `retro shift`. It is extremely similar to `retro tapping`, but holding the key past `AUTO_SHIFT_TIMEOUT` results in the value it sends being shifted. Other configurations also affect it differently; see [here](features/auto_shift#retro-shift) for more information. +### Speculative Hold + +Speculative Hold makes mod-tap keys more responsive by applying the modifier instantly on keydown, before the tap-hold decision is made. This is especially useful for actions like Shift+Click with a mouse, which can feel laggy with standard mod-taps. + +The firmware holds the modifier speculatively. Once the key's behavior is settled: + +* If held, the modifier remains active as expected until the key is released. +* If tapped, the speculative modifier is canceled just before the tapping keycode is sent. + +Speculative Hold applies the modifier early but does not change the underlying tap-hold decision logic. Speculative Hold is compatible to use in combination with any other tap-hold options. + +To enable Speculative Hold, add the following to your `config.h`: + +```c +#define SPECULATIVE_HOLD +``` + +By default, Speculative Hold applies to mod-taps using Shift, Ctrl, or Shift + Ctrl. You can override this behavior by defining the `get_speculative_hold()` callback in your keymap, for instance: + +```c +bool get_speculative_hold(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { // These keys may be speculatively held. + case LCTL_T(KC_ESC): + case LSFT_T(KC_Z): + case RSFT_T(KC_SLSH): + return true; + } + return false; // Disable otherwise. +} +``` + +Some operating systems or applications assign actions to tapping a modifier key by itself, e.g., tapping GUI to open a start menu. Because Speculative Hold sends a lone modifier key press in some cases, it can falsely trigger these actions. To prevent this, set `DUMMY_MOD_NEUTRALIZER_KEYCODE` (and optionally `MODS_TO_NEUTRALIZE`) in your `config.h` in the same way as described above for [Retro Tapping](#retro-tapping). + ## Why do we include the key record for the per key functions? One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. diff --git a/quantum/action.c b/quantum/action.c index dd82c9ec99ff..aacafbe2ffbb 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -281,6 +281,11 @@ void process_record(keyrecord_t *record) { if (IS_NOEVENT(record->event)) { return; } +#ifdef SPECULATIVE_HOLD + if (record->event.pressed) { + speculative_key_settled(record); + } +#endif // SPECULATIVE_HOLD #ifdef FLOW_TAP_TERM flow_tap_update_last_event(record); #endif // FLOW_TAP_TERM diff --git a/quantum/action.h b/quantum/action.h index 7616486c6d83..a459c438c119 100644 --- a/quantum/action.h +++ b/quantum/action.h @@ -38,7 +38,7 @@ extern "C" { /* tapping count and state */ typedef struct { bool interrupted : 1; - bool reserved2 : 1; + bool speculated : 1; bool reserved1 : 1; bool reserved0 : 1; uint8_t count : 4; diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index c2f45ea178f2..5d43dd99ea8e 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -6,8 +6,10 @@ #include "action_tapping.h" #include "action_util.h" #include "keycode.h" +#include "keycode_config.h" #include "quantum_keycodes.h" #include "timer.h" +#include "wait.h" #ifndef NO_ACTION_TAPPING @@ -51,6 +53,21 @@ __attribute__((weak)) bool get_permissive_hold(uint16_t keycode, keyrecord_t *re } # endif +# ifdef SPECULATIVE_HOLD +typedef struct { + keypos_t key; + uint8_t mods; +} speculative_key_t; +# define SPECULATIVE_KEYS_SIZE 8 +static speculative_key_t speculative_keys[SPECULATIVE_KEYS_SIZE] = {}; +static uint8_t num_speculative_keys = 0; +static uint8_t prev_speculative_mods = 0; +static uint8_t speculative_mods = 0; + +/** Handler to be called on incoming press events. */ +static void speculative_key_press(keyrecord_t *record); +# endif // SPECULATIVE_HOLD + # if defined(CHORDAL_HOLD) || defined(FLOW_TAP_TERM) # define REGISTERED_TAPS_SIZE 8 // Array of tap-hold keys that have been settled as tapped but not yet released. @@ -129,6 +146,13 @@ static void debug_waiting_buffer(void); * FIXME: Needs doc */ void action_tapping_process(keyrecord_t record) { +# ifdef SPECULATIVE_HOLD + prev_speculative_mods = speculative_mods; + if (record.event.pressed) { + speculative_key_press(&record); + } +# endif // SPECULATIVE_HOLD + if (process_tapping(&record)) { if (IS_EVENT(record.event)) { ac_dprintf("processed: "); @@ -145,6 +169,12 @@ void action_tapping_process(keyrecord_t record) { } } +# ifdef SPECULATIVE_HOLD + if (speculative_mods != prev_speculative_mods) { + send_keyboard_report(); + } +# endif // SPECULATIVE_HOLD + // process waiting_buffer if (IS_EVENT(record.event) && waiting_buffer_head != waiting_buffer_tail) { ac_dprintf("---- action_exec: process waiting_buffer -----\n"); @@ -708,6 +738,147 @@ void waiting_buffer_scan_tap(void) { } } +# ifdef SPECULATIVE_HOLD +static void debug_speculative_keys(void) { + ac_dprintf("mods = { "); + for (int8_t i = 0; i < num_speculative_keys; ++i) { + ac_dprintf("%02X ", speculative_keys[i].mods); + } + ac_dprintf("}, keys = { "); + for (int8_t i = 0; i < num_speculative_keys; ++i) { + ac_dprintf("%02X%02X ", speculative_keys[i].key.row, speculative_keys[i].key.col); + } + ac_dprintf("}\n"); +} + +// Find key in speculative_keys. Returns num_speculative_keys if not found. +static int8_t speculative_keys_find(keypos_t key) { + uint8_t i; + for (i = 0; i < num_speculative_keys; ++i) { + if (KEYEQ(speculative_keys[i].key, key)) { + break; + } + } + return i; +} + +static void speculative_key_press(keyrecord_t *record) { + if (num_speculative_keys >= SPECULATIVE_KEYS_SIZE) { // Overflow! + ac_dprintf("SPECULATIVE KEYS OVERFLOW: IGNORING EVENT\n"); + return; // Don't trigger: speculative_keys is full. + } + if (speculative_keys_find(record->event.key) < num_speculative_keys) { + return; // Don't trigger: key is already in speculative_keys. + } + + const uint16_t keycode = get_record_keycode(record, false); + if (!IS_QK_MOD_TAP(keycode)) { + return; // Don't trigger: not a mod-tap key. + } + + uint8_t mods = mod_config(QK_MOD_TAP_GET_MODS(keycode)); + if ((mods & 0x10) != 0) { // Unpack 5-bit mods to 8-bit representation. + mods <<= 4; + } + if ((~(get_mods() | speculative_mods) & mods) == 0) { + return; // Don't trigger: mods are already active. + } + + // Don't do Speculative Hold when there are non-speculated buffered events, + // since that could result in sending keys out of order. + for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { + if (!waiting_buffer[i].tap.speculated) { + return; + } + } + + if (get_speculative_hold(keycode, record)) { + record->tap.speculated = true; + speculative_mods |= mods; + // Remember the keypos and mods associated with this key. + speculative_keys[num_speculative_keys] = (speculative_key_t){ + .key = record->event.key, + .mods = mods, + }; + ++num_speculative_keys; + + ac_dprintf("Speculative Hold: "); + debug_speculative_keys(); + } +} + +uint8_t get_speculative_mods(void) { + return speculative_mods; +} + +__attribute__((weak)) bool get_speculative_hold(uint16_t keycode, keyrecord_t *record) { + const uint8_t mods = mod_config(QK_MOD_TAP_GET_MODS(keycode)); + return (mods & (MOD_LCTL | MOD_LSFT)) == mods; +} + +void speculative_key_settled(keyrecord_t *record) { + if (num_speculative_keys == 0) { + return; // Early return when there are no active speculative keys. + } + + uint8_t i = speculative_keys_find(record->event.key); + + const uint16_t keycode = get_record_keycode(record, false); + if (IS_QK_MOD_TAP(keycode) && record->tap.count == 0) { // MT hold press. + if (i < num_speculative_keys) { + --num_speculative_keys; + const uint8_t cleared_mods = speculative_keys[i].mods; + + if (num_speculative_keys) { + speculative_mods &= ~cleared_mods; + // Don't call send_keyboard_report() here; allow default + // handling to reapply the mod before the next report. + + // Remove the ith entry from speculative_keys. + for (uint8_t j = i; j < num_speculative_keys; ++j) { + speculative_keys[j] = speculative_keys[j + 1]; + } + } else { + speculative_mods = 0; + } + + ac_dprintf("Speculative Hold: settled %02x, ", cleared_mods); + debug_speculative_keys(); + } + } else { // Tap press event; cancel speculatively-held mod. + if (i >= num_speculative_keys) { + i = 0; + } + + // Clear mods for the ith key and all keys that follow. + uint8_t cleared_mods = 0; + for (uint8_t j = i; j < num_speculative_keys; ++j) { + cleared_mods |= speculative_keys[j].mods; + } + + num_speculative_keys = i; // Remove ith and following entries. + + if ((prev_speculative_mods & cleared_mods) != 0) { +# ifdef DUMMY_MOD_NEUTRALIZER_KEYCODE + neutralize_flashing_modifiers(get_mods() | prev_speculative_mods); +# endif // DUMMY_MOD_NEUTRALIZER_KEYCODE + } + + if (num_speculative_keys) { + speculative_mods &= ~cleared_mods; + } else { + speculative_mods = 0; + } + + send_keyboard_report(); + wait_ms(TAP_CODE_DELAY); + + ac_dprintf("Speculative Hold: canceled %02x, ", cleared_mods); + debug_speculative_keys(); + } +} +# endif // SPECULATIVE_HOLD + # if defined(CHORDAL_HOLD) || defined(FLOW_TAP_TERM) static void registered_taps_add(keypos_t key) { if (num_registered_taps >= REGISTERED_TAPS_SIZE) { diff --git a/quantum/action_tapping.h b/quantum/action_tapping.h index 822095270690..227e3330e12d 100644 --- a/quantum/action_tapping.h +++ b/quantum/action_tapping.h @@ -46,6 +46,36 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record); bool get_retro_tapping(uint16_t keycode, keyrecord_t *record); bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record); +#ifdef SPECULATIVE_HOLD +/** Gets the currently active speculative mods. */ +uint8_t get_speculative_mods(void); + +/** + * Callback to say if a mod-tap key may be speculatively held. + * + * By default, speculative hold is enabled for mod-tap keys where the mod is + * Ctrl, Shift, and Ctrl+Shift for either hand. + * + * @param keycode Keycode of the mod-tap key. + * @param record Record associated with the mod-tap press event. + * @return True if the mod-tap key may be speculatively held. + */ +bool get_speculative_hold(uint16_t keycode, keyrecord_t *record); + +/** + * Handler to be called on press events after tap-holds are settled. + * + * This function is to be called in process_record() in action.c, that is, just + * after tap-hold events are settled as either tapped or held. When `record` + * corresponds to a speculatively-held key, the speculative mod is cleared. + * + * @param record Record associated with the mod-tap press event. + */ +void speculative_key_settled(keyrecord_t *record); +#else +# define get_speculative_mods() 0 +#endif // SPECULATIVE_HOLD + #ifdef CHORDAL_HOLD /** * Callback to say when a key chord before the tapping term may be held. diff --git a/quantum/action_util.c b/quantum/action_util.c index 0996ff908e25..00cec24e3f0f 100644 --- a/quantum/action_util.c +++ b/quantum/action_util.c @@ -19,6 +19,7 @@ along with this program. If not, see . #include "debug.h" #include "action_util.h" #include "action_layer.h" +#include "action_tapping.h" #include "timer.h" #include "keycode_config.h" #include @@ -284,6 +285,10 @@ static uint8_t get_mods_for_report(void) { } #endif +#ifdef SPECULATIVE_HOLD + mods |= get_speculative_mods(); +#endif + #ifdef KEY_OVERRIDE_ENABLE // These need to be last to be able to properly control key overrides mods &= ~suppressed_mods; diff --git a/tests/tap_hold_configurations/speculative_hold/default/config.h b/tests/tap_hold_configurations/speculative_hold/default/config.h new file mode 100644 index 000000000000..e4bcba13c1d8 --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/default/config.h @@ -0,0 +1,23 @@ +/* Copyright 2022 Vladislav Kucheriavykh + * Copyright 2025 Google LLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "test_common.h" + +#define SPECULATIVE_HOLD +#define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_F24 diff --git a/tests/tap_hold_configurations/speculative_hold/default/test.mk b/tests/tap_hold_configurations/speculative_hold/default/test.mk new file mode 100644 index 000000000000..c03d99f6861b --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/default/test.mk @@ -0,0 +1,21 @@ +# Copyright 2022 Vladislav Kucheriavykh +# Copyright 2025 Google LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +KEY_OVERRIDE_ENABLE = yes +MAGIC_ENABLE = yes + +INTROSPECTION_KEYMAP_C = test_keymap.c + diff --git a/tests/tap_hold_configurations/speculative_hold/default/test_keymap.c b/tests/tap_hold_configurations/speculative_hold/default/test_keymap.c new file mode 100644 index 000000000000..db65374618dc --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/default/test_keymap.c @@ -0,0 +1,20 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "quantum.h" + +// Shift + Esc = Home +const key_override_t home_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, KC_HOME); + +const key_override_t *key_overrides[] = {&home_esc_override}; diff --git a/tests/tap_hold_configurations/speculative_hold/default/test_tap_hold.cpp b/tests/tap_hold_configurations/speculative_hold/default/test_tap_hold.cpp new file mode 100644 index 000000000000..c92ed5a2d036 --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/default/test_tap_hold.cpp @@ -0,0 +1,794 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include + +#include "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::AnyNumber; +using testing::InSequence; + +namespace { + +// Gets the unpacked 8-bit mods corresponding to a given mod-tap keycode. +uint8_t unpack_mod_tap_mods(uint16_t keycode) { + const uint8_t mods5 = QK_MOD_TAP_GET_MODS(keycode); + return (mods5 & 0x10) != 0 ? (mods5 << 4) : mods5; +} + +bool get_speculative_hold_all_keys(uint16_t keycode, keyrecord_t *record) { + return true; // Enable Speculative Hold for all mod-tap keys. +} + +bool process_record_user_default(uint16_t keycode, keyrecord_t *record) { + return true; +} + +// Indirection so that get_speculative_hold() and process_record_user() can be +// replaced with other functions in the test cases below. +std::function get_speculative_hold_fun = get_speculative_hold_all_keys; +std::function process_record_user_fun = process_record_user_default; + +extern "C" bool get_speculative_hold(uint16_t keycode, keyrecord_t *record) { + return get_speculative_hold_fun(keycode, record); +} + +extern "C" bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return process_record_user_fun(keycode, record); +} + +class SpeculativeHoldDefault : public TestFixture { + public: + void SetUp() override { + get_speculative_hold_fun = get_speculative_hold_all_keys; + process_record_user_fun = process_record_user_default; + } +}; + +TEST_F(SpeculativeHoldDefault, tap_mod_tap) { + TestDriver driver; + InSequence s; + static int process_record_user_calls = 0; + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_key}); + + process_record_user_fun = [](uint16_t keycode, keyrecord_t *record) { + ++process_record_user_calls; + return true; + }; + + // Press mod-tap-hold key. Mod is held speculatively. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + idle_for(10); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), MOD_BIT_LSHIFT); + // Speculative mod holds and releases are made directly, bypassing regular + // event processing. No calls have been made yet to process_record_user(). + EXPECT_EQ(process_record_user_calls, 0); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); // Speculative mod canceled. + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), 0); + // Two calls have now been made, for pressing and releasing KC_P. + EXPECT_EQ(process_record_user_calls, 2); + + // Idle for tapping term of mod tap hold key. + idle_for(TAPPING_TERM - 10); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, tap_mod_tap_neutralized) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, GUI_T(KC_P)); + + set_keymap({mod_tap_key}); + + // Press mod-tap-hold key. Mod is held speculatively. + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_key.press(); + idle_for(10); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. Speculative mod is neutralized and canceled. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Idle for tapping term of mod tap hold key. + idle_for(TAPPING_TERM - 10); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, hold_two_mod_taps) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 1, 0, LCTL_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, RALT_T(KC_B)); + + set_keymap({mod_tap_key1, mod_tap_key2}); + + // Press first mod-tap key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key1.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), MOD_BIT_LCTRL); + + // Press second mod-tap key. + EXPECT_REPORT(driver, (KC_LCTL, KC_RALT)); + mod_tap_key2.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), MOD_BIT_LCTRL | MOD_BIT_RALT); + + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), MOD_BIT_LCTRL | MOD_BIT_RALT); + + // Release first mod-tap key. + EXPECT_REPORT(driver, (KC_RALT)); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release second mod-tap key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, two_mod_taps_same_mods) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 1, 0, GUI_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, GUI_T(KC_B)); + + set_keymap({mod_tap_key1, mod_tap_key2}); + + // Press first mod-tap key. + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_key1.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Tap second mod-tap key. + EXPECT_NO_REPORT(driver); + mod_tap_key2.press(); + run_one_scan_loop(); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release first mod-tap key. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_A, KC_B)); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, respects_get_speculative_hold_callback) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 0, 0, LSFT_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 1, 0, LSFT_T(KC_B)); + auto mod_tap_key3 = KeymapKey(0, 2, 0, LCTL_T(KC_C)); + auto mod_tap_key4 = KeymapKey(0, 3, 0, LCTL_T(KC_D)); + auto mod_tap_key5 = KeymapKey(0, 4, 0, RSFT_T(KC_E)); + auto mod_tap_key6 = KeymapKey(0, 5, 0, RSFT_T(KC_F)); + + set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3, mod_tap_key4, mod_tap_key5, mod_tap_key6}); + + // Enable Speculative Hold selectively for some of the keys. + get_speculative_hold_fun = [](uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LSFT_T(KC_B): + case LCTL_T(KC_D): + case RSFT_T(KC_F): + return true; + } + return false; + }; + + for (KeymapKey *mod_tap_key : {&mod_tap_key2, &mod_tap_key4, &mod_tap_key6}) { + SCOPED_TRACE(std::string("mod_tap_key = ") + mod_tap_key->name); + const uint8_t mods = unpack_mod_tap_mods(mod_tap_key->code); + + // Long press and release mod_tap_key. + // For these keys where Speculative Hold is enabled, then the mod should + // activate immediately on keydown. + EXPECT_REPORT(driver, (KC_LCTL + biton(mods))); + mod_tap_key->press(); + run_one_scan_loop(); + EXPECT_EQ(get_speculative_mods(), mods); + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), mods); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + mod_tap_key->release(); + idle_for(TAPPING_TERM + 1); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); + } + + for (KeymapKey *mod_tap_key : {&mod_tap_key1, &mod_tap_key3, &mod_tap_key5}) { + SCOPED_TRACE(std::string("mod_tap_key = ") + mod_tap_key->name); + const uint8_t mods = unpack_mod_tap_mods(mod_tap_key->code); + + // Long press and release mod_tap_key. + // For these keys where Speculative Hold is disabled, the mod should + // activate when the key has settled after the tapping term. + EXPECT_NO_REPORT(driver); + mod_tap_key->press(); + run_one_scan_loop(); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL + biton(mods))); + idle_for(TAPPING_TERM + 1); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), mods); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + mod_tap_key->release(); + idle_for(TAPPING_TERM + 1); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); + } +} + +TEST_F(SpeculativeHoldDefault, respects_magic_mod_config) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, CTL_T(KC_P)); + + set_keymap({mod_tap_key}); + + keymap_config.swap_lctl_lgui = true; + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + keymap_config.swap_lctl_lgui = false; + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, key_overrides) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, LSFT_T(KC_A)); + auto esc_key = KeymapKey(0, 3, 0, KC_ESC); + + set_keymap({mod_tap_key, esc_key}); + + // Press mod-tap Shift key. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press Esc key. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + EXPECT_REPORT(driver, (KC_HOME)); + esc_key.press(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Release Esc key. + EXPECT_EMPTY_REPORT(driver).Times(AnyNumber()); + EXPECT_REPORT(driver, (KC_LSFT)); + esc_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap Shift key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, tap_regular_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + + set_keymap({mod_tap_key, regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Tap regular key. + EXPECT_NO_REPORT(driver); + regular_key.press(); + run_one_scan_loop(); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_REPORT(driver, (KC_P, KC_A)); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Idle for tapping term of mod tap hold key. + idle_for(TAPPING_TERM - 3); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, tap_a_mod_tap_key_while_another_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto first_mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto second_mod_tap_key = KeymapKey(0, 2, 0, RSFT_T(KC_A)); + + set_keymap({first_mod_tap_key, second_mod_tap_key}); + + // Press first mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LSFT)); + first_mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press second tap-hold key. + EXPECT_REPORT(driver, (KC_LSFT, KC_RSFT)); + second_mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release second tap-hold key. + EXPECT_NO_REPORT(driver); + second_mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release first mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_REPORT(driver, (KC_P, KC_A)); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + first_mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, tap_mod_tap_key_two_times) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap-hold key again. + EXPECT_REPORT(driver, (KC_P)); + mod_tap_key.press(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, tap_mod_tap_key_twice_and_hold_on_second_time) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap-hold key again. + EXPECT_REPORT(driver, (KC_P)); + mod_tap_key.press(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldDefault, tap_and_hold_mod_tap_key) { + TestDriver driver; + InSequence s; + static int process_record_user_calls = 0; + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_key}); + + process_record_user_fun = [](uint16_t keycode, keyrecord_t *record) { + ++process_record_user_calls; + return true; + }; + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + idle_for(TAPPING_TERM - 1); + EXPECT_EQ(get_speculative_mods(), MOD_BIT_LSHIFT); + EXPECT_EQ(get_mods(), 0); + // Speculative mod holds and releases are made directly, bypassing regular + // event processing. No calls have been made yet to process_record_user(). + EXPECT_EQ(process_record_user_calls, 0); + idle_for(2); + // Now that the key has settled, one call has been made for the hold event. + EXPECT_EQ(process_record_user_calls, 1); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), MOD_BIT_LSHIFT); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + EXPECT_EQ(process_record_user_calls, 2); + VERIFY_AND_CLEAR(driver); +} + +// Test with layer tap and speculative mod tap keys on the same layer, +// rolling from LT to MT key: +// "LT down, MT down, (wait out tapping term), LT up, MT up." +TEST_F(SpeculativeHoldDefault, lt_mt_same_layer_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + // Press layer tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap key, after flow tap term but within tapping term. The + // speculative mod activates. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Wait for the layer tap key to settle. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_C)); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with layer tap and speculative mod tap keys on the same layer, trying a +// nested press: +// "LT down, MT down, (wait out tapping term), MT up, LT up." +TEST_F(SpeculativeHoldDefault, lt_mt_same_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_C)); + run_one_scan_loop(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys: MT first, LT second. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with layer tap and speculative mod tap keys on the same layer, trying a +// nested press with the MT first: +// "MT down, LT down, (wait out tapping term), LT up, MT up." +TEST_F(SpeculativeHoldDefault, mt_lt_same_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, rolling from +// LT to MT key: +// "LT down, MT down, (wait out tapping term), LT up, MT up." +TEST_F(SpeculativeHoldDefault, lt_mt_different_layer_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, SFT_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + // Press layer tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + // Press mod tap key. + mod_tap_key.press(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_LSFT)); + layer_tap_key.release(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, slowly +// rolling from LT to MT key: +// "LT down, (wait), MT down, (wait), LT up, MT up." +TEST_F(SpeculativeHoldDefault, lt_mt_different_layer_slow_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, SFT_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, trying a +// nested press: +// "LT down, MT down, (wait out tapping term), MT up, LT up." +TEST_F(SpeculativeHoldDefault, lt_mt_different_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, SFT_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + mod_tap_key.press(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, trying a +// slow nested press: +// "LT down, (wait), MT down, MT up, LT up." +TEST_F(SpeculativeHoldDefault, lt_mt_different_layer_slow_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, SFT_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +} // namespace diff --git a/tests/tap_hold_configurations/speculative_hold/flow_tap/config.h b/tests/tap_hold_configurations/speculative_hold/flow_tap/config.h new file mode 100644 index 000000000000..6988484226ad --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/flow_tap/config.h @@ -0,0 +1,25 @@ +/* Copyright 2022 Vladislav Kucheriavykh + * Copyright 2025 Google LLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "test_common.h" + +#define SPECULATIVE_HOLD +#define FLOW_TAP_TERM 150 +#define PERMISSIVE_HOLD +#define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_F24 diff --git a/tests/tap_hold_configurations/speculative_hold/flow_tap/test.mk b/tests/tap_hold_configurations/speculative_hold/flow_tap/test.mk new file mode 100644 index 000000000000..ad8675da9d91 --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/flow_tap/test.mk @@ -0,0 +1,15 @@ +# Copyright 2022 Vladislav Kucheriavykh +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + diff --git a/tests/tap_hold_configurations/speculative_hold/flow_tap/test_tap_hold.cpp b/tests/tap_hold_configurations/speculative_hold/flow_tap/test_tap_hold.cpp new file mode 100644 index 000000000000..0433a2548d3e --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/flow_tap/test_tap_hold.cpp @@ -0,0 +1,1114 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::AnyNumber; +using testing::InSequence; + +extern "C" bool get_speculative_hold(uint16_t keycode, keyrecord_t *record) { + return true; +} + +class SpeculativeHoldFlowTapTest : public TestFixture {}; + +TEST_F(SpeculativeHoldFlowTapTest, tap_mod_tap) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_key}); + + // Press mod-tap-hold key. Mod is held speculatively. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + idle_for(10); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), MOD_BIT_LSHIFT); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); // Speculative mod canceled. + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), 0); + + // Idle for tapping term of mod tap hold key. + idle_for(TAPPING_TERM - 10); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldFlowTapTest, hold_two_mod_taps) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 1, 0, LCTL_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, RALT_T(KC_B)); + + set_keymap({mod_tap_key1, mod_tap_key2}); + + // Press first mod-tap key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key1.press(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), MOD_BIT_LCTRL); + + // Press second mod-tap key. + EXPECT_REPORT(driver, (KC_LCTL, KC_RALT)); + mod_tap_key2.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), MOD_BIT_LCTRL | MOD_BIT_RALT); + + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), MOD_BIT_LCTRL | MOD_BIT_RALT); + + // Release first mod-tap key. + EXPECT_REPORT(driver, (KC_RALT)); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release second mod-tap key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldFlowTapTest, two_mod_taps_same_mods) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 1, 0, GUI_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, GUI_T(KC_B)); + + set_keymap({mod_tap_key1, mod_tap_key2}); + + // Press first mod-tap key. + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_key1.press(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Tap second mod-tap key. + EXPECT_NO_REPORT(driver); + mod_tap_key2.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LGUI, KC_B)); + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release first mod-tap key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test an input of quick distinct taps. All should be settled as tapped. +TEST_F(SpeculativeHoldFlowTapTest, distinct_taps) { + TestDriver driver; + InSequence s; + auto regular_key = KeymapKey(0, 0, 0, KC_A); + auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_B)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_C)); + auto mod_tap_key3 = KeymapKey(0, 3, 0, ALT_T(KC_D)); + + set_keymap({regular_key, mod_tap_key1, mod_tap_key2, mod_tap_key3}); + + // Tap regular key. + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + tap_key(regular_key, FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Tap mod-tap 1. + EXPECT_REPORT(driver, (KC_B)); + mod_tap_key1.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + idle_for(FLOW_TAP_TERM + 1); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Tap mod-tap 2. + EXPECT_REPORT(driver, (KC_C)); + mod_tap_key2.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + idle_for(FLOW_TAP_TERM + 1); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Tap mod-tap 3. + EXPECT_REPORT(driver, (KC_D)); + mod_tap_key3.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + idle_for(FLOW_TAP_TERM + 1); + mod_tap_key3.release(); + idle_for(FLOW_TAP_TERM + 1); // Pause between taps. + VERIFY_AND_CLEAR(driver); + + // Tap mod-tap 1. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key1.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + idle_for(FLOW_TAP_TERM + 1); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Tap mod-tap 2. + EXPECT_REPORT(driver, (KC_C)); + mod_tap_key2.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + idle_for(TAPPING_TERM + 1); + mod_tap_key2.release(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// By default, Flow Tap is disabled when mods other than Shift and AltGr are on. +TEST_F(SpeculativeHoldFlowTapTest, hotkey_taps) { + TestDriver driver; + InSequence s; + auto ctrl_key = KeymapKey(0, 0, 0, KC_LCTL); + auto shft_key = KeymapKey(0, 1, 0, KC_LSFT); + auto alt_key = KeymapKey(0, 2, 0, KC_LALT); + auto gui_key = KeymapKey(0, 3, 0, KC_LGUI); + auto regular_key = KeymapKey(0, 4, 0, KC_A); + auto mod_tap_key = KeymapKey(0, 5, 0, RCTL_T(KC_B)); + + set_keymap({ctrl_key, shft_key, alt_key, gui_key, regular_key, mod_tap_key}); + + for (KeymapKey *mod_key : {&ctrl_key, &alt_key, &gui_key}) { + // Hold mod key. + EXPECT_REPORT(driver, (mod_key->code)); + mod_key->press(); + run_one_scan_loop(); + + // Tap regular key. + EXPECT_REPORT(driver, (mod_key->code, KC_A)); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (mod_key->code)); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap, where Flow Tap is disabled due to the held mod. + EXPECT_REPORT(driver, (mod_key->code, KC_RCTL)); + mod_tap_key.press(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap. + EXPECT_REPORT(driver, (mod_key->code)); + mod_tap_key.release(); + run_one_scan_loop(); + + // Release mod key. + EXPECT_EMPTY_REPORT(driver); + mod_key->release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + } + + // Hold Shift key. + EXPECT_REPORT(driver, (KC_LSFT)); + shft_key.press(); + run_one_scan_loop(); + + // Tap regular key. + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT)); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap, where Flow Tap applies to settle as tapped. + EXPECT_REPORT(driver, (KC_LSFT, KC_B)); + mod_tap_key.press(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.release(); + run_one_scan_loop(); + + // Release Shift key. + EXPECT_EMPTY_REPORT(driver); + shft_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test input with two mod-taps in a rolled press quickly after a regular key. +TEST_F(SpeculativeHoldFlowTapTest, rolled_press) { + TestDriver driver; + InSequence s; + auto regular_key = KeymapKey(0, 0, 0, KC_A); + auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_B)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_C)); + + set_keymap({regular_key, mod_tap_key1, mod_tap_key2}); + + // Tap regular key. + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + tap_key(regular_key); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap key 1 quickly after regular key. The mod-tap should settle + // immediately as tapped, sending `KC_B`. + EXPECT_REPORT(driver, (KC_B)); + mod_tap_key1.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap key 2 quickly. + EXPECT_REPORT(driver, (KC_B, KC_C)); + mod_tap_key2.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Hold for longer than the tapping term. + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap keys. + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key1.release(); + run_one_scan_loop(); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, long_flow_tap_settled_as_held) { + TestDriver driver; + InSequence s; + auto regular_key = KeymapKey(0, 0, 0, KC_A); + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_B)); + + set_keymap({regular_key, mod_tap_key}); + + // Tap regular key. + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + tap_key(regular_key); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap key. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Hold for the tapping term. + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, holding_multiple_mod_taps) { + TestDriver driver; + InSequence s; + auto regular_key = KeymapKey(0, 0, 0, KC_A); + auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_B)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_C)); + + set_keymap({regular_key, mod_tap_key1, mod_tap_key2}); + + // Tap regular key. + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + tap_key(regular_key); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap keys. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key1.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_LCTL)); + mod_tap_key2.press(); + idle_for(TAPPING_TERM - 5); // Hold almost until tapping term. + VERIFY_AND_CLEAR(driver); + + // Press regular key. + EXPECT_REPORT(driver, (KC_LSFT, KC_LCTL, KC_A)); + regular_key.press(); + idle_for(10); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_LSFT, KC_LCTL)); + EXPECT_REPORT(driver, (KC_LCTL)); + EXPECT_EMPTY_REPORT(driver); + regular_key.release(); + run_one_scan_loop(); + mod_tap_key1.release(); + run_one_scan_loop(); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, holding_mod_tap_with_regular_mod) { + TestDriver driver; + InSequence s; + auto regular_key = KeymapKey(0, 0, 0, KC_A); + auto mod_key = KeymapKey(0, 1, 0, KC_LSFT); + auto mod_tap_key = KeymapKey(0, 2, 0, CTL_T(KC_C)); + + set_keymap({regular_key, mod_key, mod_tap_key}); + + // Tap regular key. + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + tap_key(regular_key); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Press mod and mod-tap keys. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_LCTL)); + mod_tap_key.press(); + idle_for(TAPPING_TERM - 5); // Hold almost until tapping term. + VERIFY_AND_CLEAR(driver); + + // Press regular key. + EXPECT_REPORT(driver, (KC_LSFT, KC_LCTL, KC_A)); + regular_key.press(); + idle_for(10); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_LSFT, KC_LCTL)); + EXPECT_REPORT(driver, (KC_LCTL)); + EXPECT_EMPTY_REPORT(driver); + regular_key.release(); + run_one_scan_loop(); + mod_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, layer_tap_ignored_with_disabled_key) { + TestDriver driver; + InSequence s; + auto no_key = KeymapKey(0, 0, 0, KC_NO); + auto regular_key = KeymapKey(1, 0, 0, KC_ESC); + auto layer_tap_key = KeymapKey(0, 1, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 2, 0, CTL_T(KC_B)); + + set_keymap({no_key, regular_key, layer_tap_key, mod_tap_key}); + + EXPECT_REPORT(driver, (KC_ESC)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + tap_key(regular_key); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, layer_tap_ignored_with_disabled_key_complex) { + TestDriver driver; + InSequence s; + auto regular_key1 = KeymapKey(0, 0, 0, KC_Q); + auto layer_tap_key = KeymapKey(0, 1, 0, LT(1, KC_SPC)); + auto mod_tap_key1 = KeymapKey(0, 2, 0, CTL_T(KC_T)); + // Place RALT_T(KC_I), where Flow Tap is enabled, in the same position on + // layer 0 as KC_RGHT, where Flow Tap is disabled. This tests that Flow Tap + // tracks the keycode from the correct layer. + auto mod_tap_key2 = KeymapKey(0, 3, 0, RALT_T(KC_I)); + auto regular_key2 = KeymapKey(1, 3, 0, KC_RGHT); + + set_keymap({regular_key1, layer_tap_key, mod_tap_key1, mod_tap_key2, regular_key2}); + + // Tap regular key 1. + EXPECT_REPORT(driver, (KC_Q)); + EXPECT_EMPTY_REPORT(driver); + tap_key(regular_key1); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Hold layer-tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Tap regular key 2. + EXPECT_REPORT(driver, (KC_RALT)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_RGHT)); + EXPECT_EMPTY_REPORT(driver); + tap_key(regular_key2); + VERIFY_AND_CLEAR(driver); + + // Release layer-tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Quickly hold mod-tap key 1. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key1.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL, KC_Q)); + EXPECT_REPORT(driver, (KC_LCTL)); + tap_key(regular_key1); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, layer_tap_ignored_with_enabled_key) { + TestDriver driver; + InSequence s; + auto no_key = KeymapKey(0, 0, 0, KC_NO); + auto regular_key = KeymapKey(1, 0, 0, KC_C); + auto layer_tap_key = KeymapKey(0, 1, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 2, 0, CTL_T(KC_B)); + + set_keymap({no_key, regular_key, layer_tap_key, mod_tap_key}); + + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + tap_key(regular_key); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_B)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + idle_for(TAPPING_TERM + 1); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, quick_tap) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_A)); + + set_keymap({mod_tap_key}); + + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + tap_key(mod_tap_key); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_A)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, rolling_mt_mt) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_B)); + + set_keymap({mod_tap_key1, mod_tap_key2}); + + EXPECT_NO_REPORT(driver); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_REPORT(driver, (KC_LSFT, KC_LCTL)); + idle_for(FLOW_TAP_TERM + 1); + mod_tap_key1.press(); + run_one_scan_loop(); + mod_tap_key2.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_A, KC_B)); + EXPECT_REPORT(driver, (KC_B)); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Hold for longer than the tapping term. + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap keys. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, rolling_lt_mt_regular) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, CTL_T(KC_B)); + auto regular_key = KeymapKey(0, 2, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + EXPECT_REPORT(driver, (KC_LCTL)); + idle_for(FLOW_TAP_TERM + 1); + layer_tap_key.press(); + run_one_scan_loop(); + mod_tap_key.press(); + run_one_scan_loop(); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_A, KC_B)); + EXPECT_REPORT(driver, (KC_A, KC_B, KC_C)); + EXPECT_REPORT(driver, (KC_B, KC_C)); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Hold for longer than the tapping term. + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap keys. + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, rolling_lt_regular_mt) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto mod_tap_key = KeymapKey(0, 2, 0, CTL_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + idle_for(FLOW_TAP_TERM + 1); + layer_tap_key.press(); + run_one_scan_loop(); + regular_key.press(); + run_one_scan_loop(); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_A, KC_B)); + EXPECT_REPORT(driver, (KC_A, KC_B, KC_C)); + EXPECT_REPORT(driver, (KC_B, KC_C)); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Hold for longer than the tapping term. + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap keys. + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + regular_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, rolling_mt_mt_mt) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 0, 0, CTL_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 1, 0, GUI_T(KC_B)); + auto mod_tap_key3 = KeymapKey(0, 2, 0, ALT_T(KC_C)); + + set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3}); + + // Press mod-tap keys. + EXPECT_REPORT(driver, (KC_LCTL)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LGUI)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LGUI, KC_LALT)); + idle_for(FLOW_TAP_TERM + 1); + mod_tap_key1.press(); + run_one_scan_loop(); + mod_tap_key2.press(); + run_one_scan_loop(); + mod_tap_key3.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release first mod-tap key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_A, KC_B)); + EXPECT_REPORT(driver, (KC_A, KC_B, KC_C)); + EXPECT_REPORT(driver, (KC_B, KC_C)); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Hold for longer than the tapping term. + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Release other mod-tap keys. + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key2.release(); + run_one_scan_loop(); + mod_tap_key3.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +TEST_F(SpeculativeHoldFlowTapTest, roll_release_132) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 0, 0, CTL_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 1, 0, GUI_T(KC_B)); + auto mod_tap_key3 = KeymapKey(0, 2, 0, ALT_T(KC_C)); + + set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3}); + + // Press mod-tap keys. + EXPECT_REPORT(driver, (KC_LCTL)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LGUI)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LGUI, KC_LALT)); + idle_for(FLOW_TAP_TERM + 1); + mod_tap_key1.press(); + run_one_scan_loop(); + mod_tap_key2.press(); + idle_for(FLOW_TAP_TERM + 1); + mod_tap_key3.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release first mod-tap key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_A, KC_B)); + EXPECT_REPORT(driver, (KC_B)); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release other mod-tap keys. + EXPECT_REPORT(driver, (KC_B, KC_C)); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key3.release(); + run_one_scan_loop(); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with layer tap and speculative mod tap keys on the same layer, rolling +// from LT to MT key: +// "LT down, MT down, (wait out tapping term), LT up, MT up." +TEST_F(SpeculativeHoldFlowTapTest, lt_mt_same_layer_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + // Press layer tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap key, after flow tap term but within tapping term. The + // speculative mod activates. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Wait for the layer tap key to settle. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_C)); + idle_for(TAPPING_TERM - FLOW_TAP_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with layer tap and speculative mod tap keys on the same layer, trying +// a nested press from LT to MT key: +// "LT down, MT down, (wait out tapping term), MT up, LT up." +TEST_F(SpeculativeHoldFlowTapTest, lt_mt_same_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_C)); + idle_for(TAPPING_TERM - FLOW_TAP_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys: MT first, LT second. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with layer tap and speculative mod tap keys on the same layer, trying +// a nested press with the MT first: +// "MT down, LT down, (wait out tapping term), LT up, MT up." +TEST_F(SpeculativeHoldFlowTapTest, mt_lt_same_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, rolling from +// LT to MT key: +// "LT down, MT down, (wait out tapping term), LT up, MT up." +TEST_F(SpeculativeHoldFlowTapTest, lt_mt_different_layer_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, SFT_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + // Press layer tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(FLOW_TAP_TERM + 1); + // Press mod tap key. + mod_tap_key.press(); + idle_for(TAPPING_TERM - FLOW_TAP_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_B)); + layer_tap_key.release(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, slowly +// rolling from LT to MT key: +// "LT down, (wait), MT down, (wait), LT up, MT up." +TEST_F(SpeculativeHoldFlowTapTest, lt_mt_different_layer_slow_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, SFT_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, trying a +// nested press: +// "LT down, MT down, (wait out tapping term), MT up, LT up." +TEST_F(SpeculativeHoldFlowTapTest, lt_mt_different_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, SFT_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(FLOW_TAP_TERM + 1); + mod_tap_key.press(); + idle_for(TAPPING_TERM - FLOW_TAP_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, trying a +// slow nested press: +// "LT down, (wait), MT down, MT up, LT up." +TEST_F(SpeculativeHoldFlowTapTest, lt_mt_different_layer_slow_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, SFT_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + idle_for(FLOW_TAP_TERM + 1); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} diff --git a/tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/config.h b/tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/config.h new file mode 100644 index 000000000000..5b16a60687ca --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/config.h @@ -0,0 +1,30 @@ +/* Copyright 2022 Isaac Elenbaas + * Copyright 2025 Google LLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "test_common.h" + +#define SPECULATIVE_HOLD +#define PERMISSIVE_HOLD + +#define RETRO_SHIFT 2 * TAPPING_TERM +// releases between AUTO_SHIFT_TIMEOUT and TAPPING_TERM are not tested +#define AUTO_SHIFT_TIMEOUT TAPPING_TERM +#define AUTO_SHIFT_MODIFIERS + +#define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_F24 diff --git a/tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/test.mk b/tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/test.mk new file mode 100644 index 000000000000..7a19bcab59be --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/test.mk @@ -0,0 +1,17 @@ +# Copyright 2022 Isaac Elenbaas +# Copyright 2025 Google LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +AUTO_SHIFT_ENABLE = yes diff --git a/tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/test_retro_shift.cpp b/tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/test_retro_shift.cpp new file mode 100644 index 000000000000..b81485865bc4 --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/retro_shift_permissive_hold/test_retro_shift.cpp @@ -0,0 +1,689 @@ +// Copyright 2022 Isaac Elenbaas +// Copyright 2025 Google LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +extern "C" { +bool get_speculative_hold(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { + return true; +} +} // extern "C" + +using testing::_; +using testing::AnyNumber; +using testing::AnyOf; +using testing::InSequence; + +class RetroShiftPermissiveHold : public TestFixture {}; + +TEST_F(RetroShiftPermissiveHold, tap_regular_key_while_mod_tap_key_is_held_under_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A); + + set_keymap({mod_tap_key, regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press regular key. + EXPECT_NO_REPORT(driver); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release regular key. + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber()); + EXPECT_REPORT(driver, (KC_LCTL, KC_A)); + EXPECT_REPORT(driver, (KC_LCTL)); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(RetroShiftPermissiveHold, tap_mod_tap_key_while_mod_tap_key_is_held_under_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, LALT_T(KC_A)); + + set_keymap({mod_tap_key, mod_tap_regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap-regular key. + EXPECT_REPORT(driver, (KC_LCTL, KC_LALT)); + mod_tap_regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-regular key. + EXPECT_REPORT(driver, (KC_LCTL)); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber()); + EXPECT_REPORT(driver, (KC_LCTL, KC_A)); + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(RetroShiftPermissiveHold, tap_regular_key_while_mod_tap_key_is_held_over_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A); + + set_keymap({mod_tap_key, regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press regular key. + EXPECT_NO_REPORT(driver); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release regular key. + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber()); + EXPECT_REPORT(driver, (KC_LCTL, KC_A)); + EXPECT_REPORT(driver, (KC_LCTL)); + regular_key.release(); + run_one_scan_loop(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(RetroShiftPermissiveHold, tap_mod_tap_key_while_mod_tap_key_is_held_over_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, LALT_T(KC_A)); + + set_keymap({mod_tap_key, mod_tap_regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap-regular key. + EXPECT_REPORT(driver, (KC_LCTL, KC_LALT)); + mod_tap_regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-regular key. + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber()); + EXPECT_REPORT(driver, (KC_LCTL, KC_A)); + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_regular_key.release(); + run_one_scan_loop(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(RetroShiftPermissiveHold, hold_regular_key_while_mod_tap_key_is_held_over_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A); + + set_keymap({mod_tap_key, regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press regular key. + EXPECT_NO_REPORT(driver); + regular_key.press(); + run_one_scan_loop(); + idle_for(AUTO_SHIFT_TIMEOUT); + VERIFY_AND_CLEAR(driver); + + // Release regular key. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(KC_LCTL, KC_LSFT), + KeyboardReport(KC_LSFT), + KeyboardReport(KC_LCTL)))) + .Times(AnyNumber()); + // clang-format on + EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT, KC_A)); + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(KC_LCTL, KC_LSFT), + KeyboardReport(KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + EXPECT_REPORT(driver, (KC_LCTL)); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(RetroShiftPermissiveHold, hold_mod_tap_key_while_mod_tap_key_is_held_over_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, LALT_T(KC_A)); + + set_keymap({mod_tap_key, mod_tap_regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap-regular key. + EXPECT_REPORT(driver, (KC_LCTL, KC_LALT)); + mod_tap_regular_key.press(); + run_one_scan_loop(); + idle_for(AUTO_SHIFT_TIMEOUT); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-regular key. + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(KC_LCTL, KC_LSFT), + KeyboardReport(KC_LSFT), + KeyboardReport(KC_LCTL)))) + .Times(AnyNumber()); + // clang-format on + EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT, KC_A)); + // clang-format off + EXPECT_CALL(driver, send_keyboard_mock(AnyOf( + KeyboardReport(KC_LCTL, KC_LSFT), + KeyboardReport(KC_LSFT)))) + .Times(AnyNumber()); + // clang-format on + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_regular_key.release(); + run_one_scan_loop(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(RetroShiftPermissiveHold, roll_tap_regular_key_while_mod_tap_key_is_held_under_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A); + + set_keymap({mod_tap_key, regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press regular key. + EXPECT_NO_REPORT(driver); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release regular key. + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(RetroShiftPermissiveHold, roll_tap_mod_tap_key_while_mod_tap_key_is_held_under_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, LALT_T(KC_A)); + + set_keymap({mod_tap_key, mod_tap_regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap-regular key. + EXPECT_REPORT(driver, (KC_LCTL, KC_LALT)); + mod_tap_regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-regular key. + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(RetroShiftPermissiveHold, roll_hold_regular_key_while_mod_tap_key_is_held_under_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A); + + set_keymap({mod_tap_key, regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press regular key. + EXPECT_NO_REPORT(driver); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber()); + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber()); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + idle_for(AUTO_SHIFT_TIMEOUT); + VERIFY_AND_CLEAR(driver); + + // Release regular key. + EXPECT_NO_REPORT(driver); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(RetroShiftPermissiveHold, roll_hold_mod_tap_key_while_mod_tap_key_is_held_under_tapping_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 0, 0, LCTL_T(KC_P)); + auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, LALT_T(KC_A)); + + set_keymap({mod_tap_key, mod_tap_regular_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap-regular key. + EXPECT_REPORT(driver, (KC_LCTL, KC_LALT)); + mod_tap_regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-regular key. + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber()); + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber()); + EXPECT_EMPTY_REPORT(driver); + idle_for(AUTO_SHIFT_TIMEOUT); + mod_tap_regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +// Test with layer tap and speculative mod tap keys on the same layer, rolling +// from LT to MT key: +// "LT down, MT down, (wait out tapping term), LT up, MT up." +TEST_F(RetroShiftPermissiveHold, lt_mt_same_layer_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, LCTL_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + // Press layer tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap key, after flow tap term but within tapping term. The + // speculative mod activates. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Wait for the layer tap key to settle. + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with layer tap and speculative mod tap keys on the same layer, trying +// a nested press from LT to MT key: +// "LT down, MT down, (wait out tapping term), MT up, LT up." +TEST_F(RetroShiftPermissiveHold, lt_mt_same_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, LCTL_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + run_one_scan_loop(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys: MT first, LT second. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_LSFT, KC_C)); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with layer tap and speculative mod tap keys on the same layer, trying +// a nested press with the MT first: +// "MT down, LT down, (wait out tapping term), LT up, MT up." +TEST_F(RetroShiftPermissiveHold, mt_lt_same_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, LCTL_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT)); + EXPECT_REPORT(driver, (KC_LCTL)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, rolling from +// LT to MT key: +// "LT down, MT down, (wait out tapping term), LT up, MT up." +TEST_F(RetroShiftPermissiveHold, lt_mt_different_layer_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, LCTL_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + // Press layer tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + // Press mod tap key. + mod_tap_key.press(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_B)); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, slowly +// rolling from LT to MT key: +// "LT down, (wait), MT down, (wait), LT up, MT up." +TEST_F(RetroShiftPermissiveHold, lt_mt_different_layer_slow_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, LCTL_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_A)); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, try a nested +// press: +// "LT down, MT down, (wait out tapping term), MT up, LT up." +TEST_F(RetroShiftPermissiveHold, lt_mt_different_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, LCTL_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + mod_tap_key.press(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_LSFT, KC_C)); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, try a slow +// nested press: +// "LT down, (wait), MT down, MT up, LT up." +TEST_F(RetroShiftPermissiveHold, lt_mt_different_layer_slow_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, LCTL_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} diff --git a/tests/tap_hold_configurations/speculative_hold/retro_tapping/config.h b/tests/tap_hold_configurations/speculative_hold/retro_tapping/config.h new file mode 100644 index 000000000000..b20ddbdcad8d --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/retro_tapping/config.h @@ -0,0 +1,24 @@ +/* Copyright 2022 Vladislav Kucheriavykh + * Copyright 2025 Google LLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "test_common.h" + +#define SPECULATIVE_HOLD +#define RETRO_TAPPING +#define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_F24 diff --git a/tests/tap_hold_configurations/speculative_hold/retro_tapping/test.mk b/tests/tap_hold_configurations/speculative_hold/retro_tapping/test.mk new file mode 100644 index 000000000000..9bc3366e140a --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/retro_tapping/test.mk @@ -0,0 +1,15 @@ +# Copyright 2022 Vladislav Kucheriavykh +# Copyright 2025 Google LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . diff --git a/tests/tap_hold_configurations/speculative_hold/retro_tapping/test_tap_hold.cpp b/tests/tap_hold_configurations/speculative_hold/retro_tapping/test_tap_hold.cpp new file mode 100644 index 000000000000..de70bf09fd36 --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/retro_tapping/test_tap_hold.cpp @@ -0,0 +1,629 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::InSequence; + +extern "C" bool get_speculative_hold(uint16_t keycode, keyrecord_t *record) { + return true; +} + +class SpeculativeHoldRetroTappingTest : public TestFixture {}; + +TEST_F(SpeculativeHoldRetroTappingTest, roll_regular_to_lgui_mod) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, LGUI_T(KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_B); + + set_keymap({mod_tap_key, regular_key}); + + EXPECT_REPORT(driver, (KC_B)); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_B, KC_LGUI)); + mod_tap_key.press(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LGUI)); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Neutralizer invoked by Speculative Hold. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldRetroTappingTest, regular_to_mod_under_tap_term) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, LSFT_T(KC_A)); + auto regular_key = KeymapKey(0, 2, 0, KC_B); + + set_keymap({mod_tap_key, regular_key}); + + EXPECT_REPORT(driver, (KC_B)); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_B, KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT)); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldRetroTappingTest, mod_under_tap_term_to_regular) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, LGUI_T(KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_B); + + set_keymap({mod_tap_key, regular_key}); + + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Neutralizer invoked by Speculative Hold. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_REPORT(driver, (KC_B, KC_P)); + EXPECT_REPORT(driver, (KC_B)); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldRetroTappingTest, mod_over_tap_term_to_regular) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, LSFT_T(KC_A)); + auto regular_key = KeymapKey(0, 2, 0, KC_B); + + set_keymap({mod_tap_key, regular_key}); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + idle_for(TAPPING_TERM); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_B)); + regular_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_B)); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + regular_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldRetroTappingTest, mod_under_tap_term_to_mod_under_tap_term) { + TestDriver driver; + InSequence s; + auto mod_tap_lgui = KeymapKey(0, 1, 0, LGUI_T(KC_P)); + auto mod_tap_lsft = KeymapKey(0, 2, 0, LSFT_T(KC_A)); + + set_keymap({mod_tap_lgui, mod_tap_lsft}); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_lsft.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_LGUI)); + mod_tap_lgui.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_lsft.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_lgui.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldRetroTappingTest, mod_over_tap_term_to_mod_under_tap_term) { + TestDriver driver; + InSequence s; + auto mod_tap_lgui = KeymapKey(0, 1, 0, LGUI_T(KC_P)); + auto mod_tap_lsft = KeymapKey(0, 2, 0, LSFT_T(KC_A)); + + set_keymap({mod_tap_lgui, mod_tap_lsft}); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_lsft.press(); + idle_for(TAPPING_TERM); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_LGUI)); + mod_tap_lgui.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + mod_tap_lsft.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_REPORT(driver, (KC_LSFT, KC_P)); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_lgui.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldRetroTappingTest, mod_under_tap_term_to_mod_over_tap_term) { + TestDriver driver; + InSequence s; + auto mod_tap_lgui = KeymapKey(0, 1, 0, LGUI_T(KC_P)); + auto mod_tap_lsft = KeymapKey(0, 2, 0, LSFT_T(KC_A)); + + set_keymap({mod_tap_lgui, mod_tap_lsft}); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_lsft.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_LGUI)); + mod_tap_lgui.press(); + idle_for(TAPPING_TERM); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_lsft.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Neutralizer invoked by Retro Tapping. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_REPORT(driver, (KC_P, KC_LSFT)); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_lgui.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldRetroTappingTest, mod_under_tap_term_to_mod_over_tap_term_offset) { + TestDriver driver; + InSequence s; + auto mod_tap_lgui = KeymapKey(0, 1, 0, LGUI_T(KC_P)); + auto mod_tap_lsft = KeymapKey(0, 2, 0, LSFT_T(KC_A)); + + set_keymap({mod_tap_lgui, mod_tap_lsft}); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_lsft.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_LGUI)); + mod_tap_lgui.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_lsft.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LGUI)); + // Neutralizer invoked by Retro Tapping. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + idle_for(TAPPING_TERM); + mod_tap_lgui.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldRetroTappingTest, mod_over_tap_term_to_mod_over_tap_term) { + TestDriver driver; + InSequence s; + auto mod_tap_lgui = KeymapKey(0, 1, 0, LGUI_T(KC_P)); + auto mod_tap_lsft = KeymapKey(0, 2, 0, LSFT_T(KC_A)); + + set_keymap({mod_tap_lgui, mod_tap_lsft}); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_lsft.press(); + idle_for(TAPPING_TERM); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_LGUI)); + mod_tap_lgui.press(); + idle_for(TAPPING_TERM); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_lsft.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Neutralizer invoked by Retro Tapping. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_REPORT(driver, (KC_P, KC_LSFT)); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_lgui.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldRetroTappingTest, mod_to_mod_to_mod) { + TestDriver driver; + InSequence s; + auto mod_tap_lalt = KeymapKey(0, 1, 0, LALT_T(KC_R)); + auto mod_tap_lsft = KeymapKey(0, 2, 0, SFT_T(KC_A)); + auto mod_tap_lctl = KeymapKey(0, 3, 0, LCTL_T(KC_C)); + + set_keymap({mod_tap_lalt, mod_tap_lsft, mod_tap_lctl}); + + EXPECT_REPORT(driver, (KC_LALT)); + mod_tap_lalt.press(); + idle_for(TAPPING_TERM); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT, KC_LALT)); + mod_tap_lsft.press(); + idle_for(TAPPING_TERM); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_lalt.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT)); + mod_tap_lctl.press(); + idle_for(TAPPING_TERM); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_lsft.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_REPORT(driver, (KC_C, KC_LSFT)); + EXPECT_REPORT(driver, (KC_LSFT)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_lctl.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +// Test with layer tap and speculative mod tap keys on the same layer, rolling +// from LT to MT key: +// "LT down, MT down, (wait out tapping term), LT up, MT up." +TEST_F(SpeculativeHoldRetroTappingTest, lt_mt_same_layer_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, LCTL_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + // Press layer tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap key, after flow tap term but within tapping term. The + // speculative mod activates. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Wait for the layer tap key to settle. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_C)); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with layer tap and speculative mod tap keys on the same layer, trying a +// nested press: +// "LT down, MT down, (wait out tapping term), MT up, LT up." +TEST_F(SpeculativeHoldRetroTappingTest, lt_mt_same_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, LCTL_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_C)); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys: MT first, LT second. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with layer tap and speculative mod tap keys on the same layer, trying a +// nested press with the MT first: +// "MT down, LT down, (wait out tapping term), LT up, MT up." +TEST_F(SpeculativeHoldRetroTappingTest, mt_lt_same_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto mod_tap_key = KeymapKey(0, 1, 0, LCTL_T(KC_B)); + auto regular_key = KeymapKey(1, 1, 0, KC_C); + + set_keymap({layer_tap_key, mod_tap_key, regular_key}); + + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL, KC_A)); + EXPECT_REPORT(driver, (KC_LCTL)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, rolling from +// LT to MT key: +// "LT down, MT down, (wait out tapping term), LT up, MT up." +TEST_F(SpeculativeHoldRetroTappingTest, lt_mt_different_layer_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, LCTL_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + // Press layer tap key. + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + // Press mod tap key. + mod_tap_key.press(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_LCTL)); + layer_tap_key.release(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, slowly +// rolling from LT to MT key: +// "LT down, (wait), MT down, (wait), LT up, MT up." +TEST_F(SpeculativeHoldRetroTappingTest, lt_mt_different_layer_slow_roll) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, LCTL_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_REPORT(driver, (KC_LCTL)); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + layer_tap_key.release(); + run_one_scan_loop(); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, trying a +// nested press: +// "LT down, MT down, (wait out tapping term), MT up, LT up." +TEST_F(SpeculativeHoldRetroTappingTest, lt_mt_different_layer_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, LCTL_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_NO_REPORT(driver); + layer_tap_key.press(); + run_one_scan_loop(); + mod_tap_key.press(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release keys. + EXPECT_REPORT(driver, (KC_LCTL)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} + +// Test with a speculative mod tap key reached by a layer tap key, slowly making +// a nested press from LT to MT key: +// "LT down, (wait), MT down, MT up, LT up." +TEST_F(SpeculativeHoldRetroTappingTest, lt_mt_different_layer_slow_nested_press) { + TestDriver driver; + InSequence s; + auto layer_tap_key = KeymapKey(0, 0, 0, LT(1, KC_A)); + auto regular_key = KeymapKey(0, 1, 0, KC_B); + auto placeholder_key = KeymapKey(1, 0, 0, KC_NO); + auto mod_tap_key = KeymapKey(1, 1, 0, LCTL_T(KC_C)); + + set_keymap({layer_tap_key, regular_key, placeholder_key, mod_tap_key}); + + EXPECT_REPORT(driver, (KC_LCTL)); + layer_tap_key.press(); + idle_for(TAPPING_TERM + 1); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_C)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + layer_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + // All mods are released. + EXPECT_EQ(get_mods() | get_speculative_mods(), 0); +} From 28eeb92f8eec5b8268d2a74ad0561670d14e189a Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 11 Nov 2025 04:02:35 -0800 Subject: [PATCH 1110/1205] Add I2C Transmit and Receive function (#25637) * feat: adds a transmit and receive i2c method * fix: address the i2c transmit and receive length on u16 * Add AVR/LUFA implementation Didn't add a progmem version, since that would only apply to receive. Figured it wasn't worth it, but can add. * Rearrange order of functions * Add docs * Fix doc gen error * Fix lint issues * fix more lint issues --- docs/drivers/i2c.md | 25 +++++++++++++++++++++++++ drivers/i2c_master.h | 15 +++++++++++++++ platforms/avr/drivers/i2c_master.c | 26 ++++++++++++++++++++++++++ platforms/chibios/drivers/i2c_master.c | 6 ++++++ 4 files changed, 72 insertions(+) diff --git a/docs/drivers/i2c.md b/docs/drivers/i2c.md index ad74d0e481d1..75823c682b2c 100644 --- a/docs/drivers/i2c.md +++ b/docs/drivers/i2c.md @@ -221,6 +221,31 @@ Receive multiple bytes from the selected I2C device. --- +### `i2c_status_t i2c_transmit_and_receive(uint8_t address, const uint8_t* tx_data, uint16_t tx_length, uint8_t* rx_data, uint16_t rx_length, uint16_t timeout)` {#api-i2c-transmit-and-receive} + +Send and receive multiple bytes from the selected I2C device. + +#### Arguments {#api-i2c-transmit-and-receive-arguments} + + - `uint8_t address` + The 7-bit I2C address of the device. + - `const uint8_t* tx_data` + A pointer to the data to transmit. + - `uint16_t tx_length` + The number of bytes to write. Take care not to overrun the length of `tx_data`. + - `uint8_t* rx_data` + A pointer to a buffer to read into. + - `uint16_t rx_length` + The number of bytes to read. Take care not to overrun the length of `data`. + - `uint16_t timeout` + The time in milliseconds to wait for a response from the target device. + +#### Return Value {#api-i2c-transmit-and-receive-return} + +`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`. + +--- + ### `i2c_status_t i2c_write_register(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-write-register} Write to a register with an 8-bit address on the I2C device. diff --git a/drivers/i2c_master.h b/drivers/i2c_master.h index dbe1cd42faa4..5f6094bc8159 100644 --- a/drivers/i2c_master.h +++ b/drivers/i2c_master.h @@ -72,6 +72,21 @@ i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t* data, uint16_t lengt */ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); +/** + * \brief Send multiple bytes and then receive multiple bytes from the selected I2C device. + * + * \param address The 7-bit I2C address of the device. + * \param tx_data A pointer to the data to transmit. + * \param tx_length The number of bytes to write. Take care not to overrun the length of `tx_data`. + * \param rx_data A pointer to a buffer to read into. + * \param rx_length The number of bytes to read. Take care not to overrun the length of `rx_data`. + * \param timeout The time in milliseconds to wait for a response from the target device. + * + * \return `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`. + */ + +i2c_status_t i2c_transmit_and_receive(uint8_t address, const uint8_t* tx_data, uint16_t tx_length, uint8_t* rx_data, uint16_t rx_length, uint16_t timeout); + /** * \brief Write to a register with an 8-bit address on the I2C device. * diff --git a/platforms/avr/drivers/i2c_master.c b/platforms/avr/drivers/i2c_master.c index 9136f4a7b926..e5caa995cf5b 100644 --- a/platforms/avr/drivers/i2c_master.c +++ b/platforms/avr/drivers/i2c_master.c @@ -207,6 +207,32 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16 return (status < 0) ? status : I2C_STATUS_SUCCESS; } +i2c_status_t i2c_transmit_and_receive(uint8_t address, const uint8_t* tx_data, uint16_t tx_length, uint8_t* rx_data, uint16_t rx_length, uint16_t timeout) { + i2c_status_t status = i2c_start(address | I2C_ACTION_WRITE, timeout); + + for (uint16_t i = 0; i < tx_length && status >= 0; i++) { + status = i2c_write(tx_data[i], timeout); + } + + for (uint16_t i = 0; i < (rx_length - 1) && status >= 0; i++) { + status = i2c_read_ack(timeout); + if (status >= 0) { + rx_data[i] = status; + } + } + + if (status >= 0) { + status = i2c_read_nack(timeout); + if (status >= 0) { + rx_data[(rx_length - 1)] = status; + } + } + + i2c_stop(); + + return status; +} + i2c_status_t i2c_write_register(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(devaddr | 0x00, timeout); if (status >= 0) { diff --git a/platforms/chibios/drivers/i2c_master.c b/platforms/chibios/drivers/i2c_master.c index 20850859b5cf..a44051b82a92 100644 --- a/platforms/chibios/drivers/i2c_master.c +++ b/platforms/chibios/drivers/i2c_master.c @@ -160,6 +160,12 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16 return i2c_epilogue(status); } +i2c_status_t i2c_transmit_and_receive(uint8_t address, const uint8_t* tx_data, uint16_t tx_length, uint8_t* rx_data, uint16_t rx_length, uint16_t timeout) { + i2cStart(&I2C_DRIVER, &i2cconfig); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (address >> 1), tx_data, tx_length, rx_data, rx_length, TIME_MS2I(timeout)); + return i2c_epilogue(status); +} + i2c_status_t i2c_write_register(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { i2cStart(&I2C_DRIVER, &i2cconfig); From e7ad19bb953c6f430fb3501386b96962dbe9912c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Mart=C3=ADnez?= <58857054+elpekenin@users.noreply.github.com> Date: Tue, 11 Nov 2025 13:20:48 +0100 Subject: [PATCH 1111/1205] [Bugfix] QP error handling (#25591) * change QP so that any func can return error (`void` -> `bool` returns) --- drivers/painter/comms/qp_comms_dummy.c | 3 ++- drivers/painter/comms/qp_comms_i2c.c | 17 +++++++++++----- drivers/painter/comms/qp_comms_i2c.h | 2 +- drivers/painter/comms/qp_comms_spi.c | 10 ++++++--- drivers/painter/comms/qp_comms_spi.h | 6 +++--- drivers/painter/gc9xxx/qp_gc9107.c | 8 ++++---- drivers/painter/gc9xxx/qp_gc9a01.c | 8 ++++---- drivers/painter/ili9xxx/qp_ili9163.c | 8 ++++---- drivers/painter/ili9xxx/qp_ili9341.c | 8 ++++---- drivers/painter/ili9xxx/qp_ili9486.c | 16 +++++++++------ drivers/painter/ili9xxx/qp_ili9488.c | 8 ++++---- drivers/painter/ld7032/qp_ld7032.c | 28 ++++++++++++++++++-------- drivers/painter/sh1106/qp_sh1106.c | 3 +-- drivers/painter/sh1107/qp_sh1107.c | 3 +-- drivers/painter/ssd1351/qp_ssd1351.c | 12 ++++++----- drivers/painter/st77xx/qp_st7735.c | 8 ++++++-- drivers/painter/st77xx/qp_st7789.c | 8 ++++++-- quantum/painter/qp_comms.c | 12 +++++------ quantum/painter/qp_comms.h | 6 +++--- quantum/painter/qp_internal_driver.h | 6 +++--- 20 files changed, 108 insertions(+), 72 deletions(-) diff --git a/drivers/painter/comms/qp_comms_dummy.c b/drivers/painter/comms/qp_comms_dummy.c index 2ed49d223277..7a2aef5d3780 100644 --- a/drivers/painter/comms/qp_comms_dummy.c +++ b/drivers/painter/comms/qp_comms_dummy.c @@ -15,8 +15,9 @@ static bool dummy_comms_start(painter_device_t device) { return true; } -static void dummy_comms_stop(painter_device_t device) { +static bool dummy_comms_stop(painter_device_t device) { // No-op. + return true; } uint32_t dummy_comms_send(painter_device_t device, const void *data, uint32_t byte_count) { diff --git a/drivers/painter/comms/qp_comms_i2c.c b/drivers/painter/comms/qp_comms_i2c.c index 93f503f3ddaa..f093c87ee46b 100644 --- a/drivers/painter/comms/qp_comms_i2c.c +++ b/drivers/painter/comms/qp_comms_i2c.c @@ -35,7 +35,9 @@ uint32_t qp_comms_i2c_send_data(painter_device_t device, const void *data, uint3 return qp_comms_i2c_send_raw(device, data, byte_count); } -void qp_comms_i2c_stop(painter_device_t device) {} +bool qp_comms_i2c_stop(painter_device_t device) { + return true; +} //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Command+Data I2C support @@ -43,9 +45,9 @@ void qp_comms_i2c_stop(painter_device_t device) {} static const uint8_t cmd_byte = 0x00; static const uint8_t data_byte = 0x40; -void qp_comms_i2c_cmddata_send_command(painter_device_t device, uint8_t cmd) { +bool qp_comms_i2c_cmddata_send_command(painter_device_t device, uint8_t cmd) { uint8_t buf[2] = {cmd_byte, cmd}; - qp_comms_i2c_send_raw(device, &buf, 2); + return qp_comms_i2c_send_raw(device, &buf, 2); } uint32_t qp_comms_i2c_cmddata_send_data(painter_device_t device, const void *data, uint32_t byte_count) { @@ -58,7 +60,7 @@ uint32_t qp_comms_i2c_cmddata_send_data(painter_device_t device, const void *dat return byte_count; } -void qp_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { +bool qp_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { uint8_t buf[32]; for (size_t i = 0; i < sequence_len;) { uint8_t command = sequence[i]; @@ -67,12 +69,17 @@ void qp_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8_t * buf[0] = cmd_byte; buf[1] = command; memcpy(&buf[2], &sequence[i + 3], num_bytes); - qp_comms_i2c_send_raw(device, buf, num_bytes + 2); + if (!qp_comms_i2c_send_raw(device, buf, num_bytes + 2)) { + return false; + } + if (delay > 0) { wait_ms(delay); } i += (3 + num_bytes); } + + return true; } const painter_comms_with_command_vtable_t i2c_comms_cmddata_vtable = { diff --git a/drivers/painter/comms/qp_comms_i2c.h b/drivers/painter/comms/qp_comms_i2c.h index 70083d6526f2..06a284dc15ca 100644 --- a/drivers/painter/comms/qp_comms_i2c.h +++ b/drivers/painter/comms/qp_comms_i2c.h @@ -19,7 +19,7 @@ typedef struct qp_comms_i2c_config_t { bool qp_comms_i2c_init(painter_device_t device); bool qp_comms_i2c_start(painter_device_t device); uint32_t qp_comms_i2c_send_data(painter_device_t device, const void* data, uint32_t byte_count); -void qp_comms_i2c_stop(painter_device_t device); +bool qp_comms_i2c_stop(painter_device_t device); extern const painter_comms_with_command_vtable_t i2c_comms_cmddata_vtable; diff --git a/drivers/painter/comms/qp_comms_spi.c b/drivers/painter/comms/qp_comms_spi.c index 4e6067394b38..31b68dfdf601 100644 --- a/drivers/painter/comms/qp_comms_spi.c +++ b/drivers/painter/comms/qp_comms_spi.c @@ -45,11 +45,12 @@ uint32_t qp_comms_spi_send_data(painter_device_t device, const void *data, uint3 return byte_count - bytes_remaining; } -void qp_comms_spi_stop(painter_device_t device) { +bool qp_comms_spi_stop(painter_device_t device) { painter_driver_t * driver = (painter_driver_t *)device; qp_comms_spi_config_t *comms_config = (qp_comms_spi_config_t *)driver->comms_config; spi_stop(); gpio_write_pin_high(comms_config->chip_select_pin); + return true; } const painter_comms_vtable_t spi_comms_vtable = { @@ -97,14 +98,15 @@ uint32_t qp_comms_spi_dc_reset_send_data(painter_device_t device, const void *da return qp_comms_spi_send_data(device, data, byte_count); } -void qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd) { +bool qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd) { painter_driver_t * driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; gpio_write_pin_low(comms_config->dc_pin); spi_write(cmd); + return true; } -void qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { +bool qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { painter_driver_t * driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; for (size_t i = 0; i < sequence_len;) { @@ -126,6 +128,8 @@ void qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const } i += (3 + num_bytes); } + + return true; } const painter_comms_with_command_vtable_t spi_comms_with_dc_vtable = { diff --git a/drivers/painter/comms/qp_comms_spi.h b/drivers/painter/comms/qp_comms_spi.h index c39ea95f726d..bb1a84151988 100644 --- a/drivers/painter/comms/qp_comms_spi.h +++ b/drivers/painter/comms/qp_comms_spi.h @@ -22,7 +22,7 @@ typedef struct qp_comms_spi_config_t { bool qp_comms_spi_init(painter_device_t device); bool qp_comms_spi_start(painter_device_t device); uint32_t qp_comms_spi_send_data(painter_device_t device, const void* data, uint32_t byte_count); -void qp_comms_spi_stop(painter_device_t device); +bool qp_comms_spi_stop(painter_device_t device); extern const painter_comms_vtable_t spi_comms_vtable; @@ -39,9 +39,9 @@ typedef struct qp_comms_spi_dc_reset_config_t { } qp_comms_spi_dc_reset_config_t; bool qp_comms_spi_dc_reset_init(painter_device_t device); -void qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd); +bool qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd); uint32_t qp_comms_spi_dc_reset_send_data(painter_device_t device, const void* data, uint32_t byte_count); -void qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len); +bool qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len); extern const painter_comms_with_command_vtable_t spi_comms_with_dc_vtable; diff --git a/drivers/painter/gc9xxx/qp_gc9107.c b/drivers/painter/gc9xxx/qp_gc9107.c index 108344da4f20..f0eb24d0cd1e 100644 --- a/drivers/painter/gc9xxx/qp_gc9107.c +++ b/drivers/painter/gc9xxx/qp_gc9107.c @@ -32,7 +32,9 @@ __attribute__((weak)) bool qp_gc9107_init(painter_device_t device, painter_rotat }; // clang-format on - qp_comms_bulk_command_sequence(device, gc9107_init_sequence, sizeof(gc9107_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, gc9107_init_sequence, sizeof(gc9107_init_sequence))) { + return false; + } // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { @@ -41,9 +43,7 @@ __attribute__((weak)) bool qp_gc9107_init(painter_device_t device, painter_rotat [QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY, [QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY, }; - qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]); - - return true; + return qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/drivers/painter/gc9xxx/qp_gc9a01.c b/drivers/painter/gc9xxx/qp_gc9a01.c index f037a4cc87b2..a9b5e4b057a6 100644 --- a/drivers/painter/gc9xxx/qp_gc9a01.c +++ b/drivers/painter/gc9xxx/qp_gc9a01.c @@ -45,7 +45,9 @@ __attribute__((weak)) bool qp_gc9a01_init(painter_device_t device, painter_rotat }; // clang-format on - qp_comms_bulk_command_sequence(device, gc9a01_init_sequence, sizeof(gc9a01_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, gc9a01_init_sequence, sizeof(gc9a01_init_sequence))) { + return false; + } // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { @@ -54,9 +56,7 @@ __attribute__((weak)) bool qp_gc9a01_init(painter_device_t device, painter_rotat [QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY, [QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY, }; - qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]); - - return true; + return qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/drivers/painter/ili9xxx/qp_ili9163.c b/drivers/painter/ili9xxx/qp_ili9163.c index 7f439dc317ab..74c5cb28ee63 100644 --- a/drivers/painter/ili9xxx/qp_ili9163.c +++ b/drivers/painter/ili9xxx/qp_ili9163.c @@ -41,7 +41,9 @@ __attribute__((weak)) bool qp_ili9163_init(painter_device_t device, painter_rota ILI9XXX_CMD_DISPLAY_ON, 20, 0 }; // clang-format on - qp_comms_bulk_command_sequence(device, ili9163_init_sequence, sizeof(ili9163_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, ili9163_init_sequence, sizeof(ili9163_init_sequence))) { + return false; + } // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { @@ -50,9 +52,7 @@ __attribute__((weak)) bool qp_ili9163_init(painter_device_t device, painter_rota [QP_ROTATION_180] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MX | ILI9XXX_MADCTL_MY, [QP_ROTATION_270] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MV | ILI9XXX_MADCTL_MY, }; - qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]); - - return true; + return qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/drivers/painter/ili9xxx/qp_ili9341.c b/drivers/painter/ili9xxx/qp_ili9341.c index a101b292aa04..4ca22d8a73b7 100644 --- a/drivers/painter/ili9xxx/qp_ili9341.c +++ b/drivers/painter/ili9xxx/qp_ili9341.c @@ -48,7 +48,9 @@ __attribute__((weak)) bool qp_ili9341_init(painter_device_t device, painter_rota ILI9XXX_CMD_DISPLAY_ON, 20, 0 }; // clang-format on - qp_comms_bulk_command_sequence(device, ili9341_init_sequence, sizeof(ili9341_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, ili9341_init_sequence, sizeof(ili9341_init_sequence))) { + return false; + } // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { @@ -57,9 +59,7 @@ __attribute__((weak)) bool qp_ili9341_init(painter_device_t device, painter_rota [QP_ROTATION_180] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MX | ILI9XXX_MADCTL_MY, [QP_ROTATION_270] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MV | ILI9XXX_MADCTL_MY, }; - qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]); - - return true; + return qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/drivers/painter/ili9xxx/qp_ili9486.c b/drivers/painter/ili9xxx/qp_ili9486.c index 48db779c047f..df2d084aa3a5 100644 --- a/drivers/painter/ili9xxx/qp_ili9486.c +++ b/drivers/painter/ili9xxx/qp_ili9486.c @@ -37,7 +37,9 @@ bool qp_ili9486_init(painter_device_t device, painter_rotation_t rotation) { ILI9XXX_SET_INVERSION_CTL, 0, 1, 0x02, }; // clang-format on - qp_comms_bulk_command_sequence(device, ili9486_init_sequence, sizeof(ili9486_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, ili9486_init_sequence, sizeof(ili9486_init_sequence))) { + return false; + } // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { @@ -62,22 +64,22 @@ bool qp_ili9486_init(painter_device_t device, painter_rotation_t rotation) { ILI9XXX_CMD_DISPLAY_ON, 5, 0, }; // clang-format on - qp_comms_bulk_command_sequence(device, rotation_sequence, sizeof(rotation_sequence)); - - return true; + return qp_comms_bulk_command_sequence(device, rotation_sequence, sizeof(rotation_sequence)); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Driver vtable // waveshare variant needs some tweaks due to shift registers -static void qp_comms_spi_dc_reset_send_command_odd_cs_pulse(painter_device_t device, uint8_t cmd) { +static bool qp_comms_spi_dc_reset_send_command_odd_cs_pulse(painter_device_t device, uint8_t cmd) { painter_driver_t * driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; gpio_write_pin_low(comms_config->spi_config.chip_select_pin); qp_comms_spi_dc_reset_send_command(device, cmd); gpio_write_pin_high(comms_config->spi_config.chip_select_pin); + + return true; } static uint32_t qp_comms_spi_send_data_odd_cs_pulse(painter_device_t device, const void *data, uint32_t byte_count) { @@ -124,7 +126,7 @@ static uint32_t qp_ili9486_send_data_toggling(painter_device_t device, const uin return ret; } -static void qp_comms_spi_send_command_sequence_odd_cs_pulse(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { +static bool qp_comms_spi_send_command_sequence_odd_cs_pulse(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { for (size_t i = 0; i < sequence_len;) { uint8_t command = sequence[i]; uint8_t delay = sequence[i + 1]; @@ -140,6 +142,8 @@ static void qp_comms_spi_send_command_sequence_odd_cs_pulse(painter_device_t dev } i += (3 + num_bytes); } + + return true; } static bool qp_ili9486_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { diff --git a/drivers/painter/ili9xxx/qp_ili9488.c b/drivers/painter/ili9xxx/qp_ili9488.c index 63deaf5f2e99..fd05db8751a3 100644 --- a/drivers/painter/ili9xxx/qp_ili9488.c +++ b/drivers/painter/ili9xxx/qp_ili9488.c @@ -41,7 +41,9 @@ __attribute__((weak)) bool qp_ili9488_init(painter_device_t device, painter_rota ILI9XXX_CMD_DISPLAY_ON, 20, 0 }; // clang-format on - qp_comms_bulk_command_sequence(device, ili9488_init_sequence, sizeof(ili9488_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, ili9488_init_sequence, sizeof(ili9488_init_sequence))) { + return false; + } // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { @@ -50,9 +52,7 @@ __attribute__((weak)) bool qp_ili9488_init(painter_device_t device, painter_rota [QP_ROTATION_180] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MX, [QP_ROTATION_270] = ILI9XXX_MADCTL_BGR | ILI9XXX_MADCTL_MV, }; - qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]); - - return true; + return qp_comms_command_databyte(device, ILI9XXX_SET_MEM_ACS_CTL, madctl[rotation]); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/drivers/painter/ld7032/qp_ld7032.c b/drivers/painter/ld7032/qp_ld7032.c index f43ae8e60d7a..d73430cc75fb 100644 --- a/drivers/painter/ld7032/qp_ld7032.c +++ b/drivers/painter/ld7032/qp_ld7032.c @@ -10,7 +10,7 @@ #include "qp_surface.h" #include "qp_surface_internal.h" -typedef void (*ld7032_driver_comms_send_command_and_data_func)(painter_device_t device, uint8_t cmd, uint8_t data); +typedef bool (*ld7032_driver_comms_send_command_and_data_func)(painter_device_t device, uint8_t cmd, uint8_t data); typedef uint32_t (*ld7032_driver_comms_send_command_and_databuf_func)(painter_device_t device, uint8_t cmd, const void *data, uint32_t byte_count); typedef struct ld7032_comms_with_command_vtable_t { @@ -25,12 +25,13 @@ typedef struct ld7032_comms_with_command_vtable_t { // LD7032 Internal API //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void ld7032_comms_i2c_send_command_and_data(painter_device_t device, uint8_t cmd, uint8_t data) { +#ifdef QUANTUM_PAINTER_LD7032_I2C_ENABLE +bool ld7032_comms_i2c_send_command_and_data(painter_device_t device, uint8_t cmd, uint8_t data) { uint8_t buf[2] = {cmd, data}; - qp_comms_i2c_send_data(device, buf, 2); + return qp_comms_i2c_send_data(device, buf, 2); } -void ld7032_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { +bool ld7032_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { uint8_t buf[32]; for (size_t i = 0; i < sequence_len;) { uint8_t command = sequence[i]; @@ -38,12 +39,16 @@ void ld7032_comms_i2c_bulk_command_sequence(painter_device_t device, const uint8 uint8_t num_bytes = sequence[i + 2]; buf[0] = command; memcpy(&buf[1], &sequence[i + 3], num_bytes); - qp_comms_i2c_send_data(device, buf, num_bytes + 1); + if (!qp_comms_i2c_send_data(device, buf, num_bytes + 1)) { + return false; + } if (delay > 0) { wait_ms(delay); } i += (3 + num_bytes); } + + return true; } uint32_t ld7032_comms_i2c_send_command_and_databuf(painter_device_t device, uint8_t cmd, const void *data, uint32_t byte_count) { @@ -53,6 +58,7 @@ uint32_t ld7032_comms_i2c_send_command_and_databuf(painter_device_t device, uint memcpy(&buf[1], data, byte_count); return qp_comms_send(device, buf, byte_count + 1); } +#endif // QUANTUM_PAINTER_LD7032_I2C_ENABLE // Power control bool qp_ld7032_power(painter_device_t device, bool power_on) { @@ -201,7 +207,9 @@ __attribute__((weak)) bool qp_ld7032_init(painter_device_t device, painter_rotat }; // clang-format on - qp_comms_bulk_command_sequence(device, ld7032_init_sequence, sizeof(ld7032_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, ld7032_init_sequence, sizeof(ld7032_init_sequence))) { + return false; + } uint8_t display_y_start = 40 - driver->oled.base.panel_height; uint8_t display_x_start = (128 - driver->oled.base.panel_width) / 2; @@ -223,7 +231,9 @@ __attribute__((weak)) bool qp_ld7032_init(painter_device_t device, painter_rotat ld7032_memory_setup[13] = ld7032_memory_setup[4] + 1; ld7032_memory_setup[17] = driver->oled.base.panel_height; - qp_comms_bulk_command_sequence(device, ld7032_memory_setup, sizeof(ld7032_memory_setup)); + if (!qp_comms_bulk_command_sequence(device, ld7032_memory_setup, sizeof(ld7032_memory_setup))) { + return false; + } uint8_t write_direction = 0; switch (rotation) { @@ -245,7 +255,9 @@ __attribute__((weak)) bool qp_ld7032_init(painter_device_t device, painter_rotat painter_driver_t * pdriver = (painter_driver_t *)device; ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)pdriver->comms_vtable; - comms_vtable->send_command_data(device, LD7032_WRITE_DIRECTION, write_direction); + if (!comms_vtable->send_command_data(device, LD7032_WRITE_DIRECTION, write_direction)) { + return false; + } qp_ld7032_power(device, true); diff --git a/drivers/painter/sh1106/qp_sh1106.c b/drivers/painter/sh1106/qp_sh1106.c index 4117115aec47..85da4a973a83 100644 --- a/drivers/painter/sh1106/qp_sh1106.c +++ b/drivers/painter/sh1106/qp_sh1106.c @@ -71,8 +71,7 @@ __attribute__((weak)) bool qp_sh1106_init(painter_device_t device, painter_rotat sh1106_init_sequence[20] = 0x02; } - qp_comms_bulk_command_sequence(device, sh1106_init_sequence, sizeof(sh1106_init_sequence)); - return true; + return qp_comms_bulk_command_sequence(device, sh1106_init_sequence, sizeof(sh1106_init_sequence)); } // Screen flush diff --git a/drivers/painter/sh1107/qp_sh1107.c b/drivers/painter/sh1107/qp_sh1107.c index f4cbd49e402a..0b48690803a0 100644 --- a/drivers/painter/sh1107/qp_sh1107.c +++ b/drivers/painter/sh1107/qp_sh1107.c @@ -73,8 +73,7 @@ __attribute__((weak)) bool qp_sh1107_init(painter_device_t device, painter_rotat sh1107_init_sequence[20] = 0x02; } - qp_comms_bulk_command_sequence(device, sh1107_init_sequence, sizeof(sh1107_init_sequence)); - return true; + return qp_comms_bulk_command_sequence(device, sh1107_init_sequence, sizeof(sh1107_init_sequence)); } // Screen flush diff --git a/drivers/painter/ssd1351/qp_ssd1351.c b/drivers/painter/ssd1351/qp_ssd1351.c index 3270a362c2f1..3f652e674e6d 100644 --- a/drivers/painter/ssd1351/qp_ssd1351.c +++ b/drivers/painter/ssd1351/qp_ssd1351.c @@ -44,7 +44,9 @@ __attribute__((weak)) bool qp_ssd1351_init(painter_device_t device, painter_rota SSD1351_DISPLAYON, 5, 0, }; // clang-format on - qp_comms_bulk_command_sequence(device, ssd1351_init_sequence, sizeof(ssd1351_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, ssd1351_init_sequence, sizeof(ssd1351_init_sequence))) { + return false; + } // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { @@ -53,10 +55,10 @@ __attribute__((weak)) bool qp_ssd1351_init(painter_device_t device, painter_rota [QP_ROTATION_180] = SSD1351_MADCTL_BGR | SSD1351_MADCTL_MX, [QP_ROTATION_270] = SSD1351_MADCTL_BGR | SSD1351_MADCTL_MV, }; - qp_comms_command_databyte(device, SSD1351_SETREMAP, madctl[rotation]); - qp_comms_command_databyte(device, SSD1351_STARTLINE, (rotation == QP_ROTATION_0 || rotation == QP_ROTATION_90) ? driver->base.panel_height : 0); - - return true; + if (!qp_comms_command_databyte(device, SSD1351_SETREMAP, madctl[rotation])) { + return false; + } + return qp_comms_command_databyte(device, SSD1351_STARTLINE, (rotation == QP_ROTATION_0 || rotation == QP_ROTATION_90) ? driver->base.panel_height : 0); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/drivers/painter/st77xx/qp_st7735.c b/drivers/painter/st77xx/qp_st7735.c index 1db0d01dcbcd..9e3df477c895 100644 --- a/drivers/painter/st77xx/qp_st7735.c +++ b/drivers/painter/st77xx/qp_st7735.c @@ -63,7 +63,9 @@ __attribute__((weak)) bool qp_st7735_init(painter_device_t device, painter_rotat ST77XX_CMD_DISPLAY_ON, 20, 0 }; // clang-format on - qp_comms_bulk_command_sequence(device, st7735_init_sequence, sizeof(st7735_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, st7735_init_sequence, sizeof(st7735_init_sequence))) { + return false; + } // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { @@ -72,7 +74,9 @@ __attribute__((weak)) bool qp_st7735_init(painter_device_t device, painter_rotat [QP_ROTATION_180] = ST77XX_MADCTL_BGR | ST77XX_MADCTL_MX | ST77XX_MADCTL_MY, [QP_ROTATION_270] = ST77XX_MADCTL_BGR | ST77XX_MADCTL_MV | ST77XX_MADCTL_MY, }; - qp_comms_command_databyte(device, ST77XX_SET_MADCTL, madctl[rotation]); + if (!qp_comms_command_databyte(device, ST77XX_SET_MADCTL, madctl[rotation])) { + return false; + } #ifndef ST7735_NO_AUTOMATIC_VIEWPORT_OFFSETS st7735_automatic_viewport_offsets(device, rotation); diff --git a/drivers/painter/st77xx/qp_st7789.c b/drivers/painter/st77xx/qp_st7789.c index 855a9cc0c86c..b4e24886dae6 100644 --- a/drivers/painter/st77xx/qp_st7789.c +++ b/drivers/painter/st77xx/qp_st7789.c @@ -60,7 +60,9 @@ __attribute__((weak)) bool qp_st7789_init(painter_device_t device, painter_rotat ST77XX_CMD_DISPLAY_ON, 20, 0 }; // clang-format on - qp_comms_bulk_command_sequence(device, st7789_init_sequence, sizeof(st7789_init_sequence)); + if (!qp_comms_bulk_command_sequence(device, st7789_init_sequence, sizeof(st7789_init_sequence))) { + return false; + } // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { @@ -69,7 +71,9 @@ __attribute__((weak)) bool qp_st7789_init(painter_device_t device, painter_rotat [QP_ROTATION_180] = ST77XX_MADCTL_RGB | ST77XX_MADCTL_MX | ST77XX_MADCTL_MY, [QP_ROTATION_270] = ST77XX_MADCTL_RGB | ST77XX_MADCTL_MV | ST77XX_MADCTL_MY, }; - qp_comms_command_databyte(device, ST77XX_SET_MADCTL, madctl[rotation]); + if (!qp_comms_command_databyte(device, ST77XX_SET_MADCTL, madctl[rotation])) { + return false; + } #ifndef ST7789_NO_AUTOMATIC_VIEWPORT_OFFSETS st7789_automatic_viewport_offsets(device, rotation); diff --git a/quantum/painter/qp_comms.c b/quantum/painter/qp_comms.c index 63667783e10d..402165b119f6 100644 --- a/quantum/painter/qp_comms.c +++ b/quantum/painter/qp_comms.c @@ -49,15 +49,15 @@ uint32_t qp_comms_send(painter_device_t device, const void *data, uint32_t byte_ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Comms APIs that use a D/C pin -void qp_comms_command(painter_device_t device, uint8_t cmd) { +bool qp_comms_command(painter_device_t device, uint8_t cmd) { painter_driver_t * driver = (painter_driver_t *)device; painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; - comms_vtable->send_command(device, cmd); + return comms_vtable->send_command(device, cmd); } -void qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data) { +bool qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data) { qp_comms_command(device, cmd); - qp_comms_send(device, &data, sizeof(data)); + return qp_comms_send(device, &data, sizeof(data)); } uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void *data, uint32_t byte_count) { @@ -65,8 +65,8 @@ uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const vo return qp_comms_send(device, data, byte_count); } -void qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { +bool qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { painter_driver_t * driver = (painter_driver_t *)device; painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; - comms_vtable->bulk_command_sequence(device, sequence, sequence_len); + return comms_vtable->bulk_command_sequence(device, sequence, sequence_len); } diff --git a/quantum/painter/qp_comms.h b/quantum/painter/qp_comms.h index 8fbf25c201cb..dc5892b1bb51 100644 --- a/quantum/painter/qp_comms.h +++ b/quantum/painter/qp_comms.h @@ -19,7 +19,7 @@ uint32_t qp_comms_send(painter_device_t device, const void* data, uint32_t byte_ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Comms APIs that use a D/C pin -void qp_comms_command(painter_device_t device, uint8_t cmd); -void qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data); +bool qp_comms_command(painter_device_t device, uint8_t cmd); +bool qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data); uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void* data, uint32_t byte_count); -void qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len); +bool qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len); diff --git a/quantum/painter/qp_internal_driver.h b/quantum/painter/qp_internal_driver.h index 69da966f8c84..5b6efe2c8376 100644 --- a/quantum/painter/qp_internal_driver.h +++ b/quantum/painter/qp_internal_driver.h @@ -36,7 +36,7 @@ typedef struct painter_driver_vtable_t { typedef bool (*painter_driver_comms_init_func)(painter_device_t device); typedef bool (*painter_driver_comms_start_func)(painter_device_t device); -typedef void (*painter_driver_comms_stop_func)(painter_device_t device); +typedef bool (*painter_driver_comms_stop_func)(painter_device_t device); typedef uint32_t (*painter_driver_comms_send_func)(painter_device_t device, const void *data, uint32_t byte_count); typedef struct painter_comms_vtable_t { @@ -46,8 +46,8 @@ typedef struct painter_comms_vtable_t { painter_driver_comms_send_func comms_send; } painter_comms_vtable_t; -typedef void (*painter_driver_comms_send_command_func)(painter_device_t device, uint8_t cmd); -typedef void (*painter_driver_comms_bulk_command_sequence)(painter_device_t device, const uint8_t *sequence, size_t sequence_len); +typedef bool (*painter_driver_comms_send_command_func)(painter_device_t device, uint8_t cmd); +typedef bool (*painter_driver_comms_bulk_command_sequence)(painter_device_t device, const uint8_t *sequence, size_t sequence_len); typedef struct painter_comms_with_command_vtable_t { painter_comms_vtable_t base; // must be first, so this object can be cast from the painter_comms_vtable_t* type From ed343ddad4832a0a48c8ad794e949a595dcf3cfb Mon Sep 17 00:00:00 2001 From: Cipulot <40441626+Cipulot@users.noreply.github.com> Date: Tue, 11 Nov 2025 21:21:50 +0900 Subject: [PATCH 1112/1205] VIA Keylog Change (#25504) * WIP * Update via.c temptive fix in formatting for lint errors. * Update via.c let's try this one, thanks mobile GitHub app to not showing spaces right. * Update quantum/via.c Co-authored-by: Joel Challis * Update quantum/via.c Co-authored-by: Joel Challis * Merge branch 'qmk:master' into via_keylog_change --- quantum/via.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/quantum/via.c b/quantum/via.c index 9446811af69a..130ff74794c0 100644 --- a/quantum/via.c +++ b/quantum/via.c @@ -37,6 +37,10 @@ #include "version.h" // for QMK_BUILDDATE used in EEPROM magic #include "nvm_via.h" +#if defined(SECURE_ENABLE) +# include "secure.h" +#endif + #if defined(AUDIO_ENABLE) # include "audio.h" #endif @@ -322,8 +326,13 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { uint8_t rows = 28 / ((MATRIX_COLS + 7) / 8); uint8_t i = 2; for (uint8_t row = 0; row < rows && row + offset < MATRIX_ROWS; row++) { -#ifdef VIA_INSECURE +#if defined(VIA_INSECURE) matrix_row_t value = matrix_get_row(row + offset); +#elif defined(SECURE_ENABLE) + matrix_row_t value = 0; + if (secure_is_unlocked()) { + value = matrix_get_row(row + offset); + } #else matrix_row_t value = 0; #endif From 1ddcf57382f94548aba23871c57c7ce835f203b9 Mon Sep 17 00:00:00 2001 From: Chaser Huang Date: Tue, 11 Nov 2025 07:30:42 -0500 Subject: [PATCH 1113/1205] [Feature Improvement]add option to keep layer state when recording dynamic macros (#24418) * feat: add option to keep layer state when recording dynamic macros * Better option macro name and lint changes --- docs/features/dynamic_macros.md | 13 ++++++----- .../process_keycode/process_dynamic_macro.c | 23 ++++++++++++++++++- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/docs/features/dynamic_macros.md b/docs/features/dynamic_macros.md index a642ced43e3e..fa7373a4bd87 100644 --- a/docs/features/dynamic_macros.md +++ b/docs/features/dynamic_macros.md @@ -32,12 +32,13 @@ For the details about the internals of the dynamic macros, please read the comme There are a number of options added that should allow some additional degree of customization -|Define |Default |Description | -|----------------------------|----------------|-----------------------------------------------------------------------------------------------------------------| -|`DYNAMIC_MACRO_SIZE` |128 |Sets the amount of memory that Dynamic Macros can use. This is a limited resource, dependent on the controller. | -|`DYNAMIC_MACRO_USER_CALL` |*Not defined* |Defining this falls back to using the user `keymap.c` file to trigger the macro behavior. | -|`DYNAMIC_MACRO_NO_NESTING` |*Not Defined* |Defining this disables the ability to call a macro from another macro (nested macros). | -|`DYNAMIC_MACRO_DELAY` |*Not Defined* |Sets the waiting time (ms unit) when sending each key. | +|Define |Default |Description | +|------------------------------------------|----------------|-----------------------------------------------------------------------------------------------------------------| +|`DYNAMIC_MACRO_SIZE` |128 |Sets the amount of memory that Dynamic Macros can use. This is a limited resource, dependent on the controller. | +|`DYNAMIC_MACRO_USER_CALL` |*Not defined* |Defining this falls back to using the user `keymap.c` file to trigger the macro behavior. | +|`DYNAMIC_MACRO_NO_NESTING` |*Not Defined* |Defining this disables the ability to call a macro from another macro (nested macros). | +|`DYNAMIC_MACRO_DELAY` |*Not Defined* |Sets the waiting time (ms unit) when sending each key. | +|`DYNAMIC_MACRO_KEEP_ORIGINAL_LAYER_STATE` |*Not Defined* |Defining this keeps the layer state when starting to record a macro | If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by adding the `DYNAMIC_MACRO_SIZE` define in your `config.h` (default value: 128; please read the comments for it in the header). diff --git a/quantum/process_keycode/process_dynamic_macro.c b/quantum/process_keycode/process_dynamic_macro.c index f8e8256ac8d2..20e90c6e14d2 100644 --- a/quantum/process_keycode/process_dynamic_macro.c +++ b/quantum/process_keycode/process_dynamic_macro.c @@ -89,6 +89,11 @@ __attribute__((weak)) bool dynamic_macro_valid_key_user(uint16_t keycode, keyrec #define DYNAMIC_MACRO_CURRENT_LENGTH(BEGIN, POINTER) ((int)(direction * ((POINTER) - (BEGIN)))) #define DYNAMIC_MACRO_CURRENT_CAPACITY(BEGIN, END2) ((int)(direction * ((END2) - (BEGIN)) + 1)) +#ifdef DYNAMIC_MACRO_KEEP_ORIGINAL_LAYER_STATE +static layer_state_t dm1_layer_state; +static layer_state_t dm2_layer_state; +#endif + /** * Start recording of the dynamic macro. * @@ -100,8 +105,16 @@ void dynamic_macro_record_start(keyrecord_t **macro_pointer, keyrecord_t *macro_ dynamic_macro_record_start_kb(direction); - clear_keyboard(); +#ifdef DYNAMIC_MACRO_KEEP_ORIGINAL_LAYER_STATE + if (direction == 1) { + dm1_layer_state = layer_state; + } else if (direction == -1) { + dm2_layer_state = layer_state; + } +#else layer_clear(); +#endif + clear_keyboard(); *macro_pointer = macro_buffer; } @@ -118,7 +131,15 @@ void dynamic_macro_play(keyrecord_t *macro_buffer, keyrecord_t *macro_end, int8_ layer_state_t saved_layer_state = layer_state; clear_keyboard(); +#ifdef DYNAMIC_MACRO_KEEP_ORIGINAL_LAYER_STATE + if (direction == 1) { + layer_state_set(dm1_layer_state); + } else if (direction == -1) { + layer_state_set(dm2_layer_state); + } +#else layer_clear(); +#endif while (macro_buffer != macro_end) { process_record(macro_buffer); From c68e4dec10db07f16f6d2b5dd883bbcfc09cde25 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Tue, 11 Nov 2025 13:35:03 +0100 Subject: [PATCH 1114/1205] [Core] suspend: suppress wake up keypress (#23389) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * suspend: suppress wake up keypress Waking the host from suspend is done by pressing any key on the keyboard, the regular key codes assigned to the keys are not important and must not be sent - otherwise they usually end up in password prompts as ghost characters that have to be deleted again. This commit adds suppression for all keys pressed at the time of wake up. Once a key is released it functions as a regular key again. Signed-off-by: Stefan Kerkmann * suspend: update wake up matrix after wake up delay If USB_SUSPEND_WAKEUP_DELAY is set, the keyboard sleeps during wake up - which can be up to multiple seconds. To handle key presses and releases in that time frame we have to handle the following cases: 1. Key not pressed before suspend, and not pressed after wakeup → do nothing (normal case). 2. Key not pressed before suspend, but pressed after wakeup → set the wakeup_matrix bit to 1 (so that the press and release events would be suppressed). 3. Key pressed before suspend, but not pressed after wakeup → do nothing (the release event will be generated on the first matrix_task() call after the wakeup). 4. Key pressed before suspend, and still pressed after wakeup → do nothing (the release event will be generated some time later). Signed-off-by: Stefan Kerkmann Co-authored-by: Sergey Vlasov * keyboards: anavi: macropad8: disable snake and rgb_test effects ...to shrink the binary size. --- keyboards/anavi/macropad8/keyboard.json | 2 -- platforms/suspend.c | 35 ++++++++++++++++++++++--- platforms/suspend.h | 4 +++ quantum/keyboard.c | 8 +++--- tmk_core/protocol/chibios/chibios.c | 3 +++ tmk_core/protocol/lufa/lufa.c | 3 +++ tmk_core/protocol/vusb/protocol.c | 3 +++ 7 files changed, 50 insertions(+), 8 deletions(-) diff --git a/keyboards/anavi/macropad8/keyboard.json b/keyboards/anavi/macropad8/keyboard.json index 8073a038a21a..2fb24e58bb38 100644 --- a/keyboards/anavi/macropad8/keyboard.json +++ b/keyboards/anavi/macropad8/keyboard.json @@ -20,10 +20,8 @@ "breathing": true, "rainbow_mood": true, "rainbow_swirl": true, - "snake": true, "knight": true, "static_gradient": true, - "rgb_test": true, "alternating": true, "twinkle": true } diff --git a/platforms/suspend.c b/platforms/suspend.c index fea23cbd02b4..4756796ea433 100644 --- a/platforms/suspend.c +++ b/platforms/suspend.c @@ -4,6 +4,9 @@ #include "suspend.h" #include "matrix.h" +extern matrix_row_t matrix_previous[MATRIX_ROWS]; +static matrix_row_t wakeup_matrix[MATRIX_ROWS]; + // TODO: Move to more correct location __attribute__((weak)) void matrix_power_up(void) {} __attribute__((weak)) void matrix_power_down(void) {} @@ -44,8 +47,34 @@ bool suspend_wakeup_condition(void) { matrix_power_up(); matrix_scan(); matrix_power_down(); - for (uint8_t r = 0; r < MATRIX_ROWS; r++) { - if (matrix_get_row(r)) return true; + + bool wakeup = false; + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + wakeup_matrix[row] = matrix_get_row(row); + wakeup |= wakeup_matrix[row] != 0; + } + + return wakeup; +} + +void update_matrix_state_after_wakeup(void) { + matrix_power_up(); + matrix_scan(); + matrix_power_down(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + const matrix_row_t current_row = matrix_get_row(row); + wakeup_matrix[row] |= current_row & ~matrix_previous[row]; + matrix_previous[row] |= current_row; + } +} + +bool keypress_is_wakeup_key(uint8_t row, uint8_t col) { + return (wakeup_matrix[row] & ((matrix_row_t)1 << col)); +} + +void wakeup_matrix_handle_key_event(uint8_t row, uint8_t col, bool pressed) { + if (!pressed) { + wakeup_matrix[row] &= ~((matrix_row_t)1 << col); } - return false; } diff --git a/platforms/suspend.h b/platforms/suspend.h index e4f7f39ddb83..3a7f51f9f078 100644 --- a/platforms/suspend.h +++ b/platforms/suspend.h @@ -14,6 +14,10 @@ void suspend_power_down_user(void); void suspend_power_down_kb(void); void suspend_power_down_quantum(void); +bool keypress_is_wakeup_key(uint8_t row, uint8_t col); +void update_matrix_state_after_wakeup(void); +void wakeup_matrix_handle_key_event(uint8_t row, uint8_t col, bool pressed); + #ifndef USB_SUSPEND_WAKEUP_DELAY # define USB_SUSPEND_WAKEUP_DELAY 0 #endif diff --git a/quantum/keyboard.c b/quantum/keyboard.c index ce8c8efa68e8..e0c937316564 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -33,6 +33,7 @@ along with this program. If not, see . #include "sendchar.h" #include "eeconfig.h" #include "action_layer.h" +#include "suspend.h" #ifdef BOOTMAGIC_ENABLE # include "bootmagic.h" #endif @@ -563,6 +564,7 @@ void switch_events(uint8_t row, uint8_t col, bool pressed) { #if defined(RGB_MATRIX_ENABLE) rgb_matrix_handle_key_event(row, col, pressed); #endif + wakeup_matrix_handle_key_event(row, col, pressed); } /** @@ -578,6 +580,8 @@ static inline void generate_tick_event(void) { } } +matrix_row_t matrix_previous[MATRIX_ROWS]; + /** * @brief This task scans the keyboards matrix and processes any key presses * that occur. @@ -591,8 +595,6 @@ static bool matrix_task(void) { return false; } - static matrix_row_t matrix_previous[MATRIX_ROWS]; - matrix_scan(); bool matrix_changed = false; for (uint8_t row = 0; row < MATRIX_ROWS && !matrix_changed; row++) { @@ -626,7 +628,7 @@ static bool matrix_task(void) { if (row_changes & col_mask) { const bool key_pressed = current_row & col_mask; - if (process_keypress) { + if (process_keypress && !keypress_is_wakeup_key(row, col)) { action_exec(MAKE_KEYEVENT(row, col, key_pressed)); } diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c index 5720bc3c4c85..b8cded99fc86 100644 --- a/tmk_core/protocol/chibios/chibios.c +++ b/tmk_core/protocol/chibios/chibios.c @@ -191,6 +191,9 @@ void protocol_pre_task(void) { // // Pause for a while to let things settle... wait_ms(USB_SUSPEND_WAKEUP_DELAY); + // ...and then update the wakeup matrix again as the waking key + // might have been released during the delay + update_matrix_state_after_wakeup(); # endif } } diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index e13f4b548ec1..3e442ba033a3 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -826,6 +826,9 @@ void protocol_pre_task(void) { // // Pause for a while to let things settle... wait_ms(USB_SUSPEND_WAKEUP_DELAY); + // ...and then update the wakeup matrix again as the waking key + // might have been released during the delay + update_matrix_state_after_wakeup(); # endif } } diff --git a/tmk_core/protocol/vusb/protocol.c b/tmk_core/protocol/vusb/protocol.c index e2d0c4112eb9..b95750306a80 100644 --- a/tmk_core/protocol/vusb/protocol.c +++ b/tmk_core/protocol/vusb/protocol.c @@ -125,6 +125,9 @@ void protocol_pre_task(void) { // // Pause for a while to let things settle... wait_ms(USB_SUSPEND_WAKEUP_DELAY); + // ...and then update the wakeup matrix again as the waking key + // might have been released during the delay + update_matrix_state_after_wakeup(); # endif } } From 8ec3de0f92219ee783425f406ff188597ec5e8c6 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 11 Nov 2025 21:59:06 +0000 Subject: [PATCH 1115/1205] Add return code to `qmk userspace-doctor` (#25775) --- lib/python/qmk/cli/userspace/doctor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/userspace/doctor.py b/lib/python/qmk/cli/userspace/doctor.py index 2b7e29aa7eed..7c016e5a2f75 100644 --- a/lib/python/qmk/cli/userspace/doctor.py +++ b/lib/python/qmk/cli/userspace/doctor.py @@ -2,10 +2,12 @@ # SPDX-License-Identifier: GPL-2.0-or-later from milc import cli -from qmk.constants import QMK_FIRMWARE +from qmk.constants import QMK_FIRMWARE, HAS_QMK_USERSPACE from qmk.cli.doctor.main import userspace_tests @cli.subcommand('Checks userspace configuration.') def userspace_doctor(cli): userspace_tests(QMK_FIRMWARE) + + return 0 if HAS_QMK_USERSPACE else 1 From 98504424b1748c6db4eb26fde2c45c8d76eec7b9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 11 Nov 2025 22:00:28 +0000 Subject: [PATCH 1116/1205] Align use of keymap level `_kb` callbacks (#25774) --- .../default_pimoroni/pimoroni_trackball.c | 10 ++------ keyboards/bastardkb/dilemma/dilemma.c | 1 - .../xealous/keymaps/default/keymap.c | 2 +- keyboards/lime/keymaps/default/keymap.c | 2 +- .../rp2040_orbweaver/keymaps/default/keymap.c | 6 ++--- .../rmi_kb/tkl_ff/keymaps/default/keymap.c | 24 +++++++------------ keyboards/rmi_kb/tkl_ff/keymaps/iso/keymap.c | 24 +++++++------------ .../rmi_kb/wete/v2/keymaps/default/keymap.c | 24 +++++++------------ keyboards/rmi_kb/wete/v2/keymaps/iso/keymap.c | 24 +++++++------------ keyboards/spleeb/spleeb.c | 1 - .../prime/keymaps/default/keymap.c | 2 +- .../prime_plus/keymaps/default/keymap.c | 2 +- .../synthlabs/solo/keymaps/gamepad/keymap.c | 4 ++-- 13 files changed, 46 insertions(+), 80 deletions(-) diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c index 0fe7cdc24781..4964f592171d 100644 --- a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c +++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c @@ -72,14 +72,7 @@ __attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* m } } -bool process_record_kb(uint16_t keycode, keyrecord_t* record) { - if (true) { - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); - } - - - if (!process_record_user(keycode, record)) { return false; } - +bool process_record_user(uint16_t keycode, keyrecord_t* record) { /* If Mousekeys is disabled, then use handle the mouse button * keycodes. This makes things simpler, and allows usage of * the keycodes in a consistent manner. But only do this if @@ -95,6 +88,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { } pointing_device_set_report(currentReport); pointing_device_send(); + return false; } #endif diff --git a/keyboards/bastardkb/dilemma/dilemma.c b/keyboards/bastardkb/dilemma/dilemma.c index c14345d0755c..138f363346e5 100644 --- a/keyboards/bastardkb/dilemma/dilemma.c +++ b/keyboards/bastardkb/dilemma/dilemma.c @@ -176,7 +176,6 @@ void dilemma_set_pointer_dragscroll_enabled(bool enable) { void pointing_device_init_kb(void) { maybe_update_pointing_device_cpi(&g_dilemma_config); - pointing_device_init_user(); } /** diff --git a/keyboards/handwired/xealous/keymaps/default/keymap.c b/keyboards/handwired/xealous/keymaps/default/keymap.c index 88aa4ddfc94c..b581015b542b 100644 --- a/keyboards/handwired/xealous/keymaps/default/keymap.c +++ b/keyboards/handwired/xealous/keymaps/default/keymap.c @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float tone_qwerty[][2] = TONE_QWERTY; float tone_numpad[][2] = TONE_NUMPAD; -layer_state_t default_layer_state_set_kb(layer_state_t state) { +layer_state_t default_layer_state_set_user(layer_state_t state) { if (state == 1UL<<_QWERTY) { PLAY_SONG(tone_qwerty); } else if (state == 1UL<<_NUMPAD) { diff --git a/keyboards/lime/keymaps/default/keymap.c b/keyboards/lime/keymaps/default/keymap.c index 8f4e6eb8a482..8e5923c14e8e 100644 --- a/keyboards/lime/keymaps/default/keymap.c +++ b/keyboards/lime/keymaps/default/keymap.c @@ -172,7 +172,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { # endif /* Joystick + Encoder fix */ - void keyboard_post_init_kb(void) { + void keyboard_post_init_user(void) { if (is_keyboard_master()) { gpio_write_pin_low(JOYSTICK_X_PIN); gpio_write_pin_low(JOYSTICK_Y_PIN); diff --git a/keyboards/lostdotfish/rp2040_orbweaver/keymaps/default/keymap.c b/keyboards/lostdotfish/rp2040_orbweaver/keymaps/default/keymap.c index df59752ce0c4..382cb2b9605b 100644 --- a/keyboards/lostdotfish/rp2040_orbweaver/keymaps/default/keymap.c +++ b/keyboards/lostdotfish/rp2040_orbweaver/keymaps/default/keymap.c @@ -76,15 +76,13 @@ layer_state_t layer_state_set_user(layer_state_t state) { } return state; } -void suspend_power_down_kb(void) { +void suspend_power_down_user(void) { // code will run multiple times while keyboard is suspended gpio_write_pin_high(GP23); gpio_write_pin_high(GP24); gpio_write_pin_high(GP25); - suspend_power_down_user(); } -void suspend_wakeup_init_kb(void) { +void suspend_wakeup_init_user(void) { layer_state_set_kb(layer_state); - suspend_wakeup_init_user(); } diff --git a/keyboards/rmi_kb/tkl_ff/keymaps/default/keymap.c b/keyboards/rmi_kb/tkl_ff/keymaps/default/keymap.c index d49d9d0b7721..65c556055661 100644 --- a/keyboards/rmi_kb/tkl_ff/keymaps/default/keymap.c +++ b/keyboards/rmi_kb/tkl_ff/keymaps/default/keymap.c @@ -42,25 +42,19 @@ const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); -void keyboard_post_init_kb(void) { +void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; - - keyboard_post_init_user(); } -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - - if (res) { - uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; - for (uint8_t i=0; i<3; i++) { - rgblight_set_layer_state(i, false); - } - if (lock_bits < 3) { - rgblight_set_layer_state(lock_bits, true); - } +bool led_update_user(led_t led_state) { + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); } - return res; + return false; } #endif diff --git a/keyboards/rmi_kb/tkl_ff/keymaps/iso/keymap.c b/keyboards/rmi_kb/tkl_ff/keymaps/iso/keymap.c index 90319d52e60f..4414fa28325e 100644 --- a/keyboards/rmi_kb/tkl_ff/keymaps/iso/keymap.c +++ b/keyboards/rmi_kb/tkl_ff/keymaps/iso/keymap.c @@ -42,25 +42,19 @@ const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); -void keyboard_post_init_kb(void) { +void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; - - keyboard_post_init_user(); } -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - - if (res) { - uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; - for (uint8_t i=0; i<3; i++) { - rgblight_set_layer_state(i, false); - } - if (lock_bits < 3) { - rgblight_set_layer_state(lock_bits, true); - } +bool led_update_user(led_t led_state) { + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); } - return res; + return false; } #endif diff --git a/keyboards/rmi_kb/wete/v2/keymaps/default/keymap.c b/keyboards/rmi_kb/wete/v2/keymaps/default/keymap.c index 3916d1836699..067a2783818e 100644 --- a/keyboards/rmi_kb/wete/v2/keymaps/default/keymap.c +++ b/keyboards/rmi_kb/wete/v2/keymaps/default/keymap.c @@ -73,25 +73,19 @@ const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( ll_slcl ); -void keyboard_post_init_kb(void) { +void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; - - keyboard_post_init_user(); } -bool led_update_kb (led_t led_state) { - bool res = led_update_user(led_state); - - if (res) { - uint8_t lock_bits = led_state.scroll_lock << 2 | led_state.caps_lock << 1 | led_state.num_lock; - for (uint8_t i=0; i<7; i++) { - rgblight_set_layer_state(i, false); - } - if (lock_bits < 7) { - rgblight_set_layer_state(lock_bits, true); - } +bool led_update_user (led_t led_state) { + uint8_t lock_bits = led_state.scroll_lock << 2 | led_state.caps_lock << 1 | led_state.num_lock; + for (uint8_t i=0; i<7; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 7) { + rgblight_set_layer_state(lock_bits, true); } - return res; + return false; } #endif diff --git a/keyboards/rmi_kb/wete/v2/keymaps/iso/keymap.c b/keyboards/rmi_kb/wete/v2/keymaps/iso/keymap.c index 12933c4b5746..66e8f7e8da1f 100644 --- a/keyboards/rmi_kb/wete/v2/keymaps/iso/keymap.c +++ b/keyboards/rmi_kb/wete/v2/keymaps/iso/keymap.c @@ -73,25 +73,19 @@ const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( ll_slcl ); -void keyboard_post_init_kb(void) { +void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; - - keyboard_post_init_user(); } -bool led_update_kb (led_t led_state) { - bool res = led_update_user(led_state); - - if (res) { - uint8_t lock_bits = led_state.scroll_lock << 2 | led_state.caps_lock << 1 | led_state.num_lock; - for (uint8_t i=0; i<7; i++) { - rgblight_set_layer_state(i, false); - } - if (lock_bits < 7) { - rgblight_set_layer_state(lock_bits, true); - } +bool led_update_user (led_t led_state) { + uint8_t lock_bits = led_state.scroll_lock << 2 | led_state.caps_lock << 1 | led_state.num_lock; + for (uint8_t i=0; i<7; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 7) { + rgblight_set_layer_state(lock_bits, true); } - return res; + return false; } #endif diff --git a/keyboards/spleeb/spleeb.c b/keyboards/spleeb/spleeb.c index 33131fa3e26b..96cf622743f0 100644 --- a/keyboards/spleeb/spleeb.c +++ b/keyboards/spleeb/spleeb.c @@ -283,7 +283,6 @@ void pointing_device_init_kb(void) { cirque_pinnacle_enable_cursor_glide(false); set_auto_mouse_enable(true); - pointing_device_init_user(); } /** diff --git a/keyboards/steelseries/prime/keymaps/default/keymap.c b/keyboards/steelseries/prime/keymaps/default/keymap.c index 803f6b47daa4..0855107bf7ce 100644 --- a/keyboards/steelseries/prime/keymaps/default/keymap.c +++ b/keyboards/steelseries/prime/keymaps/default/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on -void pointing_device_init_kb(void) { +void pointing_device_init_user(void) { pointing_device_set_cpi(1600); } diff --git a/keyboards/steelseries/prime_plus/keymaps/default/keymap.c b/keyboards/steelseries/prime_plus/keymaps/default/keymap.c index 803f6b47daa4..0855107bf7ce 100644 --- a/keyboards/steelseries/prime_plus/keymaps/default/keymap.c +++ b/keyboards/steelseries/prime_plus/keymaps/default/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on -void pointing_device_init_kb(void) { +void pointing_device_init_user(void) { pointing_device_set_cpi(1600); } diff --git a/keyboards/synthlabs/solo/keymaps/gamepad/keymap.c b/keyboards/synthlabs/solo/keymaps/gamepad/keymap.c index 7bafe6b191c7..f21b7e341151 100644 --- a/keyboards/synthlabs/solo/keymaps/gamepad/keymap.c +++ b/keyboards/synthlabs/solo/keymaps/gamepad/keymap.c @@ -20,11 +20,11 @@ joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = { [0] = JOYSTICK_AXIS_VIRTUAL }; -bool encoder_update_kb(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { joystick_position += (clockwise ? 2 : -2) * (full_joystick_value / pulses_per_revolution); // +2 and -2 are used, since +1.0 and -1.0 axis output refers to positions at half of a full rotation joystick_set_axis(0, joystick_position); - return true; + return false; } #endif From 99b1dc84da8ed3d2544824f3480090cdb201f0fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Wed, 12 Nov 2025 06:02:08 +0800 Subject: [PATCH 1117/1205] Fix Magic GUI masking logic (#25780) --- quantum/keycode_config.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c index f5068902d5e9..90b910e96041 100644 --- a/quantum/keycode_config.c +++ b/quantum/keycode_config.c @@ -162,8 +162,9 @@ __attribute__((weak)) uint8_t mod_config(uint8_t mod) { } } if (keymap_config.no_gui) { - mod &= ~MOD_LGUI; - mod &= ~MOD_RGUI; + if (mod & MOD_LGUI) { + mod &= ~MOD_RGUI; + } } #endif // MAGIC_ENABLE From 1a4af3adf90bd7c20e2faa4eed6715845e7f7fd6 Mon Sep 17 00:00:00 2001 From: ploopyco <54917504+ploopyco@users.noreply.github.com> Date: Tue, 11 Nov 2025 17:02:52 -0500 Subject: [PATCH 1118/1205] Add PixArt PAW-3222 mouse sensor driver (#25763) --- builddefs/common_features.mk | 4 +- docs/features/pointing_device.md | 17 +++ drivers/sensors/paw3222.c | 174 ++++++++++++++++++++++ drivers/sensors/paw3222.h | 47 ++++++ quantum/pointing_device/pointing_device.h | 4 + 5 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 drivers/sensors/paw3222.c create mode 100644 drivers/sensors/paw3222.h diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 1da13997b573..cd4e67a4bd4c 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -125,7 +125,7 @@ ifeq ($(strip $(MOUSEKEY_ENABLE)), yes) MOUSE_ENABLE := yes endif -VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick azoteq_iqs5xx cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom +VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick azoteq_iqs5xx cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 paw3222 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) ifeq ($(filter $(POINTING_DEVICE_DRIVER),$(VALID_POINTING_DEVICE_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid POINTING_DEVICE_DRIVER,POINTING_DEVICE_DRIVER="$(POINTING_DEVICE_DRIVER)" is not a valid pointing device type) @@ -157,6 +157,8 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) SRC += drivers/sensors/cirque_pinnacle.c SRC += drivers/sensors/cirque_pinnacle_gestures.c SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c + else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), paw3222) + SPI_DRIVER_REQUIRED = yes else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball) I2C_DRIVER_REQUIRED = yes else ifneq ($(filter $(strip $(POINTING_DEVICE_DRIVER)),pmw3360 pmw3389),) diff --git a/docs/features/pointing_device.md b/docs/features/pointing_device.md index d6dcddcdf098..eedbf59b95bc 100644 --- a/docs/features/pointing_device.md +++ b/docs/features/pointing_device.md @@ -267,6 +267,23 @@ The paw 3204 sensor uses a serial type protocol for communication, and requires The CPI range is 400-1600, with supported values of (400, 500, 600, 800, 1000, 1200 and 1600). Defaults to 1000 CPI. +### PAW-3222 Sensor + +To use the PAW-3222 sensor, add this to your `rules.mk`: + +```make +POINTING_DEVICE_DRIVER = paw3222 +``` + +The following pins must be defined in `config.h`: + +| Setting (`config.h`) | Description | Default | +| --------------------- | ------------------------------------------------------------------ | ---------------------------- | +| `PAW3222_CS_PIN` | (Required) The pin connected to the chip select pin of the sensor. | `POINTING_DEVICE_CS_PIN` | +| `PAW3222_SPI_DIVISOR` | (Required) The SPI clock divisor. This is dependent on your MCU. | _not defined_ | + +The CPI range is up to 4,000. Defaults to 1,000 CPI. + ### Pimoroni Trackball To use the Pimoroni Trackball module, add this to your `rules.mk`: diff --git a/drivers/sensors/paw3222.c b/drivers/sensors/paw3222.c new file mode 100644 index 000000000000..57f89a12d608 --- /dev/null +++ b/drivers/sensors/paw3222.c @@ -0,0 +1,174 @@ +/* Copyright 2024 Colin Lam (Ploopy Corporation) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "paw3222.h" +#include "wait.h" +#include "gpio.h" +#include "spi_master.h" +#include "pointing_device_internal.h" + +#define MSB1 0x80 +#define MSB0 0x7F + +const pointing_device_driver_t paw3222_pointing_device_driver = { + .init = paw3222_init, + .get_report = paw3222_get_report, + .set_cpi = paw3222_set_cpi, + .get_cpi = paw3222_get_cpi, +}; + +// Convert a 12-bit twos complement binary-represented number into a +// signed 12-bit integer. +static int16_t convert_twoscomp_12(uint16_t data) { + if ((data & 0x800) == 0x800) + return -2048 + (data & 0x7FF); + else + return data; +} + +void paw3222_write(uint8_t reg_addr, uint8_t data) { + spi_start(PAW3222_CS_PIN, false, 3, PAW3222_SPI_DIVISOR); + wait_us(1); // Tncs_lead + spi_write(reg_addr | MSB1); + spi_write(data); + wait_us(1); // Tncs_lag + spi_stop(); +} + +uint8_t paw3222_read(uint8_t reg_addr) { + spi_start(PAW3222_CS_PIN, false, 3, PAW3222_SPI_DIVISOR); + wait_us(1); // Tncs_lead + spi_write(reg_addr & MSB0); + wait_us(10); // Tprep_rd + uint8_t data = spi_read(); + wait_us(1); // Tncs_lag + spi_stop(); + + return data; +} + +bool paw3222_init(void) { + gpio_set_pin_output(PAW3222_CS_PIN); + + // CS must be kept low at power-up stage for at least 1ms + gpio_write_pin_low(PAW3222_CS_PIN); + wait_ms(10); + gpio_write_pin_high(PAW3222_CS_PIN); + + spi_init(); + + // reboot + paw3222_write(0x06, 0x80); + wait_ms(50); + + if (!paw3222_check_signature()) { + return false; + } + + // initialize + paw3222_write(0x09, 0x5A); + paw3222_write(0x0D, 0x23); + paw3222_write(0x0E, 0x24); + paw3222_write(0x19, 0x1C); + paw3222_write(0x05, 0xA1); + paw3222_write(0x2B, 0x6D); + paw3222_write(0x30, 0x2E); + paw3222_write(0x5C, 0xDF); + paw3222_write(0x7F, 0x01); + paw3222_write(0x06, 0x14); + paw3222_write(0x31, 0x25); + paw3222_write(0x34, 0xC4); + paw3222_write(0x36, 0xCC); + paw3222_write(0x37, 0x42); + paw3222_write(0x38, 0x01); + paw3222_write(0x3A, 0x76); + paw3222_write(0x3B, 0x34); + paw3222_write(0x42, 0x39); + paw3222_write(0x43, 0xF2); + paw3222_write(0x44, 0x39); + paw3222_write(0x45, 0xF0); + paw3222_write(0x46, 0x12); + paw3222_write(0x47, 0x39); + paw3222_write(0x48, 0xE3); + paw3222_write(0x49, 0x48); + paw3222_write(0x4A, 0xD3); + paw3222_write(0x4B, 0x98); + paw3222_write(0x64, 0x46); + paw3222_write(0x71, 0x28); + paw3222_write(0x72, 0x28); + paw3222_write(0x7F, 0x00); + paw3222_write(0x09, 0x00); + + // read a burst, then discard + paw3222_read_burst(); + + return true; +} + +report_paw3222_t paw3222_read_burst(void) { + report_paw3222_t report = {0}; + + uint8_t motion = paw3222_read(0x02); + if ((motion & MSB1) == MSB1) { + // Motion detected + uint16_t dx = (uint16_t)paw3222_read(0x03); + uint16_t dy = (uint16_t)paw3222_read(0x04); + uint16_t dxy_hi = (uint16_t)paw3222_read(0x12); + + dx = dx | ((dxy_hi & 0xF0) << 4); + dy = dy | ((dxy_hi & 0x0F) << 8); + + report.dx = convert_twoscomp_12(dx); + report.dy = convert_twoscomp_12(dy); + } + + return report; +} + +void paw3222_set_cpi(uint16_t cpi) { + uint16_t cpival = (cpi) < (480) ? (480) : ((cpi) > (4020) ? (4020) : (cpi)); + uint8_t cpival_x = (cpival + (30 / 2)) / 30; + uint8_t cpival_y = (cpival + (29 / 2)) / 29; + + paw3222_write(0x09, 0x5A); + paw3222_write(0x0D, cpival_x); + paw3222_write(0x0E, cpival_y); + paw3222_write(0x09, 0x00); +} + +uint16_t paw3222_get_cpi(void) { + uint8_t cpival = paw3222_read(0x0D); + return (uint16_t)(cpival * 30); +} + +report_mouse_t paw3222_get_report(report_mouse_t mouse_report) { + report_paw3222_t data = paw3222_read_burst(); + + if (data.dx != 0 || data.dy != 0) { + pd_dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy); + mouse_report.x = CONSTRAIN_HID_XY(data.dx); + mouse_report.y = CONSTRAIN_HID_XY(data.dy); + } + + return mouse_report; +} + +bool paw3222_check_signature(void) { + uint8_t checkval_1 = paw3222_read(0x00); + uint8_t checkval_2 = paw3222_read(0x01); + + return (checkval_1 == 0x30 && checkval_2 == 0x02); +} diff --git a/drivers/sensors/paw3222.h b/drivers/sensors/paw3222.h new file mode 100644 index 000000000000..8dbf6a38bb23 --- /dev/null +++ b/drivers/sensors/paw3222.h @@ -0,0 +1,47 @@ +/* Copyright 2024 Colin Lam (Ploopy Corporation) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include +#include "pointing_device.h" + +#ifndef PAW3222_CS_PIN +# ifdef POINTING_DEVICE_CS_PIN +# define PAW3222_CS_PIN POINTING_DEVICE_CS_PIN +# else +# error "No chip select pin defined -- missing POINTING_DEVICE_CS_PIN or PAW3222_CS_PIN define" +# endif +#endif + +#ifndef PAW3222_SPI_DIVISOR +# error "No PAW3222 SPI divisor defined -- missing PAW3222_SPI_DIVISOR" +#endif + +typedef struct { + int16_t dx; + int16_t dy; +} report_paw3222_t; + +extern const pointing_device_driver_t paw3222_pointing_device_driver; + +bool paw3222_init(void); +report_paw3222_t paw3222_read_burst(void); +void paw3222_set_cpi(uint16_t cpi); +uint16_t paw3222_get_cpi(void); +report_mouse_t paw3222_get_report(report_mouse_t mouse_report); +bool paw3222_check_signature(void); diff --git a/quantum/pointing_device/pointing_device.h b/quantum/pointing_device/pointing_device.h index 5dfb9ce196d2..bb0e43af3c49 100644 --- a/quantum/pointing_device/pointing_device.h +++ b/quantum/pointing_device/pointing_device.h @@ -39,6 +39,10 @@ typedef struct { #elif defined(POINTING_DEVICE_DRIVER_pmw3320) # include "drivers/sensors/pmw3320.h" # define POINTING_DEVICE_MOTION_PIN_ACTIVE_LOW +#elif defined(POINTING_DEVICE_DRIVER_paw3222) +# include "spi_master.h" +# include "drivers/sensors/paw3222.h" +# define POINTING_DEVICE_MOTION_PIN_ACTIVE_LOW #elif defined(POINTING_DEVICE_DRIVER_adns9800) # include "spi_master.h" # include "drivers/sensors/adns9800.h" From bb2ca21647d0d78e3cb4512a8a5974a324404fed Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 17 Nov 2025 02:06:59 +0000 Subject: [PATCH 1119/1205] Fix detection of hid bootloader flashing tool (#25790) --- lib/python/qmk/flashers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/python/qmk/flashers.py b/lib/python/qmk/flashers.py index 22d9133d65ee..b70b5fb03599 100644 --- a/lib/python/qmk/flashers.py +++ b/lib/python/qmk/flashers.py @@ -153,6 +153,7 @@ def _flash_atmel_dfu(mcu, file): def _flash_hid_bootloader(mcu, details, file): + cmd = None if details == 'halfkay': if shutil.which('teensy-loader-cli'): cmd = 'teensy-loader-cli' From eb5703d12ef7390da20e251367d936c8f5d68bb7 Mon Sep 17 00:00:00 2001 From: Ivan Gromov <38141348+key10iq@users.noreply.github.com> Date: Mon, 17 Nov 2025 05:09:09 +0300 Subject: [PATCH 1120/1205] Add imi60-HS (#25773) --- keyboards/keyten/imi60_hs/keyboard.json | 292 ++++++++++++++++++ .../keyten/imi60_hs/keymaps/default/keymap.c | 23 ++ keyboards/keyten/imi60_hs/readme.md | 27 ++ 3 files changed, 342 insertions(+) create mode 100644 keyboards/keyten/imi60_hs/keyboard.json create mode 100644 keyboards/keyten/imi60_hs/keymaps/default/keymap.c create mode 100644 keyboards/keyten/imi60_hs/readme.md diff --git a/keyboards/keyten/imi60_hs/keyboard.json b/keyboards/keyten/imi60_hs/keyboard.json new file mode 100644 index 000000000000..c9c805e403d2 --- /dev/null +++ b/keyboards/keyten/imi60_hs/keyboard.json @@ -0,0 +1,292 @@ +{ + "manufacturer": "La-Versa x keyten", + "keyboard_name": "imi60-HS", + "maintainer": "key10iq", + "processor": "STM32F072", + "bootloader": "stm32-dfu", + "usb": { + "vid": "0xEB69", + "pid": "0x6009", + "device_version": "0.0.1" + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "rows": ["B1", "B0", "A6", "A5", "B11"], + "cols": ["A3", "A4", "A7", "B2", "B10", "B9", "B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"] + }, + "community_layouts": [ + "60_ansi_wkl_split_bs_rshift", + "60_hhkb", + "60_ansi_tsangan_split_bs_rshift" + ], + "layout_aliases": { + "LAYOUT_all": "LAYOUT_60_ansi_tsangan_split_bs_rshift" + }, + "layouts": { + "LAYOUT_60_ansi_wkl_split_bs_rshift": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [2, 13], "x": 14, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [4, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_hhkb": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [2, 13], "x": 14, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [4, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 11], "x": 12.5, "y": 4} + ] + }, + "LAYOUT_60_ansi_tsangan_split_bs_rshift": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [2, 13], "x": 14, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [4, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 11], "x": 12.5, "y": 4}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_ansi_tsangan_split_rshift": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [2, 13], "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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [4, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 11], "x": 12.5, "y": 4}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + } + } +} diff --git a/keyboards/keyten/imi60_hs/keymaps/default/keymap.c b/keyboards/keyten/imi60_hs/keymaps/default/keymap.c new file mode 100644 index 000000000000..332586786731 --- /dev/null +++ b/keyboards/keyten/imi60_hs/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +// Copyright 2025 key10iq +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_60_ansi_tsangan_split_bs_rshift( + KC_ESC, 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_GRV, 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, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_60_ansi_tsangan_split_bs_rshift( + QK_BOOT, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/keyten/imi60_hs/readme.md b/keyboards/keyten/imi60_hs/readme.md new file mode 100644 index 000000000000..9fd3d3579db4 --- /dev/null +++ b/keyboards/keyten/imi60_hs/readme.md @@ -0,0 +1,27 @@ +# keyten imi60-HS + +imi60-HS - 60% Hot-Swap PCB compatible with keyboards by La-Versa: Animi, Mirimi, Otsukimi and Abyss + +![imi60-HS](https://live.staticflickr.com/65535/54904885051_339dbff9d8_b.jpg) + +* Keyboard Maintainer: [keyten](https://github.com/key10iq) +* Hardware Supported: keyten imi60-HS +* Hardware Availability: private GB + +Make example for this keyboard (after setting up your build environment): + + make keyten/imi60_hs:default + +Flashing example for this keyboard: + + make keyten/imi60_hs: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* Bootmagic reset: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* Keycode in layout: Press the key mapped to `QK_BOOT` if it is available +* Physical reset button: Hold the button on the back of the PCB From 6242c09f7d04a52349dc68edc784d57f3606dc81 Mon Sep 17 00:00:00 2001 From: yiancar Date: Mon, 17 Nov 2025 02:10:59 +0000 Subject: [PATCH 1121/1205] Hyper7 v4 (#25728) --- keyboards/yiancardesigns/hyper7/v4/config.h | 5 + .../yiancardesigns/hyper7/v4/keyboard.json | 429 ++++++++++++++++++ .../hyper7/v4/keymaps/default/keymap.c | 111 +++++ keyboards/yiancardesigns/hyper7/v4/readme.md | 25 + 4 files changed, 570 insertions(+) create mode 100644 keyboards/yiancardesigns/hyper7/v4/config.h create mode 100644 keyboards/yiancardesigns/hyper7/v4/keyboard.json create mode 100644 keyboards/yiancardesigns/hyper7/v4/keymaps/default/keymap.c create mode 100644 keyboards/yiancardesigns/hyper7/v4/readme.md diff --git a/keyboards/yiancardesigns/hyper7/v4/config.h b/keyboards/yiancardesigns/hyper7/v4/config.h new file mode 100644 index 000000000000..a33e746458af --- /dev/null +++ b/keyboards/yiancardesigns/hyper7/v4/config.h @@ -0,0 +1,5 @@ +// Copyright 2025 Yiancar-Designs, Bit-Shifter +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define DYNAMIC_KEYMAP_MACRO_COUNT 30 diff --git a/keyboards/yiancardesigns/hyper7/v4/keyboard.json b/keyboards/yiancardesigns/hyper7/v4/keyboard.json new file mode 100644 index 000000000000..b6cab6df6a4d --- /dev/null +++ b/keyboards/yiancardesigns/hyper7/v4/keyboard.json @@ -0,0 +1,429 @@ +{ + "manufacturer": "Yiancar-Designs", + "keyboard_name": "Hyper7 v4", + "maintainer": "Yiancar-Designs", + "bootloader": "stm32-dfu", + "bootmagic": { + "matrix": [3, 0] + }, + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["B11", "B10", "B2", "B1", "B0", "C5", "C4", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "B12", "B13", "B14", "B15", "A8", "C9", "C8", "C7", "C6", "C11", "C10", "A15", "A14"], + "rows": ["C1", "C2", "C3", "A13", "C12", "B3", "B4", "B5"] + }, + "processor": "STM32F072", + "url": "https://yiancar-designs.com", + "usb": { + "device_version": "0.0.1", + "pid": "0x6837", + "vid": "0x8968" + }, + "layouts": { + "LAYOUT_modern": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w":2}, + {"matrix": [0, 2], "x": 2, "y": 0, "w":2}, + {"matrix": [0, 4], "x": 4.5, "y": 0, "w":2}, + {"matrix": [0, 6], "x": 6.5, "y": 0, "w":2}, + {"matrix": [0, 8], "x": 8.5, "y": 0, "w":2}, + {"matrix": [0, 10], "x": 10.5, "y": 0, "w":2}, + {"matrix": [0, 12], "x": 12.5, "y": 0, "w":2}, + {"matrix": [0, 14], "x": 14.5, "y": 0, "w":2}, + {"matrix": [0, 16], "x": 16.5, "y": 0, "w":2}, + {"matrix": [0, 18], "x": 18.5, "y": 0, "w":2}, + {"matrix": [0, 20], "x": 20.5, "y": 0, "w":2}, + {"matrix": [0, 22], "x": 22.5, "y": 0, "w":2}, + {"matrix": [0, 24], "x": 25, "y": 0, "w":2}, + {"matrix": [0, 26], "x": 27, "y": 0, "w":2}, + {"matrix": [1, 0], "x": 0, "y": 1, "w":2}, + {"matrix": [1, 2], "x": 2, "y": 1, "w":2}, + {"matrix": [1, 4], "x": 4.5, "y": 1, "w":2}, + {"matrix": [1, 6], "x": 6.5, "y": 1, "w":2}, + {"matrix": [1, 8], "x": 8.5, "y": 1, "w":2}, + {"matrix": [1, 10], "x": 10.5, "y": 1, "w":2}, + {"matrix": [1, 12], "x": 12.5, "y": 1, "w":2}, + {"matrix": [1, 14], "x": 14.5, "y": 1, "w":2}, + {"matrix": [1, 16], "x": 16.5, "y": 1, "w":2}, + {"matrix": [1, 18], "x": 18.5, "y": 1, "w":2}, + {"matrix": [1, 20], "x": 20.5, "y": 1, "w":2}, + {"matrix": [1, 22], "x": 22.5, "y": 1, "w":2}, + {"matrix": [1, 24], "x": 25, "y": 1, "w":2}, + {"matrix": [1, 26], "x": 27, "y": 1, "w":2}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2, "w":2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 13], "x": 13.5, "y": 2}, + {"matrix": [2, 14], "x": 14.5, "y": 2}, + {"matrix": [2, 15], "x": 15.5, "y": 2}, + {"matrix": [2, 16], "x": 16.5, "y": 2}, + {"matrix": [2, 17], "x": 17.5, "y": 2}, + {"matrix": [2, 18], "x": 18.5, "y": 2}, + {"matrix": [2, 19], "x": 19.5, "y": 2}, + {"matrix": [2, 20], "x": 20.5, "y": 2}, + {"matrix": [2, 21], "x": 21.5, "y": 2}, + {"matrix": [2, 22], "x": 22.5, "y": 2, "w":2}, + {"matrix": [2, 24], "x": 25, "y": 2}, + {"matrix": [2, 25], "x": 26, "y": 2}, + {"matrix": [2, 26], "x": 27, "y": 2}, + {"matrix": [2, 27], "x": 28, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3.5}, + {"matrix": [3, 1], "x": 1, "y": 3.5}, + {"matrix": [3, 2], "x": 2, "y": 3.5}, + {"matrix": [3, 3], "x": 3, "y": 3.5}, + {"matrix": [3, 4], "x": 4.5, "y": 3.5, "w": 1.5}, + {"matrix": [3, 6], "x": 6, "y": 3.5}, + {"matrix": [3, 7], "x": 7, "y": 3.5}, + {"matrix": [3, 8], "x": 8, "y": 3.5}, + {"matrix": [3, 9], "x": 9, "y": 3.5}, + {"matrix": [3, 10], "x": 10, "y": 3.5}, + {"matrix": [3, 11], "x": 11, "y": 3.5}, + {"matrix": [3, 12], "x": 12, "y": 3.5}, + {"matrix": [3, 13], "x": 13, "y": 3.5}, + {"matrix": [3, 14], "x": 14, "y": 3.5}, + {"matrix": [3, 15], "x": 15, "y": 3.5}, + {"matrix": [3, 16], "x": 16, "y": 3.5}, + {"matrix": [3, 17], "x": 17, "y": 3.5}, + {"matrix": [3, 18], "x": 18, "y": 3.5}, + {"matrix": [3, 19], "x": 19, "y": 3.5}, + {"matrix": [3, 20], "x": 20, "y": 3.5}, + {"matrix": [3, 21], "x": 21, "y": 3.5}, + {"matrix": [3, 22], "x": 22, "y": 3.5}, + {"matrix": [3, 23], "x": 23, "y": 3.5, "w": 1.5}, + {"matrix": [3, 24], "x": 25, "y": 3.5}, + {"matrix": [3, 25], "x": 26, "y": 3.5}, + {"matrix": [3, 26], "x": 27, "y": 3.5}, + {"matrix": [3, 27], "x": 28, "y": 3.5}, + {"matrix": [4, 0], "x": 0, "y": 4.5}, + {"matrix": [4, 1], "x": 1, "y": 4.5}, + {"matrix": [4, 2], "x": 2, "y": 4.5}, + {"matrix": [4, 3], "x": 3, "y": 4.5}, + {"matrix": [4, 4], "x": 4.5, "y": 4.5}, + {"matrix": [4, 5], "x": 5.5, "y": 4.5, "w": 1.5}, + {"matrix": [4, 7], "x": 7, "y": 4.5, "w": 1.5}, + {"matrix": [4, 8], "x": 8.5, "y": 4.5}, + {"matrix": [4, 9], "x": 9.5, "y": 4.5}, + {"matrix": [4, 10], "x": 10.5, "y": 4.5}, + {"matrix": [4, 11], "x": 11.5, "y": 4.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4.5}, + {"matrix": [4, 13], "x": 13.5, "y": 4.5}, + {"matrix": [4, 14], "x": 14.5, "y": 4.5}, + {"matrix": [4, 15], "x": 15.5, "y": 4.5}, + {"matrix": [4, 16], "x": 16.5, "y": 4.5}, + {"matrix": [4, 17], "x": 17.5, "y": 4.5}, + {"matrix": [4, 18], "x": 18.5, "y": 4.5}, + {"matrix": [4, 19], "x": 19.5, "y": 4.5}, + {"matrix": [4, 20], "x": 20.5, "y": 4.5, "w": 1.5}, + {"matrix": [4, 22], "x": 22, "y": 4.5, "w": 1.5}, + {"matrix": [4, 23], "x": 23.5, "y": 4.5}, + {"matrix": [4, 24], "x": 25, "y": 4.5}, + {"matrix": [4, 25], "x": 26, "y": 4.5}, + {"matrix": [4, 26], "x": 27, "y": 4.5}, + {"matrix": [4, 27], "x": 28, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5}, + {"matrix": [5, 1], "x": 1, "y": 5.5}, + {"matrix": [5, 2], "x": 2, "y": 5.5}, + {"matrix": [5, 3], "x": 3, "y": 5.5}, + {"matrix": [5, 4], "x": 4.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 6, "y": 5.5, "w": 1.5}, + {"matrix": [5, 7], "x": 7.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 9], "x": 9, "y": 5.5}, + {"matrix": [5, 10], "x": 10, "y": 5.5}, + {"matrix": [5, 11], "x": 11, "y": 5.5}, + {"matrix": [5, 12], "x": 12, "y": 5.5}, + {"matrix": [5, 13], "x": 13, "y": 5.5}, + {"matrix": [5, 14], "x": 14, "y": 5.5}, + {"matrix": [5, 15], "x": 15, "y": 5.5}, + {"matrix": [5, 16], "x": 16, "y": 5.5}, + {"matrix": [5, 17], "x": 17, "y": 5.5}, + {"matrix": [5, 18], "x": 18, "y": 5.5}, + {"matrix": [5, 19], "x": 19, "y": 5.5}, + {"matrix": [5, 20], "x": 20, "y": 5.5, "w": 1.5}, + {"matrix": [5, 21], "x": 21.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 23], "x": 23, "y": 5.5, "w": 1.5}, + {"matrix": [5, 24], "x": 25, "y": 5.5}, + {"matrix": [5, 25], "x": 26, "y": 5.5}, + {"matrix": [5, 26], "x": 27, "y": 5.5}, + {"matrix": [5, 27], "x": 28, "y": 5.5}, + {"matrix": [6, 0], "x": 0, "y": 6.5}, + {"matrix": [6, 1], "x": 1, "y": 6.5}, + {"matrix": [6, 2], "x": 2, "y": 6.5}, + {"matrix": [6, 3], "x": 3, "y": 6.5}, + {"matrix": [6, 4], "x": 4.5, "y": 6.5}, + {"matrix": [6, 5], "x": 5.5, "y": 6.5}, + {"matrix": [6, 6], "x": 6.5, "y": 6.5, "w": 1.5}, + {"matrix": [6, 8], "x": 8, "y": 6.5, "w": 1.5}, + {"matrix": [6, 9], "x": 9.5, "y": 6.5}, + {"matrix": [6, 10], "x": 10.5, "y": 6.5}, + {"matrix": [6, 11], "x": 11.5, "y": 6.5}, + {"matrix": [6, 12], "x": 12.5, "y": 6.5}, + {"matrix": [6, 13], "x": 13.5, "y": 6.5}, + {"matrix": [6, 14], "x": 14.5, "y": 6.5}, + {"matrix": [6, 15], "x": 15.5, "y": 6.5}, + {"matrix": [6, 16], "x": 16.5, "y": 6.5}, + {"matrix": [6, 17], "x": 17.5, "y": 6.5}, + {"matrix": [6, 18], "x": 18.5, "y": 6.5}, + {"matrix": [6, 19], "x": 19.5, "y": 6.5, "w": 1.5}, + {"matrix": [6, 21], "x": 21, "y": 6.5, "w": 1.5}, + {"matrix": [6, 22], "x": 22.5, "y": 6.5}, + {"matrix": [6, 23], "x": 23.5, "y": 6.5}, + {"matrix": [6, 24], "x": 25, "y": 6.5}, + {"matrix": [6, 25], "x": 26, "y": 6.5}, + {"matrix": [6, 26], "x": 27, "y": 6.5}, + {"matrix": [6, 27], "x": 28, "y": 6.5}, + {"matrix": [7, 0], "x": 0, "y": 7.5}, + {"matrix": [7, 1], "x": 1, "y": 7.5}, + {"matrix": [7, 2], "x": 2, "y": 7.5}, + {"matrix": [7, 3], "x": 3, "y": 7.5}, + {"matrix": [7, 4], "x": 4.5, "y": 7.5}, + {"matrix": [7, 5], "x": 5.5, "y": 7.5}, + {"matrix": [7, 6], "x": 6.5, "y": 7.5}, + {"matrix": [7, 7], "x": 7.5, "y": 7.5, "w": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 7.5, "w": 1.5}, + {"matrix": [7, 13], "x": 10.5, "y": 7.5, "w": 7}, + {"matrix": [7, 18], "x": 17.5, "y": 7.5}, + {"matrix": [7, 19], "x": 18.5, "y": 7.5, "w": 1.5}, + {"matrix": [7, 20], "x": 20, "y": 7.5, "w": 1.5}, + {"matrix": [7, 21], "x": 21.5, "y": 7.5}, + {"matrix": [7, 22], "x": 22.5, "y": 7.5}, + {"matrix": [7, 23], "x": 23.5, "y": 7.5}, + {"matrix": [7, 24], "x": 25, "y": 7.5}, + {"matrix": [7, 25], "x": 26, "y": 7.5}, + {"matrix": [7, 26], "x": 27, "y": 7.5}, + {"matrix": [7, 27], "x": 28, "y": 7.5} + ] + }, + "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.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0}, + {"matrix": [0, 14], "x": 14.5, "y": 0}, + {"matrix": [0, 15], "x": 15.5, "y": 0}, + {"matrix": [0, 16], "x": 16.5, "y": 0}, + {"matrix": [0, 17], "x": 17.5, "y": 0}, + {"matrix": [0, 18], "x": 18.5, "y": 0}, + {"matrix": [0, 19], "x": 19.5, "y": 0}, + {"matrix": [0, 20], "x": 20.5, "y": 0}, + {"matrix": [0, 21], "x": 21.5, "y": 0}, + {"matrix": [0, 22], "x": 22.5, "y": 0}, + {"matrix": [0, 23], "x": 23.5, "y": 0}, + {"matrix": [0, 24], "x": 25, "y": 0}, + {"matrix": [0, 25], "x": 26, "y": 0}, + {"matrix": [0, 26], "x": 27, "y": 0}, + {"matrix": [0, 27], "x": 28, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1}, + {"matrix": [1, 14], "x": 14.5, "y": 1}, + {"matrix": [1, 15], "x": 15.5, "y": 1}, + {"matrix": [1, 16], "x": 16.5, "y": 1}, + {"matrix": [1, 17], "x": 17.5, "y": 1}, + {"matrix": [1, 18], "x": 18.5, "y": 1}, + {"matrix": [1, 19], "x": 19.5, "y": 1}, + {"matrix": [1, 20], "x": 20.5, "y": 1}, + {"matrix": [1, 21], "x": 21.5, "y": 1}, + {"matrix": [1, 22], "x": 22.5, "y": 1}, + {"matrix": [1, 23], "x": 23.5, "y": 1}, + {"matrix": [1, 24], "x": 25, "y": 1}, + {"matrix": [1, 25], "x": 26, "y": 1}, + {"matrix": [1, 26], "x": 27, "y": 1}, + {"matrix": [1, 27], "x": 28, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 13], "x": 13.5, "y": 2}, + {"matrix": [2, 14], "x": 14.5, "y": 2}, + {"matrix": [2, 15], "x": 15.5, "y": 2}, + {"matrix": [2, 16], "x": 16.5, "y": 2}, + {"matrix": [2, 17], "x": 17.5, "y": 2}, + {"matrix": [2, 18], "x": 18.5, "y": 2}, + {"matrix": [2, 19], "x": 19.5, "y": 2}, + {"matrix": [2, 20], "x": 20.5, "y": 2}, + {"matrix": [2, 21], "x": 21.5, "y": 2}, + {"matrix": [2, 22], "x": 22.5, "y": 2}, + {"matrix": [2, 23], "x": 23.5, "y": 2}, + {"matrix": [2, 24], "x": 25, "y": 2}, + {"matrix": [2, 25], "x": 26, "y": 2}, + {"matrix": [2, 26], "x": 27, "y": 2}, + {"matrix": [2, 27], "x": 28, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3.5}, + {"matrix": [3, 1], "x": 1, "y": 3.5}, + {"matrix": [3, 2], "x": 2, "y": 3.5}, + {"matrix": [3, 3], "x": 3, "y": 3.5}, + {"matrix": [3, 4], "x": 4.5, "y": 3.5, "w": 1.5}, + {"matrix": [3, 6], "x": 6, "y": 3.5}, + {"matrix": [3, 7], "x": 7, "y": 3.5}, + {"matrix": [3, 8], "x": 8, "y": 3.5}, + {"matrix": [3, 9], "x": 9, "y": 3.5}, + {"matrix": [3, 10], "x": 10, "y": 3.5}, + {"matrix": [3, 11], "x": 11, "y": 3.5}, + {"matrix": [3, 12], "x": 12, "y": 3.5}, + {"matrix": [3, 13], "x": 13, "y": 3.5}, + {"matrix": [3, 14], "x": 14, "y": 3.5}, + {"matrix": [3, 15], "x": 15, "y": 3.5}, + {"matrix": [3, 16], "x": 16, "y": 3.5}, + {"matrix": [3, 17], "x": 17, "y": 3.5}, + {"matrix": [3, 18], "x": 18, "y": 3.5}, + {"matrix": [3, 19], "x": 19, "y": 3.5}, + {"matrix": [3, 20], "x": 20, "y": 3.5}, + {"matrix": [3, 21], "x": 21, "y": 3.5}, + {"matrix": [3, 22], "x": 22, "y": 3.5}, + {"matrix": [3, 23], "x": 23, "y": 3.5, "w": 1.5}, + {"matrix": [3, 24], "x": 25, "y": 3.5}, + {"matrix": [3, 25], "x": 26, "y": 3.5}, + {"matrix": [3, 26], "x": 27, "y": 3.5}, + {"matrix": [3, 27], "x": 28, "y": 3.5}, + {"matrix": [4, 0], "x": 0, "y": 4.5}, + {"matrix": [4, 1], "x": 1, "y": 4.5}, + {"matrix": [4, 2], "x": 2, "y": 4.5}, + {"matrix": [4, 3], "x": 3, "y": 4.5}, + {"matrix": [4, 4], "x": 4.5, "y": 4.5}, + {"matrix": [4, 5], "x": 5.5, "y": 4.5, "w": 1.5}, + {"matrix": [4, 7], "x": 7, "y": 4.5, "w": 1.5}, + {"matrix": [4, 8], "x": 8.5, "y": 4.5}, + {"matrix": [4, 9], "x": 9.5, "y": 4.5}, + {"matrix": [4, 10], "x": 10.5, "y": 4.5}, + {"matrix": [4, 11], "x": 11.5, "y": 4.5}, + {"matrix": [4, 12], "x": 12.5, "y": 4.5}, + {"matrix": [4, 13], "x": 13.5, "y": 4.5}, + {"matrix": [4, 14], "x": 14.5, "y": 4.5}, + {"matrix": [4, 15], "x": 15.5, "y": 4.5}, + {"matrix": [4, 16], "x": 16.5, "y": 4.5}, + {"matrix": [4, 17], "x": 17.5, "y": 4.5}, + {"matrix": [4, 18], "x": 18.5, "y": 4.5}, + {"matrix": [4, 19], "x": 19.5, "y": 4.5}, + {"matrix": [4, 20], "x": 20.5, "y": 4.5, "w": 1.5}, + {"matrix": [4, 22], "x": 22, "y": 4.5, "w": 1.5}, + {"matrix": [4, 23], "x": 23.5, "y": 4.5}, + {"matrix": [4, 24], "x": 25, "y": 4.5}, + {"matrix": [4, 25], "x": 26, "y": 4.5}, + {"matrix": [4, 26], "x": 27, "y": 4.5}, + {"matrix": [4, 27], "x": 28, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5}, + {"matrix": [5, 1], "x": 1, "y": 5.5}, + {"matrix": [5, 2], "x": 2, "y": 5.5}, + {"matrix": [5, 3], "x": 3, "y": 5.5}, + {"matrix": [5, 4], "x": 4.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 6, "y": 5.5, "w": 1.5}, + {"matrix": [5, 7], "x": 7.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 9], "x": 9, "y": 5.5}, + {"matrix": [5, 10], "x": 10, "y": 5.5}, + {"matrix": [5, 11], "x": 11, "y": 5.5}, + {"matrix": [5, 12], "x": 12, "y": 5.5}, + {"matrix": [5, 13], "x": 13, "y": 5.5}, + {"matrix": [5, 14], "x": 14, "y": 5.5}, + {"matrix": [5, 15], "x": 15, "y": 5.5}, + {"matrix": [5, 16], "x": 16, "y": 5.5}, + {"matrix": [5, 17], "x": 17, "y": 5.5}, + {"matrix": [5, 18], "x": 18, "y": 5.5}, + {"matrix": [5, 19], "x": 19, "y": 5.5}, + {"matrix": [5, 20], "x": 20, "y": 5.5, "w": 1.5}, + {"matrix": [5, 21], "x": 21.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 23], "x": 23, "y": 5.5, "w": 1.5}, + {"matrix": [5, 24], "x": 25, "y": 5.5}, + {"matrix": [5, 25], "x": 26, "y": 5.5}, + {"matrix": [5, 26], "x": 27, "y": 5.5}, + {"matrix": [5, 27], "x": 28, "y": 5.5}, + {"matrix": [6, 0], "x": 0, "y": 6.5}, + {"matrix": [6, 1], "x": 1, "y": 6.5}, + {"matrix": [6, 2], "x": 2, "y": 6.5}, + {"matrix": [6, 3], "x": 3, "y": 6.5}, + {"matrix": [6, 4], "x": 4.5, "y": 6.5}, + {"matrix": [6, 5], "x": 5.5, "y": 6.5}, + {"matrix": [6, 6], "x": 6.5, "y": 6.5, "w": 1.5}, + {"matrix": [6, 8], "x": 8, "y": 6.5, "w": 1.5}, + {"matrix": [6, 9], "x": 9.5, "y": 6.5}, + {"matrix": [6, 10], "x": 10.5, "y": 6.5}, + {"matrix": [6, 11], "x": 11.5, "y": 6.5}, + {"matrix": [6, 12], "x": 12.5, "y": 6.5}, + {"matrix": [6, 13], "x": 13.5, "y": 6.5}, + {"matrix": [6, 14], "x": 14.5, "y": 6.5}, + {"matrix": [6, 15], "x": 15.5, "y": 6.5}, + {"matrix": [6, 16], "x": 16.5, "y": 6.5}, + {"matrix": [6, 17], "x": 17.5, "y": 6.5}, + {"matrix": [6, 18], "x": 18.5, "y": 6.5}, + {"matrix": [6, 19], "x": 19.5, "y": 6.5, "w": 1.5}, + {"matrix": [6, 21], "x": 21, "y": 6.5, "w": 1.5}, + {"matrix": [6, 22], "x": 22.5, "y": 6.5}, + {"matrix": [6, 23], "x": 23.5, "y": 6.5}, + {"matrix": [6, 24], "x": 25, "y": 6.5}, + {"matrix": [6, 25], "x": 26, "y": 6.5}, + {"matrix": [6, 26], "x": 27, "y": 6.5}, + {"matrix": [6, 27], "x": 28, "y": 6.5}, + {"matrix": [7, 0], "x": 0, "y": 7.5}, + {"matrix": [7, 1], "x": 1, "y": 7.5}, + {"matrix": [7, 2], "x": 2, "y": 7.5}, + {"matrix": [7, 3], "x": 3, "y": 7.5}, + {"matrix": [7, 4], "x": 4.5, "y": 7.5}, + {"matrix": [7, 5], "x": 5.5, "y": 7.5}, + {"matrix": [7, 6], "x": 6.5, "y": 7.5}, + {"matrix": [7, 7], "x": 7.5, "y": 7.5}, + {"matrix": [7, 8], "x": 8.5, "y": 7.5, "w": 1.5}, + {"matrix": [7, 10], "x": 10, "y": 7.5}, + {"matrix": [7, 11], "x": 11, "y": 7.5, "w": 1.5}, + {"matrix": [7, 12], "x": 12.5, "y": 7.5, "w": 1.5}, + {"matrix": [7, 14], "x": 14, "y": 7.5}, + {"matrix": [7, 15], "x": 15, "y": 7.5, "w": 1.5}, + {"matrix": [7, 16], "x": 16.5, "y": 7.5, "w": 1.5}, + {"matrix": [7, 18], "x": 18, "y": 7.5}, + {"matrix": [7, 19], "x": 19, "y": 7.5, "w": 1.5}, + {"matrix": [7, 20], "x": 20.5, "y": 7.5}, + {"matrix": [7, 21], "x": 21.5, "y": 7.5}, + {"matrix": [7, 22], "x": 22.5, "y": 7.5}, + {"matrix": [7, 23], "x": 23.5, "y": 7.5}, + {"matrix": [7, 24], "x": 25, "y": 7.5}, + {"matrix": [7, 25], "x": 26, "y": 7.5}, + {"matrix": [7, 26], "x": 27, "y": 7.5}, + {"matrix": [7, 27], "x": 28, "y": 7.5}, + {"matrix": [7, 13], "x": 11, "y": 8.5, "w": 7} + ] + } + } +} diff --git a/keyboards/yiancardesigns/hyper7/v4/keymaps/default/keymap.c b/keyboards/yiancardesigns/hyper7/v4/keymaps/default/keymap.c new file mode 100644 index 000000000000..3b2a333ac3dc --- /dev/null +++ b/keyboards/yiancardesigns/hyper7/v4/keymaps/default/keymap.c @@ -0,0 +1,111 @@ +// Copyright 2025 Yiancar-Designs, Bit-Shifter +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +enum my_keycodes { + MACRO = QK_USER_0, + QUOTE, + CLRIN, + SQUAR, + CIRCL, + TRIAN, + DIAMO, + WRITE, + TTY, + PLUSM, + MODE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MACRO: + if (record->event.pressed) { + // when keycode MACRO is pressed + SEND_STRING("Hyper7 is the best thing ever!"); + } + break; + case QUOTE: + if (record->event.pressed) { + // when keycode QUOTE is pressed + SEND_STRING("\"\"" SS_TAP(X_LEFT)); + } + break; + case CLRIN: + if (record->event.pressed) { + // when keycode CLRIN is pressed + SEND_STRING(SS_LCTL("a") SS_TAP(X_DEL)); + } + break; + case SQUAR: + if (record->event.pressed) { + // when keycode SQUAR is pressed + SEND_STRING("I like squares"); + } + break; + case CIRCL: + if (record->event.pressed) { + // when keycode CIRCL is pressed + SEND_STRING("I like circles"); + } + break; + case TRIAN: + if (record->event.pressed) { + // when keycode TRIAN is pressed + SEND_STRING("I like the illuminati"); + } + break; + case DIAMO: + if (record->event.pressed) { + // when keycode DIAMO is pressed + SEND_STRING("Everyone likes diamonds"); + } + break; + case WRITE: + if (record->event.pressed) { + // when keycode WRITE is pressed + SEND_STRING(SS_LGUI("x") "notepad" SS_TAP(X_ENT)); + } + break; + case TTY: + if (record->event.pressed) { + // when keycode TTY is pressed + SEND_STRING(SS_LGUI("x") "cmd" SS_TAP(X_ENT)); + } + break; + case PLUSM: + if (record->event.pressed) { + // when keycode PLUSM is pressed + SEND_STRING("+-"); + } + case MODE: + if (record->event.pressed) { + // when keycode MODE is pressed + SEND_STRING("Mode"); + } + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_modern( + G(KC_F1), MACRO, RCS(KC_ESC), QUOTE, KC_INS, CLRIN, G(KC_D), C(KC_S), C(KC_C), A(KC_F4), KC_PAUS, C(KC_P), G(C(KC_Q)), LCA(KC_DEL), + G(KC_X), KC_WHOM, G(KC_PAUS), C(KC_R), A(KC_TAB), SQUAR, CIRCL, TRIAN, DIAMO, C(KC_Y), LAG(KC_R), RCS(KC_ESC), G(KC_L), KC_CAPS, + KC_F1, KC_F2, A(KC_F4), G(KC_R), KC_ESC, KC_QUES, KC_EXLM, KC_AT, KC_AT, KC_AT, KC_AT, KC_GRV, KC_GRV, KC_GRV, KC_GRV, KC_UNDS, KC_LABK, KC_RABK, KC_PIPE, KC_LCBR, KC_RCBR, C(KC_ENT), KC_CIRC, KC_PERC, KC_HASH, KC_DLR, + KC_F3, KC_F4, C(KC_F), WRITE, LSFT(KC_N), PLUSM, KC_TILD, 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_NUBS, KC_LBRC, KC_RBRC, C(KC_Z), KC_PMNS, KC_PSLS, KC_PAST, KC_PMNS, + KC_F5, KC_F6, C(KC_M), C(KC_Z), C(KC_V), C(KC_X), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCBR, KC_RCBR, KC_BSPC, KC_CLEAR, C(KC_HOME),KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_F7, KC_F8, C(KC_A), KC_F12, MO(1), MODE, KC_PGUP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_QUOT, KC_ENT, KC_HOME, KC_PGDN, KC_P4, KC_P5, KC_P6, KC_AMPR, + KC_F9, KC_F10, TTY, G(KC_L), C(KC_HOME),KC_END, G(KC_DOT), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, G(KC_DOT), KC_UP, KC_LGUI, KC_P1, KC_P2, KC_P3, KC_EQL, + KC_F11, KC_F12, KC_HOME, C(KC_END), C(KC_LEFT),C(KC_RGHT),G(KC_DOWN),KC_HYPR, KC_LALT, KC_SPC, KC_RGUI, KC_HYPR, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_P0, KC_PDOT, KC_ENTER + ), + [1] = LAYOUT_modern( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/yiancardesigns/hyper7/v4/readme.md b/keyboards/yiancardesigns/hyper7/v4/readme.md new file mode 100644 index 000000000000..264ee7d57812 --- /dev/null +++ b/keyboards/yiancardesigns/hyper7/v4/readme.md @@ -0,0 +1,25 @@ +# Hyper7 v4 + +This is a very big pcb... It supports VIA. + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: A very big keyboard with STM32F072RB +* Hardware Availability: https://mechboards.co.uk/ + +Make example for this keyboard (after setting up your build environment): + + make yiancardesigns/hyper7/v4:default + +Flashing example for this keyboard: + + make yiancardesigns/hyper7/v4: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (3,0) in the matrix (F3) and plug in the keyboard +* **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 From 8eebc613cf1ba9ae8213a20b3a500eefcd08ffd3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 17 Nov 2025 02:24:23 +0000 Subject: [PATCH 1122/1205] Merge upstream uf2conv changes (#25786) --- util/uf2conv.py | 26 +++++++------ util/uf2families.json | 85 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 12 deletions(-) diff --git a/util/uf2conv.py b/util/uf2conv.py index 67cf92f1691d..a0507b00b939 100755 --- a/util/uf2conv.py +++ b/util/uf2conv.py @@ -142,9 +142,9 @@ def convert_to_uf2(file_content): return b"".join(outp) class Block: - def __init__(self, addr): + def __init__(self, addr, default_data=0xFF): self.addr = addr - self.bytes = bytearray(256) + self.bytes = bytearray([default_data] * 256) def encode(self, blockno, numblocks): global familyid @@ -210,24 +210,26 @@ def to_str(b): def get_drives(): drives = [] if sys.platform == "win32": - r = subprocess.check_output(["wmic", "PATH", "Win32_LogicalDisk", - "get", "DeviceID,", "VolumeName,", - "FileSystem,", "DriveType"]) - for line in to_str(r).split('\n'): - words = re.split(r'\s+', line) - if len(words) >= 3 and words[1] == "2" and words[2] == "FAT": - drives.append(words[0]) + r = subprocess.check_output([ + "powershell", + "-Command", + '(Get-WmiObject Win32_LogicalDisk -Filter "FileSystem=\'FAT\'").DeviceID' + ]) + drives = [drive.strip() for drive in to_str(r).splitlines()] else: - searchpaths = ["/media"] + searchpaths = ["/mnt", "/media"] if sys.platform == "darwin": searchpaths = ["/Volumes"] elif sys.platform == "linux": - searchpaths += ["/media/" + os.environ["USER"], '/run/media/' + os.environ["USER"]] + searchpaths += ["/media/" + os.environ["USER"], "/run/media/" + os.environ["USER"]] + if "SUDO_USER" in os.environ.keys(): + searchpaths += ["/media/" + os.environ["SUDO_USER"]] + searchpaths += ["/run/media/" + os.environ["SUDO_USER"]] for rootpath in searchpaths: if os.path.isdir(rootpath): for d in os.listdir(rootpath): - if os.path.isdir(rootpath): + if os.path.isdir(os.path.join(rootpath, d)): drives.append(os.path.join(rootpath, d)) diff --git a/util/uf2families.json b/util/uf2families.json index e35bf8d4284d..cd21783fe368 100644 --- a/util/uf2families.json +++ b/util/uf2families.json @@ -34,6 +34,11 @@ "short_name": "STM32WL", "description": "ST STM32WLxx" }, + { + "id": "0x22e0d6fc", + "short_name": "RTL8710B", + "description": "Realtek AmebaZ RTL8710B" + }, { "id": "0x2abc77ec", "short_name": "LPC55", @@ -49,6 +54,11 @@ "short_name": "GD32F350", "description": "GD32F350" }, + { + "id": "0x3379CFE2", + "short_name": "RTL8720D", + "description": "Realtek AmebaD RTL8720D" + }, { "id": "0x04240bdf", "short_name": "STM32L5", @@ -64,6 +74,11 @@ "short_name": "MIMXRT10XX", "description": "NXP i.MX RT10XX" }, + { + "id": "0x51e903a8", + "short_name": "XR809", + "description": "Xradiotech 809" + }, { "id": "0x53b80f00", "short_name": "STM32F7", @@ -104,11 +119,21 @@ "short_name": "STM32F0", "description": "ST STM32F0xx" }, + { + "id": "0x675a40b0", + "short_name": "BK7231U", + "description": "Beken 7231U/7231T" + }, { "id": "0x68ed2b88", "short_name": "SAMD21", "description": "Microchip (Atmel) SAMD21" }, + { + "id": "0x6a82cc42", + "short_name": "BK7251", + "description": "Beken 7251/7252" + }, { "id": "0x6b846188", "short_name": "STM32F3", @@ -119,6 +144,11 @@ "short_name": "STM32F407", "description": "ST STM32F407" }, + { + "id": "0x4e8f1c5d", + "short_name": "STM32H5", + "description": "ST STM32H5xx" + }, { "id": "0x6db66082", "short_name": "STM32H7", @@ -129,6 +159,11 @@ "short_name": "STM32WB", "description": "ST STM32WBxx" }, + { + "id": "0x7b3ef230", + "short_name": "BK7231N", + "description": "Beken 7231N" + }, { "id": "0x7eab61ed", "short_name": "ESP8266", @@ -144,11 +179,21 @@ "short_name": "STM32F407VG", "description": "ST STM32F407VG" }, + { + "id": "0x9fffd543", + "short_name": "RTL8710A", + "description": "Realtek Ameba1 RTL8710A" + }, { "id": "0xada52840", "short_name": "NRF52840", "description": "Nordic NRF52840" }, + { + "id": "0x820d9a5f", + "short_name": "NRF52820", + "description": "Nordic NRF52820_xxAA" + }, { "id": "0xbfdd4eee", "short_name": "ESP32S2", @@ -194,6 +239,26 @@ "short_name": "ESP32C61", "description": "ESP32-C61" }, + { + "id": "0xb6dd00af", + "short_name": "ESP32H21", + "description": "ESP32-H21" + }, + { + "id": "0x9e0baa8a", + "short_name": "ESP32H4", + "description": "ESP32-H4" + }, + { + "id": "0xde1270b7", + "short_name": "BL602", + "description": "Boufallo 602" + }, + { + "id": "0xe08f7564", + "short_name": "RTL8720C", + "description": "Realtek AmebaZ2 RTL8720C" + }, { "id": "0xe48bff56", "short_name": "RP2040", @@ -293,5 +358,25 @@ "id": "0x7be8976d", "short_name": "RA4M1", "description": "Renesas RA4M1" + }, + { + "id": "0x7410520a", + "short_name": "MAX32690", + "description": "Analog Devices MAX32690" + }, + { + "id": "0xd63f8632", + "short_name": "MAX32650", + "description": "Analog Devices MAX32650/1/2" + }, + { + "id": "0xf0c30d71", + "short_name": "MAX32666", + "description": "Analog Devices MAX32665/6" + }, + { + "id": "0x91d3fd18", + "short_name": "MAX78002", + "description": "Analog Devices MAX78002" } ] From 5bb74764005f6a88266bd1295fbb473301676786 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 19 Nov 2025 03:45:29 +0000 Subject: [PATCH 1123/1205] Short term fix for skip_converter KeyError in 'qmk userspace-add' (#25798) --- lib/python/qmk/cli/userspace/add.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/python/qmk/cli/userspace/add.py b/lib/python/qmk/cli/userspace/add.py index 0d6f32cd11db..eea70efb956f 100644 --- a/lib/python/qmk/cli/userspace/add.py +++ b/lib/python/qmk/cli/userspace/add.py @@ -47,6 +47,7 @@ def userspace_add(cli): from qmk.cli.new.keymap import new_keymap cli.config.new_keymap.keyboard = cli.args.keyboard cli.config.new_keymap.keymap = cli.args.keymap + cli.args.skip_converter = True if new_keymap(cli) is not False: userspace.add_target(keyboard=cli.args.keyboard, keymap=cli.args.keymap, build_env=build_env) else: From 0fde9c9cac5b2e86a2fe28cf8e2ea85b4b9c4c69 Mon Sep 17 00:00:00 2001 From: andrew morton Date: Tue, 18 Nov 2025 20:50:47 -0700 Subject: [PATCH 1124/1205] [Keyboard] Add Coffee Break Keyboards Acai (#25796) * Add support for Coffee Break Keyboards Acai * Apply suggestions from code review Co-authored-by: Jack Sangdahl * Ran qmk format-json * Misssed one of @waffle87's suggestions * Misssed another of @waffle87's suggestions * Try hosting on imgur.com * Remove empty layers, add boot to layer 2 * Enhance the default keymap * Use correct keycodes for RGB --------- Co-authored-by: Jack Sangdahl --- keyboards/cbkbd/acai/keyboard.json | 174 ++++++++++++++++++ keyboards/cbkbd/acai/keymaps/default/keymap.c | 29 +++ keyboards/cbkbd/acai/readme.md | 26 +++ 3 files changed, 229 insertions(+) create mode 100644 keyboards/cbkbd/acai/keyboard.json create mode 100644 keyboards/cbkbd/acai/keymaps/default/keymap.c create mode 100644 keyboards/cbkbd/acai/readme.md diff --git a/keyboards/cbkbd/acai/keyboard.json b/keyboards/cbkbd/acai/keyboard.json new file mode 100644 index 000000000000..b1babe779720 --- /dev/null +++ b/keyboards/cbkbd/acai/keyboard.json @@ -0,0 +1,174 @@ +{ + "manufacturer": "CoffeeBreakKeyboards", + "keyboard_name": "Acai", + "maintainer": "CoffeeBreakKeyboards", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "dynamic_keymap": { + "layer_count": 6 + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["GP25", "GP24", "GP23", "GP20", "GP18", "GP7", "GP6", "GP5", "GP4", "GP3"], + "rows": ["GP27", "GP28", "GP19", "GP26"] + }, + "processor": "RP2040", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "flower_blooming": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "riverflow": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "starlight": true, + "starlight_dual_hue": true, + "starlight_dual_sat": true, + "typing_heatmap": true + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 4], "x": 100, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 50, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 25, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 25, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 50, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 75, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 100, "y": 21, "flags": 4}, + {"matrix": [2, 4], "x": 100, "y": 43, "flags": 4}, + {"matrix": [2, 3], "x": 75, "y": 43, "flags": 4}, + {"matrix": [2, 2], "x": 50, "y": 43, "flags": 4}, + {"matrix": [2, 1], "x": 25, "y": 43, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 25, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 50, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 75, "y": 64, "flags": 4}, + {"matrix": [3, 4], "x": 100, "y": 64, "flags": 4}, + {"matrix": [3, 5], "x": 125, "y": 64, "flags": 4}, + {"matrix": [3, 6], "x": 150, "y": 64, "flags": 4}, + {"matrix": [3, 7], "x": 175, "y": 64, "flags": 4}, + {"matrix": [3, 8], "x": 200, "y": 64, "flags": 4}, + {"matrix": [3, 9], "x": 224, "y": 64, "flags": 4}, + {"matrix": [2, 9], "x": 224, "y": 43, "flags": 4}, + {"matrix": [2, 8], "x": 200, "y": 43, "flags": 4}, + {"matrix": [2, 7], "x": 175, "y": 43, "flags": 4}, + {"matrix": [2, 6], "x": 150, "y": 43, "flags": 4}, + {"matrix": [2, 5], "x": 125, "y": 43, "flags": 4}, + {"matrix": [1, 5], "x": 125, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 150, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 175, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 200, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 224, "y": 21, "flags": 4}, + {"matrix": [0, 9], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 200, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 175, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 125, "y": 0, "flags": 4} + ], + "max_brightness": 125, + "sleep": true + }, + "usb": { + "device_version": "0.0.1", + "pid": "0x1075", + "vid": "0x4342" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP29" + }, + "layouts": { + "LAYOUT": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 6], "x": 6, "y": 2}, + {"matrix": [2, 7], "x": 7, "y": 2}, + {"matrix": [2, 8], "x": 8, "y": 2}, + {"matrix": [2, 9], "x": 9, "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}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + {"matrix": [3, 6], "x": 6, "y": 3}, + {"matrix": [3, 7], "x": 7, "y": 3}, + {"matrix": [3, 8], "x": 8, "y": 3}, + {"matrix": [3, 9], "x": 9, "y": 3} + ] + } + } +} diff --git a/keyboards/cbkbd/acai/keymaps/default/keymap.c b/keyboards/cbkbd/acai/keymaps/default/keymap.c new file mode 100644 index 000000000000..90ff4a4f49db --- /dev/null +++ b/keyboards/cbkbd/acai/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENTER, + LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), + KC_LCTL, KC_LGUI, KC_LALT, LT(1,KC_BSPC), KC_DEL, KC_ENT, LT(2,KC_SPACE), KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT( + RM_TOGG, RM_NEXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/cbkbd/acai/readme.md b/keyboards/cbkbd/acai/readme.md new file mode 100644 index 000000000000..f3c2b1728d56 --- /dev/null +++ b/keyboards/cbkbd/acai/readme.md @@ -0,0 +1,26 @@ +# Acai + +![Acai](https://imgur.com/eWKoH96.png) + +A 10x4 ortholinear keyboard made and sold by Coffee Break Keyboards. PCB designed by Snipeye. Case designed by Rain and Obabo. [More info on cbkbd.com](https://www.cbkbd.com/product/acai) + +* Hardware Supported: Acai PCB +* Hardware Availability: [cbkbd.com](https://www.cbkbd.com/product/acai-pcb) + +Make example for this keyboard (after setting up your build environment): + + make cbkbd/acai:default + +Flashing example for this keyboard: + + make cbkbd/acai:default:flash + +See the [build environment setup](getting_started_build_tools) and the [make instructions](getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **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 \ No newline at end of file From 81cc69c2dd58da6cb21e86c2b630dc95e11e85d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 02:13:14 +0000 Subject: [PATCH 1125/1205] Bump actions/checkout from 5 to 6 (#25807) Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/api.yml | 2 +- .github/workflows/auto_tag.yml | 2 +- .github/workflows/ci_build_major_branch.yml | 4 ++-- .github/workflows/ci_build_major_branch_keymap.yml | 6 +++--- .github/workflows/cli.yml | 2 +- .github/workflows/develop_update.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/feature_branch_update.yml | 2 +- .github/workflows/format.yml | 2 +- .github/workflows/format_push.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/regen.yml | 2 +- .github/workflows/regen_push.yml | 2 +- .github/workflows/unit_test.yml | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index cdf63498785e..58e12138c52b 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -25,7 +25,7 @@ jobs: if: github.repository == 'qmk/qmk_firmware' steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: fetch-depth: 1 persist-credentials: false diff --git a/.github/workflows/auto_tag.yml b/.github/workflows/auto_tag.yml index a2c6a104a8c1..c6db22ab7495 100644 --- a/.github/workflows/auto_tag.yml +++ b/.github/workflows/auto_tag.yml @@ -28,7 +28,7 @@ jobs: if: github.repository == 'qmk/qmk_firmware' steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/ci_build_major_branch.yml b/.github/workflows/ci_build_major_branch.yml index 6cefd589019e..f21f4c31718c 100644 --- a/.github/workflows/ci_build_major_branch.yml +++ b/.github/workflows/ci_build_major_branch.yml @@ -45,7 +45,7 @@ jobs: git config --global --add safe.directory '*' - name: Checkout QMK Firmware - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Determine concurrency id: generate_slice_length @@ -82,7 +82,7 @@ jobs: git config --global --add safe.directory '*' - name: Checkout QMK Firmware - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/ci_build_major_branch_keymap.yml b/.github/workflows/ci_build_major_branch_keymap.yml index f5533cf07ac6..89c932553a21 100644 --- a/.github/workflows/ci_build_major_branch_keymap.yml +++ b/.github/workflows/ci_build_major_branch_keymap.yml @@ -37,7 +37,7 @@ jobs: git config --global --add safe.directory '*' - name: Checkout QMK Firmware - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Generate build targets id: generate_targets @@ -89,7 +89,7 @@ jobs: git config --global --add safe.directory '*' - name: Checkout QMK Firmware - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Get target definitions uses: actions/download-artifact@v6 @@ -136,7 +136,7 @@ jobs: steps: - name: Checkout QMK Firmware - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Download firmwares uses: actions/download-artifact@v6 diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index fc24c6b36663..ca794decf555 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -24,7 +24,7 @@ jobs: - name: Disable safe.directory check run : git config --global --add safe.directory '*' - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: recursive diff --git a/.github/workflows/develop_update.yml b/.github/workflows/develop_update.yml index 5c046b8f6408..03d0803fe8b0 100644 --- a/.github/workflows/develop_update.yml +++ b/.github/workflows/develop_update.yml @@ -15,7 +15,7 @@ jobs: if: github.repository == 'qmk/qmk_firmware' steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: token: ${{ secrets.QMK_BOT_TOKEN }} fetch-depth: 0 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fe5d6027e2dc..20a1372f2606 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: container: ghcr.io/qmk/qmk_cli steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: fetch-depth: 1 diff --git a/.github/workflows/feature_branch_update.yml b/.github/workflows/feature_branch_update.yml index fc33f883a819..1eb5810f9b5a 100644 --- a/.github/workflows/feature_branch_update.yml +++ b/.github/workflows/feature_branch_update.yml @@ -21,7 +21,7 @@ jobs: - riot steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: token: ${{ secrets.QMK_BOT_TOKEN }} fetch-depth: 0 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index be6617e2b2d2..cc32f6f8986f 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -26,7 +26,7 @@ jobs: - name: Disable safe.directory check run : git config --global --add safe.directory '*' - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/format_push.yml b/.github/workflows/format_push.yml index 74a42669d613..738515251a0a 100644 --- a/.github/workflows/format_push.yml +++ b/.github/workflows/format_push.yml @@ -19,7 +19,7 @@ jobs: - name: Disable safe.directory check run : git config --global --add safe.directory '*' - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7d4ff0a9779a..ec5e04804d91 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: Disable safe.directory check run : git config --global --add safe.directory '*' - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/regen.yml b/.github/workflows/regen.yml index 06759102cc64..6eb94c8aaaf5 100644 --- a/.github/workflows/regen.yml +++ b/.github/workflows/regen.yml @@ -19,7 +19,7 @@ jobs: - name: Disable safe.directory check run : git config --global --add safe.directory '*' - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Run qmk generators run: | diff --git a/.github/workflows/regen_push.yml b/.github/workflows/regen_push.yml index 4798e86c59c0..df7e9970ea2c 100644 --- a/.github/workflows/regen_push.yml +++ b/.github/workflows/regen_push.yml @@ -19,7 +19,7 @@ jobs: - name: Disable safe.directory check run : git config --global --add safe.directory '*' - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Run qmk generators run: | diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 7ab9969242fa..2384cfb039f5 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -26,7 +26,7 @@ jobs: container: ghcr.io/qmk/qmk_cli steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: recursive - name: Install dependencies From 3e0b22af68da07bf2854ecde6b0f31f98fd027e2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Nov 2025 04:30:27 +0000 Subject: [PATCH 1126/1205] Fix community layout keymap discovery (#25802) --- builddefs/build_json.mk | 10 +++++----- builddefs/build_layout.mk | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/builddefs/build_json.mk b/builddefs/build_json.mk index e9d1420f3639..54f256480b4d 100644 --- a/builddefs/build_json.mk +++ b/builddefs/build_json.mk @@ -19,18 +19,18 @@ endif ifneq ($(QMK_USERSPACE),) ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.json)","") KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.json - KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5) + KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5) else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.json)","") KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.json - KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4) + KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4) else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.json)","") KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.json - KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3) + KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3) else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.json)","") KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.json - KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2) + KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2) else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.json)","") KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.json - KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1) + KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1) endif endif diff --git a/builddefs/build_layout.mk b/builddefs/build_layout.mk index 9ff99cc2218e..7a5dbf58b649 100644 --- a/builddefs/build_layout.mk +++ b/builddefs/build_layout.mk @@ -10,10 +10,10 @@ define SEARCH_LAYOUTS_REPO LAYOUT_KEYMAP_JSON := $$(LAYOUT_KEYMAP_PATH)/keymap.json LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_JSON))","") - -include $$(LAYOUT_KEYMAP_PATH)/rules.mk KEYMAP_JSON := $$(LAYOUT_KEYMAP_JSON) - KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH) - else ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","") + KEYMAP_JSON_PATH := $$(LAYOUT_KEYMAP_PATH) + endif + ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","") -include $$(LAYOUT_KEYMAP_PATH)/rules.mk KEYMAP_C := $$(LAYOUT_KEYMAP_C) KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH) From 1a7f544e0df833f9709aaa724f9fd8b5c5c274de Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Fri, 21 Nov 2025 23:57:58 -0700 Subject: [PATCH 1127/1205] [CLI] Lint error on missing keyboard readme (#25814) --- lib/python/qmk/cli/lint.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/python/qmk/cli/lint.py b/lib/python/qmk/cli/lint.py index 484ddb5bd970..8a128ce6d2c4 100644 --- a/lib/python/qmk/cli/lint.py +++ b/lib/python/qmk/cli/lint.py @@ -304,6 +304,10 @@ def keyboard_check(kb): # noqa C901 cli.log.error(f'{kb}: The file "{file}" should not exist!') ok = False + if not _get_readme_files(kb): + cli.log.error(f'{kb}: Is missing a readme.md file!') + ok = False + for file in _get_readme_files(kb): if _is_invalid_readme(file): cli.log.error(f'{kb}: The file "{file}" still contains template tokens!') From 28a11ff6f7a721820cc335287e44e2fefe22ac71 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 23 Nov 2025 05:02:32 +0000 Subject: [PATCH 1128/1205] Fix preference of output file for 'qmk generate-autocorrect-data' (#25818) --- lib/python/qmk/cli/generate/autocorrect_data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/python/qmk/cli/generate/autocorrect_data.py b/lib/python/qmk/cli/generate/autocorrect_data.py index 01a29b46fe99..4f322adce2ae 100644 --- a/lib/python/qmk/cli/generate/autocorrect_data.py +++ b/lib/python/qmk/cli/generate/autocorrect_data.py @@ -250,8 +250,8 @@ def to_hex(b: int) -> str: @cli.argument('filename', type=normpath, help='The autocorrection database file') -@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='The keyboard to build a firmware for. Ignored when a configurator export is supplied.') -@cli.argument('-km', '--keymap', completer=keymap_completer, help='The keymap to build a firmware for. Ignored when a configurator export is supplied.') +@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='The keyboard to build a firmware for. Ignored when a output file is supplied.') +@cli.argument('-km', '--keymap', completer=keymap_completer, help='The keymap to build a firmware for. Ignored when a output file is supplied.') @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") @cli.subcommand('Generate the autocorrection data file from a dictionary file.') @@ -263,7 +263,7 @@ def generate_autocorrect_data(cli): current_keyboard = cli.args.keyboard or cli.config.user.keyboard or cli.config.generate_autocorrect_data.keyboard current_keymap = cli.args.keymap or cli.config.user.keymap or cli.config.generate_autocorrect_data.keymap - if current_keyboard and current_keymap: + if not cli.args.output and current_keyboard and current_keymap: cli.args.output = locate_keymap(current_keyboard, current_keymap).parent / 'autocorrect_data.h' assert all(0 <= b <= 255 for b in data) From fd65390496cb47b3164c507656798664b8c2fcd1 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Sun, 23 Nov 2025 22:21:13 +1100 Subject: [PATCH 1129/1205] [core] add BCD versions of QMK Version (#25804) Co-authored-by: Joel Challis --- lib/python/qmk/cli/generate/version_h.py | 4 ++++ lib/python/qmk/util.py | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/python/qmk/cli/generate/version_h.py b/lib/python/qmk/cli/generate/version_h.py index fd87df361746..8156e8555915 100644 --- a/lib/python/qmk/cli/generate/version_h.py +++ b/lib/python/qmk/cli/generate/version_h.py @@ -8,6 +8,7 @@ from qmk.commands import dump_lines from qmk.git import git_get_qmk_hash, git_get_version, git_is_dirty from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE +from qmk.util import triplet_to_bcd TIME_FMT = '%Y-%m-%d-%H:%M:%S' @@ -32,12 +33,14 @@ def generate_version_h(cli): git_dirty = False git_version = "NA" git_qmk_hash = "NA" + git_bcd_version = "0x00000000" chibios_version = "NA" chibios_contrib_version = "NA" else: git_dirty = git_is_dirty() git_version = git_get_version() or current_time git_qmk_hash = git_get_qmk_hash() or "Unknown" + git_bcd_version = triplet_to_bcd(git_version) chibios_version = git_get_version("chibios", "os") or current_time chibios_contrib_version = git_get_version("chibios-contrib", "os") or current_time @@ -48,6 +51,7 @@ def generate_version_h(cli): f""" #define QMK_VERSION "{git_version}" #define QMK_BUILDDATE "{current_time}" +#define QMK_VERSION_BCD {git_bcd_version} #define QMK_GIT_HASH "{git_qmk_hash}{'*' if git_dirty else ''}" #define CHIBIOS_VERSION "{chibios_version}" #define CHIBIOS_CONTRIB_VERSION "{chibios_contrib_version}" diff --git a/lib/python/qmk/util.py b/lib/python/qmk/util.py index 8f99410e1de8..6da684a577f3 100644 --- a/lib/python/qmk/util.py +++ b/lib/python/qmk/util.py @@ -3,9 +3,12 @@ import contextlib import multiprocessing import sys +import re from milc import cli +TRIPLET_PATTERN = re.compile(r'^(\d+)\.(\d+)\.(\d+)') + maybe_exit_should_exit = True maybe_exit_reraise = False @@ -96,3 +99,10 @@ def parallel_map(*args, **kwargs): # before the results are returned. Returning a list ensures results are # materialised before any worker pool is shut down. return list(map_fn(*args, **kwargs)) + + +def triplet_to_bcd(ver: str): + m = TRIPLET_PATTERN.match(ver) + if not m: + return '0x00000000' + return f'0x{int(m.group(1)):02d}{int(m.group(2)):02d}{int(m.group(3)):04d}' From 53de903fb89d4138fdc38f98d266db0fec9548b1 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 23 Nov 2025 11:21:55 +0000 Subject: [PATCH 1130/1205] Better defaulting of `{RGB,LED}_MATRIX_DEFAULT_FLAGS` (#25785) --- lib/python/qmk/info.py | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index e6d51e123970..a0b8fe72b67f 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -5,6 +5,7 @@ from pathlib import Path import jsonschema from dotty_dict import dotty +from enum import IntFlag from milc import cli @@ -21,6 +22,15 @@ false_values = ['0', 'off', 'no'] +class LedFlags(IntFlag): + ALL = 0xFF + NONE = 0x00 + MODIFIER = 0x01 + UNDERGLOW = 0x02 + KEYLIGHT = 0x04 + INDICATOR = 0x08 + + def _keyboard_in_layout_name(keyboard, layout): """Validate that a layout macro does not contain name of keyboard """ @@ -813,12 +823,23 @@ def _extract_led_config(info_data, keyboard): info_data[feature]['led_count'] = len(info_data[feature]['layout']) if info_data[feature].get('layout', None) and not info_data[feature].get('flag_steps', None): - flags = {0xFF, 0} + flags = {LedFlags.ALL, LedFlags.NONE} + default_flags = {LedFlags.MODIFIER | LedFlags.KEYLIGHT, LedFlags.UNDERGLOW} + # if only a single flag is used, assume only all+none flags - unique_flags = set(x.get('flags', 0) for x in info_data[feature]['layout']) - if len(unique_flags) > 1: - flags.update(unique_flags) - info_data[feature]['flag_steps'] = sorted(list(flags), reverse=True) + kb_flags = set(x.get('flags', LedFlags.NONE) for x in info_data[feature]['layout']) + if len(kb_flags) > 1: + # check if any part of LED flag is with the defaults + unique_flags = set() + for candidate in default_flags: + if any(candidate & flag for flag in kb_flags): + unique_flags.add(candidate) + + # if we still have a single flag, assume only all+none + if len(unique_flags) > 1: + flags.update(unique_flags) + + info_data[feature]['flag_steps'] = sorted([int(flag) for flag in flags], reverse=True) return info_data From 4015c40ba4fd9a671c2e919582bbabab7320544b Mon Sep 17 00:00:00 2001 From: Pascal Getreuer <50221757+getreuer@users.noreply.github.com> Date: Sun, 23 Nov 2025 03:24:02 -0800 Subject: [PATCH 1131/1205] [Bug][Core] Fix Speculative Hold to enable also right-handed RSFT, RCTL by default. (#25797) --- quantum/action_tapping.c | 2 +- .../speculative_hold/all_mods/config.h | 23 ++ .../speculative_hold/all_mods/test.mk | 18 + .../all_mods/test_tap_hold.cpp | 352 ++++++++++++++++++ .../speculative_hold/default/config.h | 1 - .../speculative_hold/default/test.mk | 1 - .../default/test_tap_hold.cpp | 305 ++------------- 7 files changed, 417 insertions(+), 285 deletions(-) create mode 100644 tests/tap_hold_configurations/speculative_hold/all_mods/config.h create mode 100644 tests/tap_hold_configurations/speculative_hold/all_mods/test.mk create mode 100644 tests/tap_hold_configurations/speculative_hold/all_mods/test_tap_hold.cpp diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index 5d43dd99ea8e..ccc99bfd8e03 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -813,7 +813,7 @@ uint8_t get_speculative_mods(void) { __attribute__((weak)) bool get_speculative_hold(uint16_t keycode, keyrecord_t *record) { const uint8_t mods = mod_config(QK_MOD_TAP_GET_MODS(keycode)); - return (mods & (MOD_LCTL | MOD_LSFT)) == mods; + return (mods & (MOD_LCTL | MOD_LSFT)) == (mods & (MOD_HYPR)); } void speculative_key_settled(keyrecord_t *record) { diff --git a/tests/tap_hold_configurations/speculative_hold/all_mods/config.h b/tests/tap_hold_configurations/speculative_hold/all_mods/config.h new file mode 100644 index 000000000000..e4bcba13c1d8 --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/all_mods/config.h @@ -0,0 +1,23 @@ +/* Copyright 2022 Vladislav Kucheriavykh + * Copyright 2025 Google LLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "test_common.h" + +#define SPECULATIVE_HOLD +#define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_F24 diff --git a/tests/tap_hold_configurations/speculative_hold/all_mods/test.mk b/tests/tap_hold_configurations/speculative_hold/all_mods/test.mk new file mode 100644 index 000000000000..1765122512bb --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/all_mods/test.mk @@ -0,0 +1,18 @@ +# Copyright 2022 Vladislav Kucheriavykh +# Copyright 2025 Google LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +MAGIC_ENABLE = yes + diff --git a/tests/tap_hold_configurations/speculative_hold/all_mods/test_tap_hold.cpp b/tests/tap_hold_configurations/speculative_hold/all_mods/test_tap_hold.cpp new file mode 100644 index 000000000000..764b97ddde8c --- /dev/null +++ b/tests/tap_hold_configurations/speculative_hold/all_mods/test_tap_hold.cpp @@ -0,0 +1,352 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include + +#include "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::AnyNumber; +using testing::InSequence; + +namespace { + +// Gets the unpacked 8-bit mods corresponding to a given mod-tap keycode. +uint8_t unpack_mod_tap_mods(uint16_t keycode) { + const uint8_t mods5 = QK_MOD_TAP_GET_MODS(keycode); + return (mods5 & 0x10) != 0 ? (mods5 << 4) : mods5; +} + +bool get_speculative_hold_all_mods(uint16_t keycode, keyrecord_t *record) { + return true; // Enable Speculative Hold for all mod-tap keys. +} + +// Indirection so that get_speculative_hold() can be +// replaced with other functions in the test cases below. +std::function get_speculative_hold_fun = get_speculative_hold_all_mods; + +extern "C" bool get_speculative_hold(uint16_t keycode, keyrecord_t *record) { + return get_speculative_hold_fun(keycode, record); +} + +class SpeculativeHoldAllMods : public TestFixture { + public: + void SetUp() override { + get_speculative_hold_fun = get_speculative_hold_all_mods; + } +}; + +TEST_F(SpeculativeHoldAllMods, tap_mod_tap_neutralized) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, GUI_T(KC_P)); + + set_keymap({mod_tap_key}); + + // Press mod-tap-hold key. Mod is held speculatively. + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_key.press(); + idle_for(10); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. Speculative mod is neutralized and canceled. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Idle for tapping term of mod tap hold key. + idle_for(TAPPING_TERM - 10); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldAllMods, hold_two_mod_taps) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 1, 0, LCTL_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, RALT_T(KC_B)); + + set_keymap({mod_tap_key1, mod_tap_key2}); + + // Press first mod-tap key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key1.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), MOD_BIT_LCTRL); + + // Press second mod-tap key. + EXPECT_REPORT(driver, (KC_LCTL, KC_RALT)); + mod_tap_key2.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), MOD_BIT_LCTRL | MOD_BIT_RALT); + + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), MOD_BIT_LCTRL | MOD_BIT_RALT); + + // Release first mod-tap key. + EXPECT_REPORT(driver, (KC_RALT)); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release second mod-tap key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldAllMods, two_mod_taps_same_mods) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 1, 0, GUI_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 2, 0, GUI_T(KC_B)); + + set_keymap({mod_tap_key1, mod_tap_key2}); + + // Press first mod-tap key. + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_key1.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Tap second mod-tap key. + EXPECT_NO_REPORT(driver); + mod_tap_key2.press(); + run_one_scan_loop(); + mod_tap_key2.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release first mod-tap key. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_REPORT(driver, (KC_A, KC_B)); + EXPECT_REPORT(driver, (KC_A)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key1.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldAllMods, respects_get_speculative_hold_callback) { + TestDriver driver; + InSequence s; + auto mod_tap_key1 = KeymapKey(0, 0, 0, LSFT_T(KC_A)); + auto mod_tap_key2 = KeymapKey(0, 1, 0, LSFT_T(KC_B)); + auto mod_tap_key3 = KeymapKey(0, 2, 0, LCTL_T(KC_C)); + auto mod_tap_key4 = KeymapKey(0, 3, 0, LCTL_T(KC_D)); + auto mod_tap_key5 = KeymapKey(0, 4, 0, RSFT_T(KC_E)); + auto mod_tap_key6 = KeymapKey(0, 5, 0, RSFT_T(KC_F)); + + set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3, mod_tap_key4, mod_tap_key5, mod_tap_key6}); + + // Enable Speculative Hold selectively for some of the keys. + get_speculative_hold_fun = [](uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LSFT_T(KC_B): + case LCTL_T(KC_D): + case RSFT_T(KC_F): + return true; + } + return false; + }; + + for (KeymapKey *mod_tap_key : {&mod_tap_key2, &mod_tap_key4, &mod_tap_key6}) { + SCOPED_TRACE(std::string("mod_tap_key = ") + mod_tap_key->name); + const uint8_t mods = unpack_mod_tap_mods(mod_tap_key->code); + + // Long press and release mod_tap_key. + // For these keys where Speculative Hold is enabled, then the mod should + // activate immediately on keydown. + EXPECT_REPORT(driver, (KC_LCTL + biton(mods))); + mod_tap_key->press(); + run_one_scan_loop(); + EXPECT_EQ(get_speculative_mods(), mods); + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); + + EXPECT_NO_REPORT(driver); + idle_for(TAPPING_TERM + 1); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), mods); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + mod_tap_key->release(); + idle_for(TAPPING_TERM + 1); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); + } + + for (KeymapKey *mod_tap_key : {&mod_tap_key1, &mod_tap_key3, &mod_tap_key5}) { + SCOPED_TRACE(std::string("mod_tap_key = ") + mod_tap_key->name); + const uint8_t mods = unpack_mod_tap_mods(mod_tap_key->code); + + // Long press and release mod_tap_key. + // For these keys where Speculative Hold is disabled, the mod should + // activate when the key has settled after the tapping term. + EXPECT_NO_REPORT(driver); + mod_tap_key->press(); + run_one_scan_loop(); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_LCTL + biton(mods))); + idle_for(TAPPING_TERM + 1); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), mods); + VERIFY_AND_CLEAR(driver); + + EXPECT_EMPTY_REPORT(driver); + mod_tap_key->release(); + idle_for(TAPPING_TERM + 1); + EXPECT_EQ(get_speculative_mods(), 0); + EXPECT_EQ(get_mods(), 0); + VERIFY_AND_CLEAR(driver); + } +} + +TEST_F(SpeculativeHoldAllMods, respects_magic_mod_config) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, CTL_T(KC_P)); + + set_keymap({mod_tap_key}); + + keymap_config.swap_lctl_lgui = true; + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LGUI)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); + EXPECT_REPORT(driver, (KC_LGUI)); + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + idle_for(TAPPING_TERM + 1); + VERIFY_AND_CLEAR(driver); + + keymap_config.swap_lctl_lgui = false; + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LCTL)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldAllMods, tap_a_mod_tap_key_while_another_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto first_mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto second_mod_tap_key = KeymapKey(0, 2, 0, RSFT_T(KC_A)); + + set_keymap({first_mod_tap_key, second_mod_tap_key}); + + // Press first mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LSFT)); + first_mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press second tap-hold key. + EXPECT_REPORT(driver, (KC_LSFT, KC_RSFT)); + second_mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release second tap-hold key. + EXPECT_NO_REPORT(driver); + second_mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release first mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_REPORT(driver, (KC_P, KC_A)); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + first_mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +TEST_F(SpeculativeHoldAllMods, tap_mod_tap_key_two_times) { + TestDriver driver; + InSequence s; + auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_key}); + + // Press mod-tap-hold key. + EXPECT_REPORT(driver, (KC_LSFT)); + mod_tap_key.press(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + EXPECT_REPORT(driver, (KC_P)); + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); + + // Press mod-tap-hold key again. + EXPECT_REPORT(driver, (KC_P)); + mod_tap_key.press(); + idle_for(TAPPING_TERM); + VERIFY_AND_CLEAR(driver); + + // Release mod-tap-hold key. + EXPECT_EMPTY_REPORT(driver); + mod_tap_key.release(); + run_one_scan_loop(); + VERIFY_AND_CLEAR(driver); +} + +} // namespace diff --git a/tests/tap_hold_configurations/speculative_hold/default/config.h b/tests/tap_hold_configurations/speculative_hold/default/config.h index e4bcba13c1d8..9891296f4276 100644 --- a/tests/tap_hold_configurations/speculative_hold/default/config.h +++ b/tests/tap_hold_configurations/speculative_hold/default/config.h @@ -20,4 +20,3 @@ #include "test_common.h" #define SPECULATIVE_HOLD -#define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_F24 diff --git a/tests/tap_hold_configurations/speculative_hold/default/test.mk b/tests/tap_hold_configurations/speculative_hold/default/test.mk index c03d99f6861b..f5decaeb7875 100644 --- a/tests/tap_hold_configurations/speculative_hold/default/test.mk +++ b/tests/tap_hold_configurations/speculative_hold/default/test.mk @@ -15,7 +15,6 @@ # along with this program. If not, see . KEY_OVERRIDE_ENABLE = yes -MAGIC_ENABLE = yes INTROSPECTION_KEYMAP_C = test_keymap.c diff --git a/tests/tap_hold_configurations/speculative_hold/default/test_tap_hold.cpp b/tests/tap_hold_configurations/speculative_hold/default/test_tap_hold.cpp index c92ed5a2d036..bfa022be1122 100644 --- a/tests/tap_hold_configurations/speculative_hold/default/test_tap_hold.cpp +++ b/tests/tap_hold_configurations/speculative_hold/default/test_tap_hold.cpp @@ -27,28 +27,13 @@ using testing::InSequence; namespace { -// Gets the unpacked 8-bit mods corresponding to a given mod-tap keycode. -uint8_t unpack_mod_tap_mods(uint16_t keycode) { - const uint8_t mods5 = QK_MOD_TAP_GET_MODS(keycode); - return (mods5 & 0x10) != 0 ? (mods5 << 4) : mods5; -} - -bool get_speculative_hold_all_keys(uint16_t keycode, keyrecord_t *record) { - return true; // Enable Speculative Hold for all mod-tap keys. -} - bool process_record_user_default(uint16_t keycode, keyrecord_t *record) { return true; } -// Indirection so that get_speculative_hold() and process_record_user() can be +// Indirection so that process_record_user() can be // replaced with other functions in the test cases below. -std::function get_speculative_hold_fun = get_speculative_hold_all_keys; -std::function process_record_user_fun = process_record_user_default; - -extern "C" bool get_speculative_hold(uint16_t keycode, keyrecord_t *record) { - return get_speculative_hold_fun(keycode, record); -} +std::function process_record_user_fun = process_record_user_default; extern "C" bool process_record_user(uint16_t keycode, keyrecord_t *record) { return process_record_user_fun(keycode, record); @@ -57,11 +42,30 @@ extern "C" bool process_record_user(uint16_t keycode, keyrecord_t *record) { class SpeculativeHoldDefault : public TestFixture { public: void SetUp() override { - get_speculative_hold_fun = get_speculative_hold_all_keys; - process_record_user_fun = process_record_user_default; + process_record_user_fun = process_record_user_default; } }; +TEST_F(SpeculativeHoldDefault, get_speculative_hold) { + keyrecord_t record = {}; + + // With the default definition of get_speculative_hold(), Speculative Hold + // is enabled for Ctrl and Shift. + EXPECT_TRUE(get_speculative_hold(MT(MOD_LCTL, KC_NO), &record)); + EXPECT_TRUE(get_speculative_hold(MT(MOD_LSFT, KC_NO), &record)); + EXPECT_TRUE(get_speculative_hold(MT(MOD_LCTL | MOD_LSFT, KC_NO), &record)); + EXPECT_TRUE(get_speculative_hold(MT(MOD_RCTL, KC_NO), &record)); + EXPECT_TRUE(get_speculative_hold(MT(MOD_RSFT, KC_NO), &record)); + EXPECT_TRUE(get_speculative_hold(MT(MOD_RCTL | MOD_RSFT, KC_NO), &record)); + + EXPECT_FALSE(get_speculative_hold(MT(MOD_LALT, KC_NO), &record)); + EXPECT_FALSE(get_speculative_hold(MT(MOD_LGUI, KC_NO), &record)); + EXPECT_FALSE(get_speculative_hold(MT(MOD_RALT, KC_NO), &record)); + EXPECT_FALSE(get_speculative_hold(MT(MOD_RGUI, KC_NO), &record)); + EXPECT_FALSE(get_speculative_hold(MT(MOD_MEH, KC_NO), &record)); + EXPECT_FALSE(get_speculative_hold(MT(MOD_HYPR, KC_NO), &record)); +} + TEST_F(SpeculativeHoldDefault, tap_mod_tap) { TestDriver driver; InSequence s; @@ -103,232 +107,6 @@ TEST_F(SpeculativeHoldDefault, tap_mod_tap) { VERIFY_AND_CLEAR(driver); } -TEST_F(SpeculativeHoldDefault, tap_mod_tap_neutralized) { - TestDriver driver; - InSequence s; - auto mod_tap_key = KeymapKey(0, 1, 0, GUI_T(KC_P)); - - set_keymap({mod_tap_key}); - - // Press mod-tap-hold key. Mod is held speculatively. - EXPECT_REPORT(driver, (KC_LGUI)); - mod_tap_key.press(); - idle_for(10); - VERIFY_AND_CLEAR(driver); - - // Release mod-tap-hold key. Speculative mod is neutralized and canceled. - EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); - EXPECT_REPORT(driver, (KC_LGUI)); - EXPECT_EMPTY_REPORT(driver); - EXPECT_REPORT(driver, (KC_P)); - EXPECT_EMPTY_REPORT(driver); - mod_tap_key.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - // Idle for tapping term of mod tap hold key. - idle_for(TAPPING_TERM - 10); - VERIFY_AND_CLEAR(driver); -} - -TEST_F(SpeculativeHoldDefault, hold_two_mod_taps) { - TestDriver driver; - InSequence s; - auto mod_tap_key1 = KeymapKey(0, 1, 0, LCTL_T(KC_A)); - auto mod_tap_key2 = KeymapKey(0, 2, 0, RALT_T(KC_B)); - - set_keymap({mod_tap_key1, mod_tap_key2}); - - // Press first mod-tap key. - EXPECT_REPORT(driver, (KC_LCTL)); - mod_tap_key1.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - EXPECT_EQ(get_speculative_mods(), MOD_BIT_LCTRL); - - // Press second mod-tap key. - EXPECT_REPORT(driver, (KC_LCTL, KC_RALT)); - mod_tap_key2.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - EXPECT_EQ(get_speculative_mods(), MOD_BIT_LCTRL | MOD_BIT_RALT); - - EXPECT_NO_REPORT(driver); - idle_for(TAPPING_TERM + 1); - VERIFY_AND_CLEAR(driver); - EXPECT_EQ(get_speculative_mods(), 0); - EXPECT_EQ(get_mods(), MOD_BIT_LCTRL | MOD_BIT_RALT); - - // Release first mod-tap key. - EXPECT_REPORT(driver, (KC_RALT)); - mod_tap_key1.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - // Release second mod-tap key. - EXPECT_EMPTY_REPORT(driver); - mod_tap_key2.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); -} - -TEST_F(SpeculativeHoldDefault, two_mod_taps_same_mods) { - TestDriver driver; - InSequence s; - auto mod_tap_key1 = KeymapKey(0, 1, 0, GUI_T(KC_A)); - auto mod_tap_key2 = KeymapKey(0, 2, 0, GUI_T(KC_B)); - - set_keymap({mod_tap_key1, mod_tap_key2}); - - // Press first mod-tap key. - EXPECT_REPORT(driver, (KC_LGUI)); - mod_tap_key1.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - // Tap second mod-tap key. - EXPECT_NO_REPORT(driver); - mod_tap_key2.press(); - run_one_scan_loop(); - mod_tap_key2.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - // Release first mod-tap key. - EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); - EXPECT_REPORT(driver, (KC_LGUI)); - EXPECT_EMPTY_REPORT(driver); - EXPECT_REPORT(driver, (KC_A)); - EXPECT_REPORT(driver, (KC_A, KC_B)); - EXPECT_REPORT(driver, (KC_A)); - EXPECT_EMPTY_REPORT(driver); - mod_tap_key1.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); -} - -TEST_F(SpeculativeHoldDefault, respects_get_speculative_hold_callback) { - TestDriver driver; - InSequence s; - auto mod_tap_key1 = KeymapKey(0, 0, 0, LSFT_T(KC_A)); - auto mod_tap_key2 = KeymapKey(0, 1, 0, LSFT_T(KC_B)); - auto mod_tap_key3 = KeymapKey(0, 2, 0, LCTL_T(KC_C)); - auto mod_tap_key4 = KeymapKey(0, 3, 0, LCTL_T(KC_D)); - auto mod_tap_key5 = KeymapKey(0, 4, 0, RSFT_T(KC_E)); - auto mod_tap_key6 = KeymapKey(0, 5, 0, RSFT_T(KC_F)); - - set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3, mod_tap_key4, mod_tap_key5, mod_tap_key6}); - - // Enable Speculative Hold selectively for some of the keys. - get_speculative_hold_fun = [](uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case LSFT_T(KC_B): - case LCTL_T(KC_D): - case RSFT_T(KC_F): - return true; - } - return false; - }; - - for (KeymapKey *mod_tap_key : {&mod_tap_key2, &mod_tap_key4, &mod_tap_key6}) { - SCOPED_TRACE(std::string("mod_tap_key = ") + mod_tap_key->name); - const uint8_t mods = unpack_mod_tap_mods(mod_tap_key->code); - - // Long press and release mod_tap_key. - // For these keys where Speculative Hold is enabled, then the mod should - // activate immediately on keydown. - EXPECT_REPORT(driver, (KC_LCTL + biton(mods))); - mod_tap_key->press(); - run_one_scan_loop(); - EXPECT_EQ(get_speculative_mods(), mods); - EXPECT_EQ(get_mods(), 0); - VERIFY_AND_CLEAR(driver); - - EXPECT_NO_REPORT(driver); - idle_for(TAPPING_TERM + 1); - EXPECT_EQ(get_speculative_mods(), 0); - EXPECT_EQ(get_mods(), mods); - VERIFY_AND_CLEAR(driver); - - EXPECT_EMPTY_REPORT(driver); - mod_tap_key->release(); - idle_for(TAPPING_TERM + 1); - EXPECT_EQ(get_speculative_mods(), 0); - EXPECT_EQ(get_mods(), 0); - VERIFY_AND_CLEAR(driver); - } - - for (KeymapKey *mod_tap_key : {&mod_tap_key1, &mod_tap_key3, &mod_tap_key5}) { - SCOPED_TRACE(std::string("mod_tap_key = ") + mod_tap_key->name); - const uint8_t mods = unpack_mod_tap_mods(mod_tap_key->code); - - // Long press and release mod_tap_key. - // For these keys where Speculative Hold is disabled, the mod should - // activate when the key has settled after the tapping term. - EXPECT_NO_REPORT(driver); - mod_tap_key->press(); - run_one_scan_loop(); - EXPECT_EQ(get_speculative_mods(), 0); - EXPECT_EQ(get_mods(), 0); - VERIFY_AND_CLEAR(driver); - - EXPECT_REPORT(driver, (KC_LCTL + biton(mods))); - idle_for(TAPPING_TERM + 1); - EXPECT_EQ(get_speculative_mods(), 0); - EXPECT_EQ(get_mods(), mods); - VERIFY_AND_CLEAR(driver); - - EXPECT_EMPTY_REPORT(driver); - mod_tap_key->release(); - idle_for(TAPPING_TERM + 1); - EXPECT_EQ(get_speculative_mods(), 0); - EXPECT_EQ(get_mods(), 0); - VERIFY_AND_CLEAR(driver); - } -} - -TEST_F(SpeculativeHoldDefault, respects_magic_mod_config) { - TestDriver driver; - InSequence s; - auto mod_tap_key = KeymapKey(0, 1, 0, CTL_T(KC_P)); - - set_keymap({mod_tap_key}); - - keymap_config.swap_lctl_lgui = true; - - // Press mod-tap-hold key. - EXPECT_REPORT(driver, (KC_LGUI)); - mod_tap_key.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - // Release mod-tap-hold key. - EXPECT_REPORT(driver, (KC_LGUI, DUMMY_MOD_NEUTRALIZER_KEYCODE)); - EXPECT_REPORT(driver, (KC_LGUI)); - EXPECT_EMPTY_REPORT(driver); - EXPECT_REPORT(driver, (KC_P)); - EXPECT_EMPTY_REPORT(driver); - mod_tap_key.release(); - idle_for(TAPPING_TERM + 1); - VERIFY_AND_CLEAR(driver); - - keymap_config.swap_lctl_lgui = false; - - // Press mod-tap-hold key. - EXPECT_REPORT(driver, (KC_LCTL)); - mod_tap_key.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - // Release mod-tap-hold key. - EXPECT_EMPTY_REPORT(driver); - EXPECT_REPORT(driver, (KC_P)); - EXPECT_EMPTY_REPORT(driver); - mod_tap_key.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); -} - TEST_F(SpeculativeHoldDefault, key_overrides) { TestDriver driver; InSequence s; @@ -401,43 +179,6 @@ TEST_F(SpeculativeHoldDefault, tap_regular_key_while_mod_tap_key_is_held) { VERIFY_AND_CLEAR(driver); } -TEST_F(SpeculativeHoldDefault, tap_a_mod_tap_key_while_another_mod_tap_key_is_held) { - TestDriver driver; - InSequence s; - auto first_mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); - auto second_mod_tap_key = KeymapKey(0, 2, 0, RSFT_T(KC_A)); - - set_keymap({first_mod_tap_key, second_mod_tap_key}); - - // Press first mod-tap-hold key. - EXPECT_REPORT(driver, (KC_LSFT)); - first_mod_tap_key.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - // Press second tap-hold key. - EXPECT_REPORT(driver, (KC_LSFT, KC_RSFT)); - second_mod_tap_key.press(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - // Release second tap-hold key. - EXPECT_NO_REPORT(driver); - second_mod_tap_key.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); - - // Release first mod-tap-hold key. - EXPECT_EMPTY_REPORT(driver); - EXPECT_REPORT(driver, (KC_P)); - EXPECT_REPORT(driver, (KC_P, KC_A)); - EXPECT_REPORT(driver, (KC_P)); - EXPECT_EMPTY_REPORT(driver); - first_mod_tap_key.release(); - run_one_scan_loop(); - VERIFY_AND_CLEAR(driver); -} - TEST_F(SpeculativeHoldDefault, tap_mod_tap_key_two_times) { TestDriver driver; InSequence s; From b321789d7b3e0207f9f5e103a8481a0d90ba2814 Mon Sep 17 00:00:00 2001 From: Julian Schuler <31921487+julianschuler@users.noreply.github.com> Date: Sun, 23 Nov 2025 12:25:59 +0100 Subject: [PATCH 1132/1205] Fix single key combos activating only once (#25198) Co-authored-by: Julian Schuler --- quantum/process_keycode/process_combo.c | 4 ++++ tests/combo/test_combo.cpp | 15 +++++++++++++++ tests/combo/test_combos.c | 6 ++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index c99a66a74b0a..b02b7f54330d 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -347,6 +347,10 @@ void apply_combo(uint16_t combo_index, combo_t *combo) { qrecord->combo_index = combo_index; ACTIVATE_COMBO(combo); + if (key_count == 1) { + release_combo(combo_index, combo); + } + break; } else { // key was part of the combo but not the last one, "disable" it diff --git a/tests/combo/test_combo.cpp b/tests/combo/test_combo.cpp index d78ec55990b0..cc6425a94cc7 100644 --- a/tests/combo/test_combo.cpp +++ b/tests/combo/test_combo.cpp @@ -54,3 +54,18 @@ TEST_F(Combo, combo_osmshift_tapped) { tap_key(key_i); VERIFY_AND_CLEAR(driver); } + +TEST_F(Combo, combo_single_key_twice) { + TestDriver driver; + KeymapKey key_a(0, 0, 1, KC_A); + set_keymap({key_a}); + + EXPECT_REPORT(driver, (KC_B)); + tap_combo({key_a}); + VERIFY_AND_CLEAR(driver); + + EXPECT_REPORT(driver, (KC_B)); + EXPECT_EMPTY_REPORT(driver); + tap_combo({key_a}); + VERIFY_AND_CLEAR(driver); +} diff --git a/tests/combo/test_combos.c b/tests/combo/test_combos.c index 8dcb364c6e50..9a0465a9b475 100644 --- a/tests/combo/test_combos.c +++ b/tests/combo/test_combos.c @@ -4,14 +4,16 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" -enum combos { modtest, osmshift }; +enum combos { modtest, osmshift, single_key }; uint16_t const modtest_combo[] = {KC_Y, KC_U, COMBO_END}; uint16_t const osmshift_combo[] = {KC_Z, KC_X, COMBO_END}; +uint16_t const single_key_combo[] = {KC_A, COMBO_END}; // clang-format off combo_t key_combos[] = { [modtest] = COMBO(modtest_combo, RSFT_T(KC_SPACE)), - [osmshift] = COMBO(osmshift_combo, OSM(MOD_LSFT)) + [osmshift] = COMBO(osmshift_combo, OSM(MOD_LSFT)), + [single_key] = COMBO(single_key_combo, KC_B), }; // clang-format on From c7e17538eea98540dbee71de5d024db99f7786fe Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sun, 23 Nov 2025 22:28:34 +1100 Subject: [PATCH 1133/1205] [CI] Format code according to conventions (#25820) --- tests/combo/test_combos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/combo/test_combos.c b/tests/combo/test_combos.c index 9a0465a9b475..a6f249833ffb 100644 --- a/tests/combo/test_combos.c +++ b/tests/combo/test_combos.c @@ -6,8 +6,8 @@ enum combos { modtest, osmshift, single_key }; -uint16_t const modtest_combo[] = {KC_Y, KC_U, COMBO_END}; -uint16_t const osmshift_combo[] = {KC_Z, KC_X, COMBO_END}; +uint16_t const modtest_combo[] = {KC_Y, KC_U, COMBO_END}; +uint16_t const osmshift_combo[] = {KC_Z, KC_X, COMBO_END}; uint16_t const single_key_combo[] = {KC_A, COMBO_END}; // clang-format off From 1a954e8da5dcbd81eeccb9d6ac41b6eda64d7b85 Mon Sep 17 00:00:00 2001 From: Stephen Ostermiller Date: Sun, 23 Nov 2025 06:32:36 -0500 Subject: [PATCH 1134/1205] Reduce tap dance memory usage, move state out of data (#25415) * Use less tap dance memory. Use dynamically allocated sparse array for tap dance state, dynamically allocate tap dance state when needed and free it when the tap dance is done. * new approach * Use null, check for null * Reformat with docker * Use uint8 with idx rather than uint16 with keycode in state * fix accidental change * reformat * Add null check * add documentation tip suggested by tzarc * Only allow tap dance state allocation on key down, not on key up Co-authored-by: Sergey Vlasov * Only allow tap dance allocation on key down, not on key up Co-authored-by: Sergey Vlasov * add user action required section --------- Co-authored-by: Sergey Vlasov --- docs/ChangeLog/20250831/pr25415.md | 47 ++++++++ docs/features/tap_dance.md | 12 +- quantum/process_keycode/process_tap_dance.c | 122 ++++++++++++++------ quantum/process_keycode/process_tap_dance.h | 11 +- tests/tap_dance/examples.c | 4 +- 5 files changed, 152 insertions(+), 44 deletions(-) create mode 100644 docs/ChangeLog/20250831/pr25415.md diff --git a/docs/ChangeLog/20250831/pr25415.md b/docs/ChangeLog/20250831/pr25415.md new file mode 100644 index 000000000000..54eb8c737e97 --- /dev/null +++ b/docs/ChangeLog/20250831/pr25415.md @@ -0,0 +1,47 @@ +# Tap dance state removed from `tap_dance_action_t` + +The tap dance state has been separated from the action structure. Custom tap dance functions now receive the state as a separate parameter instead of accessing it through `action->state`. + +## User Action Required + +If your keymap uses custom tap dance functions that access the tap dance state, you need to update your code. + + - You can't use `action->state`. Instead you need to call `tap_dance_state_t *tap_dance_get_state(uint8_t tap_dance_idx)` to get the state. + - You now get a pointer to the state, so use `->` notation rather than `.` notation to get fields from it. + +### Before: +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_action_t *action; + + switch (keycode) { + case TD(CT_CLN): + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); + if (!record->event.pressed && action->state.count && !action->state.finished) { + tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; + tap_code16(tap_hold->tap); + } + + } + return true; +} +``` + +### After: +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_action_t *action; + tap_dance_state_t* state; + + switch (keycode) { + case TD(CT_CLN): + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); + state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(keycode)); + if (!record->event.pressed && state != NULL && state->count && !state->finished) { + tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; + tap_code16(tap_hold->tap); + } + } + return true; +} +``` diff --git a/docs/features/tap_dance.md b/docs/features/tap_dance.md index d533e41aaafe..688241a16b84 100644 --- a/docs/features/tap_dance.md +++ b/docs/features/tap_dance.md @@ -40,6 +40,10 @@ Similar to the first option, the second and third option are good for simple lay For more complicated cases, like blink the LEDs, fiddle with the backlighting, and so on, use the fourth or fifth option. Examples of each are listed below. +::: tip +If too many tap dances are active at the same time, later ones won't have any effect. You need to increase `TAP_DANCE_MAX_SIMULTANEOUS` by adding `#define TAP_DANCE_MAX_SIMULTANEOUS 5` (or higher) to your keymap's `config.h` file if you expect that users may hold down many tap dance keys simultaneously. By default, only 3 tap dance keys can be used together at the same time. +::: + ## Implementation Details {#implementation} Well, that's the bulk of it! You should now be able to work through the examples below, and to develop your own Tap Dance functionality. But if you want a deeper understanding of what's going on behind the scenes, then read on for the explanation of how it all works! @@ -209,11 +213,13 @@ tap_dance_action_t tap_dance_actions[] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { tap_dance_action_t *action; + tap_dance_state_t* state; switch (keycode) { - case TD(CT_CLN): // list all tap dance keycodes with tap-hold configurations - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)]; - if (!record->event.pressed && action->state.count && !action->state.finished) { + case TD(CT_CLN): + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); + state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(keycode)); + if (!record->event.pressed && state != NULL && state->count && !state->finished) { tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; tap_code16(tap_hold->tap); } diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 11df62763dd1..36a94d8d281a 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -24,8 +24,46 @@ #include "keymap_introspection.h" static uint16_t active_td; + +#ifndef TAP_DANCE_MAX_SIMULTANEOUS +# define TAP_DANCE_MAX_SIMULTANEOUS 3 +#endif + +static tap_dance_state_t tap_dance_states[TAP_DANCE_MAX_SIMULTANEOUS]; + static uint16_t last_tap_time; +static tap_dance_state_t *tap_dance_get_or_allocate_state(uint8_t tap_dance_idx, bool allocate) { + uint8_t i; + if (tap_dance_idx >= tap_dance_count()) { + return NULL; + } + // Search for a state already used for this keycode + for (i = 0; i < TAP_DANCE_MAX_SIMULTANEOUS; i++) { + if (tap_dance_states[i].in_use && tap_dance_states[i].index == tap_dance_idx) { + return &tap_dance_states[i]; + } + } + // No existing state found; bail out if new state allocation is not allowed + if (!allocate) { + return NULL; + } + // Search for the first available state + for (i = 0; i < TAP_DANCE_MAX_SIMULTANEOUS; i++) { + if (!tap_dance_states[i].in_use) { + tap_dance_states[i].index = tap_dance_idx; + tap_dance_states[i].in_use = true; + return &tap_dance_states[i]; + } + } + // No states are available, tap dance won't happen + return NULL; +} + +tap_dance_state_t *tap_dance_get_state(uint8_t tap_dance_idx) { + return tap_dance_get_or_allocate_state(tap_dance_idx, false); +} + void tap_dance_pair_on_each_tap(tap_dance_state_t *state, void *user_data) { tap_dance_pair_t *pair = (tap_dance_pair_t *)user_data; @@ -86,58 +124,64 @@ static inline void _process_tap_dance_action_fn(tap_dance_state_t *state, void * } } -static inline void process_tap_dance_action_on_each_tap(tap_dance_action_t *action) { - action->state.count++; - action->state.weak_mods = get_mods(); - action->state.weak_mods |= get_weak_mods(); +static inline void process_tap_dance_action_on_each_tap(tap_dance_action_t *action, tap_dance_state_t *state) { + state->count++; + state->weak_mods = get_mods(); + state->weak_mods |= get_weak_mods(); #ifndef NO_ACTION_ONESHOT - action->state.oneshot_mods = get_oneshot_mods(); + state->oneshot_mods = get_oneshot_mods(); #endif - _process_tap_dance_action_fn(&action->state, action->user_data, action->fn.on_each_tap); + _process_tap_dance_action_fn(state, action->user_data, action->fn.on_each_tap); } -static inline void process_tap_dance_action_on_each_release(tap_dance_action_t *action) { - _process_tap_dance_action_fn(&action->state, action->user_data, action->fn.on_each_release); +static inline void process_tap_dance_action_on_each_release(tap_dance_action_t *action, tap_dance_state_t *state) { + _process_tap_dance_action_fn(state, action->user_data, action->fn.on_each_release); } -static inline void process_tap_dance_action_on_reset(tap_dance_action_t *action) { - _process_tap_dance_action_fn(&action->state, action->user_data, action->fn.on_reset); - del_weak_mods(action->state.weak_mods); +static inline void process_tap_dance_action_on_reset(tap_dance_action_t *action, tap_dance_state_t *state) { + _process_tap_dance_action_fn(state, action->user_data, action->fn.on_reset); + del_weak_mods(state->weak_mods); #ifndef NO_ACTION_ONESHOT - del_mods(action->state.oneshot_mods); + del_mods(state->oneshot_mods); #endif send_keyboard_report(); - action->state = (const tap_dance_state_t){0}; + // Clear the tap dance state and mark it as unused + memset(state, 0, sizeof(tap_dance_state_t)); } -static inline void process_tap_dance_action_on_dance_finished(tap_dance_action_t *action) { - if (!action->state.finished) { - action->state.finished = true; - add_weak_mods(action->state.weak_mods); +static inline void process_tap_dance_action_on_dance_finished(tap_dance_action_t *action, tap_dance_state_t *state) { + if (!state->finished) { + state->finished = true; + add_weak_mods(state->weak_mods); #ifndef NO_ACTION_ONESHOT - add_mods(action->state.oneshot_mods); + add_mods(state->oneshot_mods); #endif send_keyboard_report(); - _process_tap_dance_action_fn(&action->state, action->user_data, action->fn.on_dance_finished); + _process_tap_dance_action_fn(state, action->user_data, action->fn.on_dance_finished); } active_td = 0; - if (!action->state.pressed) { + if (!state->pressed) { // There will not be a key release event, so reset now. - process_tap_dance_action_on_reset(action); + process_tap_dance_action_on_reset(action, state); } } bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { tap_dance_action_t *action; + tap_dance_state_t * state; if (!record->event.pressed) return false; if (!active_td || keycode == active_td) return false; - action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(active_td)); - action->state.interrupted = true; - action->state.interrupting_keycode = keycode; - process_tap_dance_action_on_dance_finished(action); + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(active_td)); + state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(active_td)); + if (state == NULL) { + return false; + } + state->interrupted = true; + state->interrupting_keycode = keycode; + process_tap_dance_action_on_dance_finished(action, state); // Tap dance actions can leave some weak mods active (e.g., if the tap dance is mapped to a keycode with // modifiers), but these weak mods should not affect the keypress which interrupted the tap dance. @@ -151,8 +195,9 @@ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { } bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { - int td_index; + uint8_t td_index; tap_dance_action_t *action; + tap_dance_state_t * state; switch (keycode) { case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: @@ -161,16 +206,19 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { return false; } action = tap_dance_get(td_index); - - action->state.pressed = record->event.pressed; + state = tap_dance_get_or_allocate_state(td_index, record->event.pressed); + if (state == NULL) { + return false; + } + state->pressed = record->event.pressed; if (record->event.pressed) { last_tap_time = timer_read(); - process_tap_dance_action_on_each_tap(action); - active_td = action->state.finished ? 0 : keycode; + process_tap_dance_action_on_each_tap(action, state); + active_td = state->finished ? 0 : keycode; } else { - process_tap_dance_action_on_each_release(action); - if (action->state.finished) { - process_tap_dance_action_on_reset(action); + process_tap_dance_action_on_each_release(action, state); + if (state->finished) { + process_tap_dance_action_on_reset(action, state); if (active_td == keycode) { active_td = 0; } @@ -185,16 +233,18 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { void tap_dance_task(void) { tap_dance_action_t *action; + tap_dance_state_t * state; if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return; action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(active_td)); - if (!action->state.interrupted) { - process_tap_dance_action_on_dance_finished(action); + state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(active_td)); + if (state != NULL && !state->interrupted) { + process_tap_dance_action_on_dance_finished(action, state); } } void reset_tap_dance(tap_dance_state_t *state) { active_td = 0; - process_tap_dance_action_on_reset((tap_dance_action_t *)state); + process_tap_dance_action_on_reset(tap_dance_get(state->index), state); } diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 5cccbdf439a2..5a972cee5abe 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -28,15 +28,16 @@ typedef struct { #ifndef NO_ACTION_ONESHOT uint8_t oneshot_mods; #endif - bool pressed : 1; - bool finished : 1; - bool interrupted : 1; + bool pressed : 1; + bool finished : 1; + bool interrupted : 1; + bool in_use : 1; + uint8_t index; } tap_dance_state_t; typedef void (*tap_dance_user_fn_t)(tap_dance_state_t *state, void *user_data); typedef struct tap_dance_action_t { - tap_dance_state_t state; struct { tap_dance_user_fn_t on_each_tap; tap_dance_user_fn_t on_dance_finished; @@ -80,6 +81,8 @@ typedef struct { void reset_tap_dance(tap_dance_state_t *state); +tap_dance_state_t *tap_dance_get_state(uint8_t tap_dance_idx); + /* To be used internally */ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record); diff --git a/tests/tap_dance/examples.c b/tests/tap_dance/examples.c index 4b6bdb20908f..6aaf00823233 100644 --- a/tests/tap_dance/examples.c +++ b/tests/tap_dance/examples.c @@ -81,11 +81,13 @@ typedef struct { bool process_record_user(uint16_t keycode, keyrecord_t *record) { tap_dance_action_t *action; + tap_dance_state_t* state; switch (keycode) { case TD(CT_CLN): action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); - if (!record->event.pressed && action->state.count && !action->state.finished) { + state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(keycode)); + if (!record->event.pressed && state != NULL && state->count && !state->finished) { tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; tap_code16(tap_hold->tap); } From cc567c917b22b49046c9f61eb321c204045eef0d Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Mon, 24 Nov 2025 19:32:03 -0600 Subject: [PATCH 1135/1205] [Keyboard] Add Keenome Keys' "The Grid v2" (#25813) * Add 'the_grid_v2' to QMK * Per documentation, formatted keyboard.json and add license to keymap.c * Update keyboards/keenome_keys/the_grid_v2/keyboard.json Co-authored-by: Jack Sangdahl * Create readme.md for The Grid v2 keyboard Added detailed readme for The Grid v2 keyboard including setup and bootloader instructions. * Revise readme for The Grid v2 keyboard Updated readme with specific hardware details. --------- Co-authored-by: Jack Sangdahl --- .../keenome_keys/the_grid_v2/keyboard.json | 131 ++++++++++++++++++ .../the_grid_v2/keymaps/default/keymap.c | 13 ++ keyboards/keenome_keys/the_grid_v2/readme.md | 22 +++ 3 files changed, 166 insertions(+) create mode 100644 keyboards/keenome_keys/the_grid_v2/keyboard.json create mode 100644 keyboards/keenome_keys/the_grid_v2/keymaps/default/keymap.c create mode 100644 keyboards/keenome_keys/the_grid_v2/readme.md diff --git a/keyboards/keenome_keys/the_grid_v2/keyboard.json b/keyboards/keenome_keys/the_grid_v2/keyboard.json new file mode 100644 index 000000000000..69df3ea7f6ff --- /dev/null +++ b/keyboards/keenome_keys/the_grid_v2/keyboard.json @@ -0,0 +1,131 @@ +{ + "manufacturer": "Keenome Keys", + "keyboard_name": "The Grid v2", + "maintainer": "Keenome Keys", + "bootloader": "rp2040", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "direct": [ + ["GP25", "GP24", "GP23", "GP22"], + ["GP21", "GP20", "GP19", "GP18"], + ["GP17", "GP16", "GP15", "GP14"], + ["GP13", "GP12", "GP11", "GP10"] + ] + }, + "processor": "RP2040", + "rgb_matrix": { + "animations": { + "alpha_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "flower_blooming": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "riverflow": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "starlight": true, + "starlight_dual_hue": true, + "starlight_dual_sat": true, + "starlight_smooth": true, + "typing_heatmap": true + }, + "default": { + "animation": "cycle_spiral", + "speed": 32, + "val": 144 + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 224, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 149, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 75, "y": 21, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 4}, + {"matrix": [2, 1], "x": 75, "y": 43, "flags": 4}, + {"matrix": [2, 2], "x": 149, "y": 43, "flags": 4}, + {"matrix": [2, 3], "x": 224, "y": 43, "flags": 4}, + {"matrix": [3, 3], "x": 224, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 149, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 75, "y": 64, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 4} + ], + "sleep": true + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x0001", + "vid": "0x6167" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP26" + }, + "layouts": { + "LAYOUT": { + "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": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "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} + ] + } + } +} diff --git a/keyboards/keenome_keys/the_grid_v2/keymaps/default/keymap.c b/keyboards/keenome_keys/the_grid_v2/keymaps/default/keymap.c new file mode 100644 index 000000000000..296c2af1f89f --- /dev/null +++ b/keyboards/keenome_keys/the_grid_v2/keymaps/default/keymap.c @@ -0,0 +1,13 @@ +// Copyright 2025 Nathan Sunday (@PoctorDepper) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_P7, KC_P8, KC_P9, KC_PSLS, + KC_P4, KC_P5, KC_P6, KC_PAST, + KC_P1, KC_P2, KC_P3, KC_PMNS, + KC_P0, KC_PDOT, KC_PENT, KC_PPLS + ) +}; diff --git a/keyboards/keenome_keys/the_grid_v2/readme.md b/keyboards/keenome_keys/the_grid_v2/readme.md new file mode 100644 index 000000000000..d7721c20d475 --- /dev/null +++ b/keyboards/keenome_keys/the_grid_v2/readme.md @@ -0,0 +1,22 @@ +# The Grid v2 + +* Keyboard Maintainer: [PoctorDepper](https://github.com/PoctorDepper) +* Hardware Supported: Custom PCB using RP2040 + +Make example for this keyboard (after setting up your build environment): + + make keenome_keys/the_grid_v2:default + +Flashing example for this keyboard: + + make keenome_keys/the_grid_v2: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **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 From 5e1b1f50237ce78a78499fb8ab9810a0d651b921 Mon Sep 17 00:00:00 2001 From: andrew morton Date: Tue, 25 Nov 2025 03:07:01 -0700 Subject: [PATCH 1136/1205] Add support for Coffee Break Keyboards' Coffeevan (#25805) --- keyboards/cbkbd/coffeevan/keyboard.json | 193 ++++++++++++++++++ .../cbkbd/coffeevan/keymaps/default/keymap.c | 20 ++ keyboards/cbkbd/coffeevan/matrix_diagram.md | 18 ++ keyboards/cbkbd/coffeevan/readme.md | 27 +++ 4 files changed, 258 insertions(+) create mode 100644 keyboards/cbkbd/coffeevan/keyboard.json create mode 100644 keyboards/cbkbd/coffeevan/keymaps/default/keymap.c create mode 100644 keyboards/cbkbd/coffeevan/matrix_diagram.md create mode 100644 keyboards/cbkbd/coffeevan/readme.md diff --git a/keyboards/cbkbd/coffeevan/keyboard.json b/keyboards/cbkbd/coffeevan/keyboard.json new file mode 100644 index 000000000000..a1c96425c4d2 --- /dev/null +++ b/keyboards/cbkbd/coffeevan/keyboard.json @@ -0,0 +1,193 @@ +{ + "manufacturer": "CoffeeBreakKeyboards", + "keyboard_name": "Coffeevan", + "maintainer": "CoffeeBreakKeyboards", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "dynamic_keymap": { + "layer_count": 6 + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["GP13", "GP12", "GP11", "GP10", "GP24", "GP9", "GP8", "GP28", "GP4", "GP3", "GP2", "GP1"], + "rows": ["GP27", "GP26", "GP25", "GP14"] + }, + "processor": "RP2040", + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "led_count": 20 + }, + "usb": { + "device_version": "1.0.1", + "pid": "0x4356", + "vid": "0x4342" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP16" + }, + "layouts": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0, "w": 1.75}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, + {"matrix": [1, 1], "x": 1.25, "y": 1}, + {"matrix": [1, 2], "x": 2.25, "y": 1}, + {"matrix": [1, 3], "x": 3.25, "y": 1}, + {"matrix": [1, 4], "x": 4.25, "y": 1}, + {"matrix": [1, 5], "x": 5.25, "y": 1}, + {"matrix": [1, 6], "x": 6.25, "y": 1}, + {"matrix": [1, 7], "x": 7.25, "y": 1}, + {"matrix": [1, 8], "x": 8.25, "y": 1}, + {"matrix": [1, 9], "x": 9.25, "y": 1}, + {"matrix": [1, 10], "x": 10.25, "y": 1}, + {"matrix": [1, 11], "x": 11.25, "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"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, "w": 1.25}, + {"matrix": [3, 3], "x": 3.5, "y": 3, "w": 2.75}, + {"matrix": [3, 6], "x": 3.5, "y": 4, "w": 6.25}, + {"matrix": [3, 5], "x": 6.25, "y": 3, "w": 2.25}, + {"matrix": [3, 8], "x": 8.5, "y": 3, "w": 1.25}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3} + ] + }, + "LAYOUT_single_space": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0, "w": 1.75}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, + {"matrix": [1, 1], "x": 1.25, "y": 1}, + {"matrix": [1, 2], "x": 2.25, "y": 1}, + {"matrix": [1, 3], "x": 3.25, "y": 1}, + {"matrix": [1, 4], "x": 4.25, "y": 1}, + {"matrix": [1, 5], "x": 5.25, "y": 1}, + {"matrix": [1, 6], "x": 6.25, "y": 1}, + {"matrix": [1, 7], "x": 7.25, "y": 1}, + {"matrix": [1, 8], "x": 8.25, "y": 1}, + {"matrix": [1, 9], "x": 9.25, "y": 1}, + {"matrix": [1, 10], "x": 10.25, "y": 1}, + {"matrix": [1, 11], "x": 11.25, "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"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, "w": 1.25}, + {"matrix": [3, 6], "x": 3.5, "y": 3, "w": 6.25}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3} + ] + }, + "LAYOUT_split_space": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0, "w": 1.75}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, + {"matrix": [1, 1], "x": 1.25, "y": 1}, + {"matrix": [1, 2], "x": 2.25, "y": 1}, + {"matrix": [1, 3], "x": 3.25, "y": 1}, + {"matrix": [1, 4], "x": 4.25, "y": 1}, + {"matrix": [1, 5], "x": 5.25, "y": 1}, + {"matrix": [1, 6], "x": 6.25, "y": 1}, + {"matrix": [1, 7], "x": 7.25, "y": 1}, + {"matrix": [1, 8], "x": 8.25, "y": 1}, + {"matrix": [1, 9], "x": 9.25, "y": 1}, + {"matrix": [1, 10], "x": 10.25, "y": 1}, + {"matrix": [1, 11], "x": 11.25, "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"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, "w": 1.25}, + {"matrix": [3, 3], "x": 3.5, "y": 3, "w": 2.75}, + {"matrix": [3, 5], "x": 6.25, "y": 3, "w": 2.25}, + {"matrix": [3, 8], "x": 8.5, "y": 3, "w": 1.25}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3} + ] + } + } +} diff --git a/keyboards/cbkbd/coffeevan/keymaps/default/keymap.c b/keyboards/cbkbd/coffeevan/keymaps/default/keymap.c new file mode 100644 index 000000000000..5179fd930edf --- /dev/null +++ b/keyboards/cbkbd/coffeevan/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UG_TOGG, UG_NEXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/cbkbd/coffeevan/matrix_diagram.md b/keyboards/cbkbd/coffeevan/matrix_diagram.md new file mode 100644 index 000000000000..91cd05e6ba44 --- /dev/null +++ b/keyboards/cbkbd/coffeevan/matrix_diagram.md @@ -0,0 +1,18 @@ +# Matrix Diagram for Coffeevan +``` +Minisub style split-space +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────┐ +│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │ +├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬─────┤ +│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │ +├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ +│20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │ +├────┬─┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┼───┼───┤ +│30 │31 │32 │33 │35 │38 │39 │3A │3B │ +└────┴───┴────┴──────────┴────────┴────┴───┴───┴───┘ + +JetVan style 6.25u +┌────┬───┬────┬────────────────────────┬───┬───┬───┐ +│30 │31 │32 │36 │39 │3A │3B │ +└────┴───┴────┴────────────────────────┴───┴───┴───┘ +``` \ No newline at end of file diff --git a/keyboards/cbkbd/coffeevan/readme.md b/keyboards/cbkbd/coffeevan/readme.md new file mode 100644 index 000000000000..129a3bd4304c --- /dev/null +++ b/keyboards/cbkbd/coffeevan/readme.md @@ -0,0 +1,27 @@ +# Coffeevan + +![Coffeevan](https://imgur.com/1VDxDmp.jpeg) + +Coffeevan is a drop-in replacement PCB for MiniVan cases. Coffeevan supports the Minisub split-space and JetVan 6.25u spacebar layout. + +* Keyboard Maintainer: [Coffee Break Keyboards](https://github.com/CoffeeBreakKeyboards) +* Hardware Supported: Coffeevan +* Hardware Availability: [Coffee Break Keyboards](https://www.cbkbd.com/product/minivan-kits) + +Make example for this keyboard (after setting up your build environment): + + make cbkbd/coffeevan:default + +Flashing example for this keyboard: + + make cbkbd/coffeevan:default:flash + +See the [build environment setup](getting_started_build_tools) and the [make instructions](getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **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 \ No newline at end of file From 594558ec7b9ac1963870447778426682065e0d20 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 25 Nov 2025 05:07:16 -0500 Subject: [PATCH 1137/1205] Add Demod LM Rev. 1 (#25793) --- keyboards/keebio/demod_lm/info.json | 8 ++ .../demod_lm/keymaps/default/keymap.json | 12 ++ keyboards/keebio/demod_lm/readme.md | 24 ++++ keyboards/keebio/demod_lm/rev1/config.h | 12 ++ keyboards/keebio/demod_lm/rev1/halconf.h | 8 ++ keyboards/keebio/demod_lm/rev1/keyboard.json | 117 ++++++++++++++++++ keyboards/keebio/demod_lm/rev1/mcuconf.h | 10 ++ keyboards/keebio/demod_lm/rev1/rev1.c | 11 ++ 8 files changed, 202 insertions(+) create mode 100644 keyboards/keebio/demod_lm/info.json create mode 100644 keyboards/keebio/demod_lm/keymaps/default/keymap.json create mode 100644 keyboards/keebio/demod_lm/readme.md create mode 100644 keyboards/keebio/demod_lm/rev1/config.h create mode 100644 keyboards/keebio/demod_lm/rev1/halconf.h create mode 100644 keyboards/keebio/demod_lm/rev1/keyboard.json create mode 100644 keyboards/keebio/demod_lm/rev1/mcuconf.h create mode 100644 keyboards/keebio/demod_lm/rev1/rev1.c diff --git a/keyboards/keebio/demod_lm/info.json b/keyboards/keebio/demod_lm/info.json new file mode 100644 index 000000000000..64fa5a05cafd --- /dev/null +++ b/keyboards/keebio/demod_lm/info.json @@ -0,0 +1,8 @@ +{ + "manufacturer": "Keebio", + "maintainer": "Keebio", + "url": "https://keeb.io", + "usb": { + "vid": "0xCB10" + } +} diff --git a/keyboards/keebio/demod_lm/keymaps/default/keymap.json b/keyboards/keebio/demod_lm/keymaps/default/keymap.json new file mode 100644 index 000000000000..9115271b3de9 --- /dev/null +++ b/keyboards/keebio/demod_lm/keymaps/default/keymap.json @@ -0,0 +1,12 @@ +{ + "keyboard": "keebio/demod_lm/rev1", + "keymap": "default", + "layout": "LAYOUT_numpad_5x4", + "layers": [ + ["RM_NEXT", "KC_PSLS", "KC_PAST", "KC_PMNS", + "KC_P7", "KC_P8", "KC_P9", + "KC_P4", "KC_P5", "KC_P6", "KC_PPLS", + "KC_P1", "KC_P2", "KC_P3", + "KC_P0", "KC_PDOT", "KC_PENT" ] + ] +} diff --git a/keyboards/keebio/demod_lm/readme.md b/keyboards/keebio/demod_lm/readme.md new file mode 100644 index 000000000000..c9233d09611c --- /dev/null +++ b/keyboards/keebio/demod_lm/readme.md @@ -0,0 +1,24 @@ +# Demod LM + +A low-profile number pad and sold by Keebio. [More info at Keebio](https://keeb.io). + +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Demod LM PCB with STM32G431 microcontroller +* Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make keebio/demod_lm/rev1:default + +Example of flashing this keyboard: + + make keebio/demod_lm/rev1: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). + +## Bootloader + +Enter the bootloader in one of two ways: + +* **Physical reset button**: Press and hold the button on the back of the PCB for at least 1 second and let go +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/keebio/demod_lm/rev1/config.h b/keyboards/keebio/demod_lm/rev1/config.h new file mode 100644 index 000000000000..fae0576081f5 --- /dev/null +++ b/keyboards/keebio/demod_lm/rev1/config.h @@ -0,0 +1,12 @@ +// Copyright 2025 Danny Nguyen (@nooges) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* Defines for the RGB matrix */ +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 3 +#define WS2812_PWM_PAL_MODE 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_DMA_CHANNEL 2 +#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP diff --git a/keyboards/keebio/demod_lm/rev1/halconf.h b/keyboards/keebio/demod_lm/rev1/halconf.h new file mode 100644 index 000000000000..0249d61fea66 --- /dev/null +++ b/keyboards/keebio/demod_lm/rev1/halconf.h @@ -0,0 +1,8 @@ +// Copyright 2024 Danny Nguyen (@nooges) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/keebio/demod_lm/rev1/keyboard.json b/keyboards/keebio/demod_lm/rev1/keyboard.json new file mode 100644 index 000000000000..ac3599885292 --- /dev/null +++ b/keyboards/keebio/demod_lm/rev1/keyboard.json @@ -0,0 +1,117 @@ +{ + "keyboard_name": "Demod LM Rev. 1", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["A1", "A0", "B3", "B6"], + "rows": ["A15", "F0", "B4", "B5", "F1"] + }, + "processor": "STM32G431", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 88, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 104, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 136, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 136, "y": 24, "flags": 4}, + {"matrix": [1, 2], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 88, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 88, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 104, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 120, "y": 32, "flags": 4}, + {"matrix": [3, 2], "x": 120, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 104, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 88, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 120, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 136, "y": 56, "flags": 4} + ], + "max_brightness": 200, + "sleep": true + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x1654" + }, + "ws2812": { + "driver": "pwm", + "pin": "B0" + }, + "community_layouts": ["numpad_5x4"], + "layouts": { + "LAYOUT_numpad_5x4": { + "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": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [1, 3], "x": 3, "y": 1, "h": 2}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 2}, + {"matrix": [4, 2], "x": 2, "y": 4}, + {"matrix": [3, 3], "x": 3, "y": 3, "h": 2} + ] + } + } +} diff --git a/keyboards/keebio/demod_lm/rev1/mcuconf.h b/keyboards/keebio/demod_lm/rev1/mcuconf.h new file mode 100644 index 000000000000..a864dab31ec9 --- /dev/null +++ b/keyboards/keebio/demod_lm/rev1/mcuconf.h @@ -0,0 +1,10 @@ +// Copyright 2024 Danny Nguyen (@nooges) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +/* enable TIM3, used for RGB LED PWM driver */ +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE diff --git a/keyboards/keebio/demod_lm/rev1/rev1.c b/keyboards/keebio/demod_lm/rev1/rev1.c new file mode 100644 index 000000000000..7843a900a3f0 --- /dev/null +++ b/keyboards/keebio/demod_lm/rev1/rev1.c @@ -0,0 +1,11 @@ +// Copyright 2024 Danny Nguyen (@nooges) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +void keyboard_pre_init_kb(void) { + // Disable the PD peripheral in pre-init because its pins (B4, B6) are being used in the matrix: + PWR->CR3 |= PWR_CR3_UCPD_DBDIS; + // Call the corresponding _user() function (see https://docs.qmk.fm/#/custom_quantum_functions) + keyboard_pre_init_user(); +} From 9c2ca00074784dbee27b459d71cfc8e75f47b976 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Fri, 28 Nov 2025 00:36:49 +1100 Subject: [PATCH 1138/1205] QMK CLI Environment bootstrapper (#25038) Co-authored-by: Joel Challis Co-authored-by: Pascal Getreuer --- .github/workflows/bootstrap_testing.yml | 251 ++++++++++ docs/driver_installation_zadig.md | 2 +- docs/faq_build.md | 2 +- docs/newbs_getting_started.md | 66 +-- keyboards/handwired/dactyl/readme.md | 4 +- lib/python/qmk/cli/__init__.py | 24 + lib/python/qmk/cli/doctor/check.py | 74 ++- lib/python/qmk/cli/doctor/main.py | 69 ++- lib/python/qmk/flashers.py | 6 +- lib/python/qmk/info.py | 2 +- lib/python/qmk/keyboard.py | 6 +- lib/python/qmk/{math.py => math_ops.py} | 4 +- platforms/avr/flash.mk | 6 +- platforms/chibios/flash.mk | 6 +- util/env-bootstrap.sh | 594 ++++++++++++++++++++++++ 15 files changed, 1029 insertions(+), 87 deletions(-) create mode 100644 .github/workflows/bootstrap_testing.yml rename lib/python/qmk/{math.py => math_ops.py} (92%) create mode 100755 util/env-bootstrap.sh diff --git a/.github/workflows/bootstrap_testing.yml b/.github/workflows/bootstrap_testing.yml new file mode 100644 index 000000000000..997db3f0b2c4 --- /dev/null +++ b/.github/workflows/bootstrap_testing.yml @@ -0,0 +1,251 @@ +name: Bootstrap Script Testing + +on: + push: + branches: [bootstrap] + paths: + - "util/env-bootstrap.sh" + - ".github/workflows/bootstrap_testing.yml" + - "lib/python/**" + pull_request: + branches: [master, develop, xap] + paths: + - "util/env-bootstrap.sh" + - ".github/workflows/bootstrap_testing.yml" + - "lib/python/**" + workflow_dispatch: + +permissions: + contents: read + +jobs: + bootstrap-test-linux: + name: Bootstrap (Linux) + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + distribution: + # Ubuntu/Debian based + - debian:11 + - debian:12 + - debian:13 + - ubuntu:20.04 + - ubuntu:22.04 + - ubuntu:24.04 + + # RHEL/CentOS/Fedora based + - fedora:41 + - fedora:42 + - fedora:43 + - rockylinux:8 + - rockylinux:9 + - rockylinux/rockylinux:10 + - almalinux:8 + - almalinux:9 + - almalinux:10 + + # OpenSUSE based (we skip Tumbleweed as it has issues with package versions between pattern installs and other dependencies preinstalled into the base container) + - opensuse/leap:latest + + # Gentoo-based + - gentoo/stage3:latest + + # Arch based + - archlinux:latest + - cachyos/cachyos:latest + - manjarolinux/base:latest + + container: + image: ${{ matrix.distribution }} + options: --privileged + + steps: + - name: Install base dependencies + run: | + # Attempt to run the package installation up to 10 times to mitigate transient network issues + for n in $(seq 1 10); do + { + echo "Attempt #$n of 10 to install base dependencies:" + case "${{ matrix.distribution }}" in + *ubuntu*|*debian*) + apt-get update + apt-get install -y sudo git passwd + ;; + *fedora*|*rockylinux*|*almalinux*) + dnf install -y sudo git passwd findutils # findutils=xargs + ;; + *suse*) + zypper --non-interactive refresh + zypper --non-interactive install sudo git shadow findutils # findutils=xargs + ;; + *gentoo*) + emerge-webrsync + emerge --noreplace --ask=n sudo dev-vcs/git shadow findutils # findutils=xargs + ;; + *archlinux*|*cachyos*|*manjaro*) + pacman -Syu --noconfirm + pacman -S --noconfirm sudo git + ;; + esac + } && break || sleep 10 + done + + # Fix PAM configuration for sudo in containers + # Fix /etc/shadow permissions - common issue in container environments + chmod 640 /etc/shadow || chmod 400 /etc/shadow || true + + # Disable problematic PAM modules that commonly fail in RHEL-like containers + sed -i 's/^session.*pam_systemd.so/#&/' /etc/pam.d/sudo || true + sed -i 's/^session.*pam_loginuid.so/#&/' /etc/pam.d/sudo || true + + # Ensure proper sudoers configuration + echo 'Defaults !requiretty' >> /etc/sudoers + echo 'Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' >> /etc/sudoers + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: recursive + path: qmk_firmware + + - name: Create test user + run: | + # Create a test user for the bootstrap script + useradd -m -s /bin/bash -U testuser + echo 'testuser:testpassword' | chpasswd || true + + # Configure passwordless sudo + echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers # some distros complain about root not being in sudoers + echo "testuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + + # Test sudo functionality + sudo -u testuser whoami || echo "Sudo test failed, but continuing..." + + - name: Move QMK repository to test user home + run: | + # Add upstream remote to the cloned repository so `qmk doctor` doesn't flag a warning + git -C qmk_firmware remote add upstream https://github.com/qmk/qmk_firmware.git + # Move the QMK repository to the test user's home directory + mv qmk_firmware /home/testuser/qmk_firmware + chown -R testuser:testuser /home/testuser/qmk_firmware + + - name: Run bootstrap script + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Ensure the bootstrap script can access sudo + sudo -u testuser --preserve-env=GITHUB_TOKEN bash -c " + export CONFIRM=1 + export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + cd /home/testuser + bash /home/testuser/qmk_firmware/util/env-bootstrap.sh + " + + - name: Test QMK CLI + run: | + sudo -u testuser bash -c " + export PATH=/home/testuser/.local/bin:\$PATH + cd /home/testuser + qmk setup -y -H /home/testuser/qmk_firmware # setup implies doctor, no need to run it separately + cd /home/testuser/qmk_firmware + qmk mass-compile -j $(nproc) -e DUMP_CI_METADATA=yes -f 'keyboard_name==*onekey*' -km reset -p || touch .failed # Compile a bunch of different platforms + " + + cd /home/testuser/qmk_firmware + ./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true + [ ! -e .failed ] || exit 1 + + bootstrap-test-macos: + name: Bootstrap (macOS) + strategy: + fail-fast: false + matrix: + os: + - macos-13 # Intel x64 + - macos-14 # Apple Silicon ARM64 + - macos-15 # Apple Silicon ARM64 + - macos-15-intel # Intel x64 + - macos-26 # Apple Silicon ARM64 + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: recursive + + - name: Run bootstrap script + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Add upstream remote to the cloned repository so `qmk doctor` doesn't flag a warning + git remote add upstream https://github.com/qmk/qmk_firmware.git + # Run the bootstrap script + export CONFIRM=1 + sh ./util/env-bootstrap.sh + + - name: Test QMK CLI + run: | + # Add QMK CLI to PATH (bootstrap script installs it to ~/.local/bin on macOS) + export PATH="$HOME/.local/bin:$PATH" + qmk setup -y -H . # setup implies doctor, no need to run it separately + qmk mass-compile -j $(sysctl -n hw.ncpu) -e DUMP_CI_METADATA=yes -f 'keyboard_name==*onekey*' -km reset || touch .failed # Compile a bunch of different platforms + + ./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true + [ ! -e .failed ] || exit 1 + + bootstrap-test-windows: + name: Bootstrap (Windows) + + strategy: + fail-fast: false + matrix: + msys-variant: + - mingw64 + - clang64 + - ucrt64 + + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + + steps: + - name: Install MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.msys-variant }} + pacboy: >- + git: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: recursive + + - name: Run bootstrap script + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Add upstream remote to the cloned repository so `qmk doctor` doesn't flag a warning + git remote add upstream https://github.com/qmk/qmk_firmware.git + # Run the bootstrap script + export CONFIRM=1 + sh ./util/env-bootstrap.sh + + - name: Test QMK CLI + run: | + # Add QMK CLI to PATH (bootstrap script installs it to /opt/uv/tools/bin on Windows MSYS2) + export PATH="/opt/uv/tools/bin:$PATH" + qmk setup -y -H . # setup implies doctor, no need to run it separately + qmk mass-compile -j $(nproc) -e DUMP_CI_METADATA=yes -f 'keyboard_name==*onekey*' -km reset || touch .failed # Compile a bunch of different platforms + + ./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true + [ ! -e .failed ] || exit 1 + diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md index 6fbcfa3bffc7..13b445b9b697 100644 --- a/docs/driver_installation_zadig.md +++ b/docs/driver_installation_zadig.md @@ -4,7 +4,7 @@ QMK presents itself to the host as a regular HID keyboard device, and as such re There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the HalfKay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver. -We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2, the `qmk_install.sh` script will have already installed the drivers for you. +We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2, the QMK CLI installation script will have already installed the drivers for you. ## Installation diff --git a/docs/faq_build.md b/docs/faq_build.md index 54ed576c708a..05cb3251c8e8 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -44,7 +44,7 @@ Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices m Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader, or none at all. -Re-running the QMK installation script (`./util/qmk_install.sh` from the `qmk_firmware` directory in MSYS2 or WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package manually. +Re-running the QMK installation script (`curl -fsSL https://install.qmk.fm | sh`) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package manually. If that doesn't work, then you may need to download and run Zadig. See [Bootloader Driver Installation with Zadig](driver_installation_zadig) for more detailed information. diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 1d2b60781b8e..1bc658b9b13d 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -50,90 +50,64 @@ You will need to install [MSYS2](https://www.msys2.org). Once installed, close a Install the QMK CLI by running: ```sh -pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-python-qmk +curl -fsSL https://install.qmk.fm | sh ``` :::: ==== macOS -QMK maintains a Homebrew tap and formula which will automatically install the CLI and all necessary dependencies. - #### Prerequisites You will need to install Homebrew. Follow the instructions on https://brew.sh. -::: tip -If you are using an Apple Silicon machine, the installation process will take significantly longer because GitHub actions do not have native runners to build binary packages for the ARM and AVR toolchains. -::: - #### Installation Install the QMK CLI by running: ```sh -brew install qmk/qmk/qmk +curl -fsSL https://install.qmk.fm | sh ``` ==== Linux/WSL -::: tip -**Note for WSL users**: By default, the installation process will clone the QMK repository into your WSL home directory, but if you have cloned manually, ensure that it is located inside the WSL instance instead of the Windows filesystem (ie. not in `/mnt`), as accessing it is currently [extremely slow](https://github.com/microsoft/WSL/issues/4197). -::: - -#### Prerequisites - -You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them: - -* Debian / Ubuntu / Devuan: `sudo apt install -y git python3-pip` -* Fedora / Red Hat / CentOS: `sudo yum -y install git python3-pip` -* Arch / Manjaro: `sudo pacman --needed --noconfirm -S git python-pip libffi` -* Void: `sudo xbps-install -y git python3-pip` -* Solus: `sudo eopkg -y install git python3` -* Sabayon: `sudo equo install dev-vcs/git dev-python/pip` -* Gentoo: `sudo emerge dev-vcs/git dev-python/pip` - #### Installation -Install the QMK CLI by running: - -```sh -python3 -m pip install --user qmk -``` - -Alternatively, install the QMK CLI as a [uv](https://docs.astral.sh/uv/) managed tool, kept isolated in a virtual environment (requires uv to be installed): - -```sh -uv tool install qmk -``` - -#### Community Packages - -These packages are maintained by community members, so may not be up to date or completely functional. If you encounter problems, please report them to their respective maintainers. +::: info +Many Linux distributions are supported, but not all. Mainstream distributions will have best success -- if possible, choose either Debian or its derivatives (such as Ubuntu, or Mint), CentOS or its derivatives (such as Fedora, or Rocky Linux), and Arch or its derivatives (such as Manjaro, or CachyOS). +::: -On Arch-based distros you can install the CLI from the official repositories (NOTE: at the time of writing this package marks some dependencies as optional that should not be): +Install the QMK CLI by running: ```sh -sudo pacman -S qmk +curl -fsSL https://install.qmk.fm | sh ``` -You can also try the `qmk-git` package from AUR: +::: tip +**Note for WSL users**: By default, the installation process will clone the QMK repository into your WSL home directory, but if you have cloned manually, ensure that it is located inside the WSL instance instead of the Windows filesystem (ie. not in `/mnt`), as accessing it is currently [extremely slow](https://github.com/microsoft/WSL/issues/4197). +::: -```sh -yay -S qmk-git -``` +::: warning +Any QMK packages provided by your distribution's package manager are almost certainly out of date. It is strongly suggested the installation script above is used instead. +::: ==== FreeBSD #### Installation +::: warning +FreeBSD support is provided on a best-effort basis by the community instead of the QMK maintainers. It is strongly suggested that you use either Windows, macOS, or a supported distribution of Linux instead. +::: + Install the FreeBSD package for QMK CLI by running: ```sh pkg install -g "py*-qmk" ``` -NOTE: remember to follow the instructions printed at the end of installation (use `pkg info -Dg "py*-qmk"` to show them again). +::: info NOTE +Remember to follow the instructions printed at the end of installation (use `pkg info -Dg "py*-qmk"` to show them again). +::: ::::: diff --git a/keyboards/handwired/dactyl/readme.md b/keyboards/handwired/dactyl/readme.md index e99df7f5a23f..608a1b7fe340 100644 --- a/keyboards/handwired/dactyl/readme.md +++ b/keyboards/handwired/dactyl/readme.md @@ -6,7 +6,7 @@ The Dactyl uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). Linux users need to modify udev rules as described on the [Teensy Linux page]. Some distributions provide a binary, maybe called -`teensy-loader-cli`. +`teensy_loader_cli`. [Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html @@ -26,7 +26,7 @@ To flash the firmware: - Click the button in the Teensy app to download the firmware. -To flash with ´teensy-loader-cli´: +To flash with ´teensy_loader_cli´: - Build the firmware as above diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 26905ec13481..dc2e4726a545 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -3,6 +3,8 @@ We list each subcommand here explicitly because all the reliable ways of searching for modules are slow and delay startup. """ import os +import platform +import platformdirs import shlex import sys from importlib.util import find_spec @@ -12,6 +14,28 @@ from milc import cli, __VERSION__ from milc.questions import yesno + +def _get_default_distrib_path(): + if 'windows' in platform.platform().lower(): + try: + result = cli.run(['cygpath', '-w', '/opt/qmk']) + if result.returncode == 0: + return result.stdout.strip() + except Exception: + pass + + return platformdirs.user_data_dir('qmk') + + +# Ensure the QMK distribution is on the `$PATH` if present. This must be kept in sync with qmk/qmk_cli. +QMK_DISTRIB_DIR = Path(os.environ.get('QMK_DISTRIB_DIR', _get_default_distrib_path())) +if QMK_DISTRIB_DIR.exists(): + os.environ['PATH'] = str(QMK_DISTRIB_DIR / 'bin') + os.pathsep + os.environ['PATH'] + +# Prepend any user-defined path prefix +if 'QMK_PATH_PREFIX' in os.environ: + os.environ['PATH'] = os.environ['QMK_PATH_PREFIX'] + os.pathsep + os.environ['PATH'] + import_names = { # A mapping of package name to importable name 'pep8-naming': 'pep8ext_naming', diff --git a/lib/python/qmk/cli/doctor/check.py b/lib/python/qmk/cli/doctor/check.py index 51b0f0c80a7c..8a13cb083282 100644 --- a/lib/python/qmk/cli/doctor/check.py +++ b/lib/python/qmk/cli/doctor/check.py @@ -1,7 +1,6 @@ """Check for specific programs. """ from enum import Enum -import re import shutil from subprocess import DEVNULL, TimeoutExpired from tempfile import TemporaryDirectory @@ -9,6 +8,7 @@ from milc import cli from qmk import submodules +from qmk.commands import find_make class CheckStatus(Enum): @@ -17,7 +17,13 @@ class CheckStatus(Enum): ERROR = 3 +WHICH_MAKE = Path(find_make()).name + ESSENTIAL_BINARIES = { + WHICH_MAKE: {}, + 'git': {}, + 'dos2unix': {}, + 'diff': {}, 'dfu-programmer': {}, 'avrdude': {}, 'dfu-util': {}, @@ -30,14 +36,39 @@ class CheckStatus(Enum): } -def _parse_gcc_version(version): - m = re.match(r"(\d+)(?:\.(\d+))?(?:\.(\d+))?", version) +def _check_make_version(): + last_line = ESSENTIAL_BINARIES[WHICH_MAKE]['output'].split('\n')[0] + version_number = last_line.split()[2] + cli.log.info('Found %s version %s', WHICH_MAKE, version_number) - return { - 'major': int(m.group(1)), - 'minor': int(m.group(2)) if m.group(2) else 0, - 'patch': int(m.group(3)) if m.group(3) else 0, - } + return CheckStatus.OK + + +def _check_git_version(): + last_line = ESSENTIAL_BINARIES['git']['output'].split('\n')[0] + version_number = last_line.split()[2] + cli.log.info('Found git version %s', version_number) + + return CheckStatus.OK + + +def _check_dos2unix_version(): + last_line = ESSENTIAL_BINARIES['dos2unix']['output'].split('\n')[0] + version_number = last_line.split()[1] + cli.log.info('Found dos2unix version %s', version_number) + + return CheckStatus.OK + + +def _check_diff_version(): + last_line = ESSENTIAL_BINARIES['diff']['output'].split('\n')[0] + if 'Apple diff' in last_line: + version_number = last_line + else: + version_number = last_line.split()[3] + cli.log.info('Found diff version %s', version_number) + + return CheckStatus.OK def _check_arm_gcc_version(): @@ -148,16 +179,24 @@ def check_binaries(): """Iterates through ESSENTIAL_BINARIES and tests them. """ ok = CheckStatus.OK + missing_from_path = [] for binary in sorted(ESSENTIAL_BINARIES): try: - if not is_executable(binary): + if not is_in_path(binary): + ok = CheckStatus.ERROR + missing_from_path.append(binary) + elif not is_executable(binary): ok = CheckStatus.ERROR except TimeoutExpired: cli.log.debug('Timeout checking %s', binary) if ok != CheckStatus.ERROR: ok = CheckStatus.WARNING + if missing_from_path: + location_noun = 'its location' if len(missing_from_path) == 1 else 'their locations' + cli.log.error('{fg_red}' + ', '.join(missing_from_path) + f' may need to be installed, or {location_noun} added to your path.') + return ok @@ -165,6 +204,10 @@ def check_binary_versions(): """Check the versions of ESSENTIAL_BINARIES """ checks = { + WHICH_MAKE: _check_make_version, + 'git': _check_git_version, + 'dos2unix': _check_dos2unix_version, + 'diff': _check_diff_version, 'arm-none-eabi-gcc': _check_arm_gcc_version, 'avr-gcc': _check_avr_gcc_version, 'avrdude': _check_avrdude_version, @@ -196,15 +239,18 @@ def check_submodules(): return CheckStatus.OK -def is_executable(command): - """Returns True if command exists and can be executed. +def is_in_path(command): + """Returns True if command is found in the path. """ - # Make sure the command is in the path. - res = shutil.which(command) - if res is None: + if shutil.which(command) is None: cli.log.error("{fg_red}Can't find %s in your path.", command) return False + return True + +def is_executable(command): + """Returns True if command can be executed. + """ # Make sure the command can be executed version_arg = ESSENTIAL_BINARIES[command].get('version_arg', '--version') check = cli.run([command, version_arg], combined_output=True, stdin=DEVNULL, timeout=5) diff --git a/lib/python/qmk/cli/doctor/main.py b/lib/python/qmk/cli/doctor/main.py index 391353ebbfb1..45667e8ce20a 100755 --- a/lib/python/qmk/cli/doctor/main.py +++ b/lib/python/qmk/cli/doctor/main.py @@ -3,7 +3,6 @@ Check out the user's QMK environment and make sure it's ready to compile. """ import platform -from subprocess import DEVNULL from milc import cli from milc.questions import yesno @@ -16,6 +15,60 @@ from qmk.userspace import qmk_userspace_paths, qmk_userspace_validate, UserspaceValidationError +def distrib_tests(): + def _load_kvp_file(file): + """Load a simple key=value file into a dictionary + """ + vars = {} + with open(file, 'r') as f: + for line in f: + if '=' in line: + key, value = line.split('=', 1) + vars[key.strip()] = value.strip() + return vars + + def _parse_toolchain_release_file(file): + """Parse the QMK toolchain release info file + """ + try: + vars = _load_kvp_file(file) + return f'{vars.get("TOOLCHAIN_HOST", "unknown")}:{vars.get("TOOLCHAIN_TARGET", "unknown")}:{vars.get("COMMIT_HASH", "unknown")}' + except Exception as e: + cli.log.warning('Error reading QMK toolchain release info file: %s', e) + return f'Unknown toolchain release info file: {file}' + + def _parse_flashutils_release_file(file): + """Parse the QMK flashutils release info file + """ + try: + vars = _load_kvp_file(file) + return f'{vars.get("FLASHUTILS_HOST", "unknown")}:{vars.get("COMMIT_HASH", "unknown")}' + except Exception as e: + cli.log.warning('Error reading QMK flashutils release info file: %s', e) + return f'Unknown flashutils release info file: {file}' + + try: + from qmk.cli import QMK_DISTRIB_DIR + if (QMK_DISTRIB_DIR / 'etc').exists(): + cli.log.info('Found QMK tools distribution directory: {fg_cyan}%s', QMK_DISTRIB_DIR) + + toolchains = [_parse_toolchain_release_file(file) for file in (QMK_DISTRIB_DIR / 'etc').glob('toolchain_release_*')] + if len(toolchains) > 0: + cli.log.info('Found QMK toolchains: {fg_cyan}%s', ', '.join(toolchains)) + else: + cli.log.warning('No QMK toolchains manifest found.') + + flashutils = [_parse_flashutils_release_file(file) for file in (QMK_DISTRIB_DIR / 'etc').glob('flashutils_release_*')] + if len(flashutils) > 0: + cli.log.info('Found QMK flashutils: {fg_cyan}%s', ', '.join(flashutils)) + else: + cli.log.warning('No QMK flashutils manifest found.') + except ImportError: + cli.log.info('QMK tools distribution not found.') + + return CheckStatus.OK + + def os_tests(): """Determine our OS and run platform specific tests """ @@ -124,10 +177,12 @@ def doctor(cli): * [ ] Compile a trivial program with each compiler """ cli.log.info('QMK Doctor is checking your environment.') + cli.log.info('Python version: %s', platform.python_version()) cli.log.info('CLI version: %s', cli.version) cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) status = os_status = os_tests() + distrib_tests() userspace_tests(None) @@ -141,12 +196,6 @@ def doctor(cli): # Make sure the basic CLI tools we need are available and can be executed. bin_ok = check_binaries() - - if bin_ok == CheckStatus.ERROR: - if yesno('Would you like to install dependencies?', default=True): - cli.run(['util/qmk_install.sh', '-y'], stdin=DEVNULL, capture_output=False) - bin_ok = check_binaries() - if bin_ok == CheckStatus.OK: cli.log.info('All dependencies are installed.') elif bin_ok == CheckStatus.WARNING: @@ -163,7 +212,6 @@ def doctor(cli): # Check out the QMK submodules sub_ok = check_submodules() - if sub_ok == CheckStatus.OK: cli.log.info('Submodules are up to date.') else: @@ -186,6 +234,7 @@ def doctor(cli): cli.log.info('{fg_yellow}QMK is ready to go, but minor problems were found') return 1 else: - cli.log.info('{fg_red}Major problems detected, please fix these problems before proceeding.') - cli.log.info('{fg_blue}Check out the FAQ (https://docs.qmk.fm/#/faq_build) or join the QMK Discord (https://discord.gg/qmk) for help.') + cli.log.info('{fg_red}Major problems detected, please fix these problems before proceeding.{fg_reset}') + cli.log.info('{fg_blue}If you\'re missing dependencies, try following the instructions on: https://docs.qmk.fm/newbs_getting_started{fg_reset}') + cli.log.info('{fg_blue}Additionally, check out the FAQ (https://docs.qmk.fm/#/faq_build) or join the QMK Discord (https://discord.gg/qmk) for help.{fg_reset}') return 2 diff --git a/lib/python/qmk/flashers.py b/lib/python/qmk/flashers.py index b70b5fb03599..6b52f4d35a6d 100644 --- a/lib/python/qmk/flashers.py +++ b/lib/python/qmk/flashers.py @@ -155,10 +155,10 @@ def _flash_atmel_dfu(mcu, file): def _flash_hid_bootloader(mcu, details, file): cmd = None if details == 'halfkay': - if shutil.which('teensy-loader-cli'): - cmd = 'teensy-loader-cli' - elif shutil.which('teensy_loader_cli'): + if shutil.which('teensy_loader_cli'): cmd = 'teensy_loader_cli' + elif shutil.which('teensy-loader-cli'): + cmd = 'teensy-loader-cli' # Use 'hid_bootloader_cli' for QMK HID and as a fallback for HalfKay if not cmd: diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index f63228b2bc62..e8aad760defa 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -14,7 +14,7 @@ from qmk.keyboard import config_h, rules_mk from qmk.commands import parse_configurator_json from qmk.makefile import parse_rules_mk_file -from qmk.math import compute +from qmk.math_ops import compute from qmk.util import maybe_exit, truthy true_values = ['1', 'on', 'yes'] diff --git a/lib/python/qmk/keyboard.py b/lib/python/qmk/keyboard.py index 254dc623096a..e8534492c99c 100644 --- a/lib/python/qmk/keyboard.py +++ b/lib/python/qmk/keyboard.py @@ -175,8 +175,9 @@ def keyboard_completer(prefix, action, parser, parsed_args): return list_keyboards() +@lru_cache(maxsize=None) def list_keyboards(): - """Returns a list of all keyboards + """Returns a list of all keyboards. """ # We avoid pathlib here because this is performance critical code. kb_wildcard = os.path.join(base_path, "**", 'keyboard.json') @@ -184,6 +185,9 @@ def list_keyboards(): found = map(_find_name, paths) + # Convert to posix paths for consistency + found = map(lambda x: str(Path(x).as_posix()), found) + return sorted(set(found)) diff --git a/lib/python/qmk/math.py b/lib/python/qmk/math_ops.py similarity index 92% rename from lib/python/qmk/math.py rename to lib/python/qmk/math_ops.py index 88dc4a300c87..1f14b18f4e77 100644 --- a/lib/python/qmk/math.py +++ b/lib/python/qmk/math_ops.py @@ -23,8 +23,8 @@ def compute(expr): def _eval(node): - if isinstance(node, ast.Num): # - return node.n + if isinstance(node, ast.Constant): # + return node.value elif isinstance(node, ast.BinOp): # return operators[type(node.op)](_eval(node.left), _eval(node.right)) elif isinstance(node, ast.UnaryOp): # e.g., -1 diff --git a/platforms/avr/flash.mk b/platforms/avr/flash.mk index 51731f0aa880..bfb292224cc9 100644 --- a/platforms/avr/flash.mk +++ b/platforms/avr/flash.mk @@ -5,10 +5,10 @@ # Autodetect teensy loader ifndef TEENSY_LOADER_CLI - ifneq (, $(shell which teensy-loader-cli 2>/dev/null)) - TEENSY_LOADER_CLI ?= teensy-loader-cli - else + ifneq (, $(shell which teensy_loader_cli 2>/dev/null)) TEENSY_LOADER_CLI ?= teensy_loader_cli + else + TEENSY_LOADER_CLI ?= teensy-loader-cli endif endif diff --git a/platforms/chibios/flash.mk b/platforms/chibios/flash.mk index f4db17a58bf9..073475483493 100644 --- a/platforms/chibios/flash.mk +++ b/platforms/chibios/flash.mk @@ -77,10 +77,10 @@ st-flash: $(BUILD_DIR)/$(TARGET).hex sizeafter # Autodetect teensy loader ifndef TEENSY_LOADER_CLI - ifneq (, $(shell which teensy-loader-cli 2>/dev/null)) - TEENSY_LOADER_CLI ?= teensy-loader-cli - else + ifneq (, $(shell which teensy_loader_cli 2>/dev/null)) TEENSY_LOADER_CLI ?= teensy_loader_cli + else + TEENSY_LOADER_CLI ?= teensy-loader-cli endif endif diff --git a/util/env-bootstrap.sh b/util/env-bootstrap.sh new file mode 100755 index 000000000000..6b0497ffaeda --- /dev/null +++ b/util/env-bootstrap.sh @@ -0,0 +1,594 @@ +#!/usr/bin/env sh +# Copyright 2025 Nick Brassel (@tzarc) +# SPDX-License-Identifier: GPL-2.0-or-later + +################################################################################ +# This script will install the QMK CLI, toolchains, and flashing utilities. +################################################################################ +# Environment variables: +# CONFIRM: Skip the pre-install delay. (or: --confirm) +# QMK_DISTRIB_DIR: The directory to install the QMK distribution to. (or: --qmk-distrib-dir=...) +# UV_INSTALL_DIR: The directory to install `uv` to. (or: --uv-install-dir=...) +# UV_TOOL_DIR: The directory to install `uv` tools to. (or: --uv-tool-dir=...) +# SKIP_CLEAN: Skip cleaning the distribution directory. (or: --skip-clean) +# SKIP_PACKAGE_MANAGER: Skip installing the necessary packages for the package manager. (or: --skip-package-manager) +# SKIP_UV: Skip installing `uv`. (or: --skip-uv) +# SKIP_QMK_CLI: Skip installing the QMK CLI. (or: --skip-qmk-cli) +# SKIP_QMK_TOOLCHAINS: Skip installing the QMK toolchains. (or: --skip-qmk-toolchains) +# SKIP_QMK_FLASHUTILS: Skip installing the QMK flashing utilities. (or: --skip-qmk-flashutils) +# SKIP_UDEV_RULES: Skip installing the udev rules for Linux. (or: --skip-udev-rules) +# SKIP_WINDOWS_DRIVERS: Skip installing the Windows drivers for the flashing utilities. (or: --skip-windows-drivers) +# +# Arguments above may be negated by prefixing with `--no-` instead (e.g. `--no-skip-clean`). +################################################################################ +# Usage: +# curl -fsSL https://raw.githubusercontent.com/qmk/qmk_firmware/master/util/env-bootstrap.sh | sh +# +# Help: +# curl -fsSL https://raw.githubusercontent.com/qmk/qmk_firmware/master/util/env-bootstrap.sh | sh -s -- --help +# +# An example which skips installing `uv` using environment variables: +# curl -fsSL https://raw.githubusercontent.com/qmk/qmk_firmware/master/util/env-bootstrap.sh | SKIP_UV=1 sh +# +# ...or by using command line arguments: +# curl -fsSL https://raw.githubusercontent.com/qmk/qmk_firmware/master/util/env-bootstrap.sh | sh -s -- --skip-uv +# +# Any other configurable items listed above may be specified in the same way. +################################################################################ + +{ # this ensures the entire script is downloaded # + set -eu + + BOOTSTRAP_TMPDIR="$(mktemp -d /tmp/qmk-bootstrap-failure.XXXXXX)" + trap 'rm -rf "$BOOTSTRAP_TMPDIR" >/dev/null 2>&1 || true' EXIT + FAILURE_FILE="${BOOTSTRAP_TMPDIR}/fail" + + # Work out which `sed` to use + command -v gsed >/dev/null 2>&1 && SED=gsed || SED=sed + + script_args() { + cat <<__EOT__ + --help -- Shows this help text + --confirm -- Skips the delay before installation + --uv-install-dir={path} -- The directory to install \`uv\` into + --uv-tool-dir={path} -- The directory to install \`uv\` tools into + --qmk-distrib-dir={path} -- The directory to install the QMK distribution into + --skip-clean -- Skip cleaning the QMK distribution directory + --skip-package-manager -- Skip installing the necessary packages for the package manager + --skip-uv -- Skip installing \`uv\` + --skip-qmk-cli -- Skip installing the QMK CLI + --skip-qmk-toolchains -- Skip installing the QMK toolchains + --skip-qmk-flashutils -- Skip installing the QMK flashing utilities + --skip-udev-rules -- Skip installing the udev rules for Linux + --skip-windows-drivers -- Skip installing the Windows drivers for the flashing utilities +__EOT__ + # Hidden: + # --wsl-install -- Installs the WSL variant of qmk_flashutils + } + + signal_execution_failure() { + touch "$FAILURE_FILE" >/dev/null 2>&1 || true + } + + exit_if_execution_failed() { + if [ -e "$FAILURE_FILE" ]; then + exit 1 + fi + } + + script_help() { + echo "$(basename ${this_script:-qmk-install.sh}) $(script_args | sort | ${SED} -e 's@^\s*@@g' -e 's@\s\+--.*@@g' -e 's@^@[@' -e 's@$@]@' | tr '\n' ' ')" + echo + echo "Arguments:" + script_args + echo + echo "Switch arguments may be negated by prefixing with '--no-' (e.g. '--no-skip-clean')." + } + + script_parse_args() { + local N + local V + while [ ! -z "${1:-}" ]; do + case "$1" in + --help) + script_help + exit 0 + ;; + --*=*) + N=${1%%=*} + N=${N##--} + N=$(echo $N | tr '-' '_' | tr 'a-z' 'A-Z') + V=${1##*=} + export $N="$V" + ;; + --no-*) + N=${1##--no-} + N=$(echo $N | tr '-' '_' | tr 'a-z' 'A-Z') + unset $N + ;; + --*) + N=${1##--} + N=$(echo $N | tr '-' '_' | tr 'a-z' 'A-Z') + export $N=true + ;; + *) + echo "Unknown argument: '$1'" >&2 + echo + script_help >&2 + exit 1 + ;; + esac + shift + unset N + unset V + done + } + + nsudo() { + if [ "$(fn_os)" = "windows" ]; then + # No need for sudo under QMK MSYS + return + elif [ $(id -u) -ne 0 ]; then + if [ -n "$(command -v sudo 2>/dev/null || true)" ]; then + echo "sudo" + elif [ -n "$(command -v doas 2>/dev/null || true)" ]; then + echo "doas" + else + echo "Please install 'sudo' or 'doas' to continue." >&2 + exit 1 + fi + fi + true + } + + download_url() { + local url=$1 + local filename=${2:-$(basename "$url")} + local quiet='' + if [ -n "$(command -v curl 2>/dev/null || true)" ]; then + [ "$filename" = "-" ] && quiet='-s' || echo "Downloading '$url' => '$filename'" >&2 + curl -LSf $quiet -o "$filename" "$url" + elif [ -n "$(command -v wget 2>/dev/null || true)" ]; then + [ "$filename" = "-" ] && quiet='-q' || echo "Downloading '$url' => '$filename'" >&2 + wget $quiet "-O$filename" "$url" + else + echo "Please install 'curl' to continue." >&2 + exit 1 + fi + } + + github_api_call() { + local url="$1" + local token="${GITHUB_TOKEN:-${GH_TOKEN:-}}" + if [ -n "${token:-}" ]; then + if [ -n "$(command -v curl 2>/dev/null || true)" ]; then + curl -fsSL -H "Authorization: token $token" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/$url" + elif [ -n "$(command -v wget 2>/dev/null || true)" ]; then + wget -q --header="Authorization: token $token" --header="Accept: application/vnd.github.v3+json" "https://api.github.com/$url" -O - + fi + else + download_url "https://api.github.com/$url" - + fi + } + + fn_os() { + local os_name=$(echo ${1:-} | tr 'A-Z' 'a-z') + if [ -z "$os_name" ]; then + os_name=$(uname -s | tr 'A-Z' 'a-z') + fi + case "$os_name" in + *darwin* | *macos* | *apple*) + echo macos + ;; + *windows* | *mingw* | *msys*) + echo windows + ;; + *linux*) + echo linux + ;; + *) + echo unknown + ;; + esac + } + + fn_arch() { + local arch_name=$(echo ${1:-} | tr 'A-Z' 'a-z') + if [ -z "$arch_name" ]; then + arch_name=$(uname -m | tr 'A-Z' 'a-z') + fi + case "$arch_name" in + *arm64* | *aarch64*) + echo ARM64 + ;; + *riscv64*) + echo RV64 + ;; + *x86_64* | *x64*) + echo X64 + ;; + *) + echo unknown + ;; + esac + } + + preinstall_delay() { + [ -z "${CONFIRM:-}" ] || return 0 + echo >&2 + echo "Waiting 10 seconds before proceeding. Press Ctrl+C to cancel installation." >&2 + sleep 10 + } + + get_package_manager_deps() { + case $(fn_os) in + macos) echo "zstd clang-format make hidapi libusb dos2unix git" ;; + windows) echo "base-devel: zstd:p toolchain:p clang:p hidapi:p dos2unix: git: unzip:" ;; + linux) + case $(grep ID /etc/os-release) in + *arch* | *manjaro* | *cachyos*) echo "zstd base-devel clang diffutils wget unzip zip hidapi dos2unix git" ;; + *debian* | *ubuntu*) echo "zstd build-essential clang-format diffutils wget unzip zip libhidapi-hidraw0 dos2unix git" ;; + *fedora*) echo "zstd clang diffutils which gcc git wget unzip zip hidapi dos2unix libusb-devel libusb1-devel libusb-compat-0.1-devel libusb0-devel git epel-release" ;; + *suse*) echo "zstd clang diffutils wget unzip zip libhidapi-hidraw0 dos2unix git libusb-1_0-devel gzip which" ;; + *gentoo*) echo "zstd diffutils wget unzip zip dev-libs/hidapi dos2unix dev-vcs/git dev-libs/libusb app-arch/gzip which" ;; + *) + echo >&2 + echo "Sorry, we don't recognize your distribution." >&2 + echo >&2 + echo "Proceeding with the installation, however you will need to install at least the following tools manually:" >&2 + echo " - make, git, curl, zstd, unzip, [lib]hidapi" >&2 + echo "Other tools may be required depending on your distribution." >&2 + echo >&2 + echo "Alternatively, if you prefer Docker, try using the docker image instead:" >&2 + echo " - https://docs.qmk.fm/#/getting_started_docker" >&2 + ;; + esac + ;; + *) + # We can only really support macOS, Windows, and Linux at this time due to `uv` requirements. + echo >&2 + echo "Sorry, we don't recognize your OS. Try using a compatible OS instead:" >&2 + echo " - https://docs.qmk.fm/newbs_getting_started#set-up-your-environment" >&2 + echo >&2 + echo "If you cannot use a compatible OS, you can try installing the \`qmk\` Python package manually using \`pip\`, most likely requiring a virtual environment:" >&2 + echo " % python3 -m pip install qmk" >&2 + echo >&2 + echo "All other dependencies will need to be installed manually, such as make, git, AVR and ARM toolchains, and associated flashing utilities." >&2 + echo >&2 + echo "**NOTE**: QMK does not provide official support for your environment. Here be dragons, you are on your own." >&2 + signal_execution_failure + ;; + esac + } + + print_package_manager_deps_and_delay() { + get_package_manager_deps | tr ' ' '\n' | sort | xargs -I'{}' echo " - {}" >&2 + exit_if_execution_failed + preinstall_delay || exit 1 + } + + install_package_manager_deps() { + # Install the necessary packages for the package manager + case $(fn_os) in + macos) + if [ -n "$(command -v brew 2>/dev/null || true)" ]; then + echo "It will also install the following system packages using 'brew':" >&2 + print_package_manager_deps_and_delay + + brew update + + local existing="" + local new="" + for dep in $(get_package_manager_deps); do + if brew list --formula | grep -q "^${dep}\$"; then + existing="${existing:-} $dep" + else + new="${new:-} $dep" + fi + done + + if [ -n "${existing:-}" ]; then + brew upgrade $existing + fi + if [ -n "${new:-}" ]; then + brew install $new + fi + else + echo "Please install 'brew' to continue. See https://brew.sh/ for more information." >&2 + exit 1 + fi + ;; + windows) + echo "It will also install the following packages using 'pacman'/'pacboy':" >&2 + print_package_manager_deps_and_delay + $(nsudo) pacman --needed --noconfirm --disable-download-timeout -S pactoys + $(nsudo) pacboy sync --needed --noconfirm --disable-download-timeout $(get_package_manager_deps) + ;; + linux) + case $(grep ID /etc/os-release) in + *arch* | *manjaro* | *cachyos*) + echo "It will also install the following system packages using 'pacman':" >&2 + print_package_manager_deps_and_delay + $(nsudo) pacman --needed --noconfirm -S $(get_package_manager_deps) + ;; + *debian* | *ubuntu*) + echo "It will also install the following system packages using 'apt':" >&2 + print_package_manager_deps_and_delay + $(nsudo) apt-get update + DEBIAN_FRONTEND=noninteractive \ + $(nsudo) apt-get --quiet --yes install $(get_package_manager_deps) + ;; + *fedora*) + echo "It will also install the following system packages using 'dnf':" >&2 + print_package_manager_deps_and_delay + # Some RHEL-likes need EPEL for hidapi + $(nsudo) dnf -y install epel-release 2>/dev/null || true + # RHEL-likes have some naming differences in libusb packages, so manually handle those + $(nsudo) dnf -y install $(get_package_manager_deps | tr ' ' '\n' | grep -v 'epel-release' | grep -v libusb | tr '\n' ' ') + for pkg in $(get_package_manager_deps | tr ' ' '\n' | grep libusb); do + $(nsudo) dnf -y install "$pkg" 2>/dev/null || true + done + ;; + *opensuse* | *suse*) + echo "It will also install development tools as well as the following system packages using 'zypper':" >&2 + print_package_manager_deps_and_delay + $(nsudo) zypper --non-interactive refresh + $(nsudo) zypper --non-interactive install -t pattern devel_basis devel_C_C++ + $(nsudo) zypper --non-interactive install $(get_package_manager_deps) + ;; + *gentoo*) + echo "It will also install the following system packages using 'emerge':" >&2 + print_package_manager_deps_and_delay + $(nsudo) emerge --sync + $(nsudo) emerge --noreplace --ask=n $(get_package_manager_deps | tr ' ' '\n') || signal_execution_failure + exit_if_execution_failed + ;; + *) + print_package_manager_deps_and_delay + echo "Proceeding with the installation, you will need to ensure prerequisites are installed." >&2 + ;; + esac + ;; + *) + print_package_manager_deps_and_delay + ;; + esac + } + + install_uv() { + # Install `uv` (or update as necessary) + download_url https://astral.sh/uv/install.sh - | TMPDIR="$(windows_ish_path "${TMPDIR:-}")" UV_INSTALL_DIR="$(windows_ish_path "${UV_INSTALL_DIR:-}")" sh + } + + setup_paths() { + # Set up the paths for any of the locations `uv` expects + if [ -n "${XDG_BIN_HOME:-}" ]; then + export PATH="$XDG_BIN_HOME:$PATH" + fi + if [ -n "${XDG_DATA_HOME:-}" ]; then + export PATH="$XDG_DATA_HOME/../bin:$PATH" + fi + [ ! -d "$HOME/.local/bin" ] || export PATH="$HOME/.local/bin:$PATH" + + if [ -n "${UV_INSTALL_DIR:-}" ]; then + export PATH="$UV_INSTALL_DIR/bin:$UV_INSTALL_DIR:$PATH" # cater for both "flat" and "hierarchical" installs of `uv` + fi + + if [ -n "${UV_TOOL_BIN_DIR:-}" ]; then + export PATH="$UV_TOOL_BIN_DIR:$PATH" + fi + } + + uv_command() { + if [ "$(fn_os)" = "windows" ]; then + UV_TOOL_DIR="$(windows_ish_path "${UV_TOOL_DIR:-}")" \ + UV_TOOL_BIN_DIR="$(windows_ish_path "${UV_TOOL_BIN_DIR:-}")" \ + uv "$@" + else + uv "$@" + fi + } + + install_qmk_cli() { + # Install the QMK CLI + uv_command tool install --force --with pip --upgrade --python $PYTHON_TARGET_VERSION qmk + + # QMK is installed to... + local qmk_tooldir="$(posix_ish_path "$(uv_command tool dir)/qmk")" + + # Activate the environment + if [ -e "$qmk_tooldir/bin" ]; then + . "$qmk_tooldir/bin/activate" + elif [ -e "$qmk_tooldir/Scripts" ]; then + . "$qmk_tooldir/Scripts/activate" + else + echo "Could not find the QMK environment to activate." >&2 + exit 1 + fi + + # Install the QMK dependencies + uv_command pip install --upgrade -r https://raw.githubusercontent.com/qmk/qmk_firmware/refs/heads/master/requirements.txt + uv_command pip install --upgrade -r https://raw.githubusercontent.com/qmk/qmk_firmware/refs/heads/master/requirements-dev.txt + + # Deactivate the environment + deactivate + } + + install_toolchains() { + # Get the latest toolchain release from https://github.com/qmk/qmk_toolchains + local latest_toolchains_release=$(github_api_call repos/qmk/qmk_toolchains/releases/latest - | grep -oE '"tag_name": "[^"]+' | grep -oE '[^"]+$') + # Download the specific release asset with a matching keyword + local toolchain_url=$(github_api_call repos/qmk/qmk_toolchains/releases/tags/$latest_toolchains_release - | grep -oE '"browser_download_url": "[^"]+"' | grep -oE 'https://[^"]+' | grep $(fn_os)$(fn_arch)) + if [ -z "$toolchain_url" ]; then + echo "No toolchain found for this OS/Arch combination." >&2 + exit 1 + fi + + # Download the toolchain release to the toolchains location + echo "Downloading compiler toolchains..." >&2 + local target_file="$QMK_DISTRIB_DIR/$(basename "$toolchain_url")" + download_url "$toolchain_url" "$target_file" + + # Extract the toolchain + echo "Extracting compiler toolchains to '$QMK_DISTRIB_DIR'..." >&2 + zstdcat "$target_file" | tar xf - -C "$QMK_DISTRIB_DIR" --strip-components=1 + } + + install_flashing_tools() { + local osarchvariant="$(fn_os)$(fn_arch)" + + # Special case for WSL + if [ -n "${WSL_INSTALL:-}" ] || [ -n "${WSL_DISTRO_NAME:-}" ] || [ -f /proc/sys/fs/binfmt_misc/WSLInterop ]; then + osarchvariant="windowsWSL" + fi + + # Get the latest flashing tools release from https://github.com/qmk/qmk_flashutils + local latest_flashutils_release=$(github_api_call repos/qmk/qmk_flashutils/releases/latest - | grep -oE '"tag_name": "[^"]+' | grep -oE '[^"]+$') + # Download the specific release asset with a matching keyword + local flashutils_url=$(github_api_call repos/qmk/qmk_flashutils/releases/tags/$latest_flashutils_release - | grep -oE '"browser_download_url": "[^"]+"' | grep -oE 'https://[^"]+' | grep "$osarchvariant") + if [ -z "$flashutils_url" ]; then + echo "No flashing tools found for this OS/Arch combination." >&2 + exit 1 + fi + + # Download the flashing tools release to the toolchains location + echo "Downloading flashing tools..." >&2 + local target_file="$QMK_DISTRIB_DIR/$(basename "$flashutils_url")" + download_url "$flashutils_url" "$target_file" + + # Extract the flashing tools + echo "Extracting flashing tools to '$QMK_DISTRIB_DIR'..." >&2 + zstdcat "$target_file" | tar xf - -C "$QMK_DISTRIB_DIR/bin" + # Move the release file to etc + mv "$QMK_DISTRIB_DIR/bin/flashutils_release"* "$QMK_DISTRIB_DIR/etc" + } + + install_linux_udev_rules() { + # Download the udev rules to the toolchains location + echo "Downloading QMK udev rules file..." >&2 + local qmk_rules_target_file="$QMK_DISTRIB_DIR/50-qmk.rules" + download_url "https://raw.githubusercontent.com/qmk/qmk_firmware/refs/heads/master/util/udev/50-qmk.rules" "$qmk_rules_target_file" + + # Install the udev rules -- path list is aligned with qmk doctor's linux.py + local udev_rules_paths=" + /usr/lib/udev/rules.d + /usr/local/lib/udev/rules.d + /run/udev/rules.d + /etc/udev/rules.d + " + for udev_rules_dir in $udev_rules_paths; do + if [ -d "$udev_rules_dir" ]; then + echo "Installing udev rules to $udev_rules_dir/50-qmk.rules ..." >&2 + $(nsudo) mv "$qmk_rules_target_file" "$udev_rules_dir" + $(nsudo) chown 0:0 "$udev_rules_dir/50-qmk.rules" + $(nsudo) chmod 644 "$udev_rules_dir/50-qmk.rules" + break + fi + done + + # Reload udev rules + if command -v udevadm >/dev/null 2>&1; then + echo "Reloading udev rules..." >&2 + $(nsudo) udevadm control --reload-rules || true + $(nsudo) udevadm trigger || true + else + echo "udevadm not found, skipping udev rules reload." >&2 + fi + } + + install_windows_drivers() { + # Get the latest driver installer release from https://github.com/qmk/qmk_driver_installer + local latest_driver_installer_release=$(github_api_call repos/qmk/qmk_driver_installer/releases/latest - | grep -oE '"tag_name": "[^"]+' | grep -oE '[^"]+$') + # Download the specific release asset + local driver_installer_url=$(github_api_call repos/qmk/qmk_driver_installer/releases/tags/$latest_driver_installer_release - | grep -oE '"browser_download_url": "[^"]+"' | grep -oE 'https://[^"]+' | grep '\.exe') + if [ -z "$driver_installer_url" ]; then + echo "No driver installer found." >&2 + exit 1 + fi + # Download the driver installer release to the toolchains location + echo "Downloading driver installer..." >&2 + local target_file="$QMK_DISTRIB_DIR/$(basename "$driver_installer_url")" + download_url "$driver_installer_url" "$target_file" + # Download the drivers list + download_url "https://raw.githubusercontent.com/qmk/qmk_firmware/refs/heads/master/util/drivers.txt" "$QMK_DISTRIB_DIR/drivers.txt" + # Execute the driver installer + cd "$QMK_DISTRIB_DIR" + cmd.exe //c "qmk_driver_installer.exe --all --force drivers.txt" + cd - + # Remove the temporary files + rm -f "$QMK_DISTRIB_DIR/qmk_driver_installer.exe" "$QMK_DISTRIB_DIR/drivers.txt" || true + } + + clean_tarballs() { + # Clean up the tarballs + rm -f "$QMK_DISTRIB_DIR"/*.tar.zst || true + } + + windows_ish_path() { + [ -n "$1" ] || return 0 + [ "$(uname -o 2>/dev/null || true)" = "Msys" ] && cygpath -w "$1" || echo "$1" + } + + posix_ish_path() { + [ -n "$1" ] || return 0 + [ "$(uname -o 2>/dev/null || true)" = "Msys" ] && cygpath -u "$1" || echo "$1" + } + + # Set the Python version we want to use with the QMK CLI + export PYTHON_TARGET_VERSION=${PYTHON_TARGET_VERSION:-3.14} + + # Windows/MSYS doesn't like `/tmp` so we need to set a different temporary directory. + # Also set the default `UV_INSTALL_DIR` and `QMK_DISTRIB_DIR` to locations which don't pollute the user's home directory, keeping the installation internal to MSYS. + if [ "$(uname -o 2>/dev/null || true)" = "Msys" ]; then + export TMPDIR="$(posix_ish_path "$TMP")" + export UV_INSTALL_DIR="$(posix_ish_path "${UV_INSTALL_DIR:-/opt/uv}")" + export QMK_DISTRIB_DIR="$(posix_ish_path "${QMK_DISTRIB_DIR:-/opt/qmk}")" + export UV_TOOL_DIR="$(posix_ish_path "${UV_TOOL_DIR:-"$UV_INSTALL_DIR/tools"}")" + export UV_TOOL_BIN_DIR="$(posix_ish_path "$UV_TOOL_DIR/bin")" + fi + + script_parse_args "$@" + + echo "This QMK CLI installation script will install \`uv\`, the QMK CLI, as well as QMK-supplied toolchains and flashing utilities." >&2 + [ -z "${SKIP_PACKAGE_MANAGER:-}" ] || { preinstall_delay || exit 1; } + [ -n "${SKIP_PACKAGE_MANAGER:-}" ] || install_package_manager_deps + [ -n "${SKIP_UV:-}" ] || install_uv + + # Make sure the usual `uv` and other associated directories are on the $PATH + setup_paths + + # Work out where we want to install the distribution and tools now that `uv` is installed + export QMK_DISTRIB_DIR="$(posix_ish_path "${QMK_DISTRIB_DIR:-$(printf 'import platformdirs\nprint(platformdirs.user_data_dir("qmk"))' | uv_command run --quiet --python $PYTHON_TARGET_VERSION --with platformdirs -)}")" + + # Clear out the distrib directory if necessary + if [ -z "${SKIP_CLEAN:-}" ] || [ -z "${SKIP_QMK_TOOLCHAINS:-}" -a -z "${SKIP_QMK_FLASHUTILS:-}" ]; then + if [ -d "$QMK_DISTRIB_DIR" ]; then + echo "Removing old QMK distribution..." >&2 + rm -rf "$QMK_DISTRIB_DIR" + fi + fi + mkdir -p "$QMK_DISTRIB_DIR" + + [ -n "${SKIP_QMK_CLI:-}" ] || install_qmk_cli + [ -n "${SKIP_QMK_TOOLCHAINS:-}" ] || install_toolchains + [ -n "${SKIP_QMK_FLASHUTILS:-}" ] || install_flashing_tools + if [ "$(uname -s 2>/dev/null || true)" = "Linux" ]; then + [ -n "${SKIP_UDEV_RULES:-}" ] || install_linux_udev_rules + fi + if [ "$(uname -o 2>/dev/null || true)" = "Msys" ]; then + [ -n "${SKIP_WINDOWS_DRIVERS:-}" ] || install_windows_drivers + fi + clean_tarballs + + # Notify the user that they may need to restart their shell to get the `qmk` command + echo >&2 + echo "QMK CLI installation complete." >&2 + echo "The QMK CLI has been installed to '$(posix_ish_path "$(dirname "$(command -v qmk)")")'." >&2 + echo "The QMK CLI venv has been created at '$(posix_ish_path "$(uv_command tool dir)/qmk")'." >&2 + echo "Toolchains and flashing utilities have been installed to '$QMK_DISTRIB_DIR'." >&2 + echo >&2 + echo "You may need to restart your shell to gain access to the 'qmk' command." >&2 + echo "Alternatively, add "$(posix_ish_path "$(dirname "$(command -v qmk)")")" to your \$PATH:" >&2 + echo " export PATH=\"$(posix_ish_path "$(dirname "$(command -v qmk)")"):\$PATH\"" >&2 + +} # this ensures the entire script is downloaded # From 330a8597f8fb136374285d2b52a978e311b46ede Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Nov 2025 06:46:53 +1100 Subject: [PATCH 1139/1205] Bump actions/checkout from 4 to 6 (#25829) --- .github/workflows/bootstrap_testing.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bootstrap_testing.yml b/.github/workflows/bootstrap_testing.yml index 997db3f0b2c4..00787c92eb6f 100644 --- a/.github/workflows/bootstrap_testing.yml +++ b/.github/workflows/bootstrap_testing.yml @@ -105,7 +105,7 @@ jobs: echo 'Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' >> /etc/sudoers - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 1 submodules: recursive @@ -174,7 +174,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 1 submodules: recursive @@ -224,7 +224,7 @@ jobs: git: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 1 submodules: recursive From b5dfb2bd1ea38a37c58227eb17bde583f0c0e4d6 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 27 Nov 2025 21:29:46 +0000 Subject: [PATCH 1140/1205] Partially skip generating community modules when none enabled (#25819) --- builddefs/build_keyboard.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index 640dedc31e0d..dae8c07e3e37 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -255,6 +255,8 @@ endif COMMUNITY_RULES_MK = $(shell $(QMK_BIN) generate-community-modules-rules-mk -kb $(KEYBOARD) --quiet --escape --output $(INTERMEDIATE_OUTPUT)/src/community_rules.mk $(KEYMAP_JSON)) include $(COMMUNITY_RULES_MK) +ifneq ($(COMMUNITY_MODULES),) + $(INTERMEDIATE_OUTPUT)/src/community_modules.h: $(KEYMAP_JSON) $(DD_CONFIG_FILES) @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD) $(eval CMD=$(QMK_BIN) generate-community-modules-h -kb $(KEYBOARD) --quiet --output $(INTERMEDIATE_OUTPUT)/src/community_modules.h $(KEYMAP_JSON)) @@ -289,6 +291,8 @@ SRC += $(INTERMEDIATE_OUTPUT)/src/community_modules.c generated-files: $(INTERMEDIATE_OUTPUT)/src/community_modules.h $(INTERMEDIATE_OUTPUT)/src/community_modules.c $(INTERMEDIATE_OUTPUT)/src/community_modules_introspection.c $(INTERMEDIATE_OUTPUT)/src/community_modules_introspection.h $(INTERMEDIATE_OUTPUT)/src/led_matrix_community_modules.inc $(INTERMEDIATE_OUTPUT)/src/rgb_matrix_community_modules.inc +endif + include $(BUILDDEFS_PATH)/converters.mk # Generate the board's version.h file. From 6ed61c65dd66cdbb450a4920a69bae193ec73f15 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Mon, 1 Dec 2025 06:25:13 +1100 Subject: [PATCH 1141/1205] [CI] Format code according to conventions (#25827) Format code according to conventions --- drivers/bluetooth/bluefruit_le.cpp | 2 +- drivers/eeprom/eeprom_i2c.c | 2 +- drivers/eeprom/eeprom_spi.c | 2 +- drivers/encoder/encoder_quadrature.c | 2 +- drivers/flash/flash_spi.c | 4 +- drivers/haptic/solenoid.h | 3 +- drivers/lcd/st7565.c | 2 +- drivers/led/snled27351-mono.c | 3 +- drivers/led/snled27351.c | 3 +- drivers/oled/oled_driver.c | 14 ++-- drivers/oled/oled_driver.h | 36 ++++------- drivers/painter/comms/qp_comms_i2c.c | 2 +- drivers/painter/comms/qp_comms_spi.c | 14 ++-- drivers/painter/generic/qp_surface_common.c | 10 +-- drivers/painter/generic/qp_surface_internal.h | 4 +- drivers/painter/generic/qp_surface_mono1bpp.c | 2 +- drivers/painter/generic/qp_surface_rgb565.c | 2 +- drivers/painter/ili9xxx/qp_ili9486.c | 8 +-- drivers/painter/ld7032/qp_ld7032.c | 8 +-- drivers/painter/oled_panel/qp_oled_panel.c | 10 +-- drivers/painter/tft_panel/qp_tft_panel.c | 4 +- drivers/ps2/ps2_mouse.c | 2 +- drivers/sensors/cirque_pinnacle.c | 6 +- drivers/sensors/pmw33xx_common.h | 9 +-- platforms/avr/drivers/analog.c | 2 +- platforms/avr/drivers/ws2812_bitbang.c | 10 +-- platforms/avr/gpio.h | 14 ++-- platforms/avr/hardware_id.c | 2 +- platforms/chibios/bootloaders/rp2040.c | 2 +- platforms/chibios/drivers/analog.c | 2 +- platforms/chibios/drivers/audio_dac_basic.c | 6 +- .../chibios/drivers/audio_pwm_software.c | 8 +-- .../drivers/eeprom/eeprom_kinetis_flexram.c | 6 +- .../eeprom/eeprom_legacy_emulated_flash.c | 4 +- .../chibios/drivers/flash/legacy_flash_ops.c | 2 +- platforms/chibios/drivers/serial_usart.c | 8 +-- platforms/chibios/drivers/uart_sio.c | 8 +-- .../drivers/wear_leveling/wear_leveling_efl.c | 2 +- platforms/chibios/drivers/ws2812_pwm.c | 4 +- platforms/chibios/drivers/ws2812_spi.c | 3 +- platforms/progmem.h | 10 +-- platforms/synchronization_util.h | 4 +- platforms/test/eeprom.c | 6 +- .../eeprom_legacy_emulated_flash_tests.cpp | 2 +- platforms/test/legacy_flash_ops_mock.c | 4 +- quantum/action_code.h | 12 ++-- quantum/action_tapping.c | 34 +++++----- quantum/action_util.h | 3 +- quantum/audio/musical_notes.h | 6 +- quantum/backlight/backlight_driver_common.c | 4 +- quantum/command.c | 2 +- quantum/deferred_exec.h | 2 +- quantum/dip_switch.h | 3 +- quantum/encoder.h | 3 +- quantum/encoder/tests/config_mock.h | 6 +- .../tests/config_mock_split_left_eq_right.h | 12 ++-- .../tests/config_mock_split_left_gt_right.h | 12 ++-- .../tests/config_mock_split_left_lt_right.h | 12 ++-- .../encoder/tests/config_mock_split_no_left.h | 12 ++-- .../tests/config_mock_split_no_right.h | 12 ++-- .../encoder/tests/config_mock_split_role.h | 12 ++-- quantum/joystick.h | 6 +- quantum/keycode.h | 2 +- quantum/matrix.c | 2 +- quantum/mousekey.c | 2 +- quantum/nvm/eeprom/nvm_dynamic_keymap.c | 12 ++-- quantum/nvm/eeprom/nvm_eeconfig.c | 8 +-- quantum/painter/lvgl/qp_lvgl.c | 6 +- quantum/painter/qp_comms.c | 4 +- quantum/painter/qp_draw_text.c | 4 +- quantum/painter/qp_internal_driver.h | 2 +- quantum/painter/qp_stream.h | 4 +- quantum/process_keycode/process_autocorrect.c | 2 +- quantum/process_keycode/process_combo.c | 14 ++-- quantum/process_keycode/process_combo.h | 10 ++- quantum/process_keycode/process_key_lock.c | 2 +- .../process_keycode/process_key_override.c | 3 +- quantum/process_keycode/process_tap_dance.h | 44 +++++++++---- quantum/quantum_keycodes.h | 64 +++++++++---------- quantum/rgblight/rgblight.c | 2 +- quantum/rgblight/rgblight.h | 9 +-- quantum/secure.c | 5 +- quantum/split_common/split_util.c | 2 +- quantum/split_common/transactions.c | 9 +-- quantum/util.h | 2 +- quantum/via.c | 4 +- quantum/wear_leveling/wear_leveling.c | 6 +- .../retro_tapping/config.h | 3 +- tmk_core/protocol/chibios/usb_driver.c | 2 +- tmk_core/protocol/chibios/usb_endpoints.c | 6 +- tmk_core/protocol/chibios/usb_main.c | 2 +- tmk_core/protocol/usb_descriptor.h | 4 +- 92 files changed, 308 insertions(+), 349 deletions(-) diff --git a/drivers/bluetooth/bluefruit_le.cpp b/drivers/bluetooth/bluefruit_le.cpp index 5fdd104dcfb8..bb5014360cd7 100644 --- a/drivers/bluetooth/bluefruit_le.cpp +++ b/drivers/bluetooth/bluefruit_le.cpp @@ -364,7 +364,7 @@ static bool read_response(char *resp, uint16_t resplen, bool verbose) { } static bool at_command(const char *cmd, char *resp, uint16_t resplen, bool verbose, uint16_t timeout) { - const char * end = cmd + strlen(cmd); + const char *end = cmd + strlen(cmd); struct sdep_msg msg; if (verbose) { diff --git a/drivers/eeprom/eeprom_i2c.c b/drivers/eeprom/eeprom_i2c.c index d29aff5f85f7..8c6c16d810da 100644 --- a/drivers/eeprom/eeprom_i2c.c +++ b/drivers/eeprom/eeprom_i2c.c @@ -104,7 +104,7 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { void eeprom_write_block(const void *buf, void *addr, size_t len) { uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + EXTERNAL_EEPROM_PAGE_SIZE]; - uint8_t * read_buf = (uint8_t *)buf; + uint8_t *read_buf = (uint8_t *)buf; uintptr_t target_addr = (uintptr_t)addr; #if defined(EXTERNAL_EEPROM_WP_PIN) diff --git a/drivers/eeprom/eeprom_spi.c b/drivers/eeprom/eeprom_spi.c index 14f0afa68bec..9e85286403b3 100644 --- a/drivers/eeprom/eeprom_spi.c +++ b/drivers/eeprom/eeprom_spi.c @@ -154,7 +154,7 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { void eeprom_write_block(const void *buf, void *addr, size_t len) { bool res; - uint8_t * read_buf = (uint8_t *)buf; + uint8_t *read_buf = (uint8_t *)buf; uintptr_t target_addr = (uintptr_t)addr; while (len > 0) { diff --git a/drivers/encoder/encoder_quadrature.c b/drivers/encoder/encoder_quadrature.c index 086f500391c7..3dfdb27e8d0a 100644 --- a/drivers/encoder/encoder_quadrature.c +++ b/drivers/encoder/encoder_quadrature.c @@ -113,7 +113,7 @@ void encoder_driver_init(void) { thisCount = isLeftHand ? NUM_ENCODERS_LEFT : NUM_ENCODERS_RIGHT; thatCount = isLeftHand ? NUM_ENCODERS_RIGHT : NUM_ENCODERS_LEFT; #else // SPLIT_KEYBOARD - thisCount = NUM_ENCODERS; + thisCount = NUM_ENCODERS; #endif #ifdef ENCODER_TESTS diff --git a/drivers/flash/flash_spi.c b/drivers/flash/flash_spi.c index 7226773ff412..5816a896fe5f 100644 --- a/drivers/flash/flash_spi.c +++ b/drivers/flash/flash_spi.c @@ -291,7 +291,7 @@ flash_status_t flash_erase_block(uint32_t addr) { flash_status_t flash_read_range(uint32_t addr, void *buf, size_t len) { flash_status_t response = FLASH_STATUS_SUCCESS; - uint8_t * read_buf = (uint8_t *)buf; + uint8_t *read_buf = (uint8_t *)buf; /* Wait for the write-in-progress bit to be cleared. */ response = spi_flash_wait_while_busy(); @@ -322,7 +322,7 @@ flash_status_t flash_read_range(uint32_t addr, void *buf, size_t len) { flash_status_t flash_write_range(uint32_t addr, const void *buf, size_t len) { flash_status_t response = FLASH_STATUS_SUCCESS; - uint8_t * write_buf = (uint8_t *)buf; + uint8_t *write_buf = (uint8_t *)buf; while (len > 0) { uint32_t page_offset = addr % EXTERNAL_FLASH_PAGE_SIZE; diff --git a/drivers/haptic/solenoid.h b/drivers/haptic/solenoid.h index 17f5345bc637..3d8a4c732d2a 100644 --- a/drivers/haptic/solenoid.h +++ b/drivers/haptic/solenoid.h @@ -47,8 +47,7 @@ #ifndef SOLENOID_PINS # ifdef SOLENOID_PIN -# define SOLENOID_PINS \ - { SOLENOID_PIN } +# define SOLENOID_PINS {SOLENOID_PIN} # else # error SOLENOID_PINS array not defined # endif diff --git a/drivers/lcd/st7565.c b/drivers/lcd/st7565.c index f24bb78048cd..3ce40bc852c2 100644 --- a/drivers/lcd/st7565.c +++ b/drivers/lcd/st7565.c @@ -70,7 +70,7 @@ along with this program. If not, see . // parts of the display unusable or don't get cleared correctly // and also allows for drawing & inverting uint8_t st7565_buffer[ST7565_MATRIX_SIZE]; -uint8_t * st7565_cursor; +uint8_t *st7565_cursor; ST7565_BLOCK_TYPE st7565_dirty = 0; bool st7565_initialized = false; bool st7565_active = false; diff --git a/drivers/led/snled27351-mono.c b/drivers/led/snled27351-mono.c index d87b856db691..723e5d138eb7 100644 --- a/drivers/led/snled27351-mono.c +++ b/drivers/led/snled27351-mono.c @@ -34,8 +34,7 @@ #endif #ifndef SNLED27351_CURRENT_TUNE -# define SNLED27351_CURRENT_TUNE \ - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } +# define SNLED27351_CURRENT_TUNE {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} #endif const uint8_t i2c_addresses[SNLED27351_DRIVER_COUNT] = { diff --git a/drivers/led/snled27351.c b/drivers/led/snled27351.c index 8ebf681bdb60..f446cca97f2e 100644 --- a/drivers/led/snled27351.c +++ b/drivers/led/snled27351.c @@ -34,8 +34,7 @@ #endif #ifndef SNLED27351_CURRENT_TUNE -# define SNLED27351_CURRENT_TUNE \ - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } +# define SNLED27351_CURRENT_TUNE {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} #endif const uint8_t i2c_addresses[SNLED27351_DRIVER_COUNT] = { diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index 7e46bcb3f70f..a7a78bf3c1f2 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -146,7 +146,7 @@ along with this program. If not, see . // parts of the display unusable or don't get cleared correctly // and also allows for drawing & inverting uint8_t oled_buffer[OLED_MATRIX_SIZE]; -uint8_t * oled_cursor; +uint8_t *oled_cursor; OLED_BLOCK_TYPE oled_dirty = 0; bool oled_initialized = false; bool oled_active = false; @@ -301,24 +301,18 @@ bool oled_init(oled_rotation_t rotation) { oled_driver_init(); static const uint8_t PROGMEM display_setup1[] = { - I2C_CMD, - DISPLAY_OFF, - DISPLAY_CLOCK, - OLED_DISPLAY_CLOCK, - MULTIPLEX_RATIO, + I2C_CMD, DISPLAY_OFF, DISPLAY_CLOCK, OLED_DISPLAY_CLOCK, MULTIPLEX_RATIO, #if OLED_IC_COM_PINS_ARE_COLUMNS OLED_DISPLAY_WIDTH - 1, #else OLED_DISPLAY_HEIGHT - 1, #endif #if OLED_IC == OLED_IC_SH1107 - SH1107_DISPLAY_START_LINE, - 0x00, + SH1107_DISPLAY_START_LINE, 0x00, #else DISPLAY_START_LINE | 0x00, #endif - CHARGE_PUMP, - 0x14, + CHARGE_PUMP, 0x14, #if OLED_IC_HAS_HORIZONTAL_MODE // MEMORY_MODE is unsupported on SH1106 (Page Addressing only) MEMORY_MODE, diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index c3db7e6d977d..36fe8c195cad 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -53,12 +53,10 @@ along with this program. If not, see . // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode # ifndef OLED_SOURCE_MAP -# define OLED_SOURCE_MAP \ - { 0, 8, 16, 24, 32, 40, 48, 56 } +# define OLED_SOURCE_MAP {0, 8, 16, 24, 32, 40, 48, 56} # endif # ifndef OLED_TARGET_MAP -# define OLED_TARGET_MAP \ - { 56, 48, 40, 32, 24, 16, 8, 0 } +# define OLED_TARGET_MAP {56, 48, 40, 32, 24, 16, 8, 0} # endif // If OLED_BLOCK_TYPE is uint32_t, these tables would look like: // #define OLED_SOURCE_MAP { 32, 40, 48, 56 } @@ -97,12 +95,10 @@ along with this program. If not, see . # endif # ifndef OLED_SOURCE_MAP -# define OLED_SOURCE_MAP \ - { 0, 8, 16, 24 } +# define OLED_SOURCE_MAP {0, 8, 16, 24} # endif # ifndef OLED_TARGET_MAP -# define OLED_TARGET_MAP \ - { 24, 16, 8, 0 } +# define OLED_TARGET_MAP {24, 16, 8, 0} # endif #elif defined(OLED_DISPLAY_64X48) @@ -132,12 +128,10 @@ along with this program. If not, see . # endif # ifndef OLED_SOURCE_MAP -# define OLED_SOURCE_MAP \ - { 0, 8 } +# define OLED_SOURCE_MAP {0, 8} # endif # ifndef OLED_TARGET_MAP -# define OLED_TARGET_MAP \ - { 8, 0 } +# define OLED_TARGET_MAP {8, 0} # endif #elif defined(OLED_DISPLAY_64X128) @@ -170,12 +164,10 @@ along with this program. If not, see . # endif # ifndef OLED_SOURCE_MAP -# define OLED_SOURCE_MAP \ - { 0, 8, 16, 24, 32, 40, 48, 56 } +# define OLED_SOURCE_MAP {0, 8, 16, 24, 32, 40, 48, 56} # endif # ifndef OLED_TARGET_MAP -# define OLED_TARGET_MAP \ - { 56, 48, 40, 32, 24, 16, 8, 0 } +# define OLED_TARGET_MAP {56, 48, 40, 32, 24, 16, 8, 0} # endif #elif defined(OLED_DISPLAY_128X128) @@ -208,12 +200,10 @@ along with this program. If not, see . // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode # ifndef OLED_SOURCE_MAP -# define OLED_SOURCE_MAP \ - { 0, 8, 16, 24, 32, 40, 48, 56 } +# define OLED_SOURCE_MAP {0, 8, 16, 24, 32, 40, 48, 56} # endif # ifndef OLED_TARGET_MAP -# define OLED_TARGET_MAP \ - { 56, 48, 40, 32, 24, 16, 8, 0 } +# define OLED_TARGET_MAP {56, 48, 40, 32, 24, 16, 8, 0} # endif #else // defined(OLED_DISPLAY_128X64) // Default 128x32 @@ -242,12 +232,10 @@ along with this program. If not, see . // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode # ifndef OLED_SOURCE_MAP -# define OLED_SOURCE_MAP \ - { 0, 8, 16, 24 } +# define OLED_SOURCE_MAP {0, 8, 16, 24} # endif # ifndef OLED_TARGET_MAP -# define OLED_TARGET_MAP \ - { 24, 16, 8, 0 } +# define OLED_TARGET_MAP {24, 16, 8, 0} # endif // If OLED_BLOCK_TYPE is uint8_t, these tables would look like: // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } diff --git a/drivers/painter/comms/qp_comms_i2c.c b/drivers/painter/comms/qp_comms_i2c.c index f093c87ee46b..f4b8fd833e94 100644 --- a/drivers/painter/comms/qp_comms_i2c.c +++ b/drivers/painter/comms/qp_comms_i2c.c @@ -10,7 +10,7 @@ // Helpers static uint32_t qp_comms_i2c_send_raw(painter_device_t device, const void *data, uint32_t byte_count) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_i2c_config_t *comms_config = (qp_comms_i2c_config_t *)driver->comms_config; i2c_status_t res = i2c_transmit(comms_config->chip_address << 1, data, byte_count, I2C_TIMEOUT); if (res < 0) { diff --git a/drivers/painter/comms/qp_comms_spi.c b/drivers/painter/comms/qp_comms_spi.c index 31b68dfdf601..1ef4ea3bae4a 100644 --- a/drivers/painter/comms/qp_comms_spi.c +++ b/drivers/painter/comms/qp_comms_spi.c @@ -10,7 +10,7 @@ // Base SPI support bool qp_comms_spi_init(painter_device_t device) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_config_t *comms_config = (qp_comms_spi_config_t *)driver->comms_config; // Initialize the SPI peripheral @@ -24,7 +24,7 @@ bool qp_comms_spi_init(painter_device_t device) { } bool qp_comms_spi_start(painter_device_t device) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_config_t *comms_config = (qp_comms_spi_config_t *)driver->comms_config; return spi_start(comms_config->chip_select_pin, comms_config->lsb_first, comms_config->mode, comms_config->divisor); @@ -46,7 +46,7 @@ uint32_t qp_comms_spi_send_data(painter_device_t device, const void *data, uint3 } bool qp_comms_spi_stop(painter_device_t device) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_config_t *comms_config = (qp_comms_spi_config_t *)driver->comms_config; spi_stop(); gpio_write_pin_high(comms_config->chip_select_pin); @@ -70,7 +70,7 @@ bool qp_comms_spi_dc_reset_init(painter_device_t device) { return false; } - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; // Set up D/C as output low, if specified @@ -92,14 +92,14 @@ bool qp_comms_spi_dc_reset_init(painter_device_t device) { } uint32_t qp_comms_spi_dc_reset_send_data(painter_device_t device, const void *data, uint32_t byte_count) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; gpio_write_pin_high(comms_config->dc_pin); return qp_comms_spi_send_data(device, data, byte_count); } bool qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; gpio_write_pin_low(comms_config->dc_pin); spi_write(cmd); @@ -107,7 +107,7 @@ bool qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd) { } bool qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; for (size_t i = 0; i < sequence_len;) { uint8_t command = sequence[i]; diff --git a/drivers/painter/generic/qp_surface_common.c b/drivers/painter/generic/qp_surface_common.c index 2da96c73ac77..5eb84616e6c1 100644 --- a/drivers/painter/generic/qp_surface_common.c +++ b/drivers/painter/generic/qp_surface_common.c @@ -53,7 +53,7 @@ void qp_surface_update_dirty(surface_dirty_data_t *dirty, uint16_t x, uint16_t y // Driver vtable bool qp_surface_init(painter_device_t device, painter_rotation_t rotation) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; surface_painter_device_t *surface = (surface_painter_device_t *)driver; memset(surface->buffer, 0, SURFACE_REQUIRED_BUFFER_BYTE_SIZE(driver->panel_width, driver->panel_height, driver->native_bits_per_pixel)); @@ -78,7 +78,7 @@ bool qp_surface_clear(painter_device_t device) { } bool qp_surface_flush(painter_device_t device) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; surface_painter_device_t *surface = (surface_painter_device_t *)driver; surface->dirty.l = surface->dirty.t = UINT16_MAX; surface->dirty.r = surface->dirty.b = 0; @@ -87,7 +87,7 @@ bool qp_surface_flush(painter_device_t device) { } bool qp_surface_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; surface_painter_device_t *surface = (surface_painter_device_t *)driver; // Set the viewport locations @@ -106,9 +106,9 @@ bool qp_surface_viewport(painter_device_t device, uint16_t left, uint16_t top, u // Drawing routine to copy out the dirty region and send it to another device bool qp_surface_draw(painter_device_t surface, painter_device_t target, uint16_t x, uint16_t y, bool entire_surface) { - painter_driver_t * surface_driver = (painter_driver_t *)surface; + painter_driver_t *surface_driver = (painter_driver_t *)surface; surface_painter_device_t *surface_handle = (surface_painter_device_t *)surface_driver; - painter_driver_t * target_driver = (painter_driver_t *)target; + painter_driver_t *target_driver = (painter_driver_t *)target; // If we're not dirty... we're done. if (!surface_handle->dirty.is_dirty) { diff --git a/drivers/painter/generic/qp_surface_internal.h b/drivers/painter/generic/qp_surface_internal.h index 71f82e924d14..89cab11b0d7d 100644 --- a/drivers/painter/generic/qp_surface_internal.h +++ b/drivers/painter/generic/qp_surface_internal.h @@ -42,8 +42,8 @@ typedef struct surface_painter_device_t { // The target buffer union { - void * buffer; - uint8_t * u8buffer; + void *buffer; + uint8_t *u8buffer; uint16_t *u16buffer; }; diff --git a/drivers/painter/generic/qp_surface_mono1bpp.c b/drivers/painter/generic/qp_surface_mono1bpp.c index c66b56519da4..e8011163e422 100644 --- a/drivers/painter/generic/qp_surface_mono1bpp.c +++ b/drivers/painter/generic/qp_surface_mono1bpp.c @@ -55,7 +55,7 @@ static inline void stream_pixdata_mono1bpp(surface_painter_device_t *surface, co // Stream pixel data to the current write position in GRAM static bool qp_surface_pixdata_mono1bpp(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; surface_painter_device_t *surface = (surface_painter_device_t *)driver; stream_pixdata_mono1bpp(surface, (const uint8_t *)pixel_data, native_pixel_count); return true; diff --git a/drivers/painter/generic/qp_surface_rgb565.c b/drivers/painter/generic/qp_surface_rgb565.c index c5b351311a06..b81b0c43bc6f 100644 --- a/drivers/painter/generic/qp_surface_rgb565.c +++ b/drivers/painter/generic/qp_surface_rgb565.c @@ -43,7 +43,7 @@ static inline void stream_pixdata_rgb565(surface_painter_device_t *surface, cons // Stream pixel data to the current write position in GRAM static bool qp_surface_pixdata_rgb565(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; surface_painter_device_t *surface = (surface_painter_device_t *)driver; stream_pixdata_rgb565(surface, (const uint16_t *)pixel_data, native_pixel_count); return true; diff --git a/drivers/painter/ili9xxx/qp_ili9486.c b/drivers/painter/ili9xxx/qp_ili9486.c index df2d084aa3a5..d1e5e12288c6 100644 --- a/drivers/painter/ili9xxx/qp_ili9486.c +++ b/drivers/painter/ili9xxx/qp_ili9486.c @@ -72,7 +72,7 @@ bool qp_ili9486_init(painter_device_t device, painter_rotation_t rotation) { // waveshare variant needs some tweaks due to shift registers static bool qp_comms_spi_dc_reset_send_command_odd_cs_pulse(painter_device_t device, uint8_t cmd) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; gpio_write_pin_low(comms_config->spi_config.chip_select_pin); @@ -83,7 +83,7 @@ static bool qp_comms_spi_dc_reset_send_command_odd_cs_pulse(painter_device_t dev } static uint32_t qp_comms_spi_send_data_odd_cs_pulse(painter_device_t device, const void *data, uint32_t byte_count) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; uint32_t bytes_remaining = byte_count; @@ -113,7 +113,7 @@ static uint32_t qp_comms_spi_send_data_odd_cs_pulse(painter_device_t device, con } static uint32_t qp_ili9486_send_data_toggling(painter_device_t device, const uint8_t *data, uint32_t byte_count) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config; uint32_t ret; @@ -147,7 +147,7 @@ static bool qp_comms_spi_send_command_sequence_odd_cs_pulse(painter_device_t dev } static bool qp_ili9486_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; tft_panel_dc_reset_painter_driver_vtable_t *vtable = (tft_panel_dc_reset_painter_driver_vtable_t *)driver->driver_vtable; // Fix up the drawing location if required diff --git a/drivers/painter/ld7032/qp_ld7032.c b/drivers/painter/ld7032/qp_ld7032.c index d73430cc75fb..e0f3af5efb2e 100644 --- a/drivers/painter/ld7032/qp_ld7032.c +++ b/drivers/painter/ld7032/qp_ld7032.c @@ -62,7 +62,7 @@ uint32_t ld7032_comms_i2c_send_command_and_databuf(painter_device_t device, uint // Power control bool qp_ld7032_power(painter_device_t device, bool power_on) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)driver->comms_vtable; comms_vtable->send_command_data(device, LD7032_DISP_ON_OFF, power_on ? 0x01 : 0x00); @@ -83,7 +83,7 @@ bool qp_ld7032_clear(painter_device_t device) { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void ld7032_flush_0(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer, bool inverted) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)driver->comms_vtable; int x_start = dirty->l >> 3; @@ -115,7 +115,7 @@ void ld7032_flush_0(painter_device_t device, surface_dirty_data_t *dirty, const } void ld7032_flush_90(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer, bool inverted) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)driver->comms_vtable; int x_start = dirty->t >> 3; @@ -252,7 +252,7 @@ __attribute__((weak)) bool qp_ld7032_init(painter_device_t device, painter_rotat break; } - painter_driver_t * pdriver = (painter_driver_t *)device; + painter_driver_t *pdriver = (painter_driver_t *)device; ld7032_comms_with_command_vtable_t *comms_vtable = (ld7032_comms_with_command_vtable_t *)pdriver->comms_vtable; if (!comms_vtable->send_command_data(device, LD7032_WRITE_DIRECTION, write_direction)) { diff --git a/drivers/painter/oled_panel/qp_oled_panel.c b/drivers/painter/oled_panel/qp_oled_panel.c index eefee3f13f5c..4fd2c5bd800b 100644 --- a/drivers/painter/oled_panel/qp_oled_panel.c +++ b/drivers/painter/oled_panel/qp_oled_panel.c @@ -12,7 +12,7 @@ // Power control bool qp_oled_panel_power(painter_device_t device, bool power_on) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; qp_comms_command(device, power_on ? vtable->opcodes.display_on : vtable->opcodes.display_off); return true; @@ -59,7 +59,7 @@ bool qp_oled_panel_passthru_append_pixdata(painter_device_t device, uint8_t *tar //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void qp_oled_panel_page_column_flush_rot0(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; // TODO: account for offset_x/y in base driver @@ -92,7 +92,7 @@ void qp_oled_panel_page_column_flush_rot0(painter_device_t device, surface_dirty } void qp_oled_panel_page_column_flush_rot90(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; // TODO: account for offset_x/y in base driver @@ -126,7 +126,7 @@ void qp_oled_panel_page_column_flush_rot90(painter_device_t device, surface_dirt } void qp_oled_panel_page_column_flush_rot180(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; // TODO: account for offset_x/y in base driver @@ -161,7 +161,7 @@ void qp_oled_panel_page_column_flush_rot180(painter_device_t device, surface_dir } void qp_oled_panel_page_column_flush_rot270(painter_device_t device, surface_dirty_data_t *dirty, const uint8_t *framebuffer) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; oled_panel_painter_driver_vtable_t *vtable = (oled_panel_painter_driver_vtable_t *)driver->driver_vtable; // TODO: account for offset_x/y in base driver diff --git a/drivers/painter/tft_panel/qp_tft_panel.c b/drivers/painter/tft_panel/qp_tft_panel.c index c8e33343d444..af9e3e6465f0 100644 --- a/drivers/painter/tft_panel/qp_tft_panel.c +++ b/drivers/painter/tft_panel/qp_tft_panel.c @@ -12,7 +12,7 @@ // Power control bool qp_tft_panel_power(painter_device_t device, bool power_on) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; tft_panel_dc_reset_painter_driver_vtable_t *vtable = (tft_panel_dc_reset_painter_driver_vtable_t *)driver->driver_vtable; qp_comms_command(device, power_on ? vtable->opcodes.display_on : vtable->opcodes.display_off); return true; @@ -33,7 +33,7 @@ bool qp_tft_panel_flush(painter_device_t device) { // Viewport to draw to bool qp_tft_panel_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; tft_panel_dc_reset_painter_driver_vtable_t *vtable = (tft_panel_dc_reset_painter_driver_vtable_t *)driver->driver_vtable; // Fix up the drawing location if required diff --git a/drivers/ps2/ps2_mouse.c b/drivers/ps2/ps2_mouse.c index ef1a0e26f9e9..a51b86598e28 100644 --- a/drivers/ps2/ps2_mouse.c +++ b/drivers/ps2/ps2_mouse.c @@ -97,7 +97,7 @@ void ps2_mouse_task(void) { mouse_report.x = ps2_host_recv_response(); mouse_report.y = ps2_host_recv_response(); # ifdef PS2_MOUSE_ENABLE_SCROLLING - mouse_report.v = -(ps2_host_recv_response() & PS2_MOUSE_SCROLL_MASK); + mouse_report.v = -(ps2_host_recv_response() & PS2_MOUSE_SCROLL_MASK); # endif } else { if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n"); diff --git a/drivers/sensors/cirque_pinnacle.c b/drivers/sensors/cirque_pinnacle.c index 45072ae87434..113f1231e38a 100644 --- a/drivers/sensors/cirque_pinnacle.c +++ b/drivers/sensors/cirque_pinnacle.c @@ -477,9 +477,9 @@ report_mouse_t cirque_pinnacle_get_report(report_mouse_t mouse_report) { if (touchData.valid) { mouse_report.buttons = touchData.buttons; - mouse_report.x = CONSTRAIN_HID_XY(touchData.xDelta); - mouse_report.y = CONSTRAIN_HID_XY(touchData.yDelta); - mouse_report.v = touchData.wheelCount; + mouse_report.x = CONSTRAIN_HID_XY(touchData.xDelta); + mouse_report.y = CONSTRAIN_HID_XY(touchData.yDelta); + mouse_report.v = touchData.wheelCount; } return mouse_report; } diff --git a/drivers/sensors/pmw33xx_common.h b/drivers/sensors/pmw33xx_common.h index ff890f49a9d9..9433c7811fb8 100644 --- a/drivers/sensors/pmw33xx_common.h +++ b/drivers/sensors/pmw33xx_common.h @@ -72,14 +72,12 @@ STATIC_ASSERT(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.motio # ifndef PMW33XX_CS_PIN # ifdef POINTING_DEVICE_CS_PIN # define PMW33XX_CS_PIN POINTING_DEVICE_CS_PIN -# define PMW33XX_CS_PINS \ - { PMW33XX_CS_PIN } +# define PMW33XX_CS_PINS {PMW33XX_CS_PIN} # else # error "No chip select pin defined -- missing PMW33XX_CS_PIN or PMW33XX_CS_PINS" # endif # else -# define PMW33XX_CS_PINS \ - { PMW33XX_CS_PIN } +# define PMW33XX_CS_PINS {PMW33XX_CS_PIN} # endif #endif @@ -88,8 +86,7 @@ STATIC_ASSERT(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.motio # if !defined(PMW33XX_CS_PIN_RIGHT) # define PMW33XX_CS_PIN_RIGHT PMW33XX_CS_PIN # endif -# define PMW33XX_CS_PINS_RIGHT \ - { PMW33XX_CS_PIN_RIGHT } +# define PMW33XX_CS_PINS_RIGHT {PMW33XX_CS_PIN_RIGHT} #endif // Defines so the old variable names are swapped by the appropiate value on each half diff --git a/platforms/avr/drivers/analog.c b/platforms/avr/drivers/analog.c index a68c6a371d7b..b2cb97223c77 100644 --- a/platforms/avr/drivers/analog.c +++ b/platforms/avr/drivers/analog.c @@ -96,7 +96,7 @@ int16_t adc_read(uint8_t mux) { #if defined(MUX4) ADMUX = aref | (mux & (_BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0))); #else - ADMUX = aref | (mux & (_BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0))); + ADMUX = aref | (mux & (_BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0))); #endif // Start the conversion diff --git a/platforms/avr/drivers/ws2812_bitbang.c b/platforms/avr/drivers/ws2812_bitbang.c index 183690c96744..c4a854d9ee18 100644 --- a/platforms/avr/drivers/ws2812_bitbang.c +++ b/platforms/avr/drivers/ws2812_bitbang.c @@ -26,7 +26,7 @@ #include "ws2812.h" #include "pin_defs.h" -#define pinmask(pin) (_BV((pin)&0xF)) +#define pinmask(pin) (_BV((pin) & 0xF)) /* This routine writes an array of bytes with RGB values to the Dataout pin @@ -105,7 +105,7 @@ static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t w_nop8 #endif #if (w1_nops & 16) - w_nop16 + w_nop16 #endif " sbrs %1,7 \n\t" // '1' [03] '0' [02] " out %2,%4 \n\t" // '1' [--] '0' [03] - fe-low @@ -123,7 +123,7 @@ static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t w_nop8 #endif #if (w2_nops & 16) - w_nop16 + w_nop16 #endif " out %2,%4 \n\t" // '1' [+1] '0' [+1] - fe-high #if (w3_nops & 1) @@ -139,7 +139,7 @@ static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t w_nop8 #endif #if (w3_nops & 16) - w_nop16 + w_nop16 #endif " dec %0 \n\t" // '1' [+2] '0' [+2] @@ -173,7 +173,7 @@ void ws2812_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { } void ws2812_flush(void) { - uint8_t masklo = ~(pinmask(WS2812_DI_PIN)) & PORTx_ADDRESS(WS2812_DI_PIN); + uint8_t masklo = ~(pinmask(WS2812_DI_PIN))&PORTx_ADDRESS(WS2812_DI_PIN); uint8_t maskhi = pinmask(WS2812_DI_PIN) | PORTx_ADDRESS(WS2812_DI_PIN); ws2812_sendarray_mask((uint8_t *)ws2812_leds, WS2812_LED_COUNT * sizeof(ws2812_led_t), masklo, maskhi); diff --git a/platforms/avr/gpio.h b/platforms/avr/gpio.h index 4c096197726b..9b5b3edc68ee 100644 --- a/platforms/avr/gpio.h +++ b/platforms/avr/gpio.h @@ -24,17 +24,17 @@ typedef uint8_t pin_t; /* Operation of GPIO by pin. */ -#define gpio_set_pin_input(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF)) -#define gpio_set_pin_input_high(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) +#define gpio_set_pin_input(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin) & 0xF), PORTx_ADDRESS(pin) &= ~_BV((pin) & 0xF)) +#define gpio_set_pin_input_high(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin) & 0xF), PORTx_ADDRESS(pin) |= _BV((pin) & 0xF)) #define gpio_set_pin_input_low(pin) STATIC_ASSERT(0, "GPIO pulldowns in input mode are not available on AVR") -#define gpio_set_pin_output_push_pull(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF)) +#define gpio_set_pin_output_push_pull(pin) (DDRx_ADDRESS(pin) |= _BV((pin) & 0xF)) #define gpio_set_pin_output_open_drain(pin) STATIC_ASSERT(0, "Open-drain outputs are not available on AVR") #define gpio_set_pin_output(pin) gpio_set_pin_output_push_pull(pin) -#define gpio_write_pin_high(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) -#define gpio_write_pin_low(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF)) +#define gpio_write_pin_high(pin) (PORTx_ADDRESS(pin) |= _BV((pin) & 0xF)) +#define gpio_write_pin_low(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin) & 0xF)) #define gpio_write_pin(pin, level) ((level) ? gpio_write_pin_high(pin) : gpio_write_pin_low(pin)) -#define gpio_read_pin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF))) +#define gpio_read_pin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin) & 0xF))) -#define gpio_toggle_pin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin)&0xF)) +#define gpio_toggle_pin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin) & 0xF)) diff --git a/platforms/avr/hardware_id.c b/platforms/avr/hardware_id.c index 302a800e0bb2..9fb2aaed681e 100644 --- a/platforms/avr/hardware_id.c +++ b/platforms/avr/hardware_id.c @@ -13,7 +13,7 @@ __attribute__((weak)) hardware_id_t get_hardware_id(void) { hardware_id_t id = {0}; for (uint8_t i = 0; i < 10; i += 1) { - ((uint8_t*)&id)[i] = boot_signature_byte_get(i + 0x0E); + ((uint8_t *)&id)[i] = boot_signature_byte_get(i + 0x0E); } return id; } diff --git a/platforms/chibios/bootloaders/rp2040.c b/platforms/chibios/bootloaders/rp2040.c index 524d13e636f0..2e991625c9c1 100644 --- a/platforms/chibios/bootloaders/rp2040.c +++ b/platforms/chibios/bootloaders/rp2040.c @@ -30,7 +30,7 @@ void enter_bootloader_mode_if_requested(void) {} // Needs to be located in a RAM section that is never initialized on boot to // preserve its value on reset static volatile uint32_t __attribute__((section(".ram0.bootloader_magic"))) magic_location; -const uint32_t magic_token = 0xCAFEB0BA; +const uint32_t magic_token = 0xCAFEB0BA; // We can not use the __early_init / enter_bootloader_mode_if_requested hook as // we depend on an already initialized system with usable memory regions and diff --git a/platforms/chibios/drivers/analog.c b/platforms/chibios/drivers/analog.c index a916cc9a1d24..93005c2555ee 100644 --- a/platforms/chibios/drivers/analog.c +++ b/platforms/chibios/drivers/analog.c @@ -145,7 +145,7 @@ static ADCConversionGroup adcConversionGroup = { .smpr = ADC_SAMPLING_RATE, #elif defined(USE_ADCV2) # if !defined(STM32F1XX) && !defined(GD32VF103) && !defined(WB32F3G71xx) && !defined(WB32FQ95xx) && !defined(AT32F415) - .cr2 = ADC_CR2_SWSTART, // F103 seem very unhappy with, F401 seems very unhappy without... + .cr2 = ADC_CR2_SWSTART, // F103 seem very unhappy with, F401 seems very unhappy without... # endif # if defined(AT32F415) .spt2 = ADC_SPT2_CSPT_AN0(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN1(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN2(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN3(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN4(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN5(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN6(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN7(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN8(ADC_SAMPLING_RATE) | ADC_SPT2_CSPT_AN9(ADC_SAMPLING_RATE), diff --git a/platforms/chibios/drivers/audio_dac_basic.c b/platforms/chibios/drivers/audio_dac_basic.c index 99b938e610af..053584ec8759 100644 --- a/platforms/chibios/drivers/audio_dac_basic.c +++ b/platforms/chibios/drivers/audio_dac_basic.c @@ -77,9 +77,9 @@ GPTConfig gpt7cfg1 = {.frequency = AUDIO_DAC_SAMPLE_RATE, static void gpt_audio_state_cb(GPTDriver *gptp); GPTConfig gptStateUpdateCfg = {.frequency = 10, - .callback = gpt_audio_state_cb, - .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */ - .dier = 0U}; + .callback = gpt_audio_state_cb, + .cr2 = TIM_CR2_MMS_1, /* MMS = 010 = TRGO on Update Event. */ + .dier = 0U}; static const DACConfig dac_conf_ch1 = {.init = AUDIO_DAC_OFF_VALUE, .datamode = DAC_DHRM_12BIT_RIGHT}; static const DACConfig dac_conf_ch2 = {.init = AUDIO_DAC_OFF_VALUE, .datamode = DAC_DHRM_12BIT_RIGHT}; diff --git a/platforms/chibios/drivers/audio_pwm_software.c b/platforms/chibios/drivers/audio_pwm_software.c index f48323900b40..015bdbee1af3 100644 --- a/platforms/chibios/drivers/audio_pwm_software.c +++ b/platforms/chibios/drivers/audio_pwm_software.c @@ -63,8 +63,8 @@ void channel_1_set_frequency(float freq) { pwmChangePeriod(&AUDIO_PWM_DRIVER, period); pwmEnableChannel(&AUDIO_PWM_DRIVER, AUDIO_PWM_CHANNEL - 1, - // adjust the duty-cycle so that the output is for 'note_timbre' duration HIGH - PWM_PERCENTAGE_TO_WIDTH(&AUDIO_PWM_DRIVER, (100 - note_timbre) * 100)); + // adjust the duty-cycle so that the output is for 'note_timbre' duration HIGH + PWM_PERCENTAGE_TO_WIDTH(&AUDIO_PWM_DRIVER, (100 - note_timbre) * 100)); } float channel_1_get_frequency(void) { @@ -117,8 +117,8 @@ GPTConfig gptCFG = { and the .interval counts from 64 downwards - audio_update_state is called just often enough to not miss anything */ - .frequency = 60 * 64, - .callback = gpt_callback, + .frequency = 60 * 64, + .callback = gpt_callback, }; void audio_driver_initialize_impl(void) { diff --git a/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c b/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c index 9cf956b2f78e..9edbc1d2ed36 100644 --- a/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c +++ b/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c @@ -482,7 +482,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) { void eeprom_read_block(void *buf, const void *addr, size_t len) { const uint8_t *p = (const uint8_t *)addr; - uint8_t * dest = (uint8_t *)buf; + uint8_t *dest = (uint8_t *)buf; while (len--) { *dest++ = eeprom_read_byte(p++); } @@ -507,7 +507,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) { } void eeprom_write_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; + uint8_t *p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { eeprom_write_byte(p++, *src++); @@ -538,7 +538,7 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) { } void eeprom_update_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; + uint8_t *p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { eeprom_write_byte(p++, *src++); diff --git a/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c b/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c index 9857ac046bde..cf6b85fd1288 100644 --- a/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c +++ b/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c @@ -577,7 +577,7 @@ void eeprom_driver_erase(void) { void eeprom_read_block(void *buf, const void *addr, size_t len) { const uint8_t *src = (const uint8_t *)addr; - uint8_t * dest = (uint8_t *)buf; + uint8_t *dest = (uint8_t *)buf; /* Check word alignment */ if (len && (uintptr_t)src % 2) { @@ -606,7 +606,7 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { } void eeprom_write_block(const void *buf, void *addr, size_t len) { - uint8_t * dest = (uint8_t *)addr; + uint8_t *dest = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; /* Check word alignment */ diff --git a/platforms/chibios/drivers/flash/legacy_flash_ops.c b/platforms/chibios/drivers/flash/legacy_flash_ops.c index fe5ad64764f4..ca3fbdd74090 100644 --- a/platforms/chibios/drivers/flash/legacy_flash_ops.c +++ b/platforms/chibios/drivers/flash/legacy_flash_ops.c @@ -171,7 +171,7 @@ FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) { FLASH->CR |= FLASH_CR_PSIZE_0; #endif FLASH->CR |= FLASH_CR_PG; - *(__IO uint16_t*)Address = Data; + *(__IO uint16_t *)Address = Data; /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(ProgramTimeout); if (status != FLASH_TIMEOUT) { diff --git a/platforms/chibios/drivers/serial_usart.c b/platforms/chibios/drivers/serial_usart.c index becf3afbce1e..0d3d01042f00 100644 --- a/platforms/chibios/drivers/serial_usart.c +++ b/platforms/chibios/drivers/serial_usart.c @@ -27,12 +27,12 @@ static QMKSerialConfig serial_config = { # else .baud = (SERIAL_USART_SPEED), # endif - .cr1 = (SERIAL_USART_CR1), - .cr2 = (SERIAL_USART_CR2), + .cr1 = (SERIAL_USART_CR1), + .cr2 = (SERIAL_USART_CR2), # if !defined(SERIAL_USART_FULL_DUPLEX) - .cr3 = ((SERIAL_USART_CR3) | USART_CR3_HDSEL) /* activate half-duplex mode */ + .cr3 = ((SERIAL_USART_CR3) | USART_CR3_HDSEL) /* activate half-duplex mode */ # else - .cr3 = (SERIAL_USART_CR3) + .cr3 = (SERIAL_USART_CR3) # endif }; #elif defined(MCU_RP) /* Raspberry Pi MCUs */ diff --git a/platforms/chibios/drivers/uart_sio.c b/platforms/chibios/drivers/uart_sio.c index fc12f0abed98..dcf0cef20f39 100644 --- a/platforms/chibios/drivers/uart_sio.c +++ b/platforms/chibios/drivers/uart_sio.c @@ -82,13 +82,13 @@ static SIOConfig sioConfig = { }; #else static SIOConfig sioConfig = { - .baud = SIO_DEFAULT_BITRATE, + .baud = SIO_DEFAULT_BITRATE, # if defined(MCU_STM32) && defined(USE_USARTV3) .presc = USART_PRESC1, # endif - .cr1 = UART_CR1, - .cr2 = UART_CR2, - .cr3 = UART_CR3, + .cr1 = UART_CR1, + .cr2 = UART_CR2, + .cr3 = UART_CR3, }; #endif diff --git a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c index fec4646a5b47..2328ea067407 100644 --- a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c +++ b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c @@ -20,7 +20,7 @@ static flash_sector_t first_sector = UINT16_MAX; #endif // WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT static flash_sector_t sector_count = UINT16_MAX; -static BaseFlash * flash; +static BaseFlash *flash; static bool flash_erased_is_one; static volatile bool is_issuing_read = false; static volatile bool ecc_error_occurred = false; diff --git a/platforms/chibios/drivers/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c index 50927b849a41..0fc20b3f277d 100644 --- a/platforms/chibios/drivers/ws2812_pwm.c +++ b/platforms/chibios/drivers/ws2812_pwm.c @@ -310,7 +310,7 @@ void ws2812_init(void) { palSetLineMode(WS2812_DI_PIN, WS2812_OUTPUT_MODE); // PWM Configuration - //#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config + // #pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config static const PWMConfig ws2812_pwm_config = { .frequency = WS2812_PWM_TICK_FREQUENCY, .period = WS2812_PWM_PERIOD, // Mit dieser Periode wird UDE-Event erzeugt und ein neuer Wert (Länge WS2812_BIT_N) vom DMA ins CCR geschrieben @@ -328,7 +328,7 @@ void ws2812_init(void) { .dier = TIM_DIER_UDE, // DMA on update event for next period #endif }; - //#pragma GCC diagnostic pop // Restore command-line warning options + // #pragma GCC diagnostic pop // Restore command-line warning options // Configure DMA // dmaInit(); // Joe added this diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c index d1792b871bf0..4ae97aa1c920 100644 --- a/platforms/chibios/drivers/ws2812_spi.c +++ b/platforms/chibios/drivers/ws2812_spi.c @@ -188,8 +188,7 @@ void ws2812_init(void) { 0, WS2812_SPI_DIVISOR # else - WS2812_SPI_DIVISOR_CR1_BR_X, - 0 + WS2812_SPI_DIVISOR_CR1_BR_X, 0 # endif #else // HAL_SPI_V2 diff --git a/platforms/progmem.h b/platforms/progmem.h index 6c4ebcaa01db..395aa143095d 100644 --- a/platforms/progmem.h +++ b/platforms/progmem.h @@ -6,13 +6,13 @@ # include # define PROGMEM # define PSTR(x) x -# define PGM_P const char* +# define PGM_P const char * # define memcmp_P(s1, s2, n) memcmp(s1, s2, n) # define memcpy_P(dest, src, n) memcpy(dest, src, n) -# define pgm_read_byte(address_short) *((uint8_t*)(address_short)) -# define pgm_read_word(address_short) *((uint16_t*)(address_short)) -# define pgm_read_dword(address_short) *((uint32_t*)(address_short)) -# define pgm_read_ptr(address_short) *((void**)(address_short)) +# define pgm_read_byte(address_short) *((uint8_t *)(address_short)) +# define pgm_read_word(address_short) *((uint16_t *)(address_short)) +# define pgm_read_dword(address_short) *((uint32_t *)(address_short)) +# define pgm_read_ptr(address_short) *((void **)(address_short)) # define strcmp_P(s1, s2) strcmp(s1, s2) # define strcpy_P(dest, src) strcpy(dest, src) # define strlen_P(src) strlen(src) diff --git a/platforms/synchronization_util.h b/platforms/synchronization_util.h index 4969eff478ea..f4f77fd2dbf0 100644 --- a/platforms/synchronization_util.h +++ b/platforms/synchronization_util.h @@ -10,8 +10,8 @@ void split_shared_memory_unlock(void); # endif #else # if defined(SPLIT_KEYBOARD) -inline void split_shared_memory_lock(void){}; -inline void split_shared_memory_unlock(void){}; +inline void split_shared_memory_lock(void) {}; +inline void split_shared_memory_unlock(void) {}; # endif #endif diff --git a/platforms/test/eeprom.c b/platforms/test/eeprom.c index d501745e5579..193a3bb4cee1 100644 --- a/platforms/test/eeprom.c +++ b/platforms/test/eeprom.c @@ -40,7 +40,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) { void eeprom_read_block(void *buf, const void *addr, size_t len) { const uint8_t *p = (const uint8_t *)addr; - uint8_t * dest = (uint8_t *)buf; + uint8_t *dest = (uint8_t *)buf; while (len--) { *dest++ = eeprom_read_byte(p++); } @@ -61,7 +61,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) { } void eeprom_write_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; + uint8_t *p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { eeprom_write_byte(p++, *src++); @@ -87,7 +87,7 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) { } void eeprom_update_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; + uint8_t *p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { eeprom_write_byte(p++, *src++); diff --git a/platforms/test/eeprom_legacy_emulated_flash_tests.cpp b/platforms/test/eeprom_legacy_emulated_flash_tests.cpp index d2c41fb77dfb..41b27b621dff 100644 --- a/platforms/test/eeprom_legacy_emulated_flash_tests.cpp +++ b/platforms/test/eeprom_legacy_emulated_flash_tests.cpp @@ -52,7 +52,7 @@ extern "C" { #define BYTE_VALUE(addr, value) (((addr) << 8) | (value)) #define WORD_ZERO(addr) (0x8000 | ((addr) >> 1)) #define WORD_ONE(addr) (0xA000 | ((addr) >> 1)) -#define WORD_NEXT(addr) (0xE000 | (((addr)-0x80) >> 1)) +#define WORD_NEXT(addr) (0xE000 | (((addr) - 0x80) >> 1)) class EepromStm32Test : public testing::Test { public: diff --git a/platforms/test/legacy_flash_ops_mock.c b/platforms/test/legacy_flash_ops_mock.c index b9d805cb47c8..355cdf2b4cb3 100644 --- a/platforms/test/legacy_flash_ops_mock.c +++ b/platforms/test/legacy_flash_ops_mock.c @@ -35,9 +35,9 @@ FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) { if (flash_locked) return FLASH_ERROR_WRP; Address -= (uintptr_t)FlashBuf; if (Address >= MOCK_FLASH_SIZE) return FLASH_BAD_ADDRESS; - uint16_t oldData = *(uint16_t*)&FlashBuf[Address]; + uint16_t oldData = *(uint16_t *)&FlashBuf[Address]; if (oldData == 0xFFFF || Data == 0) { - *(uint16_t*)&FlashBuf[Address] = Data; + *(uint16_t *)&FlashBuf[Address] = Data; return FLASH_COMPLETE; } else { return FLASH_ERROR_PG; diff --git a/quantum/action_code.h b/quantum/action_code.h index d9a575b51838..f268bc4ea439 100644 --- a/quantum/action_code.h +++ b/quantum/action_code.h @@ -167,11 +167,11 @@ enum mods_codes { MODS_TAP_TOGGLE = 0x01, }; #define ACTION_KEY(key) ACTION(ACT_MODS, (key)) -#define ACTION_MODS(mods) ACTION(ACT_MODS, ((mods)&0x1f) << 8 | 0) -#define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, ((mods)&0x1f) << 8 | (key)) -#define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, ((mods)&0x1f) << 8 | (key)) -#define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f) << 8 | MODS_ONESHOT) -#define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f) << 8 | MODS_TAP_TOGGLE) +#define ACTION_MODS(mods) ACTION(ACT_MODS, ((mods) & 0x1f) << 8 | 0) +#define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, ((mods) & 0x1f) << 8 | (key)) +#define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, ((mods) & 0x1f) << 8 | (key)) +#define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, ((mods) & 0x1f) << 8 | MODS_ONESHOT) +#define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods) & 0x1f) << 8 | MODS_TAP_TOGGLE) /** \brief Other Keys */ @@ -210,7 +210,7 @@ enum layer_param_tap_op { OP_SET_CLEAR, OP_ONESHOT, }; -#define ACTION_LAYER_BITOP(op, part, bits, on) ACTION(ACT_LAYER, (op) << 10 | (on) << 8 | (part) << 5 | ((bits)&0x1f)) +#define ACTION_LAYER_BITOP(op, part, bits, on) ACTION(ACT_LAYER, (op) << 10 | (on) << 8 | (part) << 5 | ((bits) & 0x1f)) #define ACTION_LAYER_TAP(layer, key) ACTION(ACT_LAYER_TAP, (layer) << 8 | (key)) /* Default Layer */ #define ACTION_DEFAULT_LAYER_SET(layer) ACTION_DEFAULT_LAYER_BIT_SET((layer) / 4, 1 << ((layer) % 4)) diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index b105cd60a916..9e48fc9d6cb4 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -444,28 +444,28 @@ bool process_tapping(keyrecord_t *keyp) { && !(MAYBE_RETRO_SHIFTING(event, keyp) && get_auto_shifted_key(get_record_keycode(keyp, false), keyp)) # endif ) { - // Settle the tapping key as *held*, since - // HOLD_ON_OTHER_KEY_PRESS is enabled for this key. - ac_dprintf("Tapping: End. No tap. Interfered by pressed key\n"); - process_record(&tapping_key); + // Settle the tapping key as *held*, since + // HOLD_ON_OTHER_KEY_PRESS is enabled for this key. + ac_dprintf("Tapping: End. No tap. Interfered by pressed key\n"); + process_record(&tapping_key); # if defined(CHORDAL_HOLD) - if (waiting_buffer_tail != waiting_buffer_head && is_tap_record(&waiting_buffer[waiting_buffer_tail])) { - tapping_key = waiting_buffer[waiting_buffer_tail]; - // Pop tail from the queue. - waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE; - debug_waiting_buffer(); - } else + if (waiting_buffer_tail != waiting_buffer_head && is_tap_record(&waiting_buffer[waiting_buffer_tail])) { + tapping_key = waiting_buffer[waiting_buffer_tail]; + // Pop tail from the queue. + waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE; + debug_waiting_buffer(); + } else # endif // CHORDAL_HOLD - { - tapping_key = (keyrecord_t){0}; - } - debug_tapping_key(); + { + tapping_key = (keyrecord_t){0}; + } + debug_tapping_key(); # if defined(CHORDAL_HOLD) - waiting_buffer_process_regular(); + waiting_buffer_process_regular(); # endif // CHORDAL_HOLD - } + } } // enqueue return false; @@ -775,7 +775,7 @@ static uint8_t waiting_buffer_find_chordal_hold_tap(void) { uint16_t prev_keycode = get_record_keycode(&tapping_key, false); uint8_t first_tap = WAITING_BUFFER_SIZE; for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { - keyrecord_t * cur = &waiting_buffer[i]; + keyrecord_t *cur = &waiting_buffer[i]; const uint16_t cur_keycode = get_record_keycode(cur, false); if (!cur->event.pressed || !is_mt_or_lt(prev_keycode)) { break; diff --git a/quantum/action_util.h b/quantum/action_util.h index d2ecb145bed8..12192ebe37e8 100644 --- a/quantum/action_util.h +++ b/quantum/action_util.h @@ -114,8 +114,7 @@ void clear_oneshot_swaphands(void); void neutralize_flashing_modifiers(uint8_t active_mods); #endif #ifndef MODS_TO_NEUTRALIZE -# define MODS_TO_NEUTRALIZE \ - { MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI) } +# define MODS_TO_NEUTRALIZE {MOD_BIT(KC_LEFT_ALT), MOD_BIT(KC_LEFT_GUI)} #endif #ifdef __cplusplus diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index ddd7d374f576..6b1717f35d57 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -21,12 +21,10 @@ // in beats-per-minute #endif -#define SONG(notes...) \ - { notes } +#define SONG(notes...) {notes} // Note Types -#define MUSICAL_NOTE(note, duration) \ - { (NOTE##note), duration } +#define MUSICAL_NOTE(note, duration) {(NOTE##note), duration} #define BREVE_NOTE(note) MUSICAL_NOTE(note, 128) #define WHOLE_NOTE(note) MUSICAL_NOTE(note, 64) diff --git a/quantum/backlight/backlight_driver_common.c b/quantum/backlight/backlight_driver_common.c index fb2770ee3c81..9242aba594b1 100644 --- a/quantum/backlight/backlight_driver_common.c +++ b/quantum/backlight/backlight_driver_common.c @@ -16,7 +16,9 @@ static const pin_t backlight_pins[] = BACKLIGHT_PINS; # define FOR_EACH_LED(x) \ for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ pin_t backlight_pin = backlight_pins[i]; \ - { x } \ + { \ + x \ + } \ } #else // we support only one backlight pin diff --git a/quantum/command.c b/quantum/command.c index ea2fd68e2b38..86e958e5684f 100644 --- a/quantum/command.c +++ b/quantum/command.c @@ -629,7 +629,7 @@ static void mousekey_console_help(void) { bool mousekey_console(uint8_t code) { static uint8_t param = 0; static uint8_t *pp = NULL; - static char * desc = NULL; + static char *desc = NULL; # if defined(NO_PRINT) || defined(USER_PRINT) /* -Wunused-parameter */ (void)desc; diff --git a/quantum/deferred_exec.h b/quantum/deferred_exec.h index 97ef0f6c0e2b..27eecbe8ee0b 100644 --- a/quantum/deferred_exec.h +++ b/quantum/deferred_exec.h @@ -78,7 +78,7 @@ typedef struct deferred_executor_t { deferred_token token; uint32_t trigger_time; deferred_exec_callback callback; - void * cb_arg; + void *cb_arg; } deferred_executor_t; /** diff --git a/quantum/dip_switch.h b/quantum/dip_switch.h index 762985935925..b1694f3e6fd0 100644 --- a/quantum/dip_switch.h +++ b/quantum/dip_switch.h @@ -49,7 +49,6 @@ void dip_switch_task(void); #ifdef DIP_SWITCH_MAP_ENABLE # define NUM_DIP_STATES 2 -# define DIP_SWITCH_OFF_ON(off, on) \ - { (off), (on) } +# define DIP_SWITCH_OFF_ON(off, on) {(off), (on)} extern const uint16_t dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES]; #endif // DIP_SWITCH_MAP_ENABLE diff --git a/quantum/encoder.h b/quantum/encoder.h index 1d2f1f46c7f5..fa43db52a639 100644 --- a/quantum/encoder.h +++ b/quantum/encoder.h @@ -111,8 +111,7 @@ void encoder_signal_queue_drain(void); # ifdef ENCODER_MAP_ENABLE # define NUM_DIRECTIONS 2 -# define ENCODER_CCW_CW(ccw, cw) \ - { (cw), (ccw) } +# define ENCODER_CCW_CW(ccw, cw) {(cw), (ccw)} extern const uint16_t encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS]; # endif // ENCODER_MAP_ENABLE diff --git a/quantum/encoder/tests/config_mock.h b/quantum/encoder/tests/config_mock.h index b5a1537d8a24..db1c1b106e57 100644 --- a/quantum/encoder/tests/config_mock.h +++ b/quantum/encoder/tests/config_mock.h @@ -7,10 +7,8 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODER_A_PINS \ - { 0 } -#define ENCODER_B_PINS \ - { 1 } +#define ENCODER_A_PINS {0} +#define ENCODER_B_PINS {1} #ifdef __cplusplus extern "C" { diff --git a/quantum/encoder/tests/config_mock_split_left_eq_right.h b/quantum/encoder/tests/config_mock_split_left_eq_right.h index a4aa051ef1af..37ddafe9047b 100644 --- a/quantum/encoder/tests/config_mock_split_left_eq_right.h +++ b/quantum/encoder/tests/config_mock_split_left_eq_right.h @@ -7,14 +7,10 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODER_A_PINS \ - { 0, 2 } -#define ENCODER_B_PINS \ - { 1, 3 } -#define ENCODER_A_PINS_RIGHT \ - { 4, 6 } -#define ENCODER_B_PINS_RIGHT \ - { 5, 7 } +#define ENCODER_A_PINS {0, 2} +#define ENCODER_B_PINS {1, 3} +#define ENCODER_A_PINS_RIGHT {4, 6} +#define ENCODER_B_PINS_RIGHT {5, 7} #ifdef __cplusplus extern "C" { diff --git a/quantum/encoder/tests/config_mock_split_left_gt_right.h b/quantum/encoder/tests/config_mock_split_left_gt_right.h index 77190797add9..8cb78c30ec36 100644 --- a/quantum/encoder/tests/config_mock_split_left_gt_right.h +++ b/quantum/encoder/tests/config_mock_split_left_gt_right.h @@ -7,14 +7,10 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODER_A_PINS \ - { 0, 2, 4 } -#define ENCODER_B_PINS \ - { 1, 3, 5 } -#define ENCODER_A_PINS_RIGHT \ - { 6, 8 } -#define ENCODER_B_PINS_RIGHT \ - { 7, 9 } +#define ENCODER_A_PINS {0, 2, 4} +#define ENCODER_B_PINS {1, 3, 5} +#define ENCODER_A_PINS_RIGHT {6, 8} +#define ENCODER_B_PINS_RIGHT {7, 9} #ifdef __cplusplus extern "C" { diff --git a/quantum/encoder/tests/config_mock_split_left_lt_right.h b/quantum/encoder/tests/config_mock_split_left_lt_right.h index 61808e866e15..b10d9b9c0f93 100644 --- a/quantum/encoder/tests/config_mock_split_left_lt_right.h +++ b/quantum/encoder/tests/config_mock_split_left_lt_right.h @@ -7,14 +7,10 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODER_A_PINS \ - { 0, 2 } -#define ENCODER_B_PINS \ - { 1, 3 } -#define ENCODER_A_PINS_RIGHT \ - { 4, 6, 8 } -#define ENCODER_B_PINS_RIGHT \ - { 5, 7, 9 } +#define ENCODER_A_PINS {0, 2} +#define ENCODER_B_PINS {1, 3} +#define ENCODER_A_PINS_RIGHT {4, 6, 8} +#define ENCODER_B_PINS_RIGHT {5, 7, 9} #ifdef __cplusplus extern "C" { diff --git a/quantum/encoder/tests/config_mock_split_no_left.h b/quantum/encoder/tests/config_mock_split_no_left.h index 599e584ff16a..1a6893a64957 100644 --- a/quantum/encoder/tests/config_mock_split_no_left.h +++ b/quantum/encoder/tests/config_mock_split_no_left.h @@ -8,13 +8,13 @@ /* Here, "pins" from 0 to 31 are allowed. */ #define ENCODER_A_PINS \ - {} + { \ + } #define ENCODER_B_PINS \ - {} -#define ENCODER_A_PINS_RIGHT \ - { 0, 2 } -#define ENCODER_B_PINS_RIGHT \ - { 1, 3 } + { \ + } +#define ENCODER_A_PINS_RIGHT {0, 2} +#define ENCODER_B_PINS_RIGHT {1, 3} #ifdef __cplusplus extern "C" { diff --git a/quantum/encoder/tests/config_mock_split_no_right.h b/quantum/encoder/tests/config_mock_split_no_right.h index c3f753014c0c..02719a0416cd 100644 --- a/quantum/encoder/tests/config_mock_split_no_right.h +++ b/quantum/encoder/tests/config_mock_split_no_right.h @@ -7,14 +7,14 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODER_A_PINS \ - { 0, 2 } -#define ENCODER_B_PINS \ - { 1, 3 } +#define ENCODER_A_PINS {0, 2} +#define ENCODER_B_PINS {1, 3} #define ENCODER_A_PINS_RIGHT \ - {} + { \ + } #define ENCODER_B_PINS_RIGHT \ - {} + { \ + } #ifdef __cplusplus extern "C" { diff --git a/quantum/encoder/tests/config_mock_split_role.h b/quantum/encoder/tests/config_mock_split_role.h index a4aa051ef1af..37ddafe9047b 100644 --- a/quantum/encoder/tests/config_mock_split_role.h +++ b/quantum/encoder/tests/config_mock_split_role.h @@ -7,14 +7,10 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODER_A_PINS \ - { 0, 2 } -#define ENCODER_B_PINS \ - { 1, 3 } -#define ENCODER_A_PINS_RIGHT \ - { 4, 6 } -#define ENCODER_B_PINS_RIGHT \ - { 5, 7 } +#define ENCODER_A_PINS {0, 2} +#define ENCODER_B_PINS {1, 3} +#define ENCODER_A_PINS_RIGHT {4, 6} +#define ENCODER_B_PINS_RIGHT {5, 7} #ifdef __cplusplus extern "C" { diff --git a/quantum/joystick.h b/quantum/joystick.h index 24f80c1ad6f6..4769cf28cb58 100644 --- a/quantum/joystick.h +++ b/quantum/joystick.h @@ -64,10 +64,8 @@ // configure on input_pin of the joystick_axes array entry to NO_PIN // to prevent it from being read from the ADC. This allows outputting forged axis value. -#define JOYSTICK_AXIS_VIRTUAL \ - { NO_PIN, 0, JOYSTICK_MAX_VALUE / 2, JOYSTICK_MAX_VALUE } -#define JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH) \ - { INPUT_PIN, LOW, REST, HIGH } +#define JOYSTICK_AXIS_VIRTUAL {NO_PIN, 0, JOYSTICK_MAX_VALUE / 2, JOYSTICK_MAX_VALUE} +#define JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH) {INPUT_PIN, LOW, REST, HIGH} typedef struct { pin_t input_pin; diff --git a/quantum/keycode.h b/quantum/keycode.h index 4ff6894a0117..6268b7f19b1b 100644 --- a/quantum/keycode.h +++ b/quantum/keycode.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define IS_MOUSEKEY_WHEEL(code) (QK_MOUSE_WHEEL_UP <= (code) && (code) <= QK_MOUSE_WHEEL_RIGHT) #define IS_MOUSEKEY_ACCEL(code) (QK_MOUSE_ACCELERATION_0 <= (code) && (code) <= QK_MOUSE_ACCELERATION_2) -#define MOD_BIT(code) (1 << ((code)&0x07)) +#define MOD_BIT(code) (1 << ((code) & 0x07)) // clang-format off diff --git a/quantum/matrix.c b/quantum/matrix.c index 167a70e5b660..eee9c705efea 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -54,7 +54,7 @@ static SPLIT_MUTABLE pin_t direct_pins[MATRIX_ROWS_PER_HAND][MATRIX_COLS] = DIRE static SPLIT_MUTABLE_ROW pin_t row_pins[MATRIX_ROWS_PER_HAND] = MATRIX_ROW_PINS; # endif // MATRIX_ROW_PINS # ifdef MATRIX_COL_PINS -static SPLIT_MUTABLE_COL pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +static SPLIT_MUTABLE_COL pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; # endif // MATRIX_COL_PINS #endif diff --git a/quantum/mousekey.c b/quantum/mousekey.c index 9649943a0d4b..885a5337acef 100644 --- a/quantum/mousekey.c +++ b/quantum/mousekey.c @@ -501,7 +501,7 @@ void mousekey_off(uint8_t code) { enum { mkspd_unmod, mkspd_0, mkspd_1, mkspd_2, mkspd_COUNT }; # ifndef MK_MOMENTARY_ACCEL -static uint8_t mk_speed = mkspd_1; +static uint8_t mk_speed = mkspd_1; # else static uint8_t mk_speed = mkspd_unmod; static uint8_t mkspd_DEFAULT = mkspd_unmod; diff --git a/quantum/nvm/eeprom/nvm_dynamic_keymap.c b/quantum/nvm/eeprom/nvm_dynamic_keymap.c index 5ff49795b2f5..affad8213d69 100644 --- a/quantum/nvm/eeprom/nvm_dynamic_keymap.c +++ b/quantum/nvm/eeprom/nvm_dynamic_keymap.c @@ -124,7 +124,7 @@ void nvm_dynamic_keymap_update_encoder(uint8_t layer, uint8_t encoder_id, bool c void nvm_dynamic_keymap_read_buffer(uint32_t offset, uint32_t size, uint8_t *data) { uint32_t dynamic_keymap_eeprom_size = DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2; - void * source = (void *)(uintptr_t)(DYNAMIC_KEYMAP_EEPROM_ADDR + offset); + void *source = (void *)(uintptr_t)(DYNAMIC_KEYMAP_EEPROM_ADDR + offset); uint8_t *target = data; for (uint32_t i = 0; i < size; i++) { if (offset + i < dynamic_keymap_eeprom_size) { @@ -139,7 +139,7 @@ void nvm_dynamic_keymap_read_buffer(uint32_t offset, uint32_t size, uint8_t *dat void nvm_dynamic_keymap_update_buffer(uint32_t offset, uint32_t size, uint8_t *data) { uint32_t dynamic_keymap_eeprom_size = DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2; - void * target = (void *)(uintptr_t)(DYNAMIC_KEYMAP_EEPROM_ADDR + offset); + void *target = (void *)(uintptr_t)(DYNAMIC_KEYMAP_EEPROM_ADDR + offset); uint8_t *source = data; for (uint32_t i = 0; i < size; i++) { if (offset + i < dynamic_keymap_eeprom_size) { @@ -155,7 +155,7 @@ uint32_t nvm_dynamic_keymap_macro_size(void) { } void nvm_dynamic_keymap_macro_read_buffer(uint32_t offset, uint32_t size, uint8_t *data) { - void * source = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + offset); + void *source = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + offset); uint8_t *target = data; for (uint16_t i = 0; i < size; i++) { if (offset + i < DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE) { @@ -169,7 +169,7 @@ void nvm_dynamic_keymap_macro_read_buffer(uint32_t offset, uint32_t size, uint8_ } void nvm_dynamic_keymap_macro_update_buffer(uint32_t offset, uint32_t size, uint8_t *data) { - void * target = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + offset); + void *target = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + offset); uint8_t *source = data; for (uint16_t i = 0; i < size; i++) { if (offset + i < DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE) { @@ -181,8 +181,8 @@ void nvm_dynamic_keymap_macro_update_buffer(uint32_t offset, uint32_t size, uint } void nvm_dynamic_keymap_macro_reset(void) { - void * start = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); - void * end = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE); + void *start = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); + void *end = (void *)(uintptr_t)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE); long remaining = end - start; uint8_t dummy[16] = {0}; for (int i = 0; i < DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE; i += sizeof(dummy)) { diff --git a/quantum/nvm/eeprom/nvm_eeconfig.c b/quantum/nvm/eeprom/nvm_eeconfig.c index d9495d27534b..247f623e9729 100644 --- a/quantum/nvm/eeprom/nvm_eeconfig.c +++ b/quantum/nvm/eeprom/nvm_eeconfig.c @@ -246,8 +246,8 @@ uint32_t nvm_eeconfig_update_kb_datablock(const void *data, uint32_t offset, uin void nvm_eeconfig_init_kb_datablock(void) { eeprom_update_dword(EECONFIG_KEYBOARD, (EECONFIG_KB_DATA_VERSION)); - void * start = (void *)(uintptr_t)(EECONFIG_KB_DATABLOCK); - void * end = (void *)(uintptr_t)(EECONFIG_KB_DATABLOCK + EECONFIG_KB_DATA_SIZE); + void *start = (void *)(uintptr_t)(EECONFIG_KB_DATABLOCK); + void *end = (void *)(uintptr_t)(EECONFIG_KB_DATABLOCK + EECONFIG_KB_DATA_SIZE); long remaining = end - start; uint8_t dummy[16] = {0}; for (int i = 0; i < EECONFIG_KB_DATA_SIZE; i += sizeof(dummy)) { @@ -290,8 +290,8 @@ uint32_t nvm_eeconfig_update_user_datablock(const void *data, uint32_t offset, u void nvm_eeconfig_init_user_datablock(void) { eeprom_update_dword(EECONFIG_USER, (EECONFIG_USER_DATA_VERSION)); - void * start = (void *)(uintptr_t)(EECONFIG_USER_DATABLOCK); - void * end = (void *)(uintptr_t)(EECONFIG_USER_DATABLOCK + EECONFIG_USER_DATA_SIZE); + void *start = (void *)(uintptr_t)(EECONFIG_USER_DATABLOCK); + void *end = (void *)(uintptr_t)(EECONFIG_USER_DATABLOCK + EECONFIG_USER_DATA_SIZE); long remaining = end - start; uint8_t dummy[16] = {0}; for (int i = 0; i < EECONFIG_USER_DATA_SIZE; i += sizeof(dummy)) { diff --git a/quantum/painter/lvgl/qp_lvgl.c b/quantum/painter/lvgl/qp_lvgl.c index 877b2652c64d..dc639b5a366a 100644 --- a/quantum/painter/lvgl/qp_lvgl.c +++ b/quantum/painter/lvgl/qp_lvgl.c @@ -17,7 +17,7 @@ static deferred_executor_t lvgl_executors[2] = {0}; // For lv_tick_inc and lv_ta static lvgl_state_t lvgl_states[2] = {0}; // For lv_tick_inc and lv_task_handler painter_device_t selected_display = NULL; -void * color_buffer = NULL; +void *color_buffer = NULL; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Quantum Painter LVGL Integration Internal: qp_lvgl_flush @@ -33,7 +33,7 @@ void qp_lvgl_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color } static uint32_t tick_task_callback(uint32_t trigger_time, void *cb_arg) { - lvgl_state_t * state = (lvgl_state_t *)cb_arg; + lvgl_state_t *state = (lvgl_state_t *)cb_arg; static uint32_t last_tick = 0; switch (state->fnc_id) { case 0: { @@ -97,7 +97,7 @@ bool qp_lvgl_attach(painter_device_t device) { static lv_disp_draw_buf_t draw_buf; // Allocate a buffer for 1/10 screen size const size_t count_required = driver->panel_width * driver->panel_height / 10; - void * new_color_buffer = realloc(color_buffer, sizeof(lv_color_t) * count_required); + void *new_color_buffer = realloc(color_buffer, sizeof(lv_color_t) * count_required); if (!new_color_buffer) { qp_dprintf("qp_lvgl_attach: fail (could not set up memory buffer)\n"); qp_lvgl_detach(); diff --git a/quantum/painter/qp_comms.c b/quantum/painter/qp_comms.c index 402165b119f6..d7f80266c5c9 100644 --- a/quantum/painter/qp_comms.c +++ b/quantum/painter/qp_comms.c @@ -50,7 +50,7 @@ uint32_t qp_comms_send(painter_device_t device, const void *data, uint32_t byte_ // Comms APIs that use a D/C pin bool qp_comms_command(painter_device_t device, uint8_t cmd) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; return comms_vtable->send_command(device, cmd); } @@ -66,7 +66,7 @@ uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const vo } bool qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; return comms_vtable->bulk_command_sequence(device, sequence, sequence_len); } diff --git a/quantum/painter/qp_draw_text.c b/quantum/painter/qp_draw_text.c index 664c89c6e572..f5aa38ec1cf1 100644 --- a/quantum/painter/qp_draw_text.c +++ b/quantum/painter/qp_draw_text.c @@ -343,14 +343,14 @@ typedef struct code_point_iter_drawglyph_state_t { int16_t xpos; int16_t ypos; qp_internal_byte_input_callback input_callback; - qp_internal_byte_input_state_t * input_state; + qp_internal_byte_input_state_t *input_state; qp_internal_pixel_output_state_t *output_state; } code_point_iter_drawglyph_state_t; // Codepoint handler callback: drawing static inline bool qp_font_code_point_handler_drawglyph(qff_font_handle_t *qff_font, uint32_t code_point, uint8_t width, uint8_t height, void *cb_arg) { code_point_iter_drawglyph_state_t *state = (code_point_iter_drawglyph_state_t *)cb_arg; - painter_driver_t * driver = (painter_driver_t *)state->device; + painter_driver_t *driver = (painter_driver_t *)state->device; // Reset the input state's RLE mode -- the stream should already be correctly positioned by qp_iterate_code_points() state->input_state->rle.mode = MARKER_BYTE; // ignored if not using RLE diff --git a/quantum/painter/qp_internal_driver.h b/quantum/painter/qp_internal_driver.h index 5b6efe2c8376..4c59a31cc240 100644 --- a/quantum/painter/qp_internal_driver.h +++ b/quantum/painter/qp_internal_driver.h @@ -60,7 +60,7 @@ typedef struct painter_comms_with_command_vtable_t { typedef struct painter_driver_t { const painter_driver_vtable_t *driver_vtable; - const painter_comms_vtable_t * comms_vtable; + const painter_comms_vtable_t *comms_vtable; // Flag signifying if validation was successful bool validate_ok; diff --git a/quantum/painter/qp_stream.h b/quantum/painter/qp_stream.h index 4f2b612e43f6..510b408d6e17 100644 --- a/quantum/painter/qp_stream.h +++ b/quantum/painter/qp_stream.h @@ -62,7 +62,7 @@ typedef struct qp_stream_t { typedef struct qp_memory_stream_t { qp_stream_t base; - uint8_t * buffer; + uint8_t *buffer; int32_t length; int32_t position; bool is_eof; @@ -77,7 +77,7 @@ qp_memory_stream_t qp_make_memory_stream(void *buffer, int32_t length); typedef struct qp_file_stream_t { qp_stream_t base; - FILE * file; + FILE *file; } qp_file_stream_t; qp_file_stream_t qp_make_file_stream(FILE *f); diff --git a/quantum/process_keycode/process_autocorrect.c b/quantum/process_keycode/process_autocorrect.c index 0cde520778c1..6696ea25a821 100644 --- a/quantum/process_keycode/process_autocorrect.c +++ b/quantum/process_keycode/process_autocorrect.c @@ -309,7 +309,7 @@ bool process_autocorrect(uint16_t keycode, keyrecord_t *record) { if (code & 128) { // A typo was found! Apply autocorrect. const uint8_t backspaces = (code & 63) + !record->event.pressed; - const char * changes = (const char *)(autocorrect_data + state + 1); + const char *changes = (const char *)(autocorrect_data + state + 1); /* Gather info about the typo'd word * diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index c99a66a74b0a..3fdb732c41e1 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -225,7 +225,7 @@ static inline void dump_key_buffer(void) { key_buffer_next = key_buffer_i + 1; queued_record_t *qrecord = &key_buffer[key_buffer_i]; - keyrecord_t * record = &qrecord->record; + keyrecord_t *record = &qrecord->record; if (IS_NOEVENT(record->event)) { continue; @@ -318,14 +318,14 @@ void apply_combo(uint16_t combo_index, combo_t *combo) { #if defined(EXTRA_EXTRA_LONG_COMBOS) uint32_t state = 0; #elif defined(EXTRA_LONG_COMBOS) - uint16_t state = 0; + uint16_t state = 0; #else uint8_t state = 0; #endif for (uint8_t key_buffer_i = 0; key_buffer_i < key_buffer_size; key_buffer_i++) { queued_record_t *qrecord = &key_buffer[key_buffer_i]; - keyrecord_t * record = &qrecord->record; + keyrecord_t *record = &qrecord->record; uint16_t keycode = qrecord->keycode; uint8_t key_count = 0; @@ -361,7 +361,7 @@ static inline void apply_combos(void) { // Apply all buffered normal combos. for (uint8_t i = combo_buffer_read; i != combo_buffer_write; INCREMENT_MOD(i)) { queued_combo_t *buffered_combo = &combo_buffer[i]; - combo_t * combo = combo_get(buffered_combo->combo_index); + combo_t *combo = combo_get(buffered_combo->combo_index); #ifdef COMBO_MUST_TAP_PER_COMBO if (get_combo_must_tap(buffered_combo->combo_index, combo)) { @@ -466,7 +466,7 @@ static combo_key_action_t process_single_combo(combo_t *combo, uint16_t keycode, combo_t *drop = NULL; for (uint8_t combo_buffer_i = combo_buffer_read; combo_buffer_i != combo_buffer_write; INCREMENT_MOD(combo_buffer_i)) { queued_combo_t *qcombo = &combo_buffer[combo_buffer_i]; - combo_t * buffered_combo = combo_get(qcombo->combo_index); + combo_t *buffered_combo = combo_get(qcombo->combo_index); if ((drop = overlaps(buffered_combo, combo))) { DISABLE_COMBO(drop); @@ -574,8 +574,8 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) { /* Only check keycodes from one layer. */ keycode = keymap_key_to_keycode(COMBO_ONLY_FROM_LAYER, record->event.key); #else - uint8_t highest_layer = get_highest_layer(layer_state | default_layer_state); - uint8_t ref_layer = combo_ref_from_layer(highest_layer); + uint8_t highest_layer = get_highest_layer(layer_state | default_layer_state); + uint8_t ref_layer = combo_ref_from_layer(highest_layer); if (ref_layer != highest_layer) { keycode = keymap_key_to_keycode(ref_layer, record->event.key); } diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index f1d534236e24..201a53e259bc 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -45,8 +45,8 @@ typedef struct combo_t { #ifdef EXTRA_SHORT_COMBOS uint8_t state; #else - bool disabled; - bool active; + bool disabled; + bool active; # if defined(EXTRA_EXTRA_LONG_COMBOS) uint32_t state; # elif defined(EXTRA_LONG_COMBOS) @@ -57,10 +57,8 @@ typedef struct combo_t { #endif } combo_t; -#define COMBO(ck, ca) \ - { .keys = &(ck)[0], .keycode = (ca) } -#define COMBO_ACTION(ck) \ - { .keys = &(ck)[0] } +#define COMBO(ck, ca) {.keys = &(ck)[0], .keycode = (ca)} +#define COMBO_ACTION(ck) {.keys = &(ck)[0]} #define COMBO_END 0 #ifndef COMBO_TERM diff --git a/quantum/process_keycode/process_key_lock.c b/quantum/process_keycode/process_key_lock.c index 2542e32ec229..cd691f6f5e0b 100644 --- a/quantum/process_keycode/process_key_lock.c +++ b/quantum/process_keycode/process_key_lock.c @@ -20,7 +20,7 @@ #define BV_64(shift) (((uint64_t)1) << (shift)) #define GET_KEY_ARRAY(code) (((code) < 0x40) ? key_state[0] : ((code) < 0x80) ? key_state[1] : ((code) < 0xC0) ? key_state[2] : key_state[3]) -#define GET_CODE_INDEX(code) (((code) < 0x40) ? (code) : ((code) < 0x80) ? (code)-0x40 : ((code) < 0xC0) ? (code)-0x80 : (code)-0xC0) +#define GET_CODE_INDEX(code) (((code) < 0x40) ? (code) : ((code) < 0x80) ? (code) - 0x40 : ((code) < 0xC0) ? (code) - 0x80 : (code) - 0xC0) #define KEY_STATE(code) (GET_KEY_ARRAY(code) & BV_64(GET_CODE_INDEX(code))) == BV_64(GET_CODE_INDEX(code)) #define SET_KEY_ARRAY_STATE(code, val) \ do { \ diff --git a/quantum/process_keycode/process_key_override.c b/quantum/process_keycode/process_key_override.c index ce30477ee880..871af874c024 100644 --- a/quantum/process_keycode/process_key_override.c +++ b/quantum/process_keycode/process_key_override.c @@ -39,7 +39,8 @@ # define key_override_printf dprintf #else # define key_override_printf(str, ...) \ - {} + { \ + } #endif // Helpers diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 5cccbdf439a2..b64321da0c02 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -57,23 +57,41 @@ typedef struct { void (*layer_function)(uint8_t); } tap_dance_dual_role_t; -#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) \ - { .fn = {tap_dance_pair_on_each_tap, tap_dance_pair_finished, tap_dance_pair_reset, NULL}, .user_data = (void *)&((tap_dance_pair_t){kc1, kc2}), } - -#define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) \ - { .fn = {tap_dance_dual_role_on_each_tap, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_move}), } - -#define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \ - { .fn = {NULL, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_invert}), } - -#define ACTION_TAP_DANCE_FN(user_fn) \ - { .fn = {NULL, user_fn, NULL, NULL}, .user_data = NULL, } +#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) \ + { \ + .fn = {tap_dance_pair_on_each_tap, tap_dance_pair_finished, tap_dance_pair_reset, NULL}, \ + .user_data = (void *)&((tap_dance_pair_t){kc1, kc2}), \ + } + +#define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) \ + { \ + .fn = {tap_dance_dual_role_on_each_tap, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, \ + .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_move}), \ + } + +#define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \ + { \ + .fn = {NULL, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, \ + .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_invert}), \ + } + +#define ACTION_TAP_DANCE_FN(user_fn) \ + { \ + .fn = {NULL, user_fn, NULL, NULL}, \ + .user_data = NULL, \ + } #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) \ - { .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, NULL}, .user_data = NULL, } + { \ + .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, NULL}, \ + .user_data = NULL, \ + } #define ACTION_TAP_DANCE_FN_ADVANCED_WITH_RELEASE(user_fn_on_each_tap, user_fn_on_each_release, user_fn_on_dance_finished, user_fn_on_dance_reset) \ - { .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, user_fn_on_each_release}, .user_data = NULL, } + { \ + .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, user_fn_on_each_release}, \ + .user_data = NULL, \ + } #define TD_INDEX(code) QK_TAP_DANCE_GET_INDEX(code) #define TAP_DANCE_KEYCODE(state) TD(((tap_dance_action_t *)state) - tap_dance_actions) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index a1ae7ed0be0f..911ec8e29fdb 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -39,7 +39,7 @@ // Generic decoding for the whole QK_MODS range #define QK_MODS_GET_MODS(kc) (((kc) >> 8) & 0x1F) -#define QK_MODS_GET_BASIC_KEYCODE(kc) ((kc)&0xFF) +#define QK_MODS_GET_BASIC_KEYCODE(kc) ((kc) & 0xFF) // Modified keycodes #define LCTL(kc) (QK_LCTL | (kc)) @@ -90,37 +90,37 @@ #define MEH(kc) (QK_LCTL | QK_LSFT | QK_LALT | (kc)) // GOTO layer - 32 layer max -#define TO(layer) (QK_TO | ((layer)&0x1F)) -#define QK_TO_GET_LAYER(kc) ((kc)&0x1F) +#define TO(layer) (QK_TO | ((layer) & 0x1F)) +#define QK_TO_GET_LAYER(kc) ((kc) & 0x1F) // Momentary switch layer - 32 layer max -#define MO(layer) (QK_MOMENTARY | ((layer)&0x1F)) -#define QK_MOMENTARY_GET_LAYER(kc) ((kc)&0x1F) +#define MO(layer) (QK_MOMENTARY | ((layer) & 0x1F)) +#define QK_MOMENTARY_GET_LAYER(kc) ((kc) & 0x1F) // Set default layer - 32 layer max -#define DF(layer) (QK_DEF_LAYER | ((layer)&0x1F)) -#define QK_DEF_LAYER_GET_LAYER(kc) ((kc)&0x1F) +#define DF(layer) (QK_DEF_LAYER | ((layer) & 0x1F)) +#define QK_DEF_LAYER_GET_LAYER(kc) ((kc) & 0x1F) // Set persistent default layer - 32 layer max -#define PDF(layer) (QK_PERSISTENT_DEF_LAYER | ((layer)&0x1F)) -#define QK_PERSISTENT_DEF_LAYER_GET_LAYER(kc) ((kc)&0x1F) +#define PDF(layer) (QK_PERSISTENT_DEF_LAYER | ((layer) & 0x1F)) +#define QK_PERSISTENT_DEF_LAYER_GET_LAYER(kc) ((kc) & 0x1F) // Toggle to layer - 32 layer max -#define TG(layer) (QK_TOGGLE_LAYER | ((layer)&0x1F)) -#define QK_TOGGLE_LAYER_GET_LAYER(kc) ((kc)&0x1F) +#define TG(layer) (QK_TOGGLE_LAYER | ((layer) & 0x1F)) +#define QK_TOGGLE_LAYER_GET_LAYER(kc) ((kc) & 0x1F) // One-shot layer - 32 layer max -#define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer)&0x1F)) -#define QK_ONE_SHOT_LAYER_GET_LAYER(kc) ((kc)&0x1F) +#define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer) & 0x1F)) +#define QK_ONE_SHOT_LAYER_GET_LAYER(kc) ((kc) & 0x1F) // L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max -#define LM(layer, mod) (QK_LAYER_MOD | (((layer)&0xF) << 5) | ((mod)&0x1F)) +#define LM(layer, mod) (QK_LAYER_MOD | (((layer) & 0xF) << 5) | ((mod) & 0x1F)) #define QK_LAYER_MOD_GET_LAYER(kc) (((kc) >> 5) & 0xF) -#define QK_LAYER_MOD_GET_MODS(kc) ((kc)&0x1F) +#define QK_LAYER_MOD_GET_MODS(kc) ((kc) & 0x1F) // One-shot mod -#define OSM(mod) (QK_ONE_SHOT_MOD | ((mod)&0x1F)) -#define QK_ONE_SHOT_MOD_GET_MODS(kc) ((kc)&0x1F) +#define OSM(mod) (QK_ONE_SHOT_MOD | ((mod) & 0x1F)) +#define QK_ONE_SHOT_MOD_GET_MODS(kc) ((kc) & 0x1F) #define OS_LCTL OSM(MOD_LCTL) #define OS_LSFT OSM(MOD_LSFT) @@ -158,18 +158,18 @@ #define OS_HYPR OSM(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI) // Layer tap-toggle - 32 layer max -#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer)&0x1F)) -#define QK_LAYER_TAP_TOGGLE_GET_LAYER(kc) ((kc)&0x1F) +#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer) & 0x1F)) +#define QK_LAYER_TAP_TOGGLE_GET_LAYER(kc) ((kc) & 0x1F) // L-ayer, T-ap - 256 keycode max, 16 layer max -#define LT(layer, kc) (QK_LAYER_TAP | (((layer)&0xF) << 8) | ((kc)&0xFF)) +#define LT(layer, kc) (QK_LAYER_TAP | (((layer) & 0xF) << 8) | ((kc) & 0xFF)) #define QK_LAYER_TAP_GET_LAYER(kc) (((kc) >> 8) & 0xF) -#define QK_LAYER_TAP_GET_TAP_KEYCODE(kc) ((kc)&0xFF) +#define QK_LAYER_TAP_GET_TAP_KEYCODE(kc) ((kc) & 0xFF) // M-od, T-ap - 256 keycode max -#define MT(mod, kc) (QK_MOD_TAP | (((mod)&0x1F) << 8) | ((kc)&0xFF)) +#define MT(mod, kc) (QK_MOD_TAP | (((mod) & 0x1F) << 8) | ((kc) & 0xFF)) #define QK_MOD_TAP_GET_MODS(kc) (((kc) >> 8) & 0x1F) -#define QK_MOD_TAP_GET_TAP_KEYCODE(kc) ((kc)&0xFF) +#define QK_MOD_TAP_GET_TAP_KEYCODE(kc) ((kc) & 0xFF) // Mod-Tap shortcuts #define LCTL_T(kc) MT(MOD_LCTL, kc) @@ -230,23 +230,23 @@ // Unicode aliases // UNICODE_ENABLE - Allows Unicode input up to 0x7FFF #define UC(c) (QK_UNICODE | (c)) -#define QK_UNICODE_GET_CODE_POINT(kc) ((kc)&0x7FFF) +#define QK_UNICODE_GET_CODE_POINT(kc) ((kc) & 0x7FFF) // UNICODEMAP_ENABLE - Allows Unicode input up to 0x10FFFF, requires unicode_map -#define UM(i) (QK_UNICODEMAP | ((i)&0x3FFF)) -#define QK_UNICODEMAP_GET_INDEX(kc) ((kc)&0x3FFF) +#define UM(i) (QK_UNICODEMAP | ((i) & 0x3FFF)) +#define QK_UNICODEMAP_GET_INDEX(kc) ((kc) & 0x3FFF) -#define UP(i, j) (QK_UNICODEMAP_PAIR | ((i)&0x7F) | (((j)&0x7F) << 7)) // 127 max i and j -#define QK_UNICODEMAP_PAIR_GET_UNSHIFTED_INDEX(kc) ((kc)&0x7F) +#define UP(i, j) (QK_UNICODEMAP_PAIR | ((i) & 0x7F) | (((j) & 0x7F) << 7)) // 127 max i and j +#define QK_UNICODEMAP_PAIR_GET_UNSHIFTED_INDEX(kc) ((kc) & 0x7F) #define QK_UNICODEMAP_PAIR_GET_SHIFTED_INDEX(kc) (((kc) >> 7) & 0x7F) // Swap Hands -#define SH_T(kc) (QK_SWAP_HANDS | ((kc)&0xFF)) -#define QK_SWAP_HANDS_GET_TAP_KEYCODE(kc) ((kc)&0xFF) +#define SH_T(kc) (QK_SWAP_HANDS | ((kc) & 0xFF)) +#define QK_SWAP_HANDS_GET_TAP_KEYCODE(kc) ((kc) & 0xFF) // Tap dance -#define TD(i) (QK_TAP_DANCE | ((i)&0xFF)) -#define QK_TAP_DANCE_GET_INDEX(kc) ((kc)&0xFF) +#define TD(i) (QK_TAP_DANCE | ((i) & 0xFF)) +#define QK_TAP_DANCE_GET_INDEX(kc) ((kc) & 0xFF) // MIDI aliases #define MIDI_TONE_MIN QK_MIDI_NOTE_C_0 diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c index bfccb472b5b9..3c4a05844d92 100644 --- a/quantum/rgblight/rgblight.c +++ b/quantum/rgblight/rgblight.c @@ -1381,7 +1381,7 @@ void rgblight_effect_twinkle(animation_status_t *anim) { for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) { TwinkleState *t = &(led_twinkle_state[i]); - hsv_t * c = &(t->hsv); + hsv_t *c = &(t->hsv); if (!random_color) { c->h = rgblight_config.hue; diff --git a/quantum/rgblight/rgblight.h b/quantum/rgblight/rgblight.h index c061e718954e..e70c081c2a37 100644 --- a/quantum/rgblight/rgblight.h +++ b/quantum/rgblight/rgblight.h @@ -186,8 +186,7 @@ typedef struct { # define RGBLIGHT_USE_TIMER # define RGBLIGHT_END_SEGMENT_INDEX (255) -# define RGBLIGHT_END_SEGMENTS \ - { RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0 } +# define RGBLIGHT_END_SEGMENTS {RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0} # ifndef RGBLIGHT_MAX_LAYERS # define RGBLIGHT_MAX_LAYERS 8 # endif @@ -202,10 +201,8 @@ typedef uint32_t rgblight_layer_mask_t; # else # error invalid RGBLIGHT_MAX_LAYERS value (must be <= 32) # endif -# define RGBLIGHT_LAYER_SEGMENTS(...) \ - { __VA_ARGS__, RGBLIGHT_END_SEGMENTS } -# define RGBLIGHT_LAYERS_LIST(...) \ - { __VA_ARGS__, NULL } +# define RGBLIGHT_LAYER_SEGMENTS(...) {__VA_ARGS__, RGBLIGHT_END_SEGMENTS} +# define RGBLIGHT_LAYERS_LIST(...) {__VA_ARGS__, NULL} // Get/set enabled rgblight layers void rgblight_set_layer_state(uint8_t layer, bool enabled); diff --git a/quantum/secure.c b/quantum/secure.c index f2a567f31d9e..2f589877b7b3 100644 --- a/quantum/secure.c +++ b/quantum/secure.c @@ -14,10 +14,7 @@ #endif #ifndef SECURE_UNLOCK_SEQUENCE -# define SECURE_UNLOCK_SEQUENCE \ - { \ - { 0, 0 } \ - } +# define SECURE_UNLOCK_SEQUENCE {{0, 0}} #endif static secure_status_t secure_status = SECURE_LOCKED; diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 59b6009ec47a..a35a16685a19 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -167,7 +167,7 @@ __attribute__((weak)) bool is_keyboard_left_impl(void) { # pragma message "Faking EE_HANDS for right hand" const bool should_be_left = false; # endif - bool is_left = eeconfig_read_handedness(); + bool is_left = eeconfig_read_handedness(); if (is_left != should_be_left) { eeconfig_update_handedness(should_be_left); } diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index f66b2ad89fb5..64a81ef31f0e 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c @@ -73,16 +73,13 @@ #define sizeof_member(type, member) sizeof(((type *)NULL)->member) -#define trans_initiator2target_initializer_cb(member, cb) \ - { sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), 0, 0, cb } +#define trans_initiator2target_initializer_cb(member, cb) {sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), 0, 0, cb} #define trans_initiator2target_initializer(member) trans_initiator2target_initializer_cb(member, NULL) -#define trans_target2initiator_initializer_cb(member, cb) \ - { 0, 0, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), cb } +#define trans_target2initiator_initializer_cb(member, cb) {0, 0, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), cb} #define trans_target2initiator_initializer(member) trans_target2initiator_initializer_cb(member, NULL) -#define trans_initiator2target_cb(cb) \ - { 0, 0, 0, 0, cb } +#define trans_initiator2target_cb(cb) {0, 0, 0, 0, cb} #define transport_write(id, data, length) transport_execute_transaction(id, data, length, NULL, 0) #define transport_read(id, data, length) transport_execute_transaction(id, NULL, 0, data, length) diff --git a/quantum/util.h b/quantum/util.h index 61ec7ac153f7..99a0c0f6273d 100644 --- a/quantum/util.h +++ b/quantum/util.h @@ -24,7 +24,7 @@ * @brief Computes the rounded up result of a division of two integers at * compile time. */ -# define CEILING(dividend, divisor) (((dividend) + (divisor)-1) / (divisor)) +# define CEILING(dividend, divisor) (((dividend) + (divisor) - 1) / (divisor)) #endif #if !defined(IS_ARRAY) diff --git a/quantum/via.c b/quantum/via.c index 130ff74794c0..0a4eb29401f5 100644 --- a/quantum/via.c +++ b/quantum/via.c @@ -68,7 +68,7 @@ // Can be called in an overriding via_init_kb() to test if keyboard level code usage of // EEPROM is invalid and use/save defaults. bool via_eeprom_is_valid(void) { - char * p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" + char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" uint8_t magic0 = ((p[2] & 0x0F) << 4) | (p[3] & 0x0F); uint8_t magic1 = ((p[5] & 0x0F) << 4) | (p[6] & 0x0F); uint8_t magic2 = ((p[8] & 0x0F) << 4) | (p[9] & 0x0F); @@ -85,7 +85,7 @@ bool via_eeprom_is_valid(void) { // Keyboard level code (eg. via_init_kb()) should not call this void via_eeprom_set_valid(bool valid) { if (valid) { - char * p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" + char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" uint8_t magic0 = ((p[2] & 0x0F) << 4) | (p[3] & 0x0F); uint8_t magic1 = ((p[5] & 0x0F) << 4) | (p[6] & 0x0F); uint8_t magic2 = ((p[8] & 0x0F) << 4) | (p[9] & 0x0F); diff --git a/quantum/wear_leveling/wear_leveling.c b/quantum/wear_leveling/wear_leveling.c index 258f074a5c6f..f65ff9c1ca5d 100644 --- a/quantum/wear_leveling/wear_leveling.c +++ b/quantum/wear_leveling/wear_leveling.c @@ -358,7 +358,7 @@ static wear_leveling_status_t wear_leveling_append_raw(backing_store_int_t value * @return true if consolidation occurred */ static wear_leveling_status_t wear_leveling_write_raw_multibyte(uint32_t address, const void *value, size_t length) { - const uint8_t * p = value; + const uint8_t *p = value; write_log_entry_t log = LOG_ENTRY_MAKE_MULTIBYTE(address, length); for (size_t i = 0; i < length; ++i) { log.raw8[3 + i] = p[i]; @@ -415,7 +415,7 @@ static wear_leveling_status_t wear_leveling_write_raw_multibyte(uint32_t address * Handles the actual writing of logical data into the write log section of the backing store. */ static wear_leveling_status_t wear_leveling_write_raw(uint32_t address, const void *value, size_t length) { - const uint8_t * p = value; + const uint8_t *p = value; size_t remaining = length; wear_leveling_status_t status = WEAR_LEVELING_SUCCESS; while (remaining > 0) { @@ -555,7 +555,7 @@ static wear_leveling_status_t wear_leveling_playback_log(void) { if (!ok) { wl_dprintf("Failed to load from backing store, skipping playback of write log\n"); cancel_playback = true; - status = WEAR_LEVELING_FAILED; + status = WEAR_LEVELING_FAILED; break; } address += (BACKING_STORE_WRITE_SIZE); diff --git a/tests/tap_hold_configurations/retro_tapping/config.h b/tests/tap_hold_configurations/retro_tapping/config.h index cc9f1624770e..b776b7466e33 100644 --- a/tests/tap_hold_configurations/retro_tapping/config.h +++ b/tests/tap_hold_configurations/retro_tapping/config.h @@ -20,5 +20,4 @@ #define RETRO_TAPPING #define DUMMY_MOD_NEUTRALIZER_KEYCODE KC_RIGHT_CTRL -#define MODS_TO_NEUTRALIZE \ - { MOD_BIT(KC_LEFT_GUI) } +#define MODS_TO_NEUTRALIZE {MOD_BIT(KC_LEFT_GUI)} diff --git a/tmk_core/protocol/chibios/usb_driver.c b/tmk_core/protocol/chibios/usb_driver.c index 7c3ce4468765..8b471cba5633 100644 --- a/tmk_core/protocol/chibios/usb_driver.c +++ b/tmk_core/protocol/chibios/usb_driver.c @@ -186,7 +186,7 @@ void usb_endpoint_out_configure_cb(usb_endpoint_out_t *endpoint) { void usb_endpoint_in_tx_complete_cb(USBDriver *usbp, usbep_t ep) { usb_endpoint_in_t *endpoint = usbp->in_params[ep - 1U]; size_t n; - uint8_t * buffer; + uint8_t *buffer; if (endpoint == NULL) { return; diff --git a/tmk_core/protocol/chibios/usb_endpoints.c b/tmk_core/protocol/chibios/usb_endpoints.c index 856df6242603..00536845b238 100644 --- a/tmk_core/protocol/chibios/usb_endpoints.c +++ b/tmk_core/protocol/chibios/usb_endpoints.c @@ -68,7 +68,7 @@ usb_endpoint_in_t usb_endpoints_in[USB_ENDPOINT_IN_COUNT] = { # if defined(USB_ENDPOINTS_ARE_REORDERABLE) [USB_ENDPOINT_IN_CONSOLE] = QMK_USB_ENDPOINT_IN_SHARED(USB_EP_MODE_TYPE_INTR, CONSOLE_EPSIZE, CONSOLE_IN_EPNUM, CONSOLE_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(CONSOLE_EPSIZE)), # else - [USB_ENDPOINT_IN_CONSOLE] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, CONSOLE_EPSIZE, CONSOLE_IN_EPNUM, CONSOLE_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(CONSOLE_EPSIZE)), + [USB_ENDPOINT_IN_CONSOLE] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, CONSOLE_EPSIZE, CONSOLE_IN_EPNUM, CONSOLE_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(CONSOLE_EPSIZE)), # endif #endif @@ -76,7 +76,7 @@ usb_endpoint_in_t usb_endpoints_in[USB_ENDPOINT_IN_COUNT] = { # if defined(USB_ENDPOINTS_ARE_REORDERABLE) [USB_ENDPOINT_IN_RAW] = QMK_USB_ENDPOINT_IN_SHARED(USB_EP_MODE_TYPE_INTR, RAW_EPSIZE, RAW_IN_EPNUM, RAW_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(RAW_EPSIZE)), # else - [USB_ENDPOINT_IN_RAW] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, RAW_EPSIZE, RAW_IN_EPNUM, RAW_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(RAW_EPSIZE)), + [USB_ENDPOINT_IN_RAW] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_INTR, RAW_EPSIZE, RAW_IN_EPNUM, RAW_IN_CAPACITY, NULL, QMK_USB_REPORT_STORAGE_DEFAULT(RAW_EPSIZE)), # endif #endif @@ -84,7 +84,7 @@ usb_endpoint_in_t usb_endpoints_in[USB_ENDPOINT_IN_COUNT] = { # if defined(USB_ENDPOINTS_ARE_REORDERABLE) [USB_ENDPOINT_IN_MIDI] = QMK_USB_ENDPOINT_IN_SHARED(USB_EP_MODE_TYPE_BULK, MIDI_STREAM_EPSIZE, MIDI_STREAM_IN_EPNUM, MIDI_STREAM_IN_CAPACITY, NULL, NULL), # else - [USB_ENDPOINT_IN_MIDI] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_BULK, MIDI_STREAM_EPSIZE, MIDI_STREAM_IN_EPNUM, MIDI_STREAM_IN_CAPACITY, NULL, NULL), + [USB_ENDPOINT_IN_MIDI] = QMK_USB_ENDPOINT_IN(USB_EP_MODE_TYPE_BULK, MIDI_STREAM_EPSIZE, MIDI_STREAM_IN_EPNUM, MIDI_STREAM_IN_CAPACITY, NULL, NULL), # endif #endif diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index b798a8d1cbe7..b8497684d67e 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -80,7 +80,7 @@ static const USBDescriptor *usb_get_descriptor_cb(USBDriver *usbp, uint8_t dtype static USBDescriptor descriptor; descriptor.ud_string = NULL; - descriptor.ud_size = get_usb_descriptor(setup->wValue.word, setup->wIndex, setup->wLength, (const void **const) & descriptor.ud_string); + descriptor.ud_size = get_usb_descriptor(setup->wValue.word, setup->wIndex, setup->wLength, (const void **const)&descriptor.ud_string); if (descriptor.ud_string == NULL) { return NULL; diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h index 1de8c5ec88a3..366a380fdde3 100644 --- a/tmk_core/protocol/usb_descriptor.h +++ b/tmk_core/protocol/usb_descriptor.h @@ -223,7 +223,7 @@ enum usb_endpoints { # ifdef USB_ENDPOINTS_ARE_REORDERABLE # define RAW_OUT_EPNUM RAW_IN_EPNUM # else - RAW_OUT_EPNUM = NEXT_EPNUM, + RAW_OUT_EPNUM = NEXT_EPNUM, # endif #endif @@ -250,7 +250,7 @@ enum usb_endpoints { # ifdef USB_ENDPOINTS_ARE_REORDERABLE # define CDC_OUT_EPNUM CDC_IN_EPNUM # else - CDC_OUT_EPNUM = NEXT_EPNUM, + CDC_OUT_EPNUM = NEXT_EPNUM, # endif #endif From 43bbb5e99a2c552c127d30dfdf317fb70b143b40 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Mon, 1 Dec 2025 07:46:22 +1100 Subject: [PATCH 1142/1205] [CI] Format code according to conventions (#25828) Format code according to conventions --- drivers/painter/generic/qp_surface_internal.h | 2 +- drivers/painter/generic/qp_surface_rgb888.c | 4 ++-- quantum/led_matrix/led_matrix.c | 3 +-- quantum/process_keycode/process_tap_dance.c | 6 +++--- quantum/rgb_matrix/rgb_matrix.c | 3 +-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/painter/generic/qp_surface_internal.h b/drivers/painter/generic/qp_surface_internal.h index e7a36550c193..0b4d32fa3411 100644 --- a/drivers/painter/generic/qp_surface_internal.h +++ b/drivers/painter/generic/qp_surface_internal.h @@ -45,7 +45,7 @@ typedef struct surface_painter_device_t { void *buffer; uint8_t *u8buffer; uint16_t *u16buffer; - rgb_t * rgbbuffer; + rgb_t *rgbbuffer; }; // Manually manage the viewport for streaming pixel data to the display diff --git a/drivers/painter/generic/qp_surface_rgb888.c b/drivers/painter/generic/qp_surface_rgb888.c index 68c824b0e407..2c04136c3629 100644 --- a/drivers/painter/generic/qp_surface_rgb888.c +++ b/drivers/painter/generic/qp_surface_rgb888.c @@ -43,7 +43,7 @@ static inline void stream_pixdata_rgb888(surface_painter_device_t *surface, cons // Stream pixel data to the current write position in GRAM static bool qp_surface_pixdata_rgb888(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count) { - painter_driver_t * driver = (painter_driver_t *)device; + painter_driver_t *driver = (painter_driver_t *)device; surface_painter_device_t *surface = (surface_painter_device_t *)driver; stream_pixdata_rgb888(surface, (const rgb_t *)pixel_data, native_pixel_count); return true; @@ -84,7 +84,7 @@ static bool rgb888_target_pixdata_transfer(painter_driver_t *surface_driver, pai // Housekeeping of the amount of pixels to transfer uint32_t total_pixel_count = (8 * QUANTUM_PAINTER_PIXDATA_BUFFER_SIZE) / surface_driver->native_bits_per_pixel; uint32_t pixel_counter = 0; - rgb_t * target_buffer = (rgb_t *)qp_internal_global_pixdata_buffer; + rgb_t *target_buffer = (rgb_t *)qp_internal_global_pixdata_buffer; // Fill the global pixdata area so that we can start transferring to the panel for (uint16_t y = t; y <= b; ++y) { diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 715d520d1c83..a751f08c7589 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -71,8 +71,7 @@ last_hit_t g_last_hit_tracker; #endif // LED_MATRIX_KEYREACTIVE_ENABLED #ifndef LED_MATRIX_FLAG_STEPS -# define LED_MATRIX_FLAG_STEPS \ - { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_NONE } +# define LED_MATRIX_FLAG_STEPS {LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_NONE} #endif static const uint8_t led_matrix_flag_steps[] = LED_MATRIX_FLAG_STEPS; #define LED_MATRIX_FLAG_STEPS_COUNT ARRAY_SIZE(led_matrix_flag_steps) diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 36a94d8d281a..399f71a8270d 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -168,7 +168,7 @@ static inline void process_tap_dance_action_on_dance_finished(tap_dance_action_t bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { tap_dance_action_t *action; - tap_dance_state_t * state; + tap_dance_state_t *state; if (!record->event.pressed) return false; @@ -197,7 +197,7 @@ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { uint8_t td_index; tap_dance_action_t *action; - tap_dance_state_t * state; + tap_dance_state_t *state; switch (keycode) { case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: @@ -233,7 +233,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { void tap_dance_task(void) { tap_dance_action_t *action; - tap_dance_state_t * state; + tap_dance_state_t *state; if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return; diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index f517190e3527..97ae6a3c7672 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -73,8 +73,7 @@ last_hit_t g_last_hit_tracker; #endif // RGB_MATRIX_KEYREACTIVE_ENABLED #ifndef RGB_MATRIX_FLAG_STEPS -# define RGB_MATRIX_FLAG_STEPS \ - { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_UNDERGLOW, LED_FLAG_NONE } +# define RGB_MATRIX_FLAG_STEPS {LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_UNDERGLOW, LED_FLAG_NONE} #endif static const uint8_t rgb_matrix_flag_steps[] = RGB_MATRIX_FLAG_STEPS; #define RGB_MATRIX_FLAG_STEPS_COUNT ARRAY_SIZE(rgb_matrix_flag_steps) From 83b42ea9dcbc883200061caca839ea71472b5025 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 1 Dec 2025 01:15:31 +0000 Subject: [PATCH 1143/1205] Update Bootstrap testing triggers (#25842) --- .github/workflows/bootstrap_testing.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/bootstrap_testing.yml b/.github/workflows/bootstrap_testing.yml index 00787c92eb6f..2890af3de91e 100644 --- a/.github/workflows/bootstrap_testing.yml +++ b/.github/workflows/bootstrap_testing.yml @@ -2,17 +2,14 @@ name: Bootstrap Script Testing on: push: - branches: [bootstrap] + branches: [master, develop, xap] paths: - "util/env-bootstrap.sh" - ".github/workflows/bootstrap_testing.yml" - - "lib/python/**" pull_request: - branches: [master, develop, xap] paths: - "util/env-bootstrap.sh" - ".github/workflows/bootstrap_testing.yml" - - "lib/python/**" workflow_dispatch: permissions: From 2cac8b587fdef6526330c80799e0a190b75bb2fd Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 1 Dec 2025 01:16:25 +0000 Subject: [PATCH 1144/1205] Remove macos-13 runner from bootstrap testing (#25843) --- .github/workflows/bootstrap_testing.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/bootstrap_testing.yml b/.github/workflows/bootstrap_testing.yml index 2890af3de91e..2e97f8308184 100644 --- a/.github/workflows/bootstrap_testing.yml +++ b/.github/workflows/bootstrap_testing.yml @@ -161,7 +161,6 @@ jobs: fail-fast: false matrix: os: - - macos-13 # Intel x64 - macos-14 # Apple Silicon ARM64 - macos-15 # Apple Silicon ARM64 - macos-15-intel # Intel x64 From e2bf515df4c51c4d2e3b442d23e52d6d43f7f726 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 1 Dec 2025 01:17:13 +0000 Subject: [PATCH 1145/1205] Fix python format warnings (#25841) --- lib/python/qmk/cli/generate/keycodes.py | 6 +++--- lib/python/qmk/json_encoders.py | 4 ++-- lib/python/qmk/painter.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/python/qmk/cli/generate/keycodes.py b/lib/python/qmk/cli/generate/keycodes.py index d686935fa8a7..d694202aecd8 100644 --- a/lib/python/qmk/cli/generate/keycodes.py +++ b/lib/python/qmk/cli/generate/keycodes.py @@ -92,15 +92,15 @@ def _generate_helpers(lines, keycodes): for group, codes in temp.items(): lo = keycodes["keycodes"][f'0x{codes[0]:04X}']['key'] hi = keycodes["keycodes"][f'0x{codes[1]:04X}']['key'] - lines.append(f'#define IS_{ _translate_group(group).upper() }_KEYCODE(code) ((code) >= {lo} && (code) <= {hi})') + lines.append(f'#define IS_{_translate_group(group).upper()}_KEYCODE(code) ((code) >= {lo} && (code) <= {hi})') lines.append('') lines.append('// Switch statement Helpers') for group, codes in temp.items(): lo = keycodes["keycodes"][f'0x{codes[0]:04X}']['key'] hi = keycodes["keycodes"][f'0x{codes[1]:04X}']['key'] - name = f'{ _translate_group(group).upper() }_KEYCODE_RANGE' - lines.append(f'#define { name.ljust(35) } {lo} ... {hi}') + name = f'{_translate_group(group).upper()}_KEYCODE_RANGE' + lines.append(f'#define {name.ljust(35)} {lo} ... {hi}') def _generate_aliases(lines, keycodes): diff --git a/lib/python/qmk/json_encoders.py b/lib/python/qmk/json_encoders.py index e8bcf48996ef..6bad820a7645 100755 --- a/lib/python/qmk/json_encoders.py +++ b/lib/python/qmk/json_encoders.py @@ -178,9 +178,9 @@ def encode_list(self, obj, path): else: layer[-1].append(f'"{key}"') - layer = [f"{self.indent_str*indent_level}{', '.join(row)}" for row in layer] + layer = [f"{self.indent_str * indent_level}{', '.join(row)}" for row in layer] - return f"{self.indent_str}[\n{newline.join(layer)}\n{self.indent_str*self.indentation_level}]" + return f"{self.indent_str}[\n{newline.join(layer)}\n{self.indent_str * self.indentation_level}]" elif self.primitives_only(obj): return "[" + ", ".join(self.encode(element) for element in obj) + "]" diff --git a/lib/python/qmk/painter.py b/lib/python/qmk/painter.py index ed0372c163ee..1a07f7442cd2 100644 --- a/lib/python/qmk/painter.py +++ b/lib/python/qmk/painter.py @@ -129,7 +129,7 @@ def _render_image_metadata(metadata): px = size["width"] * size["height"] # FIXME: May need need more chars here too - deltas.append(f"// Frame {i:3d}: ({l:3d}, {t:3d}) - ({r:3d}, {b:3d}) >> {delta_px:4d}/{px:4d} pixels ({100*delta_px/px:.2f}%)") + deltas.append(f"// Frame {i:3d}: ({l:3d}, {t:3d}) - ({r:3d}, {b:3d}) >> {delta_px:4d}/{px:4d} pixels ({100 * delta_px / px:.2f}%)") if deltas: lines.append("// Areas on delta frames") From 0e6b73c9ff44c8404a74e165a8aa0b258db41f8a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 1 Dec 2025 21:47:16 +0000 Subject: [PATCH 1146/1205] 2025q4 develop changelog (#25845) --- docs/ChangeLog/20250831/pr25415.md | 47 ------- docs/ChangeLog/20251130.md | 190 +++++++++++++++++++++++++++++ docs/ChangeLog/20251130/PR25515.md | 3 - docs/ChangeLog/20251130/PR25632.md | 4 - docs/_sidebar.json | 2 +- docs/breaking_changes.md | 20 +-- docs/breaking_changes_history.md | 1 + 7 files changed, 202 insertions(+), 65 deletions(-) delete mode 100644 docs/ChangeLog/20250831/pr25415.md create mode 100644 docs/ChangeLog/20251130.md delete mode 100644 docs/ChangeLog/20251130/PR25515.md delete mode 100644 docs/ChangeLog/20251130/PR25632.md diff --git a/docs/ChangeLog/20250831/pr25415.md b/docs/ChangeLog/20250831/pr25415.md deleted file mode 100644 index 54eb8c737e97..000000000000 --- a/docs/ChangeLog/20250831/pr25415.md +++ /dev/null @@ -1,47 +0,0 @@ -# Tap dance state removed from `tap_dance_action_t` - -The tap dance state has been separated from the action structure. Custom tap dance functions now receive the state as a separate parameter instead of accessing it through `action->state`. - -## User Action Required - -If your keymap uses custom tap dance functions that access the tap dance state, you need to update your code. - - - You can't use `action->state`. Instead you need to call `tap_dance_state_t *tap_dance_get_state(uint8_t tap_dance_idx)` to get the state. - - You now get a pointer to the state, so use `->` notation rather than `.` notation to get fields from it. - -### Before: -```c -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - tap_dance_action_t *action; - - switch (keycode) { - case TD(CT_CLN): - action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); - if (!record->event.pressed && action->state.count && !action->state.finished) { - tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; - tap_code16(tap_hold->tap); - } - - } - return true; -} -``` - -### After: -```c -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - tap_dance_action_t *action; - tap_dance_state_t* state; - - switch (keycode) { - case TD(CT_CLN): - action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); - state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(keycode)); - if (!record->event.pressed && state != NULL && state->count && !state->finished) { - tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; - tap_code16(tap_hold->tap); - } - } - return true; -} -``` diff --git a/docs/ChangeLog/20251130.md b/docs/ChangeLog/20251130.md new file mode 100644 index 000000000000..b86d630fa82c --- /dev/null +++ b/docs/ChangeLog/20251130.md @@ -0,0 +1,190 @@ +# QMK Breaking Changes - 2025 Nov 30 Changelog + +## Notable Features {#notable-features} + +### Speculative Hold option for mod-taps: hold mods instantly while unsettled [#25572](https://github.com/qmk/qmk_firmware/pull/25572) + +Speculative Hold makes mod-tap keys more responsive by applying the modifier instantly on keydown, before the tap-hold decision is made. This is especially useful for actions like Shift+click and Ctrl+scroll wheel with an external mouse, which can feel laggy with standard mod-taps. + +The firmware holds the modifier speculatively. Once the key's behavior is settled: + +* If held, the modifier remains active as expected until the key is released. +* If tapped, the speculative modifier is canceled just before the tapping keycode is sent. + +Speculative Hold applies the modifier early but does not change the underlying tap-hold decision logic. Speculative Hold is compatible to use in combination with any other tap-hold options. + +see the [Speculative Hold](../tap_hold#speculative-hold) documentation for more information. + +## Changes Requiring User Action + +### Updated Keyboard Codebases + +| Old Keyboard Name | New Keyboard Name | +|----------------------------------|-------------------------| +| 0xcb/splaytoraid/32u4 | 0xcb/splaytoraid | +| 0xcb/splaytoraid/rp2040_ce | 0xcb/splaytoraid | +| 1upkeyboards/sweet16v2/kb2040 | 1upkeyboards/sweet16v2 | +| 1upkeyboards/sweet16v2/pro_micro | 1upkeyboards/sweet16v2 | +| 40percentclub/gherkin/kb2040 | 40percentclub/gherkin | +| 40percentclub/gherkin/pro_micro | 40percentclub/gherkin | +| durgod/dgk6x/venus | durgod/dgk6x/venus_ansi | + +### Reduce tap dance memory usage, move state out of data [#25415](https://github.com/qmk/qmk_firmware/pull/25415) + +The tap dance state has been separated from the action structure. Custom tap dance functions now receive the state as a separate parameter instead of accessing it through `action->state`. + +If your keymap uses custom tap dance functions that access the tap dance state, you need to update your code. + +* You can't use `action->state`. Instead you need to call `tap_dance_state_t *tap_dance_get_state(uint8_t tap_dance_idx)` to get the state. +* You now get a pointer to the state, so use `->` notation rather than `.` notation to get fields from it. + +### Before: +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_action_t *action; + + switch (keycode) { + case TD(CT_CLN): + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); + if (!record->event.pressed && action->state.count && !action->state.finished) { + tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; + tap_code16(tap_hold->tap); + } + + } + return true; +} +``` +### After: +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_action_t *action; + tap_dance_state_t* state; + switch (keycode) { + case TD(CT_CLN): + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); + state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(keycode)); + if (!record->event.pressed && state != NULL && state->count && !state->finished) { + tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; + tap_code16(tap_hold->tap); + } + } + return true; +} +``` + +## Deprecation Notices + +In line with the [notice period](../support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here. + +### Remove override of QK_{LED,RGB}_MATRIX_TOGGLE keycode [#25672](https://github.com/qmk/qmk_firmware/pull/25672) + +[#24649](https://github.com/qmk/qmk_firmware/pull/24649) implemented genetic behavior, including keycodes, to cycle flags. + +Any overriding of existing keycodes that duplicate this behavior will be removed to ensure consistency with core functionality. + +## Full changelist + +Core: +* suspend: suppress wake up keypress ([#23389](https://github.com/qmk/qmk_firmware/pull/23389)) +* [Feature Improvement]add option to keep layer state when recording dynamic macros ([#24418](https://github.com/qmk/qmk_firmware/pull/24418)) +* Add generic handling to cycle LED/RGB Matrix flags ([#24649](https://github.com/qmk/qmk_firmware/pull/24649)) +* Implement `mod_t` packed struct ([#25168](https://github.com/qmk/qmk_firmware/pull/25168)) +* Implement minimal connection update logic ([#25334](https://github.com/qmk/qmk_firmware/pull/25334)) +* Reduce tap dance memory usage, move state out of data ([#25415](https://github.com/qmk/qmk_firmware/pull/25415)) +* Refactor debounce algorithm with static allocation ([#25515](https://github.com/qmk/qmk_firmware/pull/25515)) +* Restructure Pixel Rain interval code ([#25516](https://github.com/qmk/qmk_firmware/pull/25516)) +* Guard remapping logic with MAGIC_ENABLE ([#25537](https://github.com/qmk/qmk_firmware/pull/25537)) +* Update default OLED font ([#25565](https://github.com/qmk/qmk_firmware/pull/25565)) +* Speculative Hold option for mod-taps: hold mods instantly while unsettled. ([#25572](https://github.com/qmk/qmk_firmware/pull/25572)) +* Simplify hue calculation in raindrops animation ([#25587](https://github.com/qmk/qmk_firmware/pull/25587)) +* Simplify tap_code16_delay ([#25595](https://github.com/qmk/qmk_firmware/pull/25595)) +* Debounce: Deprecate num_rows parameter ([#25632](https://github.com/qmk/qmk_firmware/pull/25632)) +* Add I2C Transmit and Receive function ([#25637](https://github.com/qmk/qmk_firmware/pull/25637)) +* [QP] Minor cleanup and support for RGB888 surface ([#25706](https://github.com/qmk/qmk_firmware/pull/25706)) +* Restrict mouse timer activation to movement keycodes ([#25716](https://github.com/qmk/qmk_firmware/pull/25716)) +* Update STM32F446 default HSE to 8MHz ([#25717](https://github.com/qmk/qmk_firmware/pull/25717)) +* making flowtap timer public so it can be used easily with combos ([#25731](https://github.com/qmk/qmk_firmware/pull/25731)) +* Add PixArt PAW-3222 mouse sensor driver ([#25763](https://github.com/qmk/qmk_firmware/pull/25763)) +* Merge upstream uf2conv changes ([#25786](https://github.com/qmk/qmk_firmware/pull/25786)) +* Partially skip generating community modules when none enabled ([#25819](https://github.com/qmk/qmk_firmware/pull/25819)) + +CLI: +* Generate default encoder resolution for sparse config ([#25247](https://github.com/qmk/qmk_firmware/pull/25247)) +* Add DIP Switch map support to keymap.json ([#25431](https://github.com/qmk/qmk_firmware/pull/25431)) +* Add return code to `qmk userspace-doctor` ([#25775](https://github.com/qmk/qmk_firmware/pull/25775)) +* Better defaulting of `{RGB,LED}_MATRIX_DEFAULT_FLAGS` ([#25785](https://github.com/qmk/qmk_firmware/pull/25785)) +* add BCD versions of QMK Version ([#25804](https://github.com/qmk/qmk_firmware/pull/25804)) +* Lint error on missing keyboard readme ([#25814](https://github.com/qmk/qmk_firmware/pull/25814)) + +Submodule updates: +* Update ChibiOS-Contrib. ([#25751](https://github.com/qmk/qmk_firmware/pull/25751)) + +Keyboards: +* `atreus`: restore intended matrix implementations ([#24082](https://github.com/qmk/qmk_firmware/pull/24082)) +* add SteelSeries prime, a stripped down prime+ ([#24719](https://github.com/qmk/qmk_firmware/pull/24719)) +* Add new macropad Sharkropad ([#24961](https://github.com/qmk/qmk_firmware/pull/24961)) +* Addition of the D60B tsangan pcb ([#25245](https://github.com/qmk/qmk_firmware/pull/25245)) +* Migrate `eeconfig_init_kb` implementations to config ([#25422](https://github.com/qmk/qmk_firmware/pull/25422)) +* Generate `CUSTOM_MATRIX = lite` without `matrix_pins.custom` ([#25453](https://github.com/qmk/qmk_firmware/pull/25453)) +* Add classic48 keyboard ([#25492](https://github.com/qmk/qmk_firmware/pull/25492)) +* add durgod venus iso support ([#25526](https://github.com/qmk/qmk_firmware/pull/25526)) +* Migrate `g_led_config` to DD (0-9, A) ([#25558](https://github.com/qmk/qmk_firmware/pull/25558)) +* Migrate `g_led_config` to DD (B, C) ([#25559](https://github.com/qmk/qmk_firmware/pull/25559)) +* Migrate `g_led_config` to DD (D) ([#25560](https://github.com/qmk/qmk_firmware/pull/25560)) +* Migrate `g_led_config` to DD (E, F) ([#25561](https://github.com/qmk/qmk_firmware/pull/25561)) +* Remove duplication of RP2040 config defaults ([#25563](https://github.com/qmk/qmk_firmware/pull/25563)) +* Refactor 40percentclub/ut47 ([#25571](https://github.com/qmk/qmk_firmware/pull/25571)) +* E7-V2 Implementation ([#25594](https://github.com/qmk/qmk_firmware/pull/25594)) +* Migrate `g_led_config` to DD (G) ([#25598](https://github.com/qmk/qmk_firmware/pull/25598)) +* Migrate `g_led_config` to DD (H) ([#25599](https://github.com/qmk/qmk_firmware/pull/25599)) +* Migrate `g_led_config` to DD (I) ([#25600](https://github.com/qmk/qmk_firmware/pull/25600)) +* Migrate `g_led_config` to DD (JK1) ([#25601](https://github.com/qmk/qmk_firmware/pull/25601)) +* Migrate `g_led_config` to DD (K2) ([#25602](https://github.com/qmk/qmk_firmware/pull/25602)) +* Migrate `g_led_config` to DD (K3) ([#25603](https://github.com/qmk/qmk_firmware/pull/25603)) +* Migrate `g_led_config` to DD (K4) ([#25605](https://github.com/qmk/qmk_firmware/pull/25605)) +* Migrate `g_led_config` to DD (K5) ([#25606](https://github.com/qmk/qmk_firmware/pull/25606)) +* Migrate `g_led_config` to DD (K6) ([#25607](https://github.com/qmk/qmk_firmware/pull/25607)) +* Refactor `40percentclub/gherkin` ([#25608](https://github.com/qmk/qmk_firmware/pull/25608)) +* Refactor `0xcb/splaytoraid` ([#25609](https://github.com/qmk/qmk_firmware/pull/25609)) +* Refactor `1upkeyboards/sweet16v2` ([#25610](https://github.com/qmk/qmk_firmware/pull/25610)) +* Migrate `g_led_config` to DD (K7) ([#25616](https://github.com/qmk/qmk_firmware/pull/25616)) +* Migrate `g_led_config` to DD (L) ([#25617](https://github.com/qmk/qmk_firmware/pull/25617)) +* Migrate `g_led_config` to DD (M1) ([#25618](https://github.com/qmk/qmk_firmware/pull/25618)) +* Migrate `g_led_config` to DD (M2) ([#25619](https://github.com/qmk/qmk_firmware/pull/25619)) +* Migrate `g_led_config` to DD (M3) ([#25620](https://github.com/qmk/qmk_firmware/pull/25620)) +* Migrate `g_led_config` to DD (NO) ([#25621](https://github.com/qmk/qmk_firmware/pull/25621)) +* Migrate `g_led_config` to DD (P) ([#25622](https://github.com/qmk/qmk_firmware/pull/25622)) +* Migrate `g_led_config` to DD (QR) ([#25623](https://github.com/qmk/qmk_firmware/pull/25623)) +* Migrate `g_led_config` to DD (S) ([#25624](https://github.com/qmk/qmk_firmware/pull/25624)) +* Migrate `g_led_config` to DD (TUW) ([#25625](https://github.com/qmk/qmk_firmware/pull/25625)) +* Remove idobao *_DISABLE_UNDERGLOW behaviour ([#25638](https://github.com/qmk/qmk_firmware/pull/25638)) +* Migrate `g_led_config` to DD (YZ) ([#25650](https://github.com/qmk/qmk_firmware/pull/25650)) +* Tidy Keebio keyboards ([#25653](https://github.com/qmk/qmk_firmware/pull/25653)) +* Remove encoder resolution where duplicating defaults ([#25654](https://github.com/qmk/qmk_firmware/pull/25654)) +* Custom oled fonts cleanup ([#25665](https://github.com/qmk/qmk_firmware/pull/25665)) +* Binepad KnobX1 - refactor `x1_layer_led` function as weak ([#25668](https://github.com/qmk/qmk_firmware/pull/25668)) +* Add DD {LED,RGB}_MATRIX_DEFAULT_FLAGS support ([#25671](https://github.com/qmk/qmk_firmware/pull/25671)) +* keyboards: Add Royal Kludge RK61 ([#25694](https://github.com/qmk/qmk_firmware/pull/25694)) +* Add TRKeyboard TRK2 keyboard ([#25754](https://github.com/qmk/qmk_firmware/pull/25754)) + +Keyboard fixes: +* Fixup `kprepublic/bm60hsrgb/rev2` ([#25644](https://github.com/qmk/qmk_firmware/pull/25644)) +* Fixup `kprepublic/bm60hsrgb_iso/rev2` ([#25648](https://github.com/qmk/qmk_firmware/pull/25648)) +* Fixup `kprepublic/bm60hsrgb_poker/rev2` ([#25649](https://github.com/qmk/qmk_firmware/pull/25649)) +* Fixup `rgbkb/pan` ([#25678](https://github.com/qmk/qmk_firmware/pull/25678)) +* Align use of keymap level `_kb` callbacks ([#25774](https://github.com/qmk/qmk_firmware/pull/25774)) + +Others: +* Rework converter docs ([#18314](https://github.com/qmk/qmk_firmware/pull/18314)) +* Update USBaspLoader ISP instructions ([#25590](https://github.com/qmk/qmk_firmware/pull/25590)) +* Add LED/RGB Matrix flags API docs ([#25673](https://github.com/qmk/qmk_firmware/pull/25673)) + +Bugs: +* Fix single key combos activating only once ([#25198](https://github.com/qmk/qmk_firmware/pull/25198)) +* Fix RGB matrix not syncing and turning off properly on timeout ([#25467](https://github.com/qmk/qmk_firmware/pull/25467)) +* Fix drv haptics docs by using the correct function name ([#25733](https://github.com/qmk/qmk_firmware/pull/25733)) +* Fix Magic GUI masking logic ([#25780](https://github.com/qmk/qmk_firmware/pull/25780)) +* Fix Speculative Hold to enable also right-handed RSFT, RCTL by default. ([#25797](https://github.com/qmk/qmk_firmware/pull/25797)) +* Fix community layout keymap discovery ([#25802](https://github.com/qmk/qmk_firmware/pull/25802)) +* Fix preference of output file for 'qmk generate-autocorrect-data' ([#25818](https://github.com/qmk/qmk_firmware/pull/25818)) diff --git a/docs/ChangeLog/20251130/PR25515.md b/docs/ChangeLog/20251130/PR25515.md deleted file mode 100644 index ccc88e0c64ce..000000000000 --- a/docs/ChangeLog/20251130/PR25515.md +++ /dev/null @@ -1,3 +0,0 @@ -# Refactor debounce algorithm with static allocation [#25515](https://github.com/qmk/qmk_firmware/pull/25515) - -Removed dynamic memory allocation (malloc, free) from all debounce implementations for improved efficiency on embedded systems and to avoid runtime allocation overhead. Refactored state arrays to use direct indexing, simplifying code and eliminating pointer arithmetic. Standardized usage of MATRIX_ROWS_PER_HAND throughout the codebase to ensure consistent support for split keyboards. diff --git a/docs/ChangeLog/20251130/PR25632.md b/docs/ChangeLog/20251130/PR25632.md deleted file mode 100644 index 39136067b97a..000000000000 --- a/docs/ChangeLog/20251130/PR25632.md +++ /dev/null @@ -1,4 +0,0 @@ -# Changes Requiring User Action -## Debounce: Deprecate init and remove num_rows parameter [#25632](https://github.com/qmk/qmk_firmware/pull/25632) - -With dynamic memory allocation removed from all debounce implementations ([#25515](https://github.com/qmk/qmk_firmware/pull/25515)), the `num_rows` parameter has been removed from the `debounce_init()` and `debounce()` functions. The `MATRIX_ROWS_PER_HAND` is now used by default in every implementation. diff --git a/docs/_sidebar.json b/docs/_sidebar.json index d237b0e1d01b..2531de2b1ea5 100644 --- a/docs/_sidebar.json +++ b/docs/_sidebar.json @@ -214,7 +214,7 @@ { "text": "My Pull Request Was Flagged", "link": "/breaking_changes_instructions" }, { "text": "Most Recent ChangeLog", - "link": "/ChangeLog/20250831" + "link": "/ChangeLog/20251130" }, { "text": "Past Breaking Changes", "link": "/breaking_changes_history" }, { "text": "Deprecation Policy", "link": "/support_deprecation_policy" } diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index 1e9335d8bc3e..9dd995500cb7 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -10,25 +10,25 @@ Practically, this means QMK merges the `develop` branch into the `master` branch ## What has been included in past Breaking Changes? +* [2025 Nov 30](ChangeLog/20251130) * [2025 Aug 31](ChangeLog/20250831) * [2025 May 25](ChangeLog/20250525) -* [2025 Feb 23](ChangeLog/20250223) * [Older Breaking Changes](breaking_changes_history) ## When is the next Breaking Change? -The next Breaking Change is scheduled for November 30, 2025. +The next Breaking Change is scheduled for February 22, 2026. ### Important Dates -* 2025 Aug 31 - `develop` is tagged with a new release version. Each push to `master` is subsequently merged to `develop` by GitHub actions. -* 2025 Nov 2 - `develop` closed to new PRs. -* 2025 Nov 2 - Call for testers. -* 2025 Nov 16 - Last day for merges -- after this point `develop` is locked for testing and accepts only bugfixes -* 2025 Nov 23 - `develop` is locked, only critical bugfix PRs merged. -* 2025 Nov 28 - `master` is locked, no PRs merged. -* 2025 Nov 30 - Merge `develop` to `master`. -* 2025 Nov 30 - `master` is unlocked. PRs can be merged again. +* 2025 Nov 30 - `develop` is tagged with a new release version. Each push to `master` is subsequently merged to `develop` by GitHub actions. +* 2026 Jan 25 - `develop` closed to new PRs. +* 2026 Jan 25 - Call for testers. +* 2026 Feb 8 - Last day for merges -- after this point `develop` is locked for testing and accepts only bugfixes +* 2026 Feb 15 - `develop` is locked, only critical bugfix PRs merged. +* 2026 Feb 20 - `master` is locked, no PRs merged. +* 2026 Feb 22 - Merge `develop` to `master`. +* 2026 Feb 22 - `master` is unlocked. PRs can be merged again. ## What changes will be included? diff --git a/docs/breaking_changes_history.md b/docs/breaking_changes_history.md index 29ceb09db7dc..2db767c5ec2f 100644 --- a/docs/breaking_changes_history.md +++ b/docs/breaking_changes_history.md @@ -2,6 +2,7 @@ This page links to all previous changelogs from the QMK Breaking Changes process. +* [2025 Nov 30](ChangeLog/20251130) - version 0.31.0 * [2025 Aug 31](ChangeLog/20250831) - version 0.30.0 * [2025 May 25](ChangeLog/20250525) - version 0.29.0 * [2025 Feb 23](ChangeLog/20250223) - version 0.28.0 From e10429baae2a4b3ffec67fe31a5e1ac3212817f0 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 1 Dec 2025 22:03:23 +0000 Subject: [PATCH 1147/1205] Merge point for 2025q4 breaking changes. --- readme.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/readme.md b/readme.md index e5c0d41b7b36..62aed1206623 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,3 @@ -# THIS IS THE DEVELOP BRANCH - -Warning- This is the `develop` branch of QMK Firmware. You may encounter broken code here. Please see [Breaking Changes](https://docs.qmk.fm/#/breaking_changes) for more information. - # Quantum Mechanical Keyboard Firmware [![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) From d4f04fe850c155b33a181e0e3d8d3351c483d305 Mon Sep 17 00:00:00 2001 From: tyler Date: Thu, 4 Dec 2025 06:13:20 -0600 Subject: [PATCH 1148/1205] Simplify docs for Key Overrides config (#25787) --- docs/features/key_overrides.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/key_overrides.md b/docs/features/key_overrides.md index e83f0295abad..c0b788bde9e3 100644 --- a/docs/features/key_overrides.md +++ b/docs/features/key_overrides.md @@ -14,7 +14,7 @@ You can use key overrides in a similar way to momentary layer/fn keys to activat To enable this feature, you need to add `KEY_OVERRIDE_ENABLE = yes` to your `rules.mk`. -Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides`contains pointers to `key_override_t` values (`const key_override_t **`). +Then, in your `keymap.c` file, you'll need to define the `key_overrides` config. See below for more details. ## Creating Key Overrides {#creating-key-overrides} From bf0b88c4234b9f2173da0730dba9176d9a6e9526 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 4 Dec 2025 04:14:37 -0800 Subject: [PATCH 1149/1205] Adapt MIUNI32 keyboard for VIA configurator (#25803) --- keyboards/miuni32/keyboard.json | 8 ++++---- keyboards/miuni32/keymaps/default/keymap.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/keyboards/miuni32/keyboard.json b/keyboards/miuni32/keyboard.json index 1ff7d1a39a42..26c4c7dfffd7 100644 --- a/keyboards/miuni32/keyboard.json +++ b/keyboards/miuni32/keyboard.json @@ -3,8 +3,8 @@ "manufacturer": "Bigtuna.io", "maintainer": "qmk", "usb": { - "vid": "0xFEED", - "pid": "0x6060", + "vid": "0x41FA", + "pid": "0xAAEF", "device_version": "0.0.1" }, "rgblight": { @@ -80,8 +80,8 @@ {"matrix": [2, 0], "x": 0, "y": 2}, {"matrix": [2, 1], "x": 1, "y": 2}, {"matrix": [2, 2], "x": 2, "y": 2}, - {"matrix": [2, 3], "x": 3, "y": 2, "w": 2}, - {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2, "w": 2}, {"matrix": [2, 6], "x": 6, "y": 2}, {"matrix": [2, 7], "x": 7, "y": 2}, {"matrix": [2, 8], "x": 8, "y": 2}, diff --git a/keyboards/miuni32/keymaps/default/keymap.c b/keyboards/miuni32/keymaps/default/keymap.c index 878d09573006..2bf2dab2b05f 100644 --- a/keyboards/miuni32/keymaps/default/keymap.c +++ b/keyboards/miuni32/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2025 BigTuna.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { From d39015a4011e53612e117ac4091444bf67792105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20Kr=C3=B3likowski?= Date: Thu, 4 Dec 2025 13:15:43 +0100 Subject: [PATCH 1150/1205] [DOCS] Add `keycodes` to `info.json` docs. More precise matrix masking info (#25801) --- docs/reference_info_json.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 91ab7f4577ad..301e4b12dd0c 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -327,6 +327,21 @@ Configures the [LED Indicators](features/led_indicators) feature. * `scroll_lock` Pin * The GPIO pin connected to the Scroll Lock LED. +## (Custom) Keycodes {#keycodes} + +Defines [custom keycodes](custom_quantum_functions#definining-a-new-keycode) for use within keymaps. + +* `keycodes` Array: Object + * A list of keycode objects. + * `key` String Required + * The enum name of the custom keycode. + * Example: `LAYER_CHANGE_BEEP_ON` + * `label` String + * A short description of the custom keycode. + * `aliases` Array: String + * A list of shortened names for the custom keycode. + * Example: `["LCBON", "LCB_ON"]` + ## Layouts {#layouts} The `layouts` portion of the dictionary contains several nested dictionaries. The outer layer consists of QMK layout names, for example `LAYOUT_60_ansi` or `LAYOUT_60_iso`. @@ -513,7 +528,7 @@ Configures the [LED Matrix](features/led_matrix) feature. * The amount of time to wait between row/col selection and col/row pin reading, in microseconds. * Default: `30` (30 µs) * `masked` Boolean - * Whether configured intersections should be ignored. + * Whether unconfigured intersections should be ignored. * Default: `false` * `rows` Array: Pin * A list of GPIO pins connected to the matrix rows. From 16dde871d73d3b9fd8f4e3f40456caa17d010229 Mon Sep 17 00:00:00 2001 From: Ivan Gromov <38141348+key10iq@users.noreply.github.com> Date: Thu, 4 Dec 2025 23:42:33 +0300 Subject: [PATCH 1151/1205] Add kt60HS-T v3 (#25822) --- .../keyten/kt60hs_t/keymaps/default/keymap.c | 5 +- keyboards/keyten/kt60hs_t/readme.md | 11 +- keyboards/keyten/kt60hs_t/v3/keyboard.json | 282 ++++++++++++++++++ keyboards/keyten/kt60hs_t/v3/readme.md | 27 ++ 4 files changed, 318 insertions(+), 7 deletions(-) create mode 100644 keyboards/keyten/kt60hs_t/v3/keyboard.json create mode 100644 keyboards/keyten/kt60hs_t/v3/readme.md diff --git a/keyboards/keyten/kt60hs_t/keymaps/default/keymap.c b/keyboards/keyten/kt60hs_t/keymaps/default/keymap.c index 38938bf162fd..332586786731 100644 --- a/keyboards/keyten/kt60hs_t/keymaps/default/keymap.c +++ b/keyboards/keyten/kt60hs_t/keymaps/default/keymap.c @@ -1,4 +1,5 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ +// Copyright 2025 key10iq +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H @@ -13,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_60_ansi_tsangan_split_bs_rshift( - 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_TRNS, KC_TRNS, + QK_BOOT, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/keyten/kt60hs_t/readme.md b/keyboards/keyten/kt60hs_t/readme.md index eb02f6bb8f79..a79f1ba06ea7 100644 --- a/keyboards/keyten/kt60hs_t/readme.md +++ b/keyboards/keyten/kt60hs_t/readme.md @@ -2,7 +2,7 @@ 60% MX Hot-Swap Tsangan PCB -![kt60HS-T image](https://i.imgur.com/vM32aoX.jpeg) +![kt60HS-T image](https://live.staticflickr.com/65535/54942233930_c83933dd23_b.jpg) Supports: 1. Split Backspace @@ -10,7 +10,8 @@ Supports: There are two versions of the PCB available. -|Version| Features | -|-------|-------------------------------------------| -|v1 |Blue/Purple PCB / ARM STM32F401 controller | -|v2 |Purple PCB / ARM STM32F072 controller | +|Version| Features | +|-------|---------------------------------------------------------| +|v1 |Blue/Purple PCB / ARM STM32F401 controller | +|v2 |Purple PCB / ARM STM32F072 controller | +|v3 |Purple PCB / ARM STM32F072 controller, different routing | diff --git a/keyboards/keyten/kt60hs_t/v3/keyboard.json b/keyboards/keyten/kt60hs_t/v3/keyboard.json new file mode 100644 index 000000000000..ce087483e0e6 --- /dev/null +++ b/keyboards/keyten/kt60hs_t/v3/keyboard.json @@ -0,0 +1,282 @@ +{ + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["A3", "A4", "B12", "B15", "A7", "B9", "B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"], + "rows": ["B13", "B14", "A5", "A6", "B0"] + }, + "processor": "STM32F072", + "usb": { + "device_version": "3.0.0", + "pid": "0x6010" + }, + "community_layouts": [ + "60_ansi_wkl_split_bs_rshift", + "60_hhkb", + "60_ansi_tsangan_split_bs_rshift" + ], + "layout_aliases": { + "LAYOUT_all": "LAYOUT_60_ansi_tsangan_split_bs_rshift" + }, + "layouts": { + "LAYOUT_60_ansi_wkl_split_bs_rshift": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [2, 13], "x": 14, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [4, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_hhkb": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [2, 13], "x": 14, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [4, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 11], "x": 12.5, "y": 4} + ] + }, + "LAYOUT_60_ansi_tsangan_split_bs_rshift": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [2, 13], "x": 14, "y": 0}, + {"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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [4, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 11], "x": 12.5, "y": 4}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_60_ansi_tsangan_split_rshift": { + "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": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [2, 13], "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": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "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": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 3.25, "y": 3}, + {"matrix": [3, 3], "x": 4.25, "y": 3}, + {"matrix": [3, 4], "x": 5.25, "y": 3}, + {"matrix": [3, 5], "x": 6.25, "y": 3}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + {"matrix": [3, 7], "x": 8.25, "y": 3}, + {"matrix": [3, 8], "x": 9.25, "y": 3}, + {"matrix": [3, 9], "x": 10.25, "y": 3}, + {"matrix": [3, 10], "x": 11.25, "y": 3}, + {"matrix": [4, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"matrix": [4, 1], "x": 1.5, "y": 4}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 11], "x": 12.5, "y": 4}, + {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5} + ] + } + } +} diff --git a/keyboards/keyten/kt60hs_t/v3/readme.md b/keyboards/keyten/kt60hs_t/v3/readme.md new file mode 100644 index 000000000000..b12e49b8ef8b --- /dev/null +++ b/keyboards/keyten/kt60hs_t/v3/readme.md @@ -0,0 +1,27 @@ +# keyten kt60HS-T V3 + +60% MX Hot-Swap Tsangan PCB + +![kt60HS-T image](https://live.staticflickr.com/65535/54942233930_c83933dd23_b.jpg) + +* Keyboard Maintainer: [keyten](https://github.com/key10iq) +* Hardware Supported: keyten kt60HS-T V3 +* Hardware Availability: private GB + +Make example for this keyboard (after setting up your build environment): + + make keyten/kt60hs_t/v3:default + +Flashing example for this keyboard: + + make keyten/kt60hs_t/v3: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* Bootmagic reset: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* Keycode in layout: Press the key mapped to `QK_BOOT` if it is available +* Physical reset button: Hold the button on the back of the PCB From 1322922c420e56ea45534d5fc74365168f5bf487 Mon Sep 17 00:00:00 2001 From: Ivan Gromov <38141348+key10iq@users.noreply.github.com> Date: Thu, 4 Dec 2025 23:42:53 +0300 Subject: [PATCH 1152/1205] Add kt356 Mini (#25781) Co-authored-by: Joel Challis --- keyboards/keyten/kt356_mini/keyboard.json | 299 ++++++++++++++++++ .../kt356_mini/keymaps/default/keymap.c | 24 ++ keyboards/keyten/kt356_mini/readme.md | 27 ++ 3 files changed, 350 insertions(+) create mode 100644 keyboards/keyten/kt356_mini/keyboard.json create mode 100644 keyboards/keyten/kt356_mini/keymaps/default/keymap.c create mode 100644 keyboards/keyten/kt356_mini/readme.md diff --git a/keyboards/keyten/kt356_mini/keyboard.json b/keyboards/keyten/kt356_mini/keyboard.json new file mode 100644 index 000000000000..766b254a2cbb --- /dev/null +++ b/keyboards/keyten/kt356_mini/keyboard.json @@ -0,0 +1,299 @@ +{ + "manufacturer": "keyten", + "keyboard_name": "kt356 Mini", + "maintainer": "key10iq", + "processor": "STM32F072", + "bootloader": "stm32-dfu", + "usb": { + "vid": "0xEB69", + "pid": "0x6008", + "device_version": "0.0.1" + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "rows": ["B4", "B5", "A6", "B10", "B11"], + "cols": ["A15", "F1", "F0", "C14", "A3", "C13", "B1", "B9", "A4", "B8", "B0", "B7", "A7", "B6"] + }, + "indicators": { + "caps_lock": "A14" + }, + "community_layouts": [ + "60_ansi", + "60_ansi_split_bs_rshift", + "60_ansi_tsangan", + "60_ansi_tsangan_split_bs_rshift" + ], + "layout_aliases": { + "LAYOUT_all": "LAYOUT_60_ansi_split_bs_rshift" + }, + "layouts": { + "LAYOUT_60_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": [0, 9], "x": 9, "y": 0 }, + { "matrix": [0, 10], "x": 10, "y": 0 }, + { "matrix": [0, 11], "x": 11, "y": 0 }, + { "matrix": [0, 12], "x": 12, "y": 0 }, + { "matrix": [2, 13], "w": 2, "x": 13, "y": 0 }, + { "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1 }, + { "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": [1, 9], "x": 9.5, "y": 1 }, + { "matrix": [1, 10], "x": 10.5, "y": 1 }, + { "matrix": [1, 11], "x": 11.5, "y": 1 }, + { "matrix": [1, 12], "x": 12.5, "y": 1 }, + { "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "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": [2, 9], "x": 9.75, "y": 2 }, + { "matrix": [2, 10], "x": 10.75, "y": 2 }, + { "matrix": [2, 11], "x": 11.75, "y": 2 }, + { "matrix": [2, 12], "w": 2.25, "x": 12.75, "y": 2 }, + { "matrix": [3, 0], "w": 2.25, "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 2.25, "y": 3 }, + { "matrix": [3, 2], "x": 3.25, "y": 3 }, + { "matrix": [3, 3], "x": 4.25, "y": 3 }, + { "matrix": [3, 4], "x": 5.25, "y": 3 }, + { "matrix": [3, 5], "x": 6.25, "y": 3 }, + { "matrix": [3, 6], "x": 7.25, "y": 3 }, + { "matrix": [3, 7], "x": 8.25, "y": 3 }, + { "matrix": [3, 8], "x": 9.25, "y": 3 }, + { "matrix": [3, 9], "x": 10.25, "y": 3 }, + { "matrix": [3, 10], "x": 11.25, "y": 3 }, + { "matrix": [3, 12], "w": 2.75, "x": 12.25, "y": 3 }, + { "matrix": [4, 0], "w": 1.25, "x": 0, "y": 4 }, + { "matrix": [4, 1], "w": 1.25, "x": 1.25, "y": 4 }, + { "matrix": [4, 2], "w": 1.25, "x": 2.5, "y": 4 }, + { "matrix": [4, 6], "w": 6.25, "x": 3.75, "y": 4 }, + { "matrix": [4, 9], "w": 1.25, "x": 10, "y": 4 }, + { "matrix": [4, 10], "w": 1.25, "x": 11.25, "y": 4 }, + { "matrix": [4, 11], "w": 1.25, "x": 12.5, "y": 4 }, + { "matrix": [4, 13], "w": 1.25, "x": 13.75, "y": 4 } + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "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": [0, 9], "x": 9, "y": 0 }, + { "matrix": [0, 10], "x": 10, "y": 0 }, + { "matrix": [0, 11], "x": 11, "y": 0 }, + { "matrix": [0, 12], "x": 12, "y": 0 }, + { "matrix": [0, 13], "x": 13, "y": 0 }, + { "matrix": [2, 13], "x": 14, "y": 0 }, + { "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1 }, + { "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": [1, 9], "x": 9.5, "y": 1 }, + { "matrix": [1, 10], "x": 10.5, "y": 1 }, + { "matrix": [1, 11], "x": 11.5, "y": 1 }, + { "matrix": [1, 12], "x": 12.5, "y": 1 }, + { "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "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": [2, 9], "x": 9.75, "y": 2 }, + { "matrix": [2, 10], "x": 10.75, "y": 2 }, + { "matrix": [2, 11], "x": 11.75, "y": 2 }, + { "matrix": [2, 12], "w": 2.25, "x": 12.75, "y": 2 }, + { "matrix": [3, 0], "w": 2.25, "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 2.25, "y": 3 }, + { "matrix": [3, 2], "x": 3.25, "y": 3 }, + { "matrix": [3, 3], "x": 4.25, "y": 3 }, + { "matrix": [3, 4], "x": 5.25, "y": 3 }, + { "matrix": [3, 5], "x": 6.25, "y": 3 }, + { "matrix": [3, 6], "x": 7.25, "y": 3 }, + { "matrix": [3, 7], "x": 8.25, "y": 3 }, + { "matrix": [3, 8], "x": 9.25, "y": 3 }, + { "matrix": [3, 9], "x": 10.25, "y": 3 }, + { "matrix": [3, 10], "x": 11.25, "y": 3 }, + { "matrix": [3, 12], "w": 1.75, "x": 12.25, "y": 3 }, + { "matrix": [3, 13], "x": 14, "y": 3 }, + { "matrix": [4, 0], "w": 1.25, "x": 0, "y": 4 }, + { "matrix": [4, 1], "w": 1.25, "x": 1.25, "y": 4 }, + { "matrix": [4, 2], "w": 1.25, "x": 2.5, "y": 4 }, + { "matrix": [4, 6], "w": 6.25, "x": 3.75, "y": 4 }, + { "matrix": [4, 9], "w": 1.25, "x": 10, "y": 4 }, + { "matrix": [4, 10], "w": 1.25, "x": 11.25, "y": 4 }, + { "matrix": [4, 11], "w": 1.25, "x": 12.5, "y": 4 }, + { "matrix": [4, 13], "w": 1.25, "x": 13.75, "y": 4 } + ] + }, + "LAYOUT_60_ansi_tsangan": { + "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": [0, 9], "x": 9, "y": 0 }, + { "matrix": [0, 10], "x": 10, "y": 0 }, + { "matrix": [0, 11], "x": 11, "y": 0 }, + { "matrix": [0, 12], "x": 12, "y": 0 }, + { "matrix": [2, 13], "w": 2, "x": 13, "y": 0 }, + { "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1 }, + { "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": [1, 9], "x": 9.5, "y": 1 }, + { "matrix": [1, 10], "x": 10.5, "y": 1 }, + { "matrix": [1, 11], "x": 11.5, "y": 1 }, + { "matrix": [1, 12], "x": 12.5, "y": 1 }, + { "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "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": [2, 9], "x": 9.75, "y": 2 }, + { "matrix": [2, 10], "x": 10.75, "y": 2 }, + { "matrix": [2, 11], "x": 11.75, "y": 2 }, + { "matrix": [2, 12], "w": 2.25, "x": 12.75, "y": 2 }, + { "matrix": [3, 0], "w": 2.25, "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 2.25, "y": 3 }, + { "matrix": [3, 2], "x": 3.25, "y": 3 }, + { "matrix": [3, 3], "x": 4.25, "y": 3 }, + { "matrix": [3, 4], "x": 5.25, "y": 3 }, + { "matrix": [3, 5], "x": 6.25, "y": 3 }, + { "matrix": [3, 6], "x": 7.25, "y": 3 }, + { "matrix": [3, 7], "x": 8.25, "y": 3 }, + { "matrix": [3, 8], "x": 9.25, "y": 3 }, + { "matrix": [3, 9], "x": 10.25, "y": 3 }, + { "matrix": [3, 10], "x": 11.25, "y": 3 }, + { "matrix": [3, 12], "w": 2.75, "x": 12.25, "y": 3 }, + { "matrix": [4, 0], "w": 1.5, "x": 0, "y": 4 }, + { "matrix": [4, 1], "x": 1.5, "y": 4 }, + { "matrix": [4, 2], "w": 1.5, "x": 2.5, "y": 4 }, + { "matrix": [4, 6], "w": 7, "x": 4, "y": 4 }, + { "matrix": [4, 10], "w": 1.5, "x": 11, "y": 4 }, + { "matrix": [4, 11], "x": 12.5, "y": 4 }, + { "matrix": [4, 13], "w": 1.5, "x": 13.5, "y": 4 } + ] + }, + "LAYOUT_60_ansi_tsangan_split_bs_rshift": { + "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": [0, 9], "x": 9, "y": 0 }, + { "matrix": [0, 10], "x": 10, "y": 0 }, + { "matrix": [0, 11], "x": 11, "y": 0 }, + { "matrix": [0, 12], "x": 12, "y": 0 }, + { "matrix": [0, 13], "x": 13, "y": 0 }, + { "matrix": [2, 13], "x": 14, "y": 0 }, + { "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1 }, + { "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": [1, 9], "x": 9.5, "y": 1 }, + { "matrix": [1, 10], "x": 10.5, "y": 1 }, + { "matrix": [1, 11], "x": 11.5, "y": 1 }, + { "matrix": [1, 12], "x": 12.5, "y": 1 }, + { "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "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": [2, 9], "x": 9.75, "y": 2 }, + { "matrix": [2, 10], "x": 10.75, "y": 2 }, + { "matrix": [2, 11], "x": 11.75, "y": 2 }, + { "matrix": [2, 12], "w": 2.25, "x": 12.75, "y": 2 }, + { "matrix": [3, 0], "w": 2.25, "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 2.25, "y": 3 }, + { "matrix": [3, 2], "x": 3.25, "y": 3 }, + { "matrix": [3, 3], "x": 4.25, "y": 3 }, + { "matrix": [3, 4], "x": 5.25, "y": 3 }, + { "matrix": [3, 5], "x": 6.25, "y": 3 }, + { "matrix": [3, 6], "x": 7.25, "y": 3 }, + { "matrix": [3, 7], "x": 8.25, "y": 3 }, + { "matrix": [3, 8], "x": 9.25, "y": 3 }, + { "matrix": [3, 9], "x": 10.25, "y": 3 }, + { "matrix": [3, 10], "x": 11.25, "y": 3 }, + { "matrix": [3, 12], "w": 1.75, "x": 12.25, "y": 3 }, + { "matrix": [3, 13], "x": 14, "y": 3 }, + { "matrix": [4, 0], "w": 1.5, "x": 0, "y": 4 }, + { "matrix": [4, 1], "x": 1.5, "y": 4 }, + { "matrix": [4, 2], "w": 1.5, "x": 2.5, "y": 4 }, + { "matrix": [4, 6], "w": 7, "x": 4, "y": 4 }, + { "matrix": [4, 10], "w": 1.5, "x": 11, "y": 4 }, + { "matrix": [4, 11], "x": 12.5, "y": 4 }, + { "matrix": [4, 13], "w": 1.5, "x": 13.5, "y": 4 } + ] + } + } +} diff --git a/keyboards/keyten/kt356_mini/keymaps/default/keymap.c b/keyboards/keyten/kt356_mini/keymaps/default/keymap.c new file mode 100644 index 000000000000..3499921fd58d --- /dev/null +++ b/keyboards/keyten/kt356_mini/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +// Copyright 2025 key10iq +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_60_ansi_split_bs_rshift( + KC_ESC, 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_GRV, 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, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_60_ansi_split_bs_rshift( + QK_BOOT, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) + +}; diff --git a/keyboards/keyten/kt356_mini/readme.md b/keyboards/keyten/kt356_mini/readme.md new file mode 100644 index 000000000000..beac4d0260b5 --- /dev/null +++ b/keyboards/keyten/kt356_mini/readme.md @@ -0,0 +1,27 @@ +# keyten kt356 Mini + +Replacement PCB for the OTD (and UTD) 356 Mini keyboard. + +![kt356 Mini image](https://live.staticflickr.com/65535/54907825962_65a650ce4c_b.jpg) + +* Keyboard Maintainer: [keyten](https://github.com/key10iq) +* Hardware Supported: keyten kt356 Mini +* Hardware Availability: private GB + +Make example for this keyboard (after setting up your build environment): + + make keyten/kt356_mini:default + +Flashing example for this keyboard: + + make keyten/kt356_mini: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* Bootmagic reset: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* Keycode in layout: Press the key mapped to `QK_BOOT` if it is available +* Physical reset button: Hold the button on the back of the PCB From 08e5fcfdf44c73fbbc8887b100fccd00006aa02e Mon Sep 17 00:00:00 2001 From: psych3r Date: Sat, 6 Dec 2025 00:25:48 +0200 Subject: [PATCH 1153/1205] Fix USER_PATH resolution on case-insensitive filesystems (#25853) When QMK_USERSPACE is empty, the wildcard check in build_keyboard.mk incorrectly matches user home directories on case-insensitive filesystems (macOS/Windows), causing USER_PATH to resolve to an absolute path instead of a relative path. This only affects users whose username matches their user directory name (e.g., username 'psycher' with home '/Users/psycher' and QMK user dir 'users/psycher'). Fix by checking if QMK_USERSPACE is non-empty before performing the wildcard check. --- builddefs/build_keyboard.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index dae8c07e3e37..0df95342f937 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -474,8 +474,10 @@ ifneq ($(wildcard $(QMK_USERSPACE)),) endif # If the equivalent users directory exists in userspace, use that in preference to anything currently in the main repo -ifneq ($(wildcard $(QMK_USERSPACE)/$(USER_PATH)),) - USER_PATH := $(QMK_USERSPACE)/$(USER_PATH) +ifneq ($(QMK_USERSPACE),) + ifneq ($(wildcard $(QMK_USERSPACE)/$(USER_PATH)),) + USER_PATH := $(QMK_USERSPACE)/$(USER_PATH) + endif endif # Pull in user level rules.mk From de8f05b4c33bcd1a3e765fa21146bcb56bf3349b Mon Sep 17 00:00:00 2001 From: Fabian Felix Selbach Date: Mon, 8 Dec 2025 21:21:12 +0100 Subject: [PATCH 1154/1205] [Keyboard] Add support for Alpha FS (#25756) --- .../fabiclawz/alpha_fs/keyboard.json | 268 ++++++++++++++++++ .../alpha_fs/keymaps/default/keymap.c | 16 ++ .../handwired/fabiclawz/alpha_fs/readme.md | 28 ++ 3 files changed, 312 insertions(+) create mode 100644 keyboards/handwired/fabiclawz/alpha_fs/keyboard.json create mode 100644 keyboards/handwired/fabiclawz/alpha_fs/keymaps/default/keymap.c create mode 100644 keyboards/handwired/fabiclawz/alpha_fs/readme.md diff --git a/keyboards/handwired/fabiclawz/alpha_fs/keyboard.json b/keyboards/handwired/fabiclawz/alpha_fs/keyboard.json new file mode 100644 index 000000000000..0d694857733e --- /dev/null +++ b/keyboards/handwired/fabiclawz/alpha_fs/keyboard.json @@ -0,0 +1,268 @@ +{ + "manufacturer": "FabiClawZ", + "keyboard_name": "handwired/fabiclawz/alpha_fs", + "maintainer": "FFS2309", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["GP0", "GP1", "GP2", "GP3", "GP4", "GP5", "GP6", "GP7", "GP8", "GP9", "GP10"], + "rows": ["GP14", "GP15", "GP16", "GP17", "GP18", "GP19", "GP20", "GP21", "GP22", "GP26"] + }, + "processor": "RP2040", + "rgb_matrix": { + "animations": { + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "multisplash": true, + "solid_reactive_simple": true, + "typing_heatmap": true + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 13, "y": 0, "flags": 1}, + {"matrix": [9, 1], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 1}, + {"matrix": [9, 2], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 57, "y": 0, "flags": 1}, + {"matrix": [9, 3], "x": 68, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 78, "y": 0, "flags": 1}, + {"matrix": [9, 4], "x": 89, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 102, "y": 0, "flags": 1}, + {"matrix": [9, 5], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 123, "y": 0, "flags": 1}, + {"matrix": [9, 6], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 146, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 159, "y": 0, "flags": 1}, + {"matrix": [7, 8], "x": 169, "y": 0, "flags": 1}, + {"matrix": [8, 8], "x": 180, "y": 0, "flags": 1}, + {"matrix": [9, 8], "x": 193, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 203, "y": 0, "flags": 1}, + {"matrix": [1, 10], "x": 214, "y": 0, "flags": 1}, + {"matrix": [2, 10], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 10, "y": 15, "flags": 4}, + {"matrix": [8, 1], "x": 21, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 31, "y": 15, "flags": 4}, + {"matrix": [8, 2], "x": 42, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 15, "flags": 4}, + {"matrix": [8, 3], "x": 63, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 73, "y": 15, "flags": 4}, + {"matrix": [8, 4], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 94, "y": 15, "flags": 4}, + {"matrix": [8, 5], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 115, "y": 15, "flags": 4}, + {"matrix": [8, 6], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 141, "y": 15, "flags": 1}, + {"matrix": [1, 8], "x": 159, "y": 15, "flags": 1}, + {"matrix": [6, 8], "x": 169, "y": 15, "flags": 1}, + {"matrix": [5, 8], "x": 180, "y": 15, "flags": 1}, + {"matrix": [3, 10], "x": 193, "y": 15, "flags": 8}, + {"matrix": [4, 10], "x": 203, "y": 15, "flags": 4}, + {"matrix": [5, 10], "x": 214, "y": 15, "flags": 4}, + {"matrix": [6, 10], "x": 224, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 27, "flags": 1}, + {"matrix": [2, 1], "x": 16, "y": 27, "flags": 4}, + {"matrix": [7, 1], "x": 26, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 36, "y": 27, "flags": 4}, + {"matrix": [7, 2], "x": 47, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 57, "y": 27, "flags": 4}, + {"matrix": [7, 3], "x": 68, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 78, "y": 27, "flags": 4}, + {"matrix": [7, 4], "x": 89, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 99, "y": 27, "flags": 4}, + {"matrix": [7, 5], "x": 109, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 120, "y": 27, "flags": 4}, + {"matrix": [7, 6], "x": 130, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 147, "y": 20, "flags": 1}, + {"matrix": [2, 8], "x": 159, "y": 27, "flags": 1}, + {"matrix": [3, 8], "x": 169, "y": 27, "flags": 1}, + {"matrix": [4, 8], "x": 180, "y": 27, "flags": 1}, + {"matrix": [0, 9], "x": 193, "y": 27, "flags": 4}, + {"matrix": [1, 9], "x": 203, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 214, "y": 27, "flags": 4}, + {"matrix": [7, 10], "x": 224, "y": 34, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 18, "y": 40, "flags": 4}, + {"matrix": [6, 1], "x": 29, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 39, "y": 40, "flags": 4}, + {"matrix": [6, 2], "x": 50, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 60, "y": 40, "flags": 4}, + {"matrix": [6, 3], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 81, "y": 40, "flags": 4}, + {"matrix": [6, 4], "x": 91, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 102, "y": 40, "flags": 4}, + {"matrix": [6, 5], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 123, "y": 40, "flags": 4}, + {"matrix": [6, 6], "x": 133, "y": 40, "flags": 4}, + {"matrix": [5, 9], "x": 193, "y": 40, "flags": 4}, + {"matrix": [4, 9], "x": 203, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 214, "y": 40, "flags": 4}, + {"matrix": [4, 0], "x": 1, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 13, "y": 52, "flags": 4}, + {"matrix": [5, 1], "x": 23, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 34, "y": 52, "flags": 4}, + {"matrix": [5, 2], "x": 44, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 55, "y": 52, "flags": 4}, + {"matrix": [5, 3], "x": 65, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 76, "y": 52, "flags": 4}, + {"matrix": [5, 4], "x": 86, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 69, "y": 52, "flags": 4}, + {"matrix": [5, 5], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 117, "y": 52, "flags": 4}, + {"matrix": [5, 6], "x": 137, "y": 52, "flags": 1}, + {"matrix": [3, 7], "x": 169, "y": 52, "flags": 1}, + {"matrix": [6, 9], "x": 193, "y": 52, "flags": 4}, + {"matrix": [7, 9], "x": 203, "y": 52, "flags": 4}, + {"matrix": [8, 9], "x": 214, "y": 52, "flags": 4}, + {"matrix": [8, 10], "x": 224, "y": 58, "flags": 1}, + {"matrix": [5, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [6, 0], "x": 14, "y": 64, "flags": 1}, + {"matrix": [7, 0], "x": 27, "y": 64, "flags": 1}, + {"matrix": [8, 0], "x": 66, "y": 64, "flags": 4}, + {"matrix": [9, 0], "x": 105, "y": 64, "flags": 1}, + {"matrix": [9, 7], "x": 118, "y": 64, "flags": 1}, + {"matrix": [8, 7], "x": 131, "y": 64, "flags": 1}, + {"matrix": [7, 7], "x": 145, "y": 64, "flags": 1}, + {"matrix": [6, 7], "x": 159, "y": 64, "flags": 1}, + {"matrix": [5, 7], "x": 169, "y": 64, "flags": 1}, + {"matrix": [4, 7], "x": 180, "y": 64, "flags": 1}, + {"matrix": [9, 9], "x": 198, "y": 64, "flags": 4}, + {"matrix": [9, 10], "x": 214, "y": 64, "flags": 1} + ] + }, + "url": "https://github.com/FFS2309/alpha_fs_keyboard", + "usb": { + "device_version": "1.0.0", + "pid": "0x0001", + "vid": "0x4643" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP11" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "F1", "matrix": [0, 1], "x": 1.25, "y": 0}, + {"label": "F2", "matrix": [9, 1], "x": 2.25, "y": 0}, + {"label": "F3", "matrix": [0, 2], "x": 3.25, "y": 0}, + {"label": "F4", "matrix": [9, 2], "x": 4.25, "y": 0}, + {"label": "F5", "matrix": [0, 3], "x": 5.5, "y": 0}, + {"label": "F6", "matrix": [9, 3], "x": 6.5, "y": 0}, + {"label": "F7", "matrix": [0, 4], "x": 7.5, "y": 0}, + {"label": "F8", "matrix": [9, 4], "x": 8.5, "y": 0}, + {"label": "F9", "matrix": [0, 5], "x": 9.75, "y": 0}, + {"label": "F10", "matrix": [9, 5], "x": 10.75, "y": 0}, + {"label": "F11", "matrix": [0, 6], "x": 11.75, "y": 0}, + {"label": "F12", "matrix": [9, 6], "x": 12.75, "y": 0}, + {"label": "Extra1", "matrix": [0, 7], "x": 14, "y": 0}, + {"label": "PrtSc", "matrix": [0, 8], "x": 15.25, "y": 0}, + {"label": "Scroll Lock", "matrix": [7, 8], "x": 16.25, "y": 0}, + {"label": "Pause", "matrix": [8, 8], "x": 17.25, "y": 0}, + {"label": "Extra2", "matrix": [9, 8], "x": 18.5, "y": 0}, + {"label": "Extra3", "matrix": [0, 10], "x": 19.5, "y": 0}, + {"label": "Extra4", "matrix": [1, 10], "x": 20.5, "y": 0}, + {"label": "Extra5", "matrix": [2, 10], "x": 21.5, "y": 0}, + {"label": "^", "matrix": [1, 0], "x": 0, "y": 1.5}, + {"label": "1", "matrix": [1, 1], "x": 1, "y": 1.5}, + {"label": "2", "matrix": [8, 1], "x": 2, "y": 1.5}, + {"label": "3", "matrix": [1, 2], "x": 3, "y": 1.5}, + {"label": "4", "matrix": [8, 2], "x": 4, "y": 1.5}, + {"label": "5", "matrix": [1, 3], "x": 5, "y": 1.5}, + {"label": "6", "matrix": [8, 3], "x": 6, "y": 1.5}, + {"label": "7", "matrix": [1, 4], "x": 7, "y": 1.5}, + {"label": "8", "matrix": [8, 4], "x": 8, "y": 1.5}, + {"label": "9", "matrix": [1, 5], "x": 9, "y": 1.5}, + {"label": "0", "matrix": [8, 5], "x": 10, "y": 1.5}, + {"label": "\u00df", "matrix": [1, 6], "x": 11, "y": 1.5}, + {"label": "\u00b4", "matrix": [8, 6], "x": 12, "y": 1.5}, + {"label": "Backspace", "matrix": [1, 7], "x": 13, "y": 1.5, "w": 2}, + {"label": "Insert", "matrix": [1, 8], "x": 15.25, "y": 1.5}, + {"label": "Home", "matrix": [6, 8], "x": 16.25, "y": 1.5}, + {"label": "PgUp", "matrix": [5, 8], "x": 17.25, "y": 1.5}, + {"label": "Num Lock", "matrix": [3, 10], "x": 18.5, "y": 1.5}, + {"label": "/", "matrix": [4, 10], "x": 19.5, "y": 1.5}, + {"label": "*", "matrix": [5, 10], "x": 20.5, "y": 1.5}, + {"label": "-", "matrix": [6, 10], "x": 21.5, "y": 1.5}, + {"label": "Tab", "matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"label": "W", "matrix": [7, 1], "x": 2.5, "y": 2.5}, + {"label": "E", "matrix": [2, 2], "x": 3.5, "y": 2.5}, + {"label": "R", "matrix": [7, 2], "x": 4.5, "y": 2.5}, + {"label": "T", "matrix": [2, 3], "x": 5.5, "y": 2.5}, + {"label": "Y", "matrix": [7, 3], "x": 6.5, "y": 2.5}, + {"label": "U", "matrix": [2, 4], "x": 7.5, "y": 2.5}, + {"label": "I", "matrix": [7, 4], "x": 8.5, "y": 2.5}, + {"label": "O", "matrix": [2, 5], "x": 9.5, "y": 2.5}, + {"label": "P", "matrix": [7, 5], "x": 10.5, "y": 2.5}, + {"label": "{", "matrix": [2, 6], "x": 11.5, "y": 2.5}, + {"label": "}", "matrix": [7, 6], "x": 12.5, "y": 2.5}, + {"label": "Enter", "matrix": [2, 7], "x": 13.75, "y": 2.5, "w": 1.25, "h": 2}, + {"label": "Delete", "matrix": [2, 8], "x": 15.25, "y": 2.5}, + {"label": "End", "matrix": [3, 8], "x": 16.25, "y": 2.5}, + {"label": "PgDn", "matrix": [4, 8], "x": 17.25, "y": 2.5}, + {"label": "7", "matrix": [0, 9], "x": 18.5, "y": 2.5}, + {"label": "8", "matrix": [1, 9], "x": 19.5, "y": 2.5}, + {"label": "9", "matrix": [2, 9], "x": 20.5, "y": 2.5}, + {"label": "+", "matrix": [7, 10], "x": 21.5, "y": 2.5, "h": 2}, + {"label": "Caps Lock", "matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"label": "A", "matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"label": "S", "matrix": [6, 1], "x": 2.75, "y": 3.5}, + {"label": "D", "matrix": [3, 2], "x": 3.75, "y": 3.5}, + {"label": "F", "matrix": [6, 2], "x": 4.75, "y": 3.5}, + {"label": "G", "matrix": [3, 3], "x": 5.75, "y": 3.5}, + {"label": "H", "matrix": [6, 3], "x": 6.75, "y": 3.5}, + {"label": "J", "matrix": [3, 4], "x": 7.75, "y": 3.5}, + {"label": "K", "matrix": [6, 4], "x": 8.75, "y": 3.5}, + {"label": "L", "matrix": [3, 5], "x": 9.75, "y": 3.5}, + {"label": ":", "matrix": [6, 5], "x": 10.75, "y": 3.5}, + {"label": "@", "matrix": [3, 6], "x": 11.75, "y": 3.5}, + {"label": "~", "matrix": [6, 6], "x": 12.75, "y": 3.5}, + {"label": "4", "matrix": [5, 9], "x": 18.5, "y": 3.5}, + {"label": "5", "matrix": [4, 9], "x": 19.5, "y": 3.5}, + {"label": "6", "matrix": [3, 9], "x": 20.5, "y": 3.5}, + {"label": "Shift", "matrix": [4, 0], "x": 0, "y": 4.5, "w": 1.25}, + {"label": "|", "matrix": [4, 1], "x": 1.25, "y": 4.5}, + {"label": "Z", "matrix": [5, 1], "x": 2.25, "y": 4.5}, + {"label": "X", "matrix": [4, 2], "x": 3.25, "y": 4.5}, + {"label": "C", "matrix": [5, 2], "x": 4.25, "y": 4.5}, + {"label": "V", "matrix": [4, 3], "x": 5.25, "y": 4.5}, + {"label": "B", "matrix": [5, 3], "x": 6.25, "y": 4.5}, + {"label": "N", "matrix": [4, 4], "x": 7.25, "y": 4.5}, + {"label": "M", "matrix": [5, 4], "x": 8.25, "y": 4.5}, + {"label": "<", "matrix": [4, 5], "x": 9.25, "y": 4.5}, + {"label": ">", "matrix": [5, 5], "x": 10.25, "y": 4.5}, + {"label": "?", "matrix": [4, 6], "x": 11.25, "y": 4.5}, + {"label": "Shift", "matrix": [5, 6], "x": 12.25, "y": 4.5, "w": 2.75}, + {"label": "\u2191", "matrix": [3, 7], "x": 16.25, "y": 4.5}, + {"label": "1", "matrix": [6, 9], "x": 18.5, "y": 4.5}, + {"label": "2", "matrix": [7, 9], "x": 19.5, "y": 4.5}, + {"label": "3", "matrix": [8, 9], "x": 20.5, "y": 4.5}, + {"label": "Enter", "matrix": [8, 10], "x": 21.5, "y": 4.5, "h": 2}, + {"label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.25}, + {"label": "Win", "matrix": [6, 0], "x": 1.25, "y": 5.5, "w": 1.25}, + {"label": "Alt", "matrix": [7, 0], "x": 2.5, "y": 5.5, "w": 1.25}, + {"matrix": [8, 0], "x": 3.75, "y": 5.5, "w": 6.25}, + {"label": "AltGr", "matrix": [9, 0], "x": 10, "y": 5.5, "w": 1.25}, + {"label": "Win", "matrix": [9, 7], "x": 11.25, "y": 5.5, "w": 1.25}, + {"label": "Menu", "matrix": [8, 7], "x": 12.5, "y": 5.5, "w": 1.25}, + {"label": "Ctrl", "matrix": [7, 7], "x": 13.75, "y": 5.5, "w": 1.25}, + {"label": "\u2190", "matrix": [6, 7], "x": 15.25, "y": 5.5}, + {"label": "\u2193", "matrix": [5, 7], "x": 16.25, "y": 5.5}, + {"label": "\u2192", "matrix": [4, 7], "x": 17.25, "y": 5.5}, + {"label": "0", "matrix": [9, 9], "x": 18.5, "y": 5.5, "w": 2}, + {"label": ".", "matrix": [9, 10], "x": 20.5, "y": 5.5} + ] + } + } +} diff --git a/keyboards/handwired/fabiclawz/alpha_fs/keymaps/default/keymap.c b/keyboards/handwired/fabiclawz/alpha_fs/keymaps/default/keymap.c new file mode 100644 index 000000000000..bd9e146baf21 --- /dev/null +++ b/keyboards/handwired/fabiclawz/alpha_fs/keymaps/default/keymap.c @@ -0,0 +1,16 @@ +// Copyright 2025 Fabian Felix Selbach (@FFS2309) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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, RM_TOGG, KC_PSCR, KC_SCRL, KC_PAUS, RM_NEXT, RM_PREV, RM_VALU, RM_VALD, + + 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_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + 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_ENT, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_NUHS, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/handwired/fabiclawz/alpha_fs/readme.md b/keyboards/handwired/fabiclawz/alpha_fs/readme.md new file mode 100644 index 000000000000..2eae8d51322d --- /dev/null +++ b/keyboards/handwired/fabiclawz/alpha_fs/readme.md @@ -0,0 +1,28 @@ +# handwired/fabiclawz/alpha_fs + +![handwired/fabiclawz/alpha_fs](https://i.imgur.com/FOOmKXN.jpeg) + +My first keyboard with custom PCB, originally designed for the Milk-V duo series of RISC-V MCUs with pin compatibility with the Raspberry Pi Pico used in this +case for QMK. + +* Keyboard Maintainer: [Fabian Felix Selbach](https://github.com/FFS2309) +* Hardware Supported: Raspberry Pi Pico, Custom PCB +* Hardware Availability: [Hardware design files](https://github.com/FFS2309/alpha_fs_keyboard) + +Make example for this keyboard (after setting up your build environment): + + make handwired/fabiclawz/alpha_fs:default + +Flashing example for this keyboard: + + make handwired/fabiclawz/alpha_fs: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the Pi Pico if available +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available From 107812ceef1c5efaa1d76b8136f119fa3f63f731 Mon Sep 17 00:00:00 2001 From: Jon Colverson Date: Mon, 8 Dec 2025 20:31:24 +0000 Subject: [PATCH 1155/1205] [Keyboard] Add PicoFX (#25704) --- keyboards/dj505/picofx/keyboard.json | 96 +++++++++++++++++++ .../dj505/picofx/keymaps/allinone/keymap.json | 26 +++++ .../dj505/picofx/keymaps/allinone/readme.md | 21 ++++ .../dj505/picofx/keymaps/default/keymap.json | 16 ++++ .../dj505/picofx/keymaps/default/readme.md | 12 +++ .../dj505/picofx/keymaps/menumode/keymap.json | 36 +++++++ .../dj505/picofx/keymaps/menumode/readme.md | 28 ++++++ keyboards/dj505/picofx/readme.md | 34 +++++++ 8 files changed, 269 insertions(+) create mode 100644 keyboards/dj505/picofx/keyboard.json create mode 100644 keyboards/dj505/picofx/keymaps/allinone/keymap.json create mode 100644 keyboards/dj505/picofx/keymaps/allinone/readme.md create mode 100644 keyboards/dj505/picofx/keymaps/default/keymap.json create mode 100644 keyboards/dj505/picofx/keymaps/default/readme.md create mode 100644 keyboards/dj505/picofx/keymaps/menumode/keymap.json create mode 100644 keyboards/dj505/picofx/keymaps/menumode/readme.md create mode 100644 keyboards/dj505/picofx/readme.md diff --git a/keyboards/dj505/picofx/keyboard.json b/keyboards/dj505/picofx/keyboard.json new file mode 100644 index 000000000000..802d4e9791d7 --- /dev/null +++ b/keyboards/dj505/picofx/keyboard.json @@ -0,0 +1,96 @@ +{ + "manufacturer": "dj505", + "keyboard_name": "PicoFX", + "maintainer": "jjc1138", + "bootloader": "rp2040", + "bootloader_instructions": "Hold down the BOOTSEL button on the microcontroller when connecting the USB cable", + "features": { + "bootmagic": true, + "extrakey": true, + "rgb_matrix": true + }, + "matrix_pins": { + "direct": [ + ["GP19", null, "GP6", "GP27", null, "GP0"], + [null, "GP10", null, null, "GP2", null], + ["GP21", null, "GP8", "GP17", null, "GP4"], + ["GP14", "GP15", null, null, null, null] + ] + }, + "processor": "RP2040", + "rgb_matrix": { + "animations": { + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_splash": true, + "splash": true + }, + "driver": "ws2812", + "layout": [ + {"x": 0, "y": 64, "flags": 2}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 112, "y": 0, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 224, "y": 0, "flags": 2} + ], + "sleep": true + }, + "url": "https://github.com/dj505/PicoFX", + "usb": { + "device_version": "1.0.0", + "pid": "0x4658", + "vid": "0xFEED" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP22" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "P1 UL", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "P1 UR", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "P2 UL", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "P2 UR", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "P1 CN", "matrix": [1, 1], "x": 1, "y": 1}, + {"label": "P2 CN", "matrix": [1, 4], "x": 4, "y": 1}, + {"label": "P1 DL", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "P1 DR", "matrix": [2, 2], "x": 2, "y": 2}, + {"label": "P2 DL", "matrix": [2, 3], "x": 3, "y": 2}, + {"label": "P2 DR", "matrix": [2, 5], "x": 5, "y": 2}, + {"label": "Service", "matrix": [3, 0], "x": 6.5, "y": 0.5}, + {"label": "Test", "matrix": [3, 1], "x": 6.5, "y": 1.5} + ] + } + } +} diff --git a/keyboards/dj505/picofx/keymaps/allinone/keymap.json b/keyboards/dj505/picofx/keymaps/allinone/keymap.json new file mode 100644 index 000000000000..22e8b804d3b2 --- /dev/null +++ b/keyboards/dj505/picofx/keymaps/allinone/keymap.json @@ -0,0 +1,26 @@ +{ + "keyboard": "dj505/picofx", + "keymap": "allinone", + "layout": "LAYOUT", + "layers": [ + [ + "KC_Q", "KC_E", "KC_TAB", "KC_UP", + + "KC_X", "KC_G", + + "KC_A", "KC_D", "KC_SPC", "KC_DOWN", + + "LT(1,KC_ESC)", "KC_ENT" + ], + + [ + "KC_F1", "KC_F2", "KC_F5", "KC_F6", + + "KC_TRNS", "KC_TRNS", + + "KC_F3", "KC_F4", "KC_F7", "KC_F8", + + "KC_TRNS", "QK_BOOT" + ] + ] +} diff --git a/keyboards/dj505/picofx/keymaps/allinone/readme.md b/keyboards/dj505/picofx/keymaps/allinone/readme.md new file mode 100644 index 000000000000..c82751b10639 --- /dev/null +++ b/keyboards/dj505/picofx/keymaps/allinone/readme.md @@ -0,0 +1,21 @@ +# PicoFX All-in-one Keymap + +The 'allinone' keymap puts most of the buttons that you need for navigating the Pump It Up Rise menus in the main mode. If you configure the game to use those buttons for gameplay as well, then you can play the game and navigate most of the menus without having to switch modes. + +``` + Q E Tab Up + X G + A D Space Down + + Service: Esc when tapped, or temporarily activates the mode below when held + Test: Enter +``` + +When Service is held the buttons have these meanings instead: +``` + F1 F2 F5 F6 + - - + F3 F4 F7 F8 + + Test: Bootloader mode +``` diff --git a/keyboards/dj505/picofx/keymaps/default/keymap.json b/keyboards/dj505/picofx/keymaps/default/keymap.json new file mode 100644 index 000000000000..bd814f333a34 --- /dev/null +++ b/keyboards/dj505/picofx/keymaps/default/keymap.json @@ -0,0 +1,16 @@ +{ + "keyboard": "dj505/picofx", + "keymap": "default", + "layout": "LAYOUT", + "layers": [ + [ + "KC_Q", "KC_E", "KC_R", "KC_Y", + + "KC_S", "KC_G", + + "KC_Z", "KC_C", "KC_V", "KC_N", + + "KC_ESC", "KC_ENT" + ] + ] +} diff --git a/keyboards/dj505/picofx/keymaps/default/readme.md b/keyboards/dj505/picofx/keymaps/default/readme.md new file mode 100644 index 000000000000..b3a6f482eb62 --- /dev/null +++ b/keyboards/dj505/picofx/keymaps/default/readme.md @@ -0,0 +1,12 @@ +# PicoFX Default Keymap + +The default keymap matches the 'Basic 2' preset in Pump It Up Rise. In the game's options menu, navigate to the keyboard settings and press '2' (on your normal computer keyboard) to apply the matching preset. + +``` + Q E R Y + S G + Z C V N + + Service: Escape + Test: Enter +``` diff --git a/keyboards/dj505/picofx/keymaps/menumode/keymap.json b/keyboards/dj505/picofx/keymaps/menumode/keymap.json new file mode 100644 index 000000000000..21b3697b4284 --- /dev/null +++ b/keyboards/dj505/picofx/keymaps/menumode/keymap.json @@ -0,0 +1,36 @@ +{ + "keyboard": "dj505/picofx", + "keymap": "default", + "layout": "LAYOUT", + "layers": [ + [ + "KC_Q", "KC_E", "KC_R", "KC_Y", + + "KC_S", "KC_G", + + "KC_Z", "KC_C", "KC_V", "KC_N", + + "MO(2)", "TG(1)" + ], + + [ + "KC_Q", "KC_E", "KC_TAB", "KC_UP", + + "KC_ESC", "KC_ENT", + + "KC_LEFT", "KC_RGHT", "KC_SPC", "KC_DOWN", + + "LT(2,KC_F1)", "KC_TRNS" + ], + + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + + "KC_TRNS", "KC_TRNS", + + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + + "KC_TRNS", "QK_BOOT" + ] + ] +} diff --git a/keyboards/dj505/picofx/keymaps/menumode/readme.md b/keyboards/dj505/picofx/keymaps/menumode/readme.md new file mode 100644 index 000000000000..74bfa8c96afb --- /dev/null +++ b/keyboards/dj505/picofx/keymaps/menumode/readme.md @@ -0,0 +1,28 @@ +# PicoFX Menu Mode Keymap + +The 'menumode' keymap is like the 'default' keymap in that it matches the 'Basic 2' preset in Pump It Up Rise, but it also includes the ability the toggle into a menu mode that provides most of the keys you need to navigate the game's menus. + +In the game's options menu, navigate to the keyboard settings and press '2' (on your normal computer keyboard) to apply the 'Basic 2' preset. + +The keymap in normal mode: +``` + Q E R Y + S G + Z C V N + + Test: Toggle to menu mode +``` + +And when in menu mode: +``` + Q E Tab Up + Esc Enter + Left Right Space Down + + Service: F1 + Test: Toggle back to game mode +``` + +It might take a little bit of practice to remember where everything is in menu mode. The rule of thumb is that the layout roughly corresponds to where those controls appear on the game's song selection screen. + +In either mode, holding the Service button and pressing the Test button will put the controller into bootloader mode for installing new firmware versions. diff --git a/keyboards/dj505/picofx/readme.md b/keyboards/dj505/picofx/readme.md new file mode 100644 index 000000000000..3f72323d3438 --- /dev/null +++ b/keyboards/dj505/picofx/readme.md @@ -0,0 +1,34 @@ +# dj505/picofx + +![PicoFX controller](https://i.imgur.com/YNsJPg0.png) + +PicoFX: A compact keyboard-style controller for the *Pump It Up* rhythm game series. This firmware is intended for using the controller with the [Pump It Up Rise](https://store.steampowered.com/app/2756930/PUMP_IT_UP_RISE/) home version of the game. + +* Hardware Supported: [PicoFX](https://github.com/dj505/PicoFX) +* Keyboard Maintainer: [jjc1138](https://github.com/jjc1138) + +Make example for this keyboard (after setting up your build environment): + + make dj505/picofx:default + +Flashing example for this keyboard: + + make dj505/picofx: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). + +## Keymaps + +There are three keymaps provided, or you can build your own using the instructions below. + + * [default](keymaps/default/readme.md) + * [menumode](keymaps/menumode/readme.md) + * [allinone](keymaps/allinone/readme.md) + +### Bootloader + +Put the controller in bootloader mode in one of three ways: + +* **Physical reset button**: Hold down the BOOTSEL button on the microcontroller when connecting the USB cable. +* **Bootmagic reset**: If a version of this firmware is already installed, hold down the top-left button on the keyboard when connecting the USB cable. +* **Keycode in keymap**: If a version of this firmware is already installed with the 'menumode' or 'allinone' keymap, hold down the Service button and press the Test button. Or press a button mapped to `QK_BOOT` in your own keymap. From 505e5c7033f841e277e227718ed328cf64c8a2fc Mon Sep 17 00:00:00 2001 From: ploopyco <54917504+ploopyco@users.noreply.github.com> Date: Mon, 8 Dec 2025 17:24:42 -0500 Subject: [PATCH 1156/1205] Add new mouse "Ploopy Nano 2 Trackball" (#25762) --- keyboards/ploopyco/nano_2/config.h | 33 ++++++++++++++++ keyboards/ploopyco/nano_2/info.json | 27 +++++++++++++ .../ploopyco/nano_2/keymaps/default/keymap.c | 23 +++++++++++ keyboards/ploopyco/nano_2/readme.md | 38 +++++++++++++++++++ .../ploopyco/nano_2/rev2_003/keyboard.json | 7 ++++ keyboards/ploopyco/nano_2/rev2_003/readme.md | 1 + keyboards/ploopyco/nano_2/rules.mk | 1 + 7 files changed, 130 insertions(+) create mode 100644 keyboards/ploopyco/nano_2/config.h create mode 100644 keyboards/ploopyco/nano_2/info.json create mode 100644 keyboards/ploopyco/nano_2/keymaps/default/keymap.c create mode 100644 keyboards/ploopyco/nano_2/readme.md create mode 100644 keyboards/ploopyco/nano_2/rev2_003/keyboard.json create mode 100644 keyboards/ploopyco/nano_2/rev2_003/readme.md create mode 100644 keyboards/ploopyco/nano_2/rules.mk diff --git a/keyboards/ploopyco/nano_2/config.h b/keyboards/ploopyco/nano_2/config.h new file mode 100644 index 000000000000..7d2b96fd8ecb --- /dev/null +++ b/keyboards/ploopyco/nano_2/config.h @@ -0,0 +1,33 @@ +/* Copyright 2024 Colin Lam (Ploopy Corporation) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define UNUSABLE_PINS \ + { GP1, GP3, GP4, GP6, GP8, GP10, GP14, GP16, GP18, GP20, GP22, GP24, GP25, GP26, GP27, GP28, GP29 } + +#define MOUSE_EXTENDED_REPORT + +#define PLOOPY_DRAGSCROLL_MOMENTARY +#define PLOOPY_DRAGSCROLL_DIVISOR_H 64.0 +#define PLOOPY_DRAGSCROLL_DIVISOR_V 64.0 + +#define PAW3222_CS_PIN GP5 +#define PAW3222_MOTION_PIN GP9 +#define PAW3222_SPI_DIVISOR 64 +#define SPI_SCK_PIN GP2 +#define SPI_MISO_PIN GP0 +#define SPI_MOSI_PIN GP7 diff --git a/keyboards/ploopyco/nano_2/info.json b/keyboards/ploopyco/nano_2/info.json new file mode 100644 index 000000000000..ad69a0c04e35 --- /dev/null +++ b/keyboards/ploopyco/nano_2/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "Ploopy Nano 2 Trackball", + "manufacturer": "Ploopy Corporation", + "url": "www.ploopy.co", + "maintainer": "ploopyco", + "usb": { + "vid": "0x5043", + "pid": "0x4CE5", + "device_version": "0.0.1", + "max_power": 100 + }, + "features": { + "bootmagic": true, + "extrakey": true, + "nkro": true, + "pointing_device": true + }, + "processor": "RP2040", + "bootloader": "rp2040", + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "matrix": [0, 0]} + ] + } + } +} diff --git a/keyboards/ploopyco/nano_2/keymaps/default/keymap.c b/keyboards/ploopyco/nano_2/keymaps/default/keymap.c new file mode 100644 index 000000000000..9fa7252a665e --- /dev/null +++ b/keyboards/ploopyco/nano_2/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2021 Colin Lam (Ploopy Corporation) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2019 Hiroyuki Okada + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( DRAG_SCROLL ) +}; diff --git a/keyboards/ploopyco/nano_2/readme.md b/keyboards/ploopyco/nano_2/readme.md new file mode 100644 index 000000000000..509a62f9fa6b --- /dev/null +++ b/keyboards/ploopyco/nano_2/readme.md @@ -0,0 +1,38 @@ +# Ploopy Nano 2 Trackball + +![Ploopyco Trackball Nano 2](https://cdn.ploopy.co/nano2-media-assets/site-photos/_MG_2495.jpg) + +It's a DIY, QMK Powered Trackball...Nano! + +* Maintainer: [PloopyCo](https://github.com/ploopyco) +* Key contributors: [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/) +* Hardware Supported: RP2040 +* Hardware Availability: [Store](https://ploopy.co/nano-2), [GitHub](https://github.com/ploopyco) + +Make example for this keyboard (after setting up your build environment): + + make ploopyco/nano_2/rev2_003:default + +Flashing example for this keyboard: + + make ploopyco/nano_2/rev2_003:default:flash + +# Building Firmware + +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). + +# Triggering the Bootloader + +[Do you see those two golden holes in the board](https://ploopy.co/wp-content/uploads/2023/11/boot.jpg)? Those are called **vias**. They act exactly like a switch does. Right now, that switch is OFF. However, if you take a paperclip or a pair of metal tweezers and touch those two vias, the two vias will form an electrical connection. Effectively, that switch turns ON. + +Go ahead and connect the two vias, and then (while the vias are connected) plug in the Nano 2 board into your computer. + +The computer should recognise that a mass storage device was just plugged in. Once this is done, you should be able to drag and drop files onto the Nano 2 board, as if the board was a USB drive. Feel free to remove the tweezers or paperclip at this point. + +If you want to upload a new firmware file (a ".uf2" file, like "nano-2-awesome-version.uf2" or something), just drag it into the folder, and it'll automatically install on the Nano 2 board and restart itself, in normal operating mode. You're done! + +**TIP**: If your firmware is in some kind of strange state and uploading new firmware isn't fixing it, try uploading [a flash nuke](https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/circuitpython#flash-resetting-uf2-3083182) to the Nano 2 board before flashing the new firmware. It wipes the memory of the Nano 2 board completely clean, which can help clear a few types of errors. + +# Customizing your Ploopy Nano 2 + +You can find customziation options [here](../readme.md). \ No newline at end of file diff --git a/keyboards/ploopyco/nano_2/rev2_003/keyboard.json b/keyboards/ploopyco/nano_2/rev2_003/keyboard.json new file mode 100644 index 000000000000..767a6ba15415 --- /dev/null +++ b/keyboards/ploopyco/nano_2/rev2_003/keyboard.json @@ -0,0 +1,7 @@ +{ + "matrix_pins": { + "direct": [ + ["GP17"] + ] + } +} diff --git a/keyboards/ploopyco/nano_2/rev2_003/readme.md b/keyboards/ploopyco/nano_2/rev2_003/readme.md new file mode 100644 index 000000000000..052a17f3969e --- /dev/null +++ b/keyboards/ploopyco/nano_2/rev2_003/readme.md @@ -0,0 +1 @@ +See the main readme for more details. This is just here for when future revisions of the board are released. diff --git a/keyboards/ploopyco/nano_2/rules.mk b/keyboards/ploopyco/nano_2/rules.mk new file mode 100644 index 000000000000..e468209eba4e --- /dev/null +++ b/keyboards/ploopyco/nano_2/rules.mk @@ -0,0 +1 @@ +POINTING_DEVICE_DRIVER = paw3222 From a86322e4a7747500b25cdc57438c2ae06473760e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 8 Dec 2025 22:26:14 +0000 Subject: [PATCH 1157/1205] Trigger develop docs rebuild on push (#25860) --- .github/workflows/docs.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 20a1372f2606..d3b032248f6b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,3 +63,16 @@ jobs: folder: .build/docs git-config-name: QMK Bot git-config-email: hello@qmk.fm + + - name: Deploy Develop + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' && github.repository == 'qmk/qmk_firmware' }} + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.QMK_BOT_TOKEN }} + script: | + const result = await github.rest.actions.createWorkflowDispatch({ + owner: 'qmk', + repo: 'qmk_docs_devel', + workflow_id: 'develop.yml', + ref: 'main', + }) From c8f6e6a936d4c041b0ca01b83f632016ff86ea39 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 8 Dec 2025 22:55:58 +0000 Subject: [PATCH 1158/1205] Revert "Trigger develop docs rebuild on push" (#25862) Revert "Trigger develop docs rebuild on push (#25860)" This reverts commit a86322e4a7747500b25cdc57438c2ae06473760e. --- .github/workflows/docs.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d3b032248f6b..20a1372f2606 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,16 +63,3 @@ jobs: folder: .build/docs git-config-name: QMK Bot git-config-email: hello@qmk.fm - - - name: Deploy Develop - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' && github.repository == 'qmk/qmk_firmware' }} - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.QMK_BOT_TOKEN }} - script: | - const result = await github.rest.actions.createWorkflowDispatch({ - owner: 'qmk', - repo: 'qmk_docs_devel', - workflow_id: 'develop.yml', - ref: 'main', - }) From 73a6496516c165a8d7ec023513f7fd32cd7bc78f Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 9 Dec 2025 00:21:25 +0000 Subject: [PATCH 1159/1205] Trigger develop docs rebuild on push (#25863) --- .github/workflows/develop_docs.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/develop_docs.yml diff --git a/.github/workflows/develop_docs.yml b/.github/workflows/develop_docs.yml new file mode 100644 index 000000000000..4c569da3f8dd --- /dev/null +++ b/.github/workflows/develop_docs.yml @@ -0,0 +1,34 @@ +name: Generate Develop Docs + +permissions: + contents: write + +on: + push: + branches: + - develop + paths: + - 'builddefs/docsgen/**' + - 'tmk_core/**' + - 'quantum/**' + - 'platforms/**' + - 'docs/**' + - '.github/workflows/docs.yml' + +jobs: + generate: + runs-on: ubuntu-latest + + steps: + - name: Deploy Develop + if: ${{ github.repository == 'qmk/qmk_firmware' }} + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.QMK_BOT_TOKEN }} + script: | + const result = await github.rest.actions.createWorkflowDispatch({ + owner: 'qmk', + repo: 'qmk_docs_devel', + workflow_id: 'develop.yml', + ref: 'main', + }) From e2d19eda57b21e22dfabfccf72d2f7a1d0997633 Mon Sep 17 00:00:00 2001 From: lental Date: Mon, 8 Dec 2025 19:30:39 -0800 Subject: [PATCH 1160/1205] Add queue.len() keyboard (#24823) Co-authored-by: Joel Challis --- keyboards/dotlen/queue/keyboard.json | 187 ++++++++++++++++++ .../dotlen/queue/keymaps/default/keymap.c | 41 ++++ keyboards/dotlen/queue/readme.md | 28 +++ 3 files changed, 256 insertions(+) create mode 100644 keyboards/dotlen/queue/keyboard.json create mode 100644 keyboards/dotlen/queue/keymaps/default/keymap.c create mode 100644 keyboards/dotlen/queue/readme.md diff --git a/keyboards/dotlen/queue/keyboard.json b/keyboards/dotlen/queue/keyboard.json new file mode 100644 index 000000000000..3dd3807194cf --- /dev/null +++ b/keyboards/dotlen/queue/keyboard.json @@ -0,0 +1,187 @@ +{ + "manufacturer": "DotLen", + "keyboard_name": "Queue.Len()", + "maintainer": "lental", + "bootloader": "atmel-dfu", + "build": { + "lto": true + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B7"} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0", "E6"], + "rows": ["D5", "D3", "D2", "D1", "D0"] + }, + "processor": "atmega32u4", + "url": "https://github.com/lental/keyboard-firmware", + "usb": { + "device_version": "0.0.1", + "pid": "0x000A", + "vid": "0xFACE" + }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT_triple_space" + }, + "layouts": { + "LAYOUT_standard_space": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "backspace", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "split", "matrix": [0, 14], "x": 14, "y": 0}, + {"label": "rotary", "matrix": [2, 14], "x": 15, "y": 0, "encoder":0}, + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "Bksp", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "pgup", "matrix": [1, 14], "x": 15, "y": 1}, + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "pgup", "matrix": [2, 13], "x": 15, "y": 2}, + {"label": "split", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, + {"label": "Shift", "matrix": [3, 1], "x": 1.25, "y": 3, "w": 1}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Up", "matrix": [3, 13], "x": 14, "y": 3}, + {"label": "pgup", "matrix": [3, 14], "x": 15, "y": 3}, + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 3], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "Alt", "matrix": [4, 6], "x": 10, "y": 4}, + {"label": "Win", "matrix": [4, 7], "x": 11, "y": 4}, + {"label": "Ctrl", "matrix": [4, 8], "x": 12, "y": 4}, + {"label": "left", "matrix": [4, 12], "x": 13, "y": 4}, + {"label": "down", "matrix": [4, 13], "x": 14, "y": 4}, + {"label": "right", "matrix": [4, 14], "x": 15, "y": 4} + ] + }, + "LAYOUT_triple_space": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "backspace", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "split", "matrix": [0, 14], "x": 14, "y": 0}, + {"label": "rotary", "matrix": [2, 14], "x": 15, "y": 0, "encoder":0}, + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "Bksp", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "pgup", "matrix": [1, 14], "x": 15, "y": 1}, + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "pgup", "matrix": [2, 13], "x": 15, "y": 2}, + {"label": "split", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, + {"label": "Shift", "matrix": [3, 1], "x": 1.25, "y": 3, "w": 1}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Up", "matrix": [3, 13], "x": 14, "y": 3}, + {"label": "pgup", "matrix": [3, 14], "x": 15, "y": 3}, + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 3], "x": 3.75, "y": 4, "w": 2.25}, + {"matrix": [4, 4], "x": 6, "y": 4, "w": 1.25}, + {"matrix": [4, 5], "x": 7.25, "y": 4, "w": 2.75}, + {"label": "Alt", "matrix": [4, 6], "x": 10, "y": 4}, + {"label": "Win", "matrix": [4, 7], "x": 11, "y": 4}, + {"label": "Ctrl", "matrix": [4, 8], "x": 12, "y": 4}, + {"label": "left", "matrix": [4, 12], "x": 13, "y": 4}, + {"label": "down", "matrix": [4, 13], "x": 14, "y": 4}, + {"label": "right", "matrix": [4, 14], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/dotlen/queue/keymaps/default/keymap.c b/keyboards/dotlen/queue/keymaps/default/keymap.c new file mode 100644 index 000000000000..74f4cc59c276 --- /dev/null +++ b/keyboards/dotlen/queue/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2025 lental +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +enum layers { + _BL, + _FL, + _AL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BL] = LAYOUT_all( + KC_GRAVE, 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_MUTE, + 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, + KC_LSFT, MO(_FL), KC_Z , KC_X, KC_C , KC_V , KC_B, KC_N , KC_M , KC_COMM, KC_DOT, KC_SLASH, KC_RSFT , KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC,KC_SPC, KC_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[_FL] = 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_AL), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +[_AL] = LAYOUT_all( + QK_BOOT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_BL] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [_FL] = { ENCODER_CCW_CW(_______, _______)}, + [_AL] = { ENCODER_CCW_CW(_______, _______)} +}; +#endif diff --git a/keyboards/dotlen/queue/readme.md b/keyboards/dotlen/queue/readme.md new file mode 100644 index 000000000000..7a004731c6d6 --- /dev/null +++ b/keyboards/dotlen/queue/readme.md @@ -0,0 +1,28 @@ +# Queue.len() + +![Queue.len()](https://i.imgur.com/8JKbm6P.png) + +A 65% keyboard with multiple layout support. + +* Keyboard Maintainer: [Lental](https://github.com/lental) +* Hardware Supported: Custom PCB +* Hardware Availability: Private Group Buy +* Keyboard Layout Editor [Link](https://www.keyboard-layout-editor.com/#/gists/d54fc38f606ce3e990a88044e9b71858) + +Make example for this keyboard (after setting up your build environment): + + make dotlen/queue:default + +Flashing example for this keyboard: + + make dotlen/queue: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **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 \ No newline at end of file From e6e66a9f2e4c8c2c31226c0617a1d3877f7424fc Mon Sep 17 00:00:00 2001 From: Philip <68480429+iliorik@users.noreply.github.com> Date: Tue, 9 Dec 2025 06:33:02 +0300 Subject: [PATCH 1161/1205] Update dactyl_manuform 5x8 keyboard.json (#24778) --- .../dactyl_manuform/5x8/keyboard.json | 81 ++++++++++--------- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/keyboards/handwired/dactyl_manuform/5x8/keyboard.json b/keyboards/handwired/dactyl_manuform/5x8/keyboard.json index 2ac30107173b..649987911b5c 100644 --- a/keyboards/handwired/dactyl_manuform/5x8/keyboard.json +++ b/keyboards/handwired/dactyl_manuform/5x8/keyboard.json @@ -10,7 +10,7 @@ "features": { "bootmagic": true, "extrakey": true, - "mousekey": true, + "mousekey": true }, "qmk": { "locking": { @@ -25,6 +25,11 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, + "matrix_pins": { + "right": { + "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2", "B6"] + } + }, "serial": { "pin": "D0" } @@ -42,14 +47,14 @@ {"matrix": [0, 6], "x": 6, "y": 0}, {"matrix": [0, 7], "x": 7, "y": 0}, - {"matrix": [6, 7], "x": 17, "y": 0.5}, - {"matrix": [6, 6], "x": 16, "y": 0.5}, - {"matrix": [6, 5], "x": 15, "y": 0.5}, - {"matrix": [6, 4], "x": 14, "y": 0}, - {"matrix": [6, 3], "x": 13, "y": 0}, - {"matrix": [6, 2], "x": 12, "y": 0}, - {"matrix": [6, 1], "x": 11, "y": 0}, {"matrix": [6, 0], "x": 10, "y": 0}, + {"matrix": [6, 1], "x": 11, "y": 0}, + {"matrix": [6, 2], "x": 12, "y": 0}, + {"matrix": [6, 3], "x": 13, "y": 0}, + {"matrix": [6, 4], "x": 14, "y": 0}, + {"matrix": [6, 5], "x": 15, "y": 0.5}, + {"matrix": [6, 6], "x": 16, "y": 0.5}, + {"matrix": [6, 7], "x": 17, "y": 0.5}, {"matrix": [1, 0], "x": 0, "y": 1.5}, {"matrix": [1, 1], "x": 1, "y": 1.5}, @@ -60,14 +65,14 @@ {"matrix": [1, 6], "x": 6, "y": 1}, {"matrix": [1, 7], "x": 7, "y": 1}, - {"matrix": [7, 7], "x": 17, "y": 1.5}, - {"matrix": [7, 6], "x": 16, "y": 1.5}, - {"matrix": [7, 5], "x": 15, "y": 1.5}, - {"matrix": [7, 4], "x": 14, "y": 1}, - {"matrix": [7, 3], "x": 13, "y": 1}, - {"matrix": [7, 2], "x": 12, "y": 1}, - {"matrix": [7, 1], "x": 11, "y": 1}, {"matrix": [7, 0], "x": 10, "y": 1}, + {"matrix": [7, 1], "x": 11, "y": 1}, + {"matrix": [7, 2], "x": 12, "y": 1}, + {"matrix": [7, 3], "x": 13, "y": 1}, + {"matrix": [7, 4], "x": 14, "y": 1}, + {"matrix": [7, 5], "x": 15, "y": 1.5}, + {"matrix": [7, 6], "x": 16, "y": 1.5}, + {"matrix": [7, 7], "x": 17, "y": 1.5}, {"matrix": [2, 0], "x": 0, "y": 2.5}, {"matrix": [2, 1], "x": 1, "y": 2.5}, @@ -78,14 +83,14 @@ {"matrix": [2, 6], "x": 6, "y": 2}, {"matrix": [2, 7], "x": 7, "y": 2}, - {"matrix": [8, 7], "x": 17, "y": 2.5}, - {"matrix": [8, 6], "x": 16, "y": 2.5}, - {"matrix": [8, 5], "x": 15, "y": 2.5}, - {"matrix": [8, 4], "x": 14, "y": 2}, - {"matrix": [8, 3], "x": 13, "y": 2}, - {"matrix": [8, 2], "x": 12, "y": 2}, - {"matrix": [8, 1], "x": 11, "y": 2}, {"matrix": [8, 0], "x": 10, "y": 2}, + {"matrix": [8, 1], "x": 11, "y": 2}, + {"matrix": [8, 2], "x": 12, "y": 2}, + {"matrix": [8, 3], "x": 13, "y": 2}, + {"matrix": [8, 4], "x": 14, "y": 2}, + {"matrix": [8, 5], "x": 15, "y": 2.5}, + {"matrix": [8, 6], "x": 16, "y": 2.5}, + {"matrix": [8, 7], "x": 17, "y": 2.5}, {"matrix": [3, 0], "x": 0, "y": 3.5}, {"matrix": [3, 1], "x": 1, "y": 3.5}, @@ -95,41 +100,41 @@ {"matrix": [3, 5], "x": 5, "y": 3}, {"matrix": [3, 6], "x": 6, "y": 3}, - {"matrix": [9, 6], "x": 17, "y": 3.5}, - {"matrix": [9, 5], "x": 16, "y": 3.5}, - {"matrix": [9, 4], "x": 15, "y": 3.5}, - {"matrix": [9, 3], "x": 14, "y": 3}, - {"matrix": [9, 2], "x": 13, "y": 3}, - {"matrix": [9, 1], "x": 12, "y": 3}, - {"matrix": [9, 0], "x": 11, "y": 3}, + {"matrix": [9, 1], "x": 11, "y": 3}, + {"matrix": [9, 2], "x": 12, "y": 3}, + {"matrix": [9, 3], "x": 13, "y": 3}, + {"matrix": [9, 4], "x": 14, "y": 3}, + {"matrix": [9, 5], "x": 15, "y": 3.5}, + {"matrix": [9, 6], "x": 16, "y": 3.5}, + {"matrix": [9, 7], "x": 17, "y": 3.5}, {"matrix": [4, 1], "x": 1, "y": 4.5}, {"matrix": [4, 2], "x": 2, "y": 4.5}, {"matrix": [4, 3], "x": 3, "y": 4}, {"matrix": [4, 4], "x": 4, "y": 4}, - {"matrix": [10, 4], "x": 14, "y": 4}, {"matrix": [10, 3], "x": 13, "y": 4}, - {"matrix": [10, 2], "x": 12, "y": 5}, - {"matrix": [10, 1], "x": 11, "y": 5}, + {"matrix": [10, 4], "x": 14, "y": 4}, + {"matrix": [10, 5], "x": 15, "y": 4.5}, + {"matrix": [10, 6], "x": 16, "y": 4.5}, {"matrix": [4, 5], "x": 4.5, "y": 5}, {"matrix": [4, 6], "x": 5.5, "y": 5}, - {"matrix": [10, 6], "x": 14.5, "y": 4.5}, - {"matrix": [10, 5], "x": 15.5, "y": 4.5}, + {"matrix": [10, 1], "x": 11.5, "y": 5}, + {"matrix": [10, 2], "x": 12.5, "y": 5}, {"matrix": [5, 5], "x": 5, "y": 6}, {"matrix": [5, 6], "x": 6, "y": 6}, - {"matrix": [11, 6], "x": 12, "y": 6}, - {"matrix": [11, 5], "x": 11, "y": 6}, + {"matrix": [11, 1], "x": 11, "y": 6}, + {"matrix": [11, 2], "x": 12, "y": 6}, {"matrix": [5, 3], "x": 5, "y": 7}, {"matrix": [5, 4], "x": 6, "y": 7}, - {"matrix": [11, 4], "x": 12, "y": 7}, - {"matrix": [11, 3], "x": 11, "y": 7} + {"matrix": [11, 3], "x": 11, "y": 7}, + {"matrix": [11, 4], "x": 12, "y": 7} ] } } From 0881e0867b41f18eb4af03826512f8681752811f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=E1=BA=AFn?= <59417802+MaiTheSan@users.noreply.github.com> Date: Tue, 9 Dec 2025 11:06:24 +0700 Subject: [PATCH 1162/1205] Add support for Kami65 PCB (#24604) Co-authored-by: Duncan Sutherland Co-authored-by: Drashna Jaelre Co-authored-by: Joel Challis --- keyboards/chickenman/kami65/keyboard.json | 336 ++++++++++++++++++ .../kami65/keymaps/default/keymap.c | 49 +++ keyboards/chickenman/kami65/readme.md | 27 ++ 3 files changed, 412 insertions(+) create mode 100644 keyboards/chickenman/kami65/keyboard.json create mode 100644 keyboards/chickenman/kami65/keymaps/default/keymap.c create mode 100644 keyboards/chickenman/kami65/readme.md diff --git a/keyboards/chickenman/kami65/keyboard.json b/keyboards/chickenman/kami65/keyboard.json new file mode 100644 index 000000000000..548bc39bee21 --- /dev/null +++ b/keyboards/chickenman/kami65/keyboard.json @@ -0,0 +1,336 @@ +{ + "manufacturer": "Chickenman", + "keyboard_name": "Kami65", + "maintainer": "MaiTheSan", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "indicators": { + "caps_lock": "B12", + "on_state": 0 + }, + "matrix_pins": { + "cols": ["A10", "A0", "A9", "C13", "A1", "A2", "B11", "B10", "B1", "B0", "A7", "A6", "A5", "A4", "C14"], + "rows": ["B4", "A15", "A3", "A8", "B14"] + }, + "processor": "STM32F072", + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "led_count": 24, + "sleep": true + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x00A1", + "vid": "0xC41C" + }, + "ws2812": { + "pin": "B15" + }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT_65_ansi_blocker_split_bs" + }, + "community_layouts": ["65_ansi_blocker", "65_ansi_blocker_split_bs", "65_ansi_blocker_tsangan", "65_ansi_blocker_tsangan_split_bs"], + "layouts": { + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"label": "K00", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "K01", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "K02", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "K03", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "K04", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "K05", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "K06", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "K07", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "K08", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "K09", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "K0A", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "K0B", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "K0C", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "K0D", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"label": "K0E", "matrix": [0, 14], "x": 15, "y": 0}, + {"label": "K10", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "K11", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "K12", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "K13", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "K14", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "K15", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "K16", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "K17", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "K18", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "K19", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "K1A", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "K1B", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "K1C", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "K1D", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "K1E", "matrix": [1, 14], "x": 15, "y": 1}, + {"label": "K20", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "K21", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "K22", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "K23", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "K24", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "K25", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "K26", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "K27", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K28", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "K29", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "K2A", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "K2B", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "K2C", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "K2E", "matrix": [2, 14], "x": 15, "y": 2}, + {"label": "K30", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "K32", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "K33", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "K34", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "K35", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "K36", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "K37", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "K38", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "K39", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": "K3A", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "K3B", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "K3C", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "K3D", "matrix": [3, 13], "x": 14, "y": 3}, + {"label": "K3E", "matrix": [3, 14], "x": 15, "y": 3}, + {"label": "K40", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "K41", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "K42", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "K46", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "K4A", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, + {"label": "K4B", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "K4C", "matrix": [4, 12], "x": 13, "y": 4}, + {"label": "K4D", "matrix": [4, 13], "x": 14, "y": 4}, + {"label": "K4E", "matrix": [4, 14], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_ansi_blocker_split_bs": { + "layout": [ + {"label": "K00", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "K01", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "K02", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "K03", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "K04", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "K05", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "K06", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "K07", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "K08", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "K09", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "K0A", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "K0B", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "K0C", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "K0D", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "K2D", "matrix": [2, 13], "x": 14, "y": 0}, + {"label": "K0E", "matrix": [0, 14], "x": 15, "y": 0}, + {"label": "K10", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "K11", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "K12", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "K13", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "K14", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "K15", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "K16", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "K17", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "K18", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "K19", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "K1A", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "K1B", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "K1C", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "K1D", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "K1E", "matrix": [1, 14], "x": 15, "y": 1}, + {"label": "K20", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "K21", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "K22", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "K23", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "K24", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "K25", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "K26", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "K27", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K28", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "K29", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "K2A", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "K2B", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "K2C", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "K2E", "matrix": [2, 14], "x": 15, "y": 2}, + {"label": "K30", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "K32", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "K33", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "K34", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "K35", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "K36", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "K37", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "K38", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "K39", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": "K3A", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "K3B", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "K3C", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "K3D", "matrix": [3, 13], "x": 14, "y": 3}, + {"label": "K3E", "matrix": [3, 14], "x": 15, "y": 3}, + {"label": "K40", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "K41", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"label": "K42", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"label": "K46", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "K4A", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, + {"label": "K4B", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "K4C", "matrix": [4, 12], "x": 13, "y": 4}, + {"label": "K4D", "matrix": [4, 13], "x": 14, "y": 4}, + {"label": "K4E", "matrix": [4, 14], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_ansi_blocker_tsangan": { + "layout": [ + {"label": "K00", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "K01", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "K02", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "K03", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "K04", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "K05", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "K06", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "K07", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "K08", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "K09", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "K0A", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "K0B", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "K0C", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "K0D", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"label": "K0E", "matrix": [0, 14], "x": 15, "y": 0}, + {"label": "K10", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "K11", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "K12", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "K13", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "K14", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "K15", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "K16", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "K17", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "K18", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "K19", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "K1A", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "K1B", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "K1C", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "K1D", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "K1E", "matrix": [1, 14], "x": 15, "y": 1}, + {"label": "K20", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "K21", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "K22", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "K23", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "K24", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "K25", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "K26", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "K27", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K28", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "K29", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "K2A", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "K2B", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "K2C", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "K2E", "matrix": [2, 14], "x": 15, "y": 2}, + {"label": "K30", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "K32", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "K33", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "K34", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "K35", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "K36", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "K37", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "K38", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "K39", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": "K3A", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "K3B", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "K3C", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "K3D", "matrix": [3, 13], "x": 14, "y": 3}, + {"label": "K3E", "matrix": [3, 14], "x": 15, "y": 3}, + {"label": "K40", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "K41", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "K42", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "K46", "matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"label": "K4B", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"label": "K4C", "matrix": [4, 12], "x": 13, "y": 4}, + {"label": "K4D", "matrix": [4, 13], "x": 14, "y": 4}, + {"label": "K4E", "matrix": [4, 14], "x": 15, "y": 4} + ] + }, + "LAYOUT_65_ansi_blocker_tsangan_split_bs": { + "layout": [ + {"label": "K00", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "K01", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "K02", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "K03", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "K04", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "K05", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "K06", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "K07", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "K08", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "K09", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "K0A", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "K0B", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "K0C", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "K0D", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "K0D", "matrix": [2, 13], "x": 14, "y": 0}, + {"label": "K0E", "matrix": [0, 14], "x": 15, "y": 0}, + {"label": "K10", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "K11", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "K12", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "K13", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "K14", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "K15", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "K16", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "K17", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "K18", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "K19", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "K1A", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "K1B", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "K1C", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "K1D", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "K1E", "matrix": [1, 14], "x": 15, "y": 1}, + {"label": "K20", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "K21", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "K22", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "K23", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "K24", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "K25", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "K26", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "K27", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K28", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "K29", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "K2A", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "K2B", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "K2C", "matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "K2E", "matrix": [2, 14], "x": 15, "y": 2}, + {"label": "K30", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "K32", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "K33", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "K34", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "K35", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "K36", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "K37", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "K38", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "K39", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": "K3A", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "K3B", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "K3C", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "K3D", "matrix": [3, 13], "x": 14, "y": 3}, + {"label": "K3E", "matrix": [3, 14], "x": 15, "y": 3}, + {"label": "K40", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "K41", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "K42", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "K46", "matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"label": "K4B", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"label": "K4C", "matrix": [4, 12], "x": 13, "y": 4}, + {"label": "K4D", "matrix": [4, 13], "x": 14, "y": 4}, + {"label": "K4E", "matrix": [4, 14], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/chickenman/kami65/keymaps/default/keymap.c b/keyboards/chickenman/kami65/keymaps/default/keymap.c new file mode 100644 index 000000000000..d66e90672ed6 --- /dev/null +++ b/keyboards/chickenman/kami65/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│Bsp│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│GUI │Alt │ │ Alt│ Fn│ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_all( + KC_ESC, 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Del│Del│ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │ │ │ │Ins│ │ │ │ │PSc│Scr│Pause│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │Mut│Vl-│Vl+│ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [1] = LAYOUT_all( + KC_GRV, 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_DEL, UG_TOGG, + _______, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, UG_PREV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, UG_NEXT, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/chickenman/kami65/readme.md b/keyboards/chickenman/kami65/readme.md new file mode 100644 index 000000000000..009808717f81 --- /dev/null +++ b/keyboards/chickenman/kami65/readme.md @@ -0,0 +1,27 @@ +# Kami65 + +![Kami65](https://i.imgur.com/SwXfDcr.png) + +A 65% keyboard. + +* Keyboard Maintainer: [Mai The San](https://github.com/maithesan) +* Hardware Supported: Kami65 Keyboard +* Hardware Availability: [UCSD GB](https://www.instagram.com/p/C1BD0RZsttm/) + +Make example for this keyboard (after setting up your build environment): + + make chickenman/kami65:default + +Flashing example for this keyboard: + + make chickenman/kami65: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the top left key and plug in the keyboard +* **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 \ No newline at end of file From ff75bce86acbbb0b7c6291171c89036af25a7844 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 19:15:23 +0000 Subject: [PATCH 1163/1205] Bump actions/github-script from 6 to 8 (#25866) Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/develop_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_docs.yml b/.github/workflows/develop_docs.yml index 4c569da3f8dd..0e3e1b378e2a 100644 --- a/.github/workflows/develop_docs.yml +++ b/.github/workflows/develop_docs.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Deploy Develop if: ${{ github.repository == 'qmk/qmk_firmware' }} - uses: actions/github-script@v6 + uses: actions/github-script@v8 with: github-token: ${{ secrets.QMK_BOT_TOKEN }} script: | From b39661de9667b93c9482be26f6a9c41fd065d3b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 19:16:07 +0000 Subject: [PATCH 1164/1205] Bump JamesIves/github-pages-deploy-action from 4.7.4 to 4.7.5 (#25865) Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.7.4 to 4.7.5. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.7.4...v4.7.5) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-version: 4.7.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 20a1372f2606..ee15fd8b9e3b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -56,7 +56,7 @@ jobs: - name: Deploy if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }} - uses: JamesIves/github-pages-deploy-action@v4.7.4 + uses: JamesIves/github-pages-deploy-action@v4.7.5 with: token: ${{ secrets.GITHUB_TOKEN }} branch: gh-pages From 2929448605b29edf9f154e6ca9370f96dbb44145 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 19:11:25 +0000 Subject: [PATCH 1165/1205] Bump JamesIves/github-pages-deploy-action from 4.7.5 to 4.7.6 (#25867) Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.7.5 to 4.7.6. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.7.5...v4.7.6) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-version: 4.7.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ee15fd8b9e3b..5e5669ee782c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -56,7 +56,7 @@ jobs: - name: Deploy if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }} - uses: JamesIves/github-pages-deploy-action@v4.7.5 + uses: JamesIves/github-pages-deploy-action@v4.7.6 with: token: ${{ secrets.GITHUB_TOKEN }} branch: gh-pages From c1fedab4570a0b87b3422239a724681788727b09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 19:12:17 +0000 Subject: [PATCH 1166/1205] Bump peter-evans/create-pull-request from 7 to 8 (#25868) Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/format_push.yml | 2 +- .github/workflows/regen_push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format_push.yml b/.github/workflows/format_push.yml index 738515251a0a..8d017b7de339 100644 --- a/.github/workflows/format_push.yml +++ b/.github/workflows/format_push.yml @@ -47,7 +47,7 @@ jobs: git config user.email 'hello@qmk.fm' - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@v8 if: ${{ github.repository == 'qmk/qmk_firmware'}} with: token: ${{ secrets.QMK_BOT_TOKEN }} diff --git a/.github/workflows/regen_push.yml b/.github/workflows/regen_push.yml index df7e9970ea2c..98d6629bc3d1 100644 --- a/.github/workflows/regen_push.yml +++ b/.github/workflows/regen_push.yml @@ -34,7 +34,7 @@ jobs: git config user.email 'hello@qmk.fm' - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@v8 if: ${{ github.repository == 'qmk/qmk_firmware'}} with: token: ${{ secrets.QMK_BOT_TOKEN }} From 2e68ddc8266aa8bd70e8e734a5b433e2ed299603 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Fri, 12 Dec 2025 13:17:42 -0500 Subject: [PATCH 1167/1205] Fix broken compilation when OS_DETECTION_DEBUG_ENABLE is defined (#25869) Fix include in os_detection (broken in https://github.com/qmk/qmk_firmware/pull/24356) --- quantum/os_detection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/os_detection.c b/quantum/os_detection.c index 552375f61c03..2a5237dfc31b 100644 --- a/quantum/os_detection.c +++ b/quantum/os_detection.c @@ -23,7 +23,7 @@ #endif #ifdef OS_DETECTION_DEBUG_ENABLE -# include "eeconfig.h" +# include "nvm_eeprom_eeconfig_internal.h" # include "eeprom.h" # include "print.h" From 4f9582da2629eabd52dcff6ea6895de81249a501 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 12 Dec 2025 18:30:46 +0000 Subject: [PATCH 1168/1205] Install branch specific dependencies as part of bootstrap testing (#25871) --- .github/workflows/bootstrap_testing.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/bootstrap_testing.yml b/.github/workflows/bootstrap_testing.yml index 2e97f8308184..c80d89a21872 100644 --- a/.github/workflows/bootstrap_testing.yml +++ b/.github/workflows/bootstrap_testing.yml @@ -141,6 +141,12 @@ jobs: bash /home/testuser/qmk_firmware/util/env-bootstrap.sh " + - name: Install dependencies + run: | + sudo -u testuser bash -c " + /home/testuser/.local/share/uv/tools/qmk/bin/python -m pip install -r /home/testuser/qmk_firmware/requirements.txt + " + - name: Test QMK CLI run: | sudo -u testuser bash -c " @@ -185,6 +191,10 @@ jobs: export CONFIRM=1 sh ./util/env-bootstrap.sh + - name: Install dependencies + run: | + $HOME/.local/share/uv/tools/qmk/bin/python -m pip install -r requirements.txt + - name: Test QMK CLI run: | # Add QMK CLI to PATH (bootstrap script installs it to ~/.local/bin on macOS) @@ -235,6 +245,10 @@ jobs: export CONFIRM=1 sh ./util/env-bootstrap.sh + - name: Install dependencies + run: | + /opt/uv/tools/qmk/Scripts/python -m pip install -r requirements.txt + - name: Test QMK CLI run: | # Add QMK CLI to PATH (bootstrap script installs it to /opt/uv/tools/bin on Windows MSYS2) From 9e0118172f23d88887a3f1d10971adf94840b8f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Dec 2025 20:11:19 +0000 Subject: [PATCH 1169/1205] Bump actions/upload-artifact from 5 to 6 (#25872) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci_build_major_branch_keymap.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_build_major_branch_keymap.yml b/.github/workflows/ci_build_major_branch_keymap.yml index 89c932553a21..02ee966da2b9 100644 --- a/.github/workflows/ci_build_major_branch_keymap.yml +++ b/.github/workflows/ci_build_major_branch_keymap.yml @@ -62,7 +62,7 @@ jobs: echo "targets=$(jq -c 'keys' targets.json)" >> $GITHUB_OUTPUT - name: Upload targets json - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: targets-${{ inputs.keymap }} path: targets.json @@ -112,7 +112,7 @@ jobs: qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $(jq -r '.["${{ matrix.target }}"].targets' targets.json) || touch .failed - name: Upload binaries - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: firmware-${{ inputs.keymap }}-${{ matrix.target }} if-no-files-found: ignore @@ -146,7 +146,7 @@ jobs: merge-multiple: true - name: Upload all firmwares - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: firmware-${{ inputs.keymap }} if-no-files-found: ignore From e1c869b8dafd9078f71a1a31f5d63c77196142c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Dec 2025 21:16:52 +0000 Subject: [PATCH 1170/1205] Bump actions/download-artifact from 6 to 7 (#25873) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci_build_major_branch.yml | 2 +- .github/workflows/ci_build_major_branch_keymap.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_build_major_branch.yml b/.github/workflows/ci_build_major_branch.yml index f21f4c31718c..2ea8310cb462 100644 --- a/.github/workflows/ci_build_major_branch.yml +++ b/.github/workflows/ci_build_major_branch.yml @@ -87,7 +87,7 @@ jobs: fetch-depth: 0 - name: Download firmwares - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v7 with: pattern: firmware-* path: . diff --git a/.github/workflows/ci_build_major_branch_keymap.yml b/.github/workflows/ci_build_major_branch_keymap.yml index 02ee966da2b9..10709172dfae 100644 --- a/.github/workflows/ci_build_major_branch_keymap.yml +++ b/.github/workflows/ci_build_major_branch_keymap.yml @@ -92,7 +92,7 @@ jobs: uses: actions/checkout@v6 - name: Get target definitions - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v7 with: name: targets-${{ inputs.keymap }} path: . @@ -139,7 +139,7 @@ jobs: uses: actions/checkout@v6 - name: Download firmwares - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v7 with: pattern: firmware-${{ inputs.keymap }}-* path: . From 2c847b0350cfef92f347f27a0ebe9f0187e95b5e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 15 Dec 2025 00:21:06 +0000 Subject: [PATCH 1171/1205] Consistently install branch specific dependencies in CI (#25874) --- .github/workflows/ci_build_major_branch.yml | 8 +++----- .../workflows/ci_build_major_branch_keymap.yml | 16 ++++++---------- .github/workflows/cli.yml | 1 + .github/workflows/docs.yml | 5 +++-- .github/workflows/regen.yml | 3 +++ .github/workflows/regen_push.yml | 3 +++ .github/workflows/unit_test.yml | 2 ++ 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci_build_major_branch.yml b/.github/workflows/ci_build_major_branch.yml index 2ea8310cb462..e857f5f6c4c8 100644 --- a/.github/workflows/ci_build_major_branch.yml +++ b/.github/workflows/ci_build_major_branch.yml @@ -35,11 +35,6 @@ jobs: slice_length: ${{ steps.generate_slice_length.outputs.slice_length }} steps: - - name: Install prerequisites - run: | - apt-get update - apt-get install -y jq - - name: Disable safe.directory check run: | git config --global --add safe.directory '*' @@ -47,6 +42,9 @@ jobs: - name: Checkout QMK Firmware uses: actions/checkout@v6 + - name: Install dependencies + run: pip3 install -r requirements-dev.txt + - name: Determine concurrency id: generate_slice_length run: | diff --git a/.github/workflows/ci_build_major_branch_keymap.yml b/.github/workflows/ci_build_major_branch_keymap.yml index 10709172dfae..3b2db843a9c4 100644 --- a/.github/workflows/ci_build_major_branch_keymap.yml +++ b/.github/workflows/ci_build_major_branch_keymap.yml @@ -27,11 +27,6 @@ jobs: targets: ${{ steps.generate_targets.outputs.targets }} steps: - - name: Install prerequisites - run: | - apt-get update - apt-get install -y jq - - name: Disable safe.directory check run: | git config --global --add safe.directory '*' @@ -39,6 +34,9 @@ jobs: - name: Checkout QMK Firmware uses: actions/checkout@v6 + - name: Install dependencies + run: pip3 install -r requirements-dev.txt + - name: Generate build targets id: generate_targets run: | @@ -79,11 +77,6 @@ jobs: target: ${{ fromJson(needs.generate_targets.outputs.targets) }} steps: - - name: Install prerequisites - run: | - apt-get update - apt-get install -y jq - - name: Disable safe.directory check run: | git config --global --add safe.directory '*' @@ -91,6 +84,9 @@ jobs: - name: Checkout QMK Firmware uses: actions/checkout@v6 + - name: Install dependencies + run: pip3 install -r requirements-dev.txt + - name: Get target definitions uses: actions/download-artifact@v7 with: diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index ca794decf555..3d23a4fbdf48 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -30,5 +30,6 @@ jobs: - name: Install dependencies run: pip3 install -r requirements-dev.txt + - name: Run tests run: qmk pytest diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5e5669ee782c..8a0229f8731a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,9 +35,10 @@ jobs: fetch-depth: 1 - name: Install dependencies + run: pip3 install -r requirements-dev.txt + + - name: Install nvm run: | - apt-get update && apt-get install -y rsync doxygen - # install nvm touch $HOME/.bashrc wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash diff --git a/.github/workflows/regen.yml b/.github/workflows/regen.yml index 6eb94c8aaaf5..54daadfa2949 100644 --- a/.github/workflows/regen.yml +++ b/.github/workflows/regen.yml @@ -21,6 +21,9 @@ jobs: - uses: actions/checkout@v6 + - name: Install dependencies + run: pip3 install -r requirements-dev.txt + - name: Run qmk generators run: | util/regen.sh diff --git a/.github/workflows/regen_push.yml b/.github/workflows/regen_push.yml index 98d6629bc3d1..5d8a84b933bd 100644 --- a/.github/workflows/regen_push.yml +++ b/.github/workflows/regen_push.yml @@ -21,6 +21,9 @@ jobs: - uses: actions/checkout@v6 + - name: Install dependencies + run: pip3 install -r requirements-dev.txt + - name: Run qmk generators run: | util/regen.sh diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 2384cfb039f5..7edc2403550a 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -29,7 +29,9 @@ jobs: - uses: actions/checkout@v6 with: submodules: recursive + - name: Install dependencies run: pip3 install -r requirements-dev.txt + - name: Run tests run: qmk test-c From 54e8fad959d6a6e53e08c62ac3a3c4d4bdc6c957 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 19 Dec 2025 02:23:29 +0000 Subject: [PATCH 1172/1205] Ignore merge commits on bootstrap testing PRs (#25884) --- .github/workflows/bootstrap_testing.yml | 37 ++++++++++++++++++++++--- util/env-bootstrap.sh | 2 +- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bootstrap_testing.yml b/.github/workflows/bootstrap_testing.yml index c80d89a21872..16abaee66d45 100644 --- a/.github/workflows/bootstrap_testing.yml +++ b/.github/workflows/bootstrap_testing.yml @@ -4,20 +4,42 @@ on: push: branches: [master, develop, xap] paths: - - "util/env-bootstrap.sh" - - ".github/workflows/bootstrap_testing.yml" + - 'util/env-bootstrap.sh' + - '.github/workflows/bootstrap_testing.yml' pull_request: paths: - - "util/env-bootstrap.sh" - - ".github/workflows/bootstrap_testing.yml" + - 'util/env-bootstrap.sh' + - '.github/workflows/bootstrap_testing.yml' workflow_dispatch: permissions: contents: read jobs: + prep: + runs-on: ubuntu-latest + + if: ${{ github.event_name == 'pull_request' }} + + outputs: + any_changed: ${{ steps.file_changes.outputs.any_changed }} + + steps: + - name: Get changed files + id: file_changes + uses: tj-actions/changed-files@v47 + with: + use_rest_api: true + files: | + util/env-bootstrap.sh + .github/workflows/bootstrap_testing.yml + bootstrap-test-linux: name: Bootstrap (Linux) + + needs: prep + if: ${{ github.event_name != 'pull_request' || needs.prep.outputs.any_changed == 'true' }} + runs-on: ubuntu-latest strategy: @@ -163,6 +185,10 @@ jobs: bootstrap-test-macos: name: Bootstrap (macOS) + + needs: prep + if: ${{ github.event_name != 'pull_request' || needs.prep.outputs.any_changed == 'true' }} + strategy: fail-fast: false matrix: @@ -208,6 +234,9 @@ jobs: bootstrap-test-windows: name: Bootstrap (Windows) + needs: prep + if: ${{ github.event_name != 'pull_request' || needs.prep.outputs.any_changed == 'true' }} + strategy: fail-fast: false matrix: diff --git a/util/env-bootstrap.sh b/util/env-bootstrap.sh index 6b0497ffaeda..07020ea371cc 100755 --- a/util/env-bootstrap.sh +++ b/util/env-bootstrap.sh @@ -230,7 +230,7 @@ __EOT__ *debian* | *ubuntu*) echo "zstd build-essential clang-format diffutils wget unzip zip libhidapi-hidraw0 dos2unix git" ;; *fedora*) echo "zstd clang diffutils which gcc git wget unzip zip hidapi dos2unix libusb-devel libusb1-devel libusb-compat-0.1-devel libusb0-devel git epel-release" ;; *suse*) echo "zstd clang diffutils wget unzip zip libhidapi-hidraw0 dos2unix git libusb-1_0-devel gzip which" ;; - *gentoo*) echo "zstd diffutils wget unzip zip dev-libs/hidapi dos2unix dev-vcs/git dev-libs/libusb app-arch/gzip which" ;; + *gentoo*) echo "zstd sys-apps/diffutils wget unzip zip dev-libs/hidapi dos2unix dev-vcs/git dev-libs/libusb app-arch/gzip which" ;; *) echo >&2 echo "Sorry, we don't recognize your distribution." >&2 From 84d44e6188b5e54824be50a5b73840aae657728a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 19 Dec 2025 02:26:58 +0000 Subject: [PATCH 1173/1205] Update bootstrap_testing.yml --- .github/workflows/bootstrap_testing.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/bootstrap_testing.yml b/.github/workflows/bootstrap_testing.yml index 16abaee66d45..42c872048691 100644 --- a/.github/workflows/bootstrap_testing.yml +++ b/.github/workflows/bootstrap_testing.yml @@ -19,14 +19,13 @@ jobs: prep: runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - outputs: any_changed: ${{ steps.file_changes.outputs.any_changed }} steps: - name: Get changed files id: file_changes + if: ${{ github.event_name == 'pull_request' }} uses: tj-actions/changed-files@v47 with: use_rest_api: true From c68281b3532e00c1f3be38c550affc64fd4386a9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 20 Dec 2025 20:33:58 +0000 Subject: [PATCH 1174/1205] Handle building of XAP keymaps on master/develop (#25848) --- .github/workflows/ci_build_major_branch_keymap.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_build_major_branch_keymap.yml b/.github/workflows/ci_build_major_branch_keymap.yml index 3b2db843a9c4..17fdd6f96aed 100644 --- a/.github/workflows/ci_build_major_branch_keymap.yml +++ b/.github/workflows/ci_build_major_branch_keymap.yml @@ -105,7 +105,12 @@ jobs: continue-on-error: true run: | export NCPUS=$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) -1 )) - qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $(jq -r '.["${{ matrix.target }}"].targets' targets.json) || touch .failed + targets=$(jq -r '.["${{ matrix.target }}"].targets' targets.json | tr ' ' '\n' | sort) + if [[ -z ${targets} ]]; then + echo "Zero build targets detected" + exit 0 + fi + qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $targets || touch .failed - name: Upload binaries uses: actions/upload-artifact@v6 From dba60e2e65d10eb4135d671b4c0e4c376d43afba Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 21 Dec 2025 04:07:40 +0000 Subject: [PATCH 1175/1205] Re-fix building of XAP keymaps on master/develop (#25892) --- .github/workflows/ci_build_major_branch_keymap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_build_major_branch_keymap.yml b/.github/workflows/ci_build_major_branch_keymap.yml index 17fdd6f96aed..57593b1a1b25 100644 --- a/.github/workflows/ci_build_major_branch_keymap.yml +++ b/.github/workflows/ci_build_major_branch_keymap.yml @@ -106,7 +106,7 @@ jobs: run: | export NCPUS=$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) -1 )) targets=$(jq -r '.["${{ matrix.target }}"].targets' targets.json | tr ' ' '\n' | sort) - if [[ -z ${targets} ]]; then + if [ -z "${targets}" ]; then echo "Zero build targets detected" exit 0 fi From 7e35cdda8a01086ab146e8c6c10ec78115ac4b25 Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 22 Dec 2025 19:00:57 -0500 Subject: [PATCH 1176/1205] Add FoldKB Rev. 2.1 with added underglow RGB LEDs (#25885) --- keyboards/keebio/foldkb/rev2_1/config.h | 17 ++ keyboards/keebio/foldkb/rev2_1/halconf.h | 10 + keyboards/keebio/foldkb/rev2_1/keyboard.json | 279 ++++++++++++++++++ .../foldkb/rev2_1/keymaps/default/keymap.c | 21 ++ keyboards/keebio/foldkb/rev2_1/mcuconf.h | 14 + keyboards/keebio/foldkb/rev2_1/rev2_1.c | 29 ++ 6 files changed, 370 insertions(+) create mode 100644 keyboards/keebio/foldkb/rev2_1/config.h create mode 100644 keyboards/keebio/foldkb/rev2_1/halconf.h create mode 100644 keyboards/keebio/foldkb/rev2_1/keyboard.json create mode 100644 keyboards/keebio/foldkb/rev2_1/keymaps/default/keymap.c create mode 100644 keyboards/keebio/foldkb/rev2_1/mcuconf.h create mode 100644 keyboards/keebio/foldkb/rev2_1/rev2_1.c diff --git a/keyboards/keebio/foldkb/rev2_1/config.h b/keyboards/keebio/foldkb/rev2_1/config.h new file mode 100644 index 000000000000..d28027392ddf --- /dev/null +++ b/keyboards/keebio/foldkb/rev2_1/config.h @@ -0,0 +1,17 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* Defines for the split keyboard setup */ +#define SERIAL_USART_TX_PIN A9 +#define SERIAL_USART_RX_PIN A10 +#define SERIAL_USART_FULL_DUPLEX +#define SERIAL_USART_PIN_SWAP + +#define USB_VBUS_PIN A7 + +/* Defines for the RGB matrix */ +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 3 +#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP diff --git a/keyboards/keebio/foldkb/rev2_1/halconf.h b/keyboards/keebio/foldkb/rev2_1/halconf.h new file mode 100644 index 000000000000..ce1dfd06d79c --- /dev/null +++ b/keyboards/keebio/foldkb/rev2_1/halconf.h @@ -0,0 +1,10 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_SERIAL TRUE + +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/keebio/foldkb/rev2_1/keyboard.json b/keyboards/keebio/foldkb/rev2_1/keyboard.json new file mode 100644 index 000000000000..fc2eafe43108 --- /dev/null +++ b/keyboards/keebio/foldkb/rev2_1/keyboard.json @@ -0,0 +1,279 @@ +{ + "keyboard_name": "FoldKB Rev. 2.1", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "A4", "pin_b": "A3"} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["A6", "A15", "B3", "B4", "B5", "B6", "B7", "F0"], + "rows": ["A5", "A0", "A1", "A2", "F1"] + }, + "processor": "STM32G431", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "flower_blooming": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "riverflow": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "starlight": true, + "starlight_dual_hue": true, + "starlight_dual_sat": true, + "starlight_smooth": true, + "typing_heatmap": true + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 31, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 72, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 86, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 100, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 100, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 86, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 45, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 28, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 59, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 72, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 100, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 86, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 72, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 59, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 22, "y": 48, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 22, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 40, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 57, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 72, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 86, "y": 64, "flags": 4}, + {"matrix": [4, 7], "x": 100, "y": 64, "flags": 4}, + {"x": 93, "y": 48, "flags": 2}, + {"x": 65, "y": 64, "flags": 2}, + {"x": 31, "y": 64, "flags": 2}, + {"x": 10, "y": 64, "flags": 2}, + {"x": 0, "y": 24, "flags": 2}, + {"x": 24, "y": 0, "flags": 2}, + {"x": 65, "y": 0, "flags": 2}, + {"x": 90, "y": 8, "flags": 2}, + {"matrix": [5, 7], "x": 221, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 207, "y": 0, "flags": 4}, + {"matrix": [5, 5], "x": 193, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 179, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 165, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 152, "y": 0, "flags": 4}, + {"matrix": [5, 1], "x": 138, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 124, "y": 0, "flags": 4}, + {"matrix": [6, 0], "x": 124, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 138, "y": 16, "flags": 4}, + {"matrix": [6, 2], "x": 152, "y": 16, "flags": 4}, + {"matrix": [6, 3], "x": 165, "y": 16, "flags": 4}, + {"matrix": [6, 4], "x": 179, "y": 16, "flags": 4}, + {"matrix": [6, 5], "x": 193, "y": 16, "flags": 4}, + {"matrix": [6, 6], "x": 207, "y": 16, "flags": 4}, + {"matrix": [6, 7], "x": 224, "y": 16, "flags": 4}, + {"matrix": [7, 7], "x": 215, "y": 32, "flags": 4}, + {"matrix": [7, 5], "x": 193, "y": 32, "flags": 4}, + {"matrix": [7, 4], "x": 179, "y": 32, "flags": 4}, + {"matrix": [7, 3], "x": 165, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 152, "y": 32, "flags": 4}, + {"matrix": [7, 1], "x": 138, "y": 32, "flags": 4}, + {"matrix": [7, 0], "x": 124, "y": 32, "flags": 4}, + {"matrix": [8, 0], "x": 124, "y": 48, "flags": 4}, + {"matrix": [8, 1], "x": 138, "y": 48, "flags": 4}, + {"matrix": [8, 2], "x": 152, "y": 48, "flags": 4}, + {"matrix": [8, 3], "x": 165, "y": 48, "flags": 4}, + {"matrix": [8, 4], "x": 179, "y": 48, "flags": 4}, + {"matrix": [8, 5], "x": 198, "y": 48, "flags": 4}, + {"matrix": [8, 7], "x": 217, "y": 48, "flags": 4}, + {"matrix": [9, 7], "x": 215, "y": 64, "flags": 4}, + {"matrix": [9, 5], "x": 198, "y": 64, "flags": 4}, + {"matrix": [9, 4], "x": 181, "y": 64, "flags": 4}, + {"matrix": [9, 3], "x": 164, "y": 64, "flags": 4}, + {"matrix": [9, 1], "x": 145, "y": 64, "flags": 4}, + {"matrix": [9, 0], "x": 136, "y": 64, "flags": 4}, + {"matrix": [9, 0], "x": 126, "y": 64, "flags": 4}, + {"x": 121, "y": 56, "flags": 2}, + {"x": 152, "y": 64, "flags": 2}, + {"x": 207, "y": 64, "flags": 2}, + {"x": 224, "y": 52, "flags": 2}, + {"x": 224, "y": 12, "flags": 2}, + {"x": 196, "y": 0, "flags": 2}, + {"x": 159, "y": 0, "flags": 2}, + {"x": 124, "y": 8, "flags": 2} + ], + "max_brightness": 120, + "sleep": true, + "split_count": [44, 45] + }, + "split": { + "bootmagic": { + "matrix": [5, 7] + }, + "enabled": true, + "handedness": { + "pin": "A8" + }, + "matrix_pins": { + "right": { + "cols": ["A6", "A5", "A4", "A3", "A2", "B5", "B6", "B7"], + "rows": ["A15", "B3", "B4", "A0", "A1"] + } + }, + "serial": { + "driver": "usart" + }, + "transport": { + "sync": { + "matrix_state": true + } + } + }, + "usb": { + "device_version": "2.0.0", + "pid": "0x2358" + }, + "ws2812": { + "driver": "pwm", + "pin": "B0" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"matrix": [0, 3], "x": 3.25, "y": 0}, + {"matrix": [0, 4], "x": 4.25, "y": 0}, + {"matrix": [0, 5], "x": 5.25, "y": 0}, + {"matrix": [0, 6], "x": 6.25, "y": 0}, + {"matrix": [0, 7], "x": 7.25, "y": 0}, + {"matrix": [5, 0], "x": 9, "y": 0}, + {"matrix": [5, 1], "x": 10, "y": 0}, + {"matrix": [5, 2], "x": 11, "y": 0}, + {"matrix": [5, 3], "x": 12, "y": 0}, + {"matrix": [5, 4], "x": 13, "y": 0}, + {"matrix": [5, 5], "x": 14, "y": 0}, + {"matrix": [5, 6], "x": 15, "y": 0}, + {"matrix": [5, 7], "x": 16, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 2], "x": 1.75, "y": 1, "w": 1.5}, + {"matrix": [1, 3], "x": 3.25, "y": 1}, + {"matrix": [1, 4], "x": 4.25, "y": 1}, + {"matrix": [1, 5], "x": 5.25, "y": 1}, + {"matrix": [1, 6], "x": 6.25, "y": 1}, + {"matrix": [1, 7], "x": 7.25, "y": 1}, + {"matrix": [6, 0], "x": 9, "y": 1}, + {"matrix": [6, 1], "x": 10, "y": 1}, + {"matrix": [6, 2], "x": 11, "y": 1}, + {"matrix": [6, 3], "x": 12, "y": 1}, + {"matrix": [6, 4], "x": 13, "y": 1}, + {"matrix": [6, 5], "x": 14, "y": 1}, + {"matrix": [6, 6], "x": 15, "y": 1}, + {"matrix": [6, 7], "x": 16, "y": 1, "w": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 2], "x": 1.5, "y": 2, "w": 1.75}, + {"matrix": [2, 3], "x": 3.25, "y": 2}, + {"matrix": [2, 4], "x": 4.25, "y": 2}, + {"matrix": [2, 5], "x": 5.25, "y": 2}, + {"matrix": [2, 6], "x": 6.25, "y": 2}, + {"matrix": [2, 7], "x": 7.25, "y": 2}, + {"matrix": [7, 0], "x": 9, "y": 2}, + {"matrix": [7, 1], "x": 10, "y": 2}, + {"matrix": [7, 2], "x": 11, "y": 2}, + {"matrix": [7, 3], "x": 12, "y": 2}, + {"matrix": [7, 4], "x": 13, "y": 2}, + {"matrix": [7, 5], "x": 14, "y": 2}, + {"matrix": [7, 7], "x": 15, "y": 2, "w": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 2], "x": 1, "y": 3, "w": 2.25}, + {"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": [8, 0], "x": 9, "y": 3}, + {"matrix": [8, 1], "x": 10, "y": 3}, + {"matrix": [8, 2], "x": 11, "y": 3}, + {"matrix": [8, 3], "x": 12, "y": 3}, + {"matrix": [8, 4], "x": 13, "y": 3}, + {"matrix": [8, 5], "x": 14, "y": 3, "w": 1.75}, + {"matrix": [8, 7], "x": 15.75, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4}, + {"matrix": [4, 2], "x": 1.5, "y": 4, "w": 1.25}, + {"matrix": [4, 3], "x": 2.75, "y": 4, "w": 1.25}, + {"matrix": [4, 4], "x": 4, "y": 4, "w": 1.25}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [9, 0], "x": 9, "y": 4, "w": 1.25}, + {"matrix": [9, 1], "x": 10.25, "y": 4, "w": 1.5}, + {"matrix": [9, 3], "x": 11.75, "y": 4, "w": 1.25}, + {"matrix": [9, 4], "x": 13, "y": 4, "w": 1.25}, + {"matrix": [9, 5], "x": 14.25, "y": 4, "w": 1.25}, + {"matrix": [9, 7], "x": 15.5, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/keebio/foldkb/rev2_1/keymaps/default/keymap.c b/keyboards/keebio/foldkb/rev2_1/keymaps/default/keymap.c new file mode 100644 index 000000000000..bf3f3254461b --- /dev/null +++ b/keyboards/keebio/foldkb/rev2_1/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MUTE, KC_ESC, 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_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_END, 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_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL + ), + [1] = LAYOUT( + KC_MUTE, QK_BOOT, KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_DEL, + RM_TOGG, _______, RM_SATD, RM_SATU, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, + RM_NEXT, _______, RM_VALD, RM_VALU, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, + KC_VOLU, _______, RM_HUED, RM_HUEU, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, + KC_VOLD, _______, RM_SPDD, RM_SPDU, _______, _______, _______, _______, KC_0, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/keebio/foldkb/rev2_1/mcuconf.h b/keyboards/keebio/foldkb/rev2_1/mcuconf.h new file mode 100644 index 000000000000..77847f5b2cda --- /dev/null +++ b/keyboards/keebio/foldkb/rev2_1/mcuconf.h @@ -0,0 +1,14 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +/* enable USART1, used for split comms */ +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +/* enable TIM3, used for RGB LED PWM driver */ +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE diff --git a/keyboards/keebio/foldkb/rev2_1/rev2_1.c b/keyboards/keebio/foldkb/rev2_1/rev2_1.c new file mode 100644 index 000000000000..0fc47b1483ba --- /dev/null +++ b/keyboards/keebio/foldkb/rev2_1/rev2_1.c @@ -0,0 +1,29 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +void keyboard_pre_init_kb(void) { + // Disable the PD peripheral in pre-init because its pins are being used in the matrix: + PWR->CR3 |= PWR_CR3_UCPD_DBDIS; + // Call the corresponding _user() function (see https://docs.qmk.fm/#/custom_quantum_functions) + keyboard_pre_init_user(); +} + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + return false; +} From acbeec29dab5331fe914f35a53d6b43325881e4d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 25 Dec 2025 00:24:50 +0000 Subject: [PATCH 1177/1205] Reduce frequency of automatic workflow run approval (#25896) --- .github/workflows/auto_approve.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_approve.yml b/.github/workflows/auto_approve.yml index d526db397c59..a68d7c63ed57 100644 --- a/.github/workflows/auto_approve.yml +++ b/.github/workflows/auto_approve.yml @@ -4,7 +4,7 @@ permissions: {} on: schedule: - - cron: "*/5 * * * *" + - cron: "*/30 * * * *" jobs: automatic_approve: From 6a5610a8be9173a45315eee698fbea07dd7ccb43 Mon Sep 17 00:00:00 2001 From: Piervit <598737+Piervit@users.noreply.github.com> Date: Thu, 1 Jan 2026 09:37:25 +0100 Subject: [PATCH 1178/1205] Fix functions layer_debug and default_layer_debug (#25913) Co-authored-by: Joel Challis --- quantum/action_layer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/action_layer.c b/quantum/action_layer.c index 5828dcb82406..0a088ab5f0c7 100644 --- a/quantum/action_layer.c +++ b/quantum/action_layer.c @@ -60,7 +60,7 @@ static void default_layer_state_set(layer_state_t state) { * Print out the hex value of the 32-bit default layer state, as well as the value of the highest bit. */ void default_layer_debug(void) { - ac_dprintf("%08hX(%u)", default_layer_state, get_highest_layer(default_layer_state)); + ac_dprintf("%08lX(%u)", (uint32_t)default_layer_state, get_highest_layer(default_layer_state)); } /** \brief Default Layer Set @@ -231,7 +231,7 @@ void layer_xor(layer_state_t state) { * Print out the hex value of the 32-bit layer state, as well as the value of the highest bit. */ void layer_debug(void) { - ac_dprintf("%08hX(%u)", layer_state, get_highest_layer(layer_state)); + ac_dprintf("%08lX(%u)", (uint32_t)layer_state, get_highest_layer(layer_state)); } #endif From 99b5b9ab7ff80abd7cdfe890644ead0b7880b57f Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Thu, 1 Jan 2026 23:19:14 +1100 Subject: [PATCH 1179/1205] [CI] Regenerate Files (#25920) Regenerate Files --- quantum/keycodes.h | 2 +- quantum/keymap_extras/keymap_belgian.h | 2 +- quantum/keymap_extras/keymap_bepo.h | 2 +- quantum/keymap_extras/keymap_brazilian_abnt2.h | 2 +- quantum/keymap_extras/keymap_canadian_french.h | 2 +- quantum/keymap_extras/keymap_canadian_multilingual.h | 2 +- quantum/keymap_extras/keymap_colemak.h | 2 +- quantum/keymap_extras/keymap_croatian.h | 2 +- quantum/keymap_extras/keymap_czech.h | 2 +- quantum/keymap_extras/keymap_czech_mac_ansi.h | 2 +- quantum/keymap_extras/keymap_czech_mac_iso.h | 2 +- quantum/keymap_extras/keymap_danish.h | 2 +- quantum/keymap_extras/keymap_dvorak.h | 2 +- quantum/keymap_extras/keymap_dvorak_fr.h | 2 +- quantum/keymap_extras/keymap_dvorak_programmer.h | 2 +- quantum/keymap_extras/keymap_estonian.h | 2 +- quantum/keymap_extras/keymap_eurkey.h | 2 +- quantum/keymap_extras/keymap_farsi.h | 2 +- quantum/keymap_extras/keymap_finnish.h | 2 +- quantum/keymap_extras/keymap_french.h | 2 +- quantum/keymap_extras/keymap_french_afnor.h | 2 +- quantum/keymap_extras/keymap_french_mac_iso.h | 2 +- quantum/keymap_extras/keymap_german.h | 2 +- quantum/keymap_extras/keymap_german_mac_iso.h | 2 +- quantum/keymap_extras/keymap_greek.h | 2 +- quantum/keymap_extras/keymap_hebrew.h | 2 +- quantum/keymap_extras/keymap_hungarian.h | 2 +- quantum/keymap_extras/keymap_icelandic.h | 2 +- quantum/keymap_extras/keymap_irish.h | 2 +- quantum/keymap_extras/keymap_italian.h | 2 +- quantum/keymap_extras/keymap_italian_mac_ansi.h | 2 +- quantum/keymap_extras/keymap_italian_mac_iso.h | 2 +- quantum/keymap_extras/keymap_japanese.h | 2 +- quantum/keymap_extras/keymap_korean.h | 2 +- quantum/keymap_extras/keymap_latvian.h | 2 +- quantum/keymap_extras/keymap_lithuanian_azerty.h | 2 +- quantum/keymap_extras/keymap_lithuanian_qwerty.h | 2 +- quantum/keymap_extras/keymap_neo2.h | 2 +- quantum/keymap_extras/keymap_nordic.h | 2 +- quantum/keymap_extras/keymap_norman.h | 2 +- quantum/keymap_extras/keymap_norwegian.h | 2 +- quantum/keymap_extras/keymap_plover.h | 2 +- quantum/keymap_extras/keymap_plover_dvorak.h | 2 +- quantum/keymap_extras/keymap_polish.h | 2 +- quantum/keymap_extras/keymap_portuguese.h | 2 +- quantum/keymap_extras/keymap_portuguese_mac_iso.h | 2 +- quantum/keymap_extras/keymap_romanian.h | 2 +- quantum/keymap_extras/keymap_russian.h | 2 +- quantum/keymap_extras/keymap_russian_typewriter.h | 2 +- quantum/keymap_extras/keymap_serbian.h | 2 +- quantum/keymap_extras/keymap_serbian_latin.h | 2 +- quantum/keymap_extras/keymap_slovak.h | 2 +- quantum/keymap_extras/keymap_slovenian.h | 2 +- quantum/keymap_extras/keymap_spanish.h | 2 +- quantum/keymap_extras/keymap_spanish_dvorak.h | 2 +- quantum/keymap_extras/keymap_spanish_latin_america.h | 2 +- quantum/keymap_extras/keymap_swedish.h | 2 +- quantum/keymap_extras/keymap_swedish_mac_ansi.h | 2 +- quantum/keymap_extras/keymap_swedish_mac_iso.h | 2 +- quantum/keymap_extras/keymap_swedish_pro_mac_ansi.h | 2 +- quantum/keymap_extras/keymap_swedish_pro_mac_iso.h | 2 +- quantum/keymap_extras/keymap_swiss_de.h | 2 +- quantum/keymap_extras/keymap_swiss_fr.h | 2 +- quantum/keymap_extras/keymap_turkish_f.h | 2 +- quantum/keymap_extras/keymap_turkish_q.h | 2 +- quantum/keymap_extras/keymap_uk.h | 2 +- quantum/keymap_extras/keymap_ukrainian.h | 2 +- quantum/keymap_extras/keymap_us.h | 2 +- quantum/keymap_extras/keymap_us_extended.h | 2 +- quantum/keymap_extras/keymap_us_international.h | 2 +- quantum/keymap_extras/keymap_us_international_linux.h | 2 +- quantum/keymap_extras/keymap_workman.h | 2 +- quantum/keymap_extras/keymap_workman_zxcvm.h | 2 +- quantum/rgblight/rgblight_breathe_table.h | 2 +- 74 files changed, 74 insertions(+), 74 deletions(-) diff --git a/quantum/keycodes.h b/quantum/keycodes.h index e5a64d9a71a5..132eb79c6e16 100644 --- a/quantum/keycodes.h +++ b/quantum/keycodes.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_belgian.h b/quantum/keymap_extras/keymap_belgian.h index b41ed9d20b13..55f33a0bd3c1 100644 --- a/quantum/keymap_extras/keymap_belgian.h +++ b/quantum/keymap_extras/keymap_belgian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h index c0bb703ecca5..c664d0e6b1f9 100644 --- a/quantum/keymap_extras/keymap_bepo.h +++ b/quantum/keymap_extras/keymap_bepo.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_brazilian_abnt2.h b/quantum/keymap_extras/keymap_brazilian_abnt2.h index 267b5490c93f..aaff90adea12 100644 --- a/quantum/keymap_extras/keymap_brazilian_abnt2.h +++ b/quantum/keymap_extras/keymap_brazilian_abnt2.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_canadian_french.h b/quantum/keymap_extras/keymap_canadian_french.h index df9c73c0169d..8cec09af1268 100644 --- a/quantum/keymap_extras/keymap_canadian_french.h +++ b/quantum/keymap_extras/keymap_canadian_french.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index 4b4245739610..c2daed7e6462 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_colemak.h b/quantum/keymap_extras/keymap_colemak.h index a4fc77e80fb8..e6ffa551b842 100644 --- a/quantum/keymap_extras/keymap_colemak.h +++ b/quantum/keymap_extras/keymap_colemak.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_croatian.h b/quantum/keymap_extras/keymap_croatian.h index cdc032a9eb15..33bcd590df7d 100644 --- a/quantum/keymap_extras/keymap_croatian.h +++ b/quantum/keymap_extras/keymap_croatian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_czech.h b/quantum/keymap_extras/keymap_czech.h index cae16cdb9f48..f23a5728b552 100644 --- a/quantum/keymap_extras/keymap_czech.h +++ b/quantum/keymap_extras/keymap_czech.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_czech_mac_ansi.h b/quantum/keymap_extras/keymap_czech_mac_ansi.h index bdfda933b0e8..4b613c88274b 100644 --- a/quantum/keymap_extras/keymap_czech_mac_ansi.h +++ b/quantum/keymap_extras/keymap_czech_mac_ansi.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_czech_mac_iso.h b/quantum/keymap_extras/keymap_czech_mac_iso.h index 9c05d8dae0be..97b5addb7e91 100644 --- a/quantum/keymap_extras/keymap_czech_mac_iso.h +++ b/quantum/keymap_extras/keymap_czech_mac_iso.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_danish.h b/quantum/keymap_extras/keymap_danish.h index 1f1ee90e23cb..1907c34dd8a3 100644 --- a/quantum/keymap_extras/keymap_danish.h +++ b/quantum/keymap_extras/keymap_danish.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_dvorak.h b/quantum/keymap_extras/keymap_dvorak.h index 5cb2c4564af8..aa740645071f 100644 --- a/quantum/keymap_extras/keymap_dvorak.h +++ b/quantum/keymap_extras/keymap_dvorak.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_dvorak_fr.h b/quantum/keymap_extras/keymap_dvorak_fr.h index d01bf7fec705..55c568f6e558 100644 --- a/quantum/keymap_extras/keymap_dvorak_fr.h +++ b/quantum/keymap_extras/keymap_dvorak_fr.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_dvorak_programmer.h b/quantum/keymap_extras/keymap_dvorak_programmer.h index f17900105f57..547c61676a60 100644 --- a/quantum/keymap_extras/keymap_dvorak_programmer.h +++ b/quantum/keymap_extras/keymap_dvorak_programmer.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_estonian.h b/quantum/keymap_extras/keymap_estonian.h index 5fbeedcbe95b..4cdc6085e1f7 100644 --- a/quantum/keymap_extras/keymap_estonian.h +++ b/quantum/keymap_extras/keymap_estonian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_eurkey.h b/quantum/keymap_extras/keymap_eurkey.h index 5a13d48163b9..9e0a5a40f687 100644 --- a/quantum/keymap_extras/keymap_eurkey.h +++ b/quantum/keymap_extras/keymap_eurkey.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_farsi.h b/quantum/keymap_extras/keymap_farsi.h index e115d9c1c09f..1f47a955113d 100644 --- a/quantum/keymap_extras/keymap_farsi.h +++ b/quantum/keymap_extras/keymap_farsi.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_finnish.h b/quantum/keymap_extras/keymap_finnish.h index cb21da996221..332ce2641f34 100644 --- a/quantum/keymap_extras/keymap_finnish.h +++ b/quantum/keymap_extras/keymap_finnish.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index d4352c64819a..5f26b3a33887 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_french_afnor.h b/quantum/keymap_extras/keymap_french_afnor.h index 8e6905cc0104..17c82197b8b1 100644 --- a/quantum/keymap_extras/keymap_french_afnor.h +++ b/quantum/keymap_extras/keymap_french_afnor.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_french_mac_iso.h b/quantum/keymap_extras/keymap_french_mac_iso.h index ad9d280f2a80..4bbec33f13a4 100644 --- a/quantum/keymap_extras/keymap_french_mac_iso.h +++ b/quantum/keymap_extras/keymap_french_mac_iso.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h index bc98daa2fd4a..df51038b6613 100644 --- a/quantum/keymap_extras/keymap_german.h +++ b/quantum/keymap_extras/keymap_german.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_german_mac_iso.h b/quantum/keymap_extras/keymap_german_mac_iso.h index ba3143c57049..634a04754846 100644 --- a/quantum/keymap_extras/keymap_german_mac_iso.h +++ b/quantum/keymap_extras/keymap_german_mac_iso.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_greek.h b/quantum/keymap_extras/keymap_greek.h index fb2f02a04f0b..3ee958935c3d 100644 --- a/quantum/keymap_extras/keymap_greek.h +++ b/quantum/keymap_extras/keymap_greek.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_hebrew.h b/quantum/keymap_extras/keymap_hebrew.h index 5d1d4a29c6b9..e54aaf111642 100644 --- a/quantum/keymap_extras/keymap_hebrew.h +++ b/quantum/keymap_extras/keymap_hebrew.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_hungarian.h b/quantum/keymap_extras/keymap_hungarian.h index 27236553e88e..5be7be5a9439 100644 --- a/quantum/keymap_extras/keymap_hungarian.h +++ b/quantum/keymap_extras/keymap_hungarian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_icelandic.h b/quantum/keymap_extras/keymap_icelandic.h index 409be27b771d..451819c283f3 100644 --- a/quantum/keymap_extras/keymap_icelandic.h +++ b/quantum/keymap_extras/keymap_icelandic.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_irish.h b/quantum/keymap_extras/keymap_irish.h index 587467bcbeaa..ff1bb0efa30f 100644 --- a/quantum/keymap_extras/keymap_irish.h +++ b/quantum/keymap_extras/keymap_irish.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h index 9fd7f1b15c79..a7d05b367402 100644 --- a/quantum/keymap_extras/keymap_italian.h +++ b/quantum/keymap_extras/keymap_italian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_italian_mac_ansi.h b/quantum/keymap_extras/keymap_italian_mac_ansi.h index 9ef38c0d87ac..5ef67a1485a0 100644 --- a/quantum/keymap_extras/keymap_italian_mac_ansi.h +++ b/quantum/keymap_extras/keymap_italian_mac_ansi.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_italian_mac_iso.h b/quantum/keymap_extras/keymap_italian_mac_iso.h index e80cfa450c51..376c97684b72 100644 --- a/quantum/keymap_extras/keymap_italian_mac_iso.h +++ b/quantum/keymap_extras/keymap_italian_mac_iso.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_japanese.h b/quantum/keymap_extras/keymap_japanese.h index 55df86e16d72..1839cb6b408e 100644 --- a/quantum/keymap_extras/keymap_japanese.h +++ b/quantum/keymap_extras/keymap_japanese.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_korean.h b/quantum/keymap_extras/keymap_korean.h index 7bf64c4841b8..a2ea15dc4854 100644 --- a/quantum/keymap_extras/keymap_korean.h +++ b/quantum/keymap_extras/keymap_korean.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_latvian.h b/quantum/keymap_extras/keymap_latvian.h index 4d60c4516312..590106bb3cb7 100644 --- a/quantum/keymap_extras/keymap_latvian.h +++ b/quantum/keymap_extras/keymap_latvian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_lithuanian_azerty.h b/quantum/keymap_extras/keymap_lithuanian_azerty.h index e88cc75e078b..078dc87eb83a 100644 --- a/quantum/keymap_extras/keymap_lithuanian_azerty.h +++ b/quantum/keymap_extras/keymap_lithuanian_azerty.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_lithuanian_qwerty.h b/quantum/keymap_extras/keymap_lithuanian_qwerty.h index 3321615c1e61..2a0b8696ab42 100644 --- a/quantum/keymap_extras/keymap_lithuanian_qwerty.h +++ b/quantum/keymap_extras/keymap_lithuanian_qwerty.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_neo2.h b/quantum/keymap_extras/keymap_neo2.h index 5d10f19fd5d9..8c6e8a08d106 100644 --- a/quantum/keymap_extras/keymap_neo2.h +++ b/quantum/keymap_extras/keymap_neo2.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_nordic.h b/quantum/keymap_extras/keymap_nordic.h index 3a11b29fc865..8381e97e3e54 100644 --- a/quantum/keymap_extras/keymap_nordic.h +++ b/quantum/keymap_extras/keymap_nordic.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_norman.h b/quantum/keymap_extras/keymap_norman.h index d47c2ff8a731..09329fa109f7 100644 --- a/quantum/keymap_extras/keymap_norman.h +++ b/quantum/keymap_extras/keymap_norman.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_norwegian.h b/quantum/keymap_extras/keymap_norwegian.h index 021b8c3b9c94..915a4edeec16 100644 --- a/quantum/keymap_extras/keymap_norwegian.h +++ b/quantum/keymap_extras/keymap_norwegian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_plover.h b/quantum/keymap_extras/keymap_plover.h index e7facfd623d3..3c501d758700 100644 --- a/quantum/keymap_extras/keymap_plover.h +++ b/quantum/keymap_extras/keymap_plover.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_plover_dvorak.h b/quantum/keymap_extras/keymap_plover_dvorak.h index 5c8a4f9ada25..ef7a0582033d 100644 --- a/quantum/keymap_extras/keymap_plover_dvorak.h +++ b/quantum/keymap_extras/keymap_plover_dvorak.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_polish.h b/quantum/keymap_extras/keymap_polish.h index e5e48097f71a..59b1488c1f4b 100644 --- a/quantum/keymap_extras/keymap_polish.h +++ b/quantum/keymap_extras/keymap_polish.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_portuguese.h b/quantum/keymap_extras/keymap_portuguese.h index 44abaf65370b..1dbfc083abee 100644 --- a/quantum/keymap_extras/keymap_portuguese.h +++ b/quantum/keymap_extras/keymap_portuguese.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_portuguese_mac_iso.h b/quantum/keymap_extras/keymap_portuguese_mac_iso.h index f2d04440fbf7..44c27f60987d 100644 --- a/quantum/keymap_extras/keymap_portuguese_mac_iso.h +++ b/quantum/keymap_extras/keymap_portuguese_mac_iso.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_romanian.h b/quantum/keymap_extras/keymap_romanian.h index 9a7239e0324a..9e58129a4ac8 100644 --- a/quantum/keymap_extras/keymap_romanian.h +++ b/quantum/keymap_extras/keymap_romanian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_russian.h b/quantum/keymap_extras/keymap_russian.h index b756a657df8f..2591989e883f 100644 --- a/quantum/keymap_extras/keymap_russian.h +++ b/quantum/keymap_extras/keymap_russian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_russian_typewriter.h b/quantum/keymap_extras/keymap_russian_typewriter.h index 45fb1ede0424..d0c15913ca8d 100644 --- a/quantum/keymap_extras/keymap_russian_typewriter.h +++ b/quantum/keymap_extras/keymap_russian_typewriter.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_serbian.h b/quantum/keymap_extras/keymap_serbian.h index 202322b59196..2770ca29a200 100644 --- a/quantum/keymap_extras/keymap_serbian.h +++ b/quantum/keymap_extras/keymap_serbian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_serbian_latin.h b/quantum/keymap_extras/keymap_serbian_latin.h index e863aa4ed87c..4f9749f45222 100644 --- a/quantum/keymap_extras/keymap_serbian_latin.h +++ b/quantum/keymap_extras/keymap_serbian_latin.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_slovak.h b/quantum/keymap_extras/keymap_slovak.h index f5848a6aaf9a..6bede22ba7f7 100644 --- a/quantum/keymap_extras/keymap_slovak.h +++ b/quantum/keymap_extras/keymap_slovak.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_slovenian.h b/quantum/keymap_extras/keymap_slovenian.h index 502f06ad646c..ad9ce22f3336 100644 --- a/quantum/keymap_extras/keymap_slovenian.h +++ b/quantum/keymap_extras/keymap_slovenian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h index dc23aea63961..1c84ba947dac 100644 --- a/quantum/keymap_extras/keymap_spanish.h +++ b/quantum/keymap_extras/keymap_spanish.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_spanish_dvorak.h b/quantum/keymap_extras/keymap_spanish_dvorak.h index e19a84b7e5eb..c9c1a7066f7f 100644 --- a/quantum/keymap_extras/keymap_spanish_dvorak.h +++ b/quantum/keymap_extras/keymap_spanish_dvorak.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_spanish_latin_america.h b/quantum/keymap_extras/keymap_spanish_latin_america.h index 57329d20cd08..404cbcbe19cb 100644 --- a/quantum/keymap_extras/keymap_spanish_latin_america.h +++ b/quantum/keymap_extras/keymap_spanish_latin_america.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_swedish.h b/quantum/keymap_extras/keymap_swedish.h index a50f8af30d0b..ced83e0a7f82 100644 --- a/quantum/keymap_extras/keymap_swedish.h +++ b/quantum/keymap_extras/keymap_swedish.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_swedish_mac_ansi.h b/quantum/keymap_extras/keymap_swedish_mac_ansi.h index 642c161dab56..a2d8a5437d44 100644 --- a/quantum/keymap_extras/keymap_swedish_mac_ansi.h +++ b/quantum/keymap_extras/keymap_swedish_mac_ansi.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_swedish_mac_iso.h b/quantum/keymap_extras/keymap_swedish_mac_iso.h index 50387364cf4b..0338a9944fc3 100644 --- a/quantum/keymap_extras/keymap_swedish_mac_iso.h +++ b/quantum/keymap_extras/keymap_swedish_mac_iso.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_swedish_pro_mac_ansi.h b/quantum/keymap_extras/keymap_swedish_pro_mac_ansi.h index be1581bb3dfc..46187f4d17ac 100644 --- a/quantum/keymap_extras/keymap_swedish_pro_mac_ansi.h +++ b/quantum/keymap_extras/keymap_swedish_pro_mac_ansi.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_swedish_pro_mac_iso.h b/quantum/keymap_extras/keymap_swedish_pro_mac_iso.h index d50213f987a8..29878371cb8d 100644 --- a/quantum/keymap_extras/keymap_swedish_pro_mac_iso.h +++ b/quantum/keymap_extras/keymap_swedish_pro_mac_iso.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_swiss_de.h b/quantum/keymap_extras/keymap_swiss_de.h index 4ebdb5c61000..7f74b3043272 100644 --- a/quantum/keymap_extras/keymap_swiss_de.h +++ b/quantum/keymap_extras/keymap_swiss_de.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_swiss_fr.h b/quantum/keymap_extras/keymap_swiss_fr.h index 11fcc6536d53..ada1837c948c 100644 --- a/quantum/keymap_extras/keymap_swiss_fr.h +++ b/quantum/keymap_extras/keymap_swiss_fr.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_turkish_f.h b/quantum/keymap_extras/keymap_turkish_f.h index bbdaa3af25f1..f863c9036bfa 100644 --- a/quantum/keymap_extras/keymap_turkish_f.h +++ b/quantum/keymap_extras/keymap_turkish_f.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_turkish_q.h b/quantum/keymap_extras/keymap_turkish_q.h index d3fa00d7aeee..7396fb3d20f4 100644 --- a/quantum/keymap_extras/keymap_turkish_q.h +++ b/quantum/keymap_extras/keymap_turkish_q.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h index 7490af6cf62e..6a43f4669fea 100644 --- a/quantum/keymap_extras/keymap_uk.h +++ b/quantum/keymap_extras/keymap_uk.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_ukrainian.h b/quantum/keymap_extras/keymap_ukrainian.h index 78e39f8c7541..3ceb4b81348c 100644 --- a/quantum/keymap_extras/keymap_ukrainian.h +++ b/quantum/keymap_extras/keymap_ukrainian.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_us.h b/quantum/keymap_extras/keymap_us.h index b6e380ab2329..5357be038cc2 100644 --- a/quantum/keymap_extras/keymap_us.h +++ b/quantum/keymap_extras/keymap_us.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_us_extended.h b/quantum/keymap_extras/keymap_us_extended.h index 4262a7c44e26..08dc45c5cdb9 100644 --- a/quantum/keymap_extras/keymap_us_extended.h +++ b/quantum/keymap_extras/keymap_us_extended.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_us_international.h b/quantum/keymap_extras/keymap_us_international.h index adc7051fe422..247ab027784c 100644 --- a/quantum/keymap_extras/keymap_us_international.h +++ b/quantum/keymap_extras/keymap_us_international.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_us_international_linux.h b/quantum/keymap_extras/keymap_us_international_linux.h index db315968d63e..e9d5bde808b7 100644 --- a/quantum/keymap_extras/keymap_us_international_linux.h +++ b/quantum/keymap_extras/keymap_us_international_linux.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_workman.h b/quantum/keymap_extras/keymap_workman.h index 727e44512c08..8a37a1426570 100644 --- a/quantum/keymap_extras/keymap_workman.h +++ b/quantum/keymap_extras/keymap_workman.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/keymap_extras/keymap_workman_zxcvm.h b/quantum/keymap_extras/keymap_workman_zxcvm.h index 4655af60d6c0..1ec111245ef6 100644 --- a/quantum/keymap_extras/keymap_workman_zxcvm.h +++ b/quantum/keymap_extras/keymap_workman_zxcvm.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/rgblight/rgblight_breathe_table.h b/quantum/rgblight/rgblight_breathe_table.h index 5a8181c7d43b..648e1bbaec49 100644 --- a/quantum/rgblight/rgblight_breathe_table.h +++ b/quantum/rgblight/rgblight_breathe_table.h @@ -1,4 +1,4 @@ -// Copyright 2025 QMK +// Copyright 2026 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* From f3a16ef21d660b72e39c9bcfabca2adb86900c1e Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Sat, 3 Jan 2026 14:53:13 +0100 Subject: [PATCH 1180/1205] Fix typos in Aleblazer Zodiark readme (#25925) --- keyboards/aleblazer/zodiark/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/aleblazer/zodiark/readme.md b/keyboards/aleblazer/zodiark/readme.md index 392744dede78..a27ed94f8ad5 100644 --- a/keyboards/aleblazer/zodiark/readme.md +++ b/keyboards/aleblazer/zodiark/readme.md @@ -2,7 +2,7 @@ ![Zodiark Split](https://i.imgur.com/49O8aowl.jpg) -A split keyboard with 5x7 including a thumbcluster, encoders on each side, per key RGB, and 2x I2C headers per side, supporiting 1.3"/.96" 128x64 OLEDs (the 1.3" is an SSH1106 OLED, refer to QMK documentation for limitations), .91" 128x32 OLEDs. +A split keyboard with 5x7 including a thumbcluster, encoders on each side, per key RGB, and 2x I2C headers per side, supporting 1.3"/.96" 128x64 OLEDs (the 1.3" is an SH1106 OLED, refer to QMK documentation for limitations) and .91" 128x32 OLEDs. * Keyboard Maintainer: [Aleblazer](https://github.com/Aleblazer/), [Discord Link](https://discord.gg/BCSbXwskVt) * Hardware Supported: Pro Micro and derivatives From ddeaa26fefa7b43a28ce583e39dbf43b7234dd24 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Sat, 3 Jan 2026 06:55:17 -0700 Subject: [PATCH 1181/1205] Add `.env`, `.envrc` to gitignore (#25904) --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6ec26d387654..e9aaf0b27bab 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,8 @@ cmake-build-debug CMakeLists.txt *.pdf *.zip +.env +.envrc # Let these ones be user specific, since we have so many different configurations *.code-workspace From 91a9f9e49263dbb04a0c54a2664d5115623009aa Mon Sep 17 00:00:00 2001 From: nullptr Date: Sat, 3 Jan 2026 20:45:29 +0100 Subject: [PATCH 1182/1205] Fix RGB Matrix Typing Heatmap overflow (#25915) --- quantum/rgb_matrix/animations/typing_heatmap_anim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/rgb_matrix/animations/typing_heatmap_anim.h b/quantum/rgb_matrix/animations/typing_heatmap_anim.h index 060673889184..77d79cf1af9e 100644 --- a/quantum/rgb_matrix/animations/typing_heatmap_anim.h +++ b/quantum/rgb_matrix/animations/typing_heatmap_anim.h @@ -32,7 +32,7 @@ void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) { if (i_row == row && i_col == col) { g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], RGB_MATRIX_TYPING_HEATMAP_INCREASE_STEP); } else { -# define LED_DISTANCE(led_a, led_b) sqrt16(((int16_t)(led_a.x - led_b.x) * (int16_t)(led_a.x - led_b.x)) + ((int16_t)(led_a.y - led_b.y) * (int16_t)(led_a.y - led_b.y))) +# define LED_DISTANCE(led_a, led_b) sqrt16(((int32_t)(led_a.x - led_b.x) * (int32_t)(led_a.x - led_b.x)) + ((int32_t)(led_a.y - led_b.y) * (int32_t)(led_a.y - led_b.y))) uint8_t distance = LED_DISTANCE(g_led_config.point[g_led_config.matrix_co[row][col]], g_led_config.point[g_led_config.matrix_co[i_row][i_col]]); # undef LED_DISTANCE if (distance <= RGB_MATRIX_TYPING_HEATMAP_SPREAD) { From 8c035c2116c0ff2617a6aba996c3b6a9c977e19e Mon Sep 17 00:00:00 2001 From: Ed Flanagan Date: Sat, 3 Jan 2026 14:18:41 -0600 Subject: [PATCH 1183/1205] Fix small typo in WS2812 driver doc (#25928) `ws812` -> `ws2812` --- docs/drivers/ws2812.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drivers/ws2812.md b/docs/drivers/ws2812.md index 0c26ec624807..1d701138970b 100644 --- a/docs/drivers/ws2812.md +++ b/docs/drivers/ws2812.md @@ -292,7 +292,7 @@ Set the color of a single LED. This function does not immediately update the LED --- -### `void ws812_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-ws2812-set-color-all} +### `void ws2812_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-ws2812-set-color-all} Set the color of all LEDs. From 31948625020db943f2a5272a43876983c404d814 Mon Sep 17 00:00:00 2001 From: Pascal Getreuer <50221757+getreuer@users.noreply.github.com> Date: Sat, 3 Jan 2026 15:00:50 -0800 Subject: [PATCH 1184/1205] docs/tap_hold.md fixes: Note that Chordal Hold supports multiple same-side mods and fix heading for Speculative Hold. (#25924) * Note Chordal Hold supports multiple same-side mods. * Fix "Speculative Hold" heading from H3 -> H2. --- docs/tap_hold.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 2aa628c5354c..3e88a7a5c238 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -604,6 +604,20 @@ Or if the two keys are on opposite hands and the `PERMISSIVE_HOLD` option is enabled, this will produce `C` with `SFT_T(KC_A)` settled as held when that `KC_C` is released. +As an exception to the opposite hands rule, Chordal Hold supports combining +multiple same-side modifiers within the tapping term. This is useful for +multi-mod hotkeys like Ctrl + Shift + V. For instance with Chordal Hold together +with either Permissive Hold or Hold On Other Key Press, the following input +results in Ctrl + Shift + V being sent, supposing `J` and `K` are on the right +hand side and `V` is on the left hand side: + +- `SFT_T(KC_J)` Down +- `CTL_T(KC_K)` Down +- `KC_V` Down +- `KC_V` Up +- `SFT_T(KC_J)` Up +- `CTL_T(KC_K)` Up + ### Chordal Hold Handedness Determining whether keys are on the same or opposite hands involves defining the @@ -779,7 +793,7 @@ Do not use `MOD_xxx` constants like `MOD_LSFT` or `MOD_RALT`, since they're 5-bi [Auto Shift](features/auto_shift) has its own version of `retro tapping` called `retro shift`. It is extremely similar to `retro tapping`, but holding the key past `AUTO_SHIFT_TIMEOUT` results in the value it sends being shifted. Other configurations also affect it differently; see [here](features/auto_shift#retro-shift) for more information. -### Speculative Hold +## Speculative Hold Speculative Hold makes mod-tap keys more responsive by applying the modifier instantly on keydown, before the tap-hold decision is made. This is especially useful for actions like Shift+Click with a mouse, which can feel laggy with standard mod-taps. @@ -820,4 +834,4 @@ Well, it's simple really: customization. But specifically, it depends on how you ## Why are there no `*_kb` or `*_user` functions?! -Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum- or keyboard-level function. Only user-level functions are useful here, so there is no need to mark them as such. \ No newline at end of file +Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum- or keyboard-level function. Only user-level functions are useful here, so there is no need to mark them as such. From 1e683923e1e42dda42911ebbaa191776aec3a626 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 7 Jan 2026 10:24:16 +0000 Subject: [PATCH 1185/1205] Handle broken symlinks in `qmk doctor` udev checks (#25934) Handle broken symlinks in 'qmk doctor' udev checks --- lib/python/qmk/cli/doctor/linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/doctor/linux.py b/lib/python/qmk/cli/doctor/linux.py index f0850d4e6488..c99cc6baeaad 100644 --- a/lib/python/qmk/cli/doctor/linux.py +++ b/lib/python/qmk/cli/doctor/linux.py @@ -87,7 +87,7 @@ def check_udev_rules(): line = line.strip() if not line.startswith("#") and len(line): current_rules.add(line) - except PermissionError: + except (PermissionError, FileNotFoundError): cli.log.debug("Failed to read: %s", rule_file) # Check if the desired rules are among the currently present rules From 3d591a2000044d859115b8f6bf8e0c6af60acb74 Mon Sep 17 00:00:00 2001 From: Stefan Gluszek Date: Wed, 7 Jan 2026 22:08:05 +0100 Subject: [PATCH 1186/1205] Update fatotesa keyboard config. (#25811) --- keyboards/fatotesa/keyboard.json | 8 +++--- keyboards/fatotesa/keymaps/default/keymap.c | 30 +++++++++++---------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/keyboards/fatotesa/keyboard.json b/keyboards/fatotesa/keyboard.json index 3013e8b812ac..f300daa8ce6a 100644 --- a/keyboards/fatotesa/keyboard.json +++ b/keyboards/fatotesa/keyboard.json @@ -32,9 +32,9 @@ "rows": ["B6", "E6", "D4", "D7", "B4", "B5"] } }, - "bootmagic": { - "matrix": [4, 1] - } + }, + "bootmagic": { + "matrix": [4, 1] }, "matrix_pins": { "cols": ["F5", "F6", "F7", "B1", "B3", "B2", "B6", null], @@ -43,7 +43,7 @@ "usb": { "device_version": "1.0.0", "pid": "0x0000", - "vid": "0xFEED" + "vid": "0x5347" }, "layouts": { "LAYOUT": { diff --git a/keyboards/fatotesa/keymaps/default/keymap.c b/keyboards/fatotesa/keymaps/default/keymap.c index 1f6aa8048897..a9fadb4142de 100644 --- a/keyboards/fatotesa/keymaps/default/keymap.c +++ b/keyboards/fatotesa/keymaps/default/keymap.c @@ -13,18 +13,20 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_END, KC_INSERT, KC_DELETE, KC_KB_MUTE, - KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BACKSPACE, - LT(1, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LEFT_BRACKET, KC_RIGHT_BRACKET, KC_ENTER, - KC_LEFT_CTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SEMICOLON, KC_QUOTE, KC_BACKSLASH, - KC_LEFT_SHIFT, KC_LEFT_ANGLE_BRACKET, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RIGHT_SHIFT, - CW_TOGG, KC_LWIN, KC_LEFT_ALT, KC_BACKSPACE, KC_LEFT_ALT, KC_SPACE, KC_RIGHT_ALT, KC_RIGHT_CTRL, KC_NO, KC_NO - ), + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_END, KC_INSERT, KC_DELETE, KC_KB_MUTE, + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BACKSPACE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LEFT_BRACKET, KC_RIGHT_BRACKET, KC_ENTER, + OSM(MOD_LCTL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SEMICOLON, KC_QUOTE, KC_BACKSLASH, + OSM(MOD_LSFT), KC_LEFT_ANGLE_BRACKET, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, OSM(MOD_RSFT), + CW_TOGG, OSM(MOD_LGUI), KC_LEFT_ALT, MO(1), OSM(MOD_LALT), KC_SPACE, OSM(MOD_RALT), KC_RIGHT_CTRL, KC_NO, KC_NO + ), + [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______ - )}; + QK_REBOOT, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______ + ) +}; From a0b15d08bc56ccbea9990dde884136425e9886f7 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 8 Jan 2026 05:36:40 +0000 Subject: [PATCH 1187/1205] Short term fix for avr-libc@2.3.0 (#25938) --- quantum/send_string/send_string.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quantum/send_string/send_string.c b/quantum/send_string/send_string.c index 602f24dabe38..6471d5140c67 100644 --- a/quantum/send_string/send_string.c +++ b/quantum/send_string/send_string.c @@ -281,6 +281,10 @@ void send_nibble(uint8_t number) { } } +#if defined(__AVR_ATmega32U4__) +# include +#endif + void tap_random_base64(void) { #if defined(__AVR_ATmega32U4__) uint8_t key = (TCNT0 + TCNT1 + TCNT3 + TCNT4) % 64; From e31384babf7cb77fb6b076541ba3373f3f709b46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Jan 2026 19:50:23 +0000 Subject: [PATCH 1188/1205] Bump JamesIves/github-pages-deploy-action from 4.7.6 to 4.8.0 (#25943) Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.7.6 to 4.8.0. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.7.6...v4.8.0) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-version: 4.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8a0229f8731a..104b19892b4e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -57,7 +57,7 @@ jobs: - name: Deploy if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }} - uses: JamesIves/github-pages-deploy-action@v4.7.6 + uses: JamesIves/github-pages-deploy-action@v4.8.0 with: token: ${{ secrets.GITHUB_TOKEN }} branch: gh-pages From 56a2e332e10e6c8d7bc41a45310fa983cbd8c577 Mon Sep 17 00:00:00 2001 From: Thanh Son Tran <62438883+trnthsn@users.noreply.github.com> Date: Sat, 10 Jan 2026 07:01:15 +0700 Subject: [PATCH 1189/1205] Update tyson60 pid (#25935) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update support S6xty5 * Delete chconf.h * Update manufacturer, community layout for hhkb * Update layout * fix row index * Update tyson60s * Update community layout and layout name * Update remove rgb test mode * Update capslock led * Apply suggestions from code review Co-authored-by: Duncan Sutherland * Remove deprecated s6xty5 * Update tyson60 product id --------- Co-authored-by: Trần Thanh Sơn Co-authored-by: Duncan Sutherland --- keyboards/trnthsn/tyson60/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/trnthsn/tyson60/info.json b/keyboards/trnthsn/tyson60/info.json index 6f4df15d9999..27e10a1333db 100644 --- a/keyboards/trnthsn/tyson60/info.json +++ b/keyboards/trnthsn/tyson60/info.json @@ -34,7 +34,7 @@ }, "usb": { "device_version": "0.0.1", - "pid": "0x5336", + "pid": "0x3633", "vid": "0x5453" }, "ws2812": { From 70c36c6c97094bae79e7766dabdb75f0cd91ff85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20A=2E=20Volpato?= Date: Sun, 11 Jan 2026 14:47:23 -0300 Subject: [PATCH 1190/1205] First support for KKC Wily (#25852) --- keyboards/wily/info.json | 20 ++++ keyboards/wily/readme.md | 26 +++++ keyboards/wily/wily_h625/keyboard.json | 90 ++++++++++++++++ .../wily/wily_h625/keymaps/default/keymap.c | 34 ++++++ keyboards/wily/wily_h700/keyboard.json | 89 ++++++++++++++++ .../wily/wily_h700/keymaps/default/keymap.c | 34 ++++++ keyboards/wily/wily_s/config.h | 21 ++++ keyboards/wily/wily_s/halconf.h | 21 ++++ keyboards/wily/wily_s/keyboard.json | 100 ++++++++++++++++++ .../wily/wily_s/keymaps/default/keymap.c | 34 ++++++ keyboards/wily/wily_s/mcuconf.h | 22 ++++ 11 files changed, 491 insertions(+) create mode 100644 keyboards/wily/info.json create mode 100644 keyboards/wily/readme.md create mode 100644 keyboards/wily/wily_h625/keyboard.json create mode 100644 keyboards/wily/wily_h625/keymaps/default/keymap.c create mode 100644 keyboards/wily/wily_h700/keyboard.json create mode 100644 keyboards/wily/wily_h700/keymaps/default/keymap.c create mode 100644 keyboards/wily/wily_s/config.h create mode 100644 keyboards/wily/wily_s/halconf.h create mode 100644 keyboards/wily/wily_s/keyboard.json create mode 100644 keyboards/wily/wily_s/keymaps/default/keymap.c create mode 100644 keyboards/wily/wily_s/mcuconf.h diff --git a/keyboards/wily/info.json b/keyboards/wily/info.json new file mode 100644 index 000000000000..9bba2de91024 --- /dev/null +++ b/keyboards/wily/info.json @@ -0,0 +1,20 @@ +{ + "manufacturer": "KKC", + "maintainer": "Gondolindrim", + "usb": { + "vid": "0x5750", + "device_version": "0.0.1" + }, + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "nkro": true + }, + "build": { + "lto": true + }, + "diode_direction": "COL2ROW", + "processor": "STM32F411", + "bootloader": "stm32-dfu" +} diff --git a/keyboards/wily/readme.md b/keyboards/wily/readme.md new file mode 100644 index 000000000000..e70ac11a1609 --- /dev/null +++ b/keyboards/wily/readme.md @@ -0,0 +1,26 @@ +# KKC Wily + +The Wily is a 65% keyboard by Keyote Key Company. + +* Keyboard Maintainer: [gondolindrim](https://github.com/gondolindrim) +* Hardware Supported: three PCB variants (solderable, hotswap with Tsangan bottom row, hotswap with default bottom row), both based on STM32F072 +* Hardware Availability: not yet available for purchase as of november 2025. + +Make example for this keyboard (after setting up your build environment): + + make wily/:default + +Where `` can be either `wily_s` , `wily_h625` or `wily_h700`. Flashing example for this keyboard: + + make wily/: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (Escape) and plug in the keyboard +* **Physical reset button**: press and hold the button on the back of the PCB for five seconds +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + diff --git a/keyboards/wily/wily_h625/keyboard.json b/keyboards/wily/wily_h625/keyboard.json new file mode 100644 index 000000000000..915c3459aa53 --- /dev/null +++ b/keyboards/wily/wily_h625/keyboard.json @@ -0,0 +1,90 @@ +{ + "keyboard_name": "Keyote Wily-H625", + "usb": { + "pid": "0x5053", + "device_version": "0.0.1" + }, + "matrix_pins": { + "cols": ["A15", "B10", "C15", "C14", "C13", "B1", "B0", "A7", "A6", "A5", "B14", "B13", "B12", "A4", "A3"], + "rows": ["A0", "B8", "B3", "B5", "B9"] + }, + "layouts": { + "LAYOUT": { + "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":[0,9], "x":9, "y":0}, + {"matrix":[0,10], "x":10, "y":0}, + {"matrix":[0,11], "x":11, "y":0}, + {"matrix":[0,12], "x":12, "y":0}, + {"matrix":[0,13], "x":13, "y":0}, + {"matrix":[0,14], "x":14, "y":0}, + {"matrix":[1,14], "x":15, "y":0}, + + {"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":[1,9], "x":9.5, "y":1}, + {"matrix":[1,10], "x":10.5, "y":1}, + {"matrix":[1,11], "x":11.5, "y":1}, + {"matrix":[1,12], "x":12.5, "y":1}, + {"matrix":[1,13], "x":13.5, "y":1, "w":1.5}, + {"matrix":[2,14], "x":15 , "y":1}, + + {"matrix":[2,0], "x":0 , "y":2}, + {"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":[2,9], "x":9.75, "y":2}, + {"matrix":[2,10], "x":10.75, "y":2}, + {"matrix":[2,11], "x":11.75, "y":2}, + {"matrix":[2,12], "x":12.75, "y":2, "w":2.25}, + {"matrix":[2,13], "x":15 , "y":2}, + + {"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":[3,9], "x":9.25, "y":3}, + {"matrix":[3,10], "x":10.25 , "y":3}, + {"matrix":[3,11], "x":11.25, "y":3}, + {"matrix":[3,12], "x":12.25, "y":3, "w":1.75}, + {"matrix":[3,13], "x":14, "y":3}, + {"matrix":[3,14], "x":15, "y":3}, + + {"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,6], "x":3.75, "y":4, "w":6.25}, + {"matrix":[4,8], "x":10, "y":4}, + {"matrix":[4,9], "x":11, "y":4}, + {"matrix":[4,10], "x":12, "y":4}, + {"matrix":[4,12], "x":13, "y":4}, + {"matrix":[4,13], "x":14, "y":4}, + {"matrix":[4,14], "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/wily/wily_h625/keymaps/default/keymap.c b/keyboards/wily/wily_h625/keymaps/default/keymap.c new file mode 100644 index 000000000000..36c2eda7b9eb --- /dev/null +++ b/keyboards/wily/wily_h625/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2025 Gondolindrim + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#define LT1GUI LT(1, KC_RGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + 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_BSPC, KC_DEL , + 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_HOME, + 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_END , + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_INS , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, LT1GUI , KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT +), +[1] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) +}; diff --git a/keyboards/wily/wily_h700/keyboard.json b/keyboards/wily/wily_h700/keyboard.json new file mode 100644 index 000000000000..1dfe3d24a4f8 --- /dev/null +++ b/keyboards/wily/wily_h700/keyboard.json @@ -0,0 +1,89 @@ +{ + "keyboard_name": "Keyote Wily-H700", + "usb": { + "pid": "0x5052", + "device_version": "0.0.1" + }, + "matrix_pins": { + "cols": ["A15", "B10", "C15", "C14", "C13", "B1", "B0", "A7", "A6", "A5", "B14", "B13", "B12", "A4", "A3"], + "rows": ["A0", "B8", "B3", "B5", "B9"] + }, + "layouts": { + "LAYOUT": { + "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":[0,9], "x":9, "y":0}, + {"matrix":[0,10], "x":10, "y":0}, + {"matrix":[0,11], "x":11, "y":0}, + {"matrix":[0,12], "x":12, "y":0}, + {"matrix":[0,13], "x":13, "y":0}, + {"matrix":[0,14], "x":14, "y":0}, + {"matrix":[1,14], "x":15, "y":0}, + + {"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":[1,9], "x":9.5, "y":1}, + {"matrix":[1,10], "x":10.5, "y":1}, + {"matrix":[1,11], "x":11.5, "y":1}, + {"matrix":[1,12], "x":12.5, "y":1}, + {"matrix":[1,13], "x":13.5, "y":1, "w":1.5}, + {"matrix":[2,14], "x":15 , "y":1}, + + {"matrix":[2,0], "x":0 , "y":2}, + {"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":[2,9], "x":9.75, "y":2}, + {"matrix":[2,10], "x":10.75, "y":2}, + {"matrix":[2,11], "x":11.75, "y":2}, + {"matrix":[2,12], "x":12.75, "y":2, "w":2.25}, + {"matrix":[2,13], "x":15 , "y":2}, + + {"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":[3,9], "x":9.25, "y":3}, + {"matrix":[3,10], "x":10.25 , "y":3}, + {"matrix":[3,11], "x":11.25, "y":3}, + {"matrix":[3,12], "x":12.25, "y":3, "w":1.75}, + {"matrix":[3,13], "x":14, "y":3}, + {"matrix":[3,14], "x":15, "y":3}, + + {"matrix":[4,0], "x":0 , "y":4, "w":1.5}, + {"matrix":[4,1], "x":1, "y":4}, + {"matrix":[4,2], "x":2.5 , "y":4, "w":1.5}, + {"matrix":[4,6], "x":4, "y":4, "w":7}, + {"matrix":[4,9], "x":11, "y":4}, + {"matrix":[4,10], "x":12, "y":4}, + {"matrix":[4,12], "x":13, "y":4}, + {"matrix":[4,13], "x":14, "y":4}, + {"matrix":[4,14], "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/wily/wily_h700/keymaps/default/keymap.c b/keyboards/wily/wily_h700/keymaps/default/keymap.c new file mode 100644 index 000000000000..0929de8fa385 --- /dev/null +++ b/keyboards/wily/wily_h700/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2025 Gondolindrim + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#define LT1GUI LT(1, KC_RGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + 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_BSPC, KC_DEL , + 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_HOME, + 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_END , + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_INS , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , LT1GUI , KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT +), +[1] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) +}; diff --git a/keyboards/wily/wily_s/config.h b/keyboards/wily/wily_s/config.h new file mode 100644 index 000000000000..580f722f154f --- /dev/null +++ b/keyboards/wily/wily_s/config.h @@ -0,0 +1,21 @@ +/* Copyright 2025 Gondolindrim + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 4 +#define BACKLIGHT_PWM_PAL_MOPDE 2 diff --git a/keyboards/wily/wily_s/halconf.h b/keyboards/wily/wily_s/halconf.h new file mode 100644 index 000000000000..6c98f31f9b16 --- /dev/null +++ b/keyboards/wily/wily_s/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2025 Gondolindrim + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/wily/wily_s/keyboard.json b/keyboards/wily/wily_s/keyboard.json new file mode 100644 index 000000000000..a6df026ef3b3 --- /dev/null +++ b/keyboards/wily/wily_s/keyboard.json @@ -0,0 +1,100 @@ +{ + "keyboard_name": "Keyote Wily-S", + "usb": { + "pid": "0x5051", + "device_version": "0.0.1" + }, + "matrix_pins": { + "cols": ["A15", "B10", "C15", "C14", "C13", "B1", "B0", "A7", "A6", "A5", "B14", "B13", "B12", "A4", "A3"], + "rows": ["A0", "B8", "B3", "B5", "B9"] + }, + "features": { + "backlight": true + }, + "backlight": { + "pin": "B4", + "levels": 20, + "as_caps_lock": true + }, + "layouts": { + "LAYOUT": { + "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":[0,9], "x":9, "y":0}, + {"matrix":[0,10], "x":10, "y":0}, + {"matrix":[0,11], "x":11, "y":0}, + {"matrix":[0,12], "x":12, "y":0}, + {"matrix":[0,13], "x":13, "y":0}, + {"matrix":[0,14], "x":14, "y":0}, + {"matrix":[1,14], "x":15, "y":0}, + + {"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":[1,9], "x":9.5, "y":1}, + {"matrix":[1,10], "x":10.5, "y":1}, + {"matrix":[1,11], "x":11.5, "y":1}, + {"matrix":[1,12], "x":12.5, "y":1}, + {"matrix":[1,13], "x":13.5, "y":1, "w":1.5}, + {"matrix":[2,14], "x":15 , "y":1}, + + {"matrix":[2,0], "x":0 , "y":2}, + {"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":[2,9], "x":9.75, "y":2}, + {"matrix":[2,10], "x":10.75, "y":2}, + {"matrix":[2,11], "x":11.75, "y":2}, + {"matrix":[4,11], "x":12.75, "y":2}, + {"matrix":[2,12], "x":13.75, "y":2, "w":1.25}, + {"matrix":[2,13], "x":15 , "y":2}, + + {"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":[3,9], "x":9.25, "y":3}, + {"matrix":[3,10], "x":10.25 , "y":3}, + {"matrix":[3,11], "x":11.25, "y":3}, + {"matrix":[3,12], "x":12.25, "y":3, "w":1.75}, + {"matrix":[3,13], "x":14, "y":3}, + {"matrix":[3,14], "x":15, "y":3}, + + {"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,6], "x":3.75, "y":4, "w":6.25}, + {"matrix":[4,8], "x":10, "y":4}, + {"matrix":[4,9], "x":11, "y":4}, + {"matrix":[4,10], "x":12, "y":4}, + {"matrix":[4,12], "x":13, "y":4}, + {"matrix":[4,13], "x":14, "y":4}, + {"matrix":[4,14], "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/wily/wily_s/keymaps/default/keymap.c b/keyboards/wily/wily_s/keymaps/default/keymap.c new file mode 100644 index 000000000000..22c0188c3089 --- /dev/null +++ b/keyboards/wily/wily_s/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2025 Gondolindrim + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#define LT1GUI LT(1, KC_RGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + 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_BSPC, KC_DEL , + 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_HOME, + 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_NUHS, KC_ENT , KC_END , + KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_INS , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, LT1GUI , KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT +), +[1] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) +}; diff --git a/keyboards/wily/wily_s/mcuconf.h b/keyboards/wily/wily_s/mcuconf.h new file mode 100644 index 000000000000..a9bbcfc62ca1 --- /dev/null +++ b/keyboards/wily/wily_s/mcuconf.h @@ -0,0 +1,22 @@ +/* Copyright 2025 Gondolindrim + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE From e391793f7317ca406989cea30dcd43ebbdb1f0e8 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 11 Jan 2026 18:15:14 +0000 Subject: [PATCH 1191/1205] Remove binary symbols from keymaps (#25947) --- keyboards/keycapsss/kimiko/rev1/keymaps/default/keymap.c | 4 ++-- keyboards/keycapsss/kimiko/rev2/keymaps/default/keymap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/keycapsss/kimiko/rev1/keymaps/default/keymap.c b/keyboards/keycapsss/kimiko/rev1/keymaps/default/keymap.c index c61fdfc03a55..5834ef9c26da 100644 --- a/keyboards/keycapsss/kimiko/rev1/keymaps/default/keymap.c +++ b/keyboards/keycapsss/kimiko/rev1/keymaps/default/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* LOWER * ,-------------------------------------------. ,-----------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | * |--------+------+------+------+------+------| |------+------+------+------+------+------| * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | * |--------+------+------+------+------+------| |------+------+------+------+------+------| @@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | | + * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | | * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | * `-----------------------------------------/ / \ \-----------------------------------------' diff --git a/keyboards/keycapsss/kimiko/rev2/keymaps/default/keymap.c b/keyboards/keycapsss/kimiko/rev2/keymaps/default/keymap.c index a569beed2244..4050a038d303 100644 --- a/keyboards/keycapsss/kimiko/rev2/keymaps/default/keymap.c +++ b/keyboards/keycapsss/kimiko/rev2/keymaps/default/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* LOWER * QWERTY * ,--------------------------------------------. ,----------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | * |---------+------+------+------+------+------| |------+------+------+------+------+-----------| - * | F1 | F2 | F3 | F4 | F5 | F6 |---------------. ,---------------| Left | Down | Up |Right | ; | | + * | F1 | F2 | F3 | F4 | F5 | F6 |---------------. ,---------------| Left | Down | Up |Right | ; | | * |---------+------+------+------+------+------| [ | [ | | [ | [ |------+------+------+------+------+-----------| * | F7 | F8 | F9 | F10 | F11 | F12 |------|--------| |-------|-------| + | - | = | [ | ] | \ | * `--------------------------------------------| / \ |----------------------------------------------' From 7d66c11f378acd46e03506ff573a61912a1eda5e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 13 Jan 2026 05:48:59 +0000 Subject: [PATCH 1192/1205] Lint default dynamic keymap layer count (#25948) --- data/mappings/info_defaults.hjson | 3 +++ data/schemas/keyboard.jsonschema | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/data/mappings/info_defaults.hjson b/data/mappings/info_defaults.hjson index d1f1579c55b3..fd59dacac0d4 100644 --- a/data/mappings/info_defaults.hjson +++ b/data/mappings/info_defaults.hjson @@ -11,6 +11,9 @@ "on_state": 1 }, "debounce": 5, + "dynamic_keymap": { + "layer_count": 4 + }, "features": { "command": false, "console": false diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 57aeb3de22fc..d3a26923b541 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -333,6 +333,17 @@ } } }, + "dynamic_keymap": { + "type": "object", + "properties": { + "eeprom_max_addr": {"$ref": "./definitions.jsonschema#/unsigned_int"}, + "layer_count": { + "type": "integer", + "minimum": 1, + "maximum": 32 + } + } + }, "eeprom": { "properties": { "driver": {"type": "string"}, From 127c664647bb234ea9b586741a39f910b771eac5 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 15 Jan 2026 11:47:35 +1100 Subject: [PATCH 1193/1205] Backport GitHub Copilot instructions. (#25953) --- .github/copilot-instructions.md | 430 ++++++++++++++++++++++++++++++++ 1 file changed, 430 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000000..ee51380bd5a6 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,430 @@ +--- +applyTo: "**" +excludeAgent: + - "coding-agent" +--- +# GitHub Copilot Instructions for QMK Pull Request Review +This document provides automated review guidance based on the [QMK PR Checklist](https://docs.qmk.fm/pr_checklist) and it is intended only for use by GitHub Copilot code-review agent during pull request reviews. + +## General PR Requirements + +### Branch and Submission Standards +- **Source Branch Policy**: Verify PR is NOT submitted from submitter's own `master` branch + - Flag if submitter is using their own `master` branch as source + - Suggest using feature branches instead for cleaner fork management +- **Target Branch Policy**: + - **New keyboard additions** → `master` branch (new folders under `keyboards/`) + - **All other changes** → `develop` branch: + - Keyboard updates, refactors, or moves + - Core code changes + - Data-driven configuration migrations + - Any modifications to existing keyboards +- **PR Scope**: PRs should contain the smallest set of modifications for a single change + - Flag PRs that modify multiple keyboards simultaneously + - Suggest splitting large PRs into focused, incremental changes +- **Merge Conflicts**: Check for unresolved merge conflicts + +### File Naming and Structure +- **Lowercase Requirement**: All new directories and filenames must be lowercase + - Exception: Upstream sources with original uppercase (LUFA, ChibiOS) + - Exception: Core files with valid justification + - **Reject**: Board designer preference for uppercase is NOT valid justification + +### License Headers +- **Required**: Valid license headers on all `*.c` and `*.h` files +- **Recommended**: GPL2/GPL3 for consistency +- **Format**: Check for proper GPL2+ header or SPDX identifier + ```c + // Copyright 2024 Your Name (@yourgithub) + // SPDX-License-Identifier: GPL-2.0-or-later + ``` +- **Exception**: Simple assignment-only `rules.mk` files don't need headers +- **Flag**: Missing or ambiguous license headers (blocks merge) + +### QMK Best Practices +- **Include Guards**: Use `#pragma once` instead of `#ifndef` guards in headers +- **Abstractions Required**: No low-level GPIO/I2C/SPI functions + - Must use QMK abstractions (flag direct hardware access) +- **Timing Functions**: + - Use `wait_ms()` instead of `_delay_ms()` + - Remove `#include ` + - Use `timer_read()`, `timer_read32()` from `timer.h` +- **New Abstractions**: If proposing new abstraction, suggest: + 1. Prototype in own keyboard first + 2. Discuss with QMK Collaborators on Discord + 3. Refactor as separate core change + 4. Remove the keyboard-specific implementation from board + +--- + +## Keymap PR Reviews + +**Scope**: These rules apply to files within `keyboards/*/keymaps/*` subdirectories. + +### Note on Personal Keymaps +- **Policy Change**: Personal keymap submissions no longer accepted +- **Permitted**: Vendor-specific keymaps only + - Naming convention: `default_${vendor}` (e.g., `default_clueboard`) + - Can be more feature-rich than stock `default` keymaps + +### Keymap Code Standards +- **Includes**: `#include QMK_KEYBOARD_H` preferred over specific board files +- **Enums**: Prefer layer enums to `#define`s +- **Custom Keycodes**: First entry must be `QK_USER` +- **Formatting**: Check spacing alignment on commas and keycodes (spaces, not tabs) +- **VIA**: Keymaps should NOT enable VIA + - VIA keymaps belong in [VIA QMK Userspace](https://github.com/the-via/qmk_userspace_via) + +--- + +## Keyboard PR Reviews + +**Scope**: These rules apply to keyboard-level files in `keyboards/*` directories, excluding files within the `keymaps/` subdirectories. This includes: +- `info.json` or `keyboard.json` (keyboard root or variant level) +- `readme.md` (keyboard level) +- `rules.mk` (keyboard level) +- `config.h` (keyboard level, not keymap level) +- `.c` and `.h` files +- Hardware configuration files (`halconf.h`, `mcuconf.h`, `chconf.h`) + +### Branch Targeting +- **New Keyboards**: Target `master` branch + - New additions to `keyboards/` folder submit to `master` +- **Keyboard Moves**: Must target `develop` branch + - Check `data/mappings/keyboard_aliases.hjson` is updated for moves +- **Keyboard Updates/Refactors**: Must target `develop` to reduce merge conflicts +- **Data Driven Migration**: Must target `develop` + +### info.json and keyboard.json Requirements +- **Data-Driven Configuration**: Encourage maximum use of `info.json` and `keyboard.json` schema features +- **Schema Validation**: All `info.json` and `keyboard.json` files must validate against `data/schemas/keyboard.jsonschema` + - Use QMK CLI: `qmk lint -kb ` to validate + - Schema defines required fields, data types, and valid values + - Check for schema validation errors before submitting PR +- **Mandatory Elements**: + - Valid URL + - Valid maintainer + - Valid USB VID/PID and device version + - Displays correctly in Configurator (Ctrl+Shift+I to preview) + - `layout` definitions include matrix positions + - Standard layout definitions where applicable + - Community Layout macro names when applicable + - Microcontroller and bootloader specified + - Diode direction (if not using direct pins) +- **Layout Naming**: + - Single layout: Use `LAYOUT` or community layout name + - Multiple layouts: Include `LAYOUT_all` + alternate names + - Prefer community layout names (e.g., `LAYOUT_tkl_ansi`, `LAYOUT_ortho_4x4`) +- **Configuration in info.json or keyboard.json** (when applicable): + - Direct pin configuration + - Backlight, Split keyboard, Encoder, Bootmagic configs + - LED Indicator, RGB Light, RGB Matrix configs +- **Format**: Run `qmk format-json -i` before submitting + +### USB VID/PID Uniqueness +VID+PID combination must be unique across all keyboards. Individual VID or PID values can be reused with different partners. +**Validation Steps:** +1. Extract VID and PID from keyboard.json/info.json in the PR +2. Search for existing usage: `grep -r '"vid".*"0xVVVV"' keyboards/ --include="*.json" | grep -l '"pid".*"0xPPPP"'` +3. If results found: Check if BOTH VID AND PID match in same file + - Both match = **COLLISION** - request different PID + - Only one matches = **OK** - different keyboards can share individual values +4. For keyboard variants/revisions under same keyboard folder: + - Different PID recommended for functionally different variants + - Same PID acceptable if revisions only differ in hardware routing/pin assignments +**Quick Reference:** +- Same PID + Different VID = Valid +- Same VID + Different PID = Valid +- Same VID + Same PID = Invalid +**Review Response:** +For collision: +``` +VID+PID collision: 0xVVVV:0xPPPP already used by keyboards/[path]/file.json ++Please assign a different PID. VID can remain the same. +``` +For uniqueness confirmed: +``` +VID+PID validation: 0xVVVV:0xPPPP is unique (no collisions found) +``` + +### readme.md Requirements +- **Template**: Must follow [official template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme.md) +- **Flash Command**: Present with `:flash` at end +- **Hardware Link**: Valid availability link (unless handwired) + - Private groupbuys acceptable + - One-off prototypes will be questioned + - Open-source should link to files +- **Reset Instructions**: Clear bootloader mode instructions +- **Images Required**: + - Keyboard and PCB photos preferred + - Must be hosted externally (imgur, etc.) + - Direct image links required (not preview pages) + - Example: `https://i.imgur.com/vqgE7Ok.jpg` not `https://imgur.com/vqgE7Ok` + +### rules.mk Standards +- **Removed Items**: + - `MIDI_ENABLE`, `FAUXCLICKY_ENABLE`, `HD44780_ENABLE` + - Size comments like `(-/+size)` + - Alternate bootloader lists if one specified + - MCU parameter re-definitions matching defaults in `mcu_selection.mk` +- **Comment Updates**: Change bootloader comments to generic +- **Forbidden Features at Keyboard Level** (these belong in keymap-level `rules.mk` only): + - `COMBO_ENABLE` + - `ENCODER_MAP_ENABLE` + +### config.h Standards (Keyboard Level) +- **Prohibited**: + - `#define DESCRIPTION` + - Magic Key Options, MIDI Options, HD44780 configuration + - User preference `#define`s (belong in keymap) + - Re-defining default values (`DEBOUNCE`, RGB settings) + - Copy/pasted comment blocks explaining features + - Commented-out unused defines + - `#include "config_common.h"` + - `#define MATRIX_ROWS/COLS` (unless custom matrix) +- **Minimal Code**: Only critical board boot code required +- **No Vial**: Vial-related files/changes not accepted + +### Keyboard Implementation Files + +#### `.c` +- **Remove Empty Functions**: Delete empty or commented-out weak-defined functions + - `xxxx_xxxx_kb()`, `xxxx_xxxx_user()` implementations +- **Migration**: `matrix_init_board()` → `keyboard_pre_init_kb()` +- **Custom Matrix**: Use `lite` variant when possible for standard debounce + - `CUSTOM_MATRIX = lite` preferred + - Full custom matrix (`yes`) requires justification +- **LED Indicators**: Prefer Configuration Options over custom `led_update_*()` implementations +- **Hardware Configuration**: Basic functionality for OLED, encoders, etc. at keyboard level + +#### `.h` +- **Include**: `#include "quantum.h"` at top +- **Layout Macros**: Move to `info.json` or `keyboard.json` (no longer in header) + +### Default Keymap Standards + +**Scope**: These rules specifically apply to files within `keyboards/*/keymaps/default/` directories. + +- **Pristine Requirement**: Bare minimum clean slate + - No custom keycodes + - No advanced features (non-exhaustive list of examples: tap dance, macros) + - Basic mod taps and home row mods acceptable when necessary + - Standard layouts preferred -- see examples in `layouts/default/` and `layouts/community/` +- **Removed Examples**: Delete `QMKBEST`/`QMKURL` macros +- **Tri Layer**: Use Tri Layer feature instead of manual `layer_on/off()` + `update_tri_layer()` +- **Encoder Map**: Use encoder map feature, `encoder_update_user()` may not be present +- **No VIA**: Default keymap should not enable VIA +- **Additional Keymaps**: Example/bells-and-whistles keymaps acceptable in same PR (separate from default) + +### Prohibited Files +- **No VIA JSON**: Belongs in [VIA Keyboard Repo](https://github.com/the-via/keyboards) +- **No KLE JSON**: Not used within QMK +- **No Cross-Keyboard Sources**: Don't include files from other keyboard vendors + - Exception: Core files (e.g., `drivers/sensors/pmw3360.c`) + - Use of vendor-specific code (e.g., `wilba_tech/wt_main.c`) only when keyboard exists in the same enclosing vendor folder (e.g. a `wilba_tech` keyboard) + - Multi-board code is candidate for core refactoring when intended for use by multiple vendors + +### Wireless Keyboards +- **Policy**: Wireless/Bluetooth PRs rejected without complete wireless code + - Wireless code may not include anything resembling precompiled data such as `*.a` files or other libraries + - Firmware blobs are not permitted in raw form or as compiled C-style arrays either. + - GPL2+ license requires full source disclosure + - Historically abused for VIA compatibility without releasing sources + - PRs without wireless capability will be held indefinitely + - Existing merged wireless boards from same vendor held until sources provided + +### ChibiOS-Specific Requirements +- **Board Definitions**: Strong preference for existing ChibiOS board definitions + - Use equivalent Nucleo boards when possible + - Example: STM32L082KZ can use `BOARD = ST_NUCLEO64_L073RZ` + - QMK is eliminating custom board definitions due to maintenance burden +- **New Board Definitions**: + - Must NOT be embedded in keyboard PR + - Submit as separate Core PR + - `board.c` must have standard `__early_init()` and empty `boardInit()` + - Migrate code intended for `__early_init()` → keyboard-local `early_hardware_init_pre/post()` + - Migrate code intended for `boardInit()` → keyboard-local `board_init()` + +--- + +## Core PR Reviews + +### Targeting and Scope +- **Branch**: All core PRs must target `develop` branch +- **Single Focus**: Smallest set of changes per PR + - PRs with multiple areas will be asked to split + - Keyboard/keymap changes only if affecting base builds or default-like keymaps + - Keymap modifications (non-default) should be followup PR after core merge + - Large refactoring PRs affecting other keymaps raised separately + +### Testing Requirements +- **New Hardware Support**: Requires test keyboard under `keyboards/handwired/onekey` + - New MCUs: Add child keyboard targeting new MCU for build verification + - New hardware (displays, matrix, peripherals): Provide associated keymap + - Exception: If existing keymap can leverage functionality (consult Collaborators) +- **Callbacks**: New `_kb`/`_user` callbacks must return `bool` for user override +- **Unit Tests**: Strongly recommended, may be required + - Critical code areas (keycode pipeline) will require tests + - Boost confidence in current and future correctness + +### Code Quality +- **Subjective Review**: Other requirements at QMK Collaborators' discretion +- **Documentation**: Core changes should be well-documented + +--- + +## Automated Review Checklist + +When reviewing PRs, check the following systematically: + +### File Changes Review +1. **License headers** on all C/H files (GPL2+ preferred, others must be GPL2+ compatible, SPDX format preferred) +2. **File naming** lowercase (flag exceptions needing justification) +3. **Include guards** use `#pragma once` +4. **No low-level hardware access** (GPIO, I2C, SPI direct register writes) +5. **Timing abstractions** (`wait_ms()`, `timer_read()` usage) + +### info.json and keyboard.json Validation +1. **Schema Compliance**: `keyboard.json` and `info.json` files validate against `data/schemas/keyboard.jsonschema` + - Both files are identical syntax, however the `keyboard.json` dictates a buildable target, `info.json` does not + - Run `qmk lint -kb ` to check schema validation + - Check for proper data types (strings, integers, arrays, objects) + - Verify required fields are present + - Ensure enum values match allowed options in schema +2. All mandatory fields present and valid +3. `qmk format-json -i` has been run (formats and validates) +4. Layout macros moved from headers +5. Community layout names used where applicable + +### rules.mk Cleanup +1. Deprecated features removed +2. No size comments +3. No keymap-only features at keyboard level +4. No redundant MCU parameter definitions + +### config.h Cleanup +1. No `DESCRIPTION`, `config_common.h`, or prohibited includes +2. No default value re-definitions +3. No commented-out defines or feature documentation blocks +4. No user preference defines at keyboard level + +### Keymap Quality +1. Default keymaps are pristine (no custom keycodes/advanced features) +2. No `QMKBEST`/`QMKURL` macros +3. Encoder map feature used instead of `encoder_update_user()` +4. Tri Layer feature used for multi-layer access +5. No VIA enabled in default keymap + +### Documentation +1. readme.md follows template +2. Flash command present with `:flash` +3. Reset instructions clear +4. External image hosting (direct links) +5. Valid hardware availability link + +### Code Organization +1. Empty weak-defined functions removed from `.c` +2. Proper migration of init functions +3. No cross-vendor source files +4. No VIA/KLE JSON files + +### Branch and Scope +1. Not submitted from submitter's own `master` branch (use feature branches) +2. PR is focused on single change +3. Targets correct branch: + - `master` for new keyboard additions + - `develop` for keyboard updates/refactors/moves and core changes +4. No merge conflicts + +--- + +## Review Response Templates + +### For source master branch usage: +``` +⚠️ This PR appears to be submitted from your own `master` branch. For future PRs, we recommend using feature branches instead of committing to your `master`. This makes it easier to keep your fork updated and manage multiple PRs. + +See: [Best Practices: Your Fork's Master](https://docs.qmk.fm/newbs_git_using_your_master_branch) +``` + +### For incorrect target branch: +``` +❌ This PR targets the wrong branch: +- **New keyboard additions** should target `master` +- **Keyboard updates/refactors/moves** should target `develop` +- **Core changes** should target `develop` + +Please change the target branch accordingly. +``` + +### For missing license headers: +``` +❌ Missing GPL-compatible license headers on the following files: +- [list files] + +Please add GPL2+ headers (GPL2/GPL3 recommended). Example: +\`\`\`c +// Copyright 2024 Your Name (@yourgithub) +// SPDX-License-Identifier: GPL-2.0-or-later +\`\`\` +``` + +### For non-lowercase filenames: +``` +❌ The following files/directories must be lowercase: +- [list files] + +Exception: Only valid if from upstream sources (LUFA, ChibiOS) or justified by core consistency. +``` + +### For config.h violations: +``` +⚠️ Found prohibited config.h elements: +- [list specific issues: DESCRIPTION, default value re-definitions, etc.] + +Please remove these and refer to [Data Driven Configuration](https://docs.qmk.fm/data_driven_config). +``` + +### For info.json or keyboard.json issues: +``` +⚠️ info.json or keyboard.json needs attention: +- [list missing mandatory fields] +- Please run: \`qmk format-json -i path/to/info.json\` (or keyboard.json) +- Validate with: \`qmk lint -kb \` +``` + +### For schema validation errors: +``` +❌ Schema validation failed for info.json or keyboard.json: +- [list specific validation errors from schema] +- Check `data/schemas/keyboard.jsonschema` for valid field definitions +- Common issues: + - Invalid data types (e.g., string instead of integer) + - Missing required fields + - Invalid enum values + - Incorrectly formatted pin definitions +``` + +### For non-pristine default keymap: +``` +⚠️ Default keymap should be pristine (clean slate for users): +- Remove: [custom keycodes/tap dance/macros/etc.] +- Keep it minimal with standard layouts where possible + +Consider moving advanced features to a separate example keymap. +``` + +--- + +## Notes for GitHub Copilot + +- Focus reviews on **objective checklist items** that can be automatically verified +- Flag **definite violations** with ❌ +- Suggest improvements for **recommendations** with ⚠️ +- **Provide specific file/line references** when flagging issues +- **Link to relevant QMK documentation** for each issue +- **Prioritize blocking issues** (license, merge conflicts, branch policy) +- **Be constructive**: Suggest fixes, not just problems +- **Acknowledge trade-offs**: Some guidelines have valid exceptions + +This is meant as a **first-pass review** to catch common issues before human review. Complex architectural decisions, code quality, and subjective assessments still require human QMK Collaborator review. From 863b30851949cf1f045328820d27bdc83d942190 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 20 Jan 2026 08:48:51 +0000 Subject: [PATCH 1194/1205] Fix avrdude version check logic (#25957) --- lib/python/qmk/cli/doctor/check.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/python/qmk/cli/doctor/check.py b/lib/python/qmk/cli/doctor/check.py index 8a13cb083282..a717bcb591e4 100644 --- a/lib/python/qmk/cli/doctor/check.py +++ b/lib/python/qmk/cli/doctor/check.py @@ -152,8 +152,10 @@ def _check_avr_gcc_installation(): def _check_avrdude_version(): - last_line = ESSENTIAL_BINARIES['avrdude']['output'].split('\n')[-2] - version_number = last_line.split()[2][:-1] + lines = ESSENTIAL_BINARIES['avrdude']['output'].split('\n') + # avrdude version text is currently not translated, however we fall back to old behaviour of assuming a line + version_line = next((line for line in lines if 'version' in line), lines[-2]) + version_number = version_line.split()[2][:-1] cli.log.info('Found avrdude version %s', version_number) return CheckStatus.OK From 38815db760f24268561f7fd138f1094d546b4f13 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 24 Jan 2026 16:43:55 -0800 Subject: [PATCH 1195/1205] Fixup tominabox1 le chiffre default keymap (#25966) * Fixup tominabox1 le chiffre default keymap * Apply suggestions from code review Co-authored-by: Jack Sangdahl --------- Co-authored-by: Jack Sangdahl --- .../le_chiffre/keymaps/default/config.h | 18 -- .../le_chiffre/keymaps/default/keymap.c | 155 ------------------ .../le_chiffre/keymaps/default/keymap.json | 36 ++++ .../le_chiffre/keymaps/default/rules.mk | 2 - 4 files changed, 36 insertions(+), 175 deletions(-) delete mode 100644 keyboards/tominabox1/le_chiffre/keymaps/default/config.h delete mode 100644 keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c create mode 100644 keyboards/tominabox1/le_chiffre/keymaps/default/keymap.json delete mode 100644 keyboards/tominabox1/le_chiffre/keymaps/default/rules.mk diff --git a/keyboards/tominabox1/le_chiffre/keymaps/default/config.h b/keyboards/tominabox1/le_chiffre/keymaps/default/config.h deleted file mode 100644 index 8f0df1847a59..000000000000 --- a/keyboards/tominabox1/le_chiffre/keymaps/default/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2020 tominabox1 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#define COMBO_TERM 30 diff --git a/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c b/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c deleted file mode 100644 index 756eb06506f8..000000000000 --- a/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright 2020 tominabox1 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -enum layers { - _BASE, - _NUM_SYM, - _NAV -}; - -#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) -#define KC_GA LGUI_T(KC_A) -#define KC_AS LALT_T(KC_S) -#define KC_CD LCTL_T(KC_D) -#define KC_SF LSFT_T(KC_F) -#define KC_SJ RSFT_T(KC_J) -#define KC_CK RCTL_T(KC_K) -#define KC_AL RALT_T(KC_L) -#define KC_GSCLN RGUI_T(KC_SCLN) - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT( - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MPLY, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN, - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - KC_LCTL, KC_ENT, KC_NUM_SPC, MO(_NAV) - ), - - [_NUM_SYM] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, - KC_BSLS,KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS - ), - - [_NAV] = LAYOUT( - QK_BOOT, _______, AG_NORM, AG_SWAP, DB_TOGG, KC_TRNS, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, - RM_TOGG, RM_HUEU, RM_SATU, RM_VALU, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, - RM_NEXT, RM_HUED, RM_SATD, RM_VALD, KC_NO, KC_MINS, KC_INT1, KC_COMM, KC_DOT, KC_BSLS, - KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS - ) -}; -// clang-format on - -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [_BASE] = {ENCODER_CCW_CW(KC_MNXT, KC_MPRV) }, - [_NUM_SYM] = { ENCODER_CCW_CW(MS_WHLD, MS_WHLU) }, - [_NAV] = { ENCODER_CCW_CW(KC_PGDN, KC_PGUP) } -}; -#endif - -#ifdef COMBO_ENABLE -enum combo_events { - COMBO_BSPC, - COMBO_NUMBAK, - COMBO_TAB, - COMBO_ESC, - COMBO_DEL, -}; - -const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; -const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; -const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; -const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; -const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; - -combo_t key_combos[] = { - [COMBO_BSPC] = COMBO(combo_bspc, KC_BSPC), - [COMBO_NUMBAK] = COMBO(combo_numbak, KC_BSPC), - [COMBO_TAB] = COMBO(combo_tab, KC_TAB), - [COMBO_ESC] = COMBO(combo_esc, KC_ESC), - [COMBO_DEL] = COMBO(combo_del, KC_DEL) -}; -#endif - -#ifdef OLED_ENABLE - -// Add additional layer names here if desired. Only first 5 characters will be copied to display. -const char PROGMEM layer_base[] = "BASE"; -const char PROGMEM layer_num_sym[] = " SYM"; -const char PROGMEM layer_nav[] = " NAV"; -// Add layer name variables to array here. Make sure these are in order. -const char* const PROGMEM layer_names[] = { - layer_base, - layer_num_sym, - layer_nav -}; - -static char oled_layer_buf[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -static layer_state_t top_layer_cache; - -/* BEGIN STANDARD QMK FUNCTIONS */ -bool oled_task_user(void) { - oled_write_raw_P(lechiffre_logo, sizeof(lechiffre_logo)); - // Renders the current keyboard state (layer, lock, caps, scroll, etc); - oled_set_cursor(0, 3); - oled_write_P(oled_section_break, false); - render_layer_status(oled_layer_buf); - oled_write_P(oled_section_break, false); - render_mod_status(get_mods() | get_oneshot_mods()); - oled_write_P(oled_section_break, false); - render_keylock_status(host_keyboard_led_state()); - oled_write_P(oled_section_break, false); - render_keylogger_status(); - - return false; -} - -bool process_record_user(uint16_t keycode, keyrecord_t* record) { - if (record->event.pressed) { - add_keylog(keycode, record); - } - - return true; -} - -// If we don't force an update during initialization, the layer name buffer will start out blank. -layer_state_t default_layer_state_set_user(layer_state_t state) { - update_layer_namebuf(get_highest_layer(state), true); - return state; -} -layer_state_t layer_state_set_user(layer_state_t state) { - update_layer_namebuf(get_highest_layer(state | default_layer_state), false); - return state; -} - -/* END STANDARD QMK FUNCTIONS */ -/* BEGIN CUSTOM HELPER FUNCTION FOR OLED */ -// Avoid excessive copying by only updating the layer name buffer when the layer changes -void update_layer_namebuf(layer_state_t layer, bool force_update) { - if (force_update || layer != top_layer_cache) { - top_layer_cache = layer; - if (layer < ARRAY_SIZE(layer_names)) { - memcpy_P(oled_layer_buf, pgm_read_ptr(&layer_names[layer]), ARRAY_SIZE(oled_layer_buf) - 1); - } else { - memcpy(oled_layer_buf, get_u8_str(layer, ' '), ARRAY_SIZE(oled_layer_buf) - 1); - } - } -} -#endif diff --git a/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.json b/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.json new file mode 100644 index 000000000000..252db21f5d87 --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.json @@ -0,0 +1,36 @@ +{ + "keyboard": "tominabox1/le_chiffre", + "keymap": "default", + "config": { + "features": { + "encoder_map": true + } + }, + "layout": "LAYOUT", + "layers": [ + [ + "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_MPLY", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", + "LGUI_T(KC_A)", "LALT_T(KC_S)", "LCTL_T(KC_D)", "LSFT_T(KC_F)", "KC_G", "KC_H", "RSFT_T(KC_J)", "RCTL_T(KC_K)", "RALT_T(KC_L)", "RGUI_T(KC_SCLN)", + "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", + "KC_LCTL", "KC_ENT", "LT(1, KC_SPC)", "MO(2)" + ], + [ + "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_TRNS", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", + "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_EQUAL", "KC_MINS", + "KC_BSLS", "KC_LCBR", "KC_LBRC", "KC_LPRN", "KC_UNDS", "KC_RPRN", "KC_RBRC", "KC_RCBR", "KC_DOT", "KC_GRV", + "KC_CAPS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "QK_BOOT", "KC_TRNS", "AG_NORM", "AG_SWAP", "DB_TOGG", "KC_TRNS", "KC_GRV", "KC_PGDN", "KC_UP", "KC_PGUP", + "KC_SCLN", "RM_TOGG", "RM_HUEU", "RM_SATU", "RM_VALU", "KC_NO", "KC_HOME", "KC_LEFT", "KC_DOWN", "KC_RGHT", + "KC_END", "RM_NEXT", "RM_HUED", "RM_SATD", "RM_VALD", "KC_NO", "KC_MINS", "KC_INT1", "KC_COMM", "KC_DOT", "KC_BSLS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ] + + ], + "encoders": [ + [{"ccw": "KC_MNXT", "cw": "KC_MPRV"}], + [{"ccw": "MS_WHLD", "cw": "MS_WHLU"}], + [{"ccw": "KC_PGDN", "cw": "KC_PGUP"}] + ] +} diff --git a/keyboards/tominabox1/le_chiffre/keymaps/default/rules.mk b/keyboards/tominabox1/le_chiffre/keymaps/default/rules.mk deleted file mode 100644 index cbd8b4aa81ff..000000000000 --- a/keyboards/tominabox1/le_chiffre/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -COMBO_ENABLE = yes -ENCODER_MAP_ENABLE = yes From b02b222f171166eb05e197b69dd05a60e6d23324 Mon Sep 17 00:00:00 2001 From: schuay Date: Sun, 27 Jul 2025 12:09:15 +0200 Subject: [PATCH 1196/1205] Import cheapino https://github.com/tompi/qmk_firmware/tree/cheapinov2-miryoku# at b1e2da5dc395e82db8096cb80575a02c7e1b7079 --- keyboards/cheapino/cheapino.c | 75 +++++++++++++++++ keyboards/cheapino/config.h | 43 ++++++++++ keyboards/cheapino/encoder.c | 63 ++++++++++++++ keyboards/cheapino/encoder.h | 5 ++ keyboards/cheapino/ghosting.c | 128 ++++++++++++++++++++++++++++ keyboards/cheapino/ghosting.h | 5 ++ keyboards/cheapino/halconf.h | 8 ++ keyboards/cheapino/info.json | 93 +++++++++++++++++++++ keyboards/cheapino/matrix.c | 152 ++++++++++++++++++++++++++++++++++ keyboards/cheapino/mcuconf.h | 6 ++ keyboards/cheapino/readme.md | 27 ++++++ keyboards/cheapino/rules.mk | 8 ++ 12 files changed, 613 insertions(+) create mode 100644 keyboards/cheapino/cheapino.c create mode 100644 keyboards/cheapino/config.h create mode 100644 keyboards/cheapino/encoder.c create mode 100644 keyboards/cheapino/encoder.h create mode 100644 keyboards/cheapino/ghosting.c create mode 100644 keyboards/cheapino/ghosting.h create mode 100644 keyboards/cheapino/halconf.h create mode 100644 keyboards/cheapino/info.json create mode 100644 keyboards/cheapino/matrix.c create mode 100644 keyboards/cheapino/mcuconf.h create mode 100644 keyboards/cheapino/readme.md create mode 100644 keyboards/cheapino/rules.mk diff --git a/keyboards/cheapino/cheapino.c b/keyboards/cheapino/cheapino.c new file mode 100644 index 000000000000..cfc4592bf4e1 --- /dev/null +++ b/keyboards/cheapino/cheapino.c @@ -0,0 +1,75 @@ +#include "wait.h" +#include "quantum.h" + +// This is to keep state between callbacks, when it is 0 the +// initial RGB flash is finished +uint8_t _hue_countdown = 50; + +// These are to keep track of user selected color, so we +// can restore it after RGB flash +uint8_t _hue; +uint8_t _saturation; +uint8_t _value; + +// Do a little 2.5 seconds display of the different colors +// Use the deferred executor so the LED flash dance does not +// stop us from using the keyboard. +// https://docs.qmk.fm/#/custom_quantum_functions?id=deferred-executor-registration +uint32_t flash_led(uint32_t next_trigger_time, void *cb_arg) { + rgblight_sethsv(_hue_countdown * 5, 230, 70); + _hue_countdown--; + if (_hue_countdown == 0) { + // Finished, reset to user chosen led color + rgblight_sethsv(_hue, _saturation, _value); + return 0; + } else { + return 50; + } +} + +void keyboard_post_init_user(void) { + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; + + // Store user selected rgb hsv: + _hue = rgblight_get_hue(); + _saturation = rgblight_get_sat(); + _value = rgblight_get_val(); + + // Flash a little on start + defer_exec(50, flash_led, NULL); +} + +// Make the builtin RGB led show different colors per layer: +// This seemed like a good idea but turned out pretty annoying, +// to me at least... Uncomment the lines below to enable +/* +uint8_t get_hue(uint8_t layer) { + switch (layer) { + case 6: + return 169; + case 5: + return 43; + case 4: + return 85; + case 3: + return 120; + case 2: + return 180; + case 1: + return 220; + default: + return 0; + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t sat = rgblight_get_sat(); + uint8_t val = rgblight_get_val(); + uint8_t hue = get_hue(get_highest_layer(state)); + rgblight_sethsv(hue, sat, val); + return state; +} +*/ diff --git a/keyboards/cheapino/config.h b/keyboards/cheapino/config.h new file mode 100644 index 000000000000..616feccf9a49 --- /dev/null +++ b/keyboards/cheapino/config.h @@ -0,0 +1,43 @@ +// Copyright 2023 Thomas Haukland (@tompi) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD +#define WS2812_PIO_USE_PIO1 // Force the usage of PIO1 peripheral, by default the WS2812 implementation uses the PIO0 peripheral +//#define WS2812_TRST_US 80 +#define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB +#define RGB_MATRIX_DEFAULT_VAL 32 + + +// Pick good defaults for enabling homerow modifiers +#define TAPPING_TERM 230 + + +#define WS2812_DI_PIN GP16 // The pin connected to the data pin of the LEDs +#define RGBLIGHT_LED_COUNT 1 // The number of LEDs connected + + +#define MAX_DEFERRED_EXECUTORS 32 + +// #define DEBUG_MATRIX_SCAN_RATE + + #define RGBLIGHT_DEFAULT_HUE 128 // Sets the default hue value, if none has been set + #define RGBLIGHT_DEFAULT_SAT 128 // Sets the default saturation value, if none has been set + #define RGBLIGHT_DEFAULT_VAL 32 // Sets the default brightness value, if none has been set diff --git a/keyboards/cheapino/encoder.c b/keyboards/cheapino/encoder.c new file mode 100644 index 000000000000..e5920dce49a8 --- /dev/null +++ b/keyboards/cheapino/encoder.c @@ -0,0 +1,63 @@ +#include "matrix.h" +#include "quantum.h" + +#define COL_SHIFTER ((uint16_t)1) + +#define ENC_ROW 3 +#define ENC_A_COL 2 +#define ENC_B_COL 4 +#define ENC_BUTTON_COL 0 + +static bool colABPressed = false; +static bool encoderPressed = false; + +void clicked(void) { + tap_code(KC_MPLY); +} + +void turned(bool clockwise) { + if (IS_LAYER_ON(6)) { + tap_code(clockwise ? KC_VOLU : KC_VOLD); + } else if (IS_LAYER_ON(3)) { + tap_code16(clockwise ? LCTL(KC_TAB) : LCTL(LSFT(KC_TAB))); + } else if (IS_LAYER_ON(5)) { + tap_code16(clockwise ? LGUI(KC_Y) : LGUI(KC_Z)); + } else { + tap_code16(clockwise ? KC_PGDN : KC_PGUP); + } +} + +void fix_encoder_action(matrix_row_t current_matrix[]) { + matrix_row_t encoder_row = current_matrix[ENC_ROW]; + + if (encoder_row & (COL_SHIFTER << ENC_BUTTON_COL)) { + encoderPressed = true; + } else { + // Only trigger click on release + if (encoderPressed) { + encoderPressed = false; + clicked(); + } + } + + // Check which way the encoder is turned: + bool colA = encoder_row & (COL_SHIFTER << ENC_A_COL); + bool colB = encoder_row & (COL_SHIFTER << ENC_B_COL); + + if (colA && colB) { + colABPressed = true; + } else if (colA) { + if (colABPressed) { + // A+B followed by A means clockwise + colABPressed = false; + turned(true); + } + } else if (colB) { + if (colABPressed) { + // A+B followed by B means counter-clockwise + colABPressed = false; + turned(false); + } + } + current_matrix[ENC_ROW] = 0; +} diff --git a/keyboards/cheapino/encoder.h b/keyboards/cheapino/encoder.h new file mode 100644 index 000000000000..e393e5da2dac --- /dev/null +++ b/keyboards/cheapino/encoder.h @@ -0,0 +1,5 @@ +// +// Created by Thomas Haukland on 25/03/2023. +// + +void fix_encoder_action(matrix_row_t current_matrix[]); \ No newline at end of file diff --git a/keyboards/cheapino/ghosting.c b/keyboards/cheapino/ghosting.c new file mode 100644 index 000000000000..c349b0abe198 --- /dev/null +++ b/keyboards/cheapino/ghosting.c @@ -0,0 +1,128 @@ +// +// Created by Thomas Haukland on 2024-05-05. +// + +#include "matrix.h" +#include "quantum.h" +#include "print.h" + +// This is just to be able to declare constants as they appear in the qmk console +#define rev(b) \ + ((b & 1) << 15) | \ + ((b & (1 << 1)) << 13) | \ + ((b & (1 << 2)) << 11) | \ + ((b & (1 << 3)) << 9) | \ + ((b & (1 << 4)) << 7) | \ + ((b & (1 << 5)) << 5) | \ + ((b & (1 << 6)) << 3) | \ + ((b & (1 << 7)) << 1) | \ + ((b & (1 << 8)) >> 1) | \ + ((b & (1 << 9)) >> 3) | \ + ((b & (1 << 10)) >> 5) | \ + ((b & (1 << 11)) >> 7) | \ + ((b & (1 << 12)) >> 9) | \ + ((b & (1 << 13)) >> 11) | \ + ((b & (1 << 14)) >> 13) | \ + b >> 15 + +/* This is for debugging the matrix rows +void printBits(uint16_t n) +{ + long i; + for (i = 15; i >= 0; i--) { + if ((n & (1 << i)) != 0) { + printf("1"); + } + else { + printf("0"); + } + } + printf("\n"); +} +*/ + +bool bit_pattern_set(uint16_t number, uint16_t bitPattern) { + return !(~number & bitPattern); +} + +void fix_ghosting_instance( + matrix_row_t current_matrix[], + unsigned short row_num_with_possible_error_cause, + uint16_t possible_error_cause, + unsigned short row_num_with_possible_error, + uint16_t possible_error, + uint16_t error_fix) { + if (bit_pattern_set(current_matrix[row_num_with_possible_error_cause], possible_error_cause)) { + if (bit_pattern_set(current_matrix[row_num_with_possible_error], possible_error)) { + current_matrix[row_num_with_possible_error] = current_matrix[row_num_with_possible_error] ^ error_fix; + } + } +} + +void fix_ghosting_column( + matrix_row_t matrix[], + uint16_t possible_error_cause, + uint16_t possible_error, + uint16_t error_fix) { + // First the right side + for (short i = 0; i<3; i++) { + fix_ghosting_instance(matrix, i, possible_error_cause, (i+1)%3, possible_error, error_fix); + fix_ghosting_instance(matrix, i, possible_error_cause, (i+2)%3, possible_error, error_fix); + } + + // Then exactly same procedure on the left side + for (short i = 0; i<3; i++) { + fix_ghosting_instance(matrix, i+4, possible_error_cause<<6, 4+((i+1)%3), possible_error<<6, error_fix<<6); + fix_ghosting_instance(matrix, i+4, possible_error_cause<<6, 4+((i+2)%3), possible_error<<6, error_fix<<6); + } +} + +// For QWERTY layout, key combo a+s+e also outputs q. This suppresses the q, and other similar ghosts +// These are observed ghosts(following a pattern). TODO: need to fix this for v3 +// Might need to add 2 diodes(one in each direction) for every row, to increase voltage drop. +void fix_ghosting(matrix_row_t matrix[]) { + fix_ghosting_column(matrix, + rev(0B0110000000000000), + rev(0B1010000000000000), + rev(0B0010000000000000)); + fix_ghosting_column(matrix, + rev(0B0110000000000000), + rev(0B0101000000000000), + rev(0B0100000000000000)); + + fix_ghosting_column(matrix, + rev(0B0001100000000000), + rev(0B0010100000000000), + rev(0B0000100000000000)); + fix_ghosting_column(matrix, + rev(0B0001100000000000), + rev(0B0001010000000000), + rev(0B0001000000000000)); + + fix_ghosting_column(matrix, + rev(0B1000010000000000), + rev(0B1000100000000000), + rev(0B1000000000000000)); + fix_ghosting_column(matrix, + rev(0B1000010000000000), + rev(0B0100010000000000), + rev(0B0000010000000000)); + + fix_ghosting_column(matrix, + rev(0B1001000000000000), + rev(0B0101000000000000), + rev(0B0001000000000000)); + fix_ghosting_column(matrix, + rev(0B1001000000000000), + rev(0B1010000000000000), + rev(0B1000000000000000)); + + fix_ghosting_column(matrix, + rev(0B0100100000000000), + rev(0B0100010000000000), + rev(0B0100000000000000)); + fix_ghosting_column(matrix, + rev(0B0100100000000000), + rev(0B1000100000000000), + rev(0B0000100000000000)); +} diff --git a/keyboards/cheapino/ghosting.h b/keyboards/cheapino/ghosting.h new file mode 100644 index 000000000000..1dfef2af3fde --- /dev/null +++ b/keyboards/cheapino/ghosting.h @@ -0,0 +1,5 @@ +// +// Created by Thomas Haukland on 2024-05-05. +// + +void fix_ghosting(matrix_row_t current_matrix[]); \ No newline at end of file diff --git a/keyboards/cheapino/halconf.h b/keyboards/cheapino/halconf.h new file mode 100644 index 000000000000..c06a0cbf6cce --- /dev/null +++ b/keyboards/cheapino/halconf.h @@ -0,0 +1,8 @@ + +#pragma once + +#define HAL_USE_PWM TRUE +#define HAL_USE_PAL TRUE +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/cheapino/info.json b/keyboards/cheapino/info.json new file mode 100644 index 000000000000..e12d8f2ab043 --- /dev/null +++ b/keyboards/cheapino/info.json @@ -0,0 +1,93 @@ +{ + "manufacturer": "Thomas Haukland", + "keyboard_name": "cheapino2", + "maintainer": "tompi", + "bootloader": "rp2040", + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": false + }, + "community_layouts": ["split_3x5_3"], + "matrix_pins": { + "cols": [ + "GP6", + "GP6", + "GP5", + "GP5", + "GP4", + "GP4", + + "GP14", + "GP14", + "GP15", + "GP15", + "GP26", + "GP26" + ], + "rows": ["GP3", "GP1", "GP2", "GP0", "GP27", "GP28", "GP29", "GP8"] + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEE3" + }, + "layouts": { + "LAYOUT_split_3x5_3": { + "layout": [ + { "matrix": [4, 10], "x": 0, "y": 0.25 }, + { "matrix": [4, 9], "x": 1, "y": 0.125 }, + { "matrix": [4, 8], "x": 2, "y": 0 }, + { "matrix": [4, 7], "x": 3, "y": 0.125 }, + { "matrix": [4, 6], "x": 4, "y": 0.25 }, + + { "matrix": [0, 0], "x": 7, "y": 0.25 }, + { "matrix": [0, 1], "x": 8, "y": 0.125 }, + { "matrix": [0, 2], "x": 9, "y": 0 }, + { "matrix": [0, 3], "x": 10, "y": 0.125 }, + { "matrix": [0, 4], "x": 11, "y": 0.25 }, + + + { "matrix": [5, 10], "x": 0, "y": 1.25 }, + { "matrix": [5, 9], "x": 1, "y": 1.125 }, + { "matrix": [5, 8], "x": 2, "y": 1 }, + { "matrix": [5, 7], "x": 3, "y": 1.125 }, + { "matrix": [5, 6], "x": 4, "y": 1.25 }, + + { "matrix": [1, 0], "x": 7, "y": 1.25 }, + { "matrix": [1, 1], "x": 8, "y": 1.125 }, + { "matrix": [1, 2], "x": 9, "y": 1 }, + { "matrix": [1, 3], "x": 10, "y": 1.125 }, + { "matrix": [1, 4], "x": 11, "y": 1.25 }, + + + { "matrix": [6, 10], "x": 0, "y": 2.25 }, + { "matrix": [6, 9], "x": 1, "y": 2.125 }, + { "matrix": [6, 8], "x": 2, "y": 2 }, + { "matrix": [6, 7], "x": 3, "y": 2.125 }, + { "matrix": [6, 6], "x": 4, "y": 2.25 }, + + { "matrix": [2, 0], "x": 7, "y": 2.25 }, + { "matrix": [2, 1], "x": 8, "y": 2.125 }, + { "matrix": [2, 2], "x": 9, "y": 2 }, + { "matrix": [2, 3], "x": 10, "y": 2.125 }, + { "matrix": [2, 4], "x": 11, "y": 2.25 }, + + + { "matrix": [6, 11], "x": 2.5, "y": 3.25 }, + { "matrix": [5, 11], "x": 3.5, "y": 3.5 }, + { "matrix": [4, 11], "x": 4.5, "y": 3.75 }, + + { "matrix": [0, 5], "x": 6.5, "y": 3.75 }, + { "matrix": [1, 5], "x": 7.5, "y": 3.5 }, + { "matrix": [2, 5], "x": 8.5, "y": 3.25 } + ] + } + } +} diff --git a/keyboards/cheapino/matrix.c b/keyboards/cheapino/matrix.c new file mode 100644 index 000000000000..f6f518318b26 --- /dev/null +++ b/keyboards/cheapino/matrix.c @@ -0,0 +1,152 @@ +/* +Copyright 2012 Jun Wako +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . + + Copied from here: https://github.com/e3w2q/qmk_firmware/blob/762fe3e0a7cbea768245a75520f06ff5a2f00b9f/keyboards/2x3test/matrix.c +*/ + +/* + * scan matrix + */ +#include +#include +#include "wait.h" +#include "util.h" +#include "matrix.h" +#include "config.h" +#include "quantum.h" +#include "debounce.h" +#include "encoder.h" +#include "ghosting.h" +#include "print.h" + +// How long the scanning code waits for changed io to settle. +// Adjust from default 30 to weigh up for increased time spent ghost-hunting. +// (the rp2040 does not seem to have any problems with this value...) +#define MATRIX_IO_DELAY 25 + +#define COL_SHIFTER ((uint16_t)1) + +static const pin_t row_pins[] = MATRIX_ROW_PINS; +static const pin_t col_pins[] = MATRIX_COL_PINS; +static matrix_row_t previous_matrix[MATRIX_ROWS]; + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void select_col(uint8_t col) { + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) { + setPinInputHigh(col_pins[col]); +} + +static void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS/2; x++) { + setPinInputHigh(col_pins[x*2]); + } +} + +static void read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Select row and wait for row selection to stabilize + select_row(current_row); + wait_us(MATRIX_IO_DELAY); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS / 2; col_index++) { + uint16_t column_index_bitmask = COL_SHIFTER << ((col_index * 2) + 1); + // Check row pin state + if (readPin(col_pins[col_index*2])) { + // Pin HI, clear col bit + current_matrix[current_row] &= ~column_index_bitmask; + } else { + // Pin LO, set col bit + current_matrix[current_row] |= column_index_bitmask; + } + } + + // Unselect row + unselect_row(current_row); +} + +static void read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + // Select col and wait for col selection to stabilize + select_col(current_col*2); + wait_us(MATRIX_IO_DELAY); + + uint16_t column_index_bitmask = COL_SHIFTER << (current_col * 2); + // For each row... + for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { + // Check row pin state + if (readPin(row_pins[row_index])) { + // Pin HI, clear col bit + current_matrix[row_index] &= ~column_index_bitmask; + } else { + // Pin LO, set col bit + current_matrix[row_index] |= column_index_bitmask; + } + } + // Unselect col + unselect_col(current_col*2); +} + + +void matrix_init_custom(void) { + // initialize key pins + unselect_cols(); + unselect_rows(); + debounce_init(MATRIX_ROWS); +} + +void store_old_matrix(matrix_row_t current_matrix[]) { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + previous_matrix[i] = current_matrix[i]; + } +} + +bool has_matrix_changed(matrix_row_t current_matrix[]) { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + if (previous_matrix[i] != current_matrix[i]) return true; + } + return false; +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + store_old_matrix(current_matrix); + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + read_cols_on_row(current_matrix, current_row); + } + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS/2; current_col++) { + read_rows_on_col(current_matrix, current_col); + } + + fix_encoder_action(current_matrix); + + fix_ghosting(current_matrix); + + return has_matrix_changed(current_matrix); +} + diff --git a/keyboards/cheapino/mcuconf.h b/keyboards/cheapino/mcuconf.h new file mode 100644 index 000000000000..7ed3f874511e --- /dev/null +++ b/keyboards/cheapino/mcuconf.h @@ -0,0 +1,6 @@ + #pragma once + +#include_next + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 TRUE diff --git a/keyboards/cheapino/readme.md b/keyboards/cheapino/readme.md new file mode 100644 index 000000000000..4901584a1ca7 --- /dev/null +++ b/keyboards/cheapino/readme.md @@ -0,0 +1,27 @@ +# cheapino + +![cheapino](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [Thomas Haukland](https://github.com/tompi) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make cheapino:default + +Flashing example for this keyboard: + + make cheapino: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **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 diff --git a/keyboards/cheapino/rules.mk b/keyboards/cheapino/rules.mk new file mode 100644 index 000000000000..70ed45868bc3 --- /dev/null +++ b/keyboards/cheapino/rules.mk @@ -0,0 +1,8 @@ +CAPS_WORD_ENABLE = yes +CUSTOM_MATRIX = lite +WS2812_DRIVER = vendor +RGBLIGHT_ENABLE = yes +DEFERRED_EXEC_ENABLE = yes +SRC += encoder.c +SRC += ghosting.c +SRC += matrix.c \ No newline at end of file From 3236973ced26d9f3a6bdd58b32a4a9bfdc8c2a68 Mon Sep 17 00:00:00 2001 From: schuay Date: Wed, 30 Jul 2025 18:07:15 +0200 Subject: [PATCH 1197/1205] Update cheapino firmware * Extract keymap definitions to follow the external userspace model. A default keymap should probably be added again as an example. * Move configuration to keyboard.json. * Enable LTO. * Move encoder button handling to the keymap for full qmk feature support (layers, mod-tap). * Inject encoder turn events into the qmk encoder pipeline, with the same motivation as above. * Rename files to avoid clashing with qmk-internal files (encoder.h). * Faster matrix store/compare primitives. --- keyboards/cheapino/cheapino.c | 49 +++------------ keyboards/cheapino/config.h | 39 +----------- keyboards/cheapino/encoder.c | 63 ------------------- keyboards/cheapino/encoder.h | 5 -- keyboards/cheapino/halconf.h | 8 --- .../cheapino/{info.json => keyboard.json} | 52 ++++++++++++++- keyboards/cheapino/matrix-encoder.c | 50 +++++++++++++++ keyboards/cheapino/matrix-encoder.h | 6 ++ .../{ghosting.c => matrix-ghosting.c} | 0 .../{ghosting.h => matrix-ghosting.h} | 0 keyboards/cheapino/matrix.c | 13 ++-- keyboards/cheapino/rules.mk | 11 +--- 12 files changed, 122 insertions(+), 174 deletions(-) delete mode 100644 keyboards/cheapino/encoder.c delete mode 100644 keyboards/cheapino/encoder.h delete mode 100644 keyboards/cheapino/halconf.h rename keyboards/cheapino/{info.json => keyboard.json} (73%) create mode 100644 keyboards/cheapino/matrix-encoder.c create mode 100644 keyboards/cheapino/matrix-encoder.h rename keyboards/cheapino/{ghosting.c => matrix-ghosting.c} (100%) rename keyboards/cheapino/{ghosting.h => matrix-ghosting.h} (100%) diff --git a/keyboards/cheapino/cheapino.c b/keyboards/cheapino/cheapino.c index cfc4592bf4e1..284ba3a755d4 100644 --- a/keyboards/cheapino/cheapino.c +++ b/keyboards/cheapino/cheapino.c @@ -1,5 +1,4 @@ -#include "wait.h" -#include "quantum.h" +#include QMK_KEYBOARD_H // This is to keep state between callbacks, when it is 0 the // initial RGB flash is finished @@ -27,49 +26,17 @@ uint32_t flash_led(uint32_t next_trigger_time, void *cb_arg) { } } -void keyboard_post_init_user(void) { - //debug_enable=true; - //debug_matrix=true; - //debug_keyboard=true; - //debug_mouse=true; +void keyboard_post_init_kb(void) { + // debug_enable=true; + // debug_matrix=true; + // debug_keyboard=true; + // debug_mouse=true; // Store user selected rgb hsv: - _hue = rgblight_get_hue(); + _hue = rgblight_get_hue(); _saturation = rgblight_get_sat(); - _value = rgblight_get_val(); + _value = rgblight_get_val(); // Flash a little on start defer_exec(50, flash_led, NULL); } - -// Make the builtin RGB led show different colors per layer: -// This seemed like a good idea but turned out pretty annoying, -// to me at least... Uncomment the lines below to enable -/* -uint8_t get_hue(uint8_t layer) { - switch (layer) { - case 6: - return 169; - case 5: - return 43; - case 4: - return 85; - case 3: - return 120; - case 2: - return 180; - case 1: - return 220; - default: - return 0; - } -} - -layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t sat = rgblight_get_sat(); - uint8_t val = rgblight_get_val(); - uint8_t hue = get_hue(get_highest_layer(state)); - rgblight_sethsv(hue, sat, val); - return state; -} -*/ diff --git a/keyboards/cheapino/config.h b/keyboards/cheapino/config.h index 616feccf9a49..f4cd51d9d17e 100644 --- a/keyboards/cheapino/config.h +++ b/keyboards/cheapino/config.h @@ -3,41 +3,6 @@ #pragma once -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD -#define WS2812_PIO_USE_PIO1 // Force the usage of PIO1 peripheral, by default the WS2812 implementation uses the PIO0 peripheral -//#define WS2812_TRST_US 80 +// Force the usage of PIO1 peripheral, by default the WS2812 implementation uses the PIO0 peripheral. +#define WS2812_PIO_USE_PIO1 #define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB -#define RGB_MATRIX_DEFAULT_VAL 32 - - -// Pick good defaults for enabling homerow modifiers -#define TAPPING_TERM 230 - - -#define WS2812_DI_PIN GP16 // The pin connected to the data pin of the LEDs -#define RGBLIGHT_LED_COUNT 1 // The number of LEDs connected - - -#define MAX_DEFERRED_EXECUTORS 32 - -// #define DEBUG_MATRIX_SCAN_RATE - - #define RGBLIGHT_DEFAULT_HUE 128 // Sets the default hue value, if none has been set - #define RGBLIGHT_DEFAULT_SAT 128 // Sets the default saturation value, if none has been set - #define RGBLIGHT_DEFAULT_VAL 32 // Sets the default brightness value, if none has been set diff --git a/keyboards/cheapino/encoder.c b/keyboards/cheapino/encoder.c deleted file mode 100644 index e5920dce49a8..000000000000 --- a/keyboards/cheapino/encoder.c +++ /dev/null @@ -1,63 +0,0 @@ -#include "matrix.h" -#include "quantum.h" - -#define COL_SHIFTER ((uint16_t)1) - -#define ENC_ROW 3 -#define ENC_A_COL 2 -#define ENC_B_COL 4 -#define ENC_BUTTON_COL 0 - -static bool colABPressed = false; -static bool encoderPressed = false; - -void clicked(void) { - tap_code(KC_MPLY); -} - -void turned(bool clockwise) { - if (IS_LAYER_ON(6)) { - tap_code(clockwise ? KC_VOLU : KC_VOLD); - } else if (IS_LAYER_ON(3)) { - tap_code16(clockwise ? LCTL(KC_TAB) : LCTL(LSFT(KC_TAB))); - } else if (IS_LAYER_ON(5)) { - tap_code16(clockwise ? LGUI(KC_Y) : LGUI(KC_Z)); - } else { - tap_code16(clockwise ? KC_PGDN : KC_PGUP); - } -} - -void fix_encoder_action(matrix_row_t current_matrix[]) { - matrix_row_t encoder_row = current_matrix[ENC_ROW]; - - if (encoder_row & (COL_SHIFTER << ENC_BUTTON_COL)) { - encoderPressed = true; - } else { - // Only trigger click on release - if (encoderPressed) { - encoderPressed = false; - clicked(); - } - } - - // Check which way the encoder is turned: - bool colA = encoder_row & (COL_SHIFTER << ENC_A_COL); - bool colB = encoder_row & (COL_SHIFTER << ENC_B_COL); - - if (colA && colB) { - colABPressed = true; - } else if (colA) { - if (colABPressed) { - // A+B followed by A means clockwise - colABPressed = false; - turned(true); - } - } else if (colB) { - if (colABPressed) { - // A+B followed by B means counter-clockwise - colABPressed = false; - turned(false); - } - } - current_matrix[ENC_ROW] = 0; -} diff --git a/keyboards/cheapino/encoder.h b/keyboards/cheapino/encoder.h deleted file mode 100644 index e393e5da2dac..000000000000 --- a/keyboards/cheapino/encoder.h +++ /dev/null @@ -1,5 +0,0 @@ -// -// Created by Thomas Haukland on 25/03/2023. -// - -void fix_encoder_action(matrix_row_t current_matrix[]); \ No newline at end of file diff --git a/keyboards/cheapino/halconf.h b/keyboards/cheapino/halconf.h deleted file mode 100644 index c06a0cbf6cce..000000000000 --- a/keyboards/cheapino/halconf.h +++ /dev/null @@ -1,8 +0,0 @@ - -#pragma once - -#define HAL_USE_PWM TRUE -#define HAL_USE_PAL TRUE -#define HAL_USE_I2C TRUE - -#include_next diff --git a/keyboards/cheapino/info.json b/keyboards/cheapino/keyboard.json similarity index 73% rename from keyboards/cheapino/info.json rename to keyboards/cheapino/keyboard.json index e12d8f2ab043..1c6d426651a2 100644 --- a/keyboards/cheapino/info.json +++ b/keyboards/cheapino/keyboard.json @@ -4,16 +4,51 @@ "maintainer": "tompi", "bootloader": "rp2040", "diode_direction": "ROW2COL", + "ws2812": { + "driver": "vendor", + "pin": "GP16" + }, + "build": { + "lto": true + }, "features": { "bootmagic": true, + "caps_word": true, "command": false, "console": false, + "deferred_exec": true, "extrakey": true, "mousekey": true, - "nkro": false + "nkro": false, + "rgblight": true + }, + "tapping": { + "term": 230 + }, + "caps_word": { + "both_shifts_turns_on": true + }, + "encoder": { + "_comment0": "These are unused but have to be defined. The encoder is", + "_comment1": "actually handled by matrix intersections; see encoder.c", + "rotary": [ + { + "pin_a": "GP9", + "pin_b": "GP10" + } + ] + }, + "rgblight": { + "led_count": 1, + "default": { + "hue": 128, + "sat": 128, + "val": 64 + } }, - "community_layouts": ["split_3x5_3"], "matrix_pins": { + "custom": true, + "custom_lite": true, "cols": [ "GP6", "GP6", @@ -29,7 +64,16 @@ "GP26", "GP26" ], - "rows": ["GP3", "GP1", "GP2", "GP0", "GP27", "GP28", "GP29", "GP8"] + "rows": [ + "GP3", + "GP1", + "GP2", + "GP0", + "GP27", + "GP28", + "GP29", + "GP8" + ] }, "processor": "RP2040", "url": "", @@ -47,6 +91,8 @@ { "matrix": [4, 7], "x": 3, "y": 0.125 }, { "matrix": [4, 6], "x": 4, "y": 0.25 }, + { "matrix": [3, 0], "x": 6, "y": 0.25 }, + { "matrix": [0, 0], "x": 7, "y": 0.25 }, { "matrix": [0, 1], "x": 8, "y": 0.125 }, { "matrix": [0, 2], "x": 9, "y": 0 }, diff --git a/keyboards/cheapino/matrix-encoder.c b/keyboards/cheapino/matrix-encoder.c new file mode 100644 index 000000000000..26101198c89e --- /dev/null +++ b/keyboards/cheapino/matrix-encoder.c @@ -0,0 +1,50 @@ +#include "matrix-encoder.h" +#include "matrix.h" +#include "quantum.h" + +void encoder_driver_task(void) { + // This is intentionally left empty to disable the default encoder driver. + // We inject events manually below. +} + +// There aren't enough pins on the RJ45 for dedicated encoder pins. Use matrix +// intersections instead. +void fix_encoder_action(matrix_row_t current_matrix[]) { + static const int ENC_ROW = 3; + static const int ENC_A_COL = 2; + static const int ENC_B_COL = 4; + // The button column is unused here and handled through the keymap instead. + // static const int ENC_BUTTON_COL = 0; + static const matrix_row_t ENC_A_BIT = (1 << ENC_A_COL); + static const matrix_row_t ENC_B_BIT = (1 << ENC_B_COL); + + // State machine tracking. + static bool colABPressed = false; + + // Check which way the encoder is turned: + matrix_row_t encoder_row = current_matrix[ENC_ROW]; + bool colA = encoder_row & ENC_A_BIT; + bool colB = encoder_row & ENC_B_BIT; + + extern bool encoder_queue_event(uint8_t, bool); + if (colA && colB) { + colABPressed = true; + } else if (colA) { + if (colABPressed) { + // A+B followed by A means clockwise + colABPressed = false; + encoder_queue_event(0, true); + } + } else if (colB) { + if (colABPressed) { + // A+B followed by B means counter-clockwise + colABPressed = false; + encoder_queue_event(0, false); + } + } + + // Clear A+B bits, and leave the button bits intact; it will be picked up + // by normal matrix/keymap processing. + static const matrix_row_t ROW_MASK = ~(ENC_A_BIT | ENC_B_BIT); + current_matrix[ENC_ROW] = encoder_row & ROW_MASK; +} diff --git a/keyboards/cheapino/matrix-encoder.h b/keyboards/cheapino/matrix-encoder.h new file mode 100644 index 000000000000..b32b25c59484 --- /dev/null +++ b/keyboards/cheapino/matrix-encoder.h @@ -0,0 +1,6 @@ +// +// Created by Thomas Haukland on 25/03/2023. +// +#include "quantum.h" + +void fix_encoder_action(matrix_row_t current_matrix[]); diff --git a/keyboards/cheapino/ghosting.c b/keyboards/cheapino/matrix-ghosting.c similarity index 100% rename from keyboards/cheapino/ghosting.c rename to keyboards/cheapino/matrix-ghosting.c diff --git a/keyboards/cheapino/ghosting.h b/keyboards/cheapino/matrix-ghosting.h similarity index 100% rename from keyboards/cheapino/ghosting.h rename to keyboards/cheapino/matrix-ghosting.h diff --git a/keyboards/cheapino/matrix.c b/keyboards/cheapino/matrix.c index f6f518318b26..ff3b3b7bb1c0 100644 --- a/keyboards/cheapino/matrix.c +++ b/keyboards/cheapino/matrix.c @@ -25,8 +25,8 @@ along with this program. If not, see . #include "config.h" #include "quantum.h" #include "debounce.h" -#include "encoder.h" -#include "ghosting.h" +#include "matrix-encoder.h" +#include "matrix-ghosting.h" #include "print.h" // How long the scanning code waits for changed io to settle. @@ -120,16 +120,11 @@ void matrix_init_custom(void) { } void store_old_matrix(matrix_row_t current_matrix[]) { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - previous_matrix[i] = current_matrix[i]; - } + memcpy(previous_matrix, current_matrix, MATRIX_ROWS * sizeof(matrix_row_t)); } bool has_matrix_changed(matrix_row_t current_matrix[]) { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (previous_matrix[i] != current_matrix[i]) return true; - } - return false; + return memcmp(previous_matrix, current_matrix, MATRIX_ROWS * sizeof(matrix_row_t)) != 0; } bool matrix_scan_custom(matrix_row_t current_matrix[]) { diff --git a/keyboards/cheapino/rules.mk b/keyboards/cheapino/rules.mk index 70ed45868bc3..8ca133bf1eb3 100644 --- a/keyboards/cheapino/rules.mk +++ b/keyboards/cheapino/rules.mk @@ -1,8 +1,3 @@ -CAPS_WORD_ENABLE = yes -CUSTOM_MATRIX = lite -WS2812_DRIVER = vendor -RGBLIGHT_ENABLE = yes -DEFERRED_EXEC_ENABLE = yes -SRC += encoder.c -SRC += ghosting.c -SRC += matrix.c \ No newline at end of file +SRC += matrix-encoder.c +SRC += matrix-ghosting.c +SRC += matrix.c From 03715991769f768556712c30ba29513e298a2b52 Mon Sep 17 00:00:00 2001 From: schuay Date: Wed, 31 Dec 2025 10:25:27 +0100 Subject: [PATCH 1198/1205] disable lto and enable encoder by default --- keyboards/cheapino/keyboard.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/cheapino/keyboard.json b/keyboards/cheapino/keyboard.json index 1c6d426651a2..e7dc06f6651e 100644 --- a/keyboards/cheapino/keyboard.json +++ b/keyboards/cheapino/keyboard.json @@ -8,15 +8,13 @@ "driver": "vendor", "pin": "GP16" }, - "build": { - "lto": true - }, "features": { "bootmagic": true, "caps_word": true, "command": false, "console": false, "deferred_exec": true, + "encoder": true, "extrakey": true, "mousekey": true, "nkro": false, From b7936ccfcd07c341902eb4bc49af43c02f2d0900 Mon Sep 17 00:00:00 2001 From: schuay Date: Wed, 31 Dec 2025 10:29:56 +0100 Subject: [PATCH 1199/1205] update debounce_init signature --- keyboards/cheapino/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/cheapino/matrix.c b/keyboards/cheapino/matrix.c index ff3b3b7bb1c0..88c18f8a2d14 100644 --- a/keyboards/cheapino/matrix.c +++ b/keyboards/cheapino/matrix.c @@ -116,7 +116,7 @@ void matrix_init_custom(void) { // initialize key pins unselect_cols(); unselect_rows(); - debounce_init(MATRIX_ROWS); + debounce_init(); } void store_old_matrix(matrix_row_t current_matrix[]) { From b4abbab680debe2034f43b9125dab1058d73858b Mon Sep 17 00:00:00 2001 From: schuay Date: Thu, 1 Jan 2026 09:08:13 +0100 Subject: [PATCH 1200/1205] simplify file structure --- keyboards/cheapino/cheapino.c | 172 +++++++++++++++++++++++++++ keyboards/cheapino/matrix-encoder.c | 50 -------- keyboards/cheapino/matrix-encoder.h | 6 - keyboards/cheapino/matrix-ghosting.c | 128 -------------------- keyboards/cheapino/matrix-ghosting.h | 5 - keyboards/cheapino/matrix.c | 5 +- keyboards/cheapino/rules.mk | 2 - 7 files changed, 175 insertions(+), 193 deletions(-) delete mode 100644 keyboards/cheapino/matrix-encoder.c delete mode 100644 keyboards/cheapino/matrix-encoder.h delete mode 100644 keyboards/cheapino/matrix-ghosting.c delete mode 100644 keyboards/cheapino/matrix-ghosting.h diff --git a/keyboards/cheapino/cheapino.c b/keyboards/cheapino/cheapino.c index 284ba3a755d4..6cda581600a1 100644 --- a/keyboards/cheapino/cheapino.c +++ b/keyboards/cheapino/cheapino.c @@ -1,3 +1,7 @@ +#include "matrix.h" +#include "quantum.h" +#include "print.h" + #include QMK_KEYBOARD_H // This is to keep state between callbacks, when it is 0 the @@ -40,3 +44,171 @@ void keyboard_post_init_kb(void) { // Flash a little on start defer_exec(50, flash_led, NULL); } + +// This is just to be able to declare constants as they appear in the qmk console +#define rev(b) \ + ((b & 1) << 15) | \ + ((b & (1 << 1)) << 13) | \ + ((b & (1 << 2)) << 11) | \ + ((b & (1 << 3)) << 9) | \ + ((b & (1 << 4)) << 7) | \ + ((b & (1 << 5)) << 5) | \ + ((b & (1 << 6)) << 3) | \ + ((b & (1 << 7)) << 1) | \ + ((b & (1 << 8)) >> 1) | \ + ((b & (1 << 9)) >> 3) | \ + ((b & (1 << 10)) >> 5) | \ + ((b & (1 << 11)) >> 7) | \ + ((b & (1 << 12)) >> 9) | \ + ((b & (1 << 13)) >> 11) | \ + ((b & (1 << 14)) >> 13) | \ + b >> 15 + +/* This is for debugging the matrix rows +void printBits(uint16_t n) +{ + long i; + for (i = 15; i >= 0; i--) { + if ((n & (1 << i)) != 0) { + printf("1"); + } + else { + printf("0"); + } + } + printf("\n"); +} +*/ + +bool bit_pattern_set(uint16_t number, uint16_t bitPattern) { + return !(~number & bitPattern); +} + +void fix_ghosting_instance( + matrix_row_t current_matrix[], + unsigned short row_num_with_possible_error_cause, + uint16_t possible_error_cause, + unsigned short row_num_with_possible_error, + uint16_t possible_error, + uint16_t error_fix) { + if (bit_pattern_set(current_matrix[row_num_with_possible_error_cause], possible_error_cause)) { + if (bit_pattern_set(current_matrix[row_num_with_possible_error], possible_error)) { + current_matrix[row_num_with_possible_error] = current_matrix[row_num_with_possible_error] ^ error_fix; + } + } +} + +void fix_ghosting_column( + matrix_row_t matrix[], + uint16_t possible_error_cause, + uint16_t possible_error, + uint16_t error_fix) { + // First the right side + for (short i = 0; i<3; i++) { + fix_ghosting_instance(matrix, i, possible_error_cause, (i+1)%3, possible_error, error_fix); + fix_ghosting_instance(matrix, i, possible_error_cause, (i+2)%3, possible_error, error_fix); + } + + // Then exactly same procedure on the left side + for (short i = 0; i<3; i++) { + fix_ghosting_instance(matrix, i+4, possible_error_cause<<6, 4+((i+1)%3), possible_error<<6, error_fix<<6); + fix_ghosting_instance(matrix, i+4, possible_error_cause<<6, 4+((i+2)%3), possible_error<<6, error_fix<<6); + } +} + +// For QWERTY layout, key combo a+s+e also outputs q. This suppresses the q, and other similar ghosts +// These are observed ghosts(following a pattern). TODO: need to fix this for v3 +// Might need to add 2 diodes(one in each direction) for every row, to increase voltage drop. +void fix_ghosting(matrix_row_t matrix[]) { + fix_ghosting_column(matrix, + rev(0B0110000000000000), + rev(0B1010000000000000), + rev(0B0010000000000000)); + fix_ghosting_column(matrix, + rev(0B0110000000000000), + rev(0B0101000000000000), + rev(0B0100000000000000)); + + fix_ghosting_column(matrix, + rev(0B0001100000000000), + rev(0B0010100000000000), + rev(0B0000100000000000)); + fix_ghosting_column(matrix, + rev(0B0001100000000000), + rev(0B0001010000000000), + rev(0B0001000000000000)); + + fix_ghosting_column(matrix, + rev(0B1000010000000000), + rev(0B1000100000000000), + rev(0B1000000000000000)); + fix_ghosting_column(matrix, + rev(0B1000010000000000), + rev(0B0100010000000000), + rev(0B0000010000000000)); + + fix_ghosting_column(matrix, + rev(0B1001000000000000), + rev(0B0101000000000000), + rev(0B0001000000000000)); + fix_ghosting_column(matrix, + rev(0B1001000000000000), + rev(0B1010000000000000), + rev(0B1000000000000000)); + + fix_ghosting_column(matrix, + rev(0B0100100000000000), + rev(0B0100010000000000), + rev(0B0100000000000000)); + fix_ghosting_column(matrix, + rev(0B0100100000000000), + rev(0B1000100000000000), + rev(0B0000100000000000)); +} + +void encoder_driver_task(void) { + // This is intentionally left empty to disable the default encoder driver. + // We inject events manually below. +} + +// There aren't enough pins on the RJ45 for dedicated encoder pins. Use matrix +// intersections instead. +void fix_encoder_action(matrix_row_t current_matrix[]) { + static const int ENC_ROW = 3; + static const int ENC_A_COL = 2; + static const int ENC_B_COL = 4; + // The button column is unused here and handled through the keymap instead. + // static const int ENC_BUTTON_COL = 0; + static const matrix_row_t ENC_A_BIT = (1 << ENC_A_COL); + static const matrix_row_t ENC_B_BIT = (1 << ENC_B_COL); + + // State machine tracking. + static bool colABPressed = false; + + // Check which way the encoder is turned: + matrix_row_t encoder_row = current_matrix[ENC_ROW]; + bool colA = encoder_row & ENC_A_BIT; + bool colB = encoder_row & ENC_B_BIT; + + extern bool encoder_queue_event(uint8_t, bool); + if (colA && colB) { + colABPressed = true; + } else if (colA) { + if (colABPressed) { + // A+B followed by A means clockwise + colABPressed = false; + encoder_queue_event(0, true); + } + } else if (colB) { + if (colABPressed) { + // A+B followed by B means counter-clockwise + colABPressed = false; + encoder_queue_event(0, false); + } + } + + // Clear A+B bits, and leave the button bits intact; it will be picked up + // by normal matrix/keymap processing. + static const matrix_row_t ROW_MASK = ~(ENC_A_BIT | ENC_B_BIT); + current_matrix[ENC_ROW] = encoder_row & ROW_MASK; +} diff --git a/keyboards/cheapino/matrix-encoder.c b/keyboards/cheapino/matrix-encoder.c deleted file mode 100644 index 26101198c89e..000000000000 --- a/keyboards/cheapino/matrix-encoder.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "matrix-encoder.h" -#include "matrix.h" -#include "quantum.h" - -void encoder_driver_task(void) { - // This is intentionally left empty to disable the default encoder driver. - // We inject events manually below. -} - -// There aren't enough pins on the RJ45 for dedicated encoder pins. Use matrix -// intersections instead. -void fix_encoder_action(matrix_row_t current_matrix[]) { - static const int ENC_ROW = 3; - static const int ENC_A_COL = 2; - static const int ENC_B_COL = 4; - // The button column is unused here and handled through the keymap instead. - // static const int ENC_BUTTON_COL = 0; - static const matrix_row_t ENC_A_BIT = (1 << ENC_A_COL); - static const matrix_row_t ENC_B_BIT = (1 << ENC_B_COL); - - // State machine tracking. - static bool colABPressed = false; - - // Check which way the encoder is turned: - matrix_row_t encoder_row = current_matrix[ENC_ROW]; - bool colA = encoder_row & ENC_A_BIT; - bool colB = encoder_row & ENC_B_BIT; - - extern bool encoder_queue_event(uint8_t, bool); - if (colA && colB) { - colABPressed = true; - } else if (colA) { - if (colABPressed) { - // A+B followed by A means clockwise - colABPressed = false; - encoder_queue_event(0, true); - } - } else if (colB) { - if (colABPressed) { - // A+B followed by B means counter-clockwise - colABPressed = false; - encoder_queue_event(0, false); - } - } - - // Clear A+B bits, and leave the button bits intact; it will be picked up - // by normal matrix/keymap processing. - static const matrix_row_t ROW_MASK = ~(ENC_A_BIT | ENC_B_BIT); - current_matrix[ENC_ROW] = encoder_row & ROW_MASK; -} diff --git a/keyboards/cheapino/matrix-encoder.h b/keyboards/cheapino/matrix-encoder.h deleted file mode 100644 index b32b25c59484..000000000000 --- a/keyboards/cheapino/matrix-encoder.h +++ /dev/null @@ -1,6 +0,0 @@ -// -// Created by Thomas Haukland on 25/03/2023. -// -#include "quantum.h" - -void fix_encoder_action(matrix_row_t current_matrix[]); diff --git a/keyboards/cheapino/matrix-ghosting.c b/keyboards/cheapino/matrix-ghosting.c deleted file mode 100644 index c349b0abe198..000000000000 --- a/keyboards/cheapino/matrix-ghosting.c +++ /dev/null @@ -1,128 +0,0 @@ -// -// Created by Thomas Haukland on 2024-05-05. -// - -#include "matrix.h" -#include "quantum.h" -#include "print.h" - -// This is just to be able to declare constants as they appear in the qmk console -#define rev(b) \ - ((b & 1) << 15) | \ - ((b & (1 << 1)) << 13) | \ - ((b & (1 << 2)) << 11) | \ - ((b & (1 << 3)) << 9) | \ - ((b & (1 << 4)) << 7) | \ - ((b & (1 << 5)) << 5) | \ - ((b & (1 << 6)) << 3) | \ - ((b & (1 << 7)) << 1) | \ - ((b & (1 << 8)) >> 1) | \ - ((b & (1 << 9)) >> 3) | \ - ((b & (1 << 10)) >> 5) | \ - ((b & (1 << 11)) >> 7) | \ - ((b & (1 << 12)) >> 9) | \ - ((b & (1 << 13)) >> 11) | \ - ((b & (1 << 14)) >> 13) | \ - b >> 15 - -/* This is for debugging the matrix rows -void printBits(uint16_t n) -{ - long i; - for (i = 15; i >= 0; i--) { - if ((n & (1 << i)) != 0) { - printf("1"); - } - else { - printf("0"); - } - } - printf("\n"); -} -*/ - -bool bit_pattern_set(uint16_t number, uint16_t bitPattern) { - return !(~number & bitPattern); -} - -void fix_ghosting_instance( - matrix_row_t current_matrix[], - unsigned short row_num_with_possible_error_cause, - uint16_t possible_error_cause, - unsigned short row_num_with_possible_error, - uint16_t possible_error, - uint16_t error_fix) { - if (bit_pattern_set(current_matrix[row_num_with_possible_error_cause], possible_error_cause)) { - if (bit_pattern_set(current_matrix[row_num_with_possible_error], possible_error)) { - current_matrix[row_num_with_possible_error] = current_matrix[row_num_with_possible_error] ^ error_fix; - } - } -} - -void fix_ghosting_column( - matrix_row_t matrix[], - uint16_t possible_error_cause, - uint16_t possible_error, - uint16_t error_fix) { - // First the right side - for (short i = 0; i<3; i++) { - fix_ghosting_instance(matrix, i, possible_error_cause, (i+1)%3, possible_error, error_fix); - fix_ghosting_instance(matrix, i, possible_error_cause, (i+2)%3, possible_error, error_fix); - } - - // Then exactly same procedure on the left side - for (short i = 0; i<3; i++) { - fix_ghosting_instance(matrix, i+4, possible_error_cause<<6, 4+((i+1)%3), possible_error<<6, error_fix<<6); - fix_ghosting_instance(matrix, i+4, possible_error_cause<<6, 4+((i+2)%3), possible_error<<6, error_fix<<6); - } -} - -// For QWERTY layout, key combo a+s+e also outputs q. This suppresses the q, and other similar ghosts -// These are observed ghosts(following a pattern). TODO: need to fix this for v3 -// Might need to add 2 diodes(one in each direction) for every row, to increase voltage drop. -void fix_ghosting(matrix_row_t matrix[]) { - fix_ghosting_column(matrix, - rev(0B0110000000000000), - rev(0B1010000000000000), - rev(0B0010000000000000)); - fix_ghosting_column(matrix, - rev(0B0110000000000000), - rev(0B0101000000000000), - rev(0B0100000000000000)); - - fix_ghosting_column(matrix, - rev(0B0001100000000000), - rev(0B0010100000000000), - rev(0B0000100000000000)); - fix_ghosting_column(matrix, - rev(0B0001100000000000), - rev(0B0001010000000000), - rev(0B0001000000000000)); - - fix_ghosting_column(matrix, - rev(0B1000010000000000), - rev(0B1000100000000000), - rev(0B1000000000000000)); - fix_ghosting_column(matrix, - rev(0B1000010000000000), - rev(0B0100010000000000), - rev(0B0000010000000000)); - - fix_ghosting_column(matrix, - rev(0B1001000000000000), - rev(0B0101000000000000), - rev(0B0001000000000000)); - fix_ghosting_column(matrix, - rev(0B1001000000000000), - rev(0B1010000000000000), - rev(0B1000000000000000)); - - fix_ghosting_column(matrix, - rev(0B0100100000000000), - rev(0B0100010000000000), - rev(0B0100000000000000)); - fix_ghosting_column(matrix, - rev(0B0100100000000000), - rev(0B1000100000000000), - rev(0B0000100000000000)); -} diff --git a/keyboards/cheapino/matrix-ghosting.h b/keyboards/cheapino/matrix-ghosting.h deleted file mode 100644 index 1dfef2af3fde..000000000000 --- a/keyboards/cheapino/matrix-ghosting.h +++ /dev/null @@ -1,5 +0,0 @@ -// -// Created by Thomas Haukland on 2024-05-05. -// - -void fix_ghosting(matrix_row_t current_matrix[]); \ No newline at end of file diff --git a/keyboards/cheapino/matrix.c b/keyboards/cheapino/matrix.c index 88c18f8a2d14..9a3194827b37 100644 --- a/keyboards/cheapino/matrix.c +++ b/keyboards/cheapino/matrix.c @@ -25,8 +25,6 @@ along with this program. If not, see . #include "config.h" #include "quantum.h" #include "debounce.h" -#include "matrix-encoder.h" -#include "matrix-ghosting.h" #include "print.h" // How long the scanning code waits for changed io to settle. @@ -128,6 +126,9 @@ bool has_matrix_changed(matrix_row_t current_matrix[]) { } bool matrix_scan_custom(matrix_row_t current_matrix[]) { + extern void fix_encoder_action(matrix_row_t current_matrix[]); + extern void fix_ghosting(matrix_row_t matrix[]); + store_old_matrix(current_matrix); // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { diff --git a/keyboards/cheapino/rules.mk b/keyboards/cheapino/rules.mk index 8ca133bf1eb3..36ee49ccb093 100644 --- a/keyboards/cheapino/rules.mk +++ b/keyboards/cheapino/rules.mk @@ -1,3 +1 @@ -SRC += matrix-encoder.c -SRC += matrix-ghosting.c SRC += matrix.c From 8e9936181c4e1a6be7f5e1151bd46c7f2807a787 Mon Sep 17 00:00:00 2001 From: Jakob Linke <36006+schuay@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:30:22 +0100 Subject: [PATCH 1201/1205] add default keymap --- keyboards/cheapino/keyboard.json | 2 +- .../cheapino/keymaps/default/keymap.json | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 keyboards/cheapino/keymaps/default/keymap.json diff --git a/keyboards/cheapino/keyboard.json b/keyboards/cheapino/keyboard.json index e7dc06f6651e..42cc2e01b4d2 100644 --- a/keyboards/cheapino/keyboard.json +++ b/keyboards/cheapino/keyboard.json @@ -1,6 +1,6 @@ { "manufacturer": "Thomas Haukland", - "keyboard_name": "cheapino2", + "keyboard_name": "cheapino", "maintainer": "tompi", "bootloader": "rp2040", "diode_direction": "ROW2COL", diff --git a/keyboards/cheapino/keymaps/default/keymap.json b/keyboards/cheapino/keymaps/default/keymap.json new file mode 100644 index 000000000000..b992102c91b1 --- /dev/null +++ b/keyboards/cheapino/keymaps/default/keymap.json @@ -0,0 +1,35 @@ +{ + "version": 1, + "notes": "Cheapino default keymap", + "documentation": "\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", + "keyboard": "bastardkb/skeletyl/blackpill", + "keymap": "default", + "layout": "LAYOUT_split_3x5_3", + "layers": [ + [ + "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_NO", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", + "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", + "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", + "KC_LGUI", "KC_SPC", "MO(1)", "MO(2)", "KC_ENT", "KC_RALT" + ], + [ + "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_NO", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", + "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RIGHT", "KC_NO", + "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", + "KC_LGUI", "KC_SPC", "KC_TRNS", "MO(3)", "KC_ENT", "KC_RALT" + ], + [ + "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_NO", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", + "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_MINS", "KC_EQL", "KC_LBRC", "KC_RBRC", "KC_BSLS", + "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_UNDS", "KC_PLUS", "KC_LCBR", "KC_RCBR", "KC_PIPE", + "KC_LGUI", "KC_SPC", "MO(3)", "KC_TRNS", "KC_ENT", "KC_RALT" + ], + [ + "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", + "KC_LGUI", "KC_SPC", "KC_TRNS", "KC_TRNS", "KC_ENT", "KC_RALT"] + + ], + "author": "thomas.haukland@gmail.com" +} From 1a6412ba62208cd6308e46f9fe64c51261de39a3 Mon Sep 17 00:00:00 2001 From: Jens Getreu Date: Sun, 1 Mar 2026 19:40:31 +0200 Subject: [PATCH 1202/1205] Musclememory friendly layout, v1.2 Build with: qmk compile -kb cheapino -km musclememory --- keyboards/cheapino/cheapino.c | 4 +- keyboards/cheapino/config.h | 22 +- keyboards/cheapino/keyboard.json | 24 +- .../cheapino/keymaps/musclememory/keymap.c | 233 ++++++++++++++++++ lib/chibios | 2 +- lib/chibios-contrib | 2 +- lib/pico-sdk | 2 +- 7 files changed, 272 insertions(+), 17 deletions(-) create mode 100644 keyboards/cheapino/keymaps/musclememory/keymap.c diff --git a/keyboards/cheapino/cheapino.c b/keyboards/cheapino/cheapino.c index 6cda581600a1..358c40750208 100644 --- a/keyboards/cheapino/cheapino.c +++ b/keyboards/cheapino/cheapino.c @@ -197,13 +197,13 @@ void fix_encoder_action(matrix_row_t current_matrix[]) { if (colABPressed) { // A+B followed by A means clockwise colABPressed = false; - encoder_queue_event(0, true); + encoder_queue_event(0, false); } } else if (colB) { if (colABPressed) { // A+B followed by B means counter-clockwise colABPressed = false; - encoder_queue_event(0, false); + encoder_queue_event(0, true); } } diff --git a/keyboards/cheapino/config.h b/keyboards/cheapino/config.h index f4cd51d9d17e..1a5acb0ffc8b 100644 --- a/keyboards/cheapino/config.h +++ b/keyboards/cheapino/config.h @@ -1,8 +1,24 @@ // Copyright 2023 Thomas Haukland (@tompi) // SPDX-License-Identifier: GPL-2.0-or-later - #pragma once -// Force the usage of PIO1 peripheral, by default the WS2812 implementation uses the PIO0 peripheral. #define WS2812_PIO_USE_PIO1 -#define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB +#define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_GRB + +// Force these values regardless of what the JSON or other files say +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 16 + + #undef MOUSEKEY_INITIAL_SPEED + #define MOUSEKEY_INITIAL_SPEED 2 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 1 // Set to 1 for absolute precision testing + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 14 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 100 +#endif diff --git a/keyboards/cheapino/keyboard.json b/keyboards/cheapino/keyboard.json index 42cc2e01b4d2..da131dcd2923 100644 --- a/keyboards/cheapino/keyboard.json +++ b/keyboards/cheapino/keyboard.json @@ -18,14 +18,24 @@ "extrakey": true, "mousekey": true, "nkro": false, - "rgblight": true - }, - "tapping": { - "term": 230 + "combo": true, + "tap_dance": true, + "rgblight": true, + "rgblight_animations": true }, "caps_word": { "both_shifts_turns_on": true }, + "tapping": { + "permissive_hold": true, + "quick_tap_term": 150, + "force_hold": false, + "hold_on_other_key_press": true, + "term_per_key": true + }, + "combo": { + "term_per_combo": true + }, "encoder": { "_comment0": "These are unused but have to be defined. The encoder is", "_comment1": "actually handled by matrix intersections; see encoder.c", @@ -37,12 +47,8 @@ ] }, "rgblight": { + "sleep": true, "led_count": 1, - "default": { - "hue": 128, - "sat": 128, - "val": 64 - } }, "matrix_pins": { "custom": true, diff --git a/keyboards/cheapino/keymaps/musclememory/keymap.c b/keyboards/cheapino/keymaps/musclememory/keymap.c new file mode 100644 index 000000000000..5a62af79b566 --- /dev/null +++ b/keyboards/cheapino/keymaps/musclememory/keymap.c @@ -0,0 +1,233 @@ +#include QMK_KEYBOARD_H + +/** + * LAYER DEFINITIONS + * Defines internal names for layers to make the code more readable. + */ +enum layers { _BASE = 0, _L1, _L2, _L3, _L4, _L5, _L6, _L7 }; + +/** + * + * + * Use LED as visual layer indicator + * + */ +// Standard RGB keycodes can sometimes conflict with specific hardware drivers. +// These custom enums are used to trigger RGB functions manually via process_record_user. +enum custom_keycodes { + M_RGB_TOG = SAFE_RANGE, // Toggle RGB on/off + M_RGB_MOD, // Cycle through RGB modes + M_RGB_RMOD, // Cycle modes in reverse + M_RGB_HUI, // Increase Hue + M_RGB_HUD, // Decrease Hue + M_RGB_SAI, // Increase Saturation + M_RGB_SAD, // Decrease Saturation + M_RGB_VAI, // Increase Brightness (Value) + M_RGB_VAD // Decrease Brightness (Value) +}; + +// EVENT HANDLER: process_record_user +// Intercepts key presses before they are processed by the system. +// Used here to call rgblight functions directly when custom keycodes are pressed. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case M_RGB_TOG: rgblight_toggle(); return false; + case M_RGB_MOD: rgblight_step(); return false; + case M_RGB_RMOD: rgblight_step_reverse(); return false; + case M_RGB_HUI: rgblight_increase_hue(); return false; + case M_RGB_HUD: rgblight_decrease_hue(); return false; + case M_RGB_SAI: rgblight_increase_sat(); return false; + case M_RGB_SAD: rgblight_decrease_sat(); return false; + case M_RGB_VAI: rgblight_increase_val(); return false; + case M_RGB_VAD: rgblight_decrease_val(); return false; + } + } + return true; +} + +// LAYER VISUAL FEEDBACK: layer_state_set_user +// Changes the LED color automatically whenever the active layer changes. +// Uses 'noeeprom' versions to prevent unnecessary wear on the flash memory. + +#define COLOR_WHITE 0, 0, 10 // Dim White +#define COLOR_AMBER 20, 180, 10 // Very dim Warm White/Vanilla +#define COLOR_MINT 45, 140, 10 // Warm Olive/Mint (less blue, more gold) +#define COLOR_CYAN 140, 200, 10 // Soft Sky Blue (cooler accent, but dim) +#define COLOR_ICEBLUE 165, 120, 12 // Muted Steel Blue +#define COLOR_LAVENDER 210, 130, 15 // Dusky Rose/Lavender +#define COLOR_RED 0, 255, 12 // Dim Ember Red +#define COLOR_PINK 230, 170, 10 // Deep Sunset Orange (The focus color) + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _L2: rgblight_sethsv_noeeprom(COLOR_RED); break; + case _L3: rgblight_sethsv_noeeprom(COLOR_CYAN); break; + case _L4: rgblight_sethsv_noeeprom(COLOR_LAVENDER); break; + case _L5: rgblight_sethsv_noeeprom(COLOR_AMBER); break; + case _L6: rgblight_sethsv_noeeprom(COLOR_MINT); break; + case _L7: rgblight_sethsv_noeeprom(COLOR_PINK); break; + default: rgblight_sethsv_noeeprom(COLOR_WHITE); break; + } + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + return state; +} + +/** + * + * TAP DANCE DEFINITION + * + */ +// TD_CMENU Logic: +// - Base Layer: Single Tap/Hold = KC_APP | Double Tap = Toggle L2 +// - Other Layers: Any interaction = layer_clear() (Reset to Base) +enum { TD_CMENU }; +void td_cmenu_finished(tap_dance_state_t *state, void *user_data) { + // Check if we are currently on the Base Layer + if (get_highest_layer(layer_state) == _BASE) { + if (state->pressed) { + tap_code16(KC_APP); + } else { + if (state->count == 1) { + tap_code16(KC_APP); + } else if (state->count == 2) { + layer_invert(_L2); + } + } + } else { + // If we are on ANY other layer, reset everything to Base + layer_clear(); + } +} +tap_dance_action_t tap_dance_actions[] = { + [TD_CMENU] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_cmenu_finished, NULL) +}; + +// PER-KEY TAPPING TERM +// Dynamically adjusts the tapping term. +// Uses the global TAPPING_TERM from keyboard.json/config.h as the baseline. +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // Relaxed window for the TD_4 tap dance (Menu/Layer 2 Toggle) + case TD(TD_CMENU): + return 350; + + // Slightly more buffer for thumb-based layer taps (optional) + case LT(_L6, KC_ESC): + case MT(MOD_LGUI, KC_SPC): + case MT(MOD_LGUI, KC_ENT): + case LT(_L5, KC_BSPC): + return 250; + + // Fallback to the default value defined in keyboard.json or config.h + default: + return 200; + } +} + + +/** + * + * POST-PROCESSING: post_process_record_user + * Logic that runs AFTER a key press is handled. + * Specifically used to clear layers (return to base) after a Tap-Hold key is tapped. + * + */ +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!record->event.pressed && record->tap.count > 0) { + switch (keycode) { + case LT(_L6, KC_NO): + layer_clear(); // Reset to Base Layer + break; + } + } +} + +/** + * KEYMAP DATA + * The matrix definition for each layer. + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MUTE, KC_Y, KC_U, KC_I, KC_O, KC_P, + LSFT_T(KC_A), RALT_T(KC_S), LT(_L3, KC_D), LCTL_T(KC_F), LALT_T(KC_G), LALT_T(KC_H), RCTL_T(KC_J), LT(_L3, KC_K), RALT_T(KC_L), RSFT_T(KC_SCLN), + KC_Z, KC_X, KC_C, RGUI_T(KC_V), KC_B, KC_N, RGUI_T(KC_M), KC_COMM, KC_DOT, KC_SLSH, + OSL(_L4), LT(_L6, KC_ESC), MT(MOD_LGUI, KC_SPC), MT(MOD_LGUI, KC_ENT), LT(_L5, KC_BSPC), TD(TD_CMENU) +), + +[_L1] = LAYOUT_split_3x5_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, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[_L2] = LAYOUT_split_3x5_3( + KC_U, KC_D, KC_E, KC_F, KC_N, KC_TRNS, KC_KP_MINUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, + KC_PSLS, KC_PAST, LT(_L3, KC_PEQL), KC_TAB, KC_BSPC, KC_NUM_LOCK, KC_KP_4, LT(_L3, KC_KP_5), KC_KP_6, KC_PENT, + KC_X, KC_A, KC_B, KC_C, LSFT(KC_SCLN), KC_KP_PLUS, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_DOT, + KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[_L3] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, + LSFT_T(KC_ESC), RALT_T(KC_INS), LT(_L3, KC_DEL), LCTL_T(KC_TAB), LALT_T(KC_BSPC), LALT_T(KC_LEFT), RCTL_T(KC_DOWN), LT(_L3, KC_UP), RALT_T(KC_RGHT), RSFT_T(KC_ENT), + KC_GRV, KC_MINS, KC_EQL, RGUI_T(KC_LBRC), KC_RBRC, KC_BSLS, RGUI_T(KC_QUOT), KC_COMM, KC_DOT, KC_SLSH, + KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[_L4] = LAYOUT_split_3x5_3( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + LSFT_T(KC_F11), RALT_T(KC_F12), KC_F13, LCTL_T(KC_F14), LALT_T(KC_F15), LALT_T(KC_F16), RCTL_T(KC_F17), KC_F18, RALT_T(KC_F19), RSFT_T(KC_F20), + KC_F21, KC_F22, KC_F23, RGUI_T(KC_F24), KC_NO, KC_NO, RGUI_T(KC_NO), KC_NO, KC_NO, KC_NO, + KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[_L5] = LAYOUT_split_3x5_3( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_HOME, KC_DEL, KC_INS, KC_END, KC_BSPC, + KC_ESC, KC_INS, KC_DEL, KC_TAB, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, + KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[_L6] = LAYOUT_split_3x5_3( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + MS_BTN5, MS_BTN1, MS_BTN3, MS_BTN2, MS_BTN4, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT, MS_BTN1, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MS_WHLL, MS_WHLD, MS_WHLU, MS_WHLR, KC_NO, + KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[_L7] = LAYOUT_split_3x5_3( + KC_NO, KC_NO, M_RGB_VAD, M_RGB_VAI, M_RGB_TOG, KC_TRNS, KC_NO, KC_BRID, KC_BRIU, KC_NO, KC_NO, + KC_NO, KC_NO, M_RGB_HUD, M_RGB_HUI, M_RGB_MOD, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, + KC_NO, KC_NO, M_RGB_SAD, M_RGB_SAI, M_RGB_RMOD, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, + KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) +}; + +/** + * COMBOS + * Combos allow triggering actions by pressing multiple keys simultaneously. + * - combo1/2: Trigger Layer 7 (System settings). + * - combo3: Toggle Layer 3. + * - combo4/5: Reboot into Bootloader (Flash mode). + * - combo_caps: Toggle Caps Lock. + */ +const uint16_t PROGMEM combo1[] = { RGUI_T(KC_M), MT(MOD_LGUI, KC_ENT), COMBO_END }; +const uint16_t PROGMEM combo2[] = { RGUI_T(KC_V), MT(MOD_LGUI, KC_SPC), COMBO_END }; +const uint16_t PROGMEM combo3[] = { LT(_L6, KC_ESC), LT(_L5, KC_BSPC), COMBO_END }; +const uint16_t PROGMEM combo4[] = { LT(_L6, KC_NO), LT(_L5, KC_BSPC), COMBO_END }; +const uint16_t PROGMEM combo5[] = { KC_Q, KC_W, KC_E, KC_T, COMBO_END }; +const uint16_t PROGMEM combo6[] = { KC_Y, KC_I, KC_O, KC_P, COMBO_END }; +const uint16_t PROGMEM combo_caps[] = { OSL(_L4), TD(TD_CMENU), COMBO_END }; + +combo_t key_combos[] = { + COMBO(combo1, MO(_L7)), + COMBO(combo2, MO(_L7)), + COMBO(combo3, TG(_L3)), + COMBO(combo4, TG(_L3)), + COMBO(combo5, QK_BOOT), + COMBO(combo6, QK_BOOT), + COMBO(combo_caps, KC_CAPS) +}; diff --git a/lib/chibios b/lib/chibios index 8bd61b804303..be44b3305f9a 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 8bd61b804303f1614d574546c2dd735eeabb09f5 +Subproject commit be44b3305f9a9fe5f2f49a4e7b978db322dc463e diff --git a/lib/chibios-contrib b/lib/chibios-contrib index 8d863d9ee4ee..77cb0a4f7589 160000 --- a/lib/chibios-contrib +++ b/lib/chibios-contrib @@ -1 +1 @@ -Subproject commit 8d863d9ee4eecea68ad8d15f7e7c2b451aea79d9 +Subproject commit 77cb0a4f7589f89e724f5e6ecb1d76d514dd1212 diff --git a/lib/pico-sdk b/lib/pico-sdk index d0c5cac430cc..a3398d8d3a77 160000 --- a/lib/pico-sdk +++ b/lib/pico-sdk @@ -1 +1 @@ -Subproject commit d0c5cac430cc955b65efa0e899748853d9a80928 +Subproject commit a3398d8d3a772f37fef44a74743a1de69770e9c2 From aca5be6e070a05848aac750758300f7a64c65f17 Mon Sep 17 00:00:00 2001 From: Jens Getreu Date: Sat, 7 Mar 2026 21:04:03 +0200 Subject: [PATCH 1203/1205] Allow changing base layer color --- keyboards/cheapino/keyboard.json | 20 +-- .../cheapino/keymaps/musclememory/keymap.c | 158 ++++++++++-------- .../cheapino/keymaps/musclememory/readme.md | 103 ++++++++++++ keyboards/cheapino/matrix.c | 3 +- 4 files changed, 196 insertions(+), 88 deletions(-) create mode 100644 keyboards/cheapino/keymaps/musclememory/readme.md diff --git a/keyboards/cheapino/keyboard.json b/keyboards/cheapino/keyboard.json index da131dcd2923..b68cfd59022b 100644 --- a/keyboards/cheapino/keyboard.json +++ b/keyboards/cheapino/keyboard.json @@ -33,9 +33,7 @@ "hold_on_other_key_press": true, "term_per_key": true }, - "combo": { - "term_per_combo": true - }, + "encoder": { "_comment0": "These are unused but have to be defined. The encoder is", "_comment1": "actually handled by matrix intersections; see encoder.c", @@ -48,7 +46,7 @@ }, "rgblight": { "sleep": true, - "led_count": 1, + "led_count": 1 }, "matrix_pins": { "custom": true, @@ -68,16 +66,7 @@ "GP26", "GP26" ], - "rows": [ - "GP3", - "GP1", - "GP2", - "GP0", - "GP27", - "GP28", - "GP29", - "GP8" - ] + "rows": ["GP3", "GP1", "GP2", "GP0", "GP27", "GP28", "GP29", "GP8"] }, "processor": "RP2040", "url": "", @@ -103,7 +92,6 @@ { "matrix": [0, 3], "x": 10, "y": 0.125 }, { "matrix": [0, 4], "x": 11, "y": 0.25 }, - { "matrix": [5, 10], "x": 0, "y": 1.25 }, { "matrix": [5, 9], "x": 1, "y": 1.125 }, { "matrix": [5, 8], "x": 2, "y": 1 }, @@ -116,7 +104,6 @@ { "matrix": [1, 3], "x": 10, "y": 1.125 }, { "matrix": [1, 4], "x": 11, "y": 1.25 }, - { "matrix": [6, 10], "x": 0, "y": 2.25 }, { "matrix": [6, 9], "x": 1, "y": 2.125 }, { "matrix": [6, 8], "x": 2, "y": 2 }, @@ -129,7 +116,6 @@ { "matrix": [2, 3], "x": 10, "y": 2.125 }, { "matrix": [2, 4], "x": 11, "y": 2.25 }, - { "matrix": [6, 11], "x": 2.5, "y": 3.25 }, { "matrix": [5, 11], "x": 3.5, "y": 3.5 }, { "matrix": [4, 11], "x": 4.5, "y": 3.75 }, diff --git a/keyboards/cheapino/keymaps/musclememory/keymap.c b/keyboards/cheapino/keymaps/musclememory/keymap.c index 5a62af79b566..7dcae34466c2 100644 --- a/keyboards/cheapino/keymaps/musclememory/keymap.c +++ b/keyboards/cheapino/keymaps/musclememory/keymap.c @@ -1,78 +1,98 @@ #include QMK_KEYBOARD_H +/** + * RGBLIGHT CONFIGURATION & STORAGE + * Capture and restore dynamic color from EEPROM. + */ +// Define a custom structure to group HSV values +typedef struct { + uint8_t h; + uint8_t s; + uint8_t v; +} custom_hsv_t; +static custom_hsv_t old_color; + /** * LAYER DEFINITIONS - * Defines internal names for layers to make the code more readable. */ enum layers { _BASE = 0, _L1, _L2, _L3, _L4, _L5, _L6, _L7 }; /** - * - * - * Use LED as visual layer indicator - * + * COLOR DEFINITIONS */ -// Standard RGB keycodes can sometimes conflict with specific hardware drivers. -// These custom enums are used to trigger RGB functions manually via process_record_user. -enum custom_keycodes { - M_RGB_TOG = SAFE_RANGE, // Toggle RGB on/off - M_RGB_MOD, // Cycle through RGB modes - M_RGB_RMOD, // Cycle modes in reverse - M_RGB_HUI, // Increase Hue - M_RGB_HUD, // Decrease Hue - M_RGB_SAI, // Increase Saturation - M_RGB_SAD, // Decrease Saturation - M_RGB_VAI, // Increase Brightness (Value) - M_RGB_VAD // Decrease Brightness (Value) -}; +#define COLOR_AMBER 20, 180, 10 +#define COLOR_MINT 45, 140, 10 +#define COLOR_CYAN 140, 200, 10 +#define COLOR_LAVENDER 210, 130, 15 +#define COLOR_RED 0, 255, 12 +#define COLOR_PINK 230, 170, 10 +#define COLOR_WHITE 0, 0, 10 -// EVENT HANDLER: process_record_user -// Intercepts key presses before they are processed by the system. -// Used here to call rgblight functions directly when custom keycodes are pressed. -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch (keycode) { - case M_RGB_TOG: rgblight_toggle(); return false; - case M_RGB_MOD: rgblight_step(); return false; - case M_RGB_RMOD: rgblight_step_reverse(); return false; - case M_RGB_HUI: rgblight_increase_hue(); return false; - case M_RGB_HUD: rgblight_decrease_hue(); return false; - case M_RGB_SAI: rgblight_increase_sat(); return false; - case M_RGB_SAD: rgblight_decrease_sat(); return false; - case M_RGB_VAI: rgblight_increase_val(); return false; - case M_RGB_VAD: rgblight_decrease_val(); return false; - } - } - return true; +/** + * Initialize RGB color capture + */ +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); } -// LAYER VISUAL FEEDBACK: layer_state_set_user -// Changes the LED color automatically whenever the active layer changes. -// Uses 'noeeprom' versions to prevent unnecessary wear on the flash memory. - -#define COLOR_WHITE 0, 0, 10 // Dim White -#define COLOR_AMBER 20, 180, 10 // Very dim Warm White/Vanilla -#define COLOR_MINT 45, 140, 10 // Warm Olive/Mint (less blue, more gold) -#define COLOR_CYAN 140, 200, 10 // Soft Sky Blue (cooler accent, but dim) -#define COLOR_ICEBLUE 165, 120, 12 // Muted Steel Blue -#define COLOR_LAVENDER 210, 130, 15 // Dusky Rose/Lavender -#define COLOR_RED 0, 255, 12 // Dim Ember Red -#define COLOR_PINK 230, 170, 10 // Deep Sunset Orange (The focus color) - +/** + * LAYER VISUAL FEEDBACK + * Changes RGB color based on active layer + */ layer_state_t layer_state_set_user(layer_state_t state) { switch (get_highest_layer(state)) { - case _L2: rgblight_sethsv_noeeprom(COLOR_RED); break; - case _L3: rgblight_sethsv_noeeprom(COLOR_CYAN); break; - case _L4: rgblight_sethsv_noeeprom(COLOR_LAVENDER); break; - case _L5: rgblight_sethsv_noeeprom(COLOR_AMBER); break; - case _L6: rgblight_sethsv_noeeprom(COLOR_MINT); break; - case _L7: rgblight_sethsv_noeeprom(COLOR_PINK); break; - default: rgblight_sethsv_noeeprom(COLOR_WHITE); break; + case _L2: + rgblight_sethsv_noeeprom(COLOR_RED); + break; + case _L3: + rgblight_sethsv_noeeprom(COLOR_CYAN); + break; + case _L4: + rgblight_sethsv_noeeprom(COLOR_LAVENDER); + break; + case _L5: + rgblight_sethsv_noeeprom(COLOR_AMBER); + break; + case _L6: + rgblight_sethsv_noeeprom(COLOR_MINT); + break; + case _L7: + rgblight_sethsv_noeeprom(COLOR_PINK); + break; + default: + // Restore original color on base layer + rgblight_sethsv_noeeprom(old_color.h, old_color.s, old_color.v); + break; } - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); return state; } +/** + * Capture color changes when on base layer + */ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Update saved color when RGB is adjusted + if (record->event.pressed) { + switch (keycode) { + case RGB_TOG: + case RGB_MOD: + case RGB_RMOD: + case RGB_HUI: + case RGB_HUD: + case RGB_SAI: + case RGB_SAD: + case RGB_VAI: + case RGB_VAD: + old_color.h = rgblight_get_hue(); + old_color.s = rgblight_get_sat(); + old_color.v = rgblight_get_val(); + break; + } + } + return true; +} + /** * * TAP DANCE DEFINITION @@ -185,24 +205,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_L5] = LAYOUT_split_3x5_3( - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_HOME, KC_DEL, KC_INS, KC_END, KC_BSPC, - KC_ESC, KC_INS, KC_DEL, KC_TAB, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, - KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QK_CLEAR_EEPROM, KC_HOME, KC_DEL, KC_INS, KC_END, KC_BSPC, + KC_ESC, KC_INS, KC_DEL, KC_TAB, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, + KC_TRNS, TD(2), KC_TRNS, KC_TRNS, KC_TRNS, TD(1) ), [_L6] = LAYOUT_split_3x5_3( - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - MS_BTN5, MS_BTN1, MS_BTN3, MS_BTN2, MS_BTN4, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT, MS_BTN1, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MS_WHLL, MS_WHLD, MS_WHLU, MS_WHLR, KC_NO, - KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + MS_BTN5, MS_BTN1, MS_BTN3, MS_BTN2, MS_BTN4, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT, MS_BTN1, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MS_WHLL, MS_WHLD, MS_WHLU, MS_WHLR, KC_NO, + KC_TRNS, TD(2), KC_TRNS, KC_TRNS, KC_TRNS, TD(1) ), [_L7] = LAYOUT_split_3x5_3( - KC_NO, KC_NO, M_RGB_VAD, M_RGB_VAI, M_RGB_TOG, KC_TRNS, KC_NO, KC_BRID, KC_BRIU, KC_NO, KC_NO, - KC_NO, KC_NO, M_RGB_HUD, M_RGB_HUI, M_RGB_MOD, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, - KC_NO, KC_NO, M_RGB_SAD, M_RGB_SAI, M_RGB_RMOD, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, - KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + QK_CLEAR_EEPROM, KC_NO, RGB_VAD, RGB_VAI, RGB_TOG, KC_NO, KC_NO, KC_BRID, KC_BRIU, KC_NO, KC_NO, + QK_BOOT, KC_NO, RGB_HUD, RGB_HUI, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, + QK_REBOOT, KC_NO, RGB_SAD, RGB_SAI, KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, + KC_TRNS, TD(2), KC_TRNS, KC_TRNS, KC_TRNS, TD(1) ) }; diff --git a/keyboards/cheapino/keymaps/musclememory/readme.md b/keyboards/cheapino/keymaps/musclememory/readme.md new file mode 100644 index 000000000000..40f94a634997 --- /dev/null +++ b/keyboards/cheapino/keymaps/musclememory/readme.md @@ -0,0 +1,103 @@ +# Cheapino Configuration + +This firmware implements the [Muscle memory friendly home row mods layout](https://blog.getreu.net/20250826-muscle-memory-friendly-home-row-mods/). + +## Compiling and Flashing + +### Using the QMK/QMK repository + +1. **Clone and Setup:** + ```bash + git clone https://github.com/qmk/qmk_firmware.git + cd qmk-qmk + git submodule update --init --recursive + ``` + +2. **Copy Keyboard Folder:** + ```bash + cp -r /path/to/this/keyboards/cheapino qmk-qmk/keyboards/ + ``` + +3. **Compile:** + ```bash + qmk compile -kb cheapino -km musclememory + ``` + +4. **Flash to Cheapino (RP2040):** + * **Method 1 (Physical Button):** Hold the right button on the RP2040 controller while + plugging in the USB cable. + * **Method 2 (Keycode):** Press the `QK_BOOT` combination (**Q+W+E+T** or **Y+I+O+P**). + * Drag and drop the `.uf2` file onto the `RPI-RP2` drive. + + +### Using the Vial/QMK repository + +Alternatively, you can use the Vial/QMK repository to compile and flash. + +1. **Clone and Setup:** + ```bash + git clone https://github.com/vial-kb/vial-qmk + cd vial-qmk + git submodule update --init --recursive + ``` + +2. **Copy Keyboard Folder:** + ```bash + cp -r /path/to/this/keyboards/cheapino vial-qmk/keyboards/ + ``` + +3. **Compile:** + ```bash + make cheapino:musclememory + ``` + +### Using the QMK/QMK repository + +## Clearing EEPROM + +Clearing the EEPROM resets all persistent settings (RGB configurations, Vial keymaps, tap dances, and combos) to the firmware defaults. + +In this firmware, the clear function is hard-mapped to specific keys to enable a reset without the GUI: + +1. **Keycode Position:** + * **Layer 7:** The top-left key (corresponds to `Q` on the base layer). + * **Layer 5:** The **Rotary Encoder Press** (the physical button between the halves). +2. **Accessing the Layer:** + * **Layer 7:** Via a thumb combo: `Space + Enter`, `V + Space`, or `M + Enter`. + * **Layer 5:** Hold the **Backspace** thumb key on the right half. +3. **Triggering the Reset:** + * **Via Layer 7:** Hold the Layer 7 combo and tap **Q**. + * **Via Layer 5:** Hold the **Backspace** key and press the **Rotary Encoder** down. +4. **Verification:** + The device will **not** reboot automatically. To confirm that the reset was successful, watch for the RGB underglow to return to the default color **bright red**. + + + +## RGB Lighting & Layer Feedback + +The underglow changes color based on the active layer: + +| Layer | Color | Purpose | +|-------|-------|-------| +| Base (_L0) | Custom | Main layer (restores the last saved color) | +| L1 | (inherit) | Reserved / Unused | +| L2 | Red | Numpad Layer | +| L3 | Cyan | Numbers & Navigation | +| L4 | Lavender | Function keys (F1-F24) | +| L5 | Amber | Navigation & Editing | +| L6 | Mint | Mouse control | +| L7 | Pink | RGB & Media control | + +If whished for, the led can be switched off for all layers(`RGB_TOG`, layer 7), +or for the base layer only (`RGB_VAD`, layer 7). + + +## Troubleshooting + +* **Firmware too large:** Activate `LTO_ENABLE = yes` in the `rules.mk`. + + +## Credits + +* **Original musclememory keymap:** Custom home-row-mods layout Jens Getreu. +* **Cheapino keyboard:** Thomas Haukland (@tompi). diff --git a/keyboards/cheapino/matrix.c b/keyboards/cheapino/matrix.c index 9a3194827b37..764e0877762a 100644 --- a/keyboards/cheapino/matrix.c +++ b/keyboards/cheapino/matrix.c @@ -114,7 +114,7 @@ void matrix_init_custom(void) { // initialize key pins unselect_cols(); unselect_rows(); - debounce_init(); + debounce_init(MATRIX_ROWS); } void store_old_matrix(matrix_row_t current_matrix[]) { @@ -145,4 +145,3 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { return has_matrix_changed(current_matrix); } - From dda3137bf47d65bedb2462335614451291dc0b56 Mon Sep 17 00:00:00 2001 From: Jens Getreu Date: Thu, 12 Mar 2026 08:54:49 +0200 Subject: [PATCH 1204/1205] Place reboot on knob layer 5 --- keyboards/cheapino/keymaps/musclememory/keymap.c | 2 +- keyboards/cheapino/keymaps/musclememory/readme.md | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/keyboards/cheapino/keymaps/musclememory/keymap.c b/keyboards/cheapino/keymaps/musclememory/keymap.c index 7dcae34466c2..9c209e6b05ce 100644 --- a/keyboards/cheapino/keymaps/musclememory/keymap.c +++ b/keyboards/cheapino/keymaps/musclememory/keymap.c @@ -198,7 +198,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_L4] = LAYOUT_split_3x5_3( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, QK_REBOOT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, LSFT_T(KC_F11), RALT_T(KC_F12), KC_F13, LCTL_T(KC_F14), LALT_T(KC_F15), LALT_T(KC_F16), RCTL_T(KC_F17), KC_F18, RALT_T(KC_F19), RSFT_T(KC_F20), KC_F21, KC_F22, KC_F23, RGUI_T(KC_F24), KC_NO, KC_NO, RGUI_T(KC_NO), KC_NO, KC_NO, KC_NO, KC_TRNS, LT(_L6, KC_NO), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS diff --git a/keyboards/cheapino/keymaps/musclememory/readme.md b/keyboards/cheapino/keymaps/musclememory/readme.md index 40f94a634997..e7d8fbc00956 100644 --- a/keyboards/cheapino/keymaps/musclememory/readme.md +++ b/keyboards/cheapino/keymaps/musclememory/readme.md @@ -26,7 +26,7 @@ This firmware implements the [Muscle memory friendly home row mods layout](https 4. **Flash to Cheapino (RP2040):** * **Method 1 (Physical Button):** Hold the right button on the RP2040 controller while plugging in the USB cable. - * **Method 2 (Keycode):** Press the `QK_BOOT` combination (**Q+W+E+T** or **Y+I+O+P**). + * **Method 2 (Keycode):** Hold the middle thumb key on the left side and press the rotary knob. * Drag and drop the `.uf2` file onto the `RPI-RP2` drive. @@ -60,17 +60,13 @@ Clearing the EEPROM resets all persistent settings (RGB configurations, Vial key In this firmware, the clear function is hard-mapped to specific keys to enable a reset without the GUI: 1. **Keycode Position:** - * **Layer 7:** The top-left key (corresponds to `Q` on the base layer). - * **Layer 5:** The **Rotary Encoder Press** (the physical button between the halves). + * **Layer 5:** The **Rotary Encoder Press** (the physical button between the halves). 2. **Accessing the Layer:** - * **Layer 7:** Via a thumb combo: `Space + Enter`, `V + Space`, or `M + Enter`. - * **Layer 5:** Hold the **Backspace** thumb key on the right half. + * **Layer 5:** Hold the **Backspace** thumb key on the right half. 3. **Triggering the Reset:** - * **Via Layer 7:** Hold the Layer 7 combo and tap **Q**. - * **Via Layer 5:** Hold the **Backspace** key and press the **Rotary Encoder** down. + * **Via Layer 5:** Hold the **Backspace** key and press the **Rotary Encoder** down. 4. **Verification:** - The device will **not** reboot automatically. To confirm that the reset was successful, watch for the RGB underglow to return to the default color **bright red**. - + The device will not automatically reboot. To confirm that the reset was successful, watch for the RGB underglow to return to the default color **a bright red**. ## RGB Lighting & Layer Feedback From dc81f8ba3613024e3b2280e075850c7d564dfd30 Mon Sep 17 00:00:00 2001 From: Jens Getreu Date: Thu, 19 Mar 2026 09:14:30 +0200 Subject: [PATCH 1205/1205] Add Vial config --- keyboards/cheapino/keymaps/vial/config.h | 18 ++ keyboards/cheapino/keymaps/vial/keymap.c | 269 ++++++++++++++++++++++ keyboards/cheapino/keymaps/vial/readme.md | 82 +++++++ keyboards/cheapino/keymaps/vial/rules.mk | 2 + keyboards/cheapino/keymaps/vial/vial.json | 91 ++++++++ 5 files changed, 462 insertions(+) create mode 100644 keyboards/cheapino/keymaps/vial/config.h create mode 100644 keyboards/cheapino/keymaps/vial/keymap.c create mode 100644 keyboards/cheapino/keymaps/vial/readme.md create mode 100644 keyboards/cheapino/keymaps/vial/rules.mk create mode 100644 keyboards/cheapino/keymaps/vial/vial.json diff --git a/keyboards/cheapino/keymaps/vial/config.h b/keyboards/cheapino/keymaps/vial/config.h new file mode 100644 index 000000000000..83cf46554b83 --- /dev/null +++ b/keyboards/cheapino/keymaps/vial/config.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x23, 0x5D, 0x98, 0xDE, 0xFB, 0x35, 0xDC, 0x47} + +#define VIAL_COMBO_ENABLE +#define VIAL_TAP_DANCE_ENABLE + +#define VIAL_UNLOCK_COMBO_ROWS { 4, 0 } +#define VIAL_UNLOCK_COMBO_COLS { 10, 4 } + +// Vial tap dance and combo support +#define VIAL_TAP_DANCE_ENTRIES 6 +#define VIAL_COMBO_ENTRIES 12 + +// Support 8 layers (BASE through L7) +#define DYNAMIC_KEYMAP_LAYER_COUNT 12 diff --git a/keyboards/cheapino/keymaps/vial/keymap.c b/keyboards/cheapino/keymaps/vial/keymap.c new file mode 100644 index 000000000000..081e42672e19 --- /dev/null +++ b/keyboards/cheapino/keymaps/vial/keymap.c @@ -0,0 +1,269 @@ +// Copyright 2024 (@getreu) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#ifdef VIAL_COMBO_ENABLE +#include "vial.h" +#include "dynamic_keymap.h" +#endif + +#ifdef VIAL_TAP_DANCE_ENABLE +#include "vial.h" +#include "dynamic_keymap.h" +#endif + +/** + * VIAL-OPTIMIZED KEYMAP FOR CHEAPINO + * + * This is a Vial-friendly version based on the musclememory keymap. + * Tap dance and combos are configured via Vial's dynamic system. + * Default values are loaded on EEPROM reset via eeconfig_init_user(). + */ + +/** + * RGBLIGHT CONFIGURATION & STORAGE + * Capture and restore dynamic color from EEPROM. + */ +// Define a custom structure to group HSV values +typedef struct { + uint8_t h; + uint8_t s; + uint8_t v; +} custom_hsv_t; +static custom_hsv_t old_color; + +/** + * LAYER DEFINITIONS + */ +enum layers { _BASE = 0, _L1, _L2, _L3, _L4, _L5, _L6, _L7 }; + +/** + * COLOR DEFINITIONS + */ +#define COLOR_AMBER 20, 180, 10 +#define COLOR_MINT 45, 140, 10 +#define COLOR_CYAN 140, 200, 10 +#define COLOR_LAVENDER 210, 130, 15 +#define COLOR_RED 0, 255, 12 +#define COLOR_PINK 230, 170, 10 +#define COLOR_WHITE 0, 0, 10 + +/** + * Initialize RGB color capture + */ +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); +} + +/** + * LAYER VISUAL FEEDBACK + * Changes RGB color based on active layer + */ +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _L2: + rgblight_sethsv_noeeprom(COLOR_RED); + break; + case _L3: + rgblight_sethsv_noeeprom(COLOR_CYAN); + break; + case _L4: + rgblight_sethsv_noeeprom(COLOR_LAVENDER); + break; + case _L5: + rgblight_sethsv_noeeprom(COLOR_AMBER); + break; + case _L6: + rgblight_sethsv_noeeprom(COLOR_MINT); + break; + case _L7: + rgblight_sethsv_noeeprom(COLOR_PINK); + break; + default: + // Restore original color on base layer + rgblight_sethsv_noeeprom(old_color.h, old_color.s, old_color.v); + break; + } + return state; +} + +/** + * Capture color changes when on base layer + */ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Update saved color when RGB is adjusted + if (record->event.pressed) { + switch (keycode) { + case RGB_TOG: + case RGB_MOD: + case RGB_RMOD: + case RGB_HUI: + case RGB_HUD: + case RGB_SAI: + case RGB_SAD: + case RGB_VAI: + case RGB_VAD: + old_color.h = rgblight_get_hue(); + old_color.s = rgblight_get_sat(); + old_color.v = rgblight_get_val(); + break; + } + } + return true; +} + +/** + * EEPROM INITIALIZATION - Set Default Combos and Tap Dances + * This runs when EEPROM is reset (first flash or reset command) + * + * Pattern: Set up defaults just like in musclememory, but using Vial's dynamic system. + * Combos and tap dances will be stored in EEPROM and can be reconfigured via Vial GUI. + */ +/** + * EEPROM INITIALIZATION - Full Vial & RGB Integration + * This runs when EEPROM is reset to load your screenshot defaults. + */ +#if defined(VIAL_COMBO_ENABLE) || defined(VIAL_TAP_DANCE_ENABLE) +void eeconfig_init_user(void) { + +#ifdef VIAL_COMBO_ENABLE + // 2. Load Dynamic Combos (These write to EEPROM) + vial_combo_entry_t combo = {0}; + + // Combo 0: Space + Enter -> Layer 7 + combo.input[0] = LGUI_T(KC_SPC); + combo.input[1] = LGUI_T(KC_ENT); + combo.output = MO(_L7); + dynamic_keymap_set_combo(0, &combo); + + // Combo 1: V + Space -> Layer 7 + combo.input[0] = RGUI_T(KC_V); + combo.input[1] = LGUI_T(KC_SPC); + combo.output = MO(_L7); + dynamic_keymap_set_combo(1, &combo); + + // Combo 2: M + Enter -> Layer 7 + combo.input[0] = RGUI_T(KC_M); + combo.input[1] = LGUI_T(KC_ENT); + combo.output = MO(_L7); + dynamic_keymap_set_combo(2, &combo); + + // Combo 3: ESC + Backspace -> Toggle Layer 3 + combo.input[0] = LT(_L6, KC_ESC); + combo.input[1] = LT(_L5, KC_BSPC); + combo.output = TG(_L3); + dynamic_keymap_set_combo(3, &combo); + + // Combo 4 & 5: Outer thumbs -> Caps Lock + combo.input[0] = OSL(_L4); combo.input[1] = TD(0); + combo.output = KC_CAPS_LOCK; + dynamic_keymap_set_combo(4, &combo); + + combo.input[0] = OSL(_L4); combo.input[1] = TD(1); + combo.output = KC_CAPS_LOCK; + dynamic_keymap_set_combo(5, &combo); + + // Combo 6: Q+W+E+T -> Bootloader + combo.input[0] = KC_Q; combo.input[1] = KC_W; combo.input[2] = KC_E; combo.input[3] = KC_T; + combo.output = QK_BOOT; + dynamic_keymap_set_combo(6, &combo); + + // Combo 7: Y+I+O+P -> Bootloader + combo.input[0] = KC_Y; combo.input[1] = KC_I; combo.input[2] = KC_O; combo.input[3] = KC_P; + combo.output = QK_BOOT; + dynamic_keymap_set_combo(7, &combo); + +#endif + +#ifdef VIAL_TAP_DANCE_ENABLE + // 4. Load Dynamic Tap Dances + vial_tap_dance_entry_t td = {0}; + + // TD 0: APP / TG(_L2) + td.on_tap = KC_APP; td.on_hold = KC_APP; td.on_double_tap = TG(_L2); + td.custom_tapping_term = 350; + dynamic_keymap_set_tap_dance(0, &td); + + // TD 1: TO(0) / TG(_L2) + td.on_tap = TO(0); td.on_hold = KC_APP; td.on_double_tap = TG(_L2); + td.custom_tapping_term = 350; + dynamic_keymap_set_tap_dance(1, &td); + + // TD 2: TO(0) / MO(_L6) + td.on_tap = TO(0); td.on_hold = MO(_L6); td.on_double_tap = KC_NO; + td.custom_tapping_term = 350; + dynamic_keymap_set_tap_dance(2, &td); +#endif + + // Finalize the sync + vial_init(); +} +#endif + +/** + * KEYMAP DATA + * Layout for each layer + * + * Note: Right outer thumb uses TD(0) - configured in eeconfig_init_user() above + * Combos are also configured in eeconfig_init_user() to match musclememory defaults + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MUTE, KC_Y, KC_U, KC_I, KC_O, KC_P, + LSFT_T(KC_A), RALT_T(KC_S), LT(_L3,KC_D), LCTL_T(KC_F), LALT_T(KC_G), LALT_T(KC_H), RCTL_T(KC_J), LT(_L3,KC_K), RALT_T(KC_L), RSFT_T(KC_SCLN), + KC_Z, KC_X, KC_C, RGUI_T(KC_V), KC_B, KC_N, RGUI_T(KC_M), KC_COMM, KC_DOT, KC_SLSH, + OSL(_L4), LT(_L6,KC_ESC), LGUI_T(KC_SPC), LGUI_T(KC_ENT), LT(_L5,KC_BSPC), TD(0) +), + +[_L1] = LAYOUT_split_3x5_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[_L2] = LAYOUT_split_3x5_3( + KC_U, KC_D, KC_E, KC_F, KC_N, KC_TRNS, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_P0, + KC_PSLS, KC_PAST, LT(_L3,KC_PEQL), KC_TAB, KC_BSPC, KC_NUM, KC_P4, LT(_L3,KC_P5), KC_P6, KC_PENT, + KC_X, KC_A, KC_B, KC_C, LSFT(KC_SCLN), KC_PPLS, KC_P1, KC_P2, KC_P3, KC_PDOT, + KC_TRNS, TD(2), KC_TRNS, KC_TRNS, KC_TRNS, TD(1) +), + +[_L3] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, + LSFT_T(KC_ESC), RALT_T(KC_INS), LT(_L3,KC_DEL), LCTL_T(KC_TAB), LALT_T(KC_BSPC), LALT_T(KC_LEFT), RCTL_T(KC_DOWN), LT(_L3,KC_UP), RALT_T(KC_RGHT), RSFT_T(KC_ENT), + KC_GRV, KC_MINS, KC_EQL, RGUI_T(KC_LBRC), KC_RBRC, KC_BSLS, RGUI_T(KC_QUOT), KC_COMM, KC_DOT, KC_SLSH, + KC_TRNS, TD(2), KC_TRNS, KC_TRNS, KC_TRNS, TD(1) +), + +[_L4] = LAYOUT_split_3x5_3( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, QK_REBOOT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + LSFT_T(KC_F11), RALT_T(KC_F12), KC_F13, LCTL_T(KC_F14), KC_F15, KC_F16, KC_F17, KC_F18, RALT_T(KC_F19), RSFT_T(KC_F20), + KC_F21, KC_F22, KC_F23, RGUI_T(KC_F24), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, TD(2), KC_TRNS, KC_TRNS, KC_TRNS, TD(1) +), + +[_L5] = LAYOUT_split_3x5_3( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QK_CLEAR_EEPROM, KC_HOME, KC_DEL, KC_INS, KC_END, KC_BSPC, + KC_ESC, KC_INS, KC_DEL, KC_TAB, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, + KC_TRNS, TD(2), KC_TRNS, KC_TRNS, KC_TRNS, TD(1) +), + +[_L6] = LAYOUT_split_3x5_3( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + MS_BTN5, MS_BTN1, MS_BTN3, MS_BTN2, MS_BTN4, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT, MS_BTN1, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MS_WHLL, MS_WHLD, MS_WHLU, MS_WHLR, KC_NO, + KC_TRNS, TD(2), KC_TRNS, KC_TRNS, KC_TRNS, TD(1) +), + +[_L7] = LAYOUT_split_3x5_3( + QK_CLEAR_EEPROM, KC_NO, RGB_VAD, RGB_VAI, RGB_TOG, KC_NO, KC_NO, KC_BRID, KC_BRIU, KC_NO, KC_NO, + QK_BOOT, KC_NO, RGB_HUD, RGB_HUI, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, + QK_REBOOT, KC_NO, RGB_SAD, RGB_SAI, KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, + KC_TRNS, TD(2), KC_TRNS, KC_TRNS, KC_TRNS, TD(1) +) +}; diff --git a/keyboards/cheapino/keymaps/vial/readme.md b/keyboards/cheapino/keymaps/vial/readme.md new file mode 100644 index 000000000000..1ca960458d9c --- /dev/null +++ b/keyboards/cheapino/keymaps/vial/readme.md @@ -0,0 +1,82 @@ +# Cheapino Vial Configuration + +This firmware implements the [Muscle-memory-friendly home row mods layout](https://blog.getreu.net/20250826-muscle-memory-friendly-home-row-mods/). All defaults can be customized via [Vial](https://get.vial.today/). + +## Compiling and Flashing + +1. **Clone and Setup:** + ```bash + git clone https://github.com/vial-kb/vial-qmk + cd vial-qmk + git submodule update --init --recursive + ``` + +3. **Compile:** + ```bash + make cheapino:vial + ``` + +4. **Flash to Cheapino (RP2040)**: + * **Method 1 (Physical Button):** Hold the **BOOTSEL button** on the RP2040 controller while + plugging in the USB cable. + * **Method 2 (Keycode):** Hold the middle thumb key on the left side and press the rotary knob. + * Drag and drop the `.uf2` file onto the `RPI-RP2` drive. + + + +## Clearing EEPROM + +Clearing the EEPROM resets all persistent settings (RGB configurations, Vial keymaps, tap dances, and combos) to the firmware defaults. + +In this firmware, the clear function is hard-mapped to specific keys to enable a reset without the GUI: + +1. **Keycode Position:** + * **Layer 5:** The **Rotary Encoder Press** (the physical button between the halves). +2. **Accessing the Layer:** + * **Layer 5:** Hold the **Backspace** thumb key on the right half. +3. **Triggering the Reset:** + * **Via Layer 5:** Hold the **Backspace** key and press the **Rotary Encoder** down. +4. **Verification:** + The device will not automatically reboot. To confirm that the reset was successful, watch for the RGB underglow to return to the default color **a bright red**. + + + +## RGB Lighting & Layer Feedback + +The underglow changes color based on the active layer: + +| Layer | Color | Purpose | +|-------|-------|-------| +| Base (L0) | Custom | Main layer (restores the last saved color) | +| L1 | (inherit) | Reserved / Unused | +| L2 | Red | Numpad Layer | +| L3 | Cyan | Numbers & Navigation | +| L4 | Lavender | Function keys (F1-F24) | +| L5 | Amber | Navigation & Editing | +| L6 | Mint | Mouse control | +| L7 | Pink | RGB & Media control | + +If wished for, the LEDs can be turned off for all layers (`RGB_TOG` on layer 7), +or for the base layer only (`RGB_VAD` on layer 7). + + + + +## Using Vial GUI + +1. **Download:** Download Vial from [get.vial.today](https://get.vial.today/). +2. **Security Unlock:** To change security-relevant settings, you must press the **Security Unlock Combo**: **Q + P** (top-left key + top-right key). +3. **Configuration:** Use the tabs for **Tap Dance** and **Combos** to customize the layout. + + +## Troubleshooting + +* **Not recognized:** Ensure that you compiled with `vial-qmk`. +* **Not saving:** Check if the keyboard was unlocked with **Q + P**. +* **Firmware too large:** Activate `LTO_ENABLE = yes` in the `rules.mk`.\ + The `cheapino` uses an RP2040, which has limited flash memory. + +## Credits + +* **Original muscle-memory keymap:** Custom home-row-mods layout by Jens Getreu. +* **Cheapino keyboard:** Thomas Haukland (@tompi). diff --git a/keyboards/cheapino/keymaps/vial/rules.mk b/keyboards/cheapino/keymaps/vial/rules.mk new file mode 100644 index 000000000000..4f7618e9b211 --- /dev/null +++ b/keyboards/cheapino/keymaps/vial/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/cheapino/keymaps/vial/vial.json b/keyboards/cheapino/keymaps/vial/vial.json new file mode 100644 index 000000000000..62ac6c7c81f9 --- /dev/null +++ b/keyboards/cheapino/keymaps/vial/vial.json @@ -0,0 +1,91 @@ +{ + "version": "musclememory v1.1.1", + "name": "Cheapino", + "lighting": "qmk_rgblight", + "matrix": { + "rows": 8, + "cols": 12 + }, + "layouts": { + "keymap": [ + [ + { "y": 0.25 }, + "4,10", + { "y": -0.125 }, + "4,9", + { "y": -0.125 }, + "4,8", + { "y": 0.125 }, + "4,7", + { "y": 0.125 }, + "4,6", + { "x": 1.25, "y": 0.25, "w": 1, "h": 1 }, + "3,0", + { "x": 1.25, "y": -0.25 }, + "0,0", + { "y": -0.125 }, + "0,1", + { "y": -0.125 }, + "0,2", + { "y": 0.125 }, + "0,3", + { "y": 0.125 }, + "0,4" + ], + [ + { "y": 0.125 }, + "5,10", + { "y": -0.125 }, + "5,9", + { "y": -0.125 }, + "5,8", + { "y": 0.125 }, + "5,7", + { "y": 0.125 }, + "5,6", + { "x": 3.5, "y": -0.125 }, + "1,0", + { "y": -0.125 }, + "1,1", + { "y": -0.125 }, + "1,2", + { "y": 0.125 }, + "1,3", + { "y": 0.125 }, + "1,4" + ], + [ + { "y": 0.125 }, + "6,10", + { "y": -0.125 }, + "6,9", + { "y": -0.125 }, + "6,8", + { "y": 0.125 }, + "6,7", + { "y": 0.125 }, + "6,6", + { "x": 3.5, "y": -0.125 }, + "2,0", + { "y": -0.125 }, + "2,1", + { "y": -0.125 }, + "2,2", + { "y": 0.125 }, + "2,3", + { "y": 0.125 }, + "2,4" + ], + [ + { "x": 3.25, "y": 0.5 }, + "6,11", + "5,11", + "4,11", + { "x": 1.5 }, + "0,5", + "1,5", + "2,5" + ] + ] + } +}