From 9455c6adec9285438ef63d5b0538505da1b0479f Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 6 Sep 2025 17:57:39 +1000 Subject: [PATCH 01/95] Branch point for 2025q4 breaking changes --- readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readme.md b/readme.md index 62aed12066..e5c0d41b7b 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 248d7c1d6d0cc9d5a5403e81e7a59ae6f3ebbea1 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: Sat, 6 Sep 2025 17:04:42 +0800 Subject: [PATCH 02/95] Simplify tap_code16_delay (#25595) * Replaced for-loop with single wait_ms(delay) call * Improve code consistency with tap_code_delay --- quantum/quantum.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 09e5fe1dac..128f8fb66d 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -157,9 +157,7 @@ __attribute__((weak)) void unregister_code16(uint16_t code) { */ __attribute__((weak)) void tap_code16_delay(uint16_t code, uint16_t delay) { register_code16(code); - for (uint16_t i = delay; i > 0; i--) { - wait_ms(1); - } + wait_ms(delay); unregister_code16(code); } From d8ce8cd204313a15a600a9d4d3038f76d267f0b9 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: Sun, 7 Sep 2025 05:43:01 +0800 Subject: [PATCH 03/95] Simplify hue calculation in raindrops animation (#25587) --- quantum/rgb_matrix/animations/raindrops_anim.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/quantum/rgb_matrix/animations/raindrops_anim.h b/quantum/rgb_matrix/animations/raindrops_anim.h index d4f79adb56..f3656a5c0d 100644 --- a/quantum/rgb_matrix/animations/raindrops_anim.h +++ b/quantum/rgb_matrix/animations/raindrops_anim.h @@ -7,14 +7,9 @@ static void raindrops_set_color(uint8_t i, effect_params_t* params) { hsv_t hsv = rgb_matrix_config.hsv; // Take the shortest path between hues - int16_t deltaH = ((hsv.h + 180) % 360 - hsv.h) / 4; - if (deltaH > 127) { - deltaH -= 256; - } else if (deltaH < -127) { - deltaH += 256; - } - + int8_t deltaH = (int8_t)((hsv.h + 128) - hsv.h) / 4; hsv.h += (deltaH * random8_max(3)); + rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } From 19527e8399184c8496400f4b8f3d79af8a847c36 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 6 Sep 2025 22:48:07 +0100 Subject: [PATCH 04/95] Remove duplication of RP2040 config defaults (#25563) --- keyboards/an_achronism/tetromino/config.h | 31 ------------------- keyboards/archetype/minervalx/config.h | 4 +-- keyboards/boardsource/equals/48/config.h | 3 -- keyboards/boardsource/equals/60/config.h | 3 -- keyboards/boardsource/lulu/rp2040/config.h | 4 +-- keyboards/boardsource/unicorne/config.h | 2 -- keyboards/cannonkeys/ortho48v2/config.h | 3 -- keyboards/cannonkeys/ortho60v2/config.h | 3 -- keyboards/chew/mono/config.h | 8 ----- keyboards/chew/split/config.h | 8 ----- keyboards/cornia/config.h | 3 -- keyboards/fruitykeeb/fruitbar/r2/config.h | 3 -- keyboards/gl516/xr63gl/config.h | 1 - keyboards/handwired/alcor_dactyl/config.h | 20 ------------ .../dactyl_manuform_pi_pico/config.h | 3 +- keyboards/silakka54/config.h | 1 - 16 files changed, 4 insertions(+), 96 deletions(-) delete mode 100644 keyboards/an_achronism/tetromino/config.h delete mode 100644 keyboards/chew/mono/config.h delete mode 100644 keyboards/chew/split/config.h diff --git a/keyboards/an_achronism/tetromino/config.h b/keyboards/an_achronism/tetromino/config.h deleted file mode 100644 index c7087edb88..0000000000 --- a/keyboards/an_achronism/tetromino/config.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2022 an_achronism (@an-achronism) - -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 - -/* 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/archetype/minervalx/config.h b/keyboards/archetype/minervalx/config.h index 3b5eb8e56a..5c99920073 100644 --- a/keyboards/archetype/minervalx/config.h +++ b/keyboards/archetype/minervalx/config.h @@ -16,7 +16,5 @@ #pragma once -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET - #define BACKLIGHT_PWM_DRIVER PWMD5 -#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A \ No newline at end of file +#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A diff --git a/keyboards/boardsource/equals/48/config.h b/keyboards/boardsource/equals/48/config.h index 39d114872f..7132189cdd 100644 --- a/keyboards/boardsource/equals/48/config.h +++ b/keyboards/boardsource/equals/48/config.h @@ -2,9 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U - #define AUDIO_PIN GP29 #define AUDIO_PWM_DRIVER PWMD6 #define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_B diff --git a/keyboards/boardsource/equals/60/config.h b/keyboards/boardsource/equals/60/config.h index 39d114872f..7132189cdd 100644 --- a/keyboards/boardsource/equals/60/config.h +++ b/keyboards/boardsource/equals/60/config.h @@ -2,9 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U - #define AUDIO_PIN GP29 #define AUDIO_PWM_DRIVER PWMD6 #define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_B diff --git a/keyboards/boardsource/lulu/rp2040/config.h b/keyboards/boardsource/lulu/rp2040/config.h index 2c86e48e6f..5a43521918 100644 --- a/keyboards/boardsource/lulu/rp2040/config.h +++ b/keyboards/boardsource/lulu/rp2040/config.h @@ -1,11 +1,11 @@ // Copyright 2022 jack (@waffle87) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U + #define SERIAL_USART_FULL_DUPLEX #define SERIAL_USART_TX_PIN GP0 #define SERIAL_USART_RX_PIN GP1 + #define I2C_DRIVER I2CD1 #define I2C1_SDA_PIN GP22 #define I2C1_SCL_PIN GP23 diff --git a/keyboards/boardsource/unicorne/config.h b/keyboards/boardsource/unicorne/config.h index e79c00f14d..843d377cbe 100644 --- a/keyboards/boardsource/unicorne/config.h +++ b/keyboards/boardsource/unicorne/config.h @@ -2,8 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET - #define I2C_DRIVER I2CD1 #define I2C1_SDA_PIN GP22 #define I2C1_SCL_PIN GP23 diff --git a/keyboards/cannonkeys/ortho48v2/config.h b/keyboards/cannonkeys/ortho48v2/config.h index 2af75a1715..18edaab2ab 100644 --- a/keyboards/cannonkeys/ortho48v2/config.h +++ b/keyboards/cannonkeys/ortho48v2/config.h @@ -16,8 +16,5 @@ along with this program. If not, see . */ #pragma once -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // Timeout window in ms in which the double tap can occur. - #define BACKLIGHT_PWM_DRIVER PWMD6 #define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A diff --git a/keyboards/cannonkeys/ortho60v2/config.h b/keyboards/cannonkeys/ortho60v2/config.h index 2af75a1715..18edaab2ab 100644 --- a/keyboards/cannonkeys/ortho60v2/config.h +++ b/keyboards/cannonkeys/ortho60v2/config.h @@ -16,8 +16,5 @@ along with this program. If not, see . */ #pragma once -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // Timeout window in ms in which the double tap can occur. - #define BACKLIGHT_PWM_DRIVER PWMD6 #define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A diff --git a/keyboards/chew/mono/config.h b/keyboards/chew/mono/config.h deleted file mode 100644 index bb047c0adf..0000000000 --- a/keyboards/chew/mono/config.h +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2024 Florent (@FLinguenheld) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -/* Flash */ -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // In ms in which the double tap can occur diff --git a/keyboards/chew/split/config.h b/keyboards/chew/split/config.h deleted file mode 100644 index bb047c0adf..0000000000 --- a/keyboards/chew/split/config.h +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2024 Florent (@FLinguenheld) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -/* Flash */ -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // In ms in which the double tap can occur diff --git a/keyboards/cornia/config.h b/keyboards/cornia/config.h index dbf7031b62..8aff7e6336 100644 --- a/keyboards/cornia/config.h +++ b/keyboards/cornia/config.h @@ -25,6 +25,3 @@ #define I2C_DRIVER I2CD1 #define I2C1_SDA_PIN GP10 #define I2C1_SCL_PIN GP11 - -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // Timeout window in ms in which the double tap can occur. \ No newline at end of file diff --git a/keyboards/fruitykeeb/fruitbar/r2/config.h b/keyboards/fruitykeeb/fruitbar/r2/config.h index 320889eb91..c1f6f883a6 100644 --- a/keyboards/fruitykeeb/fruitbar/r2/config.h +++ b/keyboards/fruitykeeb/fruitbar/r2/config.h @@ -19,6 +19,3 @@ along with this program. If not, see . #define I2C_DRIVER I2CD1 #define I2C1_SCL_PIN GP27 #define I2C1_SDA_PIN GP26 - -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U diff --git a/keyboards/gl516/xr63gl/config.h b/keyboards/gl516/xr63gl/config.h index 928fde7d86..d0af2e5b1d 100644 --- a/keyboards/gl516/xr63gl/config.h +++ b/keyboards/gl516/xr63gl/config.h @@ -23,4 +23,3 @@ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED_MASK 0U diff --git a/keyboards/handwired/alcor_dactyl/config.h b/keyboards/handwired/alcor_dactyl/config.h index 42c45acdbf..3da8cebf4d 100644 --- a/keyboards/handwired/alcor_dactyl/config.h +++ b/keyboards/handwired/alcor_dactyl/config.h @@ -3,26 +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 RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U - #define SERIAL_USART_FULL_DUPLEX #define SERIAL_USART_TX_PIN GP10 #define SERIAL_USART_RX_PIN GP9 diff --git a/keyboards/handwired/dactyl_manuform_pi_pico/config.h b/keyboards/handwired/dactyl_manuform_pi_pico/config.h index c622149a4a..9b5e919b1b 100644 --- a/keyboards/handwired/dactyl_manuform_pi_pico/config.h +++ b/keyboards/handwired/dactyl_manuform_pi_pico/config.h @@ -2,8 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U + #define SERIAL_USART_FULL_DUPLEX #define SERIAL_USART_TX_PIN GP9 #define SERIAL_USART_RX_PIN GP8 diff --git a/keyboards/silakka54/config.h b/keyboards/silakka54/config.h index 220b85cd08..b3d1742042 100644 --- a/keyboards/silakka54/config.h +++ b/keyboards/silakka54/config.h @@ -21,5 +21,4 @@ #define SERIAL_USART_RX_PIN GP1 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 From bcc546aa3f32ad68ed0e1ae9ebd3013c6d5399b7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 7 Sep 2025 22:05:34 +1000 Subject: [PATCH 05/95] Update USBaspLoader ISP instructions (#25590) --- docs/isp_flashing_guide.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md index 6f3f0a8f7d..1eaec3b59d 100644 --- a/docs/isp_flashing_guide.md +++ b/docs/isp_flashing_guide.md @@ -220,14 +220,18 @@ This bootloader is primarily for keyboards originally designed for the PS2AVRGB USBaspLoader is a bootloader based on V-USB that emulates a hardware USBasp device. It runs on ATmega32A and ATmega328P MCUs. -Precompiled `.hex` files are generally not available, but you can compile it yourself by setting up the QMK environment and following Coseyfannitutti's guide for the appropriate MCU: +Precompiled `.hex` files are generally not available, but you can compile it yourself by setting up the QMK environment and cloning the appropriate branch of Coseyfannitutti's USBaspLoader fork: -|MCU |Low |High |Extended|USB ID | -|-------------------------------------------------------------------------------------|------|------|--------|-----------| -|[ATmega32A](https://github.com/coseyfannitutti/discipline/tree/master/doc/bootloader)|`0x1F`|`0xC0`|*n/a* |`16C0:05DC`| -|[ATmega328P](https://github.com/coseyfannitutti/discipad/tree/master/doc/bootloader) |`0xD7`|`0xD0`|`0x04` |`16C0:05DC`| +|MCU |Low |High |Extended|USB ID | +|-----------------------------------------------------------------------------|------|------|--------|-----------| +|[ATmega32A](https://github.com/coseyfannitutti/USBaspLoader/tree/atmega32a) |`0x1F`|`0xC0`|*n/a* |`16C0:05DC`| +|[ATmega328P](https://github.com/coseyfannitutti/USBaspLoader/tree/atmega328p)|`0xD7`|`0xD0`|`0x04` |`16C0:05DC`| -Note that some boards may have their own specialized build of this bootloader in a separate repository. This will usually be linked to in the board's readme. +From there, simply `cd` to the `firmware/` directory and run `make`, which should produce a file called `main.hex`. + +:::tip +Some boards may have their own specialized build of this bootloader in a separate repository. This will usually be linked to in the board's readme. +::: ## Flashing the Bootloader From 4bd5c033c3135576010baded53c44720d8030d32 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: Sun, 7 Sep 2025 20:34:05 +0800 Subject: [PATCH 06/95] Refactor debounce algorithm with static allocation (#25515) * Refactor debounce counters with direct indexing * Refactor code to use array indexing for debounce_counters * Use global MATRIX_ROW_SHIFTER macro * Refactor debounce algorithm with static allocation * Converted arrays to static allocation * Standardised use of MATRIX_ROWS_PER_HAND for array sizing * Added Doxygen comments for primary debounce functions * Removed debounce_free() * Rewrite sym_defer_pr * Modernise code using sym_defer_pk as template * Format consistency with other current algorithms * Use shorter SPDX-License-Identifier * Remove ChibiOS core memory manager guard * Keep type definition within DEBOUNCE guard * Add change log * Minor optimisation refactor * Pre-calculate row_offset in per-key matrix loops * Add inline compiler hints * Improve readability with blank lines * Limit elapsed time to the maximum debounce value * Apply suggestions from code review Declare counters with "DEBOUNCE_ELAPSED" Co-authored-by: Joel Challis * Update change log to new breaking change date --------- Co-authored-by: Joel Challis --- docs/ChangeLog/20251130/PR25515.md | 3 + quantum/debounce.h | 2 - quantum/debounce/asym_eager_defer_pk.c | 163 ++++++++---------- quantum/debounce/none.c | 2 - quantum/debounce/sym_defer_g.c | 31 +--- quantum/debounce/sym_defer_pk.c | 149 ++++++++-------- quantum/debounce/sym_defer_pr.c | 148 ++++++++++------ quantum/debounce/sym_eager_pk.c | 125 +++++++------- quantum/debounce/sym_eager_pr.c | 136 +++++++-------- .../debounce/tests/debounce_test_common.cpp | 2 - 10 files changed, 369 insertions(+), 392 deletions(-) create mode 100644 docs/ChangeLog/20251130/PR25515.md diff --git a/docs/ChangeLog/20251130/PR25515.md b/docs/ChangeLog/20251130/PR25515.md new file mode 100644 index 0000000000..ccc88e0c64 --- /dev/null +++ b/docs/ChangeLog/20251130/PR25515.md @@ -0,0 +1,3 @@ +# 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/quantum/debounce.h b/quantum/debounce.h index cea1f2b526..30d2621d18 100644 --- a/quantum/debounce.h +++ b/quantum/debounce.h @@ -17,5 +17,3 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed); void debounce_init(uint8_t num_rows); - -void debounce_free(void); diff --git a/quantum/debounce/asym_eager_defer_pk.c b/quantum/debounce/asym_eager_defer_pk.c index b6fcdc3d4e..a385301c90 100644 --- a/quantum/debounce/asym_eager_defer_pk.c +++ b/quantum/debounce/asym_eager_defer_pk.c @@ -1,37 +1,15 @@ -/* - * Copyright 2017 Alex Ong - * Copyright 2020 Andrei Purdea - * Copyright 2021 Simon Arlott - * - * 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 . - */ - -/* -Asymetric per-key algorithm. After pressing a key, it immediately changes state, -with no further inputs accepted until DEBOUNCE milliseconds have occurred. After -releasing a key, that state is pushed after no changes occur for DEBOUNCE milliseconds. -*/ +// Copyright 2017 Alex Ong +// Copyright 2020 Andrei Purdea +// Copyright 2021 Simon Arlott +// SPDX-License-Identifier: GPL-2.0-or-later +// +// Asymetric per-key algorithm. After pressing a key, it immediately changes state, +// with no further inputs accepted until DEBOUNCE milliseconds have occurred. After +// releasing a key, that state is pushed after no changes occur for DEBOUNCE milliseconds. #include "debounce.h" #include "timer.h" -#include - -#ifdef PROTOCOL_CHIBIOS -# if CH_CFG_USE_MEMCORE == FALSE -# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm. -# endif -#endif +#include "util.h" #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -43,44 +21,29 @@ releasing a key, that state is pushed after no changes occur for DEBOUNCE millis # define DEBOUNCE 127 #endif -#define ROW_SHIFTER ((matrix_row_t)1) +#define DEBOUNCE_ELAPSED 0 +#if DEBOUNCE > 0 typedef struct { bool pressed : 1; uint8_t time : 7; } debounce_counter_t; -#if DEBOUNCE > 0 -static debounce_counter_t *debounce_counters; -static fast_timer_t last_time; -static bool counters_need_update; -static bool matrix_need_update; -static bool cooked_changed; +// Uses MATRIX_ROWS_PER_HAND instead of MATRIX_ROWS to support split keyboards +static debounce_counter_t debounce_counters[MATRIX_ROWS_PER_HAND * MATRIX_COLS] = {DEBOUNCE_ELAPSED}; +static bool counters_need_update; +static bool matrix_need_update; +static bool cooked_changed; -# define DEBOUNCE_ELAPSED 0 +static inline void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t elapsed_time); +static inline void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[]); -static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time); -static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); - -// we use num_rows rather than MATRIX_ROWS to support split keyboards -void debounce_init(uint8_t num_rows) { - debounce_counters = malloc(num_rows * MATRIX_COLS * sizeof(debounce_counter_t)); - int i = 0; - for (uint8_t r = 0; r < num_rows; r++) { - for (uint8_t c = 0; c < MATRIX_COLS; c++) { - debounce_counters[i++].time = DEBOUNCE_ELAPSED; - } - } -} - -void debounce_free(void) { - free(debounce_counters); - debounce_counters = NULL; -} +void debounce_init(uint8_t num_rows) {} bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - bool updated_last = false; - cooked_changed = false; + static fast_timer_t last_time; + bool updated_last = false; + cooked_changed = false; if (counters_need_update) { fast_timer_t now = timer_read_fast(); @@ -88,12 +51,10 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool last_time = now; updated_last = true; - if (elapsed_time > UINT8_MAX) { - elapsed_time = UINT8_MAX; - } if (elapsed_time > 0) { - update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, elapsed_time); + // Update debounce counters with elapsed timer clamped to 127 (maximum debounce) + update_debounce_counters_and_transfer_if_expired(raw, cooked, MIN(elapsed_time, 127)); } } @@ -102,74 +63,96 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool last_time = timer_read_fast(); } - transfer_matrix_values(raw, cooked, num_rows); + transfer_matrix_values(raw, cooked); } return cooked_changed; } -static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time) { - debounce_counter_t *debounce_pointer = debounce_counters; - +/** + * @brief Processes per-key debounce counters and updates the debounced matrix state. + * + * This function iterates through each key in the matrix and updates its debounce counter + * based on the elapsed time. If the debounce period has expired, the debounced state is + * updated accordingly for key-down (eager) and key-up (defer) events. + * + * @param raw The current raw key state matrix. + * @param cooked The debounced key state matrix to be updated. + * @param elapsed_time The time elapsed since the last debounce update, in milliseconds. + */ +static inline void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t elapsed_time) { counters_need_update = false; matrix_need_update = false; - for (uint8_t row = 0; row < num_rows; row++) { + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { + uint16_t row_offset = row * MATRIX_COLS; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { - matrix_row_t col_mask = (ROW_SHIFTER << col); + uint16_t index = row_offset + col; - if (debounce_pointer->time != DEBOUNCE_ELAPSED) { - if (debounce_pointer->time <= elapsed_time) { - debounce_pointer->time = DEBOUNCE_ELAPSED; + if (debounce_counters[index].time != DEBOUNCE_ELAPSED) { + if (debounce_counters[index].time <= elapsed_time) { + debounce_counters[index].time = DEBOUNCE_ELAPSED; - if (debounce_pointer->pressed) { + if (debounce_counters[index].pressed) { // key-down: eager matrix_need_update = true; } else { // key-up: defer + matrix_row_t col_mask = (MATRIX_ROW_SHIFTER << col); matrix_row_t cooked_next = (cooked[row] & ~col_mask) | (raw[row] & col_mask); cooked_changed |= cooked_next ^ cooked[row]; cooked[row] = cooked_next; } } else { - debounce_pointer->time -= elapsed_time; + debounce_counters[index].time -= elapsed_time; counters_need_update = true; } } - debounce_pointer++; } } } -static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) { - debounce_counter_t *debounce_pointer = debounce_counters; - +/** + * @brief Applies debounced changes to the matrix state based on per-key counters. + * + * This function compares the raw and cooked key state matrices to detect changes. + * For each key, it updates the debounce counter and the debounced state according + * to the debounce algorithm. Key-down events are handled eagerly, while key-up + * events are deferred until the debounce period has elapsed. + * + * @param raw The current raw key state matrix. + * @param cooked The debounced key state matrix to be updated. + */ +static inline void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[]) { matrix_need_update = false; - for (uint8_t row = 0; row < num_rows; row++) { - matrix_row_t delta = raw[row] ^ cooked[row]; + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { + uint16_t row_offset = row * MATRIX_COLS; + matrix_row_t delta = raw[row] ^ cooked[row]; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { - matrix_row_t col_mask = (ROW_SHIFTER << col); + uint16_t index = row_offset + col; + matrix_row_t col_mask = (MATRIX_ROW_SHIFTER << col); if (delta & col_mask) { - if (debounce_pointer->time == DEBOUNCE_ELAPSED) { - debounce_pointer->pressed = (raw[row] & col_mask); - debounce_pointer->time = DEBOUNCE; - counters_need_update = true; + if (debounce_counters[index].time == DEBOUNCE_ELAPSED) { + debounce_counters[index].pressed = (raw[row] & col_mask); + debounce_counters[index].time = DEBOUNCE; + counters_need_update = true; - if (debounce_pointer->pressed) { + if (debounce_counters[index].pressed) { // key-down: eager cooked[row] ^= col_mask; cooked_changed = true; } } - } else if (debounce_pointer->time != DEBOUNCE_ELAPSED) { - if (!debounce_pointer->pressed) { + } else if (debounce_counters[index].time != DEBOUNCE_ELAPSED) { + if (!debounce_counters[index].pressed) { // key-up: defer - debounce_pointer->time = DEBOUNCE_ELAPSED; + debounce_counters[index].time = DEBOUNCE_ELAPSED; } } - debounce_pointer++; } } } diff --git a/quantum/debounce/none.c b/quantum/debounce/none.c index 0a8ccfc4ee..0111dd6e31 100644 --- a/quantum/debounce/none.c +++ b/quantum/debounce/none.c @@ -32,5 +32,3 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool return cooked_changed; } - -void debounce_free(void) {} diff --git a/quantum/debounce/sym_defer_g.c b/quantum/debounce/sym_defer_g.c index d96758fab3..81f351c126 100644 --- a/quantum/debounce/sym_defer_g.c +++ b/quantum/debounce/sym_defer_g.c @@ -1,22 +1,10 @@ -/* -Copyright 2017 Alex Ong -Copyright 2021 Simon Arlott -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 2017 Alex Ong +// Copyright 2021 Simon Arlott +// SPDX-License-Identifier: GPL-2.0-or-later +// +// Basic global debounce algorithm. Used in 99% of keyboards at time of implementation +// When no state changes have occured for DEBOUNCE milliseconds, we push the state. -/* -Basic global debounce algorithm. Used in 99% of keyboards at time of implementation -When no state changes have occured for DEBOUNCE milliseconds, we push the state. -*/ #include "debounce.h" #include "timer.h" #include @@ -31,13 +19,13 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state. #endif #if DEBOUNCE > 0 -static bool debouncing = false; -static fast_timer_t debouncing_time; void debounce_init(uint8_t num_rows) {} bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - bool cooked_changed = false; + static fast_timer_t debouncing_time; + static bool debouncing = false; + bool cooked_changed = false; if (changed) { debouncing = true; @@ -54,7 +42,6 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool return cooked_changed; } -void debounce_free(void) {} #else // no debouncing. # include "none.c" #endif diff --git a/quantum/debounce/sym_defer_pk.c b/quantum/debounce/sym_defer_pk.c index 156535a373..063094efe5 100644 --- a/quantum/debounce/sym_defer_pk.c +++ b/quantum/debounce/sym_defer_pk.c @@ -1,33 +1,14 @@ -/* -Copyright 2017 Alex Ong -Copyright 2020 Andrei Purdea -Copyright 2021 Simon Arlott -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 . -*/ - -/* -Basic symmetric per-key algorithm. Uses an 8-bit counter per key. -When no state changes have occured for DEBOUNCE milliseconds, we push the state. -*/ +// Copyright 2017 Alex Ong +// Copyright 2020 Andrei Purdea +// Copyright 2021 Simon Arlott +// SPDX-License-Identifier: GPL-2.0-or-later +// +// Basic symmetric per-key algorithm. Uses an 8-bit counter per key. +// When no state changes have occured for DEBOUNCE milliseconds, we push the state. #include "debounce.h" #include "timer.h" -#include - -#ifdef PROTOCOL_CHIBIOS -# if CH_CFG_USE_MEMCORE == FALSE -# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm. -# endif -#endif +#include "util.h" #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -39,40 +20,24 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state. # define DEBOUNCE UINT8_MAX #endif -#define ROW_SHIFTER ((matrix_row_t)1) - -typedef uint8_t debounce_counter_t; +#define DEBOUNCE_ELAPSED 0 #if DEBOUNCE > 0 -static debounce_counter_t *debounce_counters; -static fast_timer_t last_time; -static bool counters_need_update; -static bool cooked_changed; +typedef uint8_t debounce_counter_t; +// Uses MATRIX_ROWS_PER_HAND instead of MATRIX_ROWS to support split keyboards +static debounce_counter_t debounce_counters[MATRIX_ROWS_PER_HAND * MATRIX_COLS] = {DEBOUNCE_ELAPSED}; +static bool counters_need_update; +static bool cooked_changed; -# define DEBOUNCE_ELAPSED 0 +static inline void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t elapsed_time); +static inline void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[]); -static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time); -static void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); - -// we use num_rows rather than MATRIX_ROWS to support split keyboards -void debounce_init(uint8_t num_rows) { - debounce_counters = (debounce_counter_t *)malloc(num_rows * MATRIX_COLS * sizeof(debounce_counter_t)); - int i = 0; - for (uint8_t r = 0; r < num_rows; r++) { - for (uint8_t c = 0; c < MATRIX_COLS; c++) { - debounce_counters[i++] = DEBOUNCE_ELAPSED; - } - } -} - -void debounce_free(void) { - free(debounce_counters); - debounce_counters = NULL; -} +void debounce_init(uint8_t num_rows) {} bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - bool updated_last = false; - cooked_changed = false; + static fast_timer_t last_time; + bool updated_last = false; + cooked_changed = false; if (counters_need_update) { fast_timer_t now = timer_read_fast(); @@ -80,12 +45,10 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool last_time = now; updated_last = true; - if (elapsed_time > UINT8_MAX) { - elapsed_time = UINT8_MAX; - } if (elapsed_time > 0) { - update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, elapsed_time); + // Update debounce counters with elapsed timer clamped to UINT8_MAX + update_debounce_counters_and_transfer_if_expired(raw, cooked, MIN(elapsed_time, UINT8_MAX)); } } @@ -94,47 +57,73 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool last_time = timer_read_fast(); } - start_debounce_counters(raw, cooked, num_rows); + start_debounce_counters(raw, cooked); } return cooked_changed; } -static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time) { - counters_need_update = false; - debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < num_rows; row++) { +/** + * @brief Updates debounce counters and transfers debounced key states if the debounce period has expired. + * + * Iterates through each key in the matrix and checks its debounce counter. If the debounce period has expired + * for a key, the debounced state is updated to match the raw state. Otherwise, the debounce counter is decremented + * by the elapsed time and marked for further updates. + * + * @param raw The current raw key state matrix. + * @param cooked The debounced key state matrix to be updated. + * @param elapsed_time The time elapsed since the last debounce update, in milliseconds. + */ +static inline void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t elapsed_time) { + counters_need_update = false; + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { + uint16_t row_offset = row * MATRIX_COLS; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { - if (*debounce_pointer != DEBOUNCE_ELAPSED) { - if (*debounce_pointer <= elapsed_time) { - *debounce_pointer = DEBOUNCE_ELAPSED; - matrix_row_t cooked_next = (cooked[row] & ~(ROW_SHIFTER << col)) | (raw[row] & (ROW_SHIFTER << col)); + uint16_t index = row_offset + col; + + if (debounce_counters[index] != DEBOUNCE_ELAPSED) { + if (debounce_counters[index] <= elapsed_time) { + debounce_counters[index] = DEBOUNCE_ELAPSED; + matrix_row_t col_mask = (MATRIX_ROW_SHIFTER << col); + matrix_row_t cooked_next = (cooked[row] & ~col_mask) | (raw[row] & col_mask); cooked_changed |= cooked[row] ^ cooked_next; cooked[row] = cooked_next; } else { - *debounce_pointer -= elapsed_time; + debounce_counters[index] -= elapsed_time; counters_need_update = true; } } - debounce_pointer++; } } } -static void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) { - debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < num_rows; row++) { - matrix_row_t delta = raw[row] ^ cooked[row]; +/** + * @brief Initializes debounce counters for keys with changed states. + * + * For each key in the matrix, this function checks if the raw state differs from the debounced state. + * If a change is detected and the debounce counter has elapsed, the counter is set to the debounce period + * and marked for update. Otherwise, the counter is cleared. + * + * @param raw The current raw key state matrix. + * @param cooked The debounced key state matrix. + */ +static inline void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[]) { + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { + uint16_t row_offset = row * MATRIX_COLS; + matrix_row_t delta = raw[row] ^ cooked[row]; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { - if (delta & (ROW_SHIFTER << col)) { - if (*debounce_pointer == DEBOUNCE_ELAPSED) { - *debounce_pointer = DEBOUNCE; - counters_need_update = true; + uint16_t index = row_offset + col; + + if (delta & (MATRIX_ROW_SHIFTER << col)) { + if (debounce_counters[index] == DEBOUNCE_ELAPSED) { + debounce_counters[index] = DEBOUNCE; + counters_need_update = true; } } else { - *debounce_pointer = DEBOUNCE_ELAPSED; + debounce_counters[index] = DEBOUNCE_ELAPSED; } - debounce_pointer++; } } } diff --git a/quantum/debounce/sym_defer_pr.c b/quantum/debounce/sym_defer_pr.c index d6222af5b2..2382fae898 100644 --- a/quantum/debounce/sym_defer_pr.c +++ b/quantum/debounce/sym_defer_pr.c @@ -1,77 +1,117 @@ -/* -Copyright 2021 Chad Austin -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 . -*/ - -/* -Symmetric per-row debounce algorithm. Changes only apply when -DEBOUNCE milliseconds have elapsed since the last change. -*/ +// Copyright 2017 Alex Ong +// Copyright 2020 Andrei Purdea +// Copyright 2021 Simon Arlott +// Copyright @filterpaper +// SPDX-License-Identifier: GPL-2.0-or-later +// +// Basic symmetric per-row algorithm. Uses an 8-bit counter per row. +// When no state changes have occured for DEBOUNCE milliseconds, we push the state. #include "debounce.h" #include "timer.h" -#include +#include "util.h" #ifndef DEBOUNCE # define DEBOUNCE 5 #endif -static uint16_t last_time; -// [row] milliseconds until key's state is considered debounced. -static uint8_t* countdowns; -// [row] -static matrix_row_t* last_raw; +// Maximum debounce: 255ms +#if DEBOUNCE > UINT8_MAX +# undef DEBOUNCE +# define DEBOUNCE UINT8_MAX +#endif -void debounce_init(uint8_t num_rows) { - countdowns = (uint8_t*)calloc(num_rows, sizeof(uint8_t)); - last_raw = (matrix_row_t*)calloc(num_rows, sizeof(matrix_row_t)); +#define DEBOUNCE_ELAPSED 0 - last_time = timer_read(); -} +#if DEBOUNCE > 0 +typedef uint8_t debounce_counter_t; +// Uses MATRIX_ROWS_PER_HAND instead of MATRIX_ROWS to support split keyboards +static debounce_counter_t debounce_counters[MATRIX_ROWS_PER_HAND] = {DEBOUNCE_ELAPSED}; +static bool counters_need_update; +static bool cooked_changed; -void debounce_free(void) { - free(countdowns); - countdowns = NULL; - free(last_raw); - last_raw = NULL; -} +static inline void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t elapsed_time); +static inline void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[]); + +void debounce_init(uint8_t num_rows) {} bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - uint16_t now = timer_read(); - uint16_t elapsed16 = TIMER_DIFF_16(now, last_time); - last_time = now; - uint8_t elapsed = (elapsed16 > 255) ? 255 : elapsed16; - bool cooked_changed = false; + static fast_timer_t last_time; + bool updated_last = false; + cooked_changed = false; - uint8_t* countdown = countdowns; + if (counters_need_update) { + fast_timer_t now = timer_read_fast(); + fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time); - for (uint8_t row = 0; row < num_rows; ++row, ++countdown) { - matrix_row_t raw_row = raw[row]; + last_time = now; + updated_last = true; - if (raw_row != last_raw[row]) { - *countdown = DEBOUNCE; - last_raw[row] = raw_row; - } else if (*countdown > elapsed) { - *countdown -= elapsed; - } else if (*countdown) { - cooked_changed |= cooked[row] ^ raw_row; - cooked[row] = raw_row; - *countdown = 0; + if (elapsed_time > 0) { + // Update debounce counters with elapsed timer clamped to UINT8_MAX + update_debounce_counters_and_transfer_if_expired(raw, cooked, MIN(elapsed_time, UINT8_MAX)); } } + if (changed) { + if (!updated_last) { + last_time = timer_read_fast(); + } + + start_debounce_counters(raw, cooked); + } + return cooked_changed; } -bool debounce_active(void) { - return true; +/** + * @brief Updates debounce counters and transfers debounced row states if the debounce period has expired. + * + * Iterates through each row in the matrix and checks its debounce counter. If the debounce period has expired + * for a row, the debounced state is updated to match the raw state. Otherwise, the debounce counter is decremented + * by the elapsed time and marked for further updates. + * + * @param raw The current raw key state matrix. + * @param cooked The debounced key state matrix to be updated. + * @param elapsed_time The time elapsed since the last debounce update, in milliseconds. + */ +static inline void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t elapsed_time) { + counters_need_update = false; + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { + if (debounce_counters[row] != DEBOUNCE_ELAPSED) { + if (debounce_counters[row] <= elapsed_time) { + debounce_counters[row] = DEBOUNCE_ELAPSED; + cooked_changed |= cooked[row] ^ raw[row]; + cooked[row] = raw[row]; + } else { + debounce_counters[row] -= elapsed_time; + counters_need_update = true; + } + } + } } + +/** + * @brief Initializes debounce counters for rows with changed states. + * + * For each row in the matrix, this function checks if the raw state differs from the debounced state. + * If a change is detected and the debounce counter has elapsed, the counter is set to the debounce period + * and marked for update. Otherwise, the counter is cleared. + * + * @param raw The current raw key state matrix. + * @param cooked The debounced key state matrix. + */ +static inline void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[]) { + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { + if (raw[row] != cooked[row]) { + debounce_counters[row] = DEBOUNCE; + counters_need_update = true; + } else { + debounce_counters[row] = DEBOUNCE_ELAPSED; + } + } +} + +#else +# include "none.c" +#endif diff --git a/quantum/debounce/sym_eager_pk.c b/quantum/debounce/sym_eager_pk.c index b359e79287..c3a7afde24 100644 --- a/quantum/debounce/sym_eager_pk.c +++ b/quantum/debounce/sym_eager_pk.c @@ -21,13 +21,7 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. #include "debounce.h" #include "timer.h" -#include - -#ifdef PROTOCOL_CHIBIOS -# if CH_CFG_USE_MEMCORE == FALSE -# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm. -# endif -#endif +#include "util.h" #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -39,41 +33,25 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. # define DEBOUNCE UINT8_MAX #endif -#define ROW_SHIFTER ((matrix_row_t)1) - -typedef uint8_t debounce_counter_t; +#define DEBOUNCE_ELAPSED 0 #if DEBOUNCE > 0 -static debounce_counter_t *debounce_counters; -static fast_timer_t last_time; -static bool counters_need_update; -static bool matrix_need_update; -static bool cooked_changed; +typedef uint8_t debounce_counter_t; +// Uses MATRIX_ROWS_PER_HAND instead of MATRIX_ROWS to support split keyboards +static debounce_counter_t debounce_counters[MATRIX_ROWS_PER_HAND * MATRIX_COLS] = {DEBOUNCE_ELAPSED}; +static bool counters_need_update; +static bool matrix_need_update; +static bool cooked_changed; -# define DEBOUNCE_ELAPSED 0 +static inline void update_debounce_counters(uint8_t elapsed_time); +static inline void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[]); -static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time); -static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); - -// we use num_rows rather than MATRIX_ROWS to support split keyboards -void debounce_init(uint8_t num_rows) { - debounce_counters = (debounce_counter_t *)malloc(num_rows * MATRIX_COLS * sizeof(debounce_counter_t)); - int i = 0; - for (uint8_t r = 0; r < num_rows; r++) { - for (uint8_t c = 0; c < MATRIX_COLS; c++) { - debounce_counters[i++] = DEBOUNCE_ELAPSED; - } - } -} - -void debounce_free(void) { - free(debounce_counters); - debounce_counters = NULL; -} +void debounce_init(uint8_t num_rows) {} bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - bool updated_last = false; - cooked_changed = false; + static fast_timer_t last_time; + bool updated_last = false; + cooked_changed = false; if (counters_need_update) { fast_timer_t now = timer_read_fast(); @@ -81,12 +59,10 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool last_time = now; updated_last = true; - if (elapsed_time > UINT8_MAX) { - elapsed_time = UINT8_MAX; - } if (elapsed_time > 0) { - update_debounce_counters(num_rows, elapsed_time); + // Update debounce counters with elapsed timer clamped to UINT8_MAX + update_debounce_counters(MIN(elapsed_time, UINT8_MAX)); } } @@ -95,51 +71,74 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool last_time = timer_read_fast(); } - transfer_matrix_values(raw, cooked, num_rows); + transfer_matrix_values(raw, cooked); } return cooked_changed; } -// If the current time is > debounce counter, set the counter to enable input. -static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) { - counters_need_update = false; - matrix_need_update = false; - debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < num_rows; row++) { +/** + * @brief Updates per-key debounce counters and determines if matrix needs updating. + * + * Iterates through each key in the matrix and checks its debounce counter. If the debounce + * period has elapsed, the counter is reset and the matrix is marked for update. Otherwise, + * the counter is decremented by the elapsed time and marked for further updates if needed. + * + * @param elapsed_time The time elapsed since the last debounce update, in milliseconds. + */ +static inline void update_debounce_counters(uint8_t elapsed_time) { + counters_need_update = false; + matrix_need_update = false; + + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { + uint16_t row_offset = row * MATRIX_COLS; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { - if (*debounce_pointer != DEBOUNCE_ELAPSED) { - if (*debounce_pointer <= elapsed_time) { - *debounce_pointer = DEBOUNCE_ELAPSED; - matrix_need_update = true; + uint16_t index = row_offset + col; + + if (debounce_counters[index] != DEBOUNCE_ELAPSED) { + if (debounce_counters[index] <= elapsed_time) { + debounce_counters[index] = DEBOUNCE_ELAPSED; + matrix_need_update = true; } else { - *debounce_pointer -= elapsed_time; + debounce_counters[index] -= elapsed_time; counters_need_update = true; } } - debounce_pointer++; } } } -// upload from raw_matrix to final matrix; -static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) { - matrix_need_update = false; - debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < num_rows; row++) { +/** + * @brief Transfers debounced key states from the raw matrix to the cooked matrix. + * + * For each key in the matrix, this function checks if its state has changed and if its + * debounce counter has elapsed. If so, the debounce counter is reset, the cooked matrix + * is updated to reflect the new state, and the matrix is marked for further updates. + * + * @param raw The current raw key state matrix. + * @param cooked The debounced key state matrix to be updated. + */ +static inline void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[]) { + matrix_need_update = false; + + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { + uint16_t row_offset = row * MATRIX_COLS; matrix_row_t delta = raw[row] ^ cooked[row]; matrix_row_t existing_row = cooked[row]; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { - matrix_row_t col_mask = (ROW_SHIFTER << col); + uint16_t index = row_offset + col; + + matrix_row_t col_mask = (MATRIX_ROW_SHIFTER << col); if (delta & col_mask) { - if (*debounce_pointer == DEBOUNCE_ELAPSED) { - *debounce_pointer = DEBOUNCE; - counters_need_update = true; + if (debounce_counters[index] == DEBOUNCE_ELAPSED) { + debounce_counters[index] = DEBOUNCE; + counters_need_update = true; existing_row ^= col_mask; // flip the bit. cooked_changed = true; } } - debounce_pointer++; } cooked[row] = existing_row; } diff --git a/quantum/debounce/sym_eager_pr.c b/quantum/debounce/sym_eager_pr.c index 6cd9308aff..5a1e3a1bda 100644 --- a/quantum/debounce/sym_eager_pr.c +++ b/quantum/debounce/sym_eager_pr.c @@ -1,33 +1,14 @@ -/* -Copyright 2019 Alex Ong -Copyright 2021 Simon Arlott -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 . -*/ - -/* -Basic per-row algorithm. Uses an 8-bit counter per row. -After pressing a key, it immediately changes state, and sets a counter. -No further inputs are accepted until DEBOUNCE milliseconds have occurred. -*/ +// Copyright 2017 Alex Ong +// Copyright 2021 Simon Arlott +// SPDX-License-Identifier: GPL-2.0-or-later +// +// Basic per-row algorithm. Uses an 8-bit counter per key. +// After pressing a key, it immediately changes state, and sets a counter. +// No further inputs are accepted until DEBOUNCE milliseconds have occurred. #include "debounce.h" #include "timer.h" -#include - -#ifdef PROTOCOL_CHIBIOS -# if CH_CFG_USE_MEMCORE == FALSE -# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm. -# endif -#endif +#include "util.h" #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -39,37 +20,25 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. # define DEBOUNCE UINT8_MAX #endif -typedef uint8_t debounce_counter_t; +#define DEBOUNCE_ELAPSED 0 #if DEBOUNCE > 0 -static bool matrix_need_update; +typedef uint8_t debounce_counter_t; +// Uses MATRIX_ROWS_PER_HAND instead of MATRIX_ROWS to support split keyboards +static debounce_counter_t debounce_counters[MATRIX_ROWS_PER_HAND] = {DEBOUNCE_ELAPSED}; +static bool counters_need_update; +static bool matrix_need_update; +static bool cooked_changed; -static debounce_counter_t *debounce_counters; -static fast_timer_t last_time; -static bool counters_need_update; -static bool cooked_changed; +static inline void update_debounce_counters(uint8_t elapsed_time); +static inline void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[]); -# define DEBOUNCE_ELAPSED 0 - -static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time); -static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); - -// we use num_rows rather than MATRIX_ROWS to support split keyboards -void debounce_init(uint8_t num_rows) { - debounce_counters = (debounce_counter_t *)malloc(num_rows * sizeof(debounce_counter_t)); - for (uint8_t r = 0; r < num_rows; r++) { - debounce_counters[r] = DEBOUNCE_ELAPSED; - } -} - -void debounce_free(void) { - free(debounce_counters); - debounce_counters = NULL; -} +void debounce_init(uint8_t num_rows) {} bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - bool updated_last = false; - cooked_changed = false; + static fast_timer_t last_time; + bool updated_last = false; + cooked_changed = false; if (counters_need_update) { fast_timer_t now = timer_read_fast(); @@ -77,12 +46,10 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool last_time = now; updated_last = true; - if (elapsed_time > UINT8_MAX) { - elapsed_time = UINT8_MAX; - } if (elapsed_time > 0) { - update_debounce_counters(num_rows, elapsed_time); + // Update debounce counters with elapsed timer clamped to UINT8_MAX + update_debounce_counters(MIN(elapsed_time, UINT8_MAX)); } } @@ -91,49 +58,64 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool last_time = timer_read_fast(); } - transfer_matrix_values(raw, cooked, num_rows); + transfer_matrix_values(raw, cooked); } return cooked_changed; } -// If the current time is > debounce counter, set the counter to enable input. -static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) { - counters_need_update = false; - matrix_need_update = false; - debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < num_rows; row++) { - if (*debounce_pointer != DEBOUNCE_ELAPSED) { - if (*debounce_pointer <= elapsed_time) { - *debounce_pointer = DEBOUNCE_ELAPSED; - matrix_need_update = true; +/** + * @brief Updates per-row debounce counters and determines if matrix needs updating. + * + * Iterates through each row in the matrix and checks its debounce counter. If the debounce + * period has elapsed, the counter is reset and the matrix is marked for update. Otherwise, + * the counter is decremented by the elapsed time and marked for further updates if needed. + * + * @param elapsed_time The time elapsed since the last debounce update, in milliseconds. + */ +static inline void update_debounce_counters(uint8_t elapsed_time) { + counters_need_update = false; + matrix_need_update = false; + + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { + if (debounce_counters[row] != DEBOUNCE_ELAPSED) { + if (debounce_counters[row] <= elapsed_time) { + debounce_counters[row] = DEBOUNCE_ELAPSED; + matrix_need_update = true; } else { - *debounce_pointer -= elapsed_time; + debounce_counters[row] -= elapsed_time; counters_need_update = true; } } - debounce_pointer++; } } -// upload from raw_matrix to final matrix; -static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) { - matrix_need_update = false; - debounce_counter_t *debounce_pointer = debounce_counters; - for (uint8_t row = 0; row < num_rows; row++) { +/** + * @brief Transfers debounced key states from the raw matrix to the cooked matrix. + * + * For each row in the matrix, this function checks if its state has changed and if its + * debounce counter has elapsed. If so, the debounce counter is reset, the cooked matrix + * is updated to reflect the new state, and the matrix is marked for further updates. + * + * @param raw The current raw key state matrix. + * @param cooked The debounced key state matrix + */ +static inline void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[]) { + matrix_need_update = false; + + for (uint8_t row = 0; row < MATRIX_ROWS_PER_HAND; row++) { matrix_row_t existing_row = cooked[row]; matrix_row_t raw_row = raw[row]; // determine new value basd on debounce pointer + raw value if (existing_row != raw_row) { - if (*debounce_pointer == DEBOUNCE_ELAPSED) { - *debounce_pointer = DEBOUNCE; + if (debounce_counters[row] == DEBOUNCE_ELAPSED) { + debounce_counters[row] = DEBOUNCE; cooked_changed |= cooked[row] ^ raw_row; cooked[row] = raw_row; counters_need_update = true; } } - debounce_pointer++; } } diff --git a/quantum/debounce/tests/debounce_test_common.cpp b/quantum/debounce/tests/debounce_test_common.cpp index fd4b6f01a6..3782f51411 100644 --- a/quantum/debounce/tests/debounce_test_common.cpp +++ b/quantum/debounce/tests/debounce_test_common.cpp @@ -121,8 +121,6 @@ void DebounceTest::runEventsInternal() { checkCookedMatrix(false, "debounce() modified cooked matrix"); advance_time(1); } - - debounce_free(); } void DebounceTest::runDebounce(bool changed) { From 4b1b83f42fca1ce73ccb1d21b39212f3067241d2 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 02:58:29 -0600 Subject: [PATCH 07/95] Migrate `g_led_config` to DD (B, C) (#25559) --- keyboards/bandominedoni/bandominedoni.c | 52 ---------- keyboards/bandominedoni/keyboard.json | 78 +++++++++++++++ keyboards/blockboy/ac980mini/ac980mini.c | 54 ----------- keyboards/blockboy/ac980mini/keyboard.json | 83 ++++++++++++++++ keyboards/boston_meetup/2019/2019.c | 15 --- keyboards/boston_meetup/2019/keyboard.json | 10 +- keyboards/canary/canary60rgb/v1/keyboard.json | 65 +++++++++++++ keyboards/canary/canary60rgb/v1/v1.c | 22 ----- keyboards/capsunlocked/cu80/v2/ansi/ansi.c | 20 ---- .../capsunlocked/cu80/v2/ansi/keyboard.json | 91 ++++++++++++++++++ keyboards/capsunlocked/cu80/v2/iso/iso.c | 20 ---- .../capsunlocked/cu80/v2/iso/keyboard.json | 92 ++++++++++++++++++ .../checkerboards/quark_lp/keyboard.json | 53 +++++++++++ keyboards/checkerboards/quark_lp/quark_lp.c | 39 -------- keyboards/cherrybstudio/cb87rgb/cb87rgb.c | 34 ------- keyboards/cherrybstudio/cb87rgb/keyboard.json | 94 +++++++++++++++++++ keyboards/concreteflowers/cor_tkl/cor_tkl.c | 16 ---- .../concreteflowers/cor_tkl/keyboard.json | 6 +- 18 files changed, 570 insertions(+), 274 deletions(-) delete mode 100644 keyboards/blockboy/ac980mini/ac980mini.c delete mode 100644 keyboards/capsunlocked/cu80/v2/ansi/ansi.c delete mode 100644 keyboards/capsunlocked/cu80/v2/iso/iso.c delete mode 100644 keyboards/checkerboards/quark_lp/quark_lp.c diff --git a/keyboards/bandominedoni/bandominedoni.c b/keyboards/bandominedoni/bandominedoni.c index 76d9e6cb3b..84c0f27bcd 100644 --- a/keyboards/bandominedoni/bandominedoni.c +++ b/keyboards/bandominedoni/bandominedoni.c @@ -16,58 +16,6 @@ #include "bandominedoni.h" -#ifdef RGB_MATRIX_ENABLE - -led_config_t g_led_config = { - { - { 75, 46, 45, 44, 43, 42, NO_LED }, - { 47, 48, 49, 50, 51, 52, 53 }, - { 60, 59, 58, 57, 56, 55, 54 }, - { 61, 62, 63, 64, 65, 66, 67 }, - { 74, 73, 72, 71, 70, 69, 68 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { 7, 6, 4, 3, 2, 1, 5}, - { 8, 9, 10, 11, 12, 13, 0 }, - { 19, 18, 17, 16, 15, 14, 41 }, - { 20, 21, 22, 23, 24, 25, 40 }, - { 30, 29, 28, 27, 26, 39, 38 }, - { 31, 32, 33, 34, 35, 36, 37 } - }, { - { 145, 6 }, { 157, 5 }, { 153, 14 }, { 149, 22 }, { 145, 32 }, { 136, 35 }, { 139, 48 }, { 134, 61 }, - { 142, 60 }, { 148, 43 }, { 154, 29 }, { 158, 20 }, { 163, 12 }, { 168, 4 }, - { 178, 5 }, { 173, 12 }, { 168, 20 }, { 163, 28 }, { 157, 40 }, { 151, 55 }, - { 160, 52 }, { 166, 39 }, { 172, 28 }, { 177, 20 }, { 182, 13 }, { 188, 7 }, - { 192, 17 }, { 186, 23 }, { 181, 30 }, { 175, 39 }, { 169, 50 }, - { 178, 51 }, { 184, 41 }, { 190, 33 }, { 196, 27 }, - { 199, 37 }, { 193, 45 }, { 187, 53 }, - { 196, 56 }, { 202, 49 }, - { 205, 61 }, - { 202, 4 }, - { 84, 18 }, { 73, 13 }, { 62, 10 }, { 51, 8 }, { 39, 11 }, { 24, 22 }, - { 34, 19 }, { 45, 16 }, { 56, 16 }, { 66, 18 }, { 77, 22 }, { 87, 28 }, - { 92, 40 }, { 81, 32 }, { 71, 27 }, { 61, 24 }, { 51, 24 }, { 41, 24 }, { 30, 28 }, - { 24, 42 }, { 34, 37 }, { 44, 35 }, { 54, 34 }, { 64, 36 }, { 74, 38 }, { 84, 44 }, - { 87, 54 }, { 77, 49 }, { 67, 47 }, { 57, 45 }, { 47, 45 }, { 37, 48 }, { 27, 52 }, { 19, 56 }, - }, { - 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, 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, 4, 4, 4, 4 - } -}; -#endif - #if defined(SPLIT_HAND_MATRIX_GRID) static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { gpio_set_pin_input_high(in_pin); diff --git a/keyboards/bandominedoni/keyboard.json b/keyboards/bandominedoni/keyboard.json index f6ea0f43c3..7184e2e90c 100644 --- a/keyboards/bandominedoni/keyboard.json +++ b/keyboards/bandominedoni/keyboard.json @@ -20,6 +20,84 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [7, 6], "x": 145, "y": 6, "flags": 4}, + {"matrix": [6, 5], "x": 157, "y": 5, "flags": 4}, + {"matrix": [6, 4], "x": 153, "y": 14, "flags": 4}, + {"matrix": [6, 3], "x": 149, "y": 22, "flags": 4}, + {"matrix": [6, 2], "x": 145, "y": 32, "flags": 4}, + {"matrix": [6, 6], "x": 136, "y": 35, "flags": 4}, + {"matrix": [6, 1], "x": 139, "y": 48, "flags": 4}, + {"matrix": [6, 0], "x": 134, "y": 61, "flags": 4}, + {"matrix": [7, 0], "x": 142, "y": 60, "flags": 4}, + {"matrix": [7, 1], "x": 148, "y": 43, "flags": 4}, + {"matrix": [7, 2], "x": 154, "y": 29, "flags": 4}, + {"matrix": [7, 3], "x": 158, "y": 20, "flags": 4}, + {"matrix": [7, 4], "x": 163, "y": 12, "flags": 4}, + {"matrix": [7, 5], "x": 168, "y": 4, "flags": 4}, + {"matrix": [8, 5], "x": 178, "y": 5, "flags": 4}, + {"matrix": [8, 4], "x": 173, "y": 12, "flags": 4}, + {"matrix": [8, 3], "x": 168, "y": 20, "flags": 4}, + {"matrix": [8, 2], "x": 163, "y": 28, "flags": 4}, + {"matrix": [8, 1], "x": 157, "y": 40, "flags": 4}, + {"matrix": [8, 0], "x": 151, "y": 55, "flags": 4}, + {"matrix": [9, 0], "x": 160, "y": 52, "flags": 4}, + {"matrix": [9, 1], "x": 166, "y": 39, "flags": 4}, + {"matrix": [9, 2], "x": 172, "y": 28, "flags": 4}, + {"matrix": [9, 3], "x": 177, "y": 20, "flags": 4}, + {"matrix": [9, 4], "x": 182, "y": 13, "flags": 4}, + {"matrix": [9, 5], "x": 188, "y": 7, "flags": 4}, + {"matrix": [10, 4], "x": 192, "y": 17, "flags": 4}, + {"matrix": [10, 3], "x": 186, "y": 23, "flags": 4}, + {"matrix": [10, 2], "x": 181, "y": 30, "flags": 4}, + {"matrix": [10, 1], "x": 175, "y": 39, "flags": 4}, + {"matrix": [10, 0], "x": 169, "y": 50, "flags": 4}, + {"matrix": [11, 0], "x": 178, "y": 51, "flags": 4}, + {"matrix": [11, 1], "x": 184, "y": 41, "flags": 4}, + {"matrix": [11, 2], "x": 190, "y": 33, "flags": 4}, + {"matrix": [11, 3], "x": 196, "y": 27, "flags": 4}, + {"matrix": [11, 4], "x": 199, "y": 37, "flags": 4}, + {"matrix": [11, 5], "x": 193, "y": 45, "flags": 4}, + {"matrix": [11, 6], "x": 187, "y": 53, "flags": 4}, + {"matrix": [10, 6], "x": 196, "y": 56, "flags": 4}, + {"matrix": [10, 5], "x": 202, "y": 49, "flags": 4}, + {"matrix": [9, 6], "x": 205, "y": 61, "flags": 4}, + {"matrix": [8, 6], "x": 202, "y": 4, "flags": 4}, + {"matrix": [0, 5], "x": 84, "y": 18, "flags": 4}, + {"matrix": [0, 4], "x": 73, "y": 13, "flags": 4}, + {"matrix": [0, 3], "x": 62, "y": 10, "flags": 4}, + {"matrix": [0, 2], "x": 51, "y": 8, "flags": 4}, + {"matrix": [0, 1], "x": 39, "y": 11, "flags": 4}, + {"matrix": [1, 0], "x": 24, "y": 22, "flags": 4}, + {"matrix": [1, 1], "x": 34, "y": 19, "flags": 4}, + {"matrix": [1, 2], "x": 45, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 18, "flags": 4}, + {"matrix": [1, 5], "x": 77, "y": 22, "flags": 4}, + {"matrix": [1, 6], "x": 87, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 92, "y": 40, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 71, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 24, "flags": 4}, + {"matrix": [2, 2], "x": 51, "y": 24, "flags": 4}, + {"matrix": [2, 1], "x": 41, "y": 24, "flags": 4}, + {"matrix": [2, 0], "x": 30, "y": 28, "flags": 4}, + {"matrix": [3, 0], "x": 24, "y": 42, "flags": 4}, + {"matrix": [3, 1], "x": 34, "y": 37, "flags": 4}, + {"matrix": [3, 2], "x": 44, "y": 35, "flags": 4}, + {"matrix": [3, 3], "x": 54, "y": 34, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 36, "flags": 4}, + {"matrix": [3, 5], "x": 74, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 84, "y": 44, "flags": 4}, + {"matrix": [4, 6], "x": 87, "y": 54, "flags": 4}, + {"matrix": [4, 5], "x": 77, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 67, "y": 47, "flags": 4}, + {"matrix": [4, 3], "x": 57, "y": 45, "flags": 4}, + {"matrix": [4, 2], "x": 47, "y": 45, "flags": 4}, + {"matrix": [4, 1], "x": 37, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 27, "y": 52, "flags": 4}, + {"matrix": [0, 0], "x": 19, "y": 56, "flags": 4} + ], "max_brightness": 50, "sleep": true }, diff --git a/keyboards/blockboy/ac980mini/ac980mini.c b/keyboards/blockboy/ac980mini/ac980mini.c deleted file mode 100644 index b6a29f94ea..0000000000 --- a/keyboards/blockboy/ac980mini/ac980mini.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright 2022 rooski15 - * - * 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 RGB_MATRIX_ENABLE -// LED location configuration -led_config_t g_led_config = { { - - { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 }, - { 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, NO_LED }, - { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED, 41, 42, 43, 44, 45 }, - { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, NO_LED, 24, 25, 26, 27, 28, NO_LED }, - { 0, 1, 2, NO_LED, NO_LED, 3, NO_LED, NO_LED, NO_LED, 4, 5, 6, 7, 8, 9, 10, 11, 12 } - -},{ - - // Physical X,Y coordinates of each LED, starting with LED 0 above. - { 1 , 64 }, { 16 , 64 }, { 31 , 64 }, { 75 , 64 }, { 123 , 64 }, { 132 , 64 }, { 144 , 64 }, { 159 , 64 }, { 171 , 64 }, { 183 , 64 }, { 198 , 64 }, { 210 , 64 }, { 224 , 64 }, - { 7 , 48 }, { 27 , 48 }, { 39 , 48 }, { 51 , 48 }, { 63 , 48 }, { 75 , 48 }, { 87 , 48 }, { 99 , 48 }, { 111 , 48 }, { 123 , 48 }, { 135 , 48 }, { 151 , 48 }, { 171 , 48 }, { 186 , 48 }, { 198 , 48 }, { 210 , 48 }, - { 4 , 36 }, { 20 , 36 }, { 32 , 36 }, { 44 , 36 }, { 56 , 36 }, { 68 , 36 }, { 80 , 36 }, { 92 , 36 }, { 104 , 36 }, { 116 , 36 }, { 128 , 36 }, { 140 , 36 }, { 160 , 36 }, { 186 , 36 }, { 198 , 36 }, { 210 , 36 }, { 224 , 36 }, - { 3 , 16 }, { 18 , 16 }, { 30 , 16 }, { 42 , 16 }, { 54 , 16 }, { 66 , 16 }, { 78 , 16 }, { 90 , 16 }, { 102 , 16 }, { 114 , 16 }, { 126 , 16 }, { 138 , 16 }, { 150 , 16 }, { 165 , 16 }, { 186 , 16 }, { 198 , 16 }, { 210 , 16 }, - { 0 , 0 }, { 12 , 0 }, { 24 , 0 }, { 36 , 0 }, { 48 , 0 }, { 60 , 0 }, { 72 , 0 }, { 84 , 0 }, { 96 , 0 }, { 108 , 0 }, { 120 , 0 }, { 132 , 0 }, { 144 , 0 }, { 162 , 0 }, { 186 , 0 }, { 198 , 0 }, { 210 , 0 }, { 224 , 0 }, - -},{ - // "Flag Assignment" of each key - // 4 = Alpha - // 1 = Mod - // See https://docs.qmk.fm/#/feature_rgb_matrix?id=flags - // No Caps / Num indicators - 1,1,1, 1, 1,1,1, 1,1,1, 4,4,1, - 1,4,4,4,4,4,4,4,4,4,4,1, 1, 4,4,4, - 1,4,4,4,4,4,4,4,4,4,4,4,1, 4,4,4,1, - 1,4,4,4,4,4,4,4,4,4,4,4,4,4, 4,4,4, - 1,4,4,4,4,4,4,4,4,4,4,4,4,1, 1,1,1,1 - -} }; -/* - -*/ -#endif \ No newline at end of file diff --git a/keyboards/blockboy/ac980mini/keyboard.json b/keyboards/blockboy/ac980mini/keyboard.json index ce261639e2..8df9c03dcc 100644 --- a/keyboards/blockboy/ac980mini/keyboard.json +++ b/keyboards/blockboy/ac980mini/keyboard.json @@ -74,6 +74,89 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [4, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 31, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 75, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 123, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 132, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 144, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 159, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 171, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 183, "y": 64, "flags": 1}, + {"matrix": [4, 15], "x": 198, "y": 64, "flags": 4}, + {"matrix": [4, 16], "x": 210, "y": 64, "flags": 4}, + {"matrix": [4, 17], "x": 224, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 7, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 27, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 39, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 51, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 63, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 87, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 99, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 111, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 123, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 135, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 151, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 171, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 186, "y": 48, "flags": 4}, + {"matrix": [3, 15], "x": 198, "y": 48, "flags": 4}, + {"matrix": [3, 16], "x": 210, "y": 48, "flags": 4}, + {"matrix": [2, 0], "x": 4, "y": 36, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 36, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 36, "flags": 4}, + {"matrix": [2, 3], "x": 44, "y": 36, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 36, "flags": 4}, + {"matrix": [2, 5], "x": 68, "y": 36, "flags": 4}, + {"matrix": [2, 6], "x": 80, "y": 36, "flags": 4}, + {"matrix": [2, 7], "x": 92, "y": 36, "flags": 4}, + {"matrix": [2, 8], "x": 104, "y": 36, "flags": 4}, + {"matrix": [2, 9], "x": 116, "y": 36, "flags": 4}, + {"matrix": [2, 10], "x": 128, "y": 36, "flags": 4}, + {"matrix": [2, 11], "x": 140, "y": 36, "flags": 4}, + {"matrix": [2, 13], "x": 160, "y": 36, "flags": 1}, + {"matrix": [2, 14], "x": 186, "y": 36, "flags": 4}, + {"matrix": [2, 15], "x": 198, "y": 36, "flags": 4}, + {"matrix": [2, 16], "x": 210, "y": 36, "flags": 4}, + {"matrix": [2, 17], "x": 224, "y": 36, "flags": 1}, + {"matrix": [1, 0], "x": 3, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 18, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 30, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 42, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 54, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 66, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 90, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 102, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 114, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 126, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 138, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 150, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 165, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 186, "y": 16, "flags": 4}, + {"matrix": [1, 15], "x": 198, "y": 16, "flags": 4}, + {"matrix": [1, 16], "x": 210, "y": 16, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 12, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 36, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 72, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 108, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 162, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 186, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 210, "y": 0, "flags": 1}, + {"matrix": [0, 17], "x": 224, "y": 0, "flags": 1} + ], "sat_steps": 8, "val_steps": 8, "max_brightness": 150, diff --git a/keyboards/boston_meetup/2019/2019.c b/keyboards/boston_meetup/2019/2019.c index 1097c58de2..87ce108bc3 100644 --- a/keyboards/boston_meetup/2019/2019.c +++ b/keyboards/boston_meetup/2019/2019.c @@ -15,21 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -#include "rgb_matrix.h" - -led_config_t g_led_config = { { - { 5, NO_LED, NO_LED, 0 }, - { NO_LED, NO_LED, NO_LED, NO_LED }, - { 4, NO_LED, NO_LED, 1 }, - { 3, NO_LED, NO_LED, 2 } -}, { - { 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 } -}, { - 4, 4, 4, 4, 4, 4 -} }; -#endif - #ifdef OLED_ENABLE oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/boston_meetup/2019/keyboard.json b/keyboards/boston_meetup/2019/keyboard.json index 4f07e0c631..c56a8f6c06 100644 --- a/keyboards/boston_meetup/2019/keyboard.json +++ b/keyboards/boston_meetup/2019/keyboard.json @@ -20,7 +20,15 @@ "driver": "drv2605l" }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [0, 3], "x": 188, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 187, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 149, "y": 64, "flags": 4}, + {"matrix": [3, 0], "x": 112, "y": 64, "flags": 4}, + {"matrix": [2, 0], "x": 37, "y": 48, "flags": 4}, + {"matrix": [0, 0], "x": 38, "y": 16, "flags": 4} + ] }, "matrix_pins": { "cols": ["A7", "A8", "B2", "B10"], diff --git a/keyboards/canary/canary60rgb/v1/keyboard.json b/keyboards/canary/canary60rgb/v1/keyboard.json index a1247769e6..de2daaf00d 100644 --- a/keyboards/canary/canary60rgb/v1/keyboard.json +++ b/keyboards/canary/canary60rgb/v1/keyboard.json @@ -73,6 +73,71 @@ "pixel_rain": true }, "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [2, 13], "x": 214, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 208, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 186, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 208, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 192, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 176, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1} + ], "sleep": true }, "matrix_pins": { diff --git a/keyboards/canary/canary60rgb/v1/v1.c b/keyboards/canary/canary60rgb/v1/v1.c index b14878ff22..a6e9dea796 100644 --- a/keyboards/canary/canary60rgb/v1/v1.c +++ b/keyboards/canary/canary60rgb/v1/v1.c @@ -86,28 +86,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW10_CS16, SW11_CS16, SW12_CS16 } }; -led_config_t g_led_config = { - { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, - { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 }, - { 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 } - }, { - { 216, 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 }, { 0, 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 }, - { 214, 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 }, { 208, 48 }, { 186, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 36, 48 }, { 9, 48 }, - { 224, 64 }, { 208, 64 }, { 192, 64 }, { 176, 64 }, { 160, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } - }, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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, 1, - 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 4, 1, 1, 1 - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/capsunlocked/cu80/v2/ansi/ansi.c b/keyboards/capsunlocked/cu80/v2/ansi/ansi.c deleted file mode 100644 index 2d4055d984..0000000000 --- a/keyboards/capsunlocked/cu80/v2/ansi/ansi.c +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2021 CapsUnlocked -// SPDX-License-Identifier: GPL-2.0-or-later -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - {0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - {32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16}, - {33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49}, - {62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, NO_LED, NO_LED, NO_LED, NO_LED}, - {63, NO_LED, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, NO_LED, NO_LED, 75, NO_LED}, - {86, 85, 84, NO_LED, NO_LED, 83, NO_LED, NO_LED, NO_LED, 82, 81, 80, 79, 78, NO_LED, 77, 76} - }, { - {0, 0}, {28, 0}, {42, 0}, {56, 0}, {71, 0}, {85, 0}, {99, 0}, {113, 0}, {127, 0}, {141, 0}, {155, 0}, {169, 0}, {184, 0}, {198, 0}, {212, 0}, {226, 0}, {226, 13}, {212, 13}, {198, 13}, {184, 13}, {169, 13}, {155, 13}, {141, 13}, {127, 13}, {113, 13}, {99, 13}, {85, 13}, {71, 13}, {56, 13}, {42, 13}, {28, 13}, {14, 13}, {0, 13}, {0, 26}, {14, 26}, {28, 26}, {42, 26}, {56, 26}, {71, 26}, {85, 26}, {99, 26}, {113, 26}, {127, 26}, {141, 26}, {155, 26}, {169, 26}, {184, 26}, {198, 26}, {212, 26}, {226, 26}, {169, 38}, {155, 38}, {141, 38}, {127, 38}, {113, 38}, {99, 38}, {85, 38}, {71, 38}, {56, 38}, {42, 38}, {28, 38}, {14, 38}, {0, 38}, {0, 51}, {28, 51}, {42, 51}, {56, 51}, {71, 51}, {85, 51}, {99, 51}, {113, 51}, {127, 51}, {141, 51}, {155, 51}, {169, 51}, {212, 51}, {226, 64}, {212, 64}, {184, 64}, {169, 64}, {155, 64}, {141, 64}, {127, 64}, {71, 64}, {28, 64}, {14, 64}, {0, 64} - }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 1, 1, 1 - } -}; -#endif diff --git a/keyboards/capsunlocked/cu80/v2/ansi/keyboard.json b/keyboards/capsunlocked/cu80/v2/ansi/keyboard.json index 9dc24b5e40..fe38c3dff8 100644 --- a/keyboards/capsunlocked/cu80/v2/ansi/keyboard.json +++ b/keyboards/capsunlocked/cu80/v2/ansi/keyboard.json @@ -2,5 +2,96 @@ "keyboard_name": "CU80 v2 ANSI", "usb": { "pid": "0x0081" + }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 71, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 85, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 99, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 113, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 127, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 141, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 155, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 169, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 184, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 212, "y": 0, "flags": 8}, + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 16], "x": 224, "y": 13, "flags": 4}, + {"matrix": [1, 15], "x": 212, "y": 13, "flags": 4}, + {"matrix": [1, 14], "x": 198, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 184, "y": 13, "flags": 4}, + {"matrix": [1, 12], "x": 169, "y": 13, "flags": 4}, + {"matrix": [1, 11], "x": 155, "y": 13, "flags": 4}, + {"matrix": [1, 10], "x": 141, "y": 13, "flags": 4}, + {"matrix": [1, 9], "x": 127, "y": 13, "flags": 4}, + {"matrix": [1, 8], "x": 113, "y": 13, "flags": 4}, + {"matrix": [1, 7], "x": 99, "y": 13, "flags": 4}, + {"matrix": [1, 6], "x": 85, "y": 13, "flags": 4}, + {"matrix": [1, 5], "x": 71, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 56, "y": 13, "flags": 4}, + {"matrix": [1, 3], "x": 42, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 28, "y": 13, "flags": 4}, + {"matrix": [1, 1], "x": 14, "y": 13, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 13, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 14, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 28, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 99, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 113, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 141, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 155, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 169, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 184, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 212, "y": 26, "flags": 4}, + {"matrix": [2, 16], "x": 224, "y": 26, "flags": 4}, + {"matrix": [3, 12], "x": 169, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 155, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 141, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 113, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 99, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 85, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 71, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 42, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 28, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 14, "y": 38, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 38, "flags": 8}, + {"matrix": [4, 0], "x": 0, "y": 51, "flags": 1}, + {"matrix": [4, 2], "x": 28, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 56, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 71, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 85, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 99, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 113, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 127, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 141, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 155, "y": 51, "flags": 4}, + {"matrix": [4, 12], "x": 169, "y": 51, "flags": 1}, + {"matrix": [4, 15], "x": 212, "y": 51, "flags": 4}, + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 212, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 184, "y": 64, "flags": 4}, + {"matrix": [5, 12], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 155, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 141, "y": 64, "flags": 1}, + {"matrix": [5, 9], "x": 127, "y": 64, "flags": 1}, + {"matrix": [5, 5], "x": 71, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 28, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 1} + ] } } diff --git a/keyboards/capsunlocked/cu80/v2/iso/iso.c b/keyboards/capsunlocked/cu80/v2/iso/iso.c deleted file mode 100644 index 0e8e26e5dd..0000000000 --- a/keyboards/capsunlocked/cu80/v2/iso/iso.c +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2021 CapsUnlocked -// SPDX-License-Identifier: GPL-2.0-or-later -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - {0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - {32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16}, - {33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49}, - {62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, NO_LED, NO_LED, NO_LED, NO_LED}, - {63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, NO_LED, NO_LED, 76, NO_LED}, - {87, 86, 85, NO_LED, NO_LED, 84, NO_LED, NO_LED, NO_LED, 83, 82, 81, 80, 79, NO_LED, 78, 77} - }, { - {0, 0}, {28, 0}, {42, 0}, {56, 0}, {71, 0}, {85, 0}, {99, 0}, {113, 0}, {127, 0}, {141, 0}, {155, 0}, {169, 0}, {184, 0}, {198, 0}, {212, 0}, {226, 0}, {226, 26}, {212, 26}, {198, 26}, {184, 26}, {169, 26}, {155, 26}, {141, 26}, {127, 26}, {113, 26}, {99, 26}, {85, 26}, {71, 26}, {56, 26}, {42, 26}, {28, 26}, {14, 26}, {0, 26}, {0, 26}, {14, 26}, {28, 26}, {42, 26}, {56, 26}, {71, 26}, {85, 26}, {99, 26}, {113, 26}, {127, 26}, {141, 26}, {155, 26}, {169, 26}, {184, 26}, {198, 26}, {212, 26}, {226, 26}, {169, 38}, {155, 38}, {141, 38}, {127, 38}, {113, 38}, {99, 38}, {85, 38}, {71, 38}, {56, 38}, {42, 38}, {28, 38}, {14, 38}, {0, 38}, {0, 51}, {14, 51}, {28, 51}, {42, 51}, {56, 51}, {71, 51}, {85, 51}, {99, 51}, {113, 51}, {127, 51}, {141, 51}, {155, 51}, {169, 51}, {212, 51}, {226, 64}, {212, 64}, {184, 64}, {169, 64}, {155, 64}, {141, 64}, {127, 64}, {71, 64}, {28, 64}, {14, 64}, {0, 64} - }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 1, 1, 1 - } -}; -#endif diff --git a/keyboards/capsunlocked/cu80/v2/iso/keyboard.json b/keyboards/capsunlocked/cu80/v2/iso/keyboard.json index 33d49db64a..b78b8af41e 100644 --- a/keyboards/capsunlocked/cu80/v2/iso/keyboard.json +++ b/keyboards/capsunlocked/cu80/v2/iso/keyboard.json @@ -2,5 +2,97 @@ "keyboard_name": "CU80 v2 ISO", "usb": { "pid": "0x0083" + }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 71, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 85, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 99, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 113, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 127, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 141, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 155, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 169, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 184, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 212, "y": 0, "flags": 8}, + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 16], "x": 224, "y": 26, "flags": 4}, + {"matrix": [1, 15], "x": 212, "y": 26, "flags": 4}, + {"matrix": [1, 14], "x": 198, "y": 26, "flags": 4}, + {"matrix": [1, 13], "x": 184, "y": 26, "flags": 4}, + {"matrix": [1, 12], "x": 169, "y": 26, "flags": 4}, + {"matrix": [1, 11], "x": 155, "y": 26, "flags": 4}, + {"matrix": [1, 10], "x": 141, "y": 26, "flags": 4}, + {"matrix": [1, 9], "x": 127, "y": 26, "flags": 4}, + {"matrix": [1, 8], "x": 113, "y": 26, "flags": 4}, + {"matrix": [1, 7], "x": 99, "y": 26, "flags": 4}, + {"matrix": [1, 6], "x": 85, "y": 26, "flags": 4}, + {"matrix": [1, 5], "x": 71, "y": 26, "flags": 4}, + {"matrix": [1, 4], "x": 56, "y": 26, "flags": 4}, + {"matrix": [1, 3], "x": 42, "y": 26, "flags": 4}, + {"matrix": [1, 2], "x": 28, "y": 26, "flags": 4}, + {"matrix": [1, 1], "x": 14, "y": 26, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 26, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 14, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 28, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 99, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 113, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 141, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 155, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 169, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 184, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 212, "y": 26, "flags": 4}, + {"matrix": [2, 16], "x": 224, "y": 26, "flags": 4}, + {"matrix": [3, 12], "x": 169, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 155, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 141, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 113, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 99, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 85, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 71, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 42, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 28, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 14, "y": 38, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 38, "flags": 8}, + {"matrix": [4, 0], "x": 0, "y": 51, "flags": 1}, + {"matrix": [4, 1], "x": 14, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 28, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 56, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 71, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 85, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 99, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 113, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 127, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 141, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 155, "y": 51, "flags": 4}, + {"matrix": [4, 12], "x": 169, "y": 51, "flags": 1}, + {"matrix": [4, 15], "x": 212, "y": 51, "flags": 4}, + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 212, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 184, "y": 64, "flags": 4}, + {"matrix": [5, 12], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 155, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 141, "y": 64, "flags": 1}, + {"matrix": [5, 9], "x": 127, "y": 64, "flags": 1}, + {"matrix": [5, 5], "x": 71, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 28, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 1} + ] } } diff --git a/keyboards/checkerboards/quark_lp/keyboard.json b/keyboards/checkerboards/quark_lp/keyboard.json index 7634a71d3e..59666f8d69 100644 --- a/keyboards/checkerboards/quark_lp/keyboard.json +++ b/keyboards/checkerboards/quark_lp/keyboard.json @@ -32,6 +32,59 @@ "pixel_flow": true }, "driver": "ws2812", + "layout": [ + {"matrix": [3, 11], "x": 224, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 204, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 163, "y": 64, "flags": 1}, + {"x": 153, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 143, "y": 64, "flags": 1}, + {"x": 133, "y": 64, "flags": 1}, + {"matrix": [3, 6], "x": 123, "y": 64, "flags": 1}, + {"x": 113, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 102, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 82, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 41, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 1}, + {"matrix": [2, 1], "x": 21, "y": 43, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 43, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 43, "flags": 4}, + {"matrix": [2, 4], "x": 82, "y": 43, "flags": 4}, + {"matrix": [2, 5], "x": 102, "y": 43, "flags": 4}, + {"matrix": [2, 6], "x": 123, "y": 43, "flags": 4}, + {"matrix": [2, 7], "x": 143, "y": 43, "flags": 4}, + {"matrix": [2, 8], "x": 163, "y": 43, "flags": 4}, + {"matrix": [2, 9], "x": 183, "y": 43, "flags": 4}, + {"matrix": [2, 10], "x": 204, "y": 43, "flags": 4}, + {"matrix": [2, 11], "x": 224, "y": 43, "flags": 1}, + {"matrix": [1, 11], "x": 224, "y": 21, "flags": 1}, + {"matrix": [1, 10], "x": 204, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 163, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 143, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 123, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 102, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 82, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 41, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 21, "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": 21, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 41, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 82, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 102, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 123, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 143, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 163, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 204, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 224, "y": 0, "flags": 1} + ], "max_brightness": 125, "sat_steps": 8, "val_steps": 8, diff --git a/keyboards/checkerboards/quark_lp/quark_lp.c b/keyboards/checkerboards/quark_lp/quark_lp.c deleted file mode 100644 index 89c685f2b5..0000000000 --- a/keyboards/checkerboards/quark_lp/quark_lp.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2021 Nathan Spears - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 }, - { 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27 }, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }, - { 14, 13, 12, 11, 10, 9, 7, 5, 3, 2, 1, 0 } -}, { - // LED Index to Physical Position - { 244, 0 }, { 224, 0 }, { 203, 0 }, { 183, 0 }, { 173, 0 }, { 163, 0 }, { 153, 0 }, { 143, 0 }, { 133, 0 }, { 122, 0 }, { 102, 0 }, { 81, 0 }, { 61, 0 }, { 41, 0 }, { 20, 0 }, - { 20, 21 }, { 41, 21 }, { 61, 21 }, { 81, 21 }, { 102, 21 }, { 122, 21 }, { 143, 21 }, { 163, 21 }, { 183, 21 }, { 203, 21 }, { 224, 21 }, { 244, 21 }, - { 244, 43 }, { 224, 43 }, { 203, 43 }, { 183, 43 }, { 163, 43 }, { 143, 43 }, { 122, 43 }, { 102, 43 }, { 81, 43 }, { 61, 43 }, { 41, 43 }, { 20, 43 }, - { 20, 64 }, { 41, 64 }, { 61, 64 }, { 81, 64 }, { 102, 64 }, { 112, 64 }, { 122, 64 }, { 132, 64 }, { 143, 64 }, { 153, 64 }, { 163, 64 }, { 183, 64 } -}, { - // LED Index to Flag - 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, 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 -} }; -#endif diff --git a/keyboards/cherrybstudio/cb87rgb/cb87rgb.c b/keyboards/cherrybstudio/cb87rgb/cb87rgb.c index 5c2480f3fb..40ef6d6506 100644 --- a/keyboards/cherrybstudio/cb87rgb/cb87rgb.c +++ b/keyboards/cherrybstudio/cb87rgb/cb87rgb.c @@ -13,41 +13,7 @@ along with this program. If not, see . #include "quantum.h" -//x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION -//y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION - #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, 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, 87, 88, 89 }, - { 90, 91, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } -}, { - // LED Index to Physical Position - { 0, 0 }, { 13, 0 }, { 26, 0 }, { 39, 0 }, { 52, 0 }, { 65, 0 }, { 78, 0 }, { 91, 0 }, { 104, 0 }, { 117, 0 }, { 130, 0 }, { 143, 0 }, { 156, 0 }, { 195, 0 }, { 208, 0 }, { 224, 0 }, - { 0, 12 }, { 13, 12 }, { 26, 12 }, { 39, 12 }, { 52, 12 }, { 65, 12 }, { 78, 12 }, { 91, 12 }, { 104, 12 }, { 117, 12 }, { 130, 12 }, { 143, 12 }, { 156, 12 }, { 169, 12 }, { 182, 24 }, { 195, 12 }, { 208, 12 }, { 224, 12 }, - { 0, 24 }, { 13, 24 }, { 26, 24 }, { 39, 24 }, { 52, 24 }, { 65, 24 }, { 78, 24 }, { 91, 24 }, { 104, 24 }, { 117, 24 }, { 130, 24 }, { 143, 24 }, { 156, 24 }, { 169, 24 }, { 195, 24 }, { 208, 24 }, { 224, 24 }, - { 0, 36 }, { 13, 36 }, { 26, 36 }, { 39, 36 }, { 52, 36 }, { 65, 36 }, { 78, 36 }, { 91, 36 }, { 104, 36 }, { 117, 36 }, { 130, 36 }, { 143, 36 }, { 156, 36 }, { 169, 36 }, - { 0, 48 }, { 13, 48 }, { 26, 48 }, { 39, 48 }, { 52, 48 }, { 65, 48 }, { 78, 48 }, { 91, 48 }, { 104, 48 }, { 117, 48 }, { 130, 48 }, { 143, 48 }, { 156, 48 }, { 169, 48 }, { 208, 48 }, - { 0, 64 }, { 13, 64 }, { 26, 64 }, { 78, 64 }, { 130, 64 }, { 143, 64 }, { 156, 64 }, { 169, 64 }, { 195, 64 }, { 208, 64 }, { 224, 64 }, { 182, 0 } -}, { - // LED Index to Flag - 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, 1, 1, 1, 1, 1 - -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/cherrybstudio/cb87rgb/keyboard.json b/keyboards/cherrybstudio/cb87rgb/keyboard.json index 1ce2fab78f..710bc2ab50 100644 --- a/keyboards/cherrybstudio/cb87rgb/keyboard.json +++ b/keyboards/cherrybstudio/cb87rgb/keyboard.json @@ -53,6 +53,100 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 13, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 26, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 39, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 52, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 65, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 91, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 104, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 117, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 130, "y": 0, "flags": 1}, + {"matrix": [1, 1], "x": 143, "y": 0, "flags": 1}, + {"matrix": [1, 2], "x": 156, "y": 0, "flags": 1}, + {"matrix": [1, 3], "x": 195, "y": 0, "flags": 1}, + {"matrix": [1, 4], "x": 208, "y": 0, "flags": 1}, + {"matrix": [1, 5], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 6], "x": 0, "y": 12, "flags": 1}, + {"matrix": [1, 7], "x": 13, "y": 12, "flags": 1}, + {"matrix": [1, 8], "x": 26, "y": 12, "flags": 1}, + {"matrix": [1, 9], "x": 39, "y": 12, "flags": 1}, + {"matrix": [2, 0], "x": 52, "y": 12, "flags": 1}, + {"matrix": [2, 1], "x": 65, "y": 12, "flags": 1}, + {"matrix": [2, 2], "x": 78, "y": 12, "flags": 1}, + {"matrix": [2, 3], "x": 91, "y": 12, "flags": 1}, + {"matrix": [2, 4], "x": 104, "y": 12, "flags": 1}, + {"matrix": [2, 5], "x": 117, "y": 12, "flags": 1}, + {"matrix": [2, 6], "x": 130, "y": 12, "flags": 1}, + {"matrix": [2, 7], "x": 143, "y": 12, "flags": 1}, + {"matrix": [2, 8], "x": 156, "y": 12, "flags": 1}, + {"matrix": [2, 9], "x": 169, "y": 12, "flags": 1}, + {"matrix": [3, 0], "x": 182, "y": 24, "flags": 1}, + {"matrix": [3, 1], "x": 195, "y": 12, "flags": 1}, + {"matrix": [3, 2], "x": 208, "y": 12, "flags": 1}, + {"matrix": [3, 3], "x": 224, "y": 12, "flags": 1}, + {"matrix": [3, 4], "x": 0, "y": 24, "flags": 1}, + {"matrix": [3, 5], "x": 13, "y": 24, "flags": 1}, + {"matrix": [3, 6], "x": 26, "y": 24, "flags": 1}, + {"matrix": [3, 7], "x": 39, "y": 24, "flags": 1}, + {"matrix": [3, 8], "x": 52, "y": 24, "flags": 1}, + {"matrix": [3, 9], "x": 65, "y": 24, "flags": 1}, + {"matrix": [4, 0], "x": 78, "y": 24, "flags": 1}, + {"matrix": [4, 1], "x": 91, "y": 24, "flags": 1}, + {"matrix": [4, 2], "x": 104, "y": 24, "flags": 1}, + {"matrix": [4, 3], "x": 117, "y": 24, "flags": 1}, + {"matrix": [4, 4], "x": 130, "y": 24, "flags": 1}, + {"matrix": [4, 5], "x": 143, "y": 24, "flags": 1}, + {"matrix": [4, 6], "x": 156, "y": 24, "flags": 1}, + {"matrix": [4, 7], "x": 169, "y": 24, "flags": 1}, + {"matrix": [4, 8], "x": 195, "y": 24, "flags": 1}, + {"matrix": [4, 9], "x": 208, "y": 24, "flags": 1}, + {"matrix": [5, 0], "x": 224, "y": 24, "flags": 1}, + {"matrix": [5, 1], "x": 0, "y": 36, "flags": 1}, + {"matrix": [5, 2], "x": 13, "y": 36, "flags": 1}, + {"matrix": [5, 3], "x": 26, "y": 36, "flags": 1}, + {"matrix": [5, 4], "x": 39, "y": 36, "flags": 1}, + {"matrix": [5, 5], "x": 52, "y": 36, "flags": 1}, + {"matrix": [5, 6], "x": 65, "y": 36, "flags": 1}, + {"matrix": [5, 7], "x": 78, "y": 36, "flags": 1}, + {"matrix": [5, 8], "x": 91, "y": 36, "flags": 1}, + {"matrix": [5, 9], "x": 104, "y": 36, "flags": 1}, + {"matrix": [6, 0], "x": 117, "y": 36, "flags": 1}, + {"matrix": [6, 1], "x": 130, "y": 36, "flags": 1}, + {"matrix": [6, 2], "x": 143, "y": 36, "flags": 1}, + {"matrix": [6, 3], "x": 156, "y": 36, "flags": 1}, + {"matrix": [6, 4], "x": 169, "y": 36, "flags": 1}, + {"matrix": [6, 5], "x": 0, "y": 48, "flags": 1}, + {"matrix": [6, 6], "x": 13, "y": 48, "flags": 1}, + {"matrix": [6, 7], "x": 26, "y": 48, "flags": 1}, + {"matrix": [6, 8], "x": 39, "y": 48, "flags": 1}, + {"matrix": [6, 9], "x": 52, "y": 48, "flags": 1}, + {"matrix": [7, 0], "x": 65, "y": 48, "flags": 1}, + {"matrix": [7, 1], "x": 78, "y": 48, "flags": 1}, + {"matrix": [7, 2], "x": 91, "y": 48, "flags": 1}, + {"matrix": [7, 3], "x": 104, "y": 48, "flags": 1}, + {"matrix": [7, 4], "x": 117, "y": 48, "flags": 1}, + {"matrix": [7, 5], "x": 130, "y": 48, "flags": 1}, + {"matrix": [7, 6], "x": 143, "y": 48, "flags": 1}, + {"matrix": [7, 7], "x": 156, "y": 48, "flags": 1}, + {"matrix": [7, 8], "x": 169, "y": 48, "flags": 1}, + {"matrix": [7, 9], "x": 208, "y": 48, "flags": 1}, + {"matrix": [8, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [8, 1], "x": 13, "y": 64, "flags": 1}, + {"matrix": [8, 2], "x": 26, "y": 64, "flags": 1}, + {"matrix": [8, 3], "x": 78, "y": 64, "flags": 1}, + {"matrix": [8, 4], "x": 130, "y": 64, "flags": 1}, + {"matrix": [8, 5], "x": 143, "y": 64, "flags": 1}, + {"matrix": [8, 6], "x": 156, "y": 64, "flags": 1}, + {"matrix": [8, 7], "x": 169, "y": 64, "flags": 1}, + {"matrix": [8, 8], "x": 195, "y": 64, "flags": 1}, + {"matrix": [8, 9], "x": 208, "y": 64, "flags": 1}, + {"matrix": [9, 0], "x": 224, "y": 64, "flags": 1}, + {"matrix": [9, 1], "x": 182, "y": 0, "flags": 1} + ], "max_brightness": 200, "sleep": true }, diff --git a/keyboards/concreteflowers/cor_tkl/cor_tkl.c b/keyboards/concreteflowers/cor_tkl/cor_tkl.c index d4f0ec0082..a90931439b 100644 --- a/keyboards/concreteflowers/cor_tkl/cor_tkl.c +++ b/keyboards/concreteflowers/cor_tkl/cor_tkl.c @@ -16,22 +16,6 @@ #include "quantum.h" -led_config_t g_led_config = {{ - // Key Matrix to LED Index - { 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, 1, 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 }, - { 0, 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 } -}, { - // LED Index to Physical Position - { 5, 40 }, { 211, 0 } -}, { - // LED Index to Flag - LED_FLAG_INDICATOR, LED_FLAG_INDICATOR -}}; - bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { return false; diff --git a/keyboards/concreteflowers/cor_tkl/keyboard.json b/keyboards/concreteflowers/cor_tkl/keyboard.json index d5a293eaa3..ccdd0935fa 100644 --- a/keyboards/concreteflowers/cor_tkl/keyboard.json +++ b/keyboards/concreteflowers/cor_tkl/keyboard.json @@ -32,7 +32,11 @@ "rows": ["GP0", "GP1", "GP2", "GP21", "GP3", "GP4"] }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 8} + ] }, "ws2812": { "pin": "GP19", From 330d195f9a6880ee2212be512ab9e2ae5765f733 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 02:58:45 -0600 Subject: [PATCH 08/95] Migrate `g_led_config` to DD (D) (#25560) --- keyboards/deng/djam/djam.c | 43 --------- keyboards/deng/djam/keyboard.json | 35 +++++++- keyboards/deng/thirty/keyboard.json | 32 +++++++ keyboards/deng/thirty/thirty.c | 32 ------- keyboards/doro67/rgb/keyboard.json | 71 ++++++++++++++- keyboards/doro67/rgb/rgb.c | 46 ---------- keyboards/dotmod/dymium65/dymium65.c | 24 ----- keyboards/dotmod/dymium65/keyboard.json | 68 ++++++++++++++ keyboards/dtisaac/dosa40rgb/dosa40rgb.c | 39 -------- keyboards/dtisaac/dosa40rgb/keyboard.json | 44 ++++++++++ keyboards/dumbpad/v3x/keyboard.json | 18 ++++ keyboards/dumbpad/v3x/v3x.c | 30 ------- keyboards/durgod/dgk6x/galaxy/galaxy.c | 25 +----- keyboards/durgod/dgk6x/galaxy/keyboard.json | 88 +++++++++++++++++++ .../durgod/dgk6x/hades_ansi/hades_ansi.c | 22 +---- .../durgod/dgk6x/hades_ansi/keyboard.json | 72 +++++++++++++++ keyboards/durgod/dgk6x/venus/keyboard.json | 65 ++++++++++++++ keyboards/durgod/dgk6x/venus/venus.c | 20 ----- keyboards/dztech/dz60rgb/dz60rgb.c | 22 ----- keyboards/dztech/dz60rgb/info.json | 67 ++++++++++++++ keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c | 22 ----- keyboards/dztech/dz60rgb_ansi/info.json | 65 ++++++++++++++ keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c | 22 ----- keyboards/dztech/dz60rgb_wkl/info.json | 66 ++++++++++++++ keyboards/dztech/dz64rgb/dz64rgb.c | 23 ----- keyboards/dztech/dz64rgb/keyboard.json | 66 ++++++++++++++ keyboards/dztech/dz65rgb/v1/keyboard.json | 70 +++++++++++++++ keyboards/dztech/dz65rgb/v1/v1.c | 23 ----- keyboards/dztech/dz65rgb/v2/keyboard.json | 70 +++++++++++++++ keyboards/dztech/dz65rgb/v2/v2.c | 23 ----- keyboards/dztech/dz65rgb/v3/keyboard.json | 70 +++++++++++++++ keyboards/dztech/dz65rgb/v3/v3.c | 20 ----- 32 files changed, 967 insertions(+), 436 deletions(-) delete mode 100644 keyboards/deng/djam/djam.c delete mode 100644 keyboards/doro67/rgb/rgb.c delete mode 100644 keyboards/dtisaac/dosa40rgb/dosa40rgb.c diff --git a/keyboards/deng/djam/djam.c b/keyboards/deng/djam/djam.c deleted file mode 100644 index 3514ff050c..0000000000 --- a/keyboards/deng/djam/djam.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2022 Leo Deng (@myst729) - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - /* Key Matrix to LED Index */ - { 17, 16, 15, NO_LED, NO_LED, 7, 6, 5 }, - { 21, 17, 16, 15, 7, 6, 5, 1 }, - { 19, 18, 13, 11, 9, 4, 3, NO_LED } - }, - { - /* LED Index to Physical Position */ - // Switch LEDs - {224,14}, {224,24}, {224,33}, {212,57}, {192,57}, {192,38}, {172,38}, {152,38}, - {152,57}, {142,57}, {132,57}, {112,57}, {92,57}, {82,57}, {72,57}, - {72,38}, {52,38}, {32,38}, {32,57}, {12,57}, {0,33}, {0,24}, {0,14}, - // Underglow LEDs - {0,0}, {92,0}, {132,0}, {224,0}, {222,64}, {172,64}, {72,64}, {2,64}, - }, - { - /* LED Index to Flag */ - 2, 4, 2, 4, 4, 4, 4, 4, - 2, 4, 2, 4, 2, 4, 2, - 4, 4, 4, 4, 4, 2, 4, 2, - 2, 2, 2, 2, 2, 2, 2, 2 - } -}; -#endif diff --git a/keyboards/deng/djam/keyboard.json b/keyboards/deng/djam/keyboard.json index a39c234bfa..51b2f45ce7 100644 --- a/keyboards/deng/djam/keyboard.json +++ b/keyboards/deng/djam/keyboard.json @@ -15,7 +15,40 @@ "solid_reactive_multinexus": true, "solid_multisplash": true }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"x": 224, "y": 14, "flags": 2}, + {"matrix": [1, 7], "x": 224, "y": 24, "flags": 4}, + {"x": 224, "y": 33, "flags": 2}, + {"matrix": [2, 6], "x": 212, "y": 57, "flags": 4}, + {"matrix": [2, 5], "x": 192, "y": 57, "flags": 4}, + {"matrix": [1, 6], "x": 192, "y": 38, "flags": 4}, + {"matrix": [1, 5], "x": 172, "y": 38, "flags": 4}, + {"matrix": [1, 4], "x": 152, "y": 38, "flags": 4}, + {"x": 152, "y": 57, "flags": 2}, + {"matrix": [2, 4], "x": 142, "y": 57, "flags": 4}, + {"x": 132, "y": 57, "flags": 2}, + {"matrix": [2, 3], "x": 112, "y": 57, "flags": 4}, + {"x": 92, "y": 57, "flags": 2}, + {"matrix": [2, 2], "x": 82, "y": 57, "flags": 4}, + {"x": 72, "y": 57, "flags": 2}, + {"matrix": [1, 3], "x": 72, "y": 38, "flags": 4}, + {"matrix": [1, 2], "x": 52, "y": 38, "flags": 4}, + {"matrix": [1, 1], "x": 32, "y": 38, "flags": 4}, + {"matrix": [2, 1], "x": 32, "y": 57, "flags": 4}, + {"matrix": [2, 0], "x": 12, "y": 57, "flags": 4}, + {"x": 0, "y": 33, "flags": 2}, + {"matrix": [1, 0], "x": 0, "y": 24, "flags": 4}, + {"x": 0, "y": 14, "flags": 2}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 92, "y": 0, "flags": 2}, + {"x": 132, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 222, "y": 64, "flags": 2}, + {"x": 172, "y": 64, "flags": 2}, + {"x": 72, "y": 64, "flags": 2}, + {"x": 2, "y": 64, "flags": 2} + ] }, "features": { "backlight": true, diff --git a/keyboards/deng/thirty/keyboard.json b/keyboards/deng/thirty/keyboard.json index da36ae19f5..394d7b427b 100644 --- a/keyboards/deng/thirty/keyboard.json +++ b/keyboards/deng/thirty/keyboard.json @@ -57,6 +57,38 @@ "animation": "cycle_all" }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 4, "y": 4, "flags": 4}, + {"matrix": [0, 1], "x": 28, "y": 4, "flags": 4}, + {"matrix": [0, 2], "x": 52, "y": 4, "flags": 4}, + {"matrix": [0, 3], "x": 76, "y": 4, "flags": 4}, + {"matrix": [0, 4], "x": 100, "y": 4, "flags": 4}, + {"matrix": [1, 4], "x": 100, "y": 32, "flags": 4}, + {"matrix": [1, 3], "x": 76, "y": 32, "flags": 4}, + {"matrix": [1, 2], "x": 52, "y": 32, "flags": 4}, + {"matrix": [1, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 4, "y": 60, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 60, "flags": 4}, + {"matrix": [2, 2], "x": 52, "y": 60, "flags": 4}, + {"matrix": [2, 3], "x": 76, "y": 60, "flags": 4}, + {"matrix": [2, 4], "x": 100, "y": 60, "flags": 4}, + {"matrix": [5, 4], "x": 124, "y": 60, "flags": 4}, + {"matrix": [5, 3], "x": 148, "y": 60, "flags": 4}, + {"matrix": [5, 2], "x": 172, "y": 60, "flags": 4}, + {"matrix": [5, 1], "x": 196, "y": 60, "flags": 4}, + {"matrix": [5, 0], "x": 220, "y": 60, "flags": 4}, + {"matrix": [4, 0], "x": 220, "y": 32, "flags": 4}, + {"matrix": [4, 1], "x": 196, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 172, "y": 32, "flags": 4}, + {"matrix": [4, 3], "x": 148, "y": 32, "flags": 4}, + {"matrix": [4, 4], "x": 124, "y": 32, "flags": 4}, + {"matrix": [3, 4], "x": 124, "y": 4, "flags": 4}, + {"matrix": [3, 3], "x": 148, "y": 4, "flags": 4}, + {"matrix": [3, 2], "x": 172, "y": 4, "flags": 4}, + {"matrix": [3, 1], "x": 196, "y": 4, "flags": 4}, + {"matrix": [3, 0], "x": 220, "y": 4, "flags": 4} + ], "max_brightness": 200 }, "matrix_pins": { diff --git a/keyboards/deng/thirty/thirty.c b/keyboards/deng/thirty/thirty.c index 7d49bc1b03..ce7a76c703 100644 --- a/keyboards/deng/thirty/thirty.c +++ b/keyboards/deng/thirty/thirty.c @@ -15,38 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - /* Key Matrix to LED Index */ - { 0, 1, 2, 3, 4 }, - { 9, 8, 7, 6, 5 }, - { 10, 11, 12, 13, 14 }, - { 29, 28, 27, 26, 25 }, - { 20, 21, 22, 23, 24 }, - { 19, 18, 17, 16, 15 }, - }, - { - /* LED Index to Physical Position */ - // Switch LEDs - {4,4}, {28,4}, {52,4}, {76,4}, {100,4}, - {100,32}, {76,32}, {52,32}, {28,32}, {4,32}, - {4,60}, {28,60}, {52,60}, {76,60}, {100,60}, - {124,60}, {148,60}, {172,60}, {196,60}, {220,60}, - {220,32}, {196,32}, {172,32}, {148,32}, {124,32}, - {124,4}, {148,4}, {172,4}, {196,4}, {220,4}, - // Underglow LEDs - }, - { - /* 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, 4, 4, 4, 4, 4, 4, 4, 4, 4 - } -}; - -#endif - void board_init(void) { // Remap B11 AF to TIM2_CH4 AFIO->MAPR |= AFIO_MAPR_TIM2_REMAP_PARTIALREMAP2; diff --git a/keyboards/doro67/rgb/keyboard.json b/keyboards/doro67/rgb/keyboard.json index de95db63d6..46f1d775ab 100644 --- a/keyboards/doro67/rgb/keyboard.json +++ b/keyboards/doro67/rgb/keyboard.json @@ -51,7 +51,76 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "ws2812" + "driver": "ws2812", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 11, "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 198, "y": 32, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 18, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 30, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 60, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 105, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 120, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 135, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 150, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 191, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] }, "features": { "bootmagic": true, diff --git a/keyboards/doro67/rgb/rgb.c b/keyboards/doro67/rgb/rgb.c deleted file mode 100644 index 280c1b6774..0000000000 --- a/keyboards/doro67/rgb/rgb.c +++ /dev/null @@ -1,46 +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" - -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, NO_LED, 42, 43 }, - { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }, - { 58, 59, 60, 61, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 62, 63, NO_LED, 64, 65, 66 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins - { 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 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del - { 7, 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 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, { 225, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, { 225, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1 -} }; diff --git a/keyboards/dotmod/dymium65/dymium65.c b/keyboards/dotmod/dymium65/dymium65.c index 45eaa0251c..fd3bab633e 100644 --- a/keyboards/dotmod/dymium65/dymium65.c +++ b/keyboards/dotmod/dymium65/dymium65.c @@ -18,30 +18,6 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - {0, 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, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NO_LED, NO_LED}, - {28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, NO_LED, NO_LED}, - {29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED, 41, 14, 42}, - {55, NO_LED, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, NO_LED, 44, 43, NO_LED}, - {56, 57, 58, NO_LED, NO_LED, NO_LED, 59, NO_LED, NO_LED, 60, 61, NO_LED, 62, 63, 64, 65} - }, { - {14, 0}, {28, 0}, {42, 0}, {56, 0}, {70, 0}, {84, 0}, {98, 0}, {112, 0}, {126, 0}, {140, 0}, {154, 0}, {168, 0}, {182, 0},{196, 0}, - {224, 16},{196, 16},{182, 16},{168, 16},{154, 16},{140, 16},{126, 16},{112, 16}, {98, 16}, {84, 16}, {70, 16}, {56, 16}, {42, 16} ,{28, 16}, {14, 16}, - {14, 32}, {28, 32}, {42, 32}, {56, 32}, {70, 32}, {84, 32}, {98, 32}, {112, 32}, {126, 32}, {140, 32}, {154, 32}, {168, 32}, {196, 32}, {224, 32}, - {224, 48}, {196, 48},{168, 48},{154, 48},{140, 48},{126, 48},{112, 48}, {98, 48}, {84, 48}, {70, 48}, {56, 48}, {42, 48}, {14, 48}, - {14, 64}, {28, 64}, {42, 64}, {98, 64}, {140, 64}, {154, 64}, {168, 64}, {182, 64},{196, 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, 12, 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 - } -}; - bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { return false; diff --git a/keyboards/dotmod/dymium65/keyboard.json b/keyboards/dotmod/dymium65/keyboard.json index a76bc91cd6..8ef9587489 100644 --- a/keyboards/dotmod/dymium65/keyboard.json +++ b/keyboards/dotmod/dymium65/keyboard.json @@ -68,6 +68,74 @@ "solid_reactive_nexus": true, "splash": true }, + "layout": [ + {"matrix": [0, 0], "x": 14, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 28, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 42, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 70, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 84, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [1, 8], "x": 126, "y": 0, "flags": 4}, + {"matrix": [1, 9], "x": 140, "y": 0, "flags": 4}, + {"matrix": [1, 10], "x": 154, "y": 0, "flags": 4}, + {"matrix": [1, 11], "x": 168, "y": 0, "flags": 4}, + {"matrix": [1, 12], "x": 182, "y": 0, "flags": 4}, + {"matrix": [1, 13], "x": 196, "y": 0, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 13], "x": 196, "y": 16, "flags": 4}, + {"matrix": [2, 12], "x": 182, "y": 16, "flags": 4}, + {"matrix": [2, 11], "x": 168, "y": 16, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 16, "flags": 4}, + {"matrix": [2, 9], "x": 140, "y": 16, "flags": 4}, + {"matrix": [2, 8], "x": 126, "y": 16, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 16, "flags": 4}, + {"matrix": [2, 4], "x": 70, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 42, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 14, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 14, "y": 32, "flags": 12}, + {"matrix": [3, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [3, 2], "x": 42, "y": 32, "flags": 4}, + {"matrix": [3, 3], "x": 56, "y": 32, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 32, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 32, "flags": 4}, + {"matrix": [3, 6], "x": 98, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [3, 8], "x": 126, "y": 32, "flags": 4}, + {"matrix": [3, 9], "x": 140, "y": 32, "flags": 4}, + {"matrix": [3, 10], "x": 154, "y": 32, "flags": 4}, + {"matrix": [3, 11], "x": 168, "y": 32, "flags": 4}, + {"matrix": [3, 13], "x": 196, "y": 32, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 32, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 13], "x": 196, "y": 48, "flags": 4}, + {"matrix": [4, 11], "x": 168, "y": 48, "flags": 4}, + {"matrix": [4, 10], "x": 154, "y": 48, "flags": 4}, + {"matrix": [4, 9], "x": 140, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 126, "y": 48, "flags": 4}, + {"matrix": [4, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 98, "y": 48, "flags": 4}, + {"matrix": [4, 5], "x": 84, "y": 48, "flags": 4}, + {"matrix": [4, 4], "x": 70, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 56, "y": 48, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 14, "y": 48, "flags": 4}, + {"matrix": [5, 0], "x": 14, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 28, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 42, "y": 64, "flags": 4}, + {"matrix": [5, 6], "x": 98, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 140, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 154, "y": 64, "flags": 4}, + {"matrix": [5, 12], "x": 168, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 182, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 196, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 4} + ], "max_brightness": 200, "react_on_keyup": true }, diff --git a/keyboards/dtisaac/dosa40rgb/dosa40rgb.c b/keyboards/dtisaac/dosa40rgb/dosa40rgb.c deleted file mode 100644 index 35ae8eb018..0000000000 --- a/keyboards/dtisaac/dosa40rgb/dosa40rgb.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2021 DTIsaac - * - * 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 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}, - {22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12 }, - {23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33}, - {41, 40, 39, NO_LED, 38, NO_LED, 37, 36, 35, 34, 11} -}, { - //LED Index to Physical Positon - { 0, 0}, { 20, 0}, { 40, 0 }, { 61, 0 }, { 81, 0}, { 101, 0}, { 122, 0}, { 142, 0}, { 162, 0}, { 183, 0}, { 203, 0}, { 224, 0}, - {203, 21}, {183, 21}, {162,21 }, {142, 21}, {122,21}, { 101,21}, { 81 ,21}, { 61 ,21}, { 40 ,21}, { 20 ,21}, { 0 ,21}, - { 0, 42}, { 20, 42}, { 40,42 }, { 61, 42}, { 81,42}, { 101,42}, { 122,42}, { 142,42}, { 162,42}, { 183,42}, { 203,42}, - {203, 64}, {183, 64}, {162,64 }, {122, 64}, { 81,64}, { 40, 64}, { 20, 64}, { 0, 64}, -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, -} }; - -#endif \ No newline at end of file diff --git a/keyboards/dtisaac/dosa40rgb/keyboard.json b/keyboards/dtisaac/dosa40rgb/keyboard.json index 4f5522947a..29a63e80f3 100644 --- a/keyboards/dtisaac/dosa40rgb/keyboard.json +++ b/keyboards/dtisaac/dosa40rgb/keyboard.json @@ -62,6 +62,50 @@ "animation": "cycle_pinwheel" }, "driver": "ws2812", + "layout": [ + {"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": [3, 10], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 10], "x": 203, "y": 21, "flags": 1}, + {"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": [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": 1}, + {"matrix": [3, 9], "x": 203, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 183, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 162, "y": 64, "flags": 1}, + {"matrix": [3, 6], "x": 122, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 81, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1} + ], "max_brightness": 150, "react_on_keyup": true }, diff --git a/keyboards/dumbpad/v3x/keyboard.json b/keyboards/dumbpad/v3x/keyboard.json index 58b8da5b3a..0e1c5bc791 100644 --- a/keyboards/dumbpad/v3x/keyboard.json +++ b/keyboards/dumbpad/v3x/keyboard.json @@ -36,6 +36,24 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 1], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 224, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 149, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 75, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 0, "y": 21, "flags": 4}, + {"matrix": [2, 1], "x": 0, "y": 43, "flags": 4}, + {"matrix": [2, 2], "x": 75, "y": 43, "flags": 4}, + {"matrix": [2, 3], "x": 149, "y": 43, "flags": 4}, + {"matrix": [2, 4], "x": 224, "y": 43, "flags": 4}, + {"matrix": [3, 4], "x": 224, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 149, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 75, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 0, "y": 64, "flags": 4} + ], "timeout": 300000, "sleep": true }, diff --git a/keyboards/dumbpad/v3x/v3x.c b/keyboards/dumbpad/v3x/v3x.c index 181e9d4a0d..ebc829d91a 100644 --- a/keyboards/dumbpad/v3x/v3x.c +++ b/keyboards/dumbpad/v3x/v3x.c @@ -16,36 +16,6 @@ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = {{// Key Matrix to LED Index - {NO_LED, 0, 1, 2, 3}, - {NO_LED, 7, 6, 5, 4}, - {NO_LED, 8, 9, 10, 11}, - {NO_LED, 15, 14, 13, 12}}, - {// LED Index to Physical Position - {0, 0}, - {75, 0}, - {149, 0}, - {224, 0}, - - {224, 21}, - {149, 21}, - {75, 21}, - {0, 21}, - - {0, 43}, - {75, 43}, - {149, 43}, - {224, 43}, - - {224, 64}, - {149, 64}, - {75, 64}, - {0, 64}}, - {// LED Index to Flag - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}}; -#endif - void keyboard_pre_init_kb(void) { // Set LED IO as outputs gpio_set_pin_output(LED_00); diff --git a/keyboards/durgod/dgk6x/galaxy/galaxy.c b/keyboards/durgod/dgk6x/galaxy/galaxy.c index 5d08163109..a0f5126bf6 100644 --- a/keyboards/durgod/dgk6x/galaxy/galaxy.c +++ b/keyboards/durgod/dgk6x/galaxy/galaxy.c @@ -1,4 +1,4 @@ -/* Copyright 2021 Don Kjer +/* Copyright 2021 Don Kjer * * 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 @@ -116,27 +116,4 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {1, SW6_CS14, SW5_CS14, SW4_CS14}, // Down {1, SW6_CS15, SW5_CS15, SW4_CS15} // Right }; - -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, NO_LED }, - { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, NO_LED }, - { 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NO_LED, 58, 59, NO_LED }, - { 60, NO_LED, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, NO_LED }, - { 74, 75, 76, NO_LED, NO_LED, NO_LED, 77, NO_LED, NO_LED, 78, 79, 80, 81, 82, 83, NO_LED } -}, { - { 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 }, { 208, 0 }, { 224, 0 }, { 240, 0 }, - { 0, 13 }, { 16, 13 }, { 32, 13 }, { 48, 13 }, { 64, 13 }, { 80, 13 }, { 96, 13 }, { 112, 13 }, { 128, 13 }, { 144, 13 }, { 160, 13 }, { 176, 13 }, { 192, 13 }, { 216, 13 }, { 240, 13 }, - { 4, 26 }, { 24, 26 }, { 40, 26 }, { 56, 26 }, { 72, 26 }, { 88, 26 }, { 104, 26 }, { 120, 26 }, { 136, 26 }, { 152, 26 }, { 168, 26 }, { 184, 26 }, { 200, 26 }, { 220, 26 }, { 240, 26 }, - { 6, 38 }, { 28, 38 }, { 44, 38 }, { 60, 38 }, { 76, 38 }, { 92, 38 }, { 108, 38 }, { 124, 38 }, { 140, 38 }, { 156, 38 }, { 172, 38 }, { 188, 38 }, { 214, 38 }, { 240, 38 }, - { 10, 51 }, { 36, 51 }, { 52, 51 }, { 68, 51 }, { 84, 51 }, { 100, 51 }, { 116, 51 }, { 132, 51 }, { 148, 51 }, { 164, 51 }, { 180, 51 }, { 202, 51 }, { 224, 51 }, { 240, 51 }, - { 2, 64 }, { 22, 64 }, { 42, 64 }, { 101, 64 }, { 160, 64 }, { 176, 64 }, { 192, 64 }, { 208, 64 }, { 224, 64 }, { 240, 64 } -}, { - 1, 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, 1, 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, 1, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 4, 4, 4 -}}; #endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/durgod/dgk6x/galaxy/keyboard.json b/keyboards/durgod/dgk6x/galaxy/keyboard.json index 4f80ef9d51..7421f70481 100644 --- a/keyboards/durgod/dgk6x/galaxy/keyboard.json +++ b/keyboards/durgod/dgk6x/galaxy/keyboard.json @@ -13,6 +13,94 @@ "rows": ["A0", "A1", "A2", "A3", "A4", "A5"] }, "diode_direction": "ROW2COL", + "rgb_matrix": { + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 195, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 210, "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": 135, "y": 13, "flags": 4}, + {"matrix": [1, 10], "x": 150, "y": 13, "flags": 4}, + {"matrix": [1, 11], "x": 165, "y": 13, "flags": 4}, + {"matrix": [1, 12], "x": 180, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 202, "y": 13, "flags": 1}, + {"matrix": [1, 14], "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, 13], "x": 205, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 26, "flags": 4}, + {"matrix": [3, 0], "x": 6, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 28, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 43, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 58, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 73, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 88, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 103, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 118, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 133, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 148, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 163, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 178, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 200, "y": 38, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 38, "flags": 4}, + {"matrix": [4, 0], "x": 10, "y": 51, "flags": 1}, + {"matrix": [4, 2], "x": 36, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 51, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 66, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 81, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 111, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 126, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 141, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 156, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 171, "y": 51, "flags": 4}, + {"matrix": [4, 12], "x": 192, "y": 51, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 51, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 51, "flags": 4}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 38, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 98, "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} + ] + }, "community_layouts": ["75_ansi"], "layouts": { "LAYOUT_75_ansi": { diff --git a/keyboards/durgod/dgk6x/hades_ansi/hades_ansi.c b/keyboards/durgod/dgk6x/hades_ansi/hades_ansi.c index d092310814..d62acf1bc3 100644 --- a/keyboards/durgod/dgk6x/hades_ansi/hades_ansi.c +++ b/keyboards/durgod/dgk6x/hades_ansi/hades_ansi.c @@ -1,4 +1,4 @@ -/* Copyright 2021 Jessica Sullivan and Don Kjer +/* Copyright 2021 Jessica Sullivan and Don Kjer * * 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 @@ -100,24 +100,4 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {1, SW3_CS14, SW2_CS14, SW1_CS14}, // DOWN {1, SW3_CS15, SW2_CS15, SW1_CS15} // RIGHT }; - -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, NO_LED, 42, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 } -}, { - { 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 }, { 240, 0 }, - { 4, 16 }, { 24, 16 }, { 40, 16 }, { 56, 16 }, { 72, 16 }, { 88, 16 }, { 104, 16 }, { 120, 16 }, { 136, 16 }, { 152, 16 }, { 168, 16 }, { 184, 16 }, { 200, 16 }, { 220, 16 }, { 240, 16 }, - { 6, 32 }, { 28, 32 }, { 44, 32 }, { 60, 32 }, { 76, 32 }, { 92, 32 }, { 108, 32 }, { 124, 32 }, { 140, 32 }, { 156, 32 }, { 172, 32 }, { 188, 32 }, { 214, 32 }, { 240, 32 }, - { 10, 48 }, { 36, 48 }, { 52, 48 }, { 68, 48 }, { 84, 48 }, { 100, 48 }, { 116, 48 }, { 132, 48 }, { 148, 48 }, { 164, 48 }, { 180, 48 }, { 202, 48 }, { 224, 48 }, { 240, 48 }, - { 2, 64 }, { 22, 64 }, { 42, 64 }, { 101, 64 }, { 160, 64 }, { 176, 64 }, { 192, 64 }, { 208, 64 }, { 224, 64 }, { 240, 64 } -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 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, 1, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 4, 4, 4 -}}; #endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/durgod/dgk6x/hades_ansi/keyboard.json b/keyboards/durgod/dgk6x/hades_ansi/keyboard.json index 00cfcdc5f0..7a41352d20 100644 --- a/keyboards/durgod/dgk6x/hades_ansi/keyboard.json +++ b/keyboards/durgod/dgk6x/hades_ansi/keyboard.json @@ -13,6 +13,78 @@ "rows": ["A0", "A1", "A2", "A3", "A4"] }, "diode_direction": "ROW2COL", + "rgb_matrix": { + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 4}, + {"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, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 43, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 58, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 73, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 88, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 103, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 118, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 133, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 148, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 163, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 178, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 200, "y": 32, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 51, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 66, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 81, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 111, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 126, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 141, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 156, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 171, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 192, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 209, "y": 48, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 38, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 98, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 149, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 164, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 179, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 194, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 209, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4} + ] + }, "community_layouts": ["65_ansi"], "layouts": { "LAYOUT_65_ansi": { diff --git a/keyboards/durgod/dgk6x/venus/keyboard.json b/keyboards/durgod/dgk6x/venus/keyboard.json index cc7b321e23..a32a5b1065 100644 --- a/keyboards/durgod/dgk6x/venus/keyboard.json +++ b/keyboards/durgod/dgk6x/venus/keyboard.json @@ -13,6 +13,71 @@ "rows": ["A0", "A1", "A2", "A3", "A4"] }, "diode_direction": "ROW2COL", + "rgb_matrix": { + "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": 4}, + {"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": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 4}, + {"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, 13], "x": 214, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 210, "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": 162, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 182, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 202, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 222, "y": 64, "flags": 1} + ] + }, "community_layouts": ["60_ansi"], "layouts": { "LAYOUT_60_ansi": { diff --git a/keyboards/durgod/dgk6x/venus/venus.c b/keyboards/durgod/dgk6x/venus/venus.c index 5433266e3b..30735fc80e 100644 --- a/keyboards/durgod/dgk6x/venus/venus.c +++ b/keyboards/durgod/dgk6x/venus/venus.c @@ -92,24 +92,4 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {1, SW3_CS12, SW2_CS12, SW1_CS12}, // RCtrl/Fn2 {1, SW3_CS13, SW2_CS13, SW1_CS13}, // LEFT/RCtrl }; - -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, NO_LED, 40 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, NO_LED, NO_LED }, - { 53, 54, 55, NO_LED, NO_LED, 56, NO_LED, NO_LED, NO_LED, 57, 58, 59, 60, NO_LED } -}, { - { 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 }, { 24, 16 }, { 40, 16 }, { 56, 16 }, { 72, 16 }, { 88, 16 }, { 104, 16 }, { 120, 16 }, { 136, 16 }, { 152, 16 }, { 168, 16 }, { 184, 16 }, { 200, 16 }, { 220, 16 }, - { 6, 32 }, { 28, 32 }, { 44, 32 }, { 60, 32 }, { 76, 32 }, { 92, 32 }, { 108, 32 }, { 124, 32 }, { 140, 32 }, { 156, 32 }, { 172, 32 }, { 188, 32 }, { 214, 32 }, - { 10, 48 }, { 36, 48 }, { 52, 48 }, { 68, 48 }, { 84, 48 }, { 100, 48 }, { 116, 48 }, { 132, 48 }, { 148, 48 }, { 164, 48 }, { 180, 48 }, { 210, 48 }, - { 2, 64 }, { 22, 64 }, { 42, 64 }, { 102, 64 }, { 162, 64 }, { 182, 64 }, { 202, 64 }, { 222, 64 }, -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 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, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1 -} }; #endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index 207fccd4f9..e729f6d578 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -71,28 +71,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW11_CS16, SW10_CS16, SW12_CS16 } }; -led_config_t g_led_config = { - { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, - { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 }, - { 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 } - }, { - { 216, 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 }, { 0, 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 }, - { 214, 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 }, { 208, 48 }, { 186, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 36, 48 }, { 9, 48 }, - { 224, 64 }, { 208, 64 }, { 192, 64 }, { 176, 64 }, { 160, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } - }, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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, 1, - 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 4, 1, 1, 1 - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/dztech/dz60rgb/info.json b/keyboards/dztech/dz60rgb/info.json index 1bcc77c605..c4f87c70f0 100644 --- a/keyboards/dztech/dz60rgb/info.json +++ b/keyboards/dztech/dz60rgb/info.json @@ -5,6 +5,73 @@ "usb": { "vid": "0x445A" }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [2, 13], "x": 214, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 208, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 186, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 208, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 192, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 176, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c index cdc5148e11..20dd1a8b95 100644 --- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c +++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c @@ -69,28 +69,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW11_CS16, SW10_CS16, SW12_CS16 } }; -led_config_t g_led_config = { - { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, - { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, - { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } - }, { - { 216, 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 }, { 0, 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 }, - { 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, - { 210, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, - { 222, 64 }, { 202, 64 }, { 182, 64 }, { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 4, 1, 1, 1 - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/dztech/dz60rgb_ansi/info.json b/keyboards/dztech/dz60rgb_ansi/info.json index dddbd47315..b5f962b997 100644 --- a/keyboards/dztech/dz60rgb_ansi/info.json +++ b/keyboards/dztech/dz60rgb_ansi/info.json @@ -5,6 +5,71 @@ "usb": { "vid": "0x445A" }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [2, 13], "x": 214, "y": 24, "flags": 1}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [3, 11], "x": 210, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 20, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [4, 13], "x": 222, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 202, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 182, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 162, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1} + ] + }, "community_layouts": ["60_ansi"], "layouts": { "LAYOUT_60_ansi": { diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c index b5af34be38..59cbb09a1b 100644 --- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c @@ -70,28 +70,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW11_CS16, SW10_CS16, SW12_CS16 } }; -led_config_t g_led_config = { - { - { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, - { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, - { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 }, - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, - { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } - }, { - { 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 }, { 0, 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 }, { 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 }, { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } - }, { - 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, 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, 1, - 1, 1, 1, 4, 1, 1, 1 - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/dztech/dz60rgb_wkl/info.json b/keyboards/dztech/dz60rgb_wkl/info.json index a4dfb63c7a..d0d66d046c 100644 --- a/keyboards/dztech/dz60rgb_wkl/info.json +++ b/keyboards/dztech/dz60rgb_wkl/info.json @@ -5,6 +5,72 @@ "usb": { "vid": "0x445A" }, + "rgb_matrix": { + "layout": [ + {"matrix": [2, 12], "x": 224, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 208, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [2, 13], "x": 204, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 202, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 20, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [4, 13], "x": 218, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 198, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 178, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 46, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 26, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 6, "y": 64, "flags": 1} + ] + }, "community_layouts": ["60_ansi_tsangan_split_bs_rshift"], "layout_aliases": { "LAYOUT_HHKB": "LAYOUT_60_ansi_tsangan_split_bs_rshift", diff --git a/keyboards/dztech/dz64rgb/dz64rgb.c b/keyboards/dztech/dz64rgb/dz64rgb.c index e2512c72a5..788658bdce 100644 --- a/keyboards/dztech/dz64rgb/dz64rgb.c +++ b/keyboards/dztech/dz64rgb/dz64rgb.c @@ -88,29 +88,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW11_CS16, SW10_CS16, SW12_CS16 } }; -led_config_t g_led_config = { - { - { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41 }, - { 63, 62, 61, NO_LED, NO_LED, 60, NO_LED, NO_LED, 59, 58, 57, 56, NO_LED, 55 } - }, { - { 216, 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 }, { 0, 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 }, - { 214, 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 }, { 218, 48 }, { 192, 48 }, { 176, 48 }, { 160, 48 }, { 144, 48 }, { 128, 48 }, { 112, 48 }, { 96, 48 },{80, 48}, { 64, 48 }, { 48, 48 }, { 32, 48 }, { 8, 48 }, - { 224, 64 }, { 208, 64 }, { 192, 64 }, { 176, 64 }, { 160, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } - }, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1 - } -}; - - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/dztech/dz64rgb/keyboard.json b/keyboards/dztech/dz64rgb/keyboard.json index ef95b52400..926721a12e 100644 --- a/keyboards/dztech/dz64rgb/keyboard.json +++ b/keyboards/dztech/dz64rgb/keyboard.json @@ -40,6 +40,72 @@ "animation": "cycle_all" }, "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [2, 13], "x": 214, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 218, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 8, "y": 48, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 208, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 192, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 176, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 102, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1} + ], "sleep": true }, "matrix_pins": { diff --git a/keyboards/dztech/dz65rgb/v1/keyboard.json b/keyboards/dztech/dz65rgb/v1/keyboard.json index 32b830052d..cdbd9ae10d 100644 --- a/keyboards/dztech/dz65rgb/v1/keyboard.json +++ b/keyboards/dztech/dz65rgb/v1/keyboard.json @@ -39,6 +39,76 @@ "animation": "cycle_all" }, "driver": "is31fl3731", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "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, 5], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 165, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 180, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "led_process_limit": 4, "led_flush_limit": 26, "max_brightness": 200, diff --git a/keyboards/dztech/dz65rgb/v1/v1.c b/keyboards/dztech/dz65rgb/v1/v1.c index 6e8cf96e4c..e05e35b74b 100644 --- a/keyboards/dztech/dz65rgb/v1/v1.c +++ b/keyboards/dztech/dz65rgb/v1/v1.c @@ -91,29 +91,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { { 0, C9_16, C7_15, C6_15 } }; -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, NO_LED, 42, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, NO_LED, 66, 67 } - }, { - { 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 }, { 203, 0 }, { 224, 0 }, - { 4, 16 }, { 23, 16 }, { 38, 16 }, { 53, 16 }, { 68, 16 }, { 83, 16 }, { 98, 16 }, { 113, 16 }, { 128, 16 }, { 143, 16 }, { 158, 16 }, { 173, 16 }, { 188, 16 }, { 206, 16 }, { 224, 16 }, - { 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 }, { 224, 32 }, - { 9, 48 }, { 34, 48 }, { 49, 48 }, { 64, 48 }, { 79, 48 }, { 94, 48 }, { 109, 48 }, { 124, 48 }, { 139, 48 }, { 154, 48 }, { 169, 48 }, { 189, 48 }, { 210, 48 }, { 224, 48 }, - { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 150, 64 }, { 165, 64 }, { 180, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 } - }, { - 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, 1, 1, 1 - } -}; - - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/dztech/dz65rgb/v2/keyboard.json b/keyboards/dztech/dz65rgb/v2/keyboard.json index bf7331e101..7c922bc273 100644 --- a/keyboards/dztech/dz65rgb/v2/keyboard.json +++ b/keyboards/dztech/dz65rgb/v2/keyboard.json @@ -39,6 +39,76 @@ "animation": "cycle_all" }, "driver": "is31fl3731", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "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, 5], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 165, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 180, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "led_process_limit": 4, "led_flush_limit": 26, "max_brightness": 200, diff --git a/keyboards/dztech/dz65rgb/v2/v2.c b/keyboards/dztech/dz65rgb/v2/v2.c index a9f7fc104f..2591a4ddcb 100644 --- a/keyboards/dztech/dz65rgb/v2/v2.c +++ b/keyboards/dztech/dz65rgb/v2/v2.c @@ -91,29 +91,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { { 0, C9_16, C7_15, C6_15 } }; -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, NO_LED, 42, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, NO_LED, 66, 67 } - }, { - { 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 }, { 203, 0 }, { 224, 0 }, - { 4, 16 }, { 23, 16 }, { 38, 16 }, { 53, 16 }, { 68, 16 }, { 83, 16 }, { 98, 16 }, { 113, 16 }, { 128, 16 }, { 143, 16 }, { 158, 16 }, { 173, 16 }, { 188, 16 }, { 206, 16 }, { 224, 16 }, - { 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 }, { 224, 32 }, - { 9, 48 }, { 34, 48 }, { 49, 48 }, { 64, 48 }, { 79, 48 }, { 94, 48 }, { 109, 48 }, { 124, 48 }, { 139, 48 }, { 154, 48 }, { 169, 48 }, { 189, 48 }, { 210, 48 }, { 224, 48 }, - { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 150, 64 }, { 165, 64 }, { 180, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 } - }, { - 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, 1, 1, 1 - } -}; - - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/dztech/dz65rgb/v3/keyboard.json b/keyboards/dztech/dz65rgb/v3/keyboard.json index 8fef8b3468..6ed8b8c9da 100644 --- a/keyboards/dztech/dz65rgb/v3/keyboard.json +++ b/keyboards/dztech/dz65rgb/v3/keyboard.json @@ -53,6 +53,76 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "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, 5], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 165, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 180, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "led_process_limit": 4, "led_flush_limit": 26, "sleep": true diff --git a/keyboards/dztech/dz65rgb/v3/v3.c b/keyboards/dztech/dz65rgb/v3/v3.c index bf54a8cdfc..f5f863de9a 100755 --- a/keyboards/dztech/dz65rgb/v3/v3.c +++ b/keyboards/dztech/dz65rgb/v3/v3.c @@ -93,26 +93,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW7_CS39, SW7_CS38, SW7_CS37} }; -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, NO_LED,42, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, NO_LED,55, 56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 } -}, { - {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},{203,0},{224,0}, - {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, - {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},{224,32}, - {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, - { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 150, 64 }, { 165, 64 }, { 180, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 } -}, { - 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, 1, 1, 1 -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { From 6aa85699a5626c084a1cfd4ea2ecca3c14783c33 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 02:59:42 -0600 Subject: [PATCH 09/95] Migrate `g_led_config` to DD (E, F) (#25561) --- keyboards/eek/eek.c | 55 --------- keyboards/eek/info.json | 38 ++++++ keyboards/ein_60/ein_60.c | 31 ----- keyboards/ein_60/keyboard.json | 40 ++++++ keyboards/elephant42/elephant42.c | 66 ---------- keyboards/elephant42/keyboard.json | 56 +++++++++ keyboards/ergodox_ez/ergodox_ez.c | 36 ------ keyboards/ergodox_ez/info.json | 50 ++++++++ keyboards/evyd13/atom47/rev5/keyboard.json | 52 +++++++- keyboards/evyd13/atom47/rev5/rev5.c | 67 ---------- keyboards/exclusive/e6_rgb/e6_rgb.c | 75 ------------ keyboards/exclusive/e6_rgb/keyboard.json | 67 +++++++++- keyboards/feker/ik75/ik75.c | 27 ---- keyboards/feker/ik75/keyboard.json | 129 ++++++++++++++++++++ keyboards/frooastboard/walnut/keyboard.json | 50 ++++++++ keyboards/frooastboard/walnut/walnut.c | 22 ---- 16 files changed, 480 insertions(+), 381 deletions(-) delete mode 100644 keyboards/eek/eek.c delete mode 100644 keyboards/elephant42/elephant42.c diff --git a/keyboards/eek/eek.c b/keyboards/eek/eek.c deleted file mode 100644 index 8e7a19f820..0000000000 --- a/keyboards/eek/eek.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright 2020 klackygears - * - * 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 RGB_MATRIX_ENABLE - - // Logical Layout - // Columns - // 0 1 2 3 4 - // ROWS - // 4 3 2 1 0 0 - // 5 6 7 8 9 1 - // 14 13 12 11 10 2 - // 15 16 17 3 - - // Logical Layout v1.3 - // Columns - // 0 1 2 3 4 5 6 7 8 9 - // ROWS - // 0 1 2 3 4 5 6 7 8 9 0 - // 19 18 17 16 15 14 13 12 11 10 1 - // 20 21 22 23 24 25 26 27 28 29 2 - // 35 34 33 32 31 30 3 - - -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, - { 19, 18, 17, 16, 15, 14, 13, 12, 11, 10 }, - { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, - { NO_LED, NO_LED, 35, 34, 33, 32, 31, 30, NO_LED, NO_LED } -}, { - { 31, 0 }, { 46, 0 }, { 62, 0 }, { 77, 7 }, { 93, 13 }, { 131, 13 }, { 147, 7 }, { 162, 0 }, { 178, 0 }, { 193, 0 }, - { 201, 10 }, { 185, 10 }, { 170, 10 }, { 154, 17 }, { 139, 24 }, { 85, 24 }, { 70, 17 }, { 54, 10 }, { 39, 10 }, { 23, 10 }, - { 15, 20 }, { 31, 20 }, { 46, 20 }, { 62, 27 }, { 77, 34 }, { 147, 34 }, { 162, 27 }, { 178, 20 }, { 193, 20 }, { 209, 20 }, - { 185, 34 }, { 170, 37 }, { 154, 44 }, { 70, 44 }, { 54, 37 }, { 39, 34 }, -}, { - 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, - 1, 1, 1, 1, 1, 1, -} }; -#endif diff --git a/keyboards/eek/info.json b/keyboards/eek/info.json index 0e510e282a..eaa68c9b41 100644 --- a/keyboards/eek/info.json +++ b/keyboards/eek/info.json @@ -13,6 +13,44 @@ "val": 150 }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 31, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 46, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 62, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 77, "y": 7, "flags": 4}, + {"matrix": [0, 4], "x": 93, "y": 13, "flags": 4}, + {"matrix": [0, 5], "x": 131, "y": 13, "flags": 4}, + {"matrix": [0, 6], "x": 147, "y": 7, "flags": 4}, + {"matrix": [0, 7], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 178, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 193, "y": 0, "flags": 4}, + {"matrix": [1, 9], "x": 201, "y": 10, "flags": 4}, + {"matrix": [1, 8], "x": 185, "y": 10, "flags": 4}, + {"matrix": [1, 7], "x": 170, "y": 10, "flags": 4}, + {"matrix": [1, 6], "x": 154, "y": 17, "flags": 4}, + {"matrix": [1, 5], "x": 139, "y": 24, "flags": 4}, + {"matrix": [1, 4], "x": 85, "y": 24, "flags": 4}, + {"matrix": [1, 3], "x": 70, "y": 17, "flags": 4}, + {"matrix": [1, 2], "x": 54, "y": 10, "flags": 4}, + {"matrix": [1, 1], "x": 39, "y": 10, "flags": 4}, + {"matrix": [1, 0], "x": 23, "y": 10, "flags": 4}, + {"matrix": [2, 0], "x": 15, "y": 20, "flags": 4}, + {"matrix": [2, 1], "x": 31, "y": 20, "flags": 4}, + {"matrix": [2, 2], "x": 46, "y": 20, "flags": 4}, + {"matrix": [2, 3], "x": 62, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 77, "y": 34, "flags": 4}, + {"matrix": [2, 5], "x": 147, "y": 34, "flags": 4}, + {"matrix": [2, 6], "x": 162, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 178, "y": 20, "flags": 4}, + {"matrix": [2, 8], "x": 193, "y": 20, "flags": 4}, + {"matrix": [2, 9], "x": 209, "y": 20, "flags": 4}, + {"matrix": [3, 7], "x": 185, "y": 34, "flags": 1}, + {"matrix": [3, 6], "x": 170, "y": 37, "flags": 1}, + {"matrix": [3, 5], "x": 154, "y": 44, "flags": 1}, + {"matrix": [3, 4], "x": 70, "y": 44, "flags": 1}, + {"matrix": [3, 3], "x": 54, "y": 37, "flags": 1}, + {"matrix": [3, 2], "x": 39, "y": 34, "flags": 1} + ], "max_brightness": 200 }, "features": { diff --git a/keyboards/ein_60/ein_60.c b/keyboards/ein_60/ein_60.c index af11e48235..8a0e69cee4 100644 --- a/keyboards/ein_60/ein_60.c +++ b/keyboards/ein_60/ein_60.c @@ -15,37 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE - - // Logical Layout - // Columns - // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - // ROWS - // 37 0 1 2 3 4 5 6 7 8 9 10 11 12 0 - // 36 13 1 - // 35 14 2 - // 34 15 3 - // 33 16 3 - // 32 17 4 - // 31 30 29 28 27 26 25 24 23 22 21 20 19 18 5 - -led_config_t g_led_config = { { - { 36, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 13 }, - { 34, 1, 2, 3, 4, 5, NO_LED, 6, 7, 8, 9, 10, 15 }, - { 33, 30, 29, 28, 27, 26, NO_LED, 23, 22, 21, 20, 19, 16 }, - { 32, 30, 29, 28, 27, 26, 24, 23, 22, 21, 20, 19, 17 } -}, { - { 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, 11 }, - { 224, 21 }, { 224, 32 }, { 224, 43 }, { 224, 53 }, { 209, 64 }, { 194, 64 }, { 179, 64 }, { 164, 64 }, { 149, 64 }, { 134, 64 }, { 119, 64 }, { 105, 64 }, { 90, 64 }, - { 75, 64 }, { 60, 64 }, { 45, 64 }, { 30, 64 }, { 15, 64 }, { 0, 53 }, { 0, 43 }, { 0, 32 }, { 0, 21 }, { 0, 11 }, { 15, 0 }, -}, { - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, -} }; -#endif - #ifdef AUDIO_ENABLE const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = { {30, 31, 32, 33, 34, 35, 35, 36, 37, 38, 39, 40, 41}, diff --git a/keyboards/ein_60/keyboard.json b/keyboards/ein_60/keyboard.json index b1e48f1747..99c5040f8d 100644 --- a/keyboards/ein_60/keyboard.json +++ b/keyboards/ein_60/keyboard.json @@ -12,6 +12,46 @@ "val": 150 }, "driver": "ws2812", + "layout": [ + {"x": 30, "y": 0, "flags": 2}, + {"matrix": [1, 1], "x": 45, "y": 0, "flags": 2}, + {"matrix": [1, 2], "x": 60, "y": 0, "flags": 2}, + {"matrix": [1, 3], "x": 75, "y": 0, "flags": 2}, + {"matrix": [1, 4], "x": 90, "y": 0, "flags": 2}, + {"matrix": [1, 5], "x": 105, "y": 0, "flags": 2}, + {"matrix": [1, 7], "x": 119, "y": 0, "flags": 2}, + {"matrix": [1, 8], "x": 134, "y": 0, "flags": 2}, + {"matrix": [1, 9], "x": 149, "y": 0, "flags": 2}, + {"matrix": [1, 10], "x": 164, "y": 0, "flags": 2}, + {"matrix": [1, 11], "x": 179, "y": 0, "flags": 2}, + {"x": 194, "y": 0, "flags": 2}, + {"x": 209, "y": 0, "flags": 2}, + {"matrix": [0, 12], "x": 224, "y": 11, "flags": 1}, + {"x": 224, "y": 21, "flags": 1}, + {"matrix": [1, 12], "x": 224, "y": 32, "flags": 1}, + {"matrix": [2, 12], "x": 224, "y": 43, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 53, "flags": 1}, + {"x": 209, "y": 64, "flags": 1}, + {"matrix": [3, 11], "x": 194, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 179, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 164, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 149, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 134, "y": 64, "flags": 1}, + {"matrix": [3, 6], "x": 119, "y": 64, "flags": 1}, + {"x": 105, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 90, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 75, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 60, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 45, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 30, "y": 64, "flags": 1}, + {"x": 15, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 53, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 32, "flags": 1}, + {"x": 0, "y": 21, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 11, "flags": 1}, + {"x": 15, "y": 0, "flags": 2} + ], "max_brightness": 200 }, "rgblight": { diff --git a/keyboards/elephant42/elephant42.c b/keyboards/elephant42/elephant42.c deleted file mode 100644 index 1ffb5e8083..0000000000 --- a/keyboards/elephant42/elephant42.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright 2021 illness072 - * - * 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" - -#if defined(RGB_MATRIX_ENABLE) -led_config_t g_led_config = { - { // keymap to LED number - // left - { 19, 18, 13, 12, 7, 6}, // R3 - { 20, 17, 14, 11, 8, 5}, // R2 - {NO_LED, 16, 15, 10, 9, 4}, // R1 - {NO_LED, NO_LED, 0, 1, 2, 3}, // R0 - // right - { 46, 45, 40, 39, 34, 33}, // R3 - { 47, 44, 41, 38, 35, 32}, // R2 - {NO_LED, 43, 42, 37, 36, 31}, // R1 - {NO_LED, NO_LED, 27, 28, 29, 30}, // R0 - }, - {// phisical LED position, {x, y} : x = 0..224, y = 0..64 - // left-bg [LED_01-21] - {56, 65}, {77, 68}, {95, 79}, {109, 91}, - {87, 46}, {87, 29}, {87, 12}, { 69, 43}, { 69, 26}, { 69, 8}, - {52, 35}, {52, 17}, {52, 0}, { 35, 4}, { 35, 21}, { 35, 38}, - {17, 54}, {17, 36}, {17, 19}, { 0, 26}, { 0, 43}, - // left-ug [LED_22-27] - {25, 49}, {26, 19}, {60, 14}, {106, 33}, {107, 72}, { 70, 66}, - // right-bg [LED_28-48] - {199, 65}, {179, 68}, {160, 79}, {146, 91}, - {168, 46}, {168, 29}, {168, 12}, {186, 43}, {186, 26}, {186, 8}, - {203, 35}, {203, 17}, {203, 0}, {220, 4}, {220, 21}, {220, 38}, - {238, 54}, {238, 36}, {238, 19}, {255, 26}, {255, 43}, - // right-ug [LED_49-54] - {230, 49}, {230, 19}, {195, 14}, {149, 33}, {148, 72}, {185, 66}, - }, - {// LED Index to Flag - // Left-bg [LED_01-21] - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - // left-ug [LED_22-27] - LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, - // right-bg [LED_28-48] - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - // right-ug [LED_49-54] - LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW - } -}; -#endif diff --git a/keyboards/elephant42/keyboard.json b/keyboards/elephant42/keyboard.json index 60b135b086..be0f1c81a0 100644 --- a/keyboards/elephant42/keyboard.json +++ b/keyboards/elephant42/keyboard.json @@ -13,6 +13,62 @@ "sat_steps": 8, "val_steps": 8, "speed_steps": 8, + "layout": [ + {"matrix": [3, 2], "x": 52, "y": 45, "flags": 4}, + {"matrix": [3, 3], "x": 69, "y": 51, "flags": 4}, + {"matrix": [3, 4], "x": 86, "y": 58, "flags": 4}, + {"matrix": [3, 5], "x": 103, "y": 64, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 34, "flags": 4}, + {"matrix": [1, 5], "x": 86, "y": 21, "flags": 4}, + {"matrix": [0, 5], "x": 86, "y": 8, "flags": 4}, + {"matrix": [0, 4], "x": 69, "y": 7, "flags": 4}, + {"matrix": [1, 4], "x": 69, "y": 20, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 33, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 26, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 13, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 6, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 19, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 17, "y": 44, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 31, "flags": 4}, + {"matrix": [0, 1], "x": 17, "y": 18, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 24, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 37, "flags": 4}, + {"x": 26, "y": 42, "flags": 2}, + {"x": 26, "y": 19, "flags": 2}, + {"x": 61, "y": 7, "flags": 2}, + {"x": 103, "y": 21, "flags": 2}, + {"x": 103, "y": 51, "flags": 2}, + {"x": 69, "y": 45, "flags": 2}, + {"matrix": [7, 2], "x": 172, "y": 45, "flags": 4}, + {"matrix": [7, 3], "x": 155, "y": 51, "flags": 4}, + {"matrix": [7, 4], "x": 138, "y": 58, "flags": 4}, + {"matrix": [7, 5], "x": 121, "y": 64, "flags": 4}, + {"matrix": [6, 5], "x": 138, "y": 34, "flags": 4}, + {"matrix": [5, 5], "x": 138, "y": 21, "flags": 4}, + {"matrix": [4, 5], "x": 138, "y": 8, "flags": 4}, + {"matrix": [4, 4], "x": 155, "y": 7, "flags": 4}, + {"matrix": [5, 4], "x": 155, "y": 20, "flags": 4}, + {"matrix": [6, 4], "x": 155, "y": 33, "flags": 4}, + {"matrix": [6, 3], "x": 172, "y": 26, "flags": 4}, + {"matrix": [5, 3], "x": 172, "y": 13, "flags": 4}, + {"matrix": [4, 3], "x": 172, "y": 0, "flags": 4}, + {"matrix": [4, 2], "x": 189, "y": 6, "flags": 4}, + {"matrix": [5, 2], "x": 189, "y": 19, "flags": 4}, + {"matrix": [6, 2], "x": 189, "y": 32, "flags": 4}, + {"matrix": [6, 1], "x": 206, "y": 44, "flags": 4}, + {"matrix": [5, 1], "x": 206, "y": 31, "flags": 4}, + {"matrix": [4, 1], "x": 206, "y": 18, "flags": 4}, + {"matrix": [4, 0], "x": 224, "y": 24, "flags": 4}, + {"matrix": [5, 0], "x": 224, "y": 37, "flags": 4}, + {"x": 197, "y": 42, "flags": 2}, + {"x": 197, "y": 19, "flags": 2}, + {"x": 163, "y": 7, "flags": 2}, + {"x": 121, "y": 21, "flags": 2}, + {"x": 121, "y": 51, "flags": 2}, + {"x": 155, "y": 45, "flags": 2} + ], "max_brightness": 170, "split_count": [27, 27] }, diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 9fdc814834..d2e89772c6 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -275,42 +275,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C2_11, C1_11, C3_11}, // LED23 {1, C5_11, C4_11, C6_11} // LED24 }; - - -led_config_t g_led_config = { { - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { 28, 33, 38, 43, 47, NO_LED }, - { 27, 32, 37, 42, 46, NO_LED }, - { 26, 31, 36, 41, 45, NO_LED }, - { 25, 30, 35, 40, 44, NO_LED }, - { 24, 29, 34, 39, 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 }, - { 0, 5, 10, 15, NO_LED, NO_LED }, - { 1, 6, 11, 16, 20, NO_LED }, - { 2, 7, 12, 17, 21, NO_LED }, - { 3, 8, 13, 18, 22, NO_LED }, - { 4, 9, 14, 19, 23, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } -}, { - { 137, 0 }, { 154, 0 }, { 172, 0 }, { 189, 0 }, { 206, 0 }, { 137, 12 }, - { 154, 12 }, { 172, 12 }, { 189, 12 }, { 206, 12 }, { 137, 25 }, { 154, 25 }, - { 172, 25 }, { 189, 25 }, { 206, 25 }, { 137, 38 }, { 154, 38 }, { 172, 38 }, - { 189, 38 }, { 206, 38 }, { 154, 51 }, { 172, 51 }, { 189, 51 }, { 206, 51 }, - { 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 86, 12 }, - { 68, 12 }, { 51, 12 }, { 34, 12 }, { 17, 12 }, { 86, 25 }, { 68, 25 }, - { 51, 25 }, { 34, 25 }, { 17, 25 }, { 86, 38 }, { 68, 38 }, { 51, 38 }, - { 34, 38 }, { 17, 38 }, { 68, 51 }, { 51, 51 }, { 34, 51 }, { 17, 51 } -}, { - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 4, 4, 1, 1, 1, 1, - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 4, 4, 1, 1, 1, 1 -} }; // clang-format on # ifdef ORYX_CONFIGURATOR diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json index f7b20b19e0..8ef8ed376d 100644 --- a/keyboards/ergodox_ez/info.json +++ b/keyboards/ergodox_ez/info.json @@ -69,6 +69,56 @@ "pixel_fractal": true }, "driver": "is31fl3731", + "layout": [ + {"matrix": [8, 0], "x": 137, "y": 0, "flags": 4}, + {"matrix": [9, 0], "x": 154, "y": 0, "flags": 4}, + {"matrix": [10, 0], "x": 172, "y": 0, "flags": 4}, + {"matrix": [11, 0], "x": 189, "y": 0, "flags": 4}, + {"matrix": [12, 0], "x": 206, "y": 0, "flags": 4}, + {"matrix": [8, 1], "x": 137, "y": 12, "flags": 4}, + {"matrix": [9, 1], "x": 154, "y": 12, "flags": 4}, + {"matrix": [10, 1], "x": 172, "y": 12, "flags": 4}, + {"matrix": [11, 1], "x": 189, "y": 12, "flags": 4}, + {"matrix": [12, 1], "x": 206, "y": 12, "flags": 4}, + {"matrix": [8, 2], "x": 137, "y": 25, "flags": 4}, + {"matrix": [9, 2], "x": 154, "y": 25, "flags": 4}, + {"matrix": [10, 2], "x": 172, "y": 25, "flags": 4}, + {"matrix": [11, 2], "x": 189, "y": 25, "flags": 4}, + {"matrix": [12, 2], "x": 206, "y": 25, "flags": 4}, + {"matrix": [8, 3], "x": 137, "y": 38, "flags": 4}, + {"matrix": [9, 3], "x": 154, "y": 38, "flags": 4}, + {"matrix": [10, 3], "x": 172, "y": 38, "flags": 4}, + {"matrix": [11, 3], "x": 189, "y": 38, "flags": 4}, + {"matrix": [12, 3], "x": 206, "y": 38, "flags": 4}, + {"matrix": [9, 4], "x": 154, "y": 51, "flags": 1}, + {"matrix": [10, 4], "x": 172, "y": 51, "flags": 1}, + {"matrix": [11, 4], "x": 189, "y": 51, "flags": 1}, + {"matrix": [12, 4], "x": 206, "y": 51, "flags": 1}, + {"matrix": [5, 0], "x": 86, "y": 0, "flags": 4}, + {"matrix": [4, 0], "x": 68, "y": 0, "flags": 4}, + {"matrix": [3, 0], "x": 51, "y": 0, "flags": 4}, + {"matrix": [2, 0], "x": 34, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 17, "y": 0, "flags": 4}, + {"matrix": [5, 1], "x": 86, "y": 12, "flags": 4}, + {"matrix": [4, 1], "x": 68, "y": 12, "flags": 4}, + {"matrix": [3, 1], "x": 51, "y": 12, "flags": 4}, + {"matrix": [2, 1], "x": 34, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 12, "flags": 4}, + {"matrix": [5, 2], "x": 86, "y": 25, "flags": 4}, + {"matrix": [4, 2], "x": 68, "y": 25, "flags": 4}, + {"matrix": [3, 2], "x": 51, "y": 25, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 25, "flags": 4}, + {"matrix": [1, 2], "x": 17, "y": 25, "flags": 4}, + {"matrix": [5, 3], "x": 86, "y": 38, "flags": 4}, + {"matrix": [4, 3], "x": 68, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 51, "y": 38, "flags": 4}, + {"matrix": [2, 3], "x": 34, "y": 38, "flags": 4}, + {"matrix": [1, 3], "x": 17, "y": 38, "flags": 4}, + {"matrix": [4, 4], "x": 68, "y": 51, "flags": 1}, + {"matrix": [3, 4], "x": 51, "y": 51, "flags": 1}, + {"matrix": [2, 4], "x": 34, "y": 51, "flags": 1}, + {"matrix": [1, 4], "x": 17, "y": 51, "flags": 1} + ], "led_flush_limit": 26, "led_process_limit": 5, "sleep": true diff --git a/keyboards/evyd13/atom47/rev5/keyboard.json b/keyboards/evyd13/atom47/rev5/keyboard.json index 86ff90c19c..daf7e3677f 100644 --- a/keyboards/evyd13/atom47/rev5/keyboard.json +++ b/keyboards/evyd13/atom47/rev5/keyboard.json @@ -39,7 +39,57 @@ "pixel_flow": true, "pixel_fractal": true }, - "driver": "is31fl3733" + "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 9, "y": 8, "flags": 1}, + {"matrix": [0, 1], "x": 26, "y": 8, "flags": 4}, + {"matrix": [0, 2], "x": 43, "y": 8, "flags": 4}, + {"matrix": [0, 3], "x": 60, "y": 8, "flags": 4}, + {"matrix": [0, 4], "x": 78, "y": 8, "flags": 4}, + {"matrix": [0, 5], "x": 95, "y": 8, "flags": 4}, + {"matrix": [0, 6], "x": 112, "y": 8, "flags": 4}, + {"matrix": [0, 7], "x": 129, "y": 8, "flags": 4}, + {"matrix": [0, 8], "x": 146, "y": 8, "flags": 4}, + {"matrix": [0, 9], "x": 164, "y": 8, "flags": 4}, + {"matrix": [0, 10], "x": 181, "y": 8, "flags": 4}, + {"matrix": [0, 11], "x": 198, "y": 8, "flags": 1}, + {"matrix": [0, 12], "x": 215, "y": 8, "flags": 1}, + {"matrix": [1, 0], "x": 11, "y": 24, "flags": 1}, + {"matrix": [1, 1], "x": 30, "y": 24, "flags": 4}, + {"matrix": [1, 2], "x": 47, "y": 24, "flags": 4}, + {"matrix": [1, 3], "x": 64, "y": 24, "flags": 4}, + {"matrix": [1, 4], "x": 82, "y": 24, "flags": 4}, + {"matrix": [1, 5], "x": 99, "y": 24, "flags": 4}, + {"matrix": [1, 6], "x": 116, "y": 24, "flags": 4}, + {"matrix": [1, 7], "x": 134, "y": 24, "flags": 4}, + {"matrix": [1, 8], "x": 151, "y": 24, "flags": 4}, + {"matrix": [1, 9], "x": 168, "y": 24, "flags": 4}, + {"matrix": [1, 10], "x": 185, "y": 24, "flags": 4}, + {"matrix": [1, 12], "x": 209, "y": 24, "flags": 1}, + {"matrix": [2, 0], "x": 15, "y": 40, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 22, "flags": 8}, + {"matrix": [2, 2], "x": 39, "y": 40, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 40, "flags": 4}, + {"matrix": [2, 4], "x": 73, "y": 40, "flags": 4}, + {"matrix": [2, 5], "x": 90, "y": 40, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 40, "flags": 4}, + {"matrix": [2, 7], "x": 125, "y": 40, "flags": 4}, + {"matrix": [2, 8], "x": 142, "y": 40, "flags": 4}, + {"matrix": [2, 9], "x": 159, "y": 40, "flags": 4}, + {"matrix": [2, 10], "x": 177, "y": 40, "flags": 4}, + {"matrix": [2, 11], "x": 196, "y": 40, "flags": 1}, + {"matrix": [2, 12], "x": 215, "y": 40, "flags": 1}, + {"matrix": [3, 0], "x": 11, "y": 56, "flags": 1}, + {"matrix": [3, 1], "x": 30, "y": 56, "flags": 1}, + {"matrix": [3, 2], "x": 47, "y": 56, "flags": 1}, + {"matrix": [3, 3], "x": 64, "y": 56, "flags": 1}, + {"matrix": [3, 5], "x": 88, "y": 56, "flags": 1}, + {"matrix": [3, 7], "x": 127, "y": 56, "flags": 1}, + {"matrix": [3, 9], "x": 159, "y": 56, "flags": 1}, + {"matrix": [3, 10], "x": 177, "y": 56, "flags": 1}, + {"matrix": [3, 11], "x": 194, "y": 56, "flags": 1}, + {"matrix": [3, 12], "x": 213, "y": 56, "flags": 1} + ] }, "matrix_pins": { "cols": ["F0", "F1", "F4", "F5", "F6", "F7", "E6", "D7", "B4", "B5", "B6", "C6", "C7"], diff --git a/keyboards/evyd13/atom47/rev5/rev5.c b/keyboards/evyd13/atom47/rev5/rev5.c index b8ea0688cd..7e9eb6307d 100644 --- a/keyboards/evyd13/atom47/rev5/rev5.c +++ b/keyboards/evyd13/atom47/rev5/rev5.c @@ -77,73 +77,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {0, SW11_CS13, SW12_CS13, SW10_CS13} }; -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, NO_LED, 24 }, - { 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 }, - { 38, 39, 40, 41, NO_LED, 42, NO_LED, 43, NO_LED, 44, 45, 46, 47 } -}, { - // LED Index to Physical Position - { 9, 8 }, - { 26, 8 }, - { 43, 8 }, - { 60, 8 }, - { 78, 8 }, - { 95, 8 }, - { 112, 8 }, - { 129, 8 }, - { 146, 8 }, - { 164, 8 }, - { 181, 8 }, - { 198, 8 }, - { 215, 8 }, - - { 11, 24 }, - { 30, 24 }, - { 47, 24 }, - { 64, 24 }, - { 82, 24 }, - { 99, 24 }, - { 116, 24 }, - { 134, 24 }, - { 151, 24 }, - { 168, 24 }, - { 185, 24 }, - { 209, 24 }, - - { 15, 40 }, - { 20, 22 }, - { 39, 40 }, - { 56, 40 }, - { 73, 40 }, - { 90, 40 }, - { 108, 40 }, - { 125, 40 }, - { 142, 40 }, - { 159, 40 }, - { 177, 40 }, - { 196, 40 }, - { 215, 40 }, - - { 11, 56 }, - { 30, 56 }, - { 47, 56 }, - { 64, 56 }, - { 88, 56 }, - { 127, 56 }, - { 159, 56 }, - { 177, 56 }, - { 194, 56 }, - { 213, 56 }, -}, { - // LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c index 9a7856306b..7e3bed8f2f 100644 --- a/keyboards/exclusive/e6_rgb/e6_rgb.c +++ b/keyboards/exclusive/e6_rgb/e6_rgb.c @@ -90,81 +90,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {0, SW5_CS16, SW4_CS16, SW6_CS16}, {0, SW2_CS16, SW1_CS16, SW3_CS16}, }; - -led_config_t g_led_config = { { - { 0, 1, 4, 5, 12, 13, 36, 20, 21, 24, 25, 16, 17, 28 }, - { 2, 6, 7, 14, 15, 37, 38, 22, 23, 26, 27, 18, 19, 30 }, - { 3, 8, 9, 32, 33, 39, 40, 44, 45, 48, 49, 52, 31, NO_LED }, - { 59, 10, 11, 34, 35, 41, 42, 46, 47, 50, 53, 54, 56, NO_LED }, - { 60, 61, 62, NO_LED, NO_LED, 43, 51, 55, 58, 57, NO_LED, NO_LED, NO_LED, NO_LED } -}, { -//cs1 - { 0, 0 }, { 17, 0 }, { 0, 16 }, { 0, 32 }, -//cs2 - { 34, 0 }, { 51, 0 }, { 17, 16 }, { 34, 16 }, -//cs3 - { 17, 32 }, { 34, 32 }, { 17, 48 }, { 34, 48 }, -//cs4 - { 68, 0 }, { 85, 0 }, { 51, 16 }, { 68, 16 }, -//cs5 - { 187, 0 }, { 204, 0 }, { 187, 16 }, { 204, 16 }, -//cs6 - { 119, 0 }, { 136, 0 }, { 119, 16 }, { 136, 16 }, -//cs7 - { 153, 0 }, { 170, 0 }, { 153, 16 }, { 170, 16 }, -//cs8 - { 221, 0 }, { 221, 0 }, { 221, 32 }, { 221, 16 }, -//cs9 - { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, -//cs10 - { 102, 0 }, { 85, 16 }, { 102, 16 }, { 85, 32 }, -//cs11 - { 102, 32 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, -//cs12 - { 119, 32 }, { 136, 32 }, { 119, 48 }, { 136, 48 }, -//cs13 - { 153, 32 }, { 170, 32 }, { 153, 48 }, { 136, 48 }, -//cs14 - { 187, 32 }, { 170, 48 }, { 187, 48 }, { 153, 48 }, -//cs15 - { 221, 48 }, { 221, 64 }, { 204, 64 }, -//cs16 - { 0, 48 }, { 0, 64 }, { 17, 64 }, { 34, 64 } -}, { -//cs1 - 1, 4, 1, 1, -//cs2 - 4, 4, 4, 4, -//cs3 - 4, 4, 4, 4, -//cs4 - 4, 4, 4, 4, -//cs5 - 4, 4, 4, 4, -//cs6 - 4, 4, 4, 4, -//cs7 - 4, 4, 4, 4, -//cs8 - 4, 4, 1, 1, -//cs9 - 4, 4, 4, 4, -//cs10 - 4, 4, 4, 4, -//cs11 - 4, 4, 4, 4, -//cs12 - 4, 4, 4, 4, -//cs13 - 4, 4, 4, 1, -//cs14 - 4, 4, 1, 1, -//cs15 - 1, 1, 1, -//cs16 - 1, 1, 1, 1 -} }; - #endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/exclusive/e6_rgb/keyboard.json b/keyboards/exclusive/e6_rgb/keyboard.json index 52d77dfcaa..d65893cf31 100644 --- a/keyboards/exclusive/e6_rgb/keyboard.json +++ b/keyboards/exclusive/e6_rgb/keyboard.json @@ -8,7 +8,72 @@ "device_version": "0.6.2" }, "rgb_matrix": { - "driver": "is31fl3733" + "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 51, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 17, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 32, "flags": 4}, + {"matrix": [3, 1], "x": 17, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [0, 4], "x": 68, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 85, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [0, 11], "x": 187, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 204, "y": 0, "flags": 4}, + {"matrix": [1, 11], "x": 187, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 204, "y": 16, "flags": 4}, + {"matrix": [0, 7], "x": 119, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 136, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 119, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [0, 9], "x": 153, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 170, "y": 0, "flags": 4}, + {"matrix": [1, 9], "x": 153, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 170, "y": 16, "flags": 4}, + {"matrix": [0, 13], "x": 221, "y": 0, "flags": 4}, + {"x": 221, "y": 0, "flags": 4}, + {"matrix": [1, 13], "x": 221, "y": 32, "flags": 1}, + {"matrix": [2, 12], "x": 221, "y": 16, "flags": 1}, + {"matrix": [2, 3], "x": 51, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 68, "y": 32, "flags": 4}, + {"matrix": [3, 3], "x": 51, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 68, "y": 48, "flags": 4}, + {"matrix": [0, 6], "x": 102, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 85, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 102, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 85, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 102, "y": 32, "flags": 4}, + {"matrix": [3, 5], "x": 85, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 102, "y": 48, "flags": 4}, + {"matrix": [4, 5], "x": 102, "y": 64, "flags": 4}, + {"matrix": [2, 7], "x": 119, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 136, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 119, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 136, "y": 48, "flags": 4}, + {"matrix": [2, 9], "x": 153, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 170, "y": 32, "flags": 4}, + {"matrix": [3, 9], "x": 153, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 136, "y": 48, "flags": 1}, + {"matrix": [2, 11], "x": 187, "y": 32, "flags": 4}, + {"matrix": [3, 10], "x": 170, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 187, "y": 48, "flags": 1}, + {"matrix": [4, 7], "x": 153, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 221, "y": 48, "flags": 1}, + {"matrix": [4, 9], "x": 221, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 204, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 17, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 34, "y": 64, "flags": 1} + ] }, "features": { "bootmagic": true, diff --git a/keyboards/feker/ik75/ik75.c b/keyboards/feker/ik75/ik75.c index c4da77a844..d93de7f2ec 100644 --- a/keyboards/feker/ik75/ik75.c +++ b/keyboards/feker/ik75/ik75.c @@ -161,31 +161,4 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {1, SW10_CS15, SW12_CS15, SW11_CS15}, // 125, Underglow 39 {1, SW10_CS16, SW12_CS16, SW11_CS16}, // 126, Underglow 40 }; - -led_config_t g_led_config = { { - { 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, NO_LED, NO_LED }, - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NO_LED, 102 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, NO_LED, 105 }, - { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NO_LED, 44, 103, 106 }, - { 48, NO_LED, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, NO_LED, 59, 45, 101 }, - { 93, 94, 14, NO_LED, NO_LED, NO_LED, 15, NO_LED, NO_LED, 30, 31, NO_LED, 47, 60, 61, 62 } -}, { - {0 , 15}, {14 , 15}, {29 , 15}, {43 , 15}, {58 , 15}, {72 , 15}, {87 , 15}, {101, 15}, {116, 15}, {130, 15}, {145, 15}, {159, 15}, {173, 15}, {195, 15}, {38 , 61}, {92 , 61}, - {4 , 26}, {22 , 26}, {36 , 26}, {51 , 26}, {65 , 26}, {79 , 26}, {94 , 26}, {108, 26}, {123, 26}, {137, 26}, {152, 26}, {166, 26}, {181, 26}, {199, 26}, {173, 61}, {159, 61}, - {5 , 38}, {25 , 38}, {40 , 38}, {54 , 38}, {69 , 38}, {83 , 38}, {98 , 38}, {112, 38}, {126, 38}, {141, 38}, {155, 38}, {170, 38}, {193, 38}, {206, 52}, {210, 12}, {145, 61}, - {9 , 49}, {33 , 49}, {47 , 49}, {61 , 49}, {76 , 49}, {90 , 49}, {105, 49}, {119, 49}, {134, 49}, {148, 49}, {163, 49}, {182, 49}, {191, 64}, {206, 64}, {220, 64}, - {14 , 0}, {28 , 0}, {53 , 0}, {63 , 0}, {74 , 0}, {88 , 0}, {102, 0}, {116, 0}, {130, 0}, {144, 0}, {158, 0}, {172, 0}, {189, 0}, {210, 0}, {224, 0}, {224, 11}, - {0 , 0}, {18 , 0}, {33 , 0}, {47 , 0}, {61 , 0}, {79 , 0}, {94 , 0}, {108, 0}, {123, 0}, {141, 0}, {155, 0}, {170, 0}, {184, 0}, {202, 0}, {2 , 61}, {20 , 61}, - {0 , 0}, {0 , 11}, {0 , 27}, {0 , 37}, {224, 5}, {210, 5}, {217, 0}, {224, 15}, {224, 38}, {210, 18}, {224, 26}, {224, 49}, {224, 56}, {224, 45}, {224, 35}, {224, 24}, - {0 , 48}, {0 , 56}, {0 , 64}, {14 , 64}, {28 , 64}, {49 , 64}, {67 , 64}, {84 , 64}, {98 , 64}, {112, 64}, {126, 64}, {140, 64}, {158, 64}, {172, 64}, {196, 64}, {224, 64}, -}, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 8, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 2, 2, 2, 2, 1, 1, 4, 4, 4, 8, 4, 4, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -} }; #endif diff --git a/keyboards/feker/ik75/keyboard.json b/keyboards/feker/ik75/keyboard.json index 03b86e5d8b..c368c188a7 100644 --- a/keyboards/feker/ik75/keyboard.json +++ b/keyboards/feker/ik75/keyboard.json @@ -55,6 +55,135 @@ "solid_multisplash": true }, "driver": "is31fl3733", + "layout": [ + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 14, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 43, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 58, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 72, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 87, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 101, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 116, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 130, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 145, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 159, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 173, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 195, "y": 15, "flags": 1}, + {"matrix": [5, 2], "x": 38, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 92, "y": 61, "flags": 4}, + {"matrix": [2, 0], "x": 4, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 22, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 36, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 51, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 79, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 94, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 108, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 123, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 137, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 152, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 166, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 181, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 199, "y": 26, "flags": 4}, + {"matrix": [5, 9], "x": 173, "y": 61, "flags": 1}, + {"matrix": [5, 10], "x": 159, "y": 61, "flags": 1}, + {"matrix": [3, 0], "x": 5, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 25, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 54, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 83, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 98, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 126, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 141, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 155, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 170, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 193, "y": 38, "flags": 1}, + {"matrix": [4, 14], "x": 206, "y": 52, "flags": 4}, + {"x": 210, "y": 12, "flags": 8}, + {"matrix": [5, 12], "x": 145, "y": 61, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 49, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 47, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 61, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 76, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 90, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 105, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 119, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 134, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 148, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 163, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 182, "y": 49, "flags": 1}, + {"matrix": [5, 13], "x": 191, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 206, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 220, "y": 64, "flags": 4}, + {"x": 14, "y": 0, "flags": 2}, + {"x": 28, "y": 0, "flags": 2}, + {"x": 53, "y": 0, "flags": 2}, + {"x": 63, "y": 0, "flags": 2}, + {"x": 74, "y": 0, "flags": 2}, + {"x": 88, "y": 0, "flags": 2}, + {"x": 102, "y": 0, "flags": 2}, + {"x": 116, "y": 0, "flags": 2}, + {"x": 130, "y": 0, "flags": 2}, + {"x": 144, "y": 0, "flags": 2}, + {"x": 158, "y": 0, "flags": 2}, + {"x": 172, "y": 0, "flags": 2}, + {"x": 189, "y": 0, "flags": 2}, + {"x": 210, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 11, "flags": 2}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 18, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 47, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 79, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 94, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 108, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 123, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 141, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 155, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 170, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 184, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 2, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 20, "y": 61, "flags": 1}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 0, "y": 11, "flags": 2}, + {"x": 0, "y": 27, "flags": 2}, + {"x": 0, "y": 37, "flags": 2}, + {"x": 224, "y": 5, "flags": 1}, + {"x": 210, "y": 5, "flags": 1}, + {"matrix": [4, 15], "x": 217, "y": 0, "flags": 4}, + {"matrix": [1, 15], "x": 224, "y": 15, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 38, "flags": 4}, + {"x": 210, "y": 18, "flags": 8}, + {"matrix": [2, 15], "x": 224, "y": 26, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 49, "flags": 4}, + {"x": 224, "y": 56, "flags": 2}, + {"x": 224, "y": 45, "flags": 2}, + {"x": 224, "y": 35, "flags": 2}, + {"x": 224, "y": 24, "flags": 2}, + {"x": 0, "y": 48, "flags": 2}, + {"x": 0, "y": 56, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 14, "y": 64, "flags": 2}, + {"x": 28, "y": 64, "flags": 2}, + {"x": 49, "y": 64, "flags": 2}, + {"x": 67, "y": 64, "flags": 2}, + {"x": 84, "y": 64, "flags": 2}, + {"x": 98, "y": 64, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 126, "y": 64, "flags": 2}, + {"x": 140, "y": 64, "flags": 2}, + {"x": 158, "y": 64, "flags": 2}, + {"x": 172, "y": 64, "flags": 2}, + {"x": 196, "y": 64, "flags": 2}, + {"x": 224, "y": 64, "flags": 2} + ], "max_brightness": 200 }, "build": { diff --git a/keyboards/frooastboard/walnut/keyboard.json b/keyboards/frooastboard/walnut/keyboard.json index f1958c04a2..923a0e97de 100644 --- a/keyboards/frooastboard/walnut/keyboard.json +++ b/keyboards/frooastboard/walnut/keyboard.json @@ -48,6 +48,56 @@ "speed": 191 }, "driver": "is31fl3737", + "layout": [ + {"x": 0, "y": 62, "flags": 2}, + {"x": 0, "y": 50, "flags": 2}, + {"x": 0, "y": 38, "flags": 2}, + {"x": 0, "y": 26, "flags": 2}, + {"x": 0, "y": 14, "flags": 2}, + {"x": 0, "y": 2, "flags": 2}, + {"x": 0, "y": 2, "flags": 2}, + {"x": 12, "y": 2, "flags": 2}, + {"x": 24, "y": 2, "flags": 2}, + {"x": 36, "y": 2, "flags": 2}, + {"x": 48, "y": 2, "flags": 2}, + {"x": 60, "y": 2, "flags": 2}, + {"x": 72, "y": 2, "flags": 2}, + {"x": 84, "y": 2, "flags": 2}, + {"x": 96, "y": 2, "flags": 2}, + {"x": 108, "y": 2, "flags": 2}, + {"x": 120, "y": 2, "flags": 2}, + {"x": 132, "y": 2, "flags": 2}, + {"x": 144, "y": 2, "flags": 2}, + {"x": 156, "y": 2, "flags": 2}, + {"x": 168, "y": 2, "flags": 2}, + {"x": 180, "y": 2, "flags": 2}, + {"x": 192, "y": 2, "flags": 2}, + {"x": 204, "y": 2, "flags": 2}, + {"x": 204, "y": 2, "flags": 2}, + {"x": 204, "y": 14, "flags": 2}, + {"x": 204, "y": 26, "flags": 2}, + {"x": 204, "y": 38, "flags": 2}, + {"x": 204, "y": 50, "flags": 2}, + {"x": 204, "y": 62, "flags": 2}, + {"x": 204, "y": 62, "flags": 2}, + {"x": 192, "y": 62, "flags": 2}, + {"x": 180, "y": 62, "flags": 2}, + {"x": 168, "y": 62, "flags": 2}, + {"x": 156, "y": 62, "flags": 2}, + {"x": 144, "y": 62, "flags": 2}, + {"x": 132, "y": 62, "flags": 2}, + {"x": 120, "y": 62, "flags": 2}, + {"x": 108, "y": 62, "flags": 2}, + {"x": 96, "y": 62, "flags": 2}, + {"x": 84, "y": 62, "flags": 2}, + {"x": 72, "y": 62, "flags": 2}, + {"x": 60, "y": 62, "flags": 2}, + {"x": 48, "y": 62, "flags": 2}, + {"x": 36, "y": 62, "flags": 2}, + {"x": 24, "y": 62, "flags": 2}, + {"x": 12, "y": 62, "flags": 2}, + {"x": 0, "y": 62, "flags": 2} + ], "max_brightness": 191, "sleep": true }, diff --git a/keyboards/frooastboard/walnut/walnut.c b/keyboards/frooastboard/walnut/walnut.c index 0de3467ae4..448895ec68 100644 --- a/keyboards/frooastboard/walnut/walnut.c +++ b/keyboards/frooastboard/walnut/walnut.c @@ -61,26 +61,4 @@ const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = { {0, SW2_CS11, SW1_CS11, SW3_CS11}, {0, SW2_CS12, SW1_CS12, SW3_CS12} }; - -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 } - }, { - {0, 62}, {0, 50}, {0, 38}, {0, 26}, {0, 14}, {0, 2}, - {0, 2}, {12, 2}, {24, 2}, {36, 2}, {48, 2}, {60, 2}, {72, 2}, {84, 2}, {96, 2}, {108, 2}, {120, 2}, {132, 2}, {144, 2}, {156, 2}, {168, 2}, {180, 2}, {192, 2}, {204, 2}, - {204, 2}, {204, 14}, {204, 26}, {204, 38}, {204, 50}, {204, 62}, - {204, 62}, {192, 62}, {180, 62}, {168, 62}, {156, 62}, {144, 62}, {132, 62}, {120, 62}, {108, 62}, {96, 62}, {84, 62}, {72, 62}, {60, 62}, {48, 62}, {36, 62}, {24, 62}, {12, 62}, {0, 62} - }, { - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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 // defined(RGB_MATRIX_ENABLE) From 2d5cb23503d3a2a94a52713f9280b8a80b703385 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:00:32 -0600 Subject: [PATCH 10/95] Migrate `g_led_config` to DD (G) (#25598) --- .../geekboards/macropad_v2/keyboard.json | 44 +++++ .../geekboards/macropad_v2/macropad_v2.c | 56 ------- keyboards/geekboards/tester/keyboard.json | 10 ++ keyboards/geekboards/tester/tester.c | 13 -- keyboards/giabalanai/giabalanai.c | 60 ------- keyboards/giabalanai/keyboard.json | 125 ++++++++++++++ keyboards/gizmo_engineering/gk6/gk6.c | 98 ----------- keyboards/gizmo_engineering/gk6/keyboard.json | 65 ++++++++ keyboards/gmmk/gmmk2/p65/ansi/ansi.c | 115 ------------- keyboards/gmmk/gmmk2/p65/ansi/keyboard.json | 91 +++++++++++ keyboards/gmmk/gmmk2/p65/iso/iso.c | 116 ------------- keyboards/gmmk/gmmk2/p65/iso/keyboard.json | 92 +++++++++++ keyboards/gmmk/gmmk2/p96/ansi/ansi.c | 154 ------------------ keyboards/gmmk/gmmk2/p96/ansi/keyboard.json | 123 ++++++++++++++ keyboards/gmmk/gmmk2/p96/iso/iso.c | 149 ----------------- keyboards/gmmk/gmmk2/p96/iso/keyboard.json | 124 ++++++++++++++ keyboards/gmmk/numpad/keyboard.json | 35 +++- keyboards/gmmk/numpad/numpad.c | 48 ------ keyboards/gmmk/pro/rev1/ansi/ansi.c | 118 -------------- keyboards/gmmk/pro/rev1/ansi/keyboard.json | 102 ++++++++++++ keyboards/gmmk/pro/rev1/iso/iso.c | 119 -------------- keyboards/gmmk/pro/rev1/iso/keyboard.json | 103 ++++++++++++ keyboards/gmmk/pro/rev2/ansi/ansi.c | 118 -------------- keyboards/gmmk/pro/rev2/ansi/keyboard.json | 102 ++++++++++++ keyboards/gmmk/pro/rev2/iso/iso.c | 119 -------------- keyboards/gmmk/pro/rev2/iso/keyboard.json | 103 ++++++++++++ keyboards/gopolar/gg86/gg86.c | 35 +--- keyboards/gopolar/gg86/keyboard.json | 102 ++++++++++++ 28 files changed, 1222 insertions(+), 1317 deletions(-) delete mode 100644 keyboards/geekboards/macropad_v2/macropad_v2.c diff --git a/keyboards/geekboards/macropad_v2/keyboard.json b/keyboards/geekboards/macropad_v2/keyboard.json index a34912aee3..2719faa764 100644 --- a/keyboards/geekboards/macropad_v2/keyboard.json +++ b/keyboards/geekboards/macropad_v2/keyboard.json @@ -51,6 +51,50 @@ "val": 192 }, "driver": "ws2812", + "layout": [ + {"matrix": [1, 1], "x": 85, "y": 46, "flags": 4}, + {"x": 85, "y": 64, "flags": 2}, + {"x": 67, "y": 64, "flags": 2}, + {"x": 49, "y": 64, "flags": 2}, + {"x": 31, "y": 64, "flags": 2}, + {"x": 13, "y": 64, "flags": 2}, + {"matrix": [1, 0], "x": 31, "y": 46, "flags": 4}, + {"x": 0, "y": 55, "flags": 2}, + {"x": 0, "y": 46, "flags": 2}, + {"x": 0, "y": 37, "flags": 2}, + {"x": 0, "y": 27, "flags": 2}, + {"x": 0, "y": 18, "flags": 2}, + {"x": 0, "y": 9, "flags": 2}, + {"matrix": [0, 0], "x": 31, "y": 18, "flags": 4}, + {"x": 13, "y": 0, "flags": 2}, + {"x": 31, "y": 0, "flags": 2}, + {"x": 49, "y": 0, "flags": 2}, + {"x": 67, "y": 0, "flags": 2}, + {"x": 85, "y": 0, "flags": 2}, + {"matrix": [0, 1], "x": 85, "y": 18, "flags": 4}, + {"matrix": [0, 2], "x": 139, "y": 18, "flags": 4}, + {"x": 139, "y": 0, "flags": 2}, + {"x": 157, "y": 0, "flags": 2}, + {"x": 175, "y": 0, "flags": 2}, + {"x": 193, "y": 0, "flags": 2}, + {"x": 211, "y": 0, "flags": 2}, + {"matrix": [0, 3], "x": 193, "y": 18, "flags": 4}, + {"x": 224, "y": 9, "flags": 2}, + {"x": 224, "y": 18, "flags": 2}, + {"x": 224, "y": 27, "flags": 2}, + {"x": 224, "y": 37, "flags": 2}, + {"x": 224, "y": 46, "flags": 2}, + {"x": 224, "y": 55, "flags": 2}, + {"matrix": [1, 3], "x": 193, "y": 46, "flags": 4}, + {"x": 211, "y": 64, "flags": 2}, + {"x": 193, "y": 64, "flags": 2}, + {"x": 175, "y": 64, "flags": 2}, + {"x": 157, "y": 64, "flags": 2}, + {"matrix": [1, 2], "x": 139, "y": 46, "flags": 4}, + {"x": 139, "y": 64, "flags": 2}, + {"x": 121, "y": 64, "flags": 2}, + {"x": 103, "y": 64, "flags": 2} + ], "sleep": true }, "processor": "STM32F072", diff --git a/keyboards/geekboards/macropad_v2/macropad_v2.c b/keyboards/geekboards/macropad_v2/macropad_v2.c deleted file mode 100644 index ba65697988..0000000000 --- a/keyboards/geekboards/macropad_v2/macropad_v2.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright 2020 Geekboards ltd. (geekboards.ru / geekboards.de) - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - {13,19,20,26}, {6,0,38,33}, -}, { - // LED Index to Physical Position - {85,46}, - {85,64},{67,64},{49,64},{31,64},{13,64}, - {31,46}, - {0,55},{0,46},{0,37},{0,27},{0,18},{0,9}, - {31,18}, - {13,0},{31,0},{49,0},{67,0},{85,0}, - {85,18},{139,18}, - {139,0},{157,0},{175,0},{193,0},{211,0}, - {193,18}, - {224,9},{224,18},{224,27},{224,37},{224,46},{224,55}, - {193,46}, - {211,64},{193,64},{175,64},{157,64}, - {139,46}, - {139,64},{121,64},{103,64}, -}, { - // LED Index to Flag, 2=backlight, 4=key - 4, - 2, 2, 2, 2, 2, - 4, - 2, 2, 2, 2, 2, 2, - 4, - 2, 2, 2, 2, 2, - 4, 4, - 2, 2, 2, 2, 2, - 4, - 2, 2, 2, 2, 2, 2, - 4, - 2, 2, 2, 2, - 4, - 2, 2, 2 -} }; - -#endif diff --git a/keyboards/geekboards/tester/keyboard.json b/keyboards/geekboards/tester/keyboard.json index 2b85961df8..236c2c697f 100644 --- a/keyboards/geekboards/tester/keyboard.json +++ b/keyboards/geekboards/tester/keyboard.json @@ -50,6 +50,16 @@ "solid_reactive_multinexus": true }, "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 151, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [1, 1], "x": 75, "y": 64, "flags": 4}, + {"matrix": [1, 2], "x": 151, "y": 64, "flags": 4}, + {"matrix": [1, 3], "x": 224, "y": 64, "flags": 4} + ], "sleep": true }, "features": { diff --git a/keyboards/geekboards/tester/tester.c b/keyboards/geekboards/tester/tester.c index 4daa4ef062..001fd06e9d 100644 --- a/keyboards/geekboards/tester/tester.c +++ b/keyboards/geekboards/tester/tester.c @@ -16,16 +16,3 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C1_7, C2_7, C3_7}, //A7 {0, C1_8, C2_8, C3_8}, //A8 }; - -led_config_t g_led_config = { -{ - { 0, 1, 2, 3}, - { 4, 5, 6, 7} -}, -{ - { 0, 0 }, { 75, 0 }, { 151, 0 }, { 224, 0 }, { 0, 64 }, { 75, 64 }, { 151, 64 }, { 224, 64 } -}, -{ - 4, 4, 4, 4, 4, 4, 4, 4 -} -}; diff --git a/keyboards/giabalanai/giabalanai.c b/keyboards/giabalanai/giabalanai.c index 6f8e359479..ae6a1547da 100644 --- a/keyboards/giabalanai/giabalanai.c +++ b/keyboards/giabalanai/giabalanai.c @@ -88,66 +88,6 @@ NO_LED, 84, 83, 82, 81, 80, 79, NO_LED, NO_LED, NO_LED # endif #endif // RGBLIGHT_ENABLE -#ifdef RGB_MATRIX_ENABLE - -led_config_t g_led_config = { - { - { 74, 75, 98, 99, 122, 63, 86, 87, 110, 111 }, - { 73, 76, 97, 100, 121, 64, 85, 88, 109, 112 }, - { 72, 77, 96, 101, 120, 65, 84, 89, 108, 113 }, - { 71, 78, 95, 102, 119, 66, 83, 90, 107, 114 }, - { 70, 79, 94, 103, 118, 67, 82, 91, 106, 115 }, - { 69, 80, 93, 104, 117, 68, 81, 92, 105, 116 }, - { 26, 27, 28, 29, 30, 31, 32, NO_LED, NO_LED, NO_LED }, - { 50, 49, 48, 47, 46, 45, 44, NO_LED, NO_LED, NO_LED }, - { 25, 51, 52, 53, 54, 55, 56, NO_LED, NO_LED, NO_LED }, - { NO_LED, 12, 37, 36, 35, 34, 33, NO_LED, NO_LED, NO_LED }, - { NO_LED, 38, 39, 40, 41, 42, 43, NO_LED, NO_LED, NO_LED }, - { NO_LED, 62, 61, 60, 59, 58, 57, NO_LED, NO_LED, NO_LED } - }, { - { 120, 0 }, { 128, 0 }, { 136, 0 }, { 144, 0 }, { 152, 0 }, { 160, 0 }, { 168, 0 }, { 176, 0 }, { 184, 0 }, { 192, 0 }, { 200, 0 }, { 208, 0 }, - { 224, 32 }, - { 212, 16 }, { 204, 16 }, { 196, 16 }, { 188, 16 }, { 180, 16 }, { 172, 16 }, { 164, 16 }, { 156, 16 }, { 148, 16 }, { 140, 16 }, { 132, 16 }, { 124, 16 }, { 116, 16 }, - { 120, 32 }, { 128, 32 }, { 136, 32 }, { 144, 32 }, { 152, 32 }, { 160, 32 }, { 168, 32 }, { 176, 32 }, { 184, 32 }, { 192, 32 }, { 200, 32 }, { 208, 32 }, - { 212, 48 }, { 204, 48 }, { 196, 48 }, { 188, 48 }, { 180, 48 }, { 172, 48 }, { 164, 48 }, { 156, 48 }, { 148, 48 }, { 140, 48 }, { 132, 48 }, { 124, 48 }, { 116, 48 }, - { 120, 64 }, { 128, 64 }, { 136, 64 }, { 144, 64 }, { 152, 64 }, { 160, 64 }, { 168, 64 }, { 176, 64 }, { 184, 64 }, { 192, 64 }, { 200, 64 }, { 208, 64 }, - - { 88, 0 }, { 80, 0 }, { 72, 0 }, { 64, 0 }, { 56, 0 }, { 48, 0 }, { 40, 0 }, { 32, 0 }, { 24, 0 }, { 16, 0 }, { 8, 0 }, { 0, 0 }, - { 4, 16 }, { 12, 16 }, { 20, 16 }, { 28, 16 }, { 36, 16 }, { 44, 16 }, { 52, 16 }, { 60, 16 }, { 68, 16 }, { 76, 16 }, { 84, 16 }, { 92, 16 }, - { 96, 32 }, { 88, 32 }, { 80, 32 }, { 72, 32 }, { 64, 32 }, { 56, 32 }, { 48, 32 }, { 40, 32 }, { 32, 32 }, { 24, 32 }, { 16, 32 }, { 8, 32 }, - { 12, 48 }, { 20, 48 }, { 28, 48 }, { 36, 48 }, { 44, 48 }, { 52, 48 }, { 60, 48 }, { 68, 48 }, { 76, 48 }, { 84, 48 }, { 92, 48 }, { 100, 48 }, - { 104, 64 }, { 96, 64 }, { 88, 64 }, { 80, 64 }, { 72, 64 }, { 64, 64 }, { 56, 64 }, { 48, 64 }, { 40, 64 }, { 32, 64 }, { 24, 64 }, { 16, 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, 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, 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, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - } -}; - -// const uint8_t PROGMEM convert_led_location2number[] = { -// 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, -// 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, -// 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, -// 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, -// 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, -// -// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -// 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, -// 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 12, -// 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, -// 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62 -// }; -#endif - void my_process_midi4Bass(uint8_t channel, keyrecord_t *record, uint8_t *chord_status, uint8_t chord, uint16_t root_note, bool is_single_bass) { uint8_t velocity = midi_config.velocity; diff --git a/keyboards/giabalanai/keyboard.json b/keyboards/giabalanai/keyboard.json index 2e2357fe4c..9bb6b49336 100644 --- a/keyboards/giabalanai/keyboard.json +++ b/keyboards/giabalanai/keyboard.json @@ -17,6 +17,131 @@ "multisplash": true }, "driver": "ws2812", + "layout": [ + {"x": 120, "y": 0, "flags": 4}, + {"x": 128, "y": 0, "flags": 4}, + {"x": 136, "y": 0, "flags": 4}, + {"x": 144, "y": 0, "flags": 4}, + {"x": 152, "y": 0, "flags": 4}, + {"x": 160, "y": 0, "flags": 4}, + {"x": 168, "y": 0, "flags": 4}, + {"x": 176, "y": 0, "flags": 4}, + {"x": 184, "y": 0, "flags": 4}, + {"x": 192, "y": 0, "flags": 4}, + {"x": 200, "y": 0, "flags": 4}, + {"x": 208, "y": 0, "flags": 4}, + {"matrix": [9, 1], "x": 224, "y": 32, "flags": 4}, + {"x": 212, "y": 16, "flags": 4}, + {"x": 204, "y": 16, "flags": 4}, + {"x": 196, "y": 16, "flags": 4}, + {"x": 188, "y": 16, "flags": 4}, + {"x": 180, "y": 16, "flags": 4}, + {"x": 172, "y": 16, "flags": 4}, + {"x": 164, "y": 16, "flags": 4}, + {"x": 156, "y": 16, "flags": 4}, + {"x": 148, "y": 16, "flags": 4}, + {"x": 140, "y": 16, "flags": 4}, + {"x": 132, "y": 16, "flags": 4}, + {"x": 124, "y": 16, "flags": 4}, + {"matrix": [8, 0], "x": 116, "y": 16, "flags": 4}, + {"matrix": [6, 0], "x": 120, "y": 32, "flags": 4}, + {"matrix": [6, 1], "x": 128, "y": 32, "flags": 4}, + {"matrix": [6, 2], "x": 136, "y": 32, "flags": 4}, + {"matrix": [6, 3], "x": 144, "y": 32, "flags": 4}, + {"matrix": [6, 4], "x": 152, "y": 32, "flags": 4}, + {"matrix": [6, 5], "x": 160, "y": 32, "flags": 4}, + {"matrix": [6, 6], "x": 168, "y": 32, "flags": 4}, + {"matrix": [9, 6], "x": 176, "y": 32, "flags": 4}, + {"matrix": [9, 5], "x": 184, "y": 32, "flags": 4}, + {"matrix": [9, 4], "x": 192, "y": 32, "flags": 4}, + {"matrix": [9, 3], "x": 200, "y": 32, "flags": 4}, + {"matrix": [9, 2], "x": 208, "y": 32, "flags": 4}, + {"matrix": [10, 1], "x": 212, "y": 48, "flags": 4}, + {"matrix": [10, 2], "x": 204, "y": 48, "flags": 4}, + {"matrix": [10, 3], "x": 196, "y": 48, "flags": 4}, + {"matrix": [10, 4], "x": 188, "y": 48, "flags": 4}, + {"matrix": [10, 5], "x": 180, "y": 48, "flags": 4}, + {"matrix": [10, 6], "x": 172, "y": 48, "flags": 4}, + {"matrix": [7, 6], "x": 164, "y": 48, "flags": 4}, + {"matrix": [7, 5], "x": 156, "y": 48, "flags": 4}, + {"matrix": [7, 4], "x": 148, "y": 48, "flags": 4}, + {"matrix": [7, 3], "x": 140, "y": 48, "flags": 4}, + {"matrix": [7, 2], "x": 132, "y": 48, "flags": 4}, + {"matrix": [7, 1], "x": 124, "y": 48, "flags": 4}, + {"matrix": [7, 0], "x": 116, "y": 48, "flags": 4}, + {"matrix": [8, 1], "x": 120, "y": 64, "flags": 4}, + {"matrix": [8, 2], "x": 128, "y": 64, "flags": 4}, + {"matrix": [8, 3], "x": 136, "y": 64, "flags": 4}, + {"matrix": [8, 4], "x": 144, "y": 64, "flags": 4}, + {"matrix": [8, 5], "x": 152, "y": 64, "flags": 4}, + {"matrix": [8, 6], "x": 160, "y": 64, "flags": 4}, + {"matrix": [11, 6], "x": 168, "y": 64, "flags": 4}, + {"matrix": [11, 5], "x": 176, "y": 64, "flags": 4}, + {"matrix": [11, 4], "x": 184, "y": 64, "flags": 4}, + {"matrix": [11, 3], "x": 192, "y": 64, "flags": 4}, + {"matrix": [11, 2], "x": 200, "y": 64, "flags": 4}, + {"matrix": [11, 1], "x": 208, "y": 64, "flags": 4}, + {"matrix": [0, 5], "x": 88, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [2, 5], "x": 72, "y": 0, "flags": 4}, + {"matrix": [3, 5], "x": 64, "y": 0, "flags": 4}, + {"matrix": [4, 5], "x": 56, "y": 0, "flags": 4}, + {"matrix": [5, 5], "x": 48, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 40, "y": 0, "flags": 4}, + {"matrix": [4, 0], "x": 32, "y": 0, "flags": 4}, + {"matrix": [3, 0], "x": 24, "y": 0, "flags": 4}, + {"matrix": [2, 0], "x": 16, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 8, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 4, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 12, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 20, "y": 16, "flags": 4}, + {"matrix": [3, 1], "x": 28, "y": 16, "flags": 4}, + {"matrix": [4, 1], "x": 36, "y": 16, "flags": 4}, + {"matrix": [5, 1], "x": 44, "y": 16, "flags": 4}, + {"matrix": [5, 6], "x": 52, "y": 16, "flags": 4}, + {"matrix": [4, 6], "x": 60, "y": 16, "flags": 4}, + {"matrix": [3, 6], "x": 68, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 76, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 84, "y": 16, "flags": 4}, + {"matrix": [0, 6], "x": 92, "y": 16, "flags": 4}, + {"matrix": [0, 7], "x": 96, "y": 32, "flags": 4}, + {"matrix": [1, 7], "x": 88, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 80, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 72, "y": 32, "flags": 4}, + {"matrix": [4, 7], "x": 64, "y": 32, "flags": 4}, + {"matrix": [5, 7], "x": 56, "y": 32, "flags": 4}, + {"matrix": [5, 2], "x": 48, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 40, "y": 32, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 24, "y": 32, "flags": 4}, + {"matrix": [1, 2], "x": 16, "y": 32, "flags": 4}, + {"matrix": [0, 2], "x": 8, "y": 32, "flags": 4}, + {"matrix": [0, 3], "x": 12, "y": 48, "flags": 4}, + {"matrix": [1, 3], "x": 20, "y": 48, "flags": 4}, + {"matrix": [2, 3], "x": 28, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 36, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 44, "y": 48, "flags": 4}, + {"matrix": [5, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [5, 8], "x": 60, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 76, "y": 48, "flags": 4}, + {"matrix": [2, 8], "x": 84, "y": 48, "flags": 4}, + {"matrix": [1, 8], "x": 92, "y": 48, "flags": 4}, + {"matrix": [0, 8], "x": 100, "y": 48, "flags": 4}, + {"matrix": [0, 9], "x": 104, "y": 64, "flags": 4}, + {"matrix": [1, 9], "x": 96, "y": 64, "flags": 4}, + {"matrix": [2, 9], "x": 88, "y": 64, "flags": 4}, + {"matrix": [3, 9], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 72, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 64, "y": 64, "flags": 4}, + {"matrix": [5, 4], "x": 56, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 48, "y": 64, "flags": 4}, + {"matrix": [3, 4], "x": 40, "y": 64, "flags": 4}, + {"matrix": [2, 4], "x": 32, "y": 64, "flags": 4}, + {"matrix": [1, 4], "x": 24, "y": 64, "flags": 4}, + {"matrix": [0, 4], "x": 16, "y": 64, "flags": 4} + ], "max_brightness": 50 }, "rgblight": { diff --git a/keyboards/gizmo_engineering/gk6/gk6.c b/keyboards/gizmo_engineering/gk6/gk6.c index fe85ecc235..a6f6d93438 100755 --- a/keyboards/gizmo_engineering/gk6/gk6.c +++ b/keyboards/gizmo_engineering/gk6/gk6.c @@ -82,102 +82,4 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C9_15, C8_15, C6_14}, //61 led59 {1, C9_16, C7_15, C6_15}, //62 led60 }; - -led_config_t g_led_config = { { - // Key Matrix to LED Index -// 1, 6, 10, 15, 20, 26, 31, 37, 42, 47, 52, 56 - {0, 5, 10, 15, 20, 26, 31, 37, 43, 48, 53, 58}, -// 2, 7, 11, 16, 21, 27, 32, 37b, 43, 48, 52b, 57 - {1, 6, 11, 16, 21, 27, 32, 38, 44, 49, 54, 59}, -// 3, 7b, 12, 17, 22, 28, 33, 38, 44, 49, 53, 58 - {2, 7, 12, 17, 22, 28, 33, 39, 45, 50, 55, 60}, -// 4, 8, 13, 18, 23, 29, 34, 39, 45, 50, 54, 59 - {3, 8, 13, 18, 23, 29, 34, 40, 46, 51, 56, 61}, -// 5, 9, 14, 19, 25, NO_LED, NO_LED, 41, 46, 51, 55, 60 - {4, 9, 14, 19, 25, NO_LED, NO_LED, 42, 47, 52, 57, 62}, -}, { - // LED Index to Physical Position - {0, 0}, // 0 - {0, 16}, // 1 - {0, 32}, // 2 - {0, 48}, // 3 - {0, 64}, // 4 - - {21, 0}, // 5 - {21, 16}, // 6 - {21, 32}, // 7 - {21, 48}, // 8 - {21, 64}, // 9 - - {41, 0}, // 10 - {41, 16}, // 11 - {41, 32}, // 12 - {41, 48}, // 13 - {41, 64}, // 14 - - {61, 0}, // 15 - {61, 16}, // 16 - {61, 32}, // 17 - {61, 48}, // 18 - {61, 64}, // 19 - - {82, 0}, // 20 - {82, 16}, // 21 - {82, 32}, // 22 - {82, 48}, // 23 - {82, 64}, // 24 - {92, 64}, // 25 - - {102, 0}, // 26 - {102, 16}, // 27 - {102, 32}, // 28 - {102, 48}, // 29 - {102, 64}, // 30 - - {122, 0}, // 31 - {122, 16}, // 32 - {122, 32}, // 33 - {122, 48}, // 34 - {122, 64}, // 35 - {112, 64}, // 36 - - {142, 0}, // 37 - {142, 16}, // 38 - {142, 32}, // 39 - {142, 48}, // 40 - {142, 64}, // 41 - {132, 64}, // 42 - - {163, 0}, // 43 - {163, 16}, // 44 - {163, 32}, // 45 - {163, 48}, // 46 - {163, 64}, // 47 - - {183, 0}, // 48 - {183, 16}, // 49 - {183, 32}, // 50 - {183, 48}, // 51 - {183, 64}, // 52 - - {203, 0}, // 53 - {203, 16}, // 54 - {203, 32}, // 55 - {203, 48}, // 56 - {203, 64}, // 57 - - {224, 0}, // 58 - {224, 16}, // 59 - {224, 32}, // 60 - {224, 48}, // 61 - {224, 64}, // 62 -}, { - // LED Index to Flag - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04 -} }; #endif diff --git a/keyboards/gizmo_engineering/gk6/keyboard.json b/keyboards/gizmo_engineering/gk6/keyboard.json index 45e5bf0706..70ab615a7c 100644 --- a/keyboards/gizmo_engineering/gk6/keyboard.json +++ b/keyboards/gizmo_engineering/gk6/keyboard.json @@ -24,6 +24,71 @@ "solid_reactive_multicross": true }, "driver": "is31fl3731", + "layout": [ + {"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": [0, 1], "x": 21, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 21, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 21, "y": 32, "flags": 4}, + {"matrix": [3, 1], "x": 21, "y": 48, "flags": 4}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 4}, + {"matrix": [0, 2], "x": 41, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 41, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 32, "flags": 4}, + {"matrix": [3, 2], "x": 41, "y": 48, "flags": 4}, + {"matrix": [4, 2], "x": 41, "y": 64, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 32, "flags": 4}, + {"matrix": [3, 3], "x": 61, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 61, "y": 64, "flags": 4}, + {"matrix": [0, 4], "x": 82, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 82, "y": 16, "flags": 4}, + {"matrix": [2, 4], "x": 82, "y": 32, "flags": 4}, + {"matrix": [3, 4], "x": 82, "y": 48, "flags": 4}, + {"x": 82, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 92, "y": 64, "flags": 4}, + {"matrix": [0, 5], "x": 102, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 102, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 102, "y": 32, "flags": 4}, + {"matrix": [3, 5], "x": 102, "y": 48, "flags": 4}, + {"x": 102, "y": 64, "flags": 4}, + {"matrix": [0, 6], "x": 122, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 122, "y": 32, "flags": 4}, + {"matrix": [3, 6], "x": 122, "y": 48, "flags": 4}, + {"x": 122, "y": 64, "flags": 4}, + {"x": 112, "y": 64, "flags": 4}, + {"matrix": [0, 7], "x": 142, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 16, "flags": 4}, + {"matrix": [2, 7], "x": 142, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 142, "y": 48, "flags": 4}, + {"x": 142, "y": 64, "flags": 4}, + {"matrix": [4, 7], "x": 132, "y": 64, "flags": 4}, + {"matrix": [0, 8], "x": 163, "y": 0, "flags": 4}, + {"matrix": [1, 8], "x": 163, "y": 16, "flags": 4}, + {"matrix": [2, 8], "x": 163, "y": 32, "flags": 4}, + {"matrix": [3, 8], "x": 163, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 163, "y": 64, "flags": 4}, + {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 16, "flags": 4}, + {"matrix": [2, 9], "x": 183, "y": 32, "flags": 4}, + {"matrix": [3, 9], "x": 183, "y": 48, "flags": 4}, + {"matrix": [4, 9], "x": 183, "y": 64, "flags": 4}, + {"matrix": [0, 10], "x": 203, "y": 0, "flags": 4}, + {"matrix": [1, 10], "x": 203, "y": 16, "flags": 4}, + {"matrix": [2, 10], "x": 203, "y": 32, "flags": 4}, + {"matrix": [3, 10], "x": 203, "y": 48, "flags": 4}, + {"matrix": [4, 10], "x": 203, "y": 64, "flags": 4}, + {"matrix": [0, 11], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 11], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 11], "x": 224, "y": 32, "flags": 4}, + {"matrix": [3, 11], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 11], "x": 224, "y": 64, "flags": 4} + ], "react_on_keyup": true, "sleep": true }, diff --git a/keyboards/gmmk/gmmk2/p65/ansi/ansi.c b/keyboards/gmmk/gmmk2/p65/ansi/ansi.c index b3ac9906db..94aa93d8ea 100644 --- a/keyboards/gmmk/gmmk2/p65/ansi/ansi.c +++ b/keyboards/gmmk/gmmk2/p65/ansi/ansi.c @@ -118,119 +118,4 @@ const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {1, SW9_CS16, SW9_CS17, SW9_CS18 }, // 87 LED 19 {1, SW10_CS16, SW10_CS17, SW10_CS18} // 88 LED 20 }; - -#define __ NO_LED - -led_config_t g_led_config = {{ - { 44, 57, __, 64, __, 66, 58, 55}, - { 16, 15, 31, 0, 45, 59, __, 1}, - { 17, 30, 32, 60, 46, 14, 29, 2}, - { 18, 61, 33, 63, 47, 56, 62, 3}, - { 19, 20, 34, 35, 48, 49, 5, 4}, - { 22, 21, 37, 36, 51, 50, 6, 7}, - { 23, 27, 38, __, 52, 43, 12, 8}, - { 24, 13, 39, 65, 53, __, 28, 9}, - { 25, 26, 40, 41, 42, 54, 11, 10} -}, { - {14, 0 }, // 0 Esc - {28, 0 }, // 1 1 - {42, 0 }, // 2 2 - {56, 0 }, // 3 3 - {70, 0 }, // 4 4 - {84, 0 }, // 5 5 - {98, 0 }, // 6 6 - {112, 0 }, // 7 7 - {126, 0 }, // 8 8 - {140, 0 }, // 9 9 - {154, 0 }, // 10 0 - {168, 0 }, // 11 - - {182, 0 }, // 12 = - {196, 0 }, // 13 Backspace - {210, 0 }, // 14 Del - - {14, 16}, // 15 Tab - {28, 16}, // 16 Q - {42, 16}, // 17 W - {56, 16}, // 18 E - {70, 16}, // 19 R - {84, 16}, // 20 T - {98, 16}, // 21 Y - {112, 16}, // 22 U - {126, 16}, // 23 I - {140, 16}, // 24 O - {154, 16}, // 25 P - {168, 16}, // 26 [ - {182, 16}, // 27 ] - {196, 16}, // 28 \| - {210, 16}, // 29 PgUp - - {14, 32}, // 30 Caps Lock - {28, 32}, // 31 A - {42, 32}, // 32 S - {56, 32}, // 33 D - {70, 32}, // 34 F - {84, 32}, // 35 G - {98, 32}, // 36 H - {112, 32}, // 37 J - {126, 32}, // 38 K - {140, 32}, // 39 L - {154, 32}, // 40 ; - {168, 32}, // 41 ' - {196, 32}, // 42 Enter - {210, 32}, // 43 PgDn - - {14, 48}, // 44 Shift_L - {42, 48}, // 45 Z - {56, 48}, // 46 X - {70, 48}, // 47 C - {84, 48}, // 48 V - {98, 48}, // 49 B - {112, 48}, // 50 N - {126, 48}, // 51 M - {140, 48}, // 52 , - {154, 48}, // 53 . - {168, 48}, // 54 / - {182, 48}, // 55 Shift_R - {196, 48}, // 56 Up - {210, 48}, // 57 END - - {14, 64}, // 58 Ctrl_L - {28, 64}, // 59 Win_L - {42, 64}, // 60 Alt_L - {84, 64}, // 61 Space - {126, 64}, // 62 Alt_R - {140, 64}, // 63 FN - {182, 64}, // 64 Left - {196, 64}, // 65 Down - {210, 64}, // 66 Right - - {224, 0 }, // 69 LED 1 - {224, 7 }, // 70 LED 2 - {224, 14}, // 71 LED 3 - {224, 21}, // 72 LED 4 - {224, 28}, // 73 LED 5 - {224, 35}, // 74 LED 6 - {224, 42}, // 75 LED 7 - {224, 49}, // 76 LED 8 - {224, 56}, // 77 LED 9 - {224, 64}, // 78 LED 10 - {0, 0 }, // 79 LED 11 - {0, 7 }, // 80 LED 12 - {0, 14}, // 81 LED 13 - {0, 21}, // 82 LED 14 - {0, 28}, // 83 LED 15 - {0, 35}, // 84 LED 16 - {0, 42}, // 85 LED 17 - {0, 49}, // 86 LED 18 - {0, 56}, // 87 LED 19 - {0, 64}, // 88 LED 20 -}, { - 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, 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, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -} }; #endif diff --git a/keyboards/gmmk/gmmk2/p65/ansi/keyboard.json b/keyboards/gmmk/gmmk2/p65/ansi/keyboard.json index 70c308da5f..14603e0283 100644 --- a/keyboards/gmmk/gmmk2/p65/ansi/keyboard.json +++ b/keyboards/gmmk/gmmk2/p65/ansi/keyboard.json @@ -28,6 +28,97 @@ }, "processor": "WB32F3G71", "bootloader": "wb32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [1, 3], "x": 14, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 28, "y": 0, "flags": 4}, + {"matrix": [2, 7], "x": 42, "y": 0, "flags": 4}, + {"matrix": [3, 7], "x": 56, "y": 0, "flags": 4}, + {"matrix": [4, 7], "x": 70, "y": 0, "flags": 4}, + {"matrix": [4, 6], "x": 84, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 98, "y": 0, "flags": 4}, + {"matrix": [5, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [6, 7], "x": 126, "y": 0, "flags": 4}, + {"matrix": [7, 7], "x": 140, "y": 0, "flags": 4}, + {"matrix": [8, 7], "x": 154, "y": 0, "flags": 4}, + {"matrix": [8, 6], "x": 168, "y": 0, "flags": 4}, + {"matrix": [6, 6], "x": 182, "y": 0, "flags": 4}, + {"matrix": [7, 1], "x": 196, "y": 0, "flags": 4}, + {"matrix": [2, 5], "x": 210, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 14, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 28, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 42, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 56, "y": 16, "flags": 4}, + {"matrix": [4, 0], "x": 70, "y": 16, "flags": 4}, + {"matrix": [4, 1], "x": 84, "y": 16, "flags": 4}, + {"matrix": [5, 1], "x": 98, "y": 16, "flags": 4}, + {"matrix": [5, 0], "x": 112, "y": 16, "flags": 4}, + {"matrix": [6, 0], "x": 126, "y": 16, "flags": 4}, + {"matrix": [7, 0], "x": 140, "y": 16, "flags": 4}, + {"matrix": [8, 0], "x": 154, "y": 16, "flags": 4}, + {"matrix": [8, 1], "x": 168, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 182, "y": 16, "flags": 4}, + {"matrix": [7, 6], "x": 196, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 210, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 14, "y": 32, "flags": 4}, + {"matrix": [1, 2], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 42, "y": 32, "flags": 4}, + {"matrix": [3, 2], "x": 56, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 70, "y": 32, "flags": 4}, + {"matrix": [4, 3], "x": 84, "y": 32, "flags": 4}, + {"matrix": [5, 3], "x": 98, "y": 32, "flags": 4}, + {"matrix": [5, 2], "x": 112, "y": 32, "flags": 4}, + {"matrix": [6, 2], "x": 126, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 140, "y": 32, "flags": 4}, + {"matrix": [8, 2], "x": 154, "y": 32, "flags": 4}, + {"matrix": [8, 3], "x": 168, "y": 32, "flags": 4}, + {"matrix": [8, 4], "x": 196, "y": 32, "flags": 4}, + {"matrix": [6, 5], "x": 210, "y": 32, "flags": 4}, + {"matrix": [0, 0], "x": 14, "y": 48, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 48, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 48, "flags": 4}, + {"matrix": [4, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [4, 5], "x": 98, "y": 48, "flags": 4}, + {"matrix": [5, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [5, 4], "x": 126, "y": 48, "flags": 4}, + {"matrix": [6, 4], "x": 140, "y": 48, "flags": 4}, + {"matrix": [7, 4], "x": 154, "y": 48, "flags": 4}, + {"matrix": [8, 5], "x": 168, "y": 48, "flags": 4}, + {"matrix": [0, 7], "x": 182, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 196, "y": 48, "flags": 4}, + {"matrix": [0, 1], "x": 210, "y": 48, "flags": 4}, + {"matrix": [0, 6], "x": 14, "y": 64, "flags": 4}, + {"matrix": [1, 5], "x": 28, "y": 64, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 84, "y": 64, "flags": 4}, + {"matrix": [3, 6], "x": 126, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 140, "y": 64, "flags": 4}, + {"matrix": [0, 3], "x": 182, "y": 64, "flags": 4}, + {"matrix": [7, 3], "x": 196, "y": 64, "flags": 4}, + {"matrix": [0, 5], "x": 210, "y": 64, "flags": 4}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 7, "flags": 2}, + {"x": 224, "y": 14, "flags": 2}, + {"x": 224, "y": 21, "flags": 2}, + {"x": 224, "y": 28, "flags": 2}, + {"x": 224, "y": 35, "flags": 2}, + {"x": 224, "y": 42, "flags": 2}, + {"x": 224, "y": 49, "flags": 2}, + {"x": 224, "y": 56, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 0, "y": 7, "flags": 2}, + {"x": 0, "y": 14, "flags": 2}, + {"x": 0, "y": 21, "flags": 2}, + {"x": 0, "y": 28, "flags": 2}, + {"x": 0, "y": 35, "flags": 2}, + {"x": 0, "y": 42, "flags": 2}, + {"x": 0, "y": 49, "flags": 2}, + {"x": 0, "y": 56, "flags": 2}, + {"x": 0, "y": 64, "flags": 2} + ] + }, "layout_aliases": { "LAYOUT": "LAYOUT_65_ansi_blocker" }, diff --git a/keyboards/gmmk/gmmk2/p65/iso/iso.c b/keyboards/gmmk/gmmk2/p65/iso/iso.c index abadaccd34..bc9cfe6a83 100644 --- a/keyboards/gmmk/gmmk2/p65/iso/iso.c +++ b/keyboards/gmmk/gmmk2/p65/iso/iso.c @@ -119,120 +119,4 @@ const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {1, SW9_CS16, SW9_CS17, SW9_CS18 }, // 86 LED 19 {1, SW10_CS16, SW10_CS17, SW10_CS18} // 87 LED 20 }; - -#define __ NO_LED - -led_config_t g_led_config = {{ - { 44, 58, 45, 65, __, 67, 59, 56}, - { 16, 15, 31, 0, 46, 60, __, 1}, - { 17, 30, 32, 61, 47, 14, 29, 2}, - { 18, 62, 33, 64, 48, 57, 63, 3}, - { 19, 20, 34, 35, 49, 50, 5, 4}, - { 22, 21, 37, 36, 52, 51, 6, 7}, - { 23, 27, 38, __, 53, 43, 12, 8}, - { 24, 13, 39, 66, 54, 42, __, 9}, - { 25, 26, 40, 41, 28, 55, 11, 10} -}, { - {14, 0 }, // 0 Esc - {28, 0 }, // 1 1 - {42, 0 }, // 2 2 - {56, 0 }, // 3 3 - {70, 0 }, // 4 4 - {84, 0 }, // 5 5 - {98, 0 }, // 6 6 - {112, 0 }, // 7 7 - {126, 0 }, // 8 8 - {140, 0 }, // 9 9 - {154, 0 }, // 10 0 - {168, 0 }, // 11 - - {182, 0 }, // 12 = - {196, 0 }, // 13 Backspace - {210, 0 }, // 14 HOME - - {14, 16}, // 15 Tab - {28, 16}, // 16 Q - {42, 16}, // 17 W - {56, 16}, // 18 E - {70, 16}, // 19 R - {84, 16}, // 20 T - {98, 16}, // 21 Y - {112, 16}, // 22 U - {126, 16}, // 23 I - {140, 16}, // 24 O - {154, 16}, // 25 P - {168, 16}, // 26 [ - {182, 16}, // 27 ] - {196, 16}, // 28 ENTER - {210, 16}, // 29 PgUp - - {14, 32}, // 30 Caps Lock - {28, 32}, // 31 A - {42, 32}, // 32 S - {56, 32}, // 33 D - {70, 32}, // 34 F - {84, 32}, // 35 G - {98, 32}, // 36 H - {112, 32}, // 37 J - {126, 32}, // 38 K - {140, 32}, // 39 L - {154, 32}, // 40 ; - {168, 32}, // 41 ' - {182, 32}, // 42 k42 - {210, 32}, // 43 PgDn - - {14, 48}, // 44 Shift_L - {28, 48}, // 45 k45 - {42, 48}, // 46 Z - {56, 48}, // 47 X - {70, 48}, // 48 C - {84, 48}, // 49 V - {98, 48}, // 50 B - {112, 48}, // 51 N - {126, 48}, // 52 M - {140, 48}, // 53 , - {154, 48}, // 54 . - {168, 48}, // 55 / - {182, 48}, // 56 Shift_R - {196, 48}, // 57 Up - {210, 48}, // 58 END - - {14, 64}, // 59 Ctrl_L - {28, 64}, // 60 Win_L - {42, 64}, // 61 Alt_L - {84, 64}, // 62 Space - {126, 64}, // 63 Alt_R - {140, 64}, // 64 FN - {182, 64}, // 65 Left - {196, 64}, // 66 Down - {210, 64}, // 67 Right - - {224, 0 }, // 68 LED 1 - {224, 7 }, // 69 LED 2 - {224, 14}, // 70 LED 3 - {224, 21}, // 71 LED 4 - {224, 28}, // 72 LED 5 - {224, 35}, // 73 LED 6 - {224, 42}, // 74 LED 7 - {224, 49}, // 75 LED 8 - {224, 56}, // 76 LED 9 - {224, 64}, // 77 LED 10 - {0, 0 }, // 78 LED 11 - {0, 7 }, // 79 LED 12 - {0, 14}, // 80 LED 13 - {0, 21}, // 81 LED 14 - {0, 28}, // 82 LED 15 - {0, 35}, // 83 LED 16 - {0, 42}, // 84 LED 17 - {0, 49}, // 85 LED 18 - {0, 56}, // 86 LED 19 - {0, 64}, // 87 LED 20 -}, { - 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, 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, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -} }; #endif diff --git a/keyboards/gmmk/gmmk2/p65/iso/keyboard.json b/keyboards/gmmk/gmmk2/p65/iso/keyboard.json index 9240268b4f..6a2f848ea6 100644 --- a/keyboards/gmmk/gmmk2/p65/iso/keyboard.json +++ b/keyboards/gmmk/gmmk2/p65/iso/keyboard.json @@ -28,6 +28,98 @@ }, "processor": "WB32F3G71", "bootloader": "wb32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [1, 3], "x": 14, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 28, "y": 0, "flags": 4}, + {"matrix": [2, 7], "x": 42, "y": 0, "flags": 4}, + {"matrix": [3, 7], "x": 56, "y": 0, "flags": 4}, + {"matrix": [4, 7], "x": 70, "y": 0, "flags": 4}, + {"matrix": [4, 6], "x": 84, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 98, "y": 0, "flags": 4}, + {"matrix": [5, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [6, 7], "x": 126, "y": 0, "flags": 4}, + {"matrix": [7, 7], "x": 140, "y": 0, "flags": 4}, + {"matrix": [8, 7], "x": 154, "y": 0, "flags": 4}, + {"matrix": [8, 6], "x": 168, "y": 0, "flags": 4}, + {"matrix": [6, 6], "x": 182, "y": 0, "flags": 4}, + {"matrix": [7, 1], "x": 196, "y": 0, "flags": 4}, + {"matrix": [2, 5], "x": 210, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 14, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 28, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 42, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 56, "y": 16, "flags": 4}, + {"matrix": [4, 0], "x": 70, "y": 16, "flags": 4}, + {"matrix": [4, 1], "x": 84, "y": 16, "flags": 4}, + {"matrix": [5, 1], "x": 98, "y": 16, "flags": 4}, + {"matrix": [5, 0], "x": 112, "y": 16, "flags": 4}, + {"matrix": [6, 0], "x": 126, "y": 16, "flags": 4}, + {"matrix": [7, 0], "x": 140, "y": 16, "flags": 4}, + {"matrix": [8, 0], "x": 154, "y": 16, "flags": 4}, + {"matrix": [8, 1], "x": 168, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 182, "y": 16, "flags": 4}, + {"matrix": [8, 4], "x": 196, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 210, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 14, "y": 32, "flags": 4}, + {"matrix": [1, 2], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 42, "y": 32, "flags": 4}, + {"matrix": [3, 2], "x": 56, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 70, "y": 32, "flags": 4}, + {"matrix": [4, 3], "x": 84, "y": 32, "flags": 4}, + {"matrix": [5, 3], "x": 98, "y": 32, "flags": 4}, + {"matrix": [5, 2], "x": 112, "y": 32, "flags": 4}, + {"matrix": [6, 2], "x": 126, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 140, "y": 32, "flags": 4}, + {"matrix": [8, 2], "x": 154, "y": 32, "flags": 4}, + {"matrix": [8, 3], "x": 168, "y": 32, "flags": 4}, + {"matrix": [7, 5], "x": 182, "y": 32, "flags": 4}, + {"matrix": [6, 5], "x": 210, "y": 32, "flags": 4}, + {"matrix": [0, 0], "x": 14, "y": 48, "flags": 4}, + {"matrix": [0, 2], "x": 28, "y": 48, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 48, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 48, "flags": 4}, + {"matrix": [4, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [4, 5], "x": 98, "y": 48, "flags": 4}, + {"matrix": [5, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [5, 4], "x": 126, "y": 48, "flags": 4}, + {"matrix": [6, 4], "x": 140, "y": 48, "flags": 4}, + {"matrix": [7, 4], "x": 154, "y": 48, "flags": 4}, + {"matrix": [8, 5], "x": 168, "y": 48, "flags": 4}, + {"matrix": [0, 7], "x": 182, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 196, "y": 48, "flags": 4}, + {"matrix": [0, 1], "x": 210, "y": 48, "flags": 4}, + {"matrix": [0, 6], "x": 14, "y": 64, "flags": 4}, + {"matrix": [1, 5], "x": 28, "y": 64, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 84, "y": 64, "flags": 4}, + {"matrix": [3, 6], "x": 126, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 140, "y": 64, "flags": 4}, + {"matrix": [0, 3], "x": 182, "y": 64, "flags": 4}, + {"matrix": [7, 3], "x": 196, "y": 64, "flags": 4}, + {"matrix": [0, 5], "x": 210, "y": 64, "flags": 4}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 7, "flags": 2}, + {"x": 224, "y": 14, "flags": 2}, + {"x": 224, "y": 21, "flags": 2}, + {"x": 224, "y": 28, "flags": 2}, + {"x": 224, "y": 35, "flags": 2}, + {"x": 224, "y": 42, "flags": 2}, + {"x": 224, "y": 49, "flags": 2}, + {"x": 224, "y": 56, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 0, "y": 7, "flags": 2}, + {"x": 0, "y": 14, "flags": 2}, + {"x": 0, "y": 21, "flags": 2}, + {"x": 0, "y": 28, "flags": 2}, + {"x": 0, "y": 35, "flags": 2}, + {"x": 0, "y": 42, "flags": 2}, + {"x": 0, "y": 49, "flags": 2}, + {"x": 0, "y": 56, "flags": 2}, + {"x": 0, "y": 64, "flags": 2} + ] + }, "community_layouts": ["65_iso_blocker"], "layouts": { "LAYOUT_65_iso_blocker": { diff --git a/keyboards/gmmk/gmmk2/p96/ansi/ansi.c b/keyboards/gmmk/gmmk2/p96/ansi/ansi.c index 5b2b5893f7..dc61fd813f 100644 --- a/keyboards/gmmk/gmmk2/p96/ansi/ansi.c +++ b/keyboards/gmmk/gmmk2/p96/ansi/ansi.c @@ -151,160 +151,6 @@ const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {1, SW9_CS16, SW9_CS17, SW9_CS18}, // 119, LED 19 {1, SW10_CS16, SW10_CS17, SW10_CS18} // 120, LED 20 }; - -#define __ NO_LED - -led_config_t g_led_config = {{ - { 0, 18, 36, 54, 70, 87, 14, 94}, - { 1, 19, 37, 55, __, 88, 15, 82}, - { 2, 20, 38, 56, 71, 89, 16, 95}, - { 3, 21, 39, 57, 72, __, 17, 96}, - { 4, 22, 40, 58, 73, __, 32, 97}, - { 5, 23, 41, 59, 74, __, 33, 98}, - { 6, 24, 42, 60, 75, 90, 34, 83}, - { 7, 25, 43, 61, 76, __, 35, 84}, - { 8, 26, 44, 62, 77, __, 50, 85}, - { 9, 27, 45, 63, 78, 91, 51, 86}, - {10, 28, 46, 64, 79, 92, 52, 67}, - {11, 29, 47, 65, 80, __, 53, 68}, - {12, 30, 48, __, __, 93, __, 69}, - {13, 31, 49, 66, 81, __, __, __} -}, { - { 11, 0}, // 0, k00, Esc - { 22, 0}, // 1, k10, F1 - { 33, 0}, // 2, k20, F2 - { 44, 0}, // 3, k30, F3 - { 55, 0}, // 4, k40, F4 - { 66, 0}, // 5, k50, F5 - { 77, 0}, // 6, k60, F6 - { 88, 0}, // 7, k70, F7 - { 99, 0}, // 8, k80, F8 - { 110, 0}, // 9, k90, F9 - { 121, 0}, // 10, ka0, F10 - { 132, 0}, // 11, kb0, F11 - { 143, 0}, // 12, kc0, F12 - { 154, 0}, // 13, kd0, Printscreen - { 165, 0}, // 14, k06, Delete - { 176, 0}, // 15, k16, Insert - { 187, 0}, // 16, k26, Page Up - { 198, 0}, // 17, k36, Page Down - - { 11, 11}, // 18, k01, ` - { 22, 11}, // 19, k11, 1 - { 33, 11}, // 20, k21, 2 - { 44, 11}, // 21, k31, 3 - { 55, 11}, // 22, k41, 4 - { 66, 11}, // 23, k51, 5 - { 77, 11}, // 24, k61, 6 - { 88, 11}, // 25, k71, 7 - { 99, 11}, // 26, k81, 8 - { 110, 11}, // 27, k91, 9 - { 121, 11}, // 28, ka1, 0 - { 132, 11}, // 29, kb1, - - { 143, 11}, // 30, kc1, = - { 154, 11}, // 31, kd1, Backspace - { 165, 11}, // 32, k46, Num Lock - { 176, 11}, // 33, k56, Num / - { 187, 11}, // 34, k66, Num * - { 198, 11}, // 35, k76, Num - - - { 11, 22}, // 36, k02, Tab - { 22, 22}, // 37, k12, Q - { 33, 22}, // 38, k22, W - { 44, 22}, // 39, k32, E - { 55, 22}, // 40, k42, R - { 66, 22}, // 41, k52, T - { 77, 22}, // 42, k62, Y - { 88, 22}, // 43, k72, U - { 99, 22}, // 44, k82, I - { 110, 22}, // 45, k92, O - { 121, 22}, // 46, ka2, P - { 132, 22}, // 47, kb2, [ - { 143, 22}, // 48, kc2, ] - { 154, 22}, // 49, kd3, "\\" - { 165, 22}, // 50, k86, Num 7 - { 176, 22}, // 51, k96, Num 8 - { 187, 22}, // 52, ka6, Num 9 - { 198, 22}, // 53, kb6, Num + - - { 11, 33}, // 54, k03, Caps Lock - { 22, 33}, // 55, k13, A - { 33, 33}, // 56, k23, S - { 44, 33}, // 57, k33, D - { 55, 33}, // 58, k43, F - { 66, 33}, // 59, k53, G - { 77, 33}, // 60, k63, H - { 88, 33}, // 61, k73, J - { 99, 33}, // 62, k83, K - { 110, 33}, // 63, k93, L - { 121, 33}, // 64, ka3, ; - { 132, 33}, // 65, kb3, ' - { 154, 33}, // 66, kc3, Enter - { 165, 33}, // 67, ka7, Num 4 - { 176, 33}, // 68, kb7, Num 5 - { 187, 33}, // 69, kc7, Num 6 - - { 11, 44}, // 70, k04, Shift_L - { 33, 44}, // 71, k24, Z - { 44, 44}, // 72, k34, X - { 55, 44}, // 73, k44, C - { 66, 44}, // 74, k54, V - { 77, 44}, // 75, k64, B - { 88, 44}, // 76, k74, N - { 99, 44}, // 77, k84, M - { 110, 44}, // 78, k94, , - { 121, 44}, // 79, ka4, . - { 132, 44}, // 80, kb4, / - { 143, 44}, // 81, kd4, Shift_R - { 154, 44}, // 82, k17, Up - { 165, 44}, // 83, k67, Num 1 - { 176, 44}, // 84, k77, Num 2 - { 187, 44}, // 85, k87, Num 3 - { 198, 44}, // 86, k97, Enter_R - - { 11, 55}, // 87, k05, Ctrl_L - { 22, 55}, // 88, k15, Win_L - { 33, 55}, // 89, k25, Alt_L - { 77, 55}, // 90, k65, Space - { 110, 55}, // 91, k95, Alt_R - { 121, 55}, // 92, ka5, FN - { 132, 55}, // 93, kc5, Ctrl_R - { 143, 55}, // 94, k07, Left - { 154, 55}, // 95, k27, Down - { 165, 55}, // 96, k37, Right - { 176, 55}, // 97, k47, Num 0 - { 187, 55}, // 98, k57, Num . - - { 0, 0}, // 101, LED 1 - { 0, 6}, // 102, LED 2 - { 0, 12}, // 103, LED 3 - { 0, 18}, // 104, LED 4 - { 0, 24}, // 105, LED 5 - { 0, 30}, // 106, LED 6 - { 0, 36}, // 107, LED 7 - { 0, 42}, // 108, LED 8 - { 0, 48}, // 109, LED 9 - { 0, 54}, // 110, LED 10 - { 209, 0}, // 111, LED 11 - { 209, 6}, // 112, LED 12 - { 209, 12}, // 113, LED 13 - { 209, 18}, // 114, LED 14 - { 209, 24}, // 115, LED 15 - { 209, 30}, // 116, LED 16 - { 209, 36}, // 117, LED 17 - { 209, 42}, // 118, LED 18 - { 209, 48}, // 119, LED 19 - { 209, 54} // 120, LED 20 -}, { - 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, 1, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 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, 4, 4, 4, 4, 4, 4, 4, 4, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -} }; #endif #ifdef EEPROM_ENABLE diff --git a/keyboards/gmmk/gmmk2/p96/ansi/keyboard.json b/keyboards/gmmk/gmmk2/p96/ansi/keyboard.json index 0646be8c88..74332b1f84 100644 --- a/keyboards/gmmk/gmmk2/p96/ansi/keyboard.json +++ b/keyboards/gmmk/gmmk2/p96/ansi/keyboard.json @@ -32,6 +32,129 @@ }, "processor": "WB32F3G71", "bootloader": "wb32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 11, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 22, "y": 0, "flags": 4}, + {"matrix": [2, 0], "x": 33, "y": 0, "flags": 4}, + {"matrix": [3, 0], "x": 44, "y": 0, "flags": 4}, + {"matrix": [4, 0], "x": 55, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 66, "y": 0, "flags": 4}, + {"matrix": [6, 0], "x": 77, "y": 0, "flags": 4}, + {"matrix": [7, 0], "x": 88, "y": 0, "flags": 4}, + {"matrix": [8, 0], "x": 99, "y": 0, "flags": 4}, + {"matrix": [9, 0], "x": 110, "y": 0, "flags": 4}, + {"matrix": [10, 0], "x": 121, "y": 0, "flags": 4}, + {"matrix": [11, 0], "x": 132, "y": 0, "flags": 4}, + {"matrix": [12, 0], "x": 143, "y": 0, "flags": 4}, + {"matrix": [13, 0], "x": 154, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 165, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 176, "y": 0, "flags": 4}, + {"matrix": [2, 6], "x": 187, "y": 0, "flags": 4}, + {"matrix": [3, 6], "x": 198, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 11, "y": 11, "flags": 4}, + {"matrix": [1, 1], "x": 22, "y": 11, "flags": 4}, + {"matrix": [2, 1], "x": 33, "y": 11, "flags": 4}, + {"matrix": [3, 1], "x": 44, "y": 11, "flags": 4}, + {"matrix": [4, 1], "x": 55, "y": 11, "flags": 4}, + {"matrix": [5, 1], "x": 66, "y": 11, "flags": 4}, + {"matrix": [6, 1], "x": 77, "y": 11, "flags": 4}, + {"matrix": [7, 1], "x": 88, "y": 11, "flags": 4}, + {"matrix": [8, 1], "x": 99, "y": 11, "flags": 4}, + {"matrix": [9, 1], "x": 110, "y": 11, "flags": 4}, + {"matrix": [10, 1], "x": 121, "y": 11, "flags": 4}, + {"matrix": [11, 1], "x": 132, "y": 11, "flags": 4}, + {"matrix": [12, 1], "x": 143, "y": 11, "flags": 4}, + {"matrix": [13, 1], "x": 154, "y": 11, "flags": 4}, + {"matrix": [4, 6], "x": 165, "y": 11, "flags": 1}, + {"matrix": [5, 6], "x": 176, "y": 11, "flags": 4}, + {"matrix": [6, 6], "x": 187, "y": 11, "flags": 4}, + {"matrix": [7, 6], "x": 198, "y": 11, "flags": 4}, + {"matrix": [0, 2], "x": 11, "y": 22, "flags": 4}, + {"matrix": [1, 2], "x": 22, "y": 22, "flags": 4}, + {"matrix": [2, 2], "x": 33, "y": 22, "flags": 4}, + {"matrix": [3, 2], "x": 44, "y": 22, "flags": 4}, + {"matrix": [4, 2], "x": 55, "y": 22, "flags": 4}, + {"matrix": [5, 2], "x": 66, "y": 22, "flags": 4}, + {"matrix": [6, 2], "x": 77, "y": 22, "flags": 4}, + {"matrix": [7, 2], "x": 88, "y": 22, "flags": 4}, + {"matrix": [8, 2], "x": 99, "y": 22, "flags": 4}, + {"matrix": [9, 2], "x": 110, "y": 22, "flags": 4}, + {"matrix": [10, 2], "x": 121, "y": 22, "flags": 4}, + {"matrix": [11, 2], "x": 132, "y": 22, "flags": 4}, + {"matrix": [12, 2], "x": 143, "y": 22, "flags": 4}, + {"matrix": [13, 2], "x": 154, "y": 22, "flags": 4}, + {"matrix": [8, 6], "x": 165, "y": 22, "flags": 4}, + {"matrix": [9, 6], "x": 176, "y": 22, "flags": 4}, + {"matrix": [10, 6], "x": 187, "y": 22, "flags": 4}, + {"matrix": [11, 6], "x": 198, "y": 22, "flags": 4}, + {"matrix": [0, 3], "x": 11, "y": 33, "flags": 1}, + {"matrix": [1, 3], "x": 22, "y": 33, "flags": 4}, + {"matrix": [2, 3], "x": 33, "y": 33, "flags": 4}, + {"matrix": [3, 3], "x": 44, "y": 33, "flags": 4}, + {"matrix": [4, 3], "x": 55, "y": 33, "flags": 4}, + {"matrix": [5, 3], "x": 66, "y": 33, "flags": 4}, + {"matrix": [6, 3], "x": 77, "y": 33, "flags": 4}, + {"matrix": [7, 3], "x": 88, "y": 33, "flags": 4}, + {"matrix": [8, 3], "x": 99, "y": 33, "flags": 4}, + {"matrix": [9, 3], "x": 110, "y": 33, "flags": 4}, + {"matrix": [10, 3], "x": 121, "y": 33, "flags": 4}, + {"matrix": [11, 3], "x": 132, "y": 33, "flags": 4}, + {"matrix": [13, 3], "x": 154, "y": 33, "flags": 4}, + {"matrix": [10, 7], "x": 165, "y": 33, "flags": 4}, + {"matrix": [11, 7], "x": 176, "y": 33, "flags": 4}, + {"matrix": [12, 7], "x": 187, "y": 33, "flags": 4}, + {"matrix": [0, 4], "x": 11, "y": 44, "flags": 4}, + {"matrix": [2, 4], "x": 33, "y": 44, "flags": 4}, + {"matrix": [3, 4], "x": 44, "y": 44, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 44, "flags": 4}, + {"matrix": [5, 4], "x": 66, "y": 44, "flags": 4}, + {"matrix": [6, 4], "x": 77, "y": 44, "flags": 4}, + {"matrix": [7, 4], "x": 88, "y": 44, "flags": 4}, + {"matrix": [8, 4], "x": 99, "y": 44, "flags": 4}, + {"matrix": [9, 4], "x": 110, "y": 44, "flags": 4}, + {"matrix": [10, 4], "x": 121, "y": 44, "flags": 4}, + {"matrix": [11, 4], "x": 132, "y": 44, "flags": 4}, + {"matrix": [13, 4], "x": 143, "y": 44, "flags": 4}, + {"matrix": [1, 7], "x": 154, "y": 44, "flags": 4}, + {"matrix": [6, 7], "x": 165, "y": 44, "flags": 4}, + {"matrix": [7, 7], "x": 176, "y": 44, "flags": 4}, + {"matrix": [8, 7], "x": 187, "y": 44, "flags": 4}, + {"matrix": [9, 7], "x": 198, "y": 44, "flags": 4}, + {"matrix": [0, 5], "x": 11, "y": 55, "flags": 4}, + {"matrix": [1, 5], "x": 22, "y": 55, "flags": 4}, + {"matrix": [2, 5], "x": 33, "y": 55, "flags": 4}, + {"matrix": [6, 5], "x": 77, "y": 55, "flags": 4}, + {"matrix": [9, 5], "x": 110, "y": 55, "flags": 4}, + {"matrix": [10, 5], "x": 121, "y": 55, "flags": 4}, + {"matrix": [12, 5], "x": 132, "y": 55, "flags": 4}, + {"matrix": [0, 7], "x": 143, "y": 55, "flags": 4}, + {"matrix": [2, 7], "x": 154, "y": 55, "flags": 4}, + {"matrix": [3, 7], "x": 165, "y": 55, "flags": 4}, + {"matrix": [4, 7], "x": 176, "y": 55, "flags": 4}, + {"matrix": [5, 7], "x": 187, "y": 55, "flags": 4}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 0, "y": 6, "flags": 2}, + {"x": 0, "y": 12, "flags": 2}, + {"x": 0, "y": 18, "flags": 2}, + {"x": 0, "y": 24, "flags": 2}, + {"x": 0, "y": 30, "flags": 2}, + {"x": 0, "y": 36, "flags": 2}, + {"x": 0, "y": 42, "flags": 2}, + {"x": 0, "y": 48, "flags": 2}, + {"x": 0, "y": 54, "flags": 2}, + {"x": 209, "y": 0, "flags": 2}, + {"x": 209, "y": 6, "flags": 2}, + {"x": 209, "y": 12, "flags": 2}, + {"x": 209, "y": 18, "flags": 2}, + {"x": 209, "y": 24, "flags": 2}, + {"x": 209, "y": 30, "flags": 2}, + {"x": 209, "y": 36, "flags": 2}, + {"x": 209, "y": 42, "flags": 2}, + {"x": 209, "y": 48, "flags": 2}, + {"x": 209, "y": 54, "flags": 2} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/gmmk/gmmk2/p96/iso/iso.c b/keyboards/gmmk/gmmk2/p96/iso/iso.c index 9a5c357307..7da63dfae6 100644 --- a/keyboards/gmmk/gmmk2/p96/iso/iso.c +++ b/keyboards/gmmk/gmmk2/p96/iso/iso.c @@ -152,155 +152,6 @@ const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {1, SW9_CS16, SW9_CS17, SW9_CS18}, // 119, LED 19 {1, SW10_CS16, SW10_CS17, SW10_CS18} // 120, LED 20 }; - -#define __ NO_LED - -led_config_t g_led_config = {{ - { 0, 18, 36, 54, 70, 88, 14, 95}, - { 1, 19, 37, 55, 71, 89, 15, 83}, - { 2, 20, 38, 56, 72, 90, 16, 96}, - { 3, 21, 39, 57, 73, __, 17, 97}, - { 4, 22, 40, 58, 74, __, 32, 98}, - { 5, 23, 41, 59, 75, __, 33, 99}, - { 6, 24, 42, 60, 76, 91, 34, 84}, - { 7, 25, 43, 61, 77, __, 35, 85}, - { 8, 26, 44, 62, 78, __, 50, 86}, - { 9, 27, 45, 63, 79, 92, 51, 87}, - {10, 28, 46, 64, 80, 93, 52, 67}, - {11, 29, 47, 65, 81, __, 53, 68}, - {12, 30, 48, 66, __, 94, __, 69}, - {13, 31, __, 49, 82, __, __, __} -}, { - { 11, 0}, // 0, k00, Esc - { 22, 0}, // 1, k10, F1 - { 33, 0}, // 2, k20, F2 - { 44, 0}, // 3, k30, F3 - { 55, 0}, // 4, k40, F4 - { 66, 0}, // 5, k50, F5 - { 77, 0}, // 6, k60, F6 - { 88, 0}, // 7, k70, F7 - { 99, 0}, // 8, k80, F8 - { 110, 0}, // 9, k90, F9 - { 121, 0}, // 10, ka0, F10 - { 132, 0}, // 11, kb0, F11 - { 143, 0}, // 12, kc0, F12 - { 154, 0}, // 13, kd0, Printscreen - { 165, 0}, // 14, k06, Delete - { 176, 0}, // 15, k16, Insert - { 187, 0}, // 16, k26, Page Up - { 198, 0}, // 17, k36, Page Down - { 11, 11}, // 18, k01, ` - { 22, 11}, // 19, k11, 1 - { 33, 11}, // 20, k21, 2 - { 44, 11}, // 21, k31, 3 - { 55, 11}, // 22, k41, 4 - { 66, 11}, // 23, k51, 5 - { 77, 11}, // 24, k61, 6 - { 88, 11}, // 25, k71, 7 - { 99, 11}, // 26, k81, 8 - { 110, 11}, // 27, k91, 9 - { 121, 11}, // 28, ka1, 0 - { 132, 11}, // 29, kb1, - - { 143, 11}, // 30, kc1, = - { 154, 11}, // 31, kd1, Backspace - { 165, 11}, // 32, k46, Num Lock - { 176, 11}, // 33, k56, Num / - { 187, 11}, // 34, k66, Num * - { 198, 11}, // 35, k76, Num - - { 11, 22}, // 36, k02, Tab - { 22, 22}, // 37, k12, Q - { 33, 22}, // 38, k22, W - { 44, 22}, // 39, k32, E - { 55, 22}, // 40, k42, R - { 66, 22}, // 41, k52, T - { 77, 22}, // 42, k62, Y - { 88, 22}, // 43, k72, U - { 99, 22}, // 44, k82, I - { 110, 22}, // 45, k92, O - { 121, 22}, // 46, ka2, P - { 132, 22}, // 47, kb2, [ - { 143, 22}, // 48, kc2, ] - { 154, 22}, // 49, kd3, Enter - { 165, 22}, // 50, k86, Num 7 - { 176, 22}, // 51, k96, Num 8 - { 187, 22}, // 52, ka6, Num 9 - { 198, 22}, // 53, kb6, Num + - { 11, 33}, // 54, k03, Caps Lock - { 22, 33}, // 55, k13, A - { 33, 33}, // 56, k23, S - { 44, 33}, // 57, k33, D - { 55, 33}, // 58, k43, F - { 66, 33}, // 59, k53, G - { 77, 33}, // 60, k63, H - { 88, 33}, // 61, k73, J - { 99, 33}, // 62, k83, K - { 110, 33}, // 63, k93, L - { 121, 33}, // 64, ka3, ; - { 132, 33}, // 65, kb3, ' - { 143, 33}, // 66, kc3, # - { 165, 33}, // 67, ka7, Num 4 - { 176, 33}, // 68, kb7, Num 5 - { 187, 33}, // 69, kc7, Num 6 - { 11, 44}, // 70, k04, Shift_L - { 22, 44}, // 71, k14, "\\" - { 33, 44}, // 72, k24, Z - { 44, 44}, // 73, k34, X - { 55, 44}, // 74, k44, C - { 66, 44}, // 75, k54, V - { 77, 44}, // 76, k64, B - { 88, 44}, // 77, k74, N - { 99, 44}, // 78, k84, M - { 110, 44}, // 79, k94, , - { 121, 44}, // 80, ka4, . - { 132, 44}, // 81, kb4, / - { 143, 44}, // 82, kd4, Shift_R - { 154, 44}, // 83, k17, Up - { 165, 44}, // 84, k67, Num 1 - { 176, 44}, // 85, k77, Num 2 - { 187, 44}, // 86, k87, Num 3 - { 198, 44}, // 87, k97, Enter_R - { 11, 55}, // 88, k05, Ctrl_L - { 22, 55}, // 89, k15, Win_L - { 33, 55}, // 90, k25, Alt_L - { 77, 55}, // 91, k65, Space - { 110, 55}, // 92, k95, Alt_R - { 121, 55}, // 93, ka5, FN - { 132, 55}, // 94, kc5, Ctrl_R - { 143, 55}, // 95, k07, Left - { 154, 55}, // 96, k27, Down - { 165, 55}, // 97, k37, Right - { 176, 55}, // 98, k47, Num 0 - { 187, 55}, // 99, k57, Num . - { 0, 0}, // 101, LED 1 - { 0, 6}, // 102, LED 2 - { 0, 12}, // 103, LED 3 - { 0, 18}, // 104, LED 4 - { 0, 24}, // 105, LED 5 - { 0, 30}, // 106, LED 6 - { 0, 36}, // 107, LED 7 - { 0, 42}, // 108, LED 8 - { 0, 48}, // 109, LED 9 - { 0, 54}, // 110, LED 10 - { 209, 0}, // 111, LED 11 - { 209, 6}, // 112, LED 12 - { 209, 12}, // 113, LED 13 - { 209, 18}, // 114, LED 14 - { 209, 24}, // 115, LED 15 - { 209, 30}, // 116, LED 16 - { 209, 36}, // 117, LED 17 - { 209, 42}, // 118, LED 18 - { 209, 48}, // 119, LED 19 - { 209, 54} // 120, LED 20 -}, { - 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, 1, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -} }; #endif #ifdef EEPROM_ENABLE diff --git a/keyboards/gmmk/gmmk2/p96/iso/keyboard.json b/keyboards/gmmk/gmmk2/p96/iso/keyboard.json index 679881a94b..3463293a70 100644 --- a/keyboards/gmmk/gmmk2/p96/iso/keyboard.json +++ b/keyboards/gmmk/gmmk2/p96/iso/keyboard.json @@ -32,6 +32,130 @@ }, "processor": "WB32F3G71", "bootloader": "wb32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 11, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 22, "y": 0, "flags": 4}, + {"matrix": [2, 0], "x": 33, "y": 0, "flags": 4}, + {"matrix": [3, 0], "x": 44, "y": 0, "flags": 4}, + {"matrix": [4, 0], "x": 55, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 66, "y": 0, "flags": 4}, + {"matrix": [6, 0], "x": 77, "y": 0, "flags": 4}, + {"matrix": [7, 0], "x": 88, "y": 0, "flags": 4}, + {"matrix": [8, 0], "x": 99, "y": 0, "flags": 4}, + {"matrix": [9, 0], "x": 110, "y": 0, "flags": 4}, + {"matrix": [10, 0], "x": 121, "y": 0, "flags": 4}, + {"matrix": [11, 0], "x": 132, "y": 0, "flags": 4}, + {"matrix": [12, 0], "x": 143, "y": 0, "flags": 4}, + {"matrix": [13, 0], "x": 154, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 165, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 176, "y": 0, "flags": 4}, + {"matrix": [2, 6], "x": 187, "y": 0, "flags": 4}, + {"matrix": [3, 6], "x": 198, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 11, "y": 11, "flags": 4}, + {"matrix": [1, 1], "x": 22, "y": 11, "flags": 4}, + {"matrix": [2, 1], "x": 33, "y": 11, "flags": 4}, + {"matrix": [3, 1], "x": 44, "y": 11, "flags": 4}, + {"matrix": [4, 1], "x": 55, "y": 11, "flags": 4}, + {"matrix": [5, 1], "x": 66, "y": 11, "flags": 4}, + {"matrix": [6, 1], "x": 77, "y": 11, "flags": 4}, + {"matrix": [7, 1], "x": 88, "y": 11, "flags": 4}, + {"matrix": [8, 1], "x": 99, "y": 11, "flags": 4}, + {"matrix": [9, 1], "x": 110, "y": 11, "flags": 4}, + {"matrix": [10, 1], "x": 121, "y": 11, "flags": 4}, + {"matrix": [11, 1], "x": 132, "y": 11, "flags": 4}, + {"matrix": [12, 1], "x": 143, "y": 11, "flags": 4}, + {"matrix": [13, 1], "x": 154, "y": 11, "flags": 4}, + {"matrix": [4, 6], "x": 165, "y": 11, "flags": 1}, + {"matrix": [5, 6], "x": 176, "y": 11, "flags": 4}, + {"matrix": [6, 6], "x": 187, "y": 11, "flags": 4}, + {"matrix": [7, 6], "x": 198, "y": 11, "flags": 4}, + {"matrix": [0, 2], "x": 11, "y": 22, "flags": 4}, + {"matrix": [1, 2], "x": 22, "y": 22, "flags": 4}, + {"matrix": [2, 2], "x": 33, "y": 22, "flags": 4}, + {"matrix": [3, 2], "x": 44, "y": 22, "flags": 4}, + {"matrix": [4, 2], "x": 55, "y": 22, "flags": 4}, + {"matrix": [5, 2], "x": 66, "y": 22, "flags": 4}, + {"matrix": [6, 2], "x": 77, "y": 22, "flags": 4}, + {"matrix": [7, 2], "x": 88, "y": 22, "flags": 4}, + {"matrix": [8, 2], "x": 99, "y": 22, "flags": 4}, + {"matrix": [9, 2], "x": 110, "y": 22, "flags": 4}, + {"matrix": [10, 2], "x": 121, "y": 22, "flags": 4}, + {"matrix": [11, 2], "x": 132, "y": 22, "flags": 4}, + {"matrix": [12, 2], "x": 143, "y": 22, "flags": 4}, + {"matrix": [13, 3], "x": 154, "y": 22, "flags": 4}, + {"matrix": [8, 6], "x": 165, "y": 22, "flags": 4}, + {"matrix": [9, 6], "x": 176, "y": 22, "flags": 4}, + {"matrix": [10, 6], "x": 187, "y": 22, "flags": 4}, + {"matrix": [11, 6], "x": 198, "y": 22, "flags": 4}, + {"matrix": [0, 3], "x": 11, "y": 33, "flags": 1}, + {"matrix": [1, 3], "x": 22, "y": 33, "flags": 4}, + {"matrix": [2, 3], "x": 33, "y": 33, "flags": 4}, + {"matrix": [3, 3], "x": 44, "y": 33, "flags": 4}, + {"matrix": [4, 3], "x": 55, "y": 33, "flags": 4}, + {"matrix": [5, 3], "x": 66, "y": 33, "flags": 4}, + {"matrix": [6, 3], "x": 77, "y": 33, "flags": 4}, + {"matrix": [7, 3], "x": 88, "y": 33, "flags": 4}, + {"matrix": [8, 3], "x": 99, "y": 33, "flags": 4}, + {"matrix": [9, 3], "x": 110, "y": 33, "flags": 4}, + {"matrix": [10, 3], "x": 121, "y": 33, "flags": 4}, + {"matrix": [11, 3], "x": 132, "y": 33, "flags": 4}, + {"matrix": [12, 3], "x": 143, "y": 33, "flags": 4}, + {"matrix": [10, 7], "x": 165, "y": 33, "flags": 4}, + {"matrix": [11, 7], "x": 176, "y": 33, "flags": 4}, + {"matrix": [12, 7], "x": 187, "y": 33, "flags": 4}, + {"matrix": [0, 4], "x": 11, "y": 44, "flags": 4}, + {"matrix": [1, 4], "x": 22, "y": 44, "flags": 4}, + {"matrix": [2, 4], "x": 33, "y": 44, "flags": 4}, + {"matrix": [3, 4], "x": 44, "y": 44, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 44, "flags": 4}, + {"matrix": [5, 4], "x": 66, "y": 44, "flags": 4}, + {"matrix": [6, 4], "x": 77, "y": 44, "flags": 4}, + {"matrix": [7, 4], "x": 88, "y": 44, "flags": 4}, + {"matrix": [8, 4], "x": 99, "y": 44, "flags": 4}, + {"matrix": [9, 4], "x": 110, "y": 44, "flags": 4}, + {"matrix": [10, 4], "x": 121, "y": 44, "flags": 4}, + {"matrix": [11, 4], "x": 132, "y": 44, "flags": 4}, + {"matrix": [13, 4], "x": 143, "y": 44, "flags": 4}, + {"matrix": [1, 7], "x": 154, "y": 44, "flags": 4}, + {"matrix": [6, 7], "x": 165, "y": 44, "flags": 4}, + {"matrix": [7, 7], "x": 176, "y": 44, "flags": 4}, + {"matrix": [8, 7], "x": 187, "y": 44, "flags": 4}, + {"matrix": [9, 7], "x": 198, "y": 44, "flags": 4}, + {"matrix": [0, 5], "x": 11, "y": 55, "flags": 4}, + {"matrix": [1, 5], "x": 22, "y": 55, "flags": 4}, + {"matrix": [2, 5], "x": 33, "y": 55, "flags": 4}, + {"matrix": [6, 5], "x": 77, "y": 55, "flags": 4}, + {"matrix": [9, 5], "x": 110, "y": 55, "flags": 4}, + {"matrix": [10, 5], "x": 121, "y": 55, "flags": 4}, + {"matrix": [12, 5], "x": 132, "y": 55, "flags": 4}, + {"matrix": [0, 7], "x": 143, "y": 55, "flags": 4}, + {"matrix": [2, 7], "x": 154, "y": 55, "flags": 4}, + {"matrix": [3, 7], "x": 165, "y": 55, "flags": 4}, + {"matrix": [4, 7], "x": 176, "y": 55, "flags": 4}, + {"matrix": [5, 7], "x": 187, "y": 55, "flags": 4}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 0, "y": 6, "flags": 2}, + {"x": 0, "y": 12, "flags": 2}, + {"x": 0, "y": 18, "flags": 2}, + {"x": 0, "y": 24, "flags": 2}, + {"x": 0, "y": 30, "flags": 2}, + {"x": 0, "y": 36, "flags": 2}, + {"x": 0, "y": 42, "flags": 2}, + {"x": 0, "y": 48, "flags": 2}, + {"x": 0, "y": 54, "flags": 2}, + {"x": 209, "y": 0, "flags": 2}, + {"x": 209, "y": 6, "flags": 2}, + {"x": 209, "y": 12, "flags": 2}, + {"x": 209, "y": 18, "flags": 2}, + {"x": 209, "y": 24, "flags": 2}, + {"x": 209, "y": 30, "flags": 2}, + {"x": 209, "y": 36, "flags": 2}, + {"x": 209, "y": 42, "flags": 2}, + {"x": 209, "y": 48, "flags": 2}, + {"x": 209, "y": 54, "flags": 2} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/gmmk/numpad/keyboard.json b/keyboards/gmmk/numpad/keyboard.json index f5d64bf6cb..23dd46ca1a 100644 --- a/keyboards/gmmk/numpad/keyboard.json +++ b/keyboards/gmmk/numpad/keyboard.json @@ -69,7 +69,40 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "aw20216s" + "driver": "aw20216s", + "layout": [ + {"matrix": [0, 0], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 134, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 179, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 45, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 90, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 134, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 179, "y": 24, "flags": 4}, + {"matrix": [2, 0], "x": 45, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 90, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 134, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 134, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 179, "y": 56, "flags": 4}, + {"matrix": [4, 0], "x": 67, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 134, "y": 64, "flags": 4}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 0, "y": 11, "flags": 2}, + {"x": 0, "y": 21, "flags": 2}, + {"x": 0, "y": 32, "flags": 2}, + {"x": 0, "y": 43, "flags": 2}, + {"x": 0, "y": 53, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 11, "flags": 2}, + {"x": 224, "y": 21, "flags": 2}, + {"x": 224, "y": 32, "flags": 2}, + {"x": 224, "y": 43, "flags": 2}, + {"x": 224, "y": 53, "flags": 2}, + {"x": 224, "y": 64, "flags": 2} + ] }, "processor": "WB32F3G71", "bootloader": "wb32-dfu", diff --git a/keyboards/gmmk/numpad/numpad.c b/keyboards/gmmk/numpad/numpad.c index 87446d8f49..fa8a28bf8b 100644 --- a/keyboards/gmmk/numpad/numpad.c +++ b/keyboards/gmmk/numpad/numpad.c @@ -59,54 +59,6 @@ const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {0, SW7_CS10, SW7_CS11, SW7_CS12 }, // 30 LED33 }; -led_config_t g_led_config = {{ - { 0, 1, 2, 3 }, - { 4, 5, 6, 7 }, - { 8, 9, 10, NO_LED}, - { 11, 12, 13, 14 }, - { 15, NO_LED, NO_LED, 16 } -}, { - {45, 0 }, // 0 NUM - {90, 0 }, // 1 / - {134, 0 }, // 2 * - {179, 0 }, // 3 - - {45, 16 }, // 4 7 - {90, 16 }, // 5 8 - {134, 16 }, // 6 9 - {179, 24 }, // 7 + - {45, 32 }, // 8 4 - {90, 32 }, // 9 5 - {134, 32 }, // 10 6 - {45, 48 }, // 11 1 - {90, 48 }, // 12 2 - {134, 48 }, // 13 3 - {179, 56 }, // 14 ENTER - {67, 64 }, // 15 0 - {134, 64 }, // 16 . - {0, 0 }, // 17 LED18 - {0, 11 }, // 18 LED19 - {0, 21 }, // 19 LED20 - {0, 32 }, // 20 LED21 - {0, 43 }, // 21 LED22 - {0, 53 }, // 22 LED23 - {0, 64 }, // 23 LED24 - {224, 0 }, // 24 LED27 - {224, 11 }, // 25 LED28 - {224, 21 }, // 26 LED29 - {224, 32 }, // 27 LED30 - {224, 43 }, // 28 LED31 - {224, 53 }, // 29 LED32 - {224, 64 } // 30 LED33 -}, { - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, - 4, 4, 4, 4, - 4, 4, - 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2 -} }; - # ifdef AW20216S_PW_EN_PIN void keyboard_pre_init_kb(void) { diff --git a/keyboards/gmmk/pro/rev1/ansi/ansi.c b/keyboards/gmmk/pro/rev1/ansi/ansi.c index 77e0a8c1a1..05365ee9f9 100644 --- a/keyboards/gmmk/pro/rev1/ansi/ansi.c +++ b/keyboards/gmmk/pro/rev1/ansi/ansi.c @@ -18,124 +18,6 @@ #ifdef RGB_MATRIX_ENABLE // clang-format off -led_config_t g_led_config = {{ - { 4, NO_LED, NO_LED, 95, 65, 79, 5, 28 }, - { 8, 2, 9, 0, 10, 75, 1, 7 }, - { 14, 3, 15, NO_LED, 16, 86, 6, 13 }, - { 20, 18, 21, 23, 22, 94, 12, 19 }, - { 25, 30, 26, 31, 27, 32, 29, 24 }, - { 41, 36, 42, 37, 43, 38, 35, 40 }, - { 46, 89, 47, 34, 48, 72, 78, 45 }, - { 52, 39, 53, 97, 54, 82, 44, 51 }, - { 58, 63, 59, 64, NO_LED, 60, 62, 57 }, - { 11, 90, 55, 17, 33, 49, NO_LED, 69 }, - { NO_LED, 85, 93, 61, 96, 66, 50, 56 } -}, { - {0, 0}, // 0, ESC, k13 - {0, 15}, // 1, ~, k16 - {4, 26}, // 2, Tab, k11 - {5, 38}, // 3, Caps, k21 - {9, 49}, // 4, Sh_L, k00 - {2, 61}, // 5, Ct_L, k06 - {18, 0}, // 6, F1, k26 - {14, 15}, // 7, 1, k17 - {22, 26}, // 8, Q, k10 - {25, 38}, // 9, A, k12 - {33, 49}, // 10, Z, k14 - {20, 61}, // 11, Win_L, k90 - {33, 0}, // 12, F2, k36 - {29, 15}, // 13, 2, k27 - {36, 26}, // 14, W, k20 - {40, 38}, // 15, S, k22 - {47, 49}, // 16, X, k24 - {38, 61}, // 17, Alt_L, k93 - {47, 0}, // 18, F3, k31 - {43, 15}, // 19, 3, k37 - {51, 26}, // 20, E, k30 - {54, 38}, // 21, D, k32 - {61, 49}, // 22, C, k34 - {61, 0}, // 23, F4, k33 - {58, 15}, // 24, 4, k47 - {65, 26}, // 25, R, k40 - {69, 38}, // 26, F, k42 - {76, 49}, // 27, V, k44 - {79, 0}, // 28, F5, k07 - {72, 15}, // 29, 5, k46 - {79, 26}, // 30, T, k41 - {83, 38}, // 31, G, k43 - {90, 49}, // 32, B, k45 - {92, 61}, // 33, SPACE, k94 - {94, 0}, // 34, F6, k63 - {87, 15}, // 35, 6, k56 - {94, 26}, // 36, Y, k51 - {98, 38}, // 37, H, k53 - {105, 49}, // 38, N, k55 - {108, 0}, // 39, F7, k71 - {101, 15}, // 40, 7, k57 - {108, 26}, // 41, U, k50 - {112, 38}, // 42, J, k52 - {119, 49}, // 43, M, k54 - {123, 0}, // 44, F8, k76 - {116, 15}, // 45, 8, k67 - {123, 26}, // 46, I, k60 - {126, 38}, // 47, K, k62 - {134, 49}, // 48, ,, k64 - {145, 61}, // 49, Alt_R, k95 - {141, 0}, // 50, F9, ka6 - {130, 15}, // 51, 9, k77 - {137, 26}, // 52, O, k70 - {141, 38}, // 53, L, k72 - {148, 49}, // 54, ., k74 - {159, 61}, // 55, FN, k92 - {155, 0}, // 56, F10, ka7 - {145, 15}, // 57, 0, k87 - {152, 26}, // 58, P, k80 - {155, 38}, // 59, ;, k82 - {163, 49}, // 60, ?, k85 - {170, 0}, // 61, F11, ka3 - {159, 15}, // 62, -, k86 - {166, 26}, // 63, [, k81 - {170, 38}, // 64, ", k83 - {173, 61}, // 65, Ct_R, k04 - {184, 0}, // 66, F12, ka5 - {0, 8}, // 67, LED, l01 - {224, 8}, // 68, LED, l11 - {202, 0}, // 69, Prt, k97 - {0, 15}, // 70, LED, l02 - {224, 15}, // 71, LED, l12 - {224, 15}, // 72, Del, k65 - {0, 21}, // 73, LED, l03 - {224, 21}, // 74, LED, l13 - {224, 26}, // 75, PgUp, k15 - {0, 28}, // 76, LED, l04 - {224, 28}, // 77, LED, l14 - {173, 15}, // 78, =, k66 - {220, 64}, // 79, Right, k05 - {0, 35}, // 80, LED, l05 - {224, 35}, // 81, LED, l15 - {224, 49}, // 82, End, k75 - {0, 42}, // 83, LED, l06 - {224, 42}, // 84, LED, l16 - {195, 15}, // 85, BSpc, ka1 - {224, 38}, // 86, PgDn, k25 - {0, 48}, // 87, LED, l07 - {224, 48}, // 88, LED, l17 - {181, 26}, // 89, ], k61 - {182, 49}, // 90, Sh_R, k91 - {0, 55}, // 91, LED, l08 - {224, 55}, // 92, LED, l18 - {199, 26}, // 93, \, ka2 - {206, 52}, // 94, Up, k35 - {191, 64}, // 95, Left, k03 - {193, 38}, // 96, Enter, ka4 - {206, 64} // 97, Down, k73 -}, { - 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, 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, 2, 2, 4, 2, 2, 4, 2, 2, - 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 -}}; - const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {0, SW1_CS1, SW1_CS2, SW1_CS3}, // 0, ESC, k13 {0, SW1_CS4, SW1_CS5, SW1_CS6}, // 1, ~, k16 diff --git a/keyboards/gmmk/pro/rev1/ansi/keyboard.json b/keyboards/gmmk/pro/rev1/ansi/keyboard.json index fbb9107d16..e7bf3d6a59 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keyboard.json +++ b/keyboards/gmmk/pro/rev1/ansi/keyboard.json @@ -34,6 +34,108 @@ }, "processor": "STM32F303", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [1, 3], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 0, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 4, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 5, "y": 38, "flags": 4}, + {"matrix": [0, 0], "x": 9, "y": 49, "flags": 4}, + {"matrix": [0, 6], "x": 2, "y": 61, "flags": 4}, + {"matrix": [2, 6], "x": 18, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 14, "y": 15, "flags": 4}, + {"matrix": [1, 0], "x": 22, "y": 26, "flags": 4}, + {"matrix": [1, 2], "x": 25, "y": 38, "flags": 4}, + {"matrix": [1, 4], "x": 33, "y": 49, "flags": 4}, + {"matrix": [9, 0], "x": 20, "y": 61, "flags": 4}, + {"matrix": [3, 6], "x": 33, "y": 0, "flags": 4}, + {"matrix": [2, 7], "x": 29, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 36, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 49, "flags": 4}, + {"matrix": [9, 3], "x": 38, "y": 61, "flags": 4}, + {"matrix": [3, 1], "x": 47, "y": 0, "flags": 4}, + {"matrix": [3, 7], "x": 43, "y": 15, "flags": 4}, + {"matrix": [3, 0], "x": 51, "y": 26, "flags": 4}, + {"matrix": [3, 2], "x": 54, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 61, "y": 49, "flags": 4}, + {"matrix": [3, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [4, 7], "x": 58, "y": 15, "flags": 4}, + {"matrix": [4, 0], "x": 65, "y": 26, "flags": 4}, + {"matrix": [4, 2], "x": 69, "y": 38, "flags": 4}, + {"matrix": [4, 4], "x": 76, "y": 49, "flags": 4}, + {"matrix": [0, 7], "x": 79, "y": 0, "flags": 4}, + {"matrix": [4, 6], "x": 72, "y": 15, "flags": 4}, + {"matrix": [4, 1], "x": 79, "y": 26, "flags": 4}, + {"matrix": [4, 3], "x": 83, "y": 38, "flags": 4}, + {"matrix": [4, 5], "x": 90, "y": 49, "flags": 4}, + {"matrix": [9, 4], "x": 92, "y": 61, "flags": 4}, + {"matrix": [6, 3], "x": 94, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 87, "y": 15, "flags": 4}, + {"matrix": [5, 1], "x": 94, "y": 26, "flags": 4}, + {"matrix": [5, 3], "x": 98, "y": 38, "flags": 4}, + {"matrix": [5, 5], "x": 105, "y": 49, "flags": 4}, + {"matrix": [7, 1], "x": 108, "y": 0, "flags": 4}, + {"matrix": [5, 7], "x": 101, "y": 15, "flags": 4}, + {"matrix": [5, 0], "x": 108, "y": 26, "flags": 4}, + {"matrix": [5, 2], "x": 112, "y": 38, "flags": 4}, + {"matrix": [5, 4], "x": 119, "y": 49, "flags": 4}, + {"matrix": [7, 6], "x": 123, "y": 0, "flags": 4}, + {"matrix": [6, 7], "x": 116, "y": 15, "flags": 4}, + {"matrix": [6, 0], "x": 123, "y": 26, "flags": 4}, + {"matrix": [6, 2], "x": 126, "y": 38, "flags": 4}, + {"matrix": [6, 4], "x": 134, "y": 49, "flags": 4}, + {"matrix": [9, 5], "x": 145, "y": 61, "flags": 4}, + {"matrix": [10, 6], "x": 141, "y": 0, "flags": 4}, + {"matrix": [7, 7], "x": 130, "y": 15, "flags": 4}, + {"matrix": [7, 0], "x": 137, "y": 26, "flags": 4}, + {"matrix": [7, 2], "x": 141, "y": 38, "flags": 4}, + {"matrix": [7, 4], "x": 148, "y": 49, "flags": 4}, + {"matrix": [9, 2], "x": 159, "y": 61, "flags": 4}, + {"matrix": [10, 7], "x": 155, "y": 0, "flags": 4}, + {"matrix": [8, 7], "x": 145, "y": 15, "flags": 4}, + {"matrix": [8, 0], "x": 152, "y": 26, "flags": 4}, + {"matrix": [8, 2], "x": 155, "y": 38, "flags": 4}, + {"matrix": [8, 5], "x": 163, "y": 49, "flags": 4}, + {"matrix": [10, 3], "x": 170, "y": 0, "flags": 4}, + {"matrix": [8, 6], "x": 159, "y": 15, "flags": 4}, + {"matrix": [8, 1], "x": 166, "y": 26, "flags": 4}, + {"matrix": [8, 3], "x": 170, "y": 38, "flags": 4}, + {"matrix": [0, 4], "x": 173, "y": 61, "flags": 4}, + {"matrix": [10, 5], "x": 184, "y": 0, "flags": 4}, + {"x": 0, "y": 8, "flags": 2}, + {"x": 224, "y": 8, "flags": 2}, + {"matrix": [9, 7], "x": 202, "y": 0, "flags": 4}, + {"x": 0, "y": 15, "flags": 2}, + {"x": 224, "y": 15, "flags": 2}, + {"matrix": [6, 5], "x": 224, "y": 15, "flags": 4}, + {"x": 0, "y": 21, "flags": 2}, + {"x": 224, "y": 21, "flags": 2}, + {"matrix": [1, 5], "x": 224, "y": 26, "flags": 4}, + {"x": 0, "y": 28, "flags": 2}, + {"x": 224, "y": 28, "flags": 2}, + {"matrix": [6, 6], "x": 173, "y": 15, "flags": 4}, + {"matrix": [0, 5], "x": 220, "y": 64, "flags": 4}, + {"x": 0, "y": 35, "flags": 2}, + {"x": 224, "y": 35, "flags": 2}, + {"matrix": [7, 5], "x": 224, "y": 49, "flags": 4}, + {"x": 0, "y": 42, "flags": 2}, + {"x": 224, "y": 42, "flags": 2}, + {"matrix": [10, 1], "x": 195, "y": 15, "flags": 4}, + {"matrix": [2, 5], "x": 224, "y": 38, "flags": 4}, + {"x": 0, "y": 48, "flags": 2}, + {"x": 224, "y": 48, "flags": 2}, + {"matrix": [6, 1], "x": 181, "y": 26, "flags": 4}, + {"matrix": [9, 1], "x": 182, "y": 49, "flags": 4}, + {"x": 0, "y": 55, "flags": 2}, + {"x": 224, "y": 55, "flags": 2}, + {"matrix": [10, 2], "x": 199, "y": 26, "flags": 4}, + {"matrix": [3, 5], "x": 206, "y": 52, "flags": 4}, + {"matrix": [0, 3], "x": 191, "y": 64, "flags": 4}, + {"matrix": [10, 4], "x": 193, "y": 38, "flags": 4}, + {"matrix": [7, 3], "x": 206, "y": 64, "flags": 4} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/gmmk/pro/rev1/iso/iso.c b/keyboards/gmmk/pro/rev1/iso/iso.c index 932c6a1f49..1ba3ddc404 100644 --- a/keyboards/gmmk/pro/rev1/iso/iso.c +++ b/keyboards/gmmk/pro/rev1/iso/iso.c @@ -18,125 +18,6 @@ #ifdef RGB_MATRIX_ENABLE // clang-format off -led_config_t g_led_config = {{ - { 4, NO_LED, NO_LED, 96, 65, 80, 5, 28 }, - { 8, 2, 9, 0, 10, 76, 1, 7 }, - { 14, 3, 15, 67, 16, 87, 6, 13 }, - { 20, 18, 21, 23, 22, 94, 12, 19 }, - { 25, 30, 26, 31, 27, 32, 29, 24 }, - { 41, 36, 42, 37, 43, 38, 35, 40 }, - { 46, 90, 47, 34, 48, 73, 79, 45 }, - { 52, 39, 53, 98, 54, 83, 44, 51 }, - { 58, 63, 59, 64, 95, 60, 62, 57 }, - { 11, 91, 55, 17, 33, 49, NO_LED, 70 }, - { NO_LED, 86, NO_LED, 61, 97, 66, 50, 56 } -}, { - {0, 0}, // 0, ESC, k13 - {0, 15}, // 1, `, k16 - {4, 26}, // 2, Tab, k11 - {5, 38}, // 3, Caps, k21 - {2, 49}, // 4, Sh_L, k00 - {2, 61}, // 5, Ct_L, k06 - {18, 0}, // 6, F1, k26 - {14, 15}, // 7, 1, k17 - {22, 26}, // 8, Q, k10 - {25, 38}, // 9, A, k12 - {33, 49}, // 10, Z, k14 - {20, 61}, // 11, Win_L, k90 - {33, 0}, // 12, F2, k36 - {29, 15}, // 13, 2, k27 - {36, 26}, // 14, W, k20 - {40, 38}, // 15, S, k22 - {47, 49}, // 16, X, k24 - {38, 61}, // 17, Alt_L, k93 - {47, 0}, // 18, F3, k31 - {43, 15}, // 19, 3, k37 - {51, 26}, // 20, E, k30 - {54, 38}, // 21, D, k32 - {61, 49}, // 22, C, k34 - {61, 0}, // 23, F4, k33 - {58, 15}, // 24, 4, k47 - {65, 26}, // 25, R, k40 - {69, 38}, // 26, F, k42 - {76, 49}, // 27, V, k44 - {79, 0}, // 28, F5, k07 - {72, 15}, // 29, 5, k46 - {79, 26}, // 30, T, k41 - {83, 38}, // 31, G, k43 - {90, 49}, // 32, B, k45 - {92, 61}, // 33, SPACE, k94 - {94, 0}, // 34, F6, k63 - {87, 15}, // 35, 6, k56 - {94, 26}, // 36, Y, k51 - {98, 38}, // 37, H, k53 - {105, 49}, // 38, N, k55 - {108, 0}, // 39, F7, k71 - {101, 15}, // 40, 7, k57 - {108, 26}, // 41, U, k50 - {112, 38}, // 42, J, k52 - {119, 49}, // 43, M, k54 - {123, 0}, // 44, F8, k76 - {116, 15}, // 45, 8, k67 - {123, 26}, // 46, I, k60 - {126, 38}, // 47, K, k62 - {134, 49}, // 48, ,, k64 - {145, 61}, // 49, Alt_R, k95 - {141, 0}, // 50, F9, ka6 - {130, 15}, // 51, 9, k77 - {137, 26}, // 52, O, k70 - {141, 38}, // 53, L, k72 - {148, 49}, // 54, ., k74 - {159, 61}, // 55, FN, k92 - {155, 0}, // 56, F10, ka7 - {145, 15}, // 57, 0, k87 - {152, 26}, // 58, P, k80 - {155, 38}, // 59, ;, k82 - {163, 49}, // 60, /, k85 - {170, 0}, // 61, F11, ka3 - {159, 15}, // 62, -, k86 - {166, 26}, // 63, [, k81 - {170, 38}, // 64, ", k83 - {173, 61}, // 65, Ct_R, k04 - {184, 0}, // 66, F12, ka5 - {18, 49}, // 67, \, k23 - {0, 8}, // 68, LED, l01 - {224, 8}, // 69, LED, l11 - {202, 0}, // 70, Prt, k97 - {0, 15}, // 71, LED, l02 - {224, 15}, // 72, LED, l12 - {224, 15}, // 73, Del, k65 - {0, 21}, // 74, LED, l03 - {224, 21}, // 75, LED, l13 - {224, 26}, // 76, PgUp, k15 - {0, 28}, // 77, LED, l04 - {224, 28}, // 78, LED, l14 - {173, 15}, // 79, =, k66 - {220, 64}, // 80, Right, k05 - {0, 35}, // 81, LED, l05 - {224, 35}, // 82, LED, l15 - {224, 49}, // 83, End, k75 - {0, 42}, // 84, LED, l06 - {224, 42}, // 85, LED, l16 - {195, 15}, // 86, BSpc, ka1 - {224, 38}, // 87, PgDn, k25 - {0, 48}, // 88, LED, l07 - {224, 48}, // 89, LED, l17 - {181, 26}, // 90, ], k61 - {182, 49}, // 91, Sh_R, k91 - {0, 55}, // 92, LED, l08 - {224, 55}, // 93, LED, l18 - {206, 52}, // 94, Up, k35 - {184, 38}, // 95, #, k84 - {191, 64}, // 96, Left, k03 - {201, 26}, // 97, Enter, ka4 - {206, 64}, // 98, Down, k73 -}, { - 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, 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, 2, 2, 4, 2, 2, 4, 2, - 2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 -}}; - const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {0, SW1_CS1, SW1_CS2, SW1_CS3}, // 0, ESC, k13 {0, SW1_CS4, SW1_CS5, SW1_CS6}, // 1, ~, k16 diff --git a/keyboards/gmmk/pro/rev1/iso/keyboard.json b/keyboards/gmmk/pro/rev1/iso/keyboard.json index 7506f8952d..a30e7cbb6d 100644 --- a/keyboards/gmmk/pro/rev1/iso/keyboard.json +++ b/keyboards/gmmk/pro/rev1/iso/keyboard.json @@ -34,6 +34,109 @@ }, "processor": "STM32F303", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [1, 3], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 0, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 4, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 5, "y": 38, "flags": 4}, + {"matrix": [0, 0], "x": 2, "y": 49, "flags": 4}, + {"matrix": [0, 6], "x": 2, "y": 61, "flags": 4}, + {"matrix": [2, 6], "x": 18, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 14, "y": 15, "flags": 4}, + {"matrix": [1, 0], "x": 22, "y": 26, "flags": 4}, + {"matrix": [1, 2], "x": 25, "y": 38, "flags": 4}, + {"matrix": [1, 4], "x": 33, "y": 49, "flags": 4}, + {"matrix": [9, 0], "x": 20, "y": 61, "flags": 4}, + {"matrix": [3, 6], "x": 33, "y": 0, "flags": 4}, + {"matrix": [2, 7], "x": 29, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 36, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 49, "flags": 4}, + {"matrix": [9, 3], "x": 38, "y": 61, "flags": 4}, + {"matrix": [3, 1], "x": 47, "y": 0, "flags": 4}, + {"matrix": [3, 7], "x": 43, "y": 15, "flags": 4}, + {"matrix": [3, 0], "x": 51, "y": 26, "flags": 4}, + {"matrix": [3, 2], "x": 54, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 61, "y": 49, "flags": 4}, + {"matrix": [3, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [4, 7], "x": 58, "y": 15, "flags": 4}, + {"matrix": [4, 0], "x": 65, "y": 26, "flags": 4}, + {"matrix": [4, 2], "x": 69, "y": 38, "flags": 4}, + {"matrix": [4, 4], "x": 76, "y": 49, "flags": 4}, + {"matrix": [0, 7], "x": 79, "y": 0, "flags": 4}, + {"matrix": [4, 6], "x": 72, "y": 15, "flags": 4}, + {"matrix": [4, 1], "x": 79, "y": 26, "flags": 4}, + {"matrix": [4, 3], "x": 83, "y": 38, "flags": 4}, + {"matrix": [4, 5], "x": 90, "y": 49, "flags": 4}, + {"matrix": [9, 4], "x": 92, "y": 61, "flags": 4}, + {"matrix": [6, 3], "x": 94, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 87, "y": 15, "flags": 4}, + {"matrix": [5, 1], "x": 94, "y": 26, "flags": 4}, + {"matrix": [5, 3], "x": 98, "y": 38, "flags": 4}, + {"matrix": [5, 5], "x": 105, "y": 49, "flags": 4}, + {"matrix": [7, 1], "x": 108, "y": 0, "flags": 4}, + {"matrix": [5, 7], "x": 101, "y": 15, "flags": 4}, + {"matrix": [5, 0], "x": 108, "y": 26, "flags": 4}, + {"matrix": [5, 2], "x": 112, "y": 38, "flags": 4}, + {"matrix": [5, 4], "x": 119, "y": 49, "flags": 4}, + {"matrix": [7, 6], "x": 123, "y": 0, "flags": 4}, + {"matrix": [6, 7], "x": 116, "y": 15, "flags": 4}, + {"matrix": [6, 0], "x": 123, "y": 26, "flags": 4}, + {"matrix": [6, 2], "x": 126, "y": 38, "flags": 4}, + {"matrix": [6, 4], "x": 134, "y": 49, "flags": 4}, + {"matrix": [9, 5], "x": 145, "y": 61, "flags": 4}, + {"matrix": [10, 6], "x": 141, "y": 0, "flags": 4}, + {"matrix": [7, 7], "x": 130, "y": 15, "flags": 4}, + {"matrix": [7, 0], "x": 137, "y": 26, "flags": 4}, + {"matrix": [7, 2], "x": 141, "y": 38, "flags": 4}, + {"matrix": [7, 4], "x": 148, "y": 49, "flags": 4}, + {"matrix": [9, 2], "x": 159, "y": 61, "flags": 4}, + {"matrix": [10, 7], "x": 155, "y": 0, "flags": 4}, + {"matrix": [8, 7], "x": 145, "y": 15, "flags": 4}, + {"matrix": [8, 0], "x": 152, "y": 26, "flags": 4}, + {"matrix": [8, 2], "x": 155, "y": 38, "flags": 4}, + {"matrix": [8, 5], "x": 163, "y": 49, "flags": 4}, + {"matrix": [10, 3], "x": 170, "y": 0, "flags": 4}, + {"matrix": [8, 6], "x": 159, "y": 15, "flags": 4}, + {"matrix": [8, 1], "x": 166, "y": 26, "flags": 4}, + {"matrix": [8, 3], "x": 170, "y": 38, "flags": 4}, + {"matrix": [0, 4], "x": 173, "y": 61, "flags": 4}, + {"matrix": [10, 5], "x": 184, "y": 0, "flags": 4}, + {"matrix": [2, 3], "x": 18, "y": 49, "flags": 4}, + {"x": 0, "y": 8, "flags": 2}, + {"x": 224, "y": 8, "flags": 2}, + {"matrix": [9, 7], "x": 202, "y": 0, "flags": 4}, + {"x": 0, "y": 15, "flags": 2}, + {"x": 224, "y": 15, "flags": 2}, + {"matrix": [6, 5], "x": 224, "y": 15, "flags": 4}, + {"x": 0, "y": 21, "flags": 2}, + {"x": 224, "y": 21, "flags": 2}, + {"matrix": [1, 5], "x": 224, "y": 26, "flags": 4}, + {"x": 0, "y": 28, "flags": 2}, + {"x": 224, "y": 28, "flags": 2}, + {"matrix": [6, 6], "x": 173, "y": 15, "flags": 4}, + {"matrix": [0, 5], "x": 220, "y": 64, "flags": 4}, + {"x": 0, "y": 35, "flags": 2}, + {"x": 224, "y": 35, "flags": 2}, + {"matrix": [7, 5], "x": 224, "y": 49, "flags": 4}, + {"x": 0, "y": 42, "flags": 2}, + {"x": 224, "y": 42, "flags": 2}, + {"matrix": [10, 1], "x": 195, "y": 15, "flags": 4}, + {"matrix": [2, 5], "x": 224, "y": 38, "flags": 4}, + {"x": 0, "y": 48, "flags": 2}, + {"x": 224, "y": 48, "flags": 2}, + {"matrix": [6, 1], "x": 181, "y": 26, "flags": 4}, + {"matrix": [9, 1], "x": 182, "y": 49, "flags": 4}, + {"x": 0, "y": 55, "flags": 2}, + {"x": 224, "y": 55, "flags": 2}, + {"matrix": [3, 5], "x": 206, "y": 52, "flags": 4}, + {"matrix": [8, 4], "x": 184, "y": 38, "flags": 4}, + {"matrix": [0, 3], "x": 191, "y": 64, "flags": 4}, + {"matrix": [10, 4], "x": 201, "y": 26, "flags": 4}, + {"matrix": [7, 3], "x": 206, "y": 64, "flags": 4} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/gmmk/pro/rev2/ansi/ansi.c b/keyboards/gmmk/pro/rev2/ansi/ansi.c index a3f957ef0a..8b7695095f 100644 --- a/keyboards/gmmk/pro/rev2/ansi/ansi.c +++ b/keyboards/gmmk/pro/rev2/ansi/ansi.c @@ -18,124 +18,6 @@ #ifdef RGB_MATRIX_ENABLE // clang-format off -led_config_t g_led_config = {{ - { 4, NO_LED, NO_LED, 95, 65, 79, 5, 28 }, - { 8, 2, 9, 0, 10, 75, 1, 7 }, - { 14, 3, 15, NO_LED, 16, 86, 6, 13 }, - { 20, 18, 21, 23, 22, 94, 12, 19 }, - { 25, 30, 26, 31, 27, 32, 29, 24 }, - { 41, 36, 42, 37, 43, 38, 35, 40 }, - { 46, 89, 47, 34, 48, 72, 78, 45 }, - { 52, 39, 53, 97, 54, 82, 44, 51 }, - { 58, 63, 59, 64, NO_LED, 60, 62, 57 }, - { 11, 90, 55, 17, 33, 49, NO_LED, 69 }, - { NO_LED, 85, 93, 61, 96, 66, 50, 56 } -}, { - {0, 0}, // 0, ESC, k13 - {0, 15}, // 1, ~, k16 - {4, 26}, // 2, Tab, k11 - {5, 38}, // 3, Caps, k21 - {9, 49}, // 4, Sh_L, k00 - {2, 61}, // 5, Ct_L, k06 - {18, 0}, // 6, F1, k26 - {14, 15}, // 7, 1, k17 - {22, 26}, // 8, Q, k10 - {25, 38}, // 9, A, k12 - {33, 49}, // 10, Z, k14 - {20, 61}, // 11, Win_L, k90 - {33, 0}, // 12, F2, k36 - {29, 15}, // 13, 2, k27 - {36, 26}, // 14, W, k20 - {40, 38}, // 15, S, k22 - {47, 49}, // 16, X, k24 - {38, 61}, // 17, Alt_L, k93 - {47, 0}, // 18, F3, k31 - {43, 15}, // 19, 3, k37 - {51, 26}, // 20, E, k30 - {54, 38}, // 21, D, k32 - {61, 49}, // 22, C, k34 - {61, 0}, // 23, F4, k33 - {58, 15}, // 24, 4, k47 - {65, 26}, // 25, R, k40 - {69, 38}, // 26, F, k42 - {76, 49}, // 27, V, k44 - {79, 0}, // 28, F5, k07 - {72, 15}, // 29, 5, k46 - {79, 26}, // 30, T, k41 - {83, 38}, // 31, G, k43 - {90, 49}, // 32, B, k45 - {92, 61}, // 33, SPACE, k94 - {94, 0}, // 34, F6, k63 - {87, 15}, // 35, 6, k56 - {94, 26}, // 36, Y, k51 - {98, 38}, // 37, H, k53 - {105, 49}, // 38, N, k55 - {108, 0}, // 39, F7, k71 - {101, 15}, // 40, 7, k57 - {108, 26}, // 41, U, k50 - {112, 38}, // 42, J, k52 - {119, 49}, // 43, M, k54 - {123, 0}, // 44, F8, k76 - {116, 15}, // 45, 8, k67 - {123, 26}, // 46, I, k60 - {126, 38}, // 47, K, k62 - {134, 49}, // 48, ,, k64 - {145, 61}, // 49, Alt_R, k95 - {141, 0}, // 50, F9, ka6 - {130, 15}, // 51, 9, k77 - {137, 26}, // 52, O, k70 - {141, 38}, // 53, L, k72 - {148, 49}, // 54, ., k74 - {159, 61}, // 55, FN, k92 - {155, 0}, // 56, F10, ka7 - {145, 15}, // 57, 0, k87 - {152, 26}, // 58, P, k80 - {155, 38}, // 59, ;, k82 - {163, 49}, // 60, ?, k85 - {170, 0}, // 61, F11, ka3 - {159, 15}, // 62, -, k86 - {166, 26}, // 63, [, k81 - {170, 38}, // 64, ", k83 - {173, 61}, // 65, Ct_R, k04 - {184, 0}, // 66, F12, ka5 - {0, 8}, // 67, LED, l01 - {224, 8}, // 68, LED, l11 - {202, 0}, // 69, Prt, k97 - {0, 15}, // 70, LED, l02 - {224, 15}, // 71, LED, l12 - {224, 15}, // 72, Del, k65 - {0, 21}, // 73, LED, l03 - {224, 21}, // 74, LED, l13 - {224, 26}, // 75, PgUp, k15 - {0, 28}, // 76, LED, l04 - {224, 28}, // 77, LED, l14 - {173, 15}, // 78, =, k66 - {220, 64}, // 79, Right, k05 - {0, 35}, // 80, LED, l05 - {224, 35}, // 81, LED, l15 - {224, 49}, // 82, End, k75 - {0, 42}, // 83, LED, l06 - {224, 42}, // 84, LED, l16 - {195, 15}, // 85, BSpc, ka1 - {224, 38}, // 86, PgDn, k25 - {0, 48}, // 87, LED, l07 - {224, 48}, // 88, LED, l17 - {181, 26}, // 89, ], k61 - {182, 49}, // 90, Sh_R, k91 - {0, 55}, // 91, LED, l08 - {224, 55}, // 92, LED, l18 - {199, 26}, // 93, \, ka2 - {206, 52}, // 94, Up, k35 - {191, 64}, // 95, Left, k03 - {193, 38}, // 96, Enter, ka4 - {206, 64} // 97, Down, k73 -}, { - 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, 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, 2, 2, 4, 2, 2, 4, 2, 2, - 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 -}}; - const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {0, SW1_CS1, SW1_CS2, SW1_CS3}, // 0, ESC, k13 {0, SW1_CS4, SW1_CS5, SW1_CS6}, // 1, ~, k16 diff --git a/keyboards/gmmk/pro/rev2/ansi/keyboard.json b/keyboards/gmmk/pro/rev2/ansi/keyboard.json index 4e0fdfccd9..f8eb11f10b 100644 --- a/keyboards/gmmk/pro/rev2/ansi/keyboard.json +++ b/keyboards/gmmk/pro/rev2/ansi/keyboard.json @@ -41,6 +41,108 @@ }, "processor": "WB32F3G71", "bootloader": "wb32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [1, 3], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 0, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 4, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 5, "y": 38, "flags": 4}, + {"matrix": [0, 0], "x": 9, "y": 49, "flags": 4}, + {"matrix": [0, 6], "x": 2, "y": 61, "flags": 4}, + {"matrix": [2, 6], "x": 18, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 14, "y": 15, "flags": 4}, + {"matrix": [1, 0], "x": 22, "y": 26, "flags": 4}, + {"matrix": [1, 2], "x": 25, "y": 38, "flags": 4}, + {"matrix": [1, 4], "x": 33, "y": 49, "flags": 4}, + {"matrix": [9, 0], "x": 20, "y": 61, "flags": 4}, + {"matrix": [3, 6], "x": 33, "y": 0, "flags": 4}, + {"matrix": [2, 7], "x": 29, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 36, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 49, "flags": 4}, + {"matrix": [9, 3], "x": 38, "y": 61, "flags": 4}, + {"matrix": [3, 1], "x": 47, "y": 0, "flags": 4}, + {"matrix": [3, 7], "x": 43, "y": 15, "flags": 4}, + {"matrix": [3, 0], "x": 51, "y": 26, "flags": 4}, + {"matrix": [3, 2], "x": 54, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 61, "y": 49, "flags": 4}, + {"matrix": [3, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [4, 7], "x": 58, "y": 15, "flags": 4}, + {"matrix": [4, 0], "x": 65, "y": 26, "flags": 4}, + {"matrix": [4, 2], "x": 69, "y": 38, "flags": 4}, + {"matrix": [4, 4], "x": 76, "y": 49, "flags": 4}, + {"matrix": [0, 7], "x": 79, "y": 0, "flags": 4}, + {"matrix": [4, 6], "x": 72, "y": 15, "flags": 4}, + {"matrix": [4, 1], "x": 79, "y": 26, "flags": 4}, + {"matrix": [4, 3], "x": 83, "y": 38, "flags": 4}, + {"matrix": [4, 5], "x": 90, "y": 49, "flags": 4}, + {"matrix": [9, 4], "x": 92, "y": 61, "flags": 4}, + {"matrix": [6, 3], "x": 94, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 87, "y": 15, "flags": 4}, + {"matrix": [5, 1], "x": 94, "y": 26, "flags": 4}, + {"matrix": [5, 3], "x": 98, "y": 38, "flags": 4}, + {"matrix": [5, 5], "x": 105, "y": 49, "flags": 4}, + {"matrix": [7, 1], "x": 108, "y": 0, "flags": 4}, + {"matrix": [5, 7], "x": 101, "y": 15, "flags": 4}, + {"matrix": [5, 0], "x": 108, "y": 26, "flags": 4}, + {"matrix": [5, 2], "x": 112, "y": 38, "flags": 4}, + {"matrix": [5, 4], "x": 119, "y": 49, "flags": 4}, + {"matrix": [7, 6], "x": 123, "y": 0, "flags": 4}, + {"matrix": [6, 7], "x": 116, "y": 15, "flags": 4}, + {"matrix": [6, 0], "x": 123, "y": 26, "flags": 4}, + {"matrix": [6, 2], "x": 126, "y": 38, "flags": 4}, + {"matrix": [6, 4], "x": 134, "y": 49, "flags": 4}, + {"matrix": [9, 5], "x": 145, "y": 61, "flags": 4}, + {"matrix": [10, 6], "x": 141, "y": 0, "flags": 4}, + {"matrix": [7, 7], "x": 130, "y": 15, "flags": 4}, + {"matrix": [7, 0], "x": 137, "y": 26, "flags": 4}, + {"matrix": [7, 2], "x": 141, "y": 38, "flags": 4}, + {"matrix": [7, 4], "x": 148, "y": 49, "flags": 4}, + {"matrix": [9, 2], "x": 159, "y": 61, "flags": 4}, + {"matrix": [10, 7], "x": 155, "y": 0, "flags": 4}, + {"matrix": [8, 7], "x": 145, "y": 15, "flags": 4}, + {"matrix": [8, 0], "x": 152, "y": 26, "flags": 4}, + {"matrix": [8, 2], "x": 155, "y": 38, "flags": 4}, + {"matrix": [8, 5], "x": 163, "y": 49, "flags": 4}, + {"matrix": [10, 3], "x": 170, "y": 0, "flags": 4}, + {"matrix": [8, 6], "x": 159, "y": 15, "flags": 4}, + {"matrix": [8, 1], "x": 166, "y": 26, "flags": 4}, + {"matrix": [8, 3], "x": 170, "y": 38, "flags": 4}, + {"matrix": [0, 4], "x": 173, "y": 61, "flags": 4}, + {"matrix": [10, 5], "x": 184, "y": 0, "flags": 4}, + {"x": 0, "y": 8, "flags": 2}, + {"x": 224, "y": 8, "flags": 2}, + {"matrix": [9, 7], "x": 202, "y": 0, "flags": 4}, + {"x": 0, "y": 15, "flags": 2}, + {"x": 224, "y": 15, "flags": 2}, + {"matrix": [6, 5], "x": 224, "y": 15, "flags": 4}, + {"x": 0, "y": 21, "flags": 2}, + {"x": 224, "y": 21, "flags": 2}, + {"matrix": [1, 5], "x": 224, "y": 26, "flags": 4}, + {"x": 0, "y": 28, "flags": 2}, + {"x": 224, "y": 28, "flags": 2}, + {"matrix": [6, 6], "x": 173, "y": 15, "flags": 4}, + {"matrix": [0, 5], "x": 220, "y": 64, "flags": 4}, + {"x": 0, "y": 35, "flags": 2}, + {"x": 224, "y": 35, "flags": 2}, + {"matrix": [7, 5], "x": 224, "y": 49, "flags": 4}, + {"x": 0, "y": 42, "flags": 2}, + {"x": 224, "y": 42, "flags": 2}, + {"matrix": [10, 1], "x": 195, "y": 15, "flags": 4}, + {"matrix": [2, 5], "x": 224, "y": 38, "flags": 4}, + {"x": 0, "y": 48, "flags": 2}, + {"x": 224, "y": 48, "flags": 2}, + {"matrix": [6, 1], "x": 181, "y": 26, "flags": 4}, + {"matrix": [9, 1], "x": 182, "y": 49, "flags": 4}, + {"x": 0, "y": 55, "flags": 2}, + {"x": 224, "y": 55, "flags": 2}, + {"matrix": [10, 2], "x": 199, "y": 26, "flags": 4}, + {"matrix": [3, 5], "x": 206, "y": 52, "flags": 4}, + {"matrix": [0, 3], "x": 191, "y": 64, "flags": 4}, + {"matrix": [10, 4], "x": 193, "y": 38, "flags": 4}, + {"matrix": [7, 3], "x": 206, "y": 64, "flags": 4} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/gmmk/pro/rev2/iso/iso.c b/keyboards/gmmk/pro/rev2/iso/iso.c index 7a34f2432f..ce211ea47d 100644 --- a/keyboards/gmmk/pro/rev2/iso/iso.c +++ b/keyboards/gmmk/pro/rev2/iso/iso.c @@ -18,125 +18,6 @@ #ifdef RGB_MATRIX_ENABLE // clang-format off -led_config_t g_led_config = {{ - { 4, NO_LED, NO_LED, 96, 65, 80, 5, 28 }, - { 8, 2, 9, 0, 10, 76, 1, 7 }, - { 14, 3, 15, 67, 16, 87, 6, 13 }, - { 20, 18, 21, 23, 22, 94, 12, 19 }, - { 25, 30, 26, 31, 27, 32, 29, 24 }, - { 41, 36, 42, 37, 43, 38, 35, 40 }, - { 46, 90, 47, 34, 48, 73, 79, 45 }, - { 52, 39, 53, 98, 54, 83, 44, 51 }, - { 58, 63, 59, 64, 95, 60, 62, 57 }, - { 11, 91, 55, 17, 33, 49, NO_LED, 70 }, - { NO_LED, 86, NO_LED, 61, 97, 66, 50, 56 } -}, { - {0, 0}, // 0, ESC, k13 - {0, 15}, // 1, `, k16 - {4, 26}, // 2, Tab, k11 - {5, 38}, // 3, Caps, k21 - {2, 49}, // 4, Sh_L, k00 - {2, 61}, // 5, Ct_L, k06 - {18, 0}, // 6, F1, k26 - {14, 15}, // 7, 1, k17 - {22, 26}, // 8, Q, k10 - {25, 38}, // 9, A, k12 - {33, 49}, // 10, Z, k14 - {20, 61}, // 11, Win_L, k90 - {33, 0}, // 12, F2, k36 - {29, 15}, // 13, 2, k27 - {36, 26}, // 14, W, k20 - {40, 38}, // 15, S, k22 - {47, 49}, // 16, X, k24 - {38, 61}, // 17, Alt_L, k93 - {47, 0}, // 18, F3, k31 - {43, 15}, // 19, 3, k37 - {51, 26}, // 20, E, k30 - {54, 38}, // 21, D, k32 - {61, 49}, // 22, C, k34 - {61, 0}, // 23, F4, k33 - {58, 15}, // 24, 4, k47 - {65, 26}, // 25, R, k40 - {69, 38}, // 26, F, k42 - {76, 49}, // 27, V, k44 - {79, 0}, // 28, F5, k07 - {72, 15}, // 29, 5, k46 - {79, 26}, // 30, T, k41 - {83, 38}, // 31, G, k43 - {90, 49}, // 32, B, k45 - {92, 61}, // 33, SPACE, k94 - {94, 0}, // 34, F6, k63 - {87, 15}, // 35, 6, k56 - {94, 26}, // 36, Y, k51 - {98, 38}, // 37, H, k53 - {105, 49}, // 38, N, k55 - {108, 0}, // 39, F7, k71 - {101, 15}, // 40, 7, k57 - {108, 26}, // 41, U, k50 - {112, 38}, // 42, J, k52 - {119, 49}, // 43, M, k54 - {123, 0}, // 44, F8, k76 - {116, 15}, // 45, 8, k67 - {123, 26}, // 46, I, k60 - {126, 38}, // 47, K, k62 - {134, 49}, // 48, ,, k64 - {145, 61}, // 49, Alt_R, k95 - {141, 0}, // 50, F9, ka6 - {130, 15}, // 51, 9, k77 - {137, 26}, // 52, O, k70 - {141, 38}, // 53, L, k72 - {148, 49}, // 54, ., k74 - {159, 61}, // 55, FN, k92 - {155, 0}, // 56, F10, ka7 - {145, 15}, // 57, 0, k87 - {152, 26}, // 58, P, k80 - {155, 38}, // 59, ;, k82 - {163, 49}, // 60, /, k85 - {170, 0}, // 61, F11, ka3 - {159, 15}, // 62, -, k86 - {166, 26}, // 63, [, k81 - {170, 38}, // 64, ", k83 - {173, 61}, // 65, Ct_R, k04 - {184, 0}, // 66, F12, ka5 - {18, 49}, // 67, \, k23 - {0, 8}, // 68, LED, l01 - {224, 8}, // 69, LED, l11 - {202, 0}, // 70, Prt, k97 - {0, 15}, // 71, LED, l02 - {224, 15}, // 72, LED, l12 - {224, 15}, // 73, Del, k65 - {0, 21}, // 74, LED, l03 - {224, 21}, // 75, LED, l13 - {224, 26}, // 76, PgUp, k15 - {0, 28}, // 77, LED, l04 - {224, 28}, // 78, LED, l14 - {173, 15}, // 79, =, k66 - {220, 64}, // 80, Right, k05 - {0, 35}, // 81, LED, l05 - {224, 35}, // 82, LED, l15 - {224, 49}, // 83, End, k75 - {0, 42}, // 84, LED, l06 - {224, 42}, // 85, LED, l16 - {195, 15}, // 86, BSpc, ka1 - {224, 38}, // 87, PgDn, k25 - {0, 48}, // 88, LED, l07 - {224, 48}, // 89, LED, l17 - {181, 26}, // 90, ], k61 - {182, 49}, // 91, Sh_R, k91 - {0, 55}, // 92, LED, l08 - {224, 55}, // 93, LED, l18 - {206, 52}, // 94, Up, k35 - {184, 38}, // 95, #, k84 - {191, 64}, // 96, Left, k03 - {201, 26}, // 97, Enter, ka4 - {206, 64}, // 98, Down, k73 -}, { - 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, 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, 2, 2, 4, 2, 2, 4, 2, - 2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 -}}; - const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { {0, SW1_CS1, SW1_CS2, SW1_CS3}, // 0, ESC, k13 {0, SW1_CS4, SW1_CS5, SW1_CS6}, // 1, ~, k16 diff --git a/keyboards/gmmk/pro/rev2/iso/keyboard.json b/keyboards/gmmk/pro/rev2/iso/keyboard.json index 01db9dc22f..886d9e8c55 100644 --- a/keyboards/gmmk/pro/rev2/iso/keyboard.json +++ b/keyboards/gmmk/pro/rev2/iso/keyboard.json @@ -41,6 +41,109 @@ }, "processor": "WB32F3G71", "bootloader": "wb32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [1, 3], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 0, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 4, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 5, "y": 38, "flags": 4}, + {"matrix": [0, 0], "x": 2, "y": 49, "flags": 4}, + {"matrix": [0, 6], "x": 2, "y": 61, "flags": 4}, + {"matrix": [2, 6], "x": 18, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 14, "y": 15, "flags": 4}, + {"matrix": [1, 0], "x": 22, "y": 26, "flags": 4}, + {"matrix": [1, 2], "x": 25, "y": 38, "flags": 4}, + {"matrix": [1, 4], "x": 33, "y": 49, "flags": 4}, + {"matrix": [9, 0], "x": 20, "y": 61, "flags": 4}, + {"matrix": [3, 6], "x": 33, "y": 0, "flags": 4}, + {"matrix": [2, 7], "x": 29, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 36, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 49, "flags": 4}, + {"matrix": [9, 3], "x": 38, "y": 61, "flags": 4}, + {"matrix": [3, 1], "x": 47, "y": 0, "flags": 4}, + {"matrix": [3, 7], "x": 43, "y": 15, "flags": 4}, + {"matrix": [3, 0], "x": 51, "y": 26, "flags": 4}, + {"matrix": [3, 2], "x": 54, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 61, "y": 49, "flags": 4}, + {"matrix": [3, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [4, 7], "x": 58, "y": 15, "flags": 4}, + {"matrix": [4, 0], "x": 65, "y": 26, "flags": 4}, + {"matrix": [4, 2], "x": 69, "y": 38, "flags": 4}, + {"matrix": [4, 4], "x": 76, "y": 49, "flags": 4}, + {"matrix": [0, 7], "x": 79, "y": 0, "flags": 4}, + {"matrix": [4, 6], "x": 72, "y": 15, "flags": 4}, + {"matrix": [4, 1], "x": 79, "y": 26, "flags": 4}, + {"matrix": [4, 3], "x": 83, "y": 38, "flags": 4}, + {"matrix": [4, 5], "x": 90, "y": 49, "flags": 4}, + {"matrix": [9, 4], "x": 92, "y": 61, "flags": 4}, + {"matrix": [6, 3], "x": 94, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 87, "y": 15, "flags": 4}, + {"matrix": [5, 1], "x": 94, "y": 26, "flags": 4}, + {"matrix": [5, 3], "x": 98, "y": 38, "flags": 4}, + {"matrix": [5, 5], "x": 105, "y": 49, "flags": 4}, + {"matrix": [7, 1], "x": 108, "y": 0, "flags": 4}, + {"matrix": [5, 7], "x": 101, "y": 15, "flags": 4}, + {"matrix": [5, 0], "x": 108, "y": 26, "flags": 4}, + {"matrix": [5, 2], "x": 112, "y": 38, "flags": 4}, + {"matrix": [5, 4], "x": 119, "y": 49, "flags": 4}, + {"matrix": [7, 6], "x": 123, "y": 0, "flags": 4}, + {"matrix": [6, 7], "x": 116, "y": 15, "flags": 4}, + {"matrix": [6, 0], "x": 123, "y": 26, "flags": 4}, + {"matrix": [6, 2], "x": 126, "y": 38, "flags": 4}, + {"matrix": [6, 4], "x": 134, "y": 49, "flags": 4}, + {"matrix": [9, 5], "x": 145, "y": 61, "flags": 4}, + {"matrix": [10, 6], "x": 141, "y": 0, "flags": 4}, + {"matrix": [7, 7], "x": 130, "y": 15, "flags": 4}, + {"matrix": [7, 0], "x": 137, "y": 26, "flags": 4}, + {"matrix": [7, 2], "x": 141, "y": 38, "flags": 4}, + {"matrix": [7, 4], "x": 148, "y": 49, "flags": 4}, + {"matrix": [9, 2], "x": 159, "y": 61, "flags": 4}, + {"matrix": [10, 7], "x": 155, "y": 0, "flags": 4}, + {"matrix": [8, 7], "x": 145, "y": 15, "flags": 4}, + {"matrix": [8, 0], "x": 152, "y": 26, "flags": 4}, + {"matrix": [8, 2], "x": 155, "y": 38, "flags": 4}, + {"matrix": [8, 5], "x": 163, "y": 49, "flags": 4}, + {"matrix": [10, 3], "x": 170, "y": 0, "flags": 4}, + {"matrix": [8, 6], "x": 159, "y": 15, "flags": 4}, + {"matrix": [8, 1], "x": 166, "y": 26, "flags": 4}, + {"matrix": [8, 3], "x": 170, "y": 38, "flags": 4}, + {"matrix": [0, 4], "x": 173, "y": 61, "flags": 4}, + {"matrix": [10, 5], "x": 184, "y": 0, "flags": 4}, + {"matrix": [2, 3], "x": 18, "y": 49, "flags": 4}, + {"x": 0, "y": 8, "flags": 2}, + {"x": 224, "y": 8, "flags": 2}, + {"matrix": [9, 7], "x": 202, "y": 0, "flags": 4}, + {"x": 0, "y": 15, "flags": 2}, + {"x": 224, "y": 15, "flags": 2}, + {"matrix": [6, 5], "x": 224, "y": 15, "flags": 4}, + {"x": 0, "y": 21, "flags": 2}, + {"x": 224, "y": 21, "flags": 2}, + {"matrix": [1, 5], "x": 224, "y": 26, "flags": 4}, + {"x": 0, "y": 28, "flags": 2}, + {"x": 224, "y": 28, "flags": 2}, + {"matrix": [6, 6], "x": 173, "y": 15, "flags": 4}, + {"matrix": [0, 5], "x": 220, "y": 64, "flags": 4}, + {"x": 0, "y": 35, "flags": 2}, + {"x": 224, "y": 35, "flags": 2}, + {"matrix": [7, 5], "x": 224, "y": 49, "flags": 4}, + {"x": 0, "y": 42, "flags": 2}, + {"x": 224, "y": 42, "flags": 2}, + {"matrix": [10, 1], "x": 195, "y": 15, "flags": 4}, + {"matrix": [2, 5], "x": 224, "y": 38, "flags": 4}, + {"x": 0, "y": 48, "flags": 2}, + {"x": 224, "y": 48, "flags": 2}, + {"matrix": [6, 1], "x": 181, "y": 26, "flags": 4}, + {"matrix": [9, 1], "x": 182, "y": 49, "flags": 4}, + {"x": 0, "y": 55, "flags": 2}, + {"x": 224, "y": 55, "flags": 2}, + {"matrix": [3, 5], "x": 206, "y": 52, "flags": 4}, + {"matrix": [8, 4], "x": 184, "y": 38, "flags": 4}, + {"matrix": [0, 3], "x": 191, "y": 64, "flags": 4}, + {"matrix": [10, 4], "x": 201, "y": 26, "flags": 4}, + {"matrix": [7, 3], "x": 206, "y": 64, "flags": 4} + ] + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/gopolar/gg86/gg86.c b/keyboards/gopolar/gg86/gg86.c index 52e1434f00..3aa1d608a8 100644 --- a/keyboards/gopolar/gg86/gg86.c +++ b/keyboards/gopolar/gg86/gg86.c @@ -25,37 +25,6 @@ #include #include -led_config_t g_led_config = { { - { 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, NO_LED, 74, 73, 72 }, - { 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 }, - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38 }, - { 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, NO_LED, 37, NO_LED, NO_LED, NO_LED }, - { 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, NO_LED, 10, NO_LED }, - { 0, 1, 2, NO_LED, NO_LED, 3, NO_LED, NO_LED, NO_LED, NO_LED, 4, 5, 6, NO_LED, 7, 8, 9 } -}, { - // Key matrix (0 -> 87) - {3 , 64}, {19 , 64}, {36 , 64}, {91 , 64}, {146, 64}, {162, 64}, {179, 64}, {198, 64}, {211, 64}, {224, 64}, - {211, 52}, {182, 52}, {170, 52}, {146, 52}, {133, 52}, {120, 52}, {107, 52}, {94 , 52}, {81 , 52}, {68 , 52}, {55 , 52}, {42 , 52}, {29 , 52}, {16 , 52}, {2 , 52}, - {2 , 41}, {23 , 41}, {36 , 41}, {49 , 41}, {62 , 41}, {75 , 41}, {88 , 41}, {101, 41}, {114, 41}, {127, 41}, {140, 41}, {153, 41}, {174, 41}, - {224, 29}, {211, 29}, {198, 29}, {179, 29}, {162, 29}, {149, 29}, {136, 29}, {123, 29}, {110, 29}, {97 , 29}, {84 , 29}, {71 , 29}, {58 , 29}, {45 , 29}, {32 , 29}, {19 , 29}, {3 , 29}, - {0 , 17}, {13 , 17}, {26 , 17}, {39 , 17}, {52 , 17}, {65 , 17}, {78 , 17}, {91 , 17}, {104, 17}, {117, 17}, {130, 17}, {143, 17}, {156, 17}, {175, 17}, {198, 17}, {211, 17}, {224, 17}, - {224, 0}, {211, 0}, {198, 0}, {182, 0}, {169, 0}, {156, 0}, {143, 0}, {123, 0}, {110, 0}, {97 , 0}, {84 , 0}, {65 , 0}, {52 , 0}, {39 , 0}, {26 , 0}, {0 , 0}, - - // Underglow (88 -> 99) - {1 , 6}, {50 , 6}, {89 , 6}, {135, 6}, {176, 6}, {198, 6}, {221, 55}, {192, 58}, {138, 59}, {96 , 61}, {42 , 59}, {7 , 60}, -}, { - // Key matrix (0 -> 87) - 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, - 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, - 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - - // Underglow (88 -> 99) - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -} }; - bool process_record_kb(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QK_RGB_MATRIX_TOGGLE: @@ -114,7 +83,7 @@ bool rgb_matrix_indicators_kb(void) { #endif #ifdef OLED_ENABLE - uint16_t startup_timer; + uint16_t startup_timer; oled_rotation_t oled_init_kb(oled_rotation_t rotation) { startup_timer = timer_read(); @@ -129,7 +98,7 @@ bool rgb_matrix_indicators_kb(void) { render_logo(); } else { finished_logo = true; - + if (!oled_task_user()) { return false; } diff --git a/keyboards/gopolar/gg86/keyboard.json b/keyboards/gopolar/gg86/keyboard.json index 3412a7c63c..dc182f6977 100644 --- a/keyboards/gopolar/gg86/keyboard.json +++ b/keyboards/gopolar/gg86/keyboard.json @@ -59,6 +59,108 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [5, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 19, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 36, "y": 64, "flags": 1}, + {"matrix": [5, 5], "x": 91, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 146, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 162, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 179, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 4}, + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 4}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 182, "y": 52, "flags": 1}, + {"matrix": [4, 12], "x": 170, "y": 52, "flags": 1}, + {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 52, "flags": 4}, + {"matrix": [4, 0], "x": 2, "y": 52, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 41, "flags": 8}, + {"matrix": [3, 1], "x": 23, "y": 41, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 41, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 41, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 41, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 41, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 41, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 41, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 41, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 41, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 41, "flags": 4}, + {"matrix": [3, 11], "x": 153, "y": 41, "flags": 4}, + {"matrix": [3, 13], "x": 174, "y": 41, "flags": 1}, + {"matrix": [2, 16], "x": 224, "y": 29, "flags": 4}, + {"matrix": [2, 15], "x": 211, "y": 29, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 29, "flags": 4}, + {"matrix": [2, 13], "x": 179, "y": 29, "flags": 4}, + {"matrix": [2, 12], "x": 162, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 149, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 136, "y": 29, "flags": 4}, + {"matrix": [2, 9], "x": 123, "y": 29, "flags": 4}, + {"matrix": [2, 8], "x": 110, "y": 29, "flags": 4}, + {"matrix": [2, 7], "x": 97, "y": 29, "flags": 4}, + {"matrix": [2, 6], "x": 84, "y": 29, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 29, "flags": 4}, + {"matrix": [2, 4], "x": 58, "y": 29, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 29, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 29, "flags": 4}, + {"matrix": [2, 1], "x": 19, "y": 29, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 29, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 17, "flags": 4}, + {"matrix": [1, 1], "x": 13, "y": 17, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 17, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 17, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 17, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 17, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 17, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 17, "flags": 4}, + {"matrix": [1, 12], "x": 156, "y": 17, "flags": 4}, + {"matrix": [1, 13], "x": 175, "y": 17, "flags": 1}, + {"matrix": [1, 14], "x": 198, "y": 17, "flags": 4}, + {"matrix": [1, 15], "x": 211, "y": 17, "flags": 4}, + {"matrix": [1, 16], "x": 224, "y": 17, "flags": 4}, + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 8}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 182, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 169, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 156, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 123, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 65, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 39, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 26, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"x": 1, "y": 6, "flags": 2}, + {"x": 50, "y": 6, "flags": 2}, + {"x": 89, "y": 6, "flags": 2}, + {"x": 135, "y": 6, "flags": 2}, + {"x": 176, "y": 6, "flags": 2}, + {"x": 198, "y": 6, "flags": 2}, + {"x": 221, "y": 55, "flags": 2}, + {"x": 192, "y": 58, "flags": 2}, + {"x": 138, "y": 59, "flags": 2}, + {"x": 96, "y": 61, "flags": 2}, + {"x": 42, "y": 59, "flags": 2}, + {"x": 7, "y": 60, "flags": 2} + ], "max_brightness": 150 }, "matrix_pins": { From 3a29cdbd7d451e470c00b137152794fdfbd8056e Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:01:17 -0600 Subject: [PATCH 11/95] Migrate `g_led_config` to DD (K6) (#25607) --- keyboards/keychron/v6/ansi/ansi.c | 30 ----- keyboards/keychron/v6/ansi/keyboard.json | 112 +++++++++++++++++ .../keychron/v6/ansi_encoder/ansi_encoder.c | 33 ----- .../keychron/v6/ansi_encoder/keyboard.json | 116 ++++++++++++++++- keyboards/keychron/v6/iso/iso.c | 33 ----- keyboards/keychron/v6/iso/keyboard.json | 117 +++++++++++++++++- .../keychron/v6/iso_encoder/iso_encoder.c | 33 ----- .../keychron/v6/iso_encoder/keyboard.json | 117 +++++++++++++++++- keyboards/keychron/v7/ansi/ansi.c | 30 ----- keyboards/keychron/v7/ansi/keyboard.json | 76 ++++++++++++ keyboards/keychron/v7/iso/iso.c | 30 ----- keyboards/keychron/v7/iso/keyboard.json | 77 ++++++++++++ keyboards/keychron/v8/ansi/ansi.c | 30 ----- keyboards/keychron/v8/ansi/keyboard.json | 73 +++++++++++ .../keychron/v8/ansi_encoder/ansi_encoder.c | 30 ----- .../keychron/v8/ansi_encoder/keyboard.json | 73 +++++++++++ keyboards/keychron/v8/iso/iso.c | 30 ----- keyboards/keychron/v8/iso/keyboard.json | 74 +++++++++++ .../keychron/v8/iso_encoder/iso_encoder.c | 30 ----- .../keychron/v8/iso_encoder/keyboard.json | 74 +++++++++++ 20 files changed, 900 insertions(+), 318 deletions(-) diff --git a/keyboards/keychron/v6/ansi/ansi.c b/keyboards/keychron/v6/ansi/ansi.c index 2e055e57af..c8dc8c95c6 100644 --- a/keyboards/keychron/v6/ansi/ansi.c +++ b/keyboards/keychron/v6/ansi/ansi.c @@ -139,34 +139,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA12, CB10_CA12, CB11_CA12}, {1, CB12_CA9, CB10_CA9, CB11_CA9}, }; - -#define __ NO_LED - -led_config_t g_led_config = { - { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, __, 13, 14, 15, 39, 40, 16 }, - { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 17 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 18 }, - { 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, __, 73, 60, 77, 76, 74, 75, 19 }, - { 78, __, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, __, 89, 93, 90, 107, 91, 92, __ }, - { 94, 95, 96, __, __, __, 97, __, __, __, 98, 99, 100, 101, 102, 103, 104, 105, 106, __ }, - }, - { - {0,0}, {21,0}, {31,0}, {42,0}, {52,0}, {68,0}, {78,0}, {89,0}, {99,0}, {115,0}, {125,0}, {136,0}, {146,0}, {159,0}, {169,0}, {180,0}, {193,0}, {203,0}, {214,0}, {224,0}, - {0,15}, {10,15}, {21,15}, {31,15}, {42,15}, {52,15}, {63,15}, {73,15}, {83,15}, {94,15}, {104,15}, {115,15}, {125,15}, {141,15}, {159,15}, {169,15}, {180,15}, {193,15}, {203,15}, {214,15}, {224,15}, - {3,27}, {16,27}, {26,27}, {36,27}, {47,27}, {57,27}, {68,27}, {78,27}, {89,27}, {99,27}, {109,27}, {120,27}, {130,27}, {143,27}, {159,27}, {169,27}, {180,27}, {193,27}, {203,27}, {214,27}, - {4,40}, {18,40}, {29,40}, {39,40}, {50,40}, {60,40}, {70,40}, {81,40}, {91,40}, {102,40}, {112,40}, {123,40}, {139,40}, {193,40}, {203,40}, {214,40}, {224,34}, - {7,52}, {23,52}, {34,52}, {44,52}, {55,52}, {65,52}, {76,52}, {86,52}, {96,52}, {107,52}, {117,52}, {137,52}, {169,52}, {193,52}, {203,52}, {214,52}, - {1,64}, {14,64}, {27,64}, {66,64}, {105,64}, {118,64}, {131,64}, {145,64}, {159,64}, {169,64}, {180,64}, {198,64}, {214,64}, {224,58}, - }, - { - 1, 1, 1, 1, 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, 1, 1, 1, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v6/ansi/keyboard.json b/keyboards/keychron/v6/ansi/keyboard.json index e68f3cdec8..6733c196b7 100644 --- a/keyboards/keychron/v6/ansi/keyboard.json +++ b/keyboards/keychron/v6/ansi/keyboard.json @@ -18,6 +18,118 @@ "rgb_matrix": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 21, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 31, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 52, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 68, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 89, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 99, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 115, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 136, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 146, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 159, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 180, "y": 0, "flags": 1}, + {"matrix": [0, 19], "x": 193, "y": 0, "flags": 1}, + {"matrix": [1, 19], "x": 203, "y": 0, "flags": 1}, + {"matrix": [2, 19], "x": 214, "y": 0, "flags": 1}, + {"matrix": [3, 19], "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": [1, 2], "x": 21, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 31, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 63, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 94, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 115, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 141, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 159, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 169, "y": 15, "flags": 1}, + {"matrix": [1, 16], "x": 180, "y": 15, "flags": 1}, + {"matrix": [1, 17], "x": 193, "y": 15, "flags": 8}, + {"matrix": [1, 18], "x": 203, "y": 15, "flags": 4}, + {"matrix": [0, 17], "x": 214, "y": 15, "flags": 4}, + {"matrix": [0, 18], "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": [2, 2], "x": 26, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 57, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 68, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 78, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 89, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 99, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 109, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 120, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 130, "y": 27, "flags": 4}, + {"matrix": [2, 13], "x": 143, "y": 27, "flags": 4}, + {"matrix": [2, 14], "x": 159, "y": 27, "flags": 1}, + {"matrix": [2, 15], "x": 169, "y": 27, "flags": 1}, + {"matrix": [2, 16], "x": 180, "y": 27, "flags": 1}, + {"matrix": [2, 17], "x": 193, "y": 27, "flags": 4}, + {"matrix": [2, 18], "x": 203, "y": 27, "flags": 4}, + {"matrix": [3, 14], "x": 214, "y": 27, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 18, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 29, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 39, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 50, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 81, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 91, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 102, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 123, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 139, "y": 40, "flags": 1}, + {"matrix": [3, 17], "x": 193, "y": 40, "flags": 4}, + {"matrix": [3, 18], "x": 203, "y": 40, "flags": 4}, + {"matrix": [3, 16], "x": 214, "y": 40, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 34, "flags": 4}, + {"matrix": [4, 0], "x": 7, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 23, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 34, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 44, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 65, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 76, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 86, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 117, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 137, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 169, "y": 52, "flags": 1}, + {"matrix": [4, 17], "x": 193, "y": 52, "flags": 4}, + {"matrix": [4, 18], "x": 203, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 214, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 27, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 66, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 105, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 118, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 145, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 159, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 17], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 18], "x": 214, "y": 64, "flags": 4}, + {"matrix": [4, 16], "x": 224, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_108": { "layout": [ diff --git a/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c index 1ebf947912..fa08ec41aa 100644 --- a/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c @@ -141,37 +141,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA12, CB10_CA12, CB11_CA12}, {1, CB12_CA9, CB10_CA9, CB11_CA9}, }; - -#define __ NO_LED - -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, 39, 40, 16 }, - { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 17 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 18 }, - { 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, __, 73, 60, 77, 76, 74, 75, 19 }, - { 78, __, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, __, 89, 93, 90, 107, 91, 92, __ }, - { 94, 95, 96, __, __, __, 97, __, __, __, 98, 99, 100, 101, 102, 103, 104, 105, 106, __ }, - }, - { - // LED Index to Physical Position - {0,0}, {13,0}, {24,0}, {34,0}, {45,0}, {57,0}, {68,0}, {78,0}, {89,0}, {102,0}, {112,0}, {123,0}, {133,0}, {159,0}, {169,0}, {180,0}, {193,0}, {203,0}, {214,0}, {224,0}, - {0,15}, {10,15}, {21,15}, {31,15}, {42,15}, {52,15}, {63,15}, {73,15}, {83,15}, {94,15}, {104,15}, {115,15}, {125,15}, {141,15}, {159,15}, {169,15}, {180,15}, {193,15}, {203,15}, {214,15}, {224,15}, - {3,27}, {16,27}, {26,27}, {36,27}, {47,27}, {57,27}, {68,27}, {78,27}, {89,27}, {99,27}, {109,27}, {120,27}, {130,27}, {143,27}, {159,27}, {169,27}, {180,27}, {193,27}, {203,27}, {214,27}, - {4,40}, {18,40}, {29,40}, {39,40}, {50,40}, {60,40}, {70,40}, {81,40}, {91,40}, {102,40}, {112,40}, {123,40}, {139,40}, {193,40}, {203,40}, {214,40}, {224,34}, - {7,52}, {23,52}, {34,52}, {44,52}, {55,52}, {65,52}, {76,52}, {86,52}, {96,52}, {107,52}, {117,52}, {137,52}, {169,52}, {193,52}, {203,52}, {214,52}, - {1,64}, {14,64}, {27,64}, {66,64}, {105,64}, {118,64}, {131,64}, {145,64}, {159,64}, {169,64}, {180,64}, {198,64}, {214,64}, {224,58}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 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, 1, 1, 1, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v6/ansi_encoder/keyboard.json b/keyboards/keychron/v6/ansi_encoder/keyboard.json index 6ccc6d415b..3427c3e633 100644 --- a/keyboards/keychron/v6/ansi_encoder/keyboard.json +++ b/keyboards/keychron/v6/ansi_encoder/keyboard.json @@ -8,9 +8,6 @@ "pid": "0x0361", "device_version": "1.0.0" }, - "rgb_matrix": { - "driver": "snled27351" - }, "encoder": { "rotary": [ {"pin_a": "C14", "pin_b": "A2"} @@ -27,6 +24,119 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "driver": "snled27351", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 13, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 57, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 68, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 89, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 102, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 123, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 159, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 180, "y": 0, "flags": 1}, + {"matrix": [0, 19], "x": 193, "y": 0, "flags": 1}, + {"matrix": [1, 19], "x": 203, "y": 0, "flags": 1}, + {"matrix": [2, 19], "x": 214, "y": 0, "flags": 1}, + {"matrix": [3, 19], "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": [1, 2], "x": 21, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 31, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 63, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 94, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 115, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 141, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 159, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 169, "y": 15, "flags": 1}, + {"matrix": [1, 16], "x": 180, "y": 15, "flags": 1}, + {"matrix": [1, 17], "x": 193, "y": 15, "flags": 8}, + {"matrix": [1, 18], "x": 203, "y": 15, "flags": 4}, + {"matrix": [0, 17], "x": 214, "y": 15, "flags": 4}, + {"matrix": [0, 18], "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": [2, 2], "x": 26, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 57, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 68, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 78, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 89, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 99, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 109, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 120, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 130, "y": 27, "flags": 4}, + {"matrix": [2, 13], "x": 143, "y": 27, "flags": 4}, + {"matrix": [2, 14], "x": 159, "y": 27, "flags": 1}, + {"matrix": [2, 15], "x": 169, "y": 27, "flags": 1}, + {"matrix": [2, 16], "x": 180, "y": 27, "flags": 1}, + {"matrix": [2, 17], "x": 193, "y": 27, "flags": 4}, + {"matrix": [2, 18], "x": 203, "y": 27, "flags": 4}, + {"matrix": [3, 14], "x": 214, "y": 27, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 18, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 29, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 39, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 50, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 81, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 91, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 102, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 123, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 139, "y": 40, "flags": 1}, + {"matrix": [3, 17], "x": 193, "y": 40, "flags": 4}, + {"matrix": [3, 18], "x": 203, "y": 40, "flags": 4}, + {"matrix": [3, 16], "x": 214, "y": 40, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 34, "flags": 4}, + {"matrix": [4, 0], "x": 7, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 23, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 34, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 44, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 65, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 76, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 86, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 117, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 137, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 169, "y": 52, "flags": 1}, + {"matrix": [4, 17], "x": 193, "y": 52, "flags": 4}, + {"matrix": [4, 18], "x": 203, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 214, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 27, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 66, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 105, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 118, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 145, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 159, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 17], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 18], "x": 214, "y": 64, "flags": 4}, + {"matrix": [4, 16], "x": 224, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_109": { "layout": [ diff --git a/keyboards/keychron/v6/iso/iso.c b/keyboards/keychron/v6/iso/iso.c index cc9dbd8c23..0675e47a3b 100644 --- a/keyboards/keychron/v6/iso/iso.c +++ b/keyboards/keychron/v6/iso/iso.c @@ -142,37 +142,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA12, CB10_CA12, CB11_CA12}, {1, CB12_CA9, CB10_CA9, CB11_CA9}, }; - -#define __ NO_LED - -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, 39, 40, 16 }, - { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 17 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 73, 54, 55, 56, 57, 58, 18 }, - { 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, __, 72, 59, 77, 76, 74, 75, 19 }, - { 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, __, 90, 94, 91, 108, 92, 93, __ }, - { 95, 96, 97, __, __, __, 98, __, __, __, 99, 100, 101, 102, 103, 104, 105, 106, 107, __ }, - }, - { - // LED Index to Physical Position - {0,0}, {21,0}, {31,0}, {42,0}, {52,0}, {68,0}, {78,0}, {89,0}, {99,0}, {115,0}, {125,0}, {136,0}, {146,0}, {159,0}, {169,0}, {180,0}, {193,0}, {203,0}, {214,0}, {224,0}, - {0,15}, {10,15}, {21,15}, {31,15}, {42,15}, {52,15}, {63,15}, {73,15}, {83,15}, {94,15}, {104,15}, {115,15}, {125,15}, {141,15}, {159,15}, {169,15}, {180,15}, {193,15}, {203,15}, {214,15}, {224,15}, - {3,27}, {16,27}, {26,27}, {36,27}, {47,27}, {57,27}, {68,27}, {78,27}, {89,27}, {99,27}, {109,27}, {120,27}, {130,27}, {159,27}, {169,27}, {180,27}, {193,27}, {203,27}, {214,27}, - {4,40}, {18,40}, {29,40}, {39,40}, {50,40}, {60,40}, {70,40}, {81,40}, {91,40}, {102,40}, {112,40}, {123,40}, {133,40}, {147,36}, {193,40}, {203,40}, {214,40}, {224,34}, - {1,52}, {13,52}, {23,52}, {34,52}, {44,52}, {55,52}, {65,52}, {76,52}, {86,52}, {96,52}, {107,52}, {117,52}, {137,52}, {169,52}, {193,52}, {203,52}, {214,52}, - {1,64}, {14,64}, {27,64}, {66,64}, {105,64}, {118,64}, {131,64}, {145,64}, {159,64}, {169,64}, {180,64}, {198,64}, {214,64}, {224,58}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 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, 1, 1, 1, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v6/iso/keyboard.json b/keyboards/keychron/v6/iso/keyboard.json index e2f17e4f6e..9310919456 100644 --- a/keyboards/keychron/v6/iso/keyboard.json +++ b/keyboards/keychron/v6/iso/keyboard.json @@ -8,9 +8,6 @@ "pid": "0x0362", "device_version": "1.0.0" }, - "rgb_matrix": { - "driver": "snled27351" - }, "processor": "STM32L432", "bootloader": "stm32-dfu", "features": { @@ -21,6 +18,120 @@ "rgb_matrix": true, "dip_switch": true }, + "rgb_matrix": { + "driver": "snled27351", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 21, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 31, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 52, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 68, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 89, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 99, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 115, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 136, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 146, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 159, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 180, "y": 0, "flags": 1}, + {"matrix": [0, 19], "x": 193, "y": 0, "flags": 1}, + {"matrix": [1, 19], "x": 203, "y": 0, "flags": 1}, + {"matrix": [2, 19], "x": 214, "y": 0, "flags": 1}, + {"matrix": [3, 19], "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": [1, 2], "x": 21, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 31, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 63, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 94, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 115, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 141, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 159, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 169, "y": 15, "flags": 1}, + {"matrix": [1, 16], "x": 180, "y": 15, "flags": 1}, + {"matrix": [1, 17], "x": 193, "y": 15, "flags": 8}, + {"matrix": [1, 18], "x": 203, "y": 15, "flags": 4}, + {"matrix": [0, 17], "x": 214, "y": 15, "flags": 4}, + {"matrix": [0, 18], "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": [2, 2], "x": 26, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 57, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 68, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 78, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 89, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 99, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 109, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 120, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 130, "y": 27, "flags": 4}, + {"matrix": [2, 14], "x": 159, "y": 27, "flags": 1}, + {"matrix": [2, 15], "x": 169, "y": 27, "flags": 1}, + {"matrix": [2, 16], "x": 180, "y": 27, "flags": 1}, + {"matrix": [2, 17], "x": 193, "y": 27, "flags": 4}, + {"matrix": [2, 18], "x": 203, "y": 27, "flags": 4}, + {"matrix": [3, 14], "x": 214, "y": 27, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 18, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 29, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 39, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 50, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 81, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 91, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 102, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 123, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 133, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 147, "y": 36, "flags": 1}, + {"matrix": [3, 17], "x": 193, "y": 40, "flags": 4}, + {"matrix": [3, 18], "x": 203, "y": 40, "flags": 4}, + {"matrix": [3, 16], "x": 214, "y": 40, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 34, "flags": 4}, + {"matrix": [4, 0], "x": 1, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 13, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 23, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 34, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 44, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 65, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 76, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 86, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 117, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 137, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 169, "y": 52, "flags": 1}, + {"matrix": [4, 17], "x": 193, "y": 52, "flags": 4}, + {"matrix": [4, 18], "x": 203, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 214, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 27, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 66, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 105, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 118, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 145, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 159, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 17], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 18], "x": 214, "y": 64, "flags": 4}, + {"matrix": [4, 16], "x": 224, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_109": { "layout": [ diff --git a/keyboards/keychron/v6/iso_encoder/iso_encoder.c b/keyboards/keychron/v6/iso_encoder/iso_encoder.c index f1a8e18acf..0675e47a3b 100644 --- a/keyboards/keychron/v6/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v6/iso_encoder/iso_encoder.c @@ -142,37 +142,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA12, CB10_CA12, CB11_CA12}, {1, CB12_CA9, CB10_CA9, CB11_CA9}, }; - -#define __ NO_LED - -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, 39, 40, 16 }, - { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 17 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 73, 54, 55, 56, 57, 58, 18 }, - { 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, __, 72, 59, 77, 76, 74, 75, 19 }, - { 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, __, 90, 94, 91, 108, 92, 93, __ }, - { 95, 96, 97, __, __, __, 98, __, __, __, 99, 100, 101, 102, 103, 104, 105, 106, 107, __ }, - }, - { - // LED Index to Physical Position - {0,0}, {13,0}, {24,0}, {34,0}, {45,0}, {57,0}, {68,0}, {78,0}, {89,0}, {102,0}, {112,0}, {123,0}, {133,0}, {159,0}, {169,0}, {180,0}, {193,0}, {203,0}, {214,0}, {224,0}, - {0,15}, {10,15}, {21,15}, {31,15}, {42,15}, {52,15}, {63,15}, {73,15}, {83,15}, {94,15}, {104,15}, {115,15}, {125,15}, {141,15}, {159,15}, {169,15}, {180,15}, {193,15}, {203,15}, {214,15}, {224,15}, - {3,27}, {16,27}, {26,27}, {36,27}, {47,27}, {57,27}, {68,27}, {78,27}, {89,27}, {99,27}, {109,27}, {120,27}, {130,27}, {159,27}, {169,27}, {180,27}, {193,27}, {203,27}, {214,27}, - {4,40}, {18,40}, {29,40}, {39,40}, {50,40}, {60,40}, {70,40}, {81,40}, {91,40}, {102,40}, {112,40}, {123,40}, {133,40}, {147,36}, {193,40}, {203,40}, {214,40}, {224,34}, - {1,52}, {13,52}, {23,52}, {34,52}, {44,52}, {55,52}, {65,52}, {76,52}, {86,52}, {96,52}, {107,52}, {117,52}, {137,52}, {169,52}, {193,52}, {203,52}, {214,52}, - {1,64}, {14,64}, {27,64}, {66,64}, {105,64}, {118,64}, {131,64}, {145,64}, {159,64}, {169,64}, {180,64}, {198,64}, {214,64}, {224,58}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 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, 1, 1, 1, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v6/iso_encoder/keyboard.json b/keyboards/keychron/v6/iso_encoder/keyboard.json index d7469b54e0..858c33a692 100644 --- a/keyboards/keychron/v6/iso_encoder/keyboard.json +++ b/keyboards/keychron/v6/iso_encoder/keyboard.json @@ -8,9 +8,6 @@ "pid": "0x0363", "device_version": "1.0.0" }, - "rgb_matrix": { - "driver": "snled27351" - }, "encoder": { "rotary": [ {"pin_a": "C14", "pin_b": "A2"} @@ -27,6 +24,120 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "driver": "snled27351", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 13, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 57, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 68, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 89, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 102, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 123, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 159, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 180, "y": 0, "flags": 1}, + {"matrix": [0, 19], "x": 193, "y": 0, "flags": 1}, + {"matrix": [1, 19], "x": 203, "y": 0, "flags": 1}, + {"matrix": [2, 19], "x": 214, "y": 0, "flags": 1}, + {"matrix": [3, 19], "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": [1, 2], "x": 21, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 31, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 63, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 94, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 115, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 141, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 159, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 169, "y": 15, "flags": 1}, + {"matrix": [1, 16], "x": 180, "y": 15, "flags": 1}, + {"matrix": [1, 17], "x": 193, "y": 15, "flags": 8}, + {"matrix": [1, 18], "x": 203, "y": 15, "flags": 4}, + {"matrix": [0, 17], "x": 214, "y": 15, "flags": 4}, + {"matrix": [0, 18], "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": [2, 2], "x": 26, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 57, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 68, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 78, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 89, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 99, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 109, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 120, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 130, "y": 27, "flags": 4}, + {"matrix": [2, 14], "x": 159, "y": 27, "flags": 1}, + {"matrix": [2, 15], "x": 169, "y": 27, "flags": 1}, + {"matrix": [2, 16], "x": 180, "y": 27, "flags": 1}, + {"matrix": [2, 17], "x": 193, "y": 27, "flags": 4}, + {"matrix": [2, 18], "x": 203, "y": 27, "flags": 4}, + {"matrix": [3, 14], "x": 214, "y": 27, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 18, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 29, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 39, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 50, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 81, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 91, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 102, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 123, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 133, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 147, "y": 36, "flags": 1}, + {"matrix": [3, 17], "x": 193, "y": 40, "flags": 4}, + {"matrix": [3, 18], "x": 203, "y": 40, "flags": 4}, + {"matrix": [3, 16], "x": 214, "y": 40, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 34, "flags": 4}, + {"matrix": [4, 0], "x": 1, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 13, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 23, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 34, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 44, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 65, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 76, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 86, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 117, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 137, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 169, "y": 52, "flags": 1}, + {"matrix": [4, 17], "x": 193, "y": 52, "flags": 4}, + {"matrix": [4, 18], "x": 203, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 214, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 27, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 66, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 105, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 118, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 145, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 159, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 17], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 18], "x": 214, "y": 64, "flags": 4}, + {"matrix": [4, 16], "x": 224, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_110": { "layout": [ diff --git a/keyboards/keychron/v7/ansi/ansi.c b/keyboards/keychron/v7/ansi/ansi.c index 4d0bedff09..f246a16910 100644 --- a/keyboards/keychron/v7/ansi/ansi.c +++ b/keyboards/keychron/v7/ansi/ansi.c @@ -104,34 +104,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA15, CB4_CA15, CB5_CA15}, {1, CB6_CA16, CB4_CA16, CB5_CA16}, }; - -#define __ NO_LED - -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 }, - }, - { - // LED Index to Physical Position - {0,0}, {14,0}, {28,0}, {42,0}, {56,0}, {70,0}, {84,0}, {98,0}, {112,0}, {126,0}, {140,0}, {154,0}, {168,0}, {189,0}, {210,0}, {224,0}, - {4,16}, {21,16}, {35,16}, {49,16}, {63,16}, {77,16}, {91,16}, {105,16}, {119,16}, {133,16}, {147,16}, {161,16}, {175,16}, {192,16}, {210,16}, {224,16}, - {5,32}, {25,32}, {38,32}, {52,32}, {66,32}, {80,32}, {94,32}, {108,32}, {122,32}, {136,32}, {150,32}, {164,32}, {187,32}, {210,32}, {224,32}, - {9,48}, {32,48}, {45,48}, {59,48}, {73,48}, {87,48}, {101,48}, {115,48}, {129,48}, {143,48}, {157,48}, {184,48}, {210,48}, {224,48}, - {2,64}, {19,64}, {37,64}, {89,64}, {140,64}, {154,64}, {168,64}, {182,64}, {196,64}, {210,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v7/ansi/keyboard.json b/keyboards/keychron/v7/ansi/keyboard.json index 503aea5ab6..0fccc7b336 100644 --- a/keyboards/keychron/v7/ansi/keyboard.json +++ b/keyboards/keychron/v7/ansi/keyboard.json @@ -23,6 +23,82 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 14, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 70, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 98, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 126, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 154, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 168, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 189, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 210, "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": 21, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 35, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 49, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 63, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 77, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 91, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 105, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 119, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 133, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 161, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 175, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 210, "y": 16, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 5, "y": 32, "flags": 8}, + {"matrix": [2, 1], "x": 25, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 38, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 94, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 122, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 136, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 150, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 164, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 187, "y": 32, "flags": 1}, + {"matrix": [2, 14], "x": 210, "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": 32, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 59, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 73, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 87, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 115, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 129, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 143, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 157, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 184, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 210, "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": 19, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 37, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 89, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 140, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 154, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 168, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 182, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 196, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 15], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_72": { "layout": [ diff --git a/keyboards/keychron/v7/iso/iso.c b/keyboards/keychron/v7/iso/iso.c index cdd2d97209..0de3fb4894 100644 --- a/keyboards/keychron/v7/iso/iso.c +++ b/keyboards/keychron/v7/iso/iso.c @@ -105,34 +105,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA15, CB4_CA15, CB5_CA15}, {1, CB6_CA16, CB4_CA16, CB5_CA16}, }; - -#define __ NO_LED - -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, 44, 29, 30 }, - { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, __, 43, 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 }, - }, - { - // LED Index to Physical Position - {0,0}, {14,0}, {28,0}, {42,0}, {56,0}, {70,0}, {84,0}, {98,0}, {112,0}, {126,0}, {140,0}, {154,0}, {168,0}, {189,0}, {210,0}, {224,0}, - {4,16}, {21,16}, {35,16}, {49,16}, {63,16}, {77,16}, {91,16}, {105,16}, {119,16}, {133,16}, {147,16}, {161,16}, {175,16}, {210,16}, {224,16}, - {5,32}, {25,32}, {38,32}, {52,32}, {66,32}, {80,32}, {94,32}, {108,32}, {122,32}, {136,32}, {150,32}, {164,32}, {178,32}, {197,27}, {210,32}, {224,32}, - {2,48}, {18,48}, {32,48}, {45,48}, {59,48}, {73,48}, {87,48}, {101,48}, {115,48}, {129,48}, {143,48}, {157,48}, {184,48}, {210,48}, {224,48}, - {2,64}, {19,64}, {37,64}, {89,64}, {140,64}, {154,64}, {168,64}, {182,64}, {196,64}, {210,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v7/iso/keyboard.json b/keyboards/keychron/v7/iso/keyboard.json index ec4cd06e6b..4e57beb985 100644 --- a/keyboards/keychron/v7/iso/keyboard.json +++ b/keyboards/keychron/v7/iso/keyboard.json @@ -23,6 +23,83 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 14, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 70, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 98, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 126, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 154, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 168, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 189, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 210, "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": 21, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 35, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 49, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 63, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 77, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 91, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 105, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 119, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 133, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 161, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 175, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 210, "y": 16, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 5, "y": 32, "flags": 8}, + {"matrix": [2, 1], "x": 25, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 38, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 94, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 122, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 136, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 150, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 164, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 178, "y": 32, "flags": 4}, + {"matrix": [1, 13], "x": 197, "y": 27, "flags": 1}, + {"matrix": [2, 14], "x": 210, "y": 32, "flags": 1}, + {"matrix": [2, 15], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 18, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 59, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 73, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 87, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 115, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 129, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 143, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 157, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 184, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 210, "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": 19, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 37, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 89, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 140, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 154, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 168, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 182, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 196, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 15], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_73": { "layout": [ diff --git a/keyboards/keychron/v8/ansi/ansi.c b/keyboards/keychron/v8/ansi/ansi.c index fcc232511f..82c6e533a1 100644 --- a/keyboards/keychron/v8/ansi/ansi.c +++ b/keyboards/keychron/v8/ansi/ansi.c @@ -102,34 +102,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA2, CB4_CA2, CB5_CA2}, {1, CB6_CA1, CB4_CA1, CB5_CA1} }; - -#define __ NO_LED - -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 }, - }, - { - // LED Index to Physical Position - {7,1}, {20,1}, {33,0}, {48,3}, {61,6}, {74,8 }, {87,11}, {106,11}, {119,8}, {132,6}, {145,3}, {160,0}, {173,1}, {193,1}, {220,0}, - {7,14}, {24,14}, {39,14}, {52,17}, {65,20}, {78,22}, {103,25}, {116,22}, {129,20}, {142,17}, {155,14}, {170,14}, {183,14}, {200,14}, {222,16}, - {6,27}, {24,27}, {39,28}, {52,30}, {65,33}, {78,36}, {109,37}, {122,34}, {135,32}, {148,29}, {162,27}, {176,27}, {197,27}, {224,29}, - {7,40}, {28,40}, {43,42}, {56,44}, {69,47}, {82,50}, {102,52}, {115,49}, {128,46}, {141,44}, {154,41}, {169,40}, {187,40}, {209,43}, - {0,53}, {17,53}, {42,55}, {65,60}, {86,64}, {107,64}, {131,59}, {156,54}, {196,56}, {209,56}, {222,56}, - }, - { - // RGB LED Index to Flag - 1, 4, 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, 4, 4, 1, - 8, 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, 1, 1, 4, 1, 1, 4, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v8/ansi/keyboard.json b/keyboards/keychron/v8/ansi/keyboard.json index 392783e024..9f54c60c3d 100644 --- a/keyboards/keychron/v8/ansi/keyboard.json +++ b/keyboards/keychron/v8/ansi/keyboard.json @@ -23,6 +23,79 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 7, "y": 1, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 1, "flags": 4}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 3, "flags": 4}, + {"matrix": [0, 4], "x": 61, "y": 6, "flags": 4}, + {"matrix": [0, 5], "x": 74, "y": 8, "flags": 4}, + {"matrix": [0, 6], "x": 87, "y": 11, "flags": 4}, + {"matrix": [0, 7], "x": 106, "y": 11, "flags": 4}, + {"matrix": [0, 8], "x": 119, "y": 8, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 6, "flags": 4}, + {"matrix": [0, 10], "x": 145, "y": 3, "flags": 4}, + {"matrix": [0, 11], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 173, "y": 1, "flags": 4}, + {"matrix": [0, 13], "x": 193, "y": 1, "flags": 1}, + {"matrix": [0, 14], "x": 220, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "y": 14, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 14, "flags": 4}, + {"matrix": [1, 2], "x": 39, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 65, "y": 20, "flags": 4}, + {"matrix": [1, 5], "x": 78, "y": 22, "flags": 4}, + {"matrix": [1, 6], "x": 103, "y": 25, "flags": 4}, + {"matrix": [1, 7], "x": 116, "y": 22, "flags": 4}, + {"matrix": [1, 8], "x": 129, "y": 20, "flags": 4}, + {"matrix": [1, 9], "x": 142, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 155, "y": 14, "flags": 4}, + {"matrix": [1, 11], "x": 170, "y": 14, "flags": 4}, + {"matrix": [1, 12], "x": 183, "y": 14, "flags": 4}, + {"matrix": [1, 13], "x": 200, "y": 14, "flags": 4}, + {"matrix": [1, 14], "x": 222, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 27, "flags": 8}, + {"matrix": [2, 1], "x": 24, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 39, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 33, "flags": 4}, + {"matrix": [2, 5], "x": 78, "y": 36, "flags": 4}, + {"matrix": [2, 7], "x": 109, "y": 37, "flags": 4}, + {"matrix": [2, 8], "x": 122, "y": 34, "flags": 4}, + {"matrix": [2, 9], "x": 135, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 148, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 162, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 27, "flags": 4}, + {"matrix": [2, 13], "x": 197, "y": 27, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 29, "flags": 1}, + {"matrix": [3, 0], "x": 7, "y": 40, "flags": 1}, + {"matrix": [3, 2], "x": 28, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 43, "y": 42, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 44, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 47, "flags": 4}, + {"matrix": [3, 6], "x": 82, "y": 50, "flags": 4}, + {"matrix": [3, 7], "x": 102, "y": 52, "flags": 4}, + {"matrix": [3, 8], "x": 115, "y": 49, "flags": 4}, + {"matrix": [3, 9], "x": 128, "y": 46, "flags": 4}, + {"matrix": [3, 10], "x": 141, "y": 44, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 41, "flags": 4}, + {"matrix": [3, 12], "x": 169, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 187, "y": 40, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 43, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 53, "flags": 1}, + {"matrix": [4, 1], "x": 17, "y": 53, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 55, "flags": 1}, + {"matrix": [4, 3], "x": 65, "y": 60, "flags": 4}, + {"matrix": [4, 6], "x": 86, "y": 64, "flags": 1}, + {"matrix": [4, 7], "x": 107, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 131, "y": 59, "flags": 4}, + {"matrix": [4, 9], "x": 156, "y": 54, "flags": 1}, + {"matrix": [4, 12], "x": 196, "y": 56, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 56, "flags": 1}, + {"matrix": [4, 14], "x": 222, "y": 56, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_69": { "layout": [ diff --git a/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c index fcc232511f..82c6e533a1 100644 --- a/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c @@ -102,34 +102,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA2, CB4_CA2, CB5_CA2}, {1, CB6_CA1, CB4_CA1, CB5_CA1} }; - -#define __ NO_LED - -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 }, - }, - { - // LED Index to Physical Position - {7,1}, {20,1}, {33,0}, {48,3}, {61,6}, {74,8 }, {87,11}, {106,11}, {119,8}, {132,6}, {145,3}, {160,0}, {173,1}, {193,1}, {220,0}, - {7,14}, {24,14}, {39,14}, {52,17}, {65,20}, {78,22}, {103,25}, {116,22}, {129,20}, {142,17}, {155,14}, {170,14}, {183,14}, {200,14}, {222,16}, - {6,27}, {24,27}, {39,28}, {52,30}, {65,33}, {78,36}, {109,37}, {122,34}, {135,32}, {148,29}, {162,27}, {176,27}, {197,27}, {224,29}, - {7,40}, {28,40}, {43,42}, {56,44}, {69,47}, {82,50}, {102,52}, {115,49}, {128,46}, {141,44}, {154,41}, {169,40}, {187,40}, {209,43}, - {0,53}, {17,53}, {42,55}, {65,60}, {86,64}, {107,64}, {131,59}, {156,54}, {196,56}, {209,56}, {222,56}, - }, - { - // RGB LED Index to Flag - 1, 4, 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, 4, 4, 1, - 8, 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, 1, 1, 4, 1, 1, 4, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v8/ansi_encoder/keyboard.json b/keyboards/keychron/v8/ansi_encoder/keyboard.json index 6d3257feec..9ea3464084 100644 --- a/keyboards/keychron/v8/ansi_encoder/keyboard.json +++ b/keyboards/keychron/v8/ansi_encoder/keyboard.json @@ -29,6 +29,79 @@ }, "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 7, "y": 1, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 1, "flags": 4}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 3, "flags": 4}, + {"matrix": [0, 4], "x": 61, "y": 6, "flags": 4}, + {"matrix": [0, 5], "x": 74, "y": 8, "flags": 4}, + {"matrix": [0, 6], "x": 87, "y": 11, "flags": 4}, + {"matrix": [0, 7], "x": 106, "y": 11, "flags": 4}, + {"matrix": [0, 8], "x": 119, "y": 8, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 6, "flags": 4}, + {"matrix": [0, 10], "x": 145, "y": 3, "flags": 4}, + {"matrix": [0, 11], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 173, "y": 1, "flags": 4}, + {"matrix": [0, 13], "x": 193, "y": 1, "flags": 1}, + {"matrix": [0, 14], "x": 220, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "y": 14, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 14, "flags": 4}, + {"matrix": [1, 2], "x": 39, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 65, "y": 20, "flags": 4}, + {"matrix": [1, 5], "x": 78, "y": 22, "flags": 4}, + {"matrix": [1, 6], "x": 103, "y": 25, "flags": 4}, + {"matrix": [1, 7], "x": 116, "y": 22, "flags": 4}, + {"matrix": [1, 8], "x": 129, "y": 20, "flags": 4}, + {"matrix": [1, 9], "x": 142, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 155, "y": 14, "flags": 4}, + {"matrix": [1, 11], "x": 170, "y": 14, "flags": 4}, + {"matrix": [1, 12], "x": 183, "y": 14, "flags": 4}, + {"matrix": [1, 13], "x": 200, "y": 14, "flags": 4}, + {"matrix": [1, 14], "x": 222, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 27, "flags": 8}, + {"matrix": [2, 1], "x": 24, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 39, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 33, "flags": 4}, + {"matrix": [2, 5], "x": 78, "y": 36, "flags": 4}, + {"matrix": [2, 7], "x": 109, "y": 37, "flags": 4}, + {"matrix": [2, 8], "x": 122, "y": 34, "flags": 4}, + {"matrix": [2, 9], "x": 135, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 148, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 162, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 27, "flags": 4}, + {"matrix": [2, 13], "x": 197, "y": 27, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 29, "flags": 1}, + {"matrix": [3, 0], "x": 7, "y": 40, "flags": 1}, + {"matrix": [3, 2], "x": 28, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 43, "y": 42, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 44, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 47, "flags": 4}, + {"matrix": [3, 6], "x": 82, "y": 50, "flags": 4}, + {"matrix": [3, 7], "x": 102, "y": 52, "flags": 4}, + {"matrix": [3, 8], "x": 115, "y": 49, "flags": 4}, + {"matrix": [3, 9], "x": 128, "y": 46, "flags": 4}, + {"matrix": [3, 10], "x": 141, "y": 44, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 41, "flags": 4}, + {"matrix": [3, 12], "x": 169, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 187, "y": 40, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 43, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 53, "flags": 1}, + {"matrix": [4, 1], "x": 17, "y": 53, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 55, "flags": 1}, + {"matrix": [4, 3], "x": 65, "y": 60, "flags": 4}, + {"matrix": [4, 6], "x": 86, "y": 64, "flags": 1}, + {"matrix": [4, 7], "x": 107, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 131, "y": 59, "flags": 4}, + {"matrix": [4, 9], "x": 156, "y": 54, "flags": 1}, + {"matrix": [4, 12], "x": 196, "y": 56, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 56, "flags": 1}, + {"matrix": [4, 14], "x": 222, "y": 56, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_69": { "layout": [ diff --git a/keyboards/keychron/v8/iso/iso.c b/keyboards/keychron/v8/iso/iso.c index 4658969a10..8a84081a69 100644 --- a/keyboards/keychron/v8/iso/iso.c +++ b/keyboards/keychron/v8/iso/iso.c @@ -102,34 +102,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA2, CB4_CA2, CB5_CA2}, {1, CB6_CA1, CB4_CA1, CB5_CA1} }; - -#define __ NO_LED - -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, 42, 28 }, - { 29, 30, 31, 32, 33, 34, __, 35, 36, 37, 38, 39, 40, 41, 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 }, - }, - { - // LED Index to Physical Position - {7,1}, {20,1}, {33,0}, {48,3}, {61,6}, {74,8}, {87,11}, {106,11}, {119,8}, {132,6}, {145,3}, {160,0}, {173,1}, {193,1}, {220,0}, - {7,14}, {24,14}, {39,14}, {52,17}, {65,19}, {78,22}, {103,25}, {116,22}, {129,20}, {142,17}, {155,14}, {172,14}, {186,14}, {222,16}, - {6,27}, {24,27}, {39,27}, {52,30}, {65,33}, {78,35}, {109,37}, {122,34}, {135,31}, {148,29}, {162,27}, {176,27}, {189,27}, {207,22}, {224,29}, - {0,40}, {15,40}, {28,40}, {43,41}, {56,44}, {69,47}, {82,49}, {102,51}, {115,49}, {128,46}, {141,43}, {154,41}, {169,40}, {187,40}, {209,43}, - {0,52}, {17,52}, {42,54}, {65,59}, {86,63}, {104,64}, {129,59}, {153,54}, {196,56}, {209,56}, {222,59}, - }, - { - // RGB LED Index to Flag - 1, 4, 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, 4, 1, - 8, 4, 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, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v8/iso/keyboard.json b/keyboards/keychron/v8/iso/keyboard.json index 0d10662a00..6efda1a4d7 100644 --- a/keyboards/keychron/v8/iso/keyboard.json +++ b/keyboards/keychron/v8/iso/keyboard.json @@ -23,6 +23,80 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 7, "y": 1, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 1, "flags": 4}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 3, "flags": 4}, + {"matrix": [0, 4], "x": 61, "y": 6, "flags": 4}, + {"matrix": [0, 5], "x": 74, "y": 8, "flags": 4}, + {"matrix": [0, 6], "x": 87, "y": 11, "flags": 4}, + {"matrix": [0, 7], "x": 106, "y": 11, "flags": 4}, + {"matrix": [0, 8], "x": 119, "y": 8, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 6, "flags": 4}, + {"matrix": [0, 10], "x": 145, "y": 3, "flags": 4}, + {"matrix": [0, 11], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 173, "y": 1, "flags": 4}, + {"matrix": [0, 13], "x": 193, "y": 1, "flags": 1}, + {"matrix": [0, 14], "x": 220, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "y": 14, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 14, "flags": 4}, + {"matrix": [1, 2], "x": 39, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 65, "y": 19, "flags": 4}, + {"matrix": [1, 5], "x": 78, "y": 22, "flags": 4}, + {"matrix": [1, 6], "x": 103, "y": 25, "flags": 4}, + {"matrix": [1, 7], "x": 116, "y": 22, "flags": 4}, + {"matrix": [1, 8], "x": 129, "y": 20, "flags": 4}, + {"matrix": [1, 9], "x": 142, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 155, "y": 14, "flags": 4}, + {"matrix": [1, 11], "x": 172, "y": 14, "flags": 4}, + {"matrix": [1, 12], "x": 186, "y": 14, "flags": 4}, + {"matrix": [1, 14], "x": 222, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 27, "flags": 8}, + {"matrix": [2, 1], "x": 24, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 39, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 33, "flags": 4}, + {"matrix": [2, 5], "x": 78, "y": 35, "flags": 4}, + {"matrix": [2, 7], "x": 109, "y": 37, "flags": 4}, + {"matrix": [2, 8], "x": 122, "y": 34, "flags": 4}, + {"matrix": [2, 9], "x": 135, "y": 31, "flags": 4}, + {"matrix": [2, 10], "x": 148, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 162, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 27, "flags": 4}, + {"matrix": [2, 13], "x": 189, "y": 27, "flags": 4}, + {"matrix": [1, 13], "x": 207, "y": 22, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 29, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 40, "flags": 1}, + {"matrix": [3, 1], "x": 15, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 28, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 43, "y": 41, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 44, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 47, "flags": 4}, + {"matrix": [3, 6], "x": 82, "y": 49, "flags": 4}, + {"matrix": [3, 7], "x": 102, "y": 51, "flags": 4}, + {"matrix": [3, 8], "x": 115, "y": 49, "flags": 4}, + {"matrix": [3, 9], "x": 128, "y": 46, "flags": 4}, + {"matrix": [3, 10], "x": 141, "y": 43, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 41, "flags": 4}, + {"matrix": [3, 12], "x": 169, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 187, "y": 40, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 43, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 17, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 54, "flags": 1}, + {"matrix": [4, 3], "x": 65, "y": 59, "flags": 1}, + {"matrix": [4, 6], "x": 86, "y": 63, "flags": 1}, + {"matrix": [4, 7], "x": 104, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 129, "y": 59, "flags": 1}, + {"matrix": [4, 9], "x": 153, "y": 54, "flags": 1}, + {"matrix": [4, 12], "x": 196, "y": 56, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 56, "flags": 1}, + {"matrix": [4, 14], "x": 222, "y": 59, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_70": { "layout": [ diff --git a/keyboards/keychron/v8/iso_encoder/iso_encoder.c b/keyboards/keychron/v8/iso_encoder/iso_encoder.c index 4658969a10..8a84081a69 100644 --- a/keyboards/keychron/v8/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v8/iso_encoder/iso_encoder.c @@ -102,34 +102,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA2, CB4_CA2, CB5_CA2}, {1, CB6_CA1, CB4_CA1, CB5_CA1} }; - -#define __ NO_LED - -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, 42, 28 }, - { 29, 30, 31, 32, 33, 34, __, 35, 36, 37, 38, 39, 40, 41, 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 }, - }, - { - // LED Index to Physical Position - {7,1}, {20,1}, {33,0}, {48,3}, {61,6}, {74,8}, {87,11}, {106,11}, {119,8}, {132,6}, {145,3}, {160,0}, {173,1}, {193,1}, {220,0}, - {7,14}, {24,14}, {39,14}, {52,17}, {65,19}, {78,22}, {103,25}, {116,22}, {129,20}, {142,17}, {155,14}, {172,14}, {186,14}, {222,16}, - {6,27}, {24,27}, {39,27}, {52,30}, {65,33}, {78,35}, {109,37}, {122,34}, {135,31}, {148,29}, {162,27}, {176,27}, {189,27}, {207,22}, {224,29}, - {0,40}, {15,40}, {28,40}, {43,41}, {56,44}, {69,47}, {82,49}, {102,51}, {115,49}, {128,46}, {141,43}, {154,41}, {169,40}, {187,40}, {209,43}, - {0,52}, {17,52}, {42,54}, {65,59}, {86,63}, {104,64}, {129,59}, {153,54}, {196,56}, {209,56}, {222,59}, - }, - { - // RGB LED Index to Flag - 1, 4, 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, 4, 1, - 8, 4, 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, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v8/iso_encoder/keyboard.json b/keyboards/keychron/v8/iso_encoder/keyboard.json index d446d213d4..d3db01d61f 100644 --- a/keyboards/keychron/v8/iso_encoder/keyboard.json +++ b/keyboards/keychron/v8/iso_encoder/keyboard.json @@ -29,6 +29,80 @@ }, "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 7, "y": 1, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 1, "flags": 4}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 3, "flags": 4}, + {"matrix": [0, 4], "x": 61, "y": 6, "flags": 4}, + {"matrix": [0, 5], "x": 74, "y": 8, "flags": 4}, + {"matrix": [0, 6], "x": 87, "y": 11, "flags": 4}, + {"matrix": [0, 7], "x": 106, "y": 11, "flags": 4}, + {"matrix": [0, 8], "x": 119, "y": 8, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 6, "flags": 4}, + {"matrix": [0, 10], "x": 145, "y": 3, "flags": 4}, + {"matrix": [0, 11], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 173, "y": 1, "flags": 4}, + {"matrix": [0, 13], "x": 193, "y": 1, "flags": 1}, + {"matrix": [0, 14], "x": 220, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "y": 14, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 14, "flags": 4}, + {"matrix": [1, 2], "x": 39, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 65, "y": 19, "flags": 4}, + {"matrix": [1, 5], "x": 78, "y": 22, "flags": 4}, + {"matrix": [1, 6], "x": 103, "y": 25, "flags": 4}, + {"matrix": [1, 7], "x": 116, "y": 22, "flags": 4}, + {"matrix": [1, 8], "x": 129, "y": 20, "flags": 4}, + {"matrix": [1, 9], "x": 142, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 155, "y": 14, "flags": 4}, + {"matrix": [1, 11], "x": 172, "y": 14, "flags": 4}, + {"matrix": [1, 12], "x": 186, "y": 14, "flags": 4}, + {"matrix": [1, 14], "x": 222, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 27, "flags": 8}, + {"matrix": [2, 1], "x": 24, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 39, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 33, "flags": 4}, + {"matrix": [2, 5], "x": 78, "y": 35, "flags": 4}, + {"matrix": [2, 7], "x": 109, "y": 37, "flags": 4}, + {"matrix": [2, 8], "x": 122, "y": 34, "flags": 4}, + {"matrix": [2, 9], "x": 135, "y": 31, "flags": 4}, + {"matrix": [2, 10], "x": 148, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 162, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 27, "flags": 4}, + {"matrix": [2, 13], "x": 189, "y": 27, "flags": 4}, + {"matrix": [1, 13], "x": 207, "y": 22, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 29, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 40, "flags": 1}, + {"matrix": [3, 1], "x": 15, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 28, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 43, "y": 41, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 44, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 47, "flags": 4}, + {"matrix": [3, 6], "x": 82, "y": 49, "flags": 4}, + {"matrix": [3, 7], "x": 102, "y": 51, "flags": 4}, + {"matrix": [3, 8], "x": 115, "y": 49, "flags": 4}, + {"matrix": [3, 9], "x": 128, "y": 46, "flags": 4}, + {"matrix": [3, 10], "x": 141, "y": 43, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 41, "flags": 4}, + {"matrix": [3, 12], "x": 169, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 187, "y": 40, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 43, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 17, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 54, "flags": 1}, + {"matrix": [4, 3], "x": 65, "y": 59, "flags": 1}, + {"matrix": [4, 6], "x": 86, "y": 63, "flags": 1}, + {"matrix": [4, 7], "x": 104, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 129, "y": 59, "flags": 1}, + {"matrix": [4, 9], "x": 153, "y": 54, "flags": 1}, + {"matrix": [4, 12], "x": 196, "y": 56, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 56, "flags": 1}, + {"matrix": [4, 14], "x": 222, "y": 59, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_70": { "layout": [ From ceefde5ec853469895b8877c150548182087b3ed Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:02:01 -0600 Subject: [PATCH 12/95] Migrate `g_led_config` to DD (K5) (#25606) --- keyboards/keychron/v3/ansi/ansi.c | 33 ------ keyboards/keychron/v3/ansi/keyboard.json | 91 +++++++++++++++ .../keychron/v3/ansi_encoder/ansi_encoder.c | 33 ------ .../keychron/v3/ansi_encoder/keyboard.json | 91 +++++++++++++++ keyboards/keychron/v3/iso/iso.c | 33 ------ keyboards/keychron/v3/iso/keyboard.json | 92 +++++++++++++++ .../keychron/v3/iso_encoder/iso_encoder.c | 33 ------ .../keychron/v3/iso_encoder/keyboard.json | 92 +++++++++++++++ keyboards/keychron/v3/jis/jis.c | 33 ------ keyboards/keychron/v3/jis/keyboard.json | 95 ++++++++++++++++ .../keychron/v3/jis_encoder/jis_encoder.c | 33 ------ .../keychron/v3/jis_encoder/keyboard.json | 96 ++++++++++++++++ keyboards/keychron/v4/ansi/ansi.c | 30 ----- keyboards/keychron/v4/ansi/keyboard.json | 65 +++++++++++ keyboards/keychron/v4/iso/iso.c | 30 ----- keyboards/keychron/v4/iso/keyboard.json | 66 +++++++++++ keyboards/keychron/v5/ansi/ansi.c | 33 ------ keyboards/keychron/v5/ansi/keyboard.json | 104 +++++++++++++++++ .../keychron/v5/ansi_encoder/ansi_encoder.c | 33 ------ .../keychron/v5/ansi_encoder/keyboard.json | 102 +++++++++++++++++ keyboards/keychron/v5/iso/iso.c | 33 ------ keyboards/keychron/v5/iso/keyboard.json | 105 ++++++++++++++++++ .../keychron/v5/iso_encoder/iso_encoder.c | 33 ------ .../keychron/v5/iso_encoder/keyboard.json | 103 +++++++++++++++++ 24 files changed, 1102 insertions(+), 390 deletions(-) diff --git a/keyboards/keychron/v3/ansi/ansi.c b/keyboards/keychron/v3/ansi/ansi.c index 7c47678619..6f35f14a9a 100644 --- a/keyboards/keychron/v3/ansi/ansi.c +++ b/keyboards/keychron/v3/ansi/ansi.c @@ -118,37 +118,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA16, CB4_CA16, CB5_CA16}, {1, CB3_CA15, CB1_CA15, CB2_CA15}, }; - -#define __ NO_LED - -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 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, - { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 }, - { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 49, 62, 15, 32 }, - { 63, __, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, __, 74, 86, 75 }, - { 76, 77, 78, __, __, __, 79, __, __, __, 80, 81, 82, 83, 84, 85 }, - }, - { - // LED Index to Physical Position - {0,0}, {26,0}, {39,0}, {52,0}, {65,0}, {85,0}, {98,0}, {111,0}, {124,0}, {143,0}, {156,0}, {169,0}, {182,0}, {198,0}, {211,0}, {224,0}, - {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {176,15}, {198,15}, {211,15}, {224,15}, - {3,28}, {20,28}, {33,28}, {46,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {179,28}, {198,28}, {211,28}, {224,28}, - {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {174,40}, - {8,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {171,52}, {211,52}, - {2,64}, {18,64}, {34,64}, {83,64}, {131,64}, {148,64}, {164,64}, {180,64}, {198,64}, {211,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 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, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v3/ansi/keyboard.json b/keyboards/keychron/v3/ansi/keyboard.json index d388456227..59a94564d1 100644 --- a/keyboards/keychron/v3/ansi/keyboard.json +++ b/keyboards/keychron/v3/ansi/keyboard.json @@ -18,6 +18,97 @@ }, "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 26, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 39, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 65, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 85, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 98, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 111, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 124, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 156, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 182, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 176, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 33, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 46, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4}, + {"matrix": [2, 13], "x": 179, "y": 28, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1}, + {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1}, + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 174, "y": 40, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 171, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_tkl_ansi": { "layout": [ diff --git a/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c index d85708937a..d80b9990c4 100644 --- a/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c @@ -119,37 +119,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA16, CB4_CA16, CB5_CA16}, {1, CB3_CA15, CB1_CA15, CB2_CA15}, }; - -#define __ NO_LED - -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 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, - { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 }, - { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 49, 62, 15, 32 }, - { 63, __, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, __, 74, 86, 75 }, - { 76, 77, 78, __, __, __, 79, __, __, __, 80, 81, 82, 83, 84, 85 }, - }, - { - // LED Index to Physical Position - {0,0}, {16,0}, {29,0}, {42,0}, {55,0}, {71,0}, {84,0}, {97,0}, {110,0}, {126,0}, {139,0}, {152,0}, {165,0}, {198,0}, {211,0}, {224,0}, - {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {176,15}, {198,15}, {211,15}, {224,15}, - {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {179,28}, {198,28}, {211,28}, {224,28}, - {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {174,40}, - {8,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {171,52}, {211,52}, - {2,64}, {18,64}, {34,64}, {83,64}, {131,64}, {148,64}, {164,64}, {180,64}, {198,64}, {211,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 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, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v3/ansi_encoder/keyboard.json b/keyboards/keychron/v3/ansi_encoder/keyboard.json index 5134b47d7e..47f5bff0aa 100644 --- a/keyboards/keychron/v3/ansi_encoder/keyboard.json +++ b/keyboards/keychron/v3/ansi_encoder/keyboard.json @@ -24,6 +24,97 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 55, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 71, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 97, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 126, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 139, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 152, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 165, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 176, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4}, + {"matrix": [2, 13], "x": 179, "y": 28, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1}, + {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1}, + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 174, "y": 40, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 171, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_tkl_f13_ansi": { "layout": [ diff --git a/keyboards/keychron/v3/iso/iso.c b/keyboards/keychron/v3/iso/iso.c index 83798392c6..f8d8e22e10 100644 --- a/keyboards/keychron/v3/iso/iso.c +++ b/keyboards/keychron/v3/iso/iso.c @@ -119,37 +119,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA16, CB4_CA16, CB5_CA16}, {1, CB3_CA15, CB1_CA15, CB2_CA15}, }; - -#define __ NO_LED - -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 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, - { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 62, 46, 47 }, - { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 48, 61, 15, 32 }, - { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, __, 75, 87, 76 }, - { 77, 78, 79, __, __, __, 80, __, __, __, 81, 82, 83, 84, 85, 86 }, - }, - { - // LED Index to Physical Position - {0,0}, {26,0}, {39,0}, {52,0}, {65,0}, {84,0}, {97,0}, {111,0}, {124,0}, {143,0}, {156,0}, {169,0}, {182,0}, {198,0}, {211,0}, {224,0}, - {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {176,15}, {198,15}, {211,15}, {224,15}, - {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {198,28}, {211,28}, {224,28}, - {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {166,40}, {183,36}, - {2,52}, {16,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {171,52}, {211,52}, - {2,64}, {18,64}, {34,64}, {83,64}, {131,64}, {148,64}, {164,64}, {180,64}, {198,64}, {211,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 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, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 8, 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, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v3/iso/keyboard.json b/keyboards/keychron/v3/iso/keyboard.json index 40a8139ccc..6bae7e1e7e 100644 --- a/keyboards/keychron/v3/iso/keyboard.json +++ b/keyboards/keychron/v3/iso/keyboard.json @@ -19,6 +19,98 @@ }, "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 26, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 39, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 65, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 97, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 111, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 124, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 156, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 182, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 176, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1}, + {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1}, + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 166, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 183, "y": 36, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 16, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 171, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_tkl_iso": { "layout": [ diff --git a/keyboards/keychron/v3/iso_encoder/iso_encoder.c b/keyboards/keychron/v3/iso_encoder/iso_encoder.c index ef0567dbe1..f8d8e22e10 100644 --- a/keyboards/keychron/v3/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v3/iso_encoder/iso_encoder.c @@ -119,37 +119,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA16, CB4_CA16, CB5_CA16}, {1, CB3_CA15, CB1_CA15, CB2_CA15}, }; - -#define __ NO_LED - -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 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, - { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 62, 46, 47 }, - { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 48, 61, 15, 32 }, - { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, __, 75, 87, 76 }, - { 77, 78, 79, __, __, __, 80, __, __, __, 81, 82, 83, 84, 85, 86 }, - }, - { - // LED Index to Physical Position - {0,0}, {16,0}, {29,0}, {42,0}, {55,0}, {71,0}, {84,0}, {97,0}, {110,0}, {126,0}, {139,0}, {152,0}, {165,0}, {198,0}, {211,0}, {224,0}, - {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {176,15}, {198,15}, {211,15}, {224,15}, - {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {198,28}, {211,28}, {224,28}, - {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {166,40}, {183,36}, - {2,52}, {16,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {171,52}, {211,52}, - {2,64}, {18,64}, {34,64}, {83,64}, {131,64}, {148,64}, {164,64}, {180,64}, {198,64}, {211,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 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, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 8, 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, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v3/iso_encoder/keyboard.json b/keyboards/keychron/v3/iso_encoder/keyboard.json index 8b4f0a9d00..6f039c0dff 100644 --- a/keyboards/keychron/v3/iso_encoder/keyboard.json +++ b/keyboards/keychron/v3/iso_encoder/keyboard.json @@ -24,6 +24,98 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 55, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 71, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 97, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 126, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 139, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 152, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 165, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 176, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1}, + {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1}, + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 166, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 183, "y": 36, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 16, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 171, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_tkl_f13_iso": { "layout": [ diff --git a/keyboards/keychron/v3/jis/jis.c b/keyboards/keychron/v3/jis/jis.c index c04827dc5d..cec71b83d5 100644 --- a/keyboards/keychron/v3/jis/jis.c +++ b/keyboards/keychron/v3/jis/jis.c @@ -122,37 +122,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA16, CB4_CA16, CB5_CA16}, // Down {1, CB3_CA15, CB1_CA15, CB2_CA15}, // Right }; - -# define __ NO_LED - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 30, 13, 14 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32 }, - { 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 63, 47, 48 }, - { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 49, 62, 15, 33 }, - { 64, __, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 90, 77 }, - { 78, 79, 80, 81, __, __, 82, __, __, 83, 84, 85, 86, 87, 88, 89 }, - }, - { - // LED Index to Physical Position - {0,0}, {26,0}, {39,0}, {52,0}, {65,0}, {84,0}, {97,0}, {111,0}, {124,0}, {143,0}, {156,0}, {169,0}, {182,0}, {198,0}, {211,0}, {224,0}, - {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {182,15}, {169,15}, {198,15}, {211,15}, {224,15}, - {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {198,28}, {211,28}, {224,28}, - {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {166,40}, {183,36}, - {8,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {159,52}, {177,52}, {211,52}, - {2,64}, {16,64}, {31,64}, {45,64}, {81,64}, {119,64}, {135,64}, {151,64}, {166,64}, {180,64}, {198,64}, {211,64}, {224,64} - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 8, 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, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // GB_MATRIX_ENABLE diff --git a/keyboards/keychron/v3/jis/keyboard.json b/keyboards/keychron/v3/jis/keyboard.json index 0bc3a43d0e..526a2e9e27 100644 --- a/keyboards/keychron/v3/jis/keyboard.json +++ b/keyboards/keychron/v3/jis/keyboard.json @@ -18,6 +18,101 @@ }, "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 26, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 39, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 65, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 97, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 111, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 124, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 156, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 182, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 182, "y": 15, "flags": 4}, + {"matrix": [0, 13], "x": 169, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1}, + {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1}, + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 166, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 183, "y": 36, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 12], "x": 159, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 177, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 16, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 31, "y": 64, "flags": 1}, + {"matrix": [5, 3], "x": 45, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 81, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 119, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 135, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 151, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 166, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_jis_91": { "layout": [ diff --git a/keyboards/keychron/v3/jis_encoder/jis_encoder.c b/keyboards/keychron/v3/jis_encoder/jis_encoder.c index bf2018d86f..6e5b99e1c7 100644 --- a/keyboards/keychron/v3/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/v3/jis_encoder/jis_encoder.c @@ -123,37 +123,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA16, CB4_CA16, CB5_CA16}, // Down {1, CB3_CA15, CB1_CA15, CB2_CA15}, // Right }; - -# define __ NO_LED - -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 }, - { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33 }, - { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 64, 48, 49 }, - { 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 50, 63, 16, 34 }, - { 65, __, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 91, 78 }, - { 79, 80, 81, 82, __, 31, 83, __, __, 84, 85, 86, 87, 88, 89, 90 }, - }, - { - // LED Index to Physical Position - {0,0}, {16,0}, {29,0}, {42,0}, {55,0}, {71,0}, {84,0}, {97,0}, {110,0}, {126,0}, {139,0}, {152,0}, {165,0}, {182,0}, {198,0}, {211,0}, {224,0}, - {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {169,15}, {182,15}, {198,15}, {211,15}, {224,15}, - {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {198,28}, {211,28}, {224,28}, - {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {166,40}, {183,36}, - {8,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {159,52}, {177,52}, {211,52}, - {2,64}, {16,64}, {31,64}, {45,64}, {81,64}, {119,64}, {135,64}, {151,64}, {166,64}, {180,64}, {198,64}, {211,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 1, 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, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 8, 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, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v3/jis_encoder/keyboard.json b/keyboards/keychron/v3/jis_encoder/keyboard.json index ab9d6ab2a7..20613e7672 100644 --- a/keyboards/keychron/v3/jis_encoder/keyboard.json +++ b/keyboards/keychron/v3/jis_encoder/keyboard.json @@ -24,6 +24,102 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 55, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 71, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 97, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 126, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 139, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 152, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 165, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 182, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 169, "y": 15, "flags": 4}, + {"matrix": [5, 5], "x": 182, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1}, + {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1}, + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 166, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 183, "y": 36, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 12], "x": 159, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 177, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 16, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 31, "y": 64, "flags": 1}, + {"matrix": [5, 3], "x": 45, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 81, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 119, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 135, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 151, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 166, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_jis_92": { "layout": [ diff --git a/keyboards/keychron/v4/ansi/ansi.c b/keyboards/keychron/v4/ansi/ansi.c index 7368144c8d..4f184c7dd6 100644 --- a/keyboards/keychron/v4/ansi/ansi.c +++ b/keyboards/keychron/v4/ansi/ansi.c @@ -93,34 +93,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {0, CB3_CA15, CB1_CA15, CB2_CA15}, {0, CB3_CA16, CB1_CA16, CB2_CA16}, }; - -#define __ NO_LED - -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 }, - }, - { - // LED Index to Physical Position - {0,0}, {16,0}, {32,0}, {48,0}, {64,0}, {81,0}, {97,0}, {113,0}, {129,0}, {145,0}, {161,0}, {177,0}, {193,0}, {218,0}, - {4,16}, {24,16}, {40,16}, {56,16}, {73,16}, {89,16}, {105,16}, {121,16}, {137,16}, {153,16}, {169,16}, {185,16}, {202,16}, {222,16}, - {6,32}, {28,32}, {44,32}, {60,32}, {77,32}, {93,32}, {109,32}, {125,32}, {141,32}, {157,32}, {173,32}, {189,32}, {216,32}, - {10,48}, {36,48}, {52,48}, {69,48}, {85,48}, {101,48}, {117,48}, {133,48}, {149,48}, {165,48}, {181,48}, {212,48}, - {2,64}, {22,64}, {42,64}, {103,64}, {164,64}, {184,64}, {204,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 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, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v4/ansi/keyboard.json b/keyboards/keychron/v4/ansi/keyboard.json index 7184e32f27..b80d9d8e25 100644 --- a/keyboards/keychron/v4/ansi/keyboard.json +++ b/keyboards/keychron/v4/ansi/keyboard.json @@ -23,6 +23,71 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "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": 81, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 161, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 177, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 193, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 218, "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": 73, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 89, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 105, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 121, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 137, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 153, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 169, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 185, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 202, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 222, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 8}, + {"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": 77, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 93, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 109, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 125, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 141, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 157, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 173, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 189, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 216, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 85, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 101, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 117, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 133, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 149, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 181, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 212, "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, 6], "x": 103, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 164, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 184, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 204, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1} + ] + }, "layout_aliases": { "LAYOUT_ansi_61": "LAYOUT_60_ansi" }, diff --git a/keyboards/keychron/v4/iso/iso.c b/keyboards/keychron/v4/iso/iso.c index dc6a0f44d0..ccea440a47 100644 --- a/keyboards/keychron/v4/iso/iso.c +++ b/keyboards/keychron/v4/iso/iso.c @@ -94,34 +94,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {0, CB3_CA15, CB1_CA15, CB2_CA15}, {0, CB3_CA16, CB1_CA16, CB2_CA16}, }; - -#define __ NO_LED - -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, 40 }, - { 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, __, 39 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, __, 53 }, - { 54, 55, 56, __, __, __, 57, __, __, __, 58, 59, 60, 61 }, - }, - { - // LED Index to Physical Position - {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {81, 0}, { 97, 0}, {113, 0}, {129, 0}, {145, 0}, {161, 0}, {177, 0}, {193, 0}, {218, 0}, - {4,16}, {24,16}, {40,16}, {56,16}, {73,16}, {89,16}, {105,16}, {121,16}, {137,16}, {153,16}, {169,16}, {185,16}, {202,16}, - {6,32}, {28,32}, {44,32}, {60,32}, {77,32}, {93,32}, {109,32}, {125,32}, {141,32}, {157,32}, {173,32}, {189,32}, {206,32}, {224,24}, - {2,48}, {20,48}, {36,48}, {52,48}, {69,48}, {85,48}, {101,48}, {117,48}, {133,48}, {149,48}, {165,48}, {181,48}, {212,48}, - {2,64}, {22,64}, {42,64}, {103,64}, {164,64}, {184,64}, {204,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 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, - 8, 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, 1, 4, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v4/iso/keyboard.json b/keyboards/keychron/v4/iso/keyboard.json index 8077844652..0aa111a858 100644 --- a/keyboards/keychron/v4/iso/keyboard.json +++ b/keyboards/keychron/v4/iso/keyboard.json @@ -23,6 +23,72 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "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": 81, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 161, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 177, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 193, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 218, "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": 73, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 89, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 105, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 121, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 137, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 153, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 169, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 185, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 202, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 8}, + {"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": 77, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 93, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 109, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 125, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 141, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 157, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 173, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 189, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 206, "y": 32, "flags": 4}, + {"matrix": [1, 13], "x": 224, "y": 24, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 85, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 101, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 117, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 133, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 149, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 181, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 212, "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, 6], "x": 103, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 164, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 184, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 204, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1} + ] + }, "layout_aliases": { "LAYOUT_iso_62": "LAYOUT_60_iso" }, diff --git a/keyboards/keychron/v5/ansi/ansi.c b/keyboards/keychron/v5/ansi/ansi.c index b38d5f508f..9e653f36d1 100644 --- a/keyboards/keychron/v5/ansi/ansi.c +++ b/keyboards/keychron/v5/ansi/ansi.c @@ -133,37 +133,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA2, CB10_CA2, CB11_CA2}, {1, CB12_CA7, CB10_CA7, CB11_CA7} }; - -#define __ NO_LED - -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 }, - { 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, __, 33, 34, 35 }, - { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 70, 51, 52, 53 }, - { 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 18, 66, 36, 67, 68, 69 }, - { 71, __, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, __, 82, 83, 84, 85, 86 }, - { 87, 88, 89, __, __, 99, 90, __, __, __, 91, 92, 93, 94, 95, 96, 97, 98 } - }, - { - // LED Index to Physical Position - {0,0}, {12,0}, {24,0}, {36,0}, {48,0}, {60,0}, {72,0}, {84,0}, {97,0}, {109,0}, {121,0}, {133,0}, {145,0}, {157,0}, {169,0}, {188,0}, {200,0}, {212,0}, {224,0}, - {0,15}, {12,15}, {24,15}, {36,15}, {48,15}, {60,15}, {72,15}, {84,15}, {97,15}, {109,15}, {121,15}, {133,15}, {145,15}, {163,15}, {188,15}, {200,15}, {212,15}, {224,15}, - {3,26}, {18,26}, {30,26}, {42,26}, {54,26}, {66,26}, {78,26}, {91,26}, {103,26}, {115,26}, {127,26}, {139,26}, {151,26}, {166,26}, {188,26}, {200,26}, {212,26}, - {5,38}, {21,38}, {33,38}, {45,38}, {57,38}, {69,38}, {81,38}, {94,38}, {106,38}, {118,38}, {130,38}, {142,38}, {161,38}, {188,38}, {200,38}, {212,38}, {224,32}, - {8,49}, {27,49}, {39,49}, {51,49}, {63,49}, {75,49}, {88,49}, {100,49}, {112,49}, {124,49}, {136,49}, {152,49}, {172,52}, {188,49}, {200,49}, {212,49}, - {1,61}, {17,61}, {32,61}, {77,61}, {121,61}, {133,61}, {145,61}, {160,64}, {172,64}, {184,64}, {200,61}, {212,61}, {224,55}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 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, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v5/ansi/keyboard.json b/keyboards/keychron/v5/ansi/keyboard.json index b98302f336..2bf3dfa745 100644 --- a/keyboards/keychron/v5/ansi/keyboard.json +++ b/keyboards/keychron/v5/ansi/keyboard.json @@ -18,6 +18,110 @@ "rgb_matrix": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 12, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 36, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 72, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 97, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 109, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 121, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 145, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 157, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 188, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 200, "y": 0, "flags": 1}, + {"matrix": [0, 17], "x": 212, "y": 0, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 12, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 48, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 60, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 72, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 84, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 97, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 109, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 121, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 133, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 145, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 163, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 188, "y": 15, "flags": 8}, + {"matrix": [1, 16], "x": 200, "y": 15, "flags": 4}, + {"matrix": [1, 17], "x": 212, "y": 15, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 18, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 30, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 54, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 78, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 91, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 103, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 115, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 139, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 151, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 166, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 188, "y": 26, "flags": 4}, + {"matrix": [2, 16], "x": 200, "y": 26, "flags": 4}, + {"matrix": [2, 17], "x": 212, "y": 26, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 21, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 57, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 81, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 94, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 106, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 118, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 130, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 142, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 161, "y": 38, "flags": 1}, + {"matrix": [3, 15], "x": 188, "y": 38, "flags": 4}, + {"matrix": [3, 16], "x": 200, "y": 38, "flags": 4}, + {"matrix": [3, 17], "x": 212, "y": 38, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 8, "y": 49, "flags": 1}, + {"matrix": [4, 2], "x": 27, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 39, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 51, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 63, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 75, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 88, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 100, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 112, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 124, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 152, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 172, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 188, "y": 49, "flags": 4}, + {"matrix": [4, 16], "x": 200, "y": 49, "flags": 4}, + {"matrix": [4, 17], "x": 212, "y": 49, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 17, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 32, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 77, "y": 61, "flags": 1}, + {"matrix": [5, 10], "x": 121, "y": 61, "flags": 1}, + {"matrix": [5, 11], "x": 133, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 145, "y": 61, "flags": 1}, + {"matrix": [5, 13], "x": 160, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 172, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 184, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 200, "y": 61, "flags": 1}, + {"matrix": [5, 17], "x": 212, "y": 61, "flags": 1}, + {"matrix": [5, 5], "x": 224, "y": 55, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_100": { "layout": [ diff --git a/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c index bc68731d7d..e359d85545 100644 --- a/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c @@ -133,37 +133,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA2, CB10_CA2, CB11_CA2}, {1, CB12_CA7, CB10_CA7, CB11_CA7} }; - -#define __ NO_LED - -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 }, - { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, __, 31, 32, 33 }, - { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 68, 49, 50, 51 }, - { 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 16, 64, 34, 65, 66, 67 }, - { 69, __, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, __, 80, 81, 82, 83, 84 }, - { 85, 86, 87, __, __, 97, 88, __, __, __, 89, 90, 91, 92, 93, 94, 95, 96 } - }, - { - // LED Index to Physical Position - {0,0}, {24,0}, {36,0}, {48,0}, {60,0}, {78,0}, {90,0}, {103,0}, {115,0}, {133,0}, {145,0}, {157,0}, {169,0}, {184,0}, {196,0}, {208,0}, {224,0}, - {0,15}, {12,15}, {24,15}, {36,15}, {48,15}, {60,15}, {72,15}, {85,15}, {97,15}, {109,15}, {121,15}, {133,15}, {145,15}, {163,15}, {188,15}, {200,15}, {212,15}, {224,15}, - {3,26}, {18,26}, {30,26}, {42,26}, {54,26}, {66,26}, {78,26}, {91,26}, {103,26}, {115,26}, {127,26}, {139,26}, {151,26}, {166,26}, {188,26}, {200,26}, {212,26}, - {5,38}, {21,38}, {33,38}, {45,38}, {57,38}, {69,38}, {81,38}, {94,38}, {106,38}, {118,38}, {130,38}, {142,38}, {161,38}, {188,38}, {200,38}, {212,38}, {224,32}, - {8,49}, {27,49}, {39,49}, {51,49}, {63,49}, {75,49}, {88,49}, {100,49}, {112,49}, {124,49}, {136,49}, {152,49}, {172,52}, {188,49}, {200,49}, {212,49}, - {1,61}, {17,61}, {32,61}, {77,61}, {121,61}, {133,61}, {145,61}, {160,64}, {172,64}, {184,64}, {200,61}, {212,61}, {224,55}, - }, - { - // RGB LED Index to Flag - 1, 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, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 4, 4, 4, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v5/ansi_encoder/keyboard.json b/keyboards/keychron/v5/ansi_encoder/keyboard.json index af61e4a15e..2ed77789e4 100644 --- a/keyboards/keychron/v5/ansi_encoder/keyboard.json +++ b/keyboards/keychron/v5/ansi_encoder/keyboard.json @@ -24,6 +24,108 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 36, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 90, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 103, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 115, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 145, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 157, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 184, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 196, "y": 0, "flags": 1}, + {"matrix": [0, 17], "x": 208, "y": 0, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 12, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 48, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 60, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 72, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 85, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 97, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 109, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 121, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 133, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 145, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 163, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 188, "y": 15, "flags": 8}, + {"matrix": [1, 16], "x": 200, "y": 15, "flags": 4}, + {"matrix": [1, 17], "x": 212, "y": 15, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 18, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 30, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 54, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 78, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 91, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 103, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 115, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 139, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 151, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 166, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 188, "y": 26, "flags": 4}, + {"matrix": [2, 16], "x": 200, "y": 26, "flags": 4}, + {"matrix": [2, 17], "x": 212, "y": 26, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 21, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 57, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 81, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 94, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 106, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 118, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 130, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 142, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 161, "y": 38, "flags": 1}, + {"matrix": [3, 15], "x": 188, "y": 38, "flags": 4}, + {"matrix": [3, 16], "x": 200, "y": 38, "flags": 4}, + {"matrix": [3, 17], "x": 212, "y": 38, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 8, "y": 49, "flags": 1}, + {"matrix": [4, 2], "x": 27, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 39, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 51, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 63, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 75, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 88, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 100, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 112, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 124, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 152, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 172, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 188, "y": 49, "flags": 4}, + {"matrix": [4, 16], "x": 200, "y": 49, "flags": 4}, + {"matrix": [4, 17], "x": 212, "y": 49, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 17, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 32, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 77, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 121, "y": 61, "flags": 1}, + {"matrix": [5, 11], "x": 133, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 145, "y": 61, "flags": 1}, + {"matrix": [5, 13], "x": 160, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 172, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 184, "y": 64, "flags": 4}, + {"matrix": [5, 16], "x": 200, "y": 61, "flags": 4}, + {"matrix": [5, 17], "x": 212, "y": 61, "flags": 4}, + {"matrix": [5, 5], "x": 224, "y": 55, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_98": { "layout": [ diff --git a/keyboards/keychron/v5/iso/iso.c b/keyboards/keychron/v5/iso/iso.c index d8f5ae329c..7b28c70f7e 100644 --- a/keyboards/keychron/v5/iso/iso.c +++ b/keyboards/keychron/v5/iso/iso.c @@ -134,37 +134,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA2, CB10_CA2, CB11_CA2}, {1, CB12_CA7, CB10_CA7, CB11_CA7} }; - -#define __ NO_LED - -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 }, - { 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, __, 33, 34, 35 }, - { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 66, 70, 50, 51, 52 }, - { 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 18, 65, 36, 67, 68, 69 }, - { 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, __, 83, 84, 85, 86, 87 }, - { 88, 89, 90, __, __, 100, 91, __, __, __, 92, 93, 94, 95, 96, 97, 98, 99 }, - }, - { - // LED Index to Physical Position - {0,0}, {12,0}, {24,0}, {36,0}, {48,0}, {60,0}, {72,0}, {85,0}, {97,0}, {109,0}, {121,0}, {133,0}, {145,0}, {157,0}, {169,0}, {188,0}, {200,0}, {212,0}, {224,0}, - {0,15}, {12,15}, {24,15}, {36,15}, {48,15}, {60,15}, {72,15}, {85,15}, {97,15}, {109,15}, {121,15}, {133,15}, {145,15}, {163,15}, {188,15}, {200,15}, {212,15}, {224,15}, - {3,26}, {18,26}, {30,26}, {42,26}, {54,26}, {66,26}, {78,26}, {91,26}, {103,26}, {115,26}, {127,26}, {139,26}, {151,26}, {188,26}, {200,26}, {212,26}, - {5,38}, {21,38}, {33,38}, {45,38}, {57,38}, {69,38}, {81,38}, {94,38}, {106,38}, {118,38}, {130,38}, {142,38}, {154,38}, {170,34}, {188,38}, {200,38}, {212,38}, {224,32}, - {3,49}, {15,49}, {27,49}, {39,49}, {51,49}, {63,49}, {75,49}, {88,49}, {100,49}, {112,49}, {124,49}, {136,49}, {152,49}, {172,52}, {188,49}, {200,49}, {212,49}, - {1,61}, {17,61}, {32,61}, {77,61}, {121,61}, {133,61}, {145,61}, {160,64}, {172,64}, {184,64}, {200,61}, {212,61}, {224,55}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 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, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 4, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v5/iso/keyboard.json b/keyboards/keychron/v5/iso/keyboard.json index 7e7280d5ac..c8bc9609f5 100644 --- a/keyboards/keychron/v5/iso/keyboard.json +++ b/keyboards/keychron/v5/iso/keyboard.json @@ -18,6 +18,111 @@ "rgb_matrix": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 12, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 36, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 72, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 85, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 97, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 109, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 121, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 145, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 157, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 188, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 200, "y": 0, "flags": 1}, + {"matrix": [0, 17], "x": 212, "y": 0, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 12, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 48, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 60, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 72, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 85, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 97, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 109, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 121, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 133, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 145, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 163, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 188, "y": 15, "flags": 8}, + {"matrix": [1, 16], "x": 200, "y": 15, "flags": 4}, + {"matrix": [1, 17], "x": 212, "y": 15, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 18, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 30, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 54, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 78, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 91, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 103, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 115, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 139, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 151, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 188, "y": 26, "flags": 4}, + {"matrix": [2, 16], "x": 200, "y": 26, "flags": 4}, + {"matrix": [2, 17], "x": 212, "y": 26, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 21, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 57, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 81, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 94, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 106, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 118, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 130, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 142, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 154, "y": 38, "flags": 4}, + {"matrix": [2, 13], "x": 170, "y": 34, "flags": 1}, + {"matrix": [3, 15], "x": 188, "y": 38, "flags": 4}, + {"matrix": [3, 16], "x": 200, "y": 38, "flags": 4}, + {"matrix": [3, 17], "x": 212, "y": 38, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 3, "y": 49, "flags": 1}, + {"matrix": [4, 1], "x": 15, "y": 49, "flags": 4}, + {"matrix": [4, 2], "x": 27, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 39, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 51, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 63, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 75, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 88, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 100, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 112, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 124, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 152, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 172, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 188, "y": 49, "flags": 4}, + {"matrix": [4, 16], "x": 200, "y": 49, "flags": 4}, + {"matrix": [4, 17], "x": 212, "y": 49, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 17, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 32, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 77, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 121, "y": 61, "flags": 1}, + {"matrix": [5, 11], "x": 133, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 145, "y": 61, "flags": 1}, + {"matrix": [5, 13], "x": 160, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 172, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 184, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 200, "y": 61, "flags": 4}, + {"matrix": [5, 17], "x": 212, "y": 61, "flags": 4}, + {"matrix": [5, 5], "x": 224, "y": 55, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_101": { "layout": [ diff --git a/keyboards/keychron/v5/iso_encoder/iso_encoder.c b/keyboards/keychron/v5/iso_encoder/iso_encoder.c index 2d2a458577..005a73d2f9 100644 --- a/keyboards/keychron/v5/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v5/iso_encoder/iso_encoder.c @@ -132,37 +132,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA2, CB10_CA2, CB11_CA2}, {1, CB12_CA7, CB10_CA7, CB11_CA7} }; - -#define __ NO_LED - -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 }, - { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, __, 31, 32, 33 }, - { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 64, 68, 48, 49, 50 }, - { 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 16, 63, 34, 65, 66, 67 }, - { 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, __, 81, 82, 83, 84, 85 }, - { 86, 87, 88, __, __, 98, 89, __, __, __, 90, 91, 92, 93, 94, 95, 96, 97 }, - }, - { - // LED Index to Physical Position - {0,0}, {24,0}, {36,0}, {48,0}, {60,0}, {78,0}, {90,0}, {103,0}, {115,0}, {133,0}, {145,0}, {157,0}, {169,0}, {184,0}, {196,0}, {208,0}, {224,0}, - {0,15}, {12,15}, {24,15}, {36,15}, {48,15}, {60,15}, {72,15}, {85,15}, {97,15}, {109,15}, {121,15}, {133,15}, {145,15}, {163,15}, {188,15}, {200,15}, {212,15}, {224,15}, - {3,26}, {18,26}, {30,26}, {42,26}, {54,26}, {66,26}, {78,26}, {91,26}, {103,26}, {115,26}, {127,26}, {139,26}, {151,26}, {188,26}, {200,26}, {212,26}, - {5,38}, {21,38}, {33,38}, {45,38}, {57,38}, {69,38}, {81,38}, {94,38}, {106,38}, {118,38}, {130,38}, {142,38}, {154,38}, {170,34}, {188,38}, {200,38}, {212,38}, {224,32}, - {3,49}, {15,49}, {27,49}, {39,49}, {51,49}, {63,49}, {75,49}, {88,49}, {100,49}, {112,49}, {124,49}, {136,49}, {152,49}, {172,52}, {188,49}, {200,49}, {212,49}, - {1,61}, {17,61}, {32,61}, {77,61}, {121,61}, {133,61}, {145,61}, {160,64}, {172,64}, {184,64}, {200,61}, {212,61}, {224,55}, - }, - { - // RGB LED Index to Flag - 1, 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, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 4, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v5/iso_encoder/keyboard.json b/keyboards/keychron/v5/iso_encoder/keyboard.json index dfef0a7be7..d6f1b69445 100644 --- a/keyboards/keychron/v5/iso_encoder/keyboard.json +++ b/keyboards/keychron/v5/iso_encoder/keyboard.json @@ -24,6 +24,109 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 36, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 90, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 103, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 115, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 145, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 157, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 184, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 196, "y": 0, "flags": 1}, + {"matrix": [0, 17], "x": 208, "y": 0, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 12, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 48, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 60, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 72, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 85, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 97, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 109, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 121, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 133, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 145, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 163, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 188, "y": 15, "flags": 8}, + {"matrix": [1, 16], "x": 200, "y": 15, "flags": 4}, + {"matrix": [1, 17], "x": 212, "y": 15, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 18, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 30, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 54, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 78, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 91, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 103, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 115, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 139, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 151, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 188, "y": 26, "flags": 4}, + {"matrix": [2, 16], "x": 200, "y": 26, "flags": 4}, + {"matrix": [2, 17], "x": 212, "y": 26, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 21, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 57, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 81, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 94, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 106, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 118, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 130, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 142, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 154, "y": 38, "flags": 4}, + {"matrix": [2, 13], "x": 170, "y": 34, "flags": 1}, + {"matrix": [3, 15], "x": 188, "y": 38, "flags": 4}, + {"matrix": [3, 16], "x": 200, "y": 38, "flags": 4}, + {"matrix": [3, 17], "x": 212, "y": 38, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 3, "y": 49, "flags": 1}, + {"matrix": [4, 1], "x": 15, "y": 49, "flags": 4}, + {"matrix": [4, 2], "x": 27, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 39, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 51, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 63, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 75, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 88, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 100, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 112, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 124, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 152, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 172, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 188, "y": 49, "flags": 4}, + {"matrix": [4, 16], "x": 200, "y": 49, "flags": 4}, + {"matrix": [4, 17], "x": 212, "y": 49, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 17, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 32, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 77, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 121, "y": 61, "flags": 1}, + {"matrix": [5, 11], "x": 133, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 145, "y": 61, "flags": 1}, + {"matrix": [5, 13], "x": 160, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 172, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 184, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 200, "y": 61, "flags": 4}, + {"matrix": [5, 17], "x": 212, "y": 61, "flags": 4}, + {"matrix": [5, 5], "x": 224, "y": 55, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_99": { "layout": [ From 9cd3080e22097d0679cb15f9757577e2c5728550 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:02:15 -0600 Subject: [PATCH 13/95] Migrate `g_led_config` to DD (K4) (#25605) --- keyboards/keychron/v1/ansi/ansi.c | 33 ------- keyboards/keychron/v1/ansi/keyboard.json | 86 ++++++++++++++++++ .../keychron/v1/ansi_encoder/ansi_encoder.c | 33 ------- .../keychron/v1/ansi_encoder/keyboard.json | 86 ++++++++++++++++++ keyboards/keychron/v1/iso/iso.c | 33 ------- keyboards/keychron/v1/iso/keyboard.json | 87 ++++++++++++++++++ .../keychron/v1/iso_encoder/iso_encoder.c | 33 ------- .../keychron/v1/iso_encoder/keyboard.json | 87 ++++++++++++++++++ keyboards/keychron/v1/jis/jis.c | 33 ------- keyboards/keychron/v1/jis/keyboard.json | 90 +++++++++++++++++++ .../keychron/v1/jis_encoder/jis_encoder.c | 33 ------- .../keychron/v1/jis_encoder/keyboard.json | 90 +++++++++++++++++++ keyboards/keychron/v2/ansi/ansi.c | 30 ------- keyboards/keychron/v2/ansi/keyboard.json | 71 +++++++++++++++ .../keychron/v2/ansi_encoder/ansi_encoder.c | 30 ------- .../keychron/v2/ansi_encoder/keyboard.json | 71 +++++++++++++++ keyboards/keychron/v2/iso/iso.c | 30 ------- keyboards/keychron/v2/iso/keyboard.json | 72 +++++++++++++++ .../keychron/v2/iso_encoder/iso_encoder.c | 29 ------ .../keychron/v2/iso_encoder/keyboard.json | 72 +++++++++++++++ keyboards/keychron/v2/jis/jis.c | 30 ------- keyboards/keychron/v2/jis/keyboard.json | 75 ++++++++++++++++ .../keychron/v2/jis_encoder/jis_encoder.c | 30 ------- .../keychron/v2/jis_encoder/keyboard.json | 75 ++++++++++++++++ 24 files changed, 962 insertions(+), 377 deletions(-) diff --git a/keyboards/keychron/v1/ansi/ansi.c b/keyboards/keychron/v1/ansi/ansi.c index a78d5dd4d7..b3b96c26a4 100644 --- a/keyboards/keychron/v1/ansi/ansi.c +++ b/keyboards/keychron/v1/ansi/ansi.c @@ -115,37 +115,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB3_CA15, CB1_CA15, CB2_CA15}, {1, CB3_CA16, CB1_CA16, CB2_CA16}, }; - -#define __ NO_LED - -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 } - }, - { - // LED Index to Physical Position - {0,0}, {18,0}, {33,0}, {48,0}, {62,0}, {81,0}, {95,0}, {110,0}, {125,0}, {143,0}, {158,0}, {173,0}, {187,0}, {206,0}, {224,0}, - {0,15}, {15,15}, {29,15}, {44,15}, {59,15}, {73,15}, {88,15}, {103,15}, {118,15}, {132,15}, {147,15}, {162,15}, {176,15}, {198,15}, {224,15}, - {4,26}, {22,26}, {37,26}, {51,26}, {66,26}, {81,26}, {95,26}, {110,26}, {125,26}, {140,26}, {154,26}, {169,26}, {184,26}, {202,26}, {224,26}, - {6,38}, {26,38}, {40,38}, {55,38}, {70,38}, {84,38}, {99,38}, {114,38}, {129,38}, {143,38}, {158,38}, {173,38}, {196,38}, {224,38}, - {9,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {151,49}, {165,49}, {185,49}, {209,52}, - {2,61}, {20,61}, {39,61}, {94,61}, {147,61}, {162,61}, {176,61}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v1/ansi/keyboard.json b/keyboards/keychron/v1/ansi/keyboard.json index d4bbca78de..09242fb595 100644 --- a/keyboards/keychron/v1/ansi/keyboard.json +++ b/keyboards/keychron/v1/ansi/keyboard.json @@ -18,6 +18,92 @@ "dip_switch": true, "rgb_matrix": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 18, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 62, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 95, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 158, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 187, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 206, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 118, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 162, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 15, "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": 51, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 95, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 110, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 140, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 169, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 184, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 202, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 26, "flags": 1}, + {"matrix": [3, 0], "x": 6, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 99, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 114, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 129, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 143, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 158, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 173, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 196, "y": 38, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 38, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 49, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 62, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 77, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 92, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 106, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 121, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 151, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 165, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 185, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 209, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 20, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 39, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 94, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 147, "y": 61, "flags": 1}, + {"matrix": [5, 11], "x": 162, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 176, "y": 61, "flags": 1}, + {"matrix": [5, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_82": { "layout": [ diff --git a/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c index a78d5dd4d7..b3b96c26a4 100644 --- a/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c @@ -115,37 +115,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB3_CA15, CB1_CA15, CB2_CA15}, {1, CB3_CA16, CB1_CA16, CB2_CA16}, }; - -#define __ NO_LED - -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 } - }, - { - // LED Index to Physical Position - {0,0}, {18,0}, {33,0}, {48,0}, {62,0}, {81,0}, {95,0}, {110,0}, {125,0}, {143,0}, {158,0}, {173,0}, {187,0}, {206,0}, {224,0}, - {0,15}, {15,15}, {29,15}, {44,15}, {59,15}, {73,15}, {88,15}, {103,15}, {118,15}, {132,15}, {147,15}, {162,15}, {176,15}, {198,15}, {224,15}, - {4,26}, {22,26}, {37,26}, {51,26}, {66,26}, {81,26}, {95,26}, {110,26}, {125,26}, {140,26}, {154,26}, {169,26}, {184,26}, {202,26}, {224,26}, - {6,38}, {26,38}, {40,38}, {55,38}, {70,38}, {84,38}, {99,38}, {114,38}, {129,38}, {143,38}, {158,38}, {173,38}, {196,38}, {224,38}, - {9,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {151,49}, {165,49}, {185,49}, {209,52}, - {2,61}, {20,61}, {39,61}, {94,61}, {147,61}, {162,61}, {176,61}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v1/ansi_encoder/keyboard.json b/keyboards/keychron/v1/ansi_encoder/keyboard.json index 62bbeb9d5d..cd62b128a0 100644 --- a/keyboards/keychron/v1/ansi_encoder/keyboard.json +++ b/keyboards/keychron/v1/ansi_encoder/keyboard.json @@ -24,6 +24,92 @@ "dip_switch": true, "rgb_matrix": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 18, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 62, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 95, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 158, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 187, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 206, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 118, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 162, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 15, "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": 51, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 95, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 110, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 140, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 169, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 184, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 202, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 26, "flags": 1}, + {"matrix": [3, 0], "x": 6, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 99, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 114, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 129, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 143, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 158, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 173, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 196, "y": 38, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 38, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 49, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 62, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 77, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 92, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 106, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 121, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 151, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 165, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 185, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 209, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 20, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 39, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 94, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 147, "y": 61, "flags": 1}, + {"matrix": [5, 11], "x": 162, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 176, "y": 61, "flags": 1}, + {"matrix": [5, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_82": { "layout": [ diff --git a/keyboards/keychron/v1/iso/iso.c b/keyboards/keychron/v1/iso/iso.c index a1095dcc92..4cb877f918 100644 --- a/keyboards/keychron/v1/iso/iso.c +++ b/keyboards/keychron/v1/iso/iso.c @@ -116,37 +116,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB3_CA15, CB1_CA15, CB2_CA15}, {1, CB3_CA16, CB1_CA16, CB2_CA16}, }; - -#define __ NO_LED - -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, 57, __, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, __, 56, __, 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 } - }, - { - // LED Index to Physical Position - {0,0}, {18,0}, {33,0}, {48,0}, {62,0}, {81,0}, {95,0}, {110,0}, {125,0}, {143,0}, {158,0}, {173,0}, {187,0}, {206,0}, {224,0}, - {0,15}, {15,15}, {29,15}, {44,15}, {59,15}, {73,15}, {88,15}, {103,15}, {118,15}, {132,15}, {147,15}, {162,15}, {176,15}, {198,15}, {224,15}, - {4,26}, {22,26}, {37,26}, {51,26}, {66,26}, {81,26}, {95,26}, {110,26}, {125,26}, {140,26}, {154,26}, {169,26}, {184,26}, {224,26}, - {6,38}, {26,38}, {40,38}, {55,38}, {70,38}, {84,38}, {99,38}, {114,38}, {129,38}, {143,38}, {158,38}, {173,38}, {187,38}, {203,32}, {224,38}, - {2,49}, {18,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {151,49}, {165,49}, {185,49}, {209,52}, - {2,61}, {20,61}, {39,61}, {94,61}, {147,61}, {162,61}, {176,61}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 8, 4, 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, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v1/iso/keyboard.json b/keyboards/keychron/v1/iso/keyboard.json index 6e307ea4df..43376e3077 100644 --- a/keyboards/keychron/v1/iso/keyboard.json +++ b/keyboards/keychron/v1/iso/keyboard.json @@ -18,6 +18,93 @@ "rgb_matrix": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 18, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 62, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 95, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 158, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 187, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 206, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 118, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 162, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 15, "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": 51, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 95, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 110, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 140, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 169, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 184, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 26, "flags": 1}, + {"matrix": [3, 0], "x": 6, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 99, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 114, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 129, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 143, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 158, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 173, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 187, "y": 38, "flags": 4}, + {"matrix": [2, 13], "x": 203, "y": 32, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 38, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 49, "flags": 1}, + {"matrix": [4, 1], "x": 18, "y": 49, "flags": 4}, + {"matrix": [4, 2], "x": 33, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 62, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 77, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 92, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 106, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 121, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 151, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 165, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 185, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 209, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 20, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 39, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 94, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 147, "y": 61, "flags": 1}, + {"matrix": [5, 11], "x": 162, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 176, "y": 61, "flags": 1}, + {"matrix": [5, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_83": { "layout": [ diff --git a/keyboards/keychron/v1/iso_encoder/iso_encoder.c b/keyboards/keychron/v1/iso_encoder/iso_encoder.c index a1095dcc92..4cb877f918 100644 --- a/keyboards/keychron/v1/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v1/iso_encoder/iso_encoder.c @@ -116,37 +116,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB3_CA15, CB1_CA15, CB2_CA15}, {1, CB3_CA16, CB1_CA16, CB2_CA16}, }; - -#define __ NO_LED - -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, 57, __, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, __, 56, __, 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 } - }, - { - // LED Index to Physical Position - {0,0}, {18,0}, {33,0}, {48,0}, {62,0}, {81,0}, {95,0}, {110,0}, {125,0}, {143,0}, {158,0}, {173,0}, {187,0}, {206,0}, {224,0}, - {0,15}, {15,15}, {29,15}, {44,15}, {59,15}, {73,15}, {88,15}, {103,15}, {118,15}, {132,15}, {147,15}, {162,15}, {176,15}, {198,15}, {224,15}, - {4,26}, {22,26}, {37,26}, {51,26}, {66,26}, {81,26}, {95,26}, {110,26}, {125,26}, {140,26}, {154,26}, {169,26}, {184,26}, {224,26}, - {6,38}, {26,38}, {40,38}, {55,38}, {70,38}, {84,38}, {99,38}, {114,38}, {129,38}, {143,38}, {158,38}, {173,38}, {187,38}, {203,32}, {224,38}, - {2,49}, {18,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {151,49}, {165,49}, {185,49}, {209,52}, - {2,61}, {20,61}, {39,61}, {94,61}, {147,61}, {162,61}, {176,61}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 8, 4, 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, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v1/iso_encoder/keyboard.json b/keyboards/keychron/v1/iso_encoder/keyboard.json index 077cb045b2..b095d4d436 100644 --- a/keyboards/keychron/v1/iso_encoder/keyboard.json +++ b/keyboards/keychron/v1/iso_encoder/keyboard.json @@ -24,6 +24,93 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 18, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 62, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 95, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 158, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 187, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 206, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 118, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 162, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 15, "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": 51, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 95, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 110, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 140, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 169, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 184, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 26, "flags": 1}, + {"matrix": [3, 0], "x": 6, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 99, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 114, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 129, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 143, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 158, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 173, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 187, "y": 38, "flags": 4}, + {"matrix": [2, 13], "x": 203, "y": 32, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 38, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 49, "flags": 1}, + {"matrix": [4, 1], "x": 18, "y": 49, "flags": 4}, + {"matrix": [4, 2], "x": 33, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 62, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 77, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 92, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 106, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 121, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 151, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 165, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 185, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 209, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 20, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 39, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 94, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 147, "y": 61, "flags": 1}, + {"matrix": [5, 11], "x": 162, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 176, "y": 61, "flags": 1}, + {"matrix": [5, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_83": { "layout": [ diff --git a/keyboards/keychron/v1/jis/jis.c b/keyboards/keychron/v1/jis/jis.c index d3b3f9aa90..04839ff24a 100644 --- a/keyboards/keychron/v1/jis/jis.c +++ b/keyboards/keychron/v1/jis/jis.c @@ -119,37 +119,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB3_CA15, CB1_CA15, CB2_CA15}, {1, CB3_CA16, CB1_CA16, CB2_CA16}, }; - -#define __ NO_LED - -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, 58, __, 44 }, - { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, __, 57, __, 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 }, - }, - { - // LED Index to Physical Position - {0, 0}, {18, 0}, {33, 0}, {48, 0}, {62, 0}, {81, 0}, {95, 0}, {110, 0}, {125, 0}, {143, 0}, {158, 0}, {173, 0}, {187, 0}, {205, 0}, {224, 0}, - {0, 15}, {15, 15}, {29, 15}, {44, 15}, {59, 15}, {73, 15}, {88, 15}, {103, 15}, {117, 15}, {132, 15}, {147, 15}, {161, 15}, {176, 15}, {191, 15}, {205, 15}, {224, 15}, - {4, 28}, {22, 28}, {37, 28}, {51, 28}, {66, 28}, {81, 28}, {95, 28}, {110, 28}, {125, 28}, {139, 28}, {154, 28}, {169, 28}, {183, 28}, {224, 28}, - {6, 40}, {26, 40}, {40, 40}, {55, 40}, {70, 40}, {84, 40}, {99, 40}, {114, 40}, {128, 40}, {143, 40}, {158, 40}, {172, 40}, {187, 40}, {207, 36}, {224, 40}, - {9, 52}, {33, 52}, {48, 52}, {62, 52}, {77, 52}, {92, 52}, {106, 52}, {121, 52}, {136, 52}, {150, 52}, {165, 52}, {180, 52}, {194, 52}, {209, 52}, - {2, 64}, {18, 64}, {35, 64}, {51, 64}, { 92, 64}, {134, 64}, {150, 64}, {165, 64}, {180, 64}, {194, 64}, {209, 64}, {224, 64}, - }, - { - // RGB LED Index to Flag - 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, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 8, 4, 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, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v1/jis/keyboard.json b/keyboards/keychron/v1/jis/keyboard.json index a6a43a75da..e02699c03c 100644 --- a/keyboards/keychron/v1/jis/keyboard.json +++ b/keyboards/keychron/v1/jis/keyboard.json @@ -18,6 +18,96 @@ "rgb_matrix": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 18, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 62, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 95, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 158, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 187, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 205, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 161, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 191, "y": 15, "flags": 4}, + {"matrix": [1, 14], "x": 205, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 4, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 22, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 51, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 95, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 110, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 139, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 169, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 183, "y": 28, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 28, "flags": 1}, + {"matrix": [3, 0], "x": 6, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 26, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 99, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 143, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 158, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 172, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 187, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 207, "y": 36, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 40, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 62, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 77, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 92, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 106, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 121, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 136, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 150, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 165, "y": 52, "flags": 4}, + {"matrix": [4, 12], "x": 180, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 194, "y": 52, "flags": 1}, + {"matrix": [4, 14], "x": 209, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 35, "y": 64, "flags": 1}, + {"matrix": [5, 3], "x": 51, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 92, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 134, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 150, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 165, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 194, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_jis_86": { "layout": [ diff --git a/keyboards/keychron/v1/jis_encoder/jis_encoder.c b/keyboards/keychron/v1/jis_encoder/jis_encoder.c index d3b3f9aa90..04839ff24a 100644 --- a/keyboards/keychron/v1/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/v1/jis_encoder/jis_encoder.c @@ -119,37 +119,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB3_CA15, CB1_CA15, CB2_CA15}, {1, CB3_CA16, CB1_CA16, CB2_CA16}, }; - -#define __ NO_LED - -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, 58, __, 44 }, - { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, __, 57, __, 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 }, - }, - { - // LED Index to Physical Position - {0, 0}, {18, 0}, {33, 0}, {48, 0}, {62, 0}, {81, 0}, {95, 0}, {110, 0}, {125, 0}, {143, 0}, {158, 0}, {173, 0}, {187, 0}, {205, 0}, {224, 0}, - {0, 15}, {15, 15}, {29, 15}, {44, 15}, {59, 15}, {73, 15}, {88, 15}, {103, 15}, {117, 15}, {132, 15}, {147, 15}, {161, 15}, {176, 15}, {191, 15}, {205, 15}, {224, 15}, - {4, 28}, {22, 28}, {37, 28}, {51, 28}, {66, 28}, {81, 28}, {95, 28}, {110, 28}, {125, 28}, {139, 28}, {154, 28}, {169, 28}, {183, 28}, {224, 28}, - {6, 40}, {26, 40}, {40, 40}, {55, 40}, {70, 40}, {84, 40}, {99, 40}, {114, 40}, {128, 40}, {143, 40}, {158, 40}, {172, 40}, {187, 40}, {207, 36}, {224, 40}, - {9, 52}, {33, 52}, {48, 52}, {62, 52}, {77, 52}, {92, 52}, {106, 52}, {121, 52}, {136, 52}, {150, 52}, {165, 52}, {180, 52}, {194, 52}, {209, 52}, - {2, 64}, {18, 64}, {35, 64}, {51, 64}, { 92, 64}, {134, 64}, {150, 64}, {165, 64}, {180, 64}, {194, 64}, {209, 64}, {224, 64}, - }, - { - // RGB LED Index to Flag - 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, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 8, 4, 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, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v1/jis_encoder/keyboard.json b/keyboards/keychron/v1/jis_encoder/keyboard.json index 4e39e3d4a8..3a89e69153 100644 --- a/keyboards/keychron/v1/jis_encoder/keyboard.json +++ b/keyboards/keychron/v1/jis_encoder/keyboard.json @@ -24,6 +24,96 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 18, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 62, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 95, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 158, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 187, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 205, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 161, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 191, "y": 15, "flags": 4}, + {"matrix": [1, 14], "x": 205, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 4, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 22, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 51, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 95, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 110, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 139, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 169, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 183, "y": 28, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 28, "flags": 1}, + {"matrix": [3, 0], "x": 6, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 26, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 99, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 143, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 158, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 172, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 187, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 207, "y": 36, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 40, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 62, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 77, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 92, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 106, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 121, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 136, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 150, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 165, "y": 52, "flags": 4}, + {"matrix": [4, 12], "x": 180, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 194, "y": 52, "flags": 1}, + {"matrix": [4, 14], "x": 209, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 35, "y": 64, "flags": 1}, + {"matrix": [5, 3], "x": 51, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 92, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 134, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 150, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 165, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 194, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_jis_86": { "layout": [ diff --git a/keyboards/keychron/v2/ansi/ansi.c b/keyboards/keychron/v2/ansi/ansi.c index 722aa27b47..ea92662c59 100644 --- a/keyboards/keychron/v2/ansi/ansi.c +++ b/keyboards/keychron/v2/ansi/ansi.c @@ -99,34 +99,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA15, CB4_CA15, CB5_CA15}, {1, CB6_CA16, CB4_CA16, CB5_CA16}, }; - -#define __ NO_LED - -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, 65, 42, 43 }, - { 44, __, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, __, 55, 56 }, - { 57, 58, 59, __, __, __, 60, __, __, __, 61, 62, 63, 64, 66 } - }, - { - // LED Index to Physical Position - {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0}, // {244,-4} - {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {202,15}, {224,15}, - {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {196,30}, {224,30}, - {9,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49}, - {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 1, 4, 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, 4, 1, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v2/ansi/keyboard.json b/keyboards/keychron/v2/ansi/keyboard.json index bc09cb8a27..962bcaee98 100644 --- a/keyboards/keychron/v2/ansi/keyboard.json +++ b/keyboards/keychron/v2/ansi/keyboard.json @@ -23,6 +23,77 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 44, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 88, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 103, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 118, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 81, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 95, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 110, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 140, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 154, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 169, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 184, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 202, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 30, "flags": 8}, + {"matrix": [2, 1], "x": 26, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 70, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 99, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 114, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 129, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 143, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 158, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 173, "y": 30, "flags": 4}, + {"matrix": [2, 13], "x": 196, "y": 30, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 30, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 45, "flags": 1}, + {"matrix": [3, 2], "x": 33, "y": 45, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 45, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 45, "flags": 4}, + {"matrix": [3, 5], "x": 77, "y": 45, "flags": 4}, + {"matrix": [3, 6], "x": 92, "y": 45, "flags": 4}, + {"matrix": [3, 7], "x": 106, "y": 45, "flags": 4}, + {"matrix": [3, 8], "x": 121, "y": 45, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 45, "flags": 4}, + {"matrix": [3, 10], "x": 151, "y": 45, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 45, "flags": 4}, + {"matrix": [3, 13], "x": 185, "y": 45, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 60, "flags": 1}, + {"matrix": [4, 1], "x": 20, "y": 60, "flags": 1}, + {"matrix": [4, 2], "x": 39, "y": 60, "flags": 1}, + {"matrix": [4, 6], "x": 94, "y": 60, "flags": 4}, + {"matrix": [4, 10], "x": 147, "y": 60, "flags": 1}, + {"matrix": [4, 11], "x": 162, "y": 60, "flags": 1}, + {"matrix": [4, 12], "x": 176, "y": 60, "flags": 1}, + {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_67": { "layout": [ diff --git a/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c index 6203483285..ea92662c59 100644 --- a/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c @@ -99,34 +99,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA15, CB4_CA15, CB5_CA15}, {1, CB6_CA16, CB4_CA16, CB5_CA16}, }; - -#define __ NO_LED - -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, 65, 42, 43 }, - { 44, __, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, __, 55, 56 }, - { 57, 58, 59, __, __, __, 60, __, __, __, 61, 62, 63, 64, 66 } - }, - { - // LED Index to Physical Position - {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0}, // {244,-4} - {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {202,15}, {224,15}, - {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {196,30}, {224,30}, - {9,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49}, - {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 1, 4, 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, 4, 4, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v2/ansi_encoder/keyboard.json b/keyboards/keychron/v2/ansi_encoder/keyboard.json index 6752d14b15..42b6814781 100644 --- a/keyboards/keychron/v2/ansi_encoder/keyboard.json +++ b/keyboards/keychron/v2/ansi_encoder/keyboard.json @@ -29,6 +29,77 @@ }, "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 44, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 88, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 103, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 118, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 81, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 95, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 110, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 140, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 154, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 169, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 184, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 202, "y": 15, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 30, "flags": 8}, + {"matrix": [2, 1], "x": 26, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 70, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 99, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 114, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 129, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 143, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 158, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 173, "y": 30, "flags": 4}, + {"matrix": [2, 13], "x": 196, "y": 30, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 30, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 45, "flags": 1}, + {"matrix": [3, 2], "x": 33, "y": 45, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 45, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 45, "flags": 4}, + {"matrix": [3, 5], "x": 77, "y": 45, "flags": 4}, + {"matrix": [3, 6], "x": 92, "y": 45, "flags": 4}, + {"matrix": [3, 7], "x": 106, "y": 45, "flags": 4}, + {"matrix": [3, 8], "x": 121, "y": 45, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 45, "flags": 4}, + {"matrix": [3, 10], "x": 151, "y": 45, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 45, "flags": 4}, + {"matrix": [3, 13], "x": 185, "y": 45, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 60, "flags": 1}, + {"matrix": [4, 1], "x": 20, "y": 60, "flags": 1}, + {"matrix": [4, 2], "x": 39, "y": 60, "flags": 1}, + {"matrix": [4, 6], "x": 94, "y": 60, "flags": 4}, + {"matrix": [4, 10], "x": 147, "y": 60, "flags": 1}, + {"matrix": [4, 11], "x": 162, "y": 60, "flags": 1}, + {"matrix": [4, 12], "x": 176, "y": 60, "flags": 1}, + {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_67": { "layout": [ diff --git a/keyboards/keychron/v2/iso/iso.c b/keyboards/keychron/v2/iso/iso.c index aca0879838..b5a5193892 100644 --- a/keyboards/keychron/v2/iso/iso.c +++ b/keyboards/keychron/v2/iso/iso.c @@ -100,34 +100,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA15, CB4_CA15, CB5_CA15}, {1, CB6_CA16, CB4_CA16, CB5_CA16} }; - -#define __ NO_LED - -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, 42, 28 }, - { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 66, 41, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, __, 56, 57 }, - { 58, 59, 60, __, __, __, 61, __, __, __, 62, 63, 64, 65, 67 } - }, - { - // LED Index to Physical Position - {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0}, - {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {224,15}, - {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {187,30}, {204,23}, {224,30}, - {2,45}, {18,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49}, - {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 1, 4, 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, 4, 1, - 8, 4, 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, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v2/iso/keyboard.json b/keyboards/keychron/v2/iso/keyboard.json index 89bdb51a65..f430c50270 100644 --- a/keyboards/keychron/v2/iso/keyboard.json +++ b/keyboards/keychron/v2/iso/keyboard.json @@ -23,6 +23,78 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 44, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 88, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 103, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 118, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 81, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 95, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 110, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 140, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 154, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 169, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 184, "y": 15, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 30, "flags": 8}, + {"matrix": [2, 1], "x": 26, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 70, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 99, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 114, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 129, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 143, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 158, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 173, "y": 30, "flags": 4}, + {"matrix": [2, 13], "x": 187, "y": 30, "flags": 4}, + {"matrix": [1, 13], "x": 204, "y": 23, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 30, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 45, "flags": 1}, + {"matrix": [3, 1], "x": 18, "y": 45, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 45, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 45, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 45, "flags": 4}, + {"matrix": [3, 5], "x": 77, "y": 45, "flags": 4}, + {"matrix": [3, 6], "x": 92, "y": 45, "flags": 4}, + {"matrix": [3, 7], "x": 106, "y": 45, "flags": 4}, + {"matrix": [3, 8], "x": 121, "y": 45, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 45, "flags": 4}, + {"matrix": [3, 10], "x": 151, "y": 45, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 45, "flags": 4}, + {"matrix": [3, 13], "x": 185, "y": 45, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 60, "flags": 1}, + {"matrix": [4, 1], "x": 20, "y": 60, "flags": 1}, + {"matrix": [4, 2], "x": 39, "y": 60, "flags": 1}, + {"matrix": [4, 6], "x": 94, "y": 60, "flags": 4}, + {"matrix": [4, 10], "x": 147, "y": 60, "flags": 1}, + {"matrix": [4, 11], "x": 162, "y": 60, "flags": 1}, + {"matrix": [4, 12], "x": 176, "y": 60, "flags": 1}, + {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_68": { "layout": [ diff --git a/keyboards/keychron/v2/iso_encoder/iso_encoder.c b/keyboards/keychron/v2/iso_encoder/iso_encoder.c index aca0879838..5911f9d9c1 100644 --- a/keyboards/keychron/v2/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v2/iso_encoder/iso_encoder.c @@ -101,33 +101,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA16, CB4_CA16, CB5_CA16} }; -#define __ NO_LED - -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, 42, 28 }, - { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 66, 41, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, __, 56, 57 }, - { 58, 59, 60, __, __, __, 61, __, __, __, 62, 63, 64, 65, 67 } - }, - { - // LED Index to Physical Position - {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0}, - {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {224,15}, - {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {187,30}, {204,23}, {224,30}, - {2,45}, {18,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49}, - {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 1, 4, 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, 4, 1, - 8, 4, 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, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v2/iso_encoder/keyboard.json b/keyboards/keychron/v2/iso_encoder/keyboard.json index 89ce2714f1..4dd36fdda4 100644 --- a/keyboards/keychron/v2/iso_encoder/keyboard.json +++ b/keyboards/keychron/v2/iso_encoder/keyboard.json @@ -29,6 +29,78 @@ }, "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 44, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 88, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 103, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 118, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 81, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 95, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 110, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 140, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 154, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 169, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 184, "y": 15, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 30, "flags": 8}, + {"matrix": [2, 1], "x": 26, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 70, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 99, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 114, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 129, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 143, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 158, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 173, "y": 30, "flags": 4}, + {"matrix": [2, 13], "x": 187, "y": 30, "flags": 4}, + {"matrix": [1, 13], "x": 204, "y": 23, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 30, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 45, "flags": 1}, + {"matrix": [3, 1], "x": 18, "y": 45, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 45, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 45, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 45, "flags": 4}, + {"matrix": [3, 5], "x": 77, "y": 45, "flags": 4}, + {"matrix": [3, 6], "x": 92, "y": 45, "flags": 4}, + {"matrix": [3, 7], "x": 106, "y": 45, "flags": 4}, + {"matrix": [3, 8], "x": 121, "y": 45, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 45, "flags": 4}, + {"matrix": [3, 10], "x": 151, "y": 45, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 45, "flags": 4}, + {"matrix": [3, 13], "x": 185, "y": 45, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 60, "flags": 1}, + {"matrix": [4, 1], "x": 20, "y": 60, "flags": 1}, + {"matrix": [4, 2], "x": 39, "y": 60, "flags": 1}, + {"matrix": [4, 6], "x": 94, "y": 60, "flags": 4}, + {"matrix": [4, 10], "x": 147, "y": 60, "flags": 1}, + {"matrix": [4, 11], "x": 162, "y": 60, "flags": 1}, + {"matrix": [4, 12], "x": 176, "y": 60, "flags": 1}, + {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_68": { "layout": [ diff --git a/keyboards/keychron/v2/jis/jis.c b/keyboards/keychron/v2/jis/jis.c index 1269d9b1e6..1664a5f703 100644 --- a/keyboards/keychron/v2/jis/jis.c +++ b/keyboards/keychron/v2/jis/jis.c @@ -101,34 +101,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA15, CB4_CA15, CB5_CA15}, {1, CB6_CA16, CB4_CA16, CB5_CA16} }; - -#define __ NO_LED - -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, 15 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 43, 29 }, - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 69, 42, 44 }, - { 45, 14, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 }, - { 59, 60, 61, 62, __, __, 63, __, __, 64, 65, 66, 67, 68, 70 } - }, - { - // LED Index to Physical Position - {0,4}, {15,4}, {29,4}, {44,4}, {59,4}, {73,4}, {88,4}, {103,4}, {117,4}, {132,4}, {146,4}, {161,4}, {176,4}, {190,4}, {205,4}, {224,0}, - {4,19}, {22,19}, {37,19}, {51,19}, {66,19}, {81,19}, {95,19}, {110,19}, {125,19}, {139,19}, {154,19}, {168,19}, {183,19}, {224,19}, - {6,34}, {26,34}, {40,34}, {55,34}, {70,34}, {84,34}, {99,34}, {114,34}, {128,34}, {143,34}, {158,34}, {172,34}, {187,34}, {207,29}, {224,34}, - {9,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {150,49}, {165,49}, {179,49}, {194,49}, {209,49}, - {2,64}, {18,64}, {35,64}, {51,64}, {92,64}, {134,64}, {150,64}, {165,64}, {179,64}, {194,64}, {209,64}, {223,64}, - }, - { - // RGB LED Index to Flag - 1, 4, 4, 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, 4, 1, - 8, 4, 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, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v2/jis/keyboard.json b/keyboards/keychron/v2/jis/keyboard.json index 01beaf31ac..96b19c7372 100644 --- a/keyboards/keychron/v2/jis/keyboard.json +++ b/keyboards/keychron/v2/jis/keyboard.json @@ -23,6 +23,81 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 4, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 4, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 4, "flags": 4}, + {"matrix": [0, 3], "x": 44, "y": 4, "flags": 4}, + {"matrix": [0, 4], "x": 59, "y": 4, "flags": 4}, + {"matrix": [0, 5], "x": 73, "y": 4, "flags": 4}, + {"matrix": [0, 6], "x": 88, "y": 4, "flags": 4}, + {"matrix": [0, 7], "x": 103, "y": 4, "flags": 4}, + {"matrix": [0, 8], "x": 117, "y": 4, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 4, "flags": 4}, + {"matrix": [0, 10], "x": 146, "y": 4, "flags": 4}, + {"matrix": [0, 11], "x": 161, "y": 4, "flags": 4}, + {"matrix": [0, 12], "x": 176, "y": 4, "flags": 4}, + {"matrix": [0, 13], "x": 190, "y": 4, "flags": 4}, + {"matrix": [3, 1], "x": 205, "y": 4, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 19, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 19, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 19, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 19, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 19, "flags": 4}, + {"matrix": [1, 5], "x": 81, "y": 19, "flags": 4}, + {"matrix": [1, 6], "x": 95, "y": 19, "flags": 4}, + {"matrix": [1, 7], "x": 110, "y": 19, "flags": 4}, + {"matrix": [1, 8], "x": 125, "y": 19, "flags": 4}, + {"matrix": [1, 9], "x": 139, "y": 19, "flags": 4}, + {"matrix": [1, 10], "x": 154, "y": 19, "flags": 4}, + {"matrix": [1, 11], "x": 168, "y": 19, "flags": 4}, + {"matrix": [1, 12], "x": 183, "y": 19, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 19, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 34, "flags": 8}, + {"matrix": [2, 1], "x": 26, "y": 34, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 34, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 34, "flags": 4}, + {"matrix": [2, 4], "x": 70, "y": 34, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 34, "flags": 4}, + {"matrix": [2, 6], "x": 99, "y": 34, "flags": 4}, + {"matrix": [2, 7], "x": 114, "y": 34, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 34, "flags": 4}, + {"matrix": [2, 9], "x": 143, "y": 34, "flags": 4}, + {"matrix": [2, 10], "x": 158, "y": 34, "flags": 4}, + {"matrix": [2, 11], "x": 172, "y": 34, "flags": 4}, + {"matrix": [2, 13], "x": 187, "y": 34, "flags": 4}, + {"matrix": [1, 13], "x": 207, "y": 29, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 34, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 49, "flags": 1}, + {"matrix": [3, 2], "x": 33, "y": 49, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 49, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 49, "flags": 4}, + {"matrix": [3, 5], "x": 77, "y": 49, "flags": 4}, + {"matrix": [3, 6], "x": 92, "y": 49, "flags": 4}, + {"matrix": [3, 7], "x": 106, "y": 49, "flags": 4}, + {"matrix": [3, 8], "x": 121, "y": 49, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 49, "flags": 4}, + {"matrix": [3, 10], "x": 150, "y": 49, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 49, "flags": 4}, + {"matrix": [3, 12], "x": 179, "y": 49, "flags": 4}, + {"matrix": [3, 13], "x": 194, "y": 49, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 35, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 51, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 92, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 134, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 165, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 179, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 194, "y": 64, "flags": 1}, + {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 223, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_jis_71": { "layout": [ diff --git a/keyboards/keychron/v2/jis_encoder/jis_encoder.c b/keyboards/keychron/v2/jis_encoder/jis_encoder.c index 85aaf165f6..1664a5f703 100644 --- a/keyboards/keychron/v2/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/v2/jis_encoder/jis_encoder.c @@ -101,34 +101,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA15, CB4_CA15, CB5_CA15}, {1, CB6_CA16, CB4_CA16, CB5_CA16} }; - -#define __ NO_LED - -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, 15 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 43, 29 }, - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 69, 42, 44 }, - { 45, 14, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 }, - { 59, 60, 61, 62, __, __, 63, __, __, 64, 65, 66, 67, 68, 70 }, - }, - { - // LED Index to Physical Position - {0,4}, {15,4}, {29,4}, {44,4}, {59,4}, {73,4}, {88,4}, {103,4}, {117,4}, {132,4}, {146,4}, {161,4}, {176,4}, {190,4}, {205,4}, {224,0}, - {4,19}, {22,19}, {37,19}, {51,19}, {66,19}, {81,19}, {95,19}, {110,19}, {125,19}, {139,19}, {154,19}, {168,19}, {183,19}, {224,19}, - {6,34}, {26,34}, {40,34}, {55,34}, {70,34}, {84,34}, {99,34}, {114,34}, {128,34}, {143,34}, {158,34}, {172,34}, {187,34}, {207,29}, {224,34}, - {9,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {150,49}, {165,49}, {179,49}, {194,49}, {209,49}, - {2,64}, {18,64}, {35,64}, {51,64}, {92,64}, {134,64}, {150,64}, {165,64}, {179,64}, {194,64}, {209,64}, {223,64}, - }, - { - // RGB LED Index to Flag - 1, 4, 4, 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, 4, 1, - 8, 4, 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, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v2/jis_encoder/keyboard.json b/keyboards/keychron/v2/jis_encoder/keyboard.json index d8a540953c..105b5b6724 100644 --- a/keyboards/keychron/v2/jis_encoder/keyboard.json +++ b/keyboards/keychron/v2/jis_encoder/keyboard.json @@ -29,6 +29,81 @@ }, "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 4, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 4, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 4, "flags": 4}, + {"matrix": [0, 3], "x": 44, "y": 4, "flags": 4}, + {"matrix": [0, 4], "x": 59, "y": 4, "flags": 4}, + {"matrix": [0, 5], "x": 73, "y": 4, "flags": 4}, + {"matrix": [0, 6], "x": 88, "y": 4, "flags": 4}, + {"matrix": [0, 7], "x": 103, "y": 4, "flags": 4}, + {"matrix": [0, 8], "x": 117, "y": 4, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 4, "flags": 4}, + {"matrix": [0, 10], "x": 146, "y": 4, "flags": 4}, + {"matrix": [0, 11], "x": 161, "y": 4, "flags": 4}, + {"matrix": [0, 12], "x": 176, "y": 4, "flags": 4}, + {"matrix": [0, 13], "x": 190, "y": 4, "flags": 4}, + {"matrix": [3, 1], "x": 205, "y": 4, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 19, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 19, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 19, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 19, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 19, "flags": 4}, + {"matrix": [1, 5], "x": 81, "y": 19, "flags": 4}, + {"matrix": [1, 6], "x": 95, "y": 19, "flags": 4}, + {"matrix": [1, 7], "x": 110, "y": 19, "flags": 4}, + {"matrix": [1, 8], "x": 125, "y": 19, "flags": 4}, + {"matrix": [1, 9], "x": 139, "y": 19, "flags": 4}, + {"matrix": [1, 10], "x": 154, "y": 19, "flags": 4}, + {"matrix": [1, 11], "x": 168, "y": 19, "flags": 4}, + {"matrix": [1, 12], "x": 183, "y": 19, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 19, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 34, "flags": 8}, + {"matrix": [2, 1], "x": 26, "y": 34, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 34, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 34, "flags": 4}, + {"matrix": [2, 4], "x": 70, "y": 34, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 34, "flags": 4}, + {"matrix": [2, 6], "x": 99, "y": 34, "flags": 4}, + {"matrix": [2, 7], "x": 114, "y": 34, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 34, "flags": 4}, + {"matrix": [2, 9], "x": 143, "y": 34, "flags": 4}, + {"matrix": [2, 10], "x": 158, "y": 34, "flags": 4}, + {"matrix": [2, 11], "x": 172, "y": 34, "flags": 4}, + {"matrix": [2, 13], "x": 187, "y": 34, "flags": 4}, + {"matrix": [1, 13], "x": 207, "y": 29, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 34, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 49, "flags": 1}, + {"matrix": [3, 2], "x": 33, "y": 49, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 49, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 49, "flags": 4}, + {"matrix": [3, 5], "x": 77, "y": 49, "flags": 4}, + {"matrix": [3, 6], "x": 92, "y": 49, "flags": 4}, + {"matrix": [3, 7], "x": 106, "y": 49, "flags": 4}, + {"matrix": [3, 8], "x": 121, "y": 49, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 49, "flags": 4}, + {"matrix": [3, 10], "x": 150, "y": 49, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 49, "flags": 4}, + {"matrix": [3, 12], "x": 179, "y": 49, "flags": 4}, + {"matrix": [3, 13], "x": 194, "y": 49, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 35, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 51, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 92, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 134, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 165, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 179, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 194, "y": 64, "flags": 1}, + {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 223, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_jis_71": { "layout": [ From 1e8de37aa05f30819dfa47f775ab007efb41d1a0 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:02:29 -0600 Subject: [PATCH 14/95] Migrate `g_led_config` to DD (K3) (#25603) --- keyboards/keychron/q1v1/iso/iso.c | 33 ----- keyboards/keychron/q6/ansi/ansi.c | 33 ----- keyboards/keychron/q6/ansi/keyboard.json | 112 +++++++++++++++++ .../keychron/q6/ansi_encoder/ansi_encoder.c | 32 ----- .../keychron/q6/ansi_encoder/keyboard.json | 112 +++++++++++++++++ keyboards/keychron/q6/iso/iso.c | 33 ----- keyboards/keychron/q6/iso/keyboard.json | 113 ++++++++++++++++++ .../keychron/q6/iso_encoder/iso_encoder.c | 33 ----- .../keychron/q6/iso_encoder/keyboard.json | 113 ++++++++++++++++++ keyboards/keychron/q60/ansi/ansi.c | 30 ----- keyboards/keychron/q60/ansi/keyboard.json | 64 ++++++++++ .../keychron/q65/ansi_encoder/ansi_encoder.c | 30 ----- .../keychron/q65/ansi_encoder/keyboard.json | 76 ++++++++++++ keyboards/keychron/s1/ansi/rgb/keyboard.json | 86 +++++++++++++ keyboards/keychron/s1/ansi/rgb/rgb.c | 33 ----- .../keychron/v10/ansi_encoder/ansi_encoder.c | 33 ----- .../keychron/v10/ansi_encoder/keyboard.json | 92 ++++++++++++++ .../keychron/v10/iso_encoder/iso_encoder.c | 33 ----- .../keychron/v10/iso_encoder/keyboard.json | 93 ++++++++++++++ 19 files changed, 861 insertions(+), 323 deletions(-) diff --git a/keyboards/keychron/q1v1/iso/iso.c b/keyboards/keychron/q1v1/iso/iso.c index ef4f3425af..108ce01542 100644 --- a/keyboards/keychron/q1v1/iso/iso.c +++ b/keyboards/keychron/q1v1/iso/iso.c @@ -113,37 +113,4 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {1, SW6_CS15, SW4_CS15, SW5_CS15}, {1, SW6_CS16, SW4_CS16, SW5_CS16} }; - -#define __ NO_LED - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 0, __, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 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, 57, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 72, 56, 58 }, - { 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 81, 71, 13 }, - { 73, 74, 75, __, __, __, 76, __, __, __, 77, 78, 79, 80, 82 } - }, - { - // LED Index to Physical Position - {0,0}, {18,0}, {33,0}, {48,0}, {62,0}, {81,0}, {95,0}, {110,0}, {125,0}, {143,0}, {158,0}, {173,0}, {187,0}, {206,0}, {224,0}, - {0,15}, {15,15}, {29,15}, {44,15}, {59,15}, {73,15}, {88,15}, {103,15}, {118,15}, {132,15}, {147,15}, {162,15}, {176,15}, {198,15}, {224,15}, - {4,26}, {22,26}, {37,26}, {51,26}, {66,26}, {81,26}, {95,26}, {110,26}, {125,26}, {140,26}, {154,26}, {169,26}, {184,26}, {224,26}, - {6,38}, {26,38}, {40,38}, {55,38}, {70,38}, {84,38}, {99,38}, {114,38}, {129,38}, {143,38}, {158,38}, {173,38}, {187,38}, {203,32}, {224,38}, - {2,49}, {18,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {151,49}, {165,49}, {185,49}, {209,52}, - {2,61}, {20,61}, {39,61}, {94,61}, {147,61}, {162,61}, {176,61}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 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, 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, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q6/ansi/ansi.c b/keyboards/keychron/q6/ansi/ansi.c index 62a22971e1..bbc467bb49 100644 --- a/keyboards/keychron/q6/ansi/ansi.c +++ b/keyboards/keychron/q6/ansi/ansi.c @@ -141,37 +141,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA12, CB10_CA12, CB11_CA12}, {1, CB12_CA9, CB10_CA9, CB11_CA9}, }; - -#define __ NO_LED - -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, 39, 40, 16 }, - { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 17 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 18 }, - { 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, __, 73, 60, 77, 76, 74, 75, 19 }, - { 78, __, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, __, 89, 93, 90, 107, 91, 92, __ }, - { 94, 95, 96, __, __, __, 97, __, __, __, 98, 99, 100, 101, 102, 103, 104, 105, 106, __ }, - }, - { - // LED Index to Physical Position - {0,0}, {21,0}, {31,0}, {42,0}, {52,0}, {68,0}, {78,0}, {89,0}, {99,0}, {115,0}, {125,0}, {136,0}, {146,0}, {159,0}, {169,0}, {180,0}, {193,0}, {203,0}, {214,0}, {224,0}, - {0,15}, {10,15}, {21,15}, {31,15}, {42,15}, {52,15}, {63,15}, {73,15}, {83,15}, {94,15}, {104,15}, {115,15}, {125,15}, {141,15}, {159,15}, {169,15}, {180,15}, {193,15}, {203,15}, {214,15}, {224,15}, - {3,27}, {16,27}, {26,27}, {36,27}, {47,27}, {57,27}, {68,27}, {78,27}, {89,27}, {99,27}, {109,27}, {120,27}, {130,27}, {143,27}, {159,27}, {169,27}, {180,27}, {193,27}, {203,27}, {214,27}, - {4,40}, {18,40}, {29,40}, {39,40}, {50,40}, {60,40}, {70,40}, {81,40}, {91,40}, {102,40}, {112,40}, {123,40}, {139,40}, {193,40}, {203,40}, {214,40}, {224,34}, - {7,52}, {23,52}, {34,52}, {44,52}, {55,52}, {65,52}, {76,52}, {86,52}, {96,52}, {107,52}, {117,52}, {137,52}, {169,52}, {193,52}, {203,52}, {214,52}, - {1,64}, {14,64}, {27,64}, {66,64}, {105,64}, {118,64}, {131,64}, {145,64}, {159,64}, {169,64}, {180,64}, {198,64}, {214,64}, {224,58}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 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, 1, 1, 1, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q6/ansi/keyboard.json b/keyboards/keychron/q6/ansi/keyboard.json index 664fe87008..10cb586908 100644 --- a/keyboards/keychron/q6/ansi/keyboard.json +++ b/keyboards/keychron/q6/ansi/keyboard.json @@ -21,6 +21,118 @@ "build": { "lto": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 21, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 31, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 52, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 68, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 89, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 99, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 115, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 136, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 146, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 159, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 180, "y": 0, "flags": 1}, + {"matrix": [0, 19], "x": 193, "y": 0, "flags": 1}, + {"matrix": [1, 19], "x": 203, "y": 0, "flags": 1}, + {"matrix": [2, 19], "x": 214, "y": 0, "flags": 1}, + {"matrix": [3, 19], "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": [1, 2], "x": 21, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 31, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 63, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 94, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 115, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 141, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 159, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 169, "y": 15, "flags": 1}, + {"matrix": [1, 16], "x": 180, "y": 15, "flags": 1}, + {"matrix": [1, 17], "x": 193, "y": 15, "flags": 8}, + {"matrix": [1, 18], "x": 203, "y": 15, "flags": 4}, + {"matrix": [0, 17], "x": 214, "y": 15, "flags": 4}, + {"matrix": [0, 18], "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": [2, 2], "x": 26, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 57, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 68, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 78, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 89, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 99, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 109, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 120, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 130, "y": 27, "flags": 4}, + {"matrix": [2, 13], "x": 143, "y": 27, "flags": 4}, + {"matrix": [2, 14], "x": 159, "y": 27, "flags": 1}, + {"matrix": [2, 15], "x": 169, "y": 27, "flags": 1}, + {"matrix": [2, 16], "x": 180, "y": 27, "flags": 1}, + {"matrix": [2, 17], "x": 193, "y": 27, "flags": 4}, + {"matrix": [2, 18], "x": 203, "y": 27, "flags": 4}, + {"matrix": [3, 14], "x": 214, "y": 27, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 18, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 29, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 39, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 50, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 81, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 91, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 102, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 123, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 139, "y": 40, "flags": 1}, + {"matrix": [3, 17], "x": 193, "y": 40, "flags": 4}, + {"matrix": [3, 18], "x": 203, "y": 40, "flags": 4}, + {"matrix": [3, 16], "x": 214, "y": 40, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 34, "flags": 4}, + {"matrix": [4, 0], "x": 7, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 23, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 34, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 44, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 65, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 76, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 86, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 117, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 137, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 169, "y": 52, "flags": 1}, + {"matrix": [4, 17], "x": 193, "y": 52, "flags": 4}, + {"matrix": [4, 18], "x": 203, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 214, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 27, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 66, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 105, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 118, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 145, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 159, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 17], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 18], "x": 214, "y": 64, "flags": 4}, + {"matrix": [4, 16], "x": 224, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_108": { "layout": [ diff --git a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c index b3d8a6bd4c..5897e1be72 100644 --- a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c @@ -142,36 +142,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA9, CB10_CA9, CB11_CA9}, }; -#define __ NO_LED - -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, 39, 40, 16 }, - { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 17 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 18 }, - { 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, __, 73, 60, 77, 76, 74, 75, 19 }, - { 78, __, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, __, 89, 93, 90, 107, 91, 92, __ }, - { 94, 95, 96, __, __, __, 97, __, __, __, 98, 99, 100, 101, 102, 103, 104, 105, 106, __ }, - }, - { - // LED Index to Physical Position - {0,0}, {13,0}, {24,0}, {34,0}, {45,0}, {57,0}, {68,0}, {78,0}, {89,0}, {102,0}, {112,0}, {123,0}, {133,0}, {159,0}, {169,0}, {180,0}, {193,0}, {203,0}, {214,0}, {224,0}, - {0,15}, {10,15}, {21,15}, {31,15}, {42,15}, {52,15}, {63,15}, {73,15}, {83,15}, {94,15}, {104,15}, {115,15}, {125,15}, {141,15}, {159,15}, {169,15}, {180,15}, {193,15}, {203,15}, {214,15}, {224,15}, - {3,27}, {16,27}, {26,27}, {36,27}, {47,27}, {57,27}, {68,27}, {78,27}, {89,27}, {99,27}, {109,27}, {120,27}, {130,27}, {143,27}, {159,27}, {169,27}, {180,27}, {193,27}, {203,27}, {214,27}, - {4,40}, {18,40}, {29,40}, {39,40}, {50,40}, {60,40}, {70,40}, {81,40}, {91,40}, {102,40}, {112,40}, {123,40}, {139,40}, {193,40}, {203,40}, {214,40}, {224,34}, - {7,52}, {23,52}, {34,52}, {44,52}, {55,52}, {65,52}, {76,52}, {86,52}, {96,52}, {107,52}, {117,52}, {137,52}, {169,52}, {193,52}, {203,52}, {214,52}, - {1,64}, {14,64}, {27,64}, {66,64}, {105,64}, {118,64}, {131,64}, {145,64}, {159,64}, {169,64}, {180,64}, {198,64}, {214,64}, {224,58}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 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, 1, 1, 1, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q6/ansi_encoder/keyboard.json b/keyboards/keychron/q6/ansi_encoder/keyboard.json index a37b68f553..8b3ad779c9 100644 --- a/keyboards/keychron/q6/ansi_encoder/keyboard.json +++ b/keyboards/keychron/q6/ansi_encoder/keyboard.json @@ -27,6 +27,118 @@ "build": { "lto": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 13, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 57, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 68, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 89, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 102, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 123, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 159, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 180, "y": 0, "flags": 1}, + {"matrix": [0, 19], "x": 193, "y": 0, "flags": 1}, + {"matrix": [1, 19], "x": 203, "y": 0, "flags": 1}, + {"matrix": [2, 19], "x": 214, "y": 0, "flags": 1}, + {"matrix": [3, 19], "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": [1, 2], "x": 21, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 31, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 63, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 94, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 115, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 141, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 159, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 169, "y": 15, "flags": 1}, + {"matrix": [1, 16], "x": 180, "y": 15, "flags": 1}, + {"matrix": [1, 17], "x": 193, "y": 15, "flags": 8}, + {"matrix": [1, 18], "x": 203, "y": 15, "flags": 4}, + {"matrix": [0, 17], "x": 214, "y": 15, "flags": 4}, + {"matrix": [0, 18], "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": [2, 2], "x": 26, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 57, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 68, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 78, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 89, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 99, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 109, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 120, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 130, "y": 27, "flags": 4}, + {"matrix": [2, 13], "x": 143, "y": 27, "flags": 4}, + {"matrix": [2, 14], "x": 159, "y": 27, "flags": 1}, + {"matrix": [2, 15], "x": 169, "y": 27, "flags": 1}, + {"matrix": [2, 16], "x": 180, "y": 27, "flags": 1}, + {"matrix": [2, 17], "x": 193, "y": 27, "flags": 4}, + {"matrix": [2, 18], "x": 203, "y": 27, "flags": 4}, + {"matrix": [3, 14], "x": 214, "y": 27, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 18, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 29, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 39, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 50, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 81, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 91, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 102, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 123, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 139, "y": 40, "flags": 1}, + {"matrix": [3, 17], "x": 193, "y": 40, "flags": 4}, + {"matrix": [3, 18], "x": 203, "y": 40, "flags": 4}, + {"matrix": [3, 16], "x": 214, "y": 40, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 34, "flags": 4}, + {"matrix": [4, 0], "x": 7, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 23, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 34, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 44, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 65, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 76, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 86, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 117, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 137, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 169, "y": 52, "flags": 1}, + {"matrix": [4, 17], "x": 193, "y": 52, "flags": 4}, + {"matrix": [4, 18], "x": 203, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 214, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 27, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 66, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 105, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 118, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 145, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 159, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 17], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 18], "x": 214, "y": 64, "flags": 4}, + {"matrix": [4, 16], "x": 224, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_109": { "layout": [ diff --git a/keyboards/keychron/q6/iso/iso.c b/keyboards/keychron/q6/iso/iso.c index eb6cab855a..5316273776 100644 --- a/keyboards/keychron/q6/iso/iso.c +++ b/keyboards/keychron/q6/iso/iso.c @@ -142,37 +142,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA12, CB10_CA12, CB11_CA12}, {1, CB12_CA9, CB10_CA9, CB11_CA9}, }; - -#define __ NO_LED - -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, 39, 40, 16 }, - { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 17 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 73, 54, 55, 56, 57, 58, 18 }, - { 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, __, 72, 59, 77, 76, 74, 75, 19 }, - { 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, __, 90, 94, 91, 108, 92, 93, __ }, - { 95, 96, 97, __, __, __, 98, __, __, __, 99, 100, 101, 102, 103, 104, 105, 106, 107, __ }, - }, - { - // LED Index to Physical Position - {0,0}, {21,0}, {31,0}, {42,0}, {52,0}, {68,0}, {78,0}, {89,0}, {99,0}, {115,0}, {125,0}, {136,0}, {146,0}, {159,0}, {169,0}, {180,0}, {193,0}, {203,0}, {214,0}, {224,0}, - {0,15}, {10,15}, {21,15}, {31,15}, {42,15}, {52,15}, {63,15}, {73,15}, {83,15}, {94,15}, {104,15}, {115,15}, {125,15}, {141,15}, {159,15}, {169,15}, {180,15}, {193,15}, {203,15}, {214,15}, {224,15}, - {3,27}, {16,27}, {26,27}, {36,27}, {47,27}, {57,27}, {68,27}, {78,27}, {89,27}, {99,27}, {109,27}, {120,27}, {130,27}, {159,27}, {169,27}, {180,27}, {193,27}, {203,27}, {214,27}, - {4,40}, {18,40}, {29,40}, {39,40}, {50,40}, {60,40}, {70,40}, {81,40}, {91,40}, {102,40}, {112,40}, {123,40}, {133,40}, {147,36}, {193,40}, {203,40}, {214,40}, {224,34}, - {1,52}, {13,52}, {23,52}, {34,52}, {44,52}, {55,52}, {65,52}, {76,52}, {86,52}, {96,52}, {107,52}, {117,52}, {137,52}, {169,52}, {193,52}, {203,52}, {214,52}, - {1,64}, {14,64}, {27,64}, {66,64}, {105,64}, {118,64}, {131,64}, {145,64}, {159,64}, {169,64}, {180,64}, {198,64}, {214,64}, {224,58}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 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, 1, 1, 1, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q6/iso/keyboard.json b/keyboards/keychron/q6/iso/keyboard.json index 28730b2d74..fae62800a3 100644 --- a/keyboards/keychron/q6/iso/keyboard.json +++ b/keyboards/keychron/q6/iso/keyboard.json @@ -21,6 +21,119 @@ "build": { "lto": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 21, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 31, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 52, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 68, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 89, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 99, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 115, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 136, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 146, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 159, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 180, "y": 0, "flags": 1}, + {"matrix": [0, 19], "x": 193, "y": 0, "flags": 1}, + {"matrix": [1, 19], "x": 203, "y": 0, "flags": 1}, + {"matrix": [2, 19], "x": 214, "y": 0, "flags": 1}, + {"matrix": [3, 19], "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": [1, 2], "x": 21, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 31, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 63, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 94, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 115, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 141, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 159, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 169, "y": 15, "flags": 1}, + {"matrix": [1, 16], "x": 180, "y": 15, "flags": 1}, + {"matrix": [1, 17], "x": 193, "y": 15, "flags": 8}, + {"matrix": [1, 18], "x": 203, "y": 15, "flags": 4}, + {"matrix": [0, 17], "x": 214, "y": 15, "flags": 4}, + {"matrix": [0, 18], "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": [2, 2], "x": 26, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 57, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 68, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 78, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 89, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 99, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 109, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 120, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 130, "y": 27, "flags": 4}, + {"matrix": [2, 14], "x": 159, "y": 27, "flags": 1}, + {"matrix": [2, 15], "x": 169, "y": 27, "flags": 1}, + {"matrix": [2, 16], "x": 180, "y": 27, "flags": 1}, + {"matrix": [2, 17], "x": 193, "y": 27, "flags": 4}, + {"matrix": [2, 18], "x": 203, "y": 27, "flags": 4}, + {"matrix": [3, 14], "x": 214, "y": 27, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 18, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 29, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 39, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 50, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 81, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 91, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 102, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 123, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 133, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 147, "y": 36, "flags": 1}, + {"matrix": [3, 17], "x": 193, "y": 40, "flags": 4}, + {"matrix": [3, 18], "x": 203, "y": 40, "flags": 4}, + {"matrix": [3, 16], "x": 214, "y": 40, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 34, "flags": 4}, + {"matrix": [4, 0], "x": 1, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 13, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 23, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 34, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 44, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 65, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 76, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 86, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 117, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 137, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 169, "y": 52, "flags": 1}, + {"matrix": [4, 17], "x": 193, "y": 52, "flags": 4}, + {"matrix": [4, 18], "x": 203, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 214, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 27, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 66, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 105, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 118, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 145, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 159, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 17], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 18], "x": 214, "y": 64, "flags": 4}, + {"matrix": [4, 16], "x": 224, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_109": { "layout": [ diff --git a/keyboards/keychron/q6/iso_encoder/iso_encoder.c b/keyboards/keychron/q6/iso_encoder/iso_encoder.c index 439e1cee50..5316273776 100644 --- a/keyboards/keychron/q6/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q6/iso_encoder/iso_encoder.c @@ -142,37 +142,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA12, CB10_CA12, CB11_CA12}, {1, CB12_CA9, CB10_CA9, CB11_CA9}, }; - -#define __ NO_LED - -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, 39, 40, 16 }, - { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 17 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 73, 54, 55, 56, 57, 58, 18 }, - { 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, __, 72, 59, 77, 76, 74, 75, 19 }, - { 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, __, 90, 94, 91, 108, 92, 93, __ }, - { 95, 96, 97, __, __, __, 98, __, __, __, 99, 100, 101, 102, 103, 104, 105, 106, 107, __ }, - }, - { - // LED Index to Physical Position - {0,0}, {13,0}, {24,0}, {34,0}, {45,0}, {57,0}, {68,0}, {78,0}, {89,0}, {102,0}, {112,0}, {123,0}, {133,0}, {159,0}, {169,0}, {180,0}, {193,0}, {203,0}, {214,0}, {224,0}, - {0,15}, {10,15}, {21,15}, {31,15}, {42,15}, {52,15}, {63,15}, {73,15}, {83,15}, {94,15}, {104,15}, {115,15}, {125,15}, {141,15}, {159,15}, {169,15}, {180,15}, {193,15}, {203,15}, {214,15}, {224,15}, - {3,27}, {16,27}, {26,27}, {36,27}, {47,27}, {57,27}, {68,27}, {78,27}, {89,27}, {99,27}, {109,27}, {120,27}, {130,27}, {159,27}, {169,27}, {180,27}, {193,27}, {203,27}, {214,27}, - {4,40}, {18,40}, {29,40}, {39,40}, {50,40}, {60,40}, {70,40}, {81,40}, {91,40}, {102,40}, {112,40}, {123,40}, {133,40}, {147,36}, {193,40}, {203,40}, {214,40}, {224,34}, - {1,52}, {13,52}, {23,52}, {34,52}, {44,52}, {55,52}, {65,52}, {76,52}, {86,52}, {96,52}, {107,52}, {117,52}, {137,52}, {169,52}, {193,52}, {203,52}, {214,52}, - {1,64}, {14,64}, {27,64}, {66,64}, {105,64}, {118,64}, {131,64}, {145,64}, {159,64}, {169,64}, {180,64}, {198,64}, {214,64}, {224,58}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 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, 1, 1, 1, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q6/iso_encoder/keyboard.json b/keyboards/keychron/q6/iso_encoder/keyboard.json index 3fc4ee8f1c..b404e9f50d 100644 --- a/keyboards/keychron/q6/iso_encoder/keyboard.json +++ b/keyboards/keychron/q6/iso_encoder/keyboard.json @@ -27,6 +27,119 @@ "build": { "lto": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 13, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 57, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 68, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 89, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 102, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 123, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 159, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 180, "y": 0, "flags": 1}, + {"matrix": [0, 19], "x": 193, "y": 0, "flags": 1}, + {"matrix": [1, 19], "x": 203, "y": 0, "flags": 1}, + {"matrix": [2, 19], "x": 214, "y": 0, "flags": 1}, + {"matrix": [3, 19], "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": [1, 2], "x": 21, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 31, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 42, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 63, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 73, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 94, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 115, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 141, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 159, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 169, "y": 15, "flags": 1}, + {"matrix": [1, 16], "x": 180, "y": 15, "flags": 1}, + {"matrix": [1, 17], "x": 193, "y": 15, "flags": 8}, + {"matrix": [1, 18], "x": 203, "y": 15, "flags": 4}, + {"matrix": [0, 17], "x": 214, "y": 15, "flags": 4}, + {"matrix": [0, 18], "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": [2, 2], "x": 26, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 47, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 57, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 68, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 78, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 89, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 99, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 109, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 120, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 130, "y": 27, "flags": 4}, + {"matrix": [2, 14], "x": 159, "y": 27, "flags": 1}, + {"matrix": [2, 15], "x": 169, "y": 27, "flags": 1}, + {"matrix": [2, 16], "x": 180, "y": 27, "flags": 1}, + {"matrix": [2, 17], "x": 193, "y": 27, "flags": 4}, + {"matrix": [2, 18], "x": 203, "y": 27, "flags": 4}, + {"matrix": [3, 14], "x": 214, "y": 27, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 40, "flags": 8}, + {"matrix": [3, 1], "x": 18, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 29, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 39, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 50, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 70, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 81, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 91, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 102, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 123, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 133, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 147, "y": 36, "flags": 1}, + {"matrix": [3, 17], "x": 193, "y": 40, "flags": 4}, + {"matrix": [3, 18], "x": 203, "y": 40, "flags": 4}, + {"matrix": [3, 16], "x": 214, "y": 40, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 34, "flags": 4}, + {"matrix": [4, 0], "x": 1, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 13, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 23, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 34, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 44, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 65, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 76, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 86, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 117, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 137, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 169, "y": 52, "flags": 1}, + {"matrix": [4, 17], "x": 193, "y": 52, "flags": 4}, + {"matrix": [4, 18], "x": 203, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 214, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 27, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 66, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 105, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 118, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 145, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 159, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 169, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 17], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 18], "x": 214, "y": 64, "flags": 4}, + {"matrix": [4, 16], "x": 224, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_110": { "layout": [ diff --git a/keyboards/keychron/q60/ansi/ansi.c b/keyboards/keychron/q60/ansi/ansi.c index 8b702eb5a6..b69b303d36 100644 --- a/keyboards/keychron/q60/ansi/ansi.c +++ b/keyboards/keychron/q60/ansi/ansi.c @@ -92,34 +92,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {0, CB9_CA15, CB7_CA15, CB8_CA15}, {0, CB9_CA16, CB7_CA16, CB8_CA16}, }; - -#define __ NO_LED - -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 }, - { 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, 14, __ }, - }, - { - // LED Index to Physical Position - {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}, {208,0}, {224,0}, - {4,16}, {24,16}, {40,16}, {56,16}, {72,16}, {88,16}, {104,16}, {120,16}, {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, - {6,32}, {28,32}, {44,32}, {60,32}, {76,32}, {92,32}, {108,32}, {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, - {10,48}, {36,48}, {52,48}, {68,48}, {84,48}, {100,48}, {116,48}, {132,48}, {148,48}, {164,48}, {180,48}, {202,48}, {224,48}, - {24,64}, {44,64}, {112,64}, {180,64}, {200,64}, - }, - { - // RGB LED Index to Flag - 1, 4, 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, 4, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q60/ansi/keyboard.json b/keyboards/keychron/q60/ansi/keyboard.json index 83ee57d011..762ef21161 100644 --- a/keyboards/keychron/q60/ansi/keyboard.json +++ b/keyboards/keychron/q60/ansi/keyboard.json @@ -23,6 +23,70 @@ "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", + "rgb_matrix": { + "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": 208, "y": 0, "flags": 1}, + {"matrix": [4, 12], "x": 224, "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": 8}, + {"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, 13], "x": 214, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 202, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 24, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 44, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 180, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 200, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_60": { "layout": [ diff --git a/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c index 6c4c2abe21..f16cc60424 100644 --- a/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c @@ -102,34 +102,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA2, CB4_CA2, CB5_CA2}, // Down {1, CB6_CA1, CB4_CA1, CB5_CA1}, // Right }; - -#define __ NO_LED - -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 }, - }, - { - // LED Index to Physical Position - {20,0}, {33,0}, {47,0}, {60,0}, {73,0}, {86,0}, {99,0}, {112,0}, {125,0}, {138,0}, {151,0}, {164,0}, {177,0}, {197,0}, {224,0}, - {0,15}, {24,15}, {40,15}, {53,15}, {66,15}, {79,15}, {92,15}, {105,15}, {119,15}, {132,15}, {145,15}, {158,15}, {171,15}, {184,15}, {200,15}, {224,15}, - {0,30}, {25,30}, {43,30}, {56,30}, {69,30}, {83,30}, {96,30}, {109,30}, {122,30}, {135,30}, {148,30}, {161,30}, {174,30}, {195,30}, {224,30}, - {0,45}, {29,45}, {50,45}, {63,45}, {76,45}, {89,45}, {102,45}, {115,45}, {128,45}, {141,45}, {155,45}, {168,45}, {186,45}, {207,49}, {224,45}, - {0,60}, {22,60}, {38,60}, {55,60}, {104,60}, {151,60}, {164,60}, {177,60}, {194,64}, {207,64}, {220,64}, - }, - { - // RGB LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q65/ansi_encoder/keyboard.json b/keyboards/keychron/q65/ansi_encoder/keyboard.json index 76b17dd5fb..1fef623719 100644 --- a/keyboards/keychron/q65/ansi_encoder/keyboard.json +++ b/keyboards/keychron/q65/ansi_encoder/keyboard.json @@ -27,6 +27,82 @@ "dip_switch": true, "rgb_matrix": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 47, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 86, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 99, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 125, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 138, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 151, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 164, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 177, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 197, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 15, "flags": 1}, + {"matrix": [1, 2], "x": 40, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 79, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 92, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 105, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 119, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 145, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 158, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 171, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 184, "y": 15, "flags": 4}, + {"matrix": [1, 14], "x": 200, "y": 15, "flags": 4}, + {"matrix": [1, 15], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 30, "flags": 1}, + {"matrix": [2, 1], "x": 25, "y": 30, "flags": 9}, + {"matrix": [2, 2], "x": 43, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 83, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 109, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 122, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 135, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 148, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 161, "y": 30, "flags": 4}, + {"matrix": [2, 12], "x": 174, "y": 30, "flags": 4}, + {"matrix": [2, 14], "x": 195, "y": 30, "flags": 1}, + {"matrix": [2, 15], "x": 224, "y": 30, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 45, "flags": 1}, + {"matrix": [3, 1], "x": 29, "y": 45, "flags": 1}, + {"matrix": [3, 3], "x": 50, "y": 45, "flags": 4}, + {"matrix": [3, 4], "x": 63, "y": 45, "flags": 4}, + {"matrix": [3, 5], "x": 76, "y": 45, "flags": 4}, + {"matrix": [3, 6], "x": 89, "y": 45, "flags": 4}, + {"matrix": [3, 7], "x": 102, "y": 45, "flags": 4}, + {"matrix": [3, 8], "x": 115, "y": 45, "flags": 4}, + {"matrix": [3, 9], "x": 128, "y": 45, "flags": 4}, + {"matrix": [3, 10], "x": 141, "y": 45, "flags": 4}, + {"matrix": [3, 11], "x": 155, "y": 45, "flags": 4}, + {"matrix": [3, 12], "x": 168, "y": 45, "flags": 4}, + {"matrix": [3, 13], "x": 186, "y": 45, "flags": 1}, + {"matrix": [3, 14], "x": 207, "y": 49, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 45, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 60, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 60, "flags": 1}, + {"matrix": [4, 2], "x": 38, "y": 60, "flags": 1}, + {"matrix": [4, 3], "x": 55, "y": 60, "flags": 1}, + {"matrix": [4, 7], "x": 104, "y": 60, "flags": 4}, + {"matrix": [4, 10], "x": 151, "y": 60, "flags": 1}, + {"matrix": [4, 11], "x": 164, "y": 60, "flags": 1}, + {"matrix": [4, 12], "x": 177, "y": 60, "flags": 1}, + {"matrix": [4, 13], "x": 194, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 207, "y": 64, "flags": 1}, + {"matrix": [4, 15], "x": 220, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_73": { "layout": [ diff --git a/keyboards/keychron/s1/ansi/rgb/keyboard.json b/keyboards/keychron/s1/ansi/rgb/keyboard.json index fb52ee6423..2dbc05f2fa 100644 --- a/keyboards/keychron/s1/ansi/rgb/keyboard.json +++ b/keyboards/keychron/s1/ansi/rgb/keyboard.json @@ -33,6 +33,92 @@ "solid_splash": true }, "driver": "snled27351", + "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": [3, 12], "x": 209, "y": 0, "flags": 1}, + {"matrix": [0, 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": 1}, + {"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": 8}, + {"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": 160, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 175, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 200, "y": 38, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 51, "flags": 1}, + {"matrix": [4, 2], "x": 34, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 63, "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": 1}, + {"matrix": [4, 13], "x": 209, "y": 51, "flags": 1}, + {"matrix": [4, 14], "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, 6], "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": 1}, + {"matrix": [5, 13], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 224, "y": 64, "flags": 1} + ] "sleep": true }, "features": { diff --git a/keyboards/keychron/s1/ansi/rgb/rgb.c b/keyboards/keychron/s1/ansi/rgb/rgb.c index af6390f753..a40fdbd7cc 100644 --- a/keyboards/keychron/s1/ansi/rgb/rgb.c +++ b/keyboards/keychron/s1/ansi/rgb/rgb.c @@ -117,37 +117,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA14, CB4_CA14, CB5_CA14}, // down {1, CB6_CA16, CB4_CA16, CB5_CA16}, // right }; - -#define __ NO_LED - -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, 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, 14, 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 } - }, - { - // LED Index to Physical Position - {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}, {202,13}, {224,13}, - {4,26}, {22,26}, {37,26}, {52,26}, {67,26}, {82,26}, {97,26}, {112,26}, {127,26}, {142,26}, {157,26}, {172,26}, {187,26}, {205,26}, {224,26}, - {6,38}, {26,38}, {41,38}, {56,38}, {71,38}, {86,38}, {101,38}, {116,38}, {131,38}, {146,38}, {160,38}, {175,38}, {200,38}, {224,38}, - {9,51}, {34,51}, {48,51}, {63,51}, {78,51}, {93,51}, {108,51}, {123,51}, {138,51}, {153,51}, {168,51}, {189,51}, {209,51}, {224,51}, - {2,64}, {21,64}, {39,64}, {95,64}, {149,64}, {164,64}, {179,64}, {194,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c index 7a58d4deef..a9468493d6 100644 --- a/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c @@ -121,37 +121,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA2, CB4_CA2, CB5_CA2}, // Down {1, CB6_CA1, CB4_CA1, CB5_CA1}, // Right }; - -#define __ NO_LED - -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, 87 }, - }, - { - // LED Index to Physical Position - {19,0}, {34,0}, {46,0}, {60,1}, {72,3}, {87,6}, {99,8}, {120,8}, {132,6}, {147,3}, {159,1}, {173,0}, {185,0}, {201,1}, {219,1}, - {5,14}, {24,14}, {36,14}, {48,13}, {62,15}, {74,17}, {86,20}, {98,22}, {115,22}, {127,20}, {139,17}, {151,15}, {165,13}, {177,14}, {195,14}, {220,13}, - {4,24}, {24,24}, {40,24}, {53,24}, {65,27}, {77,29}, {89,31}, {112,33}, {124,31}, {136,29}, {148,27}, {160,24}, {174,24}, {186,24}, {201,24}, {222,25}, - {2,34}, {23,34}, {40,34}, {54,35}, {66,37}, {78,39}, {90,42}, {118,43}, {130,40}, {142,38}, {154,36}, {167,35}, {179,35}, {199,35}, {224,36}, - {0,45}, {24,45}, {44,45}, {57,46}, {69,48}, {81,51}, {93,53}, {111,54}, {123,52}, {135,50}, {147,48}, {159,46}, {173,45}, {190,45}, {210,47}, - {0,55}, {18,55}, {33,55}, {56,57}, {77,61}, {97,64}, {124,63}, {147,59}, {198,58}, {210,58}, {222,58}, - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 1, 4, 1, 4, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v10/ansi_encoder/keyboard.json b/keyboards/keychron/v10/ansi_encoder/keyboard.json index 825fa65ef8..98a700ab2e 100644 --- a/keyboards/keychron/v10/ansi_encoder/keyboard.json +++ b/keyboards/keychron/v10/ansi_encoder/keyboard.json @@ -27,6 +27,98 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 1], "x": 19, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 46, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 60, "y": 1, "flags": 1}, + {"matrix": [0, 5], "x": 72, "y": 3, "flags": 1}, + {"matrix": [0, 6], "x": 87, "y": 6, "flags": 1}, + {"matrix": [0, 7], "x": 99, "y": 8, "flags": 1}, + {"matrix": [0, 8], "x": 120, "y": 8, "flags": 1}, + {"matrix": [0, 9], "x": 132, "y": 6, "flags": 1}, + {"matrix": [0, 10], "x": 147, "y": 3, "flags": 1}, + {"matrix": [0, 11], "x": 159, "y": 1, "flags": 1}, + {"matrix": [0, 12], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 185, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 201, "y": 1, "flags": 1}, + {"matrix": [0, 15], "x": 219, "y": 1, "flags": 1}, + {"matrix": [1, 0], "x": 5, "y": 14, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 14, "flags": 1}, + {"matrix": [1, 2], "x": 36, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 62, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 74, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 86, "y": 20, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 22, "flags": 4}, + {"matrix": [1, 8], "x": 115, "y": 22, "flags": 4}, + {"matrix": [1, 9], "x": 127, "y": 20, "flags": 4}, + {"matrix": [1, 10], "x": 139, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 151, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 165, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 177, "y": 14, "flags": 4}, + {"matrix": [1, 14], "x": 195, "y": 14, "flags": 1}, + {"matrix": [1, 15], "x": 220, "y": 13, "flags": 1}, + {"matrix": [2, 0], "x": 4, "y": 24, "flags": 1}, + {"matrix": [2, 1], "x": 24, "y": 24, "flags": 1}, + {"matrix": [2, 2], "x": 40, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 53, "y": 24, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 77, "y": 29, "flags": 4}, + {"matrix": [2, 6], "x": 89, "y": 31, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 33, "flags": 4}, + {"matrix": [2, 8], "x": 124, "y": 31, "flags": 4}, + {"matrix": [2, 9], "x": 136, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 148, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 160, "y": 24, "flags": 4}, + {"matrix": [2, 12], "x": 174, "y": 24, "flags": 4}, + {"matrix": [2, 13], "x": 186, "y": 24, "flags": 4}, + {"matrix": [2, 14], "x": 201, "y": 24, "flags": 4}, + {"matrix": [2, 15], "x": 222, "y": 25, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 34, "flags": 1}, + {"matrix": [3, 1], "x": 23, "y": 34, "flags": 8}, + {"matrix": [3, 2], "x": 40, "y": 34, "flags": 4}, + {"matrix": [3, 3], "x": 54, "y": 35, "flags": 4}, + {"matrix": [3, 4], "x": 66, "y": 37, "flags": 4}, + {"matrix": [3, 5], "x": 78, "y": 39, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 42, "flags": 4}, + {"matrix": [3, 8], "x": 118, "y": 43, "flags": 4}, + {"matrix": [3, 9], "x": 130, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 142, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 36, "flags": 4}, + {"matrix": [3, 12], "x": 167, "y": 35, "flags": 4}, + {"matrix": [3, 13], "x": 179, "y": 35, "flags": 4}, + {"matrix": [3, 14], "x": 199, "y": 35, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 36, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 45, "flags": 1}, + {"matrix": [4, 1], "x": 24, "y": 45, "flags": 1}, + {"matrix": [4, 3], "x": 44, "y": 45, "flags": 4}, + {"matrix": [4, 4], "x": 57, "y": 46, "flags": 4}, + {"matrix": [4, 5], "x": 69, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 93, "y": 53, "flags": 4}, + {"matrix": [4, 8], "x": 111, "y": 54, "flags": 4}, + {"matrix": [4, 9], "x": 123, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 135, "y": 50, "flags": 4}, + {"matrix": [4, 11], "x": 147, "y": 48, "flags": 4}, + {"matrix": [4, 12], "x": 159, "y": 46, "flags": 4}, + {"matrix": [4, 13], "x": 173, "y": 45, "flags": 4}, + {"matrix": [4, 14], "x": 190, "y": 45, "flags": 1}, + {"matrix": [4, 15], "x": 210, "y": 47, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 55, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 55, "flags": 1}, + {"matrix": [5, 2], "x": 33, "y": 55, "flags": 1}, + {"matrix": [5, 3], "x": 56, "y": 57, "flags": 1}, + {"matrix": [5, 4], "x": 77, "y": 61, "flags": 4}, + {"matrix": [5, 7], "x": 97, "y": 64, "flags": 1}, + {"matrix": [5, 8], "x": 124, "y": 63, "flags": 4}, + {"matrix": [5, 9], "x": 147, "y": 59, "flags": 1}, + {"matrix": [5, 13], "x": 198, "y": 58, "flags": 1}, + {"matrix": [5, 14], "x": 210, "y": 58, "flags": 1}, + {"matrix": [5, 15], "x": 222, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_89": { "layout": [ diff --git a/keyboards/keychron/v10/iso_encoder/iso_encoder.c b/keyboards/keychron/v10/iso_encoder/iso_encoder.c index 359646b542..5092a283df 100644 --- a/keyboards/keychron/v10/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/v10/iso_encoder/iso_encoder.c @@ -122,37 +122,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA2, CB4_CA2, CB5_CA2}, // Down {1, CB6_CA1, CB4_CA1, CB5_CA1}, // Right }; - -#define __ NO_LED - -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, 59, 45 }, - { 46, 47, 48, 49, 50, 51, 52, __, 53, 54, 55, 56, 57, 58, 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, 87, 88 }, - }, - { - // LED Index to Physical Position - {0,0}, {19,0}, {34,0}, {60,1}, {72,3}, {87,6}, {99,8}, {120,8}, {132,6}, {147,3}, {159,1}, {173,0}, {185,0}, {201,1}, {219,1}, - {5,14}, {24,14}, {36,14}, {48,13}, {62,15}, {74,17}, {86,20}, {98,22}, {115,22}, {127,20}, {139,17}, {151,15}, {165,13}, {177,14}, {195,14}, {220,15}, - {4,24}, {24,24}, {40,24}, {53,24}, {65,27}, {77,29}, {89,31}, {112,33}, {124,31}, {136,29}, {148,27}, {160,24}, {176,24}, {189,24}, {222,25}, - {2,34}, {23,34}, {40,34}, {54,35}, {66,37}, {78,39}, {90,42}, {118,43}, {130,40}, {142,38}, {154,36}, {167,35}, {179,35}, {192,35}, {208,31}, {224,36}, - {0,45}, {18,45}, {31,45}, {44,45}, {57,46}, {69,48}, {81,51}, {93,53}, {111,54}, {123,52}, {135,50}, {147,48}, {159,46}, {173,45}, {190,45}, {210,47}, - {0,55}, {18,55}, {33,55}, {56,57}, {77,61}, {97,64}, {124,63}, {147,59}, {198,58}, {210,58}, {222,58}, - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 1, 4, 1, 4, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/v10/iso_encoder/keyboard.json b/keyboards/keychron/v10/iso_encoder/keyboard.json index ea2dfb35e2..7880fd6501 100644 --- a/keyboards/keychron/v10/iso_encoder/keyboard.json +++ b/keyboards/keychron/v10/iso_encoder/keyboard.json @@ -27,6 +27,99 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 1], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 19, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 60, "y": 1, "flags": 1}, + {"matrix": [0, 5], "x": 72, "y": 3, "flags": 1}, + {"matrix": [0, 6], "x": 87, "y": 6, "flags": 1}, + {"matrix": [0, 7], "x": 99, "y": 8, "flags": 1}, + {"matrix": [0, 8], "x": 120, "y": 8, "flags": 1}, + {"matrix": [0, 9], "x": 132, "y": 6, "flags": 1}, + {"matrix": [0, 10], "x": 147, "y": 3, "flags": 1}, + {"matrix": [0, 11], "x": 159, "y": 1, "flags": 1}, + {"matrix": [0, 12], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 185, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 201, "y": 1, "flags": 1}, + {"matrix": [0, 15], "x": 219, "y": 1, "flags": 1}, + {"matrix": [1, 0], "x": 5, "y": 14, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 14, "flags": 1}, + {"matrix": [1, 2], "x": 36, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 62, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 74, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 86, "y": 20, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 22, "flags": 4}, + {"matrix": [1, 8], "x": 115, "y": 22, "flags": 4}, + {"matrix": [1, 9], "x": 127, "y": 20, "flags": 4}, + {"matrix": [1, 10], "x": 139, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 151, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 165, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 177, "y": 14, "flags": 4}, + {"matrix": [1, 14], "x": 195, "y": 14, "flags": 1}, + {"matrix": [1, 15], "x": 220, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 4, "y": 24, "flags": 1}, + {"matrix": [2, 1], "x": 24, "y": 24, "flags": 1}, + {"matrix": [2, 2], "x": 40, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 53, "y": 24, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 77, "y": 29, "flags": 4}, + {"matrix": [2, 6], "x": 89, "y": 31, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 33, "flags": 4}, + {"matrix": [2, 8], "x": 124, "y": 31, "flags": 4}, + {"matrix": [2, 9], "x": 136, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 148, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 160, "y": 24, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 24, "flags": 4}, + {"matrix": [2, 13], "x": 189, "y": 24, "flags": 4}, + {"matrix": [2, 15], "x": 222, "y": 25, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 34, "flags": 1}, + {"matrix": [3, 1], "x": 23, "y": 34, "flags": 8}, + {"matrix": [3, 2], "x": 40, "y": 34, "flags": 4}, + {"matrix": [3, 3], "x": 54, "y": 35, "flags": 4}, + {"matrix": [3, 4], "x": 66, "y": 37, "flags": 4}, + {"matrix": [3, 5], "x": 78, "y": 39, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 42, "flags": 4}, + {"matrix": [3, 8], "x": 118, "y": 43, "flags": 4}, + {"matrix": [3, 9], "x": 130, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 142, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 36, "flags": 4}, + {"matrix": [3, 12], "x": 167, "y": 35, "flags": 4}, + {"matrix": [3, 13], "x": 179, "y": 35, "flags": 4}, + {"matrix": [2, 14], "x": 192, "y": 35, "flags": 4}, + {"matrix": [3, 14], "x": 208, "y": 31, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 36, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 45, "flags": 1}, + {"matrix": [4, 1], "x": 18, "y": 45, "flags": 1}, + {"matrix": [4, 2], "x": 31, "y": 45, "flags": 4}, + {"matrix": [4, 3], "x": 44, "y": 45, "flags": 4}, + {"matrix": [4, 4], "x": 57, "y": 46, "flags": 4}, + {"matrix": [4, 5], "x": 69, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 93, "y": 53, "flags": 4}, + {"matrix": [4, 8], "x": 111, "y": 54, "flags": 4}, + {"matrix": [4, 9], "x": 123, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 135, "y": 50, "flags": 4}, + {"matrix": [4, 11], "x": 147, "y": 48, "flags": 4}, + {"matrix": [4, 12], "x": 159, "y": 46, "flags": 4}, + {"matrix": [4, 13], "x": 173, "y": 45, "flags": 4}, + {"matrix": [4, 14], "x": 190, "y": 45, "flags": 1}, + {"matrix": [4, 15], "x": 210, "y": 47, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 55, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 55, "flags": 1}, + {"matrix": [5, 2], "x": 33, "y": 55, "flags": 1}, + {"matrix": [5, 3], "x": 56, "y": 57, "flags": 1}, + {"matrix": [5, 4], "x": 77, "y": 61, "flags": 4}, + {"matrix": [5, 7], "x": 97, "y": 64, "flags": 1}, + {"matrix": [5, 8], "x": 124, "y": 63, "flags": 4}, + {"matrix": [5, 9], "x": 147, "y": 59, "flags": 1}, + {"matrix": [5, 13], "x": 198, "y": 58, "flags": 1}, + {"matrix": [5, 14], "x": 210, "y": 58, "flags": 1}, + {"matrix": [5, 15], "x": 222, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_90": { "layout": [ From 0828fc4b6ff126b2466bd92110770ac412a1ad56 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:03:13 -0600 Subject: [PATCH 15/95] Migrate `g_led_config` to DD (K2) (#25602) --- keyboards/keebio/bamfk4/bamfk4.c | 37 ------ keyboards/keebio/bamfk4/keyboard.json | 34 ++++++ keyboards/keebio/bdn9/rev2/keyboard.json | 15 ++- keyboards/keebio/bdn9/rev2/rev2.c | 21 ---- keyboards/keebio/iris/rev6/keyboard.json | 70 ++++++++++++ keyboards/keebio/iris/rev6/rev6.c | 51 --------- keyboards/keebio/iris/rev7/keyboard.json | 70 ++++++++++++ keyboards/keebio/iris/rev7/rev7.c | 53 --------- keyboards/keebio/stick/keyboard.json | 16 ++- keyboards/keebio/stick/stick.c | 15 --- keyboards/keybee/keybee65/keybee65.c | 39 ------- keyboards/keybee/keybee65/keyboard.json | 70 ++++++++++++ keyboards/keycapsss/kimiko/kimiko.c | 83 -------------- keyboards/keycapsss/kimiko/rev1/keyboard.json | 65 +++++++++++ .../keychron/q10/ansi_encoder/ansi_encoder.c | 33 ------ .../keychron/q10/ansi_encoder/keyboard.json | 92 +++++++++++++++ .../keychron/q10/iso_encoder/iso_encoder.c | 33 ------ .../keychron/q10/iso_encoder/keyboard.json | 93 +++++++++++++++ .../keychron/q12/ansi_encoder/ansi_encoder.c | 32 ------ .../keychron/q12/ansi_encoder/keyboard.json | 106 +++++++++++++++++ .../keychron/q12/iso_encoder/iso_encoder.c | 32 ------ .../keychron/q12/iso_encoder/keyboard.json | 107 ++++++++++++++++++ 22 files changed, 736 insertions(+), 431 deletions(-) delete mode 100644 keyboards/keebio/bamfk4/bamfk4.c delete mode 100644 keyboards/keybee/keybee65/keybee65.c delete mode 100644 keyboards/keycapsss/kimiko/kimiko.c diff --git a/keyboards/keebio/bamfk4/bamfk4.c b/keyboards/keebio/bamfk4/bamfk4.c deleted file mode 100644 index 757bc03f72..0000000000 --- a/keyboards/keebio/bamfk4/bamfk4.c +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2022 Danny Nguyen (@nooges) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, NO_LED, NO_LED, NO_LED }, -}, { - // LED Index to Physical Position - //through switch - { 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 }, { 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, - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4, - 2, 2, 2, 2, - 2, 2, 2, 2, - 2, 2, 2, 2, - 2, 2, 2, 2 -} }; - - - -#endif \ No newline at end of file diff --git a/keyboards/keebio/bamfk4/keyboard.json b/keyboards/keebio/bamfk4/keyboard.json index 08b3900766..98ea684637 100644 --- a/keyboards/keebio/bamfk4/keyboard.json +++ b/keyboards/keebio/bamfk4/keyboard.json @@ -50,6 +50,40 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"x": 26, "y": 10, "flags": 4}, + {"x": 4, "y": 10, "flags": 4}, + {"x": 3, "y": 49, "flags": 4}, + {"x": 23, "y": 49, "flags": 4}, + {"x": 69, "y": 49, "flags": 4}, + {"x": 68, "y": 10, "flags": 4}, + {"x": 90, "y": 10, "flags": 4}, + {"x": 89, "y": 49, "flags": 4}, + {"x": 134, "y": 49, "flags": 4}, + {"x": 132, "y": 10, "flags": 4}, + {"x": 155, "y": 10, "flags": 4}, + {"x": 155, "y": 49, "flags": 4}, + {"x": 199, "y": 49, "flags": 4}, + {"x": 199, "y": 10, "flags": 4}, + {"x": 219, "y": 10, "flags": 4}, + {"x": 219, "y": 49, "flags": 4}, + {"x": 218, "y": 62, "flags": 2}, + {"x": 188, "y": 62, "flags": 2}, + {"x": 159, "y": 62, "flags": 2}, + {"x": 123, "y": 62, "flags": 2}, + {"x": 100, "y": 62, "flags": 2}, + {"x": 59, "y": 62, "flags": 2}, + {"x": 35, "y": 62, "flags": 2}, + {"x": 5, "y": 62, "flags": 2}, + {"x": 6, "y": 6, "flags": 2}, + {"x": 35, "y": 6, "flags": 2}, + {"x": 59, "y": 6, "flags": 2}, + {"x": 100, "y": 6, "flags": 2}, + {"x": 123, "y": 6, "flags": 2}, + {"x": 159, "y": 6, "flags": 2}, + {"x": 188, "y": 6, "flags": 2}, + {"x": 218, "y": 6, "flags": 2} + ], "max_brightness": 160, "sleep": true }, diff --git a/keyboards/keebio/bdn9/rev2/keyboard.json b/keyboards/keebio/bdn9/rev2/keyboard.json index a8a0c8d10d..ee1787e169 100644 --- a/keyboards/keebio/bdn9/rev2/keyboard.json +++ b/keyboards/keebio/bdn9/rev2/keyboard.json @@ -71,7 +71,20 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [1, 1], "x": 112, "y": 32, "flags": 4}, + {"matrix": [1, 2], "x": 224, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [2, 1], "x": 112, "y": 64, "flags": 4}, + {"matrix": [2, 2], "x": 224, "y": 64, "flags": 4}, + {"x": 56, "y": 64, "flags": 2}, + {"x": 168, "y": 64, "flags": 2} + ] }, "encoder": { "rotary": [ diff --git a/keyboards/keebio/bdn9/rev2/rev2.c b/keyboards/keebio/bdn9/rev2/rev2.c index 5c6d940325..70b0b0c4fd 100644 --- a/keyboards/keebio/bdn9/rev2/rev2.c +++ b/keyboards/keebio/bdn9/rev2/rev2.c @@ -1,26 +1,5 @@ #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 } -}, { - // LED Index to Physical Position - { 0, 0 }, { 112, 0 }, { 224, 0 }, - { 0, 32 }, { 112, 32 }, { 224, 32 }, - { 0, 64 }, { 112, 64 }, { 224, 64 }, - { 56, 64 }, { 168, 64 }, -}, { - // LED Index to Flag - 4, 4, 4, - 4, 4, 4, - 4, 4, 4, - 2, 2 -} }; -#endif - void eeconfig_init_kb(void) { #ifdef RGBLIGHT_ENABLE rgblight_enable(); // Enable RGB by default diff --git a/keyboards/keebio/iris/rev6/keyboard.json b/keyboards/keebio/iris/rev6/keyboard.json index ef240c5ab9..910c4b35ce 100644 --- a/keyboards/keebio/iris/rev6/keyboard.json +++ b/keyboards/keebio/iris/rev6/keyboard.json @@ -43,6 +43,76 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 5, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 5, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 2, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 2, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 3, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 18, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 18, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 30, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 43, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 42, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 42, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 45, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 45, "flags": 4}, + {"matrix": [4, 2], "x": 56, "y": 47, "flags": 4}, + {"matrix": [4, 3], "x": 72, "y": 58, "flags": 4}, + {"matrix": [4, 4], "x": 90, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 98, "y": 52, "flags": 4}, + {"x": 80, "y": 58, "flags": 2}, + {"x": 40, "y": 50, "flags": 2}, + {"x": 8, "y": 43, "flags": 2}, + {"x": 8, "y": 5, "flags": 2}, + {"x": 40, "y": 1, "flags": 2}, + {"x": 72, "y": 3, "flags": 2}, + {"matrix": [5, 0], "x": 224, "y": 5, "flags": 4}, + {"matrix": [5, 1], "x": 208, "y": 5, "flags": 4}, + {"matrix": [5, 2], "x": 192, "y": 2, "flags": 4}, + {"matrix": [5, 3], "x": 176, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 160, "y": 2, "flags": 4}, + {"matrix": [5, 5], "x": 144, "y": 3, "flags": 4}, + {"matrix": [6, 5], "x": 144, "y": 18, "flags": 4}, + {"matrix": [6, 4], "x": 160, "y": 18, "flags": 4}, + {"matrix": [6, 3], "x": 176, "y": 15, "flags": 4}, + {"matrix": [6, 2], "x": 192, "y": 13, "flags": 4}, + {"matrix": [6, 1], "x": 208, "y": 15, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 17, "flags": 4}, + {"matrix": [7, 0], "x": 224, "y": 32, "flags": 4}, + {"matrix": [7, 1], "x": 208, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 192, "y": 28, "flags": 4}, + {"matrix": [7, 3], "x": 176, "y": 27, "flags": 4}, + {"matrix": [7, 4], "x": 160, "y": 28, "flags": 4}, + {"matrix": [7, 5], "x": 144, "y": 30, "flags": 4}, + {"matrix": [8, 5], "x": 144, "y": 45, "flags": 4}, + {"matrix": [8, 4], "x": 160, "y": 45, "flags": 4}, + {"matrix": [8, 3], "x": 176, "y": 42, "flags": 4}, + {"matrix": [8, 2], "x": 192, "y": 40, "flags": 4}, + {"matrix": [8, 1], "x": 208, "y": 42, "flags": 4}, + {"matrix": [8, 0], "x": 224, "y": 43, "flags": 4}, + {"matrix": [9, 2], "x": 168, "y": 47, "flags": 4}, + {"matrix": [9, 3], "x": 152, "y": 58, "flags": 4}, + {"matrix": [9, 4], "x": 134, "y": 64, "flags": 4}, + {"matrix": [9, 5], "x": 126, "y": 52, "flags": 4}, + {"x": 144, "y": 58, "flags": 2}, + {"x": 184, "y": 50, "flags": 2}, + {"x": 216, "y": 43, "flags": 2}, + {"x": 216, "y": 5, "flags": 2}, + {"x": 184, "y": 1, "flags": 2}, + {"x": 152, "y": 3, "flags": 2} + ], "max_brightness": 160, "sleep": true, "split_count": [34, 34] diff --git a/keyboards/keebio/iris/rev6/rev6.c b/keyboards/keebio/iris/rev6/rev6.c index 3d9e18fd01..1547a0a6e8 100644 --- a/keyboards/keebio/iris/rev6/rev6.c +++ b/keyboards/keebio/iris/rev6/rev6.c @@ -13,57 +13,6 @@ along with this program. If not, see . */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - // Left Half - { 0, 1, 2, 3, 4, 5 }, - { 11, 10, 9, 8, 7, 6 }, - { 12, 13, 14, 15, 16, 17 }, - { 23, 22, 21, 20, 19, 18 }, - { NO_LED, NO_LED, 24, 25, 26, 27 }, - // Right Half - { 34, 35, 36, 37, 38, 39 }, - { 45, 44, 43, 42, 41, 40 }, - { 46, 47, 48, 49, 50, 51 }, - { 57, 56, 55, 54, 53, 52 }, - { NO_LED, NO_LED, 58, 59, 60, 61 } -}, { - // LED Index to Physical Position - // Left Half - { 0, 5 }, { 16, 5 }, { 32, 2 }, { 48, 0 }, { 64, 2 }, { 80, 3 }, - { 80, 17 }, { 64, 15 }, { 48, 13 }, { 32, 15 }, { 16, 18 }, { 0, 18 }, - { 0, 32 }, { 16, 32 }, { 32, 28 }, { 48, 27 }, { 64, 28 }, { 80, 30 }, - { 80, 43 }, { 64, 42 }, { 48, 40 }, { 32, 42 }, { 16, 45 }, { 0, 45 }, - { 56, 47 }, { 72, 58 }, { 90, 64 }, { 98, 52 }, - { 80, 58 }, { 40, 50 }, { 8, 43 }, { 8, 5 }, { 40, 1 }, { 72, 3 }, - // Right Half - { 224, 5 }, { 208, 5 }, { 192, 2 }, { 176, 0 }, { 160, 2 }, { 144, 3 }, - { 144, 18 }, { 160, 18 }, { 176, 15 }, { 192, 13 }, { 208, 15 }, { 224, 17 }, - { 224, 32 }, { 208, 32 }, { 192, 28 }, { 176, 27 }, { 160, 28 }, { 144, 30 }, - { 144, 45 }, { 160, 45 }, { 176, 42 }, { 192, 40 }, { 208, 42 }, { 224, 43 }, - { 168, 47 }, { 152, 58 }, { 134, 64 }, { 126, 52 }, - { 144, 58 }, { 184, 50 }, { 216, 43 }, { 216, 5 }, { 184, 1 }, { 152, 3 } -}, { - // LED Index to Flag - // Left Half - 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, - 2, 2, 2, 2, 2, 2, - // Right Half - 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, - 2, 2, 2, 2, 2, 2 - -} }; -#endif - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } diff --git a/keyboards/keebio/iris/rev7/keyboard.json b/keyboards/keebio/iris/rev7/keyboard.json index 79b410cd94..7b58990d18 100644 --- a/keyboards/keebio/iris/rev7/keyboard.json +++ b/keyboards/keebio/iris/rev7/keyboard.json @@ -41,6 +41,76 @@ "multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 5, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 5, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 2, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 2, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 3, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 18, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 18, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 30, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 43, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 42, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 42, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 45, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 45, "flags": 4}, + {"matrix": [4, 2], "x": 56, "y": 47, "flags": 4}, + {"matrix": [4, 3], "x": 72, "y": 58, "flags": 4}, + {"matrix": [4, 4], "x": 90, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 98, "y": 52, "flags": 4}, + {"x": 80, "y": 58, "flags": 2}, + {"x": 40, "y": 50, "flags": 2}, + {"x": 8, "y": 43, "flags": 2}, + {"x": 8, "y": 5, "flags": 2}, + {"x": 40, "y": 1, "flags": 2}, + {"x": 72, "y": 3, "flags": 2}, + {"matrix": [5, 0], "x": 224, "y": 5, "flags": 4}, + {"matrix": [5, 1], "x": 208, "y": 5, "flags": 4}, + {"matrix": [5, 2], "x": 192, "y": 2, "flags": 4}, + {"matrix": [5, 3], "x": 176, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 160, "y": 2, "flags": 4}, + {"matrix": [5, 5], "x": 144, "y": 3, "flags": 4}, + {"matrix": [6, 5], "x": 144, "y": 18, "flags": 4}, + {"matrix": [6, 4], "x": 160, "y": 18, "flags": 4}, + {"matrix": [6, 3], "x": 176, "y": 15, "flags": 4}, + {"matrix": [6, 2], "x": 192, "y": 13, "flags": 4}, + {"matrix": [6, 1], "x": 208, "y": 15, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 17, "flags": 4}, + {"matrix": [7, 0], "x": 224, "y": 32, "flags": 4}, + {"matrix": [7, 1], "x": 208, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 192, "y": 28, "flags": 4}, + {"matrix": [7, 3], "x": 176, "y": 27, "flags": 4}, + {"matrix": [7, 4], "x": 160, "y": 28, "flags": 4}, + {"matrix": [7, 5], "x": 144, "y": 30, "flags": 4}, + {"matrix": [8, 5], "x": 144, "y": 45, "flags": 4}, + {"matrix": [8, 4], "x": 160, "y": 45, "flags": 4}, + {"matrix": [8, 3], "x": 176, "y": 42, "flags": 4}, + {"matrix": [8, 2], "x": 192, "y": 40, "flags": 4}, + {"matrix": [8, 1], "x": 208, "y": 42, "flags": 4}, + {"matrix": [8, 0], "x": 224, "y": 43, "flags": 4}, + {"matrix": [9, 2], "x": 168, "y": 47, "flags": 4}, + {"matrix": [9, 3], "x": 152, "y": 58, "flags": 4}, + {"matrix": [9, 4], "x": 134, "y": 64, "flags": 4}, + {"matrix": [9, 5], "x": 126, "y": 52, "flags": 4}, + {"x": 144, "y": 58, "flags": 2}, + {"x": 184, "y": 50, "flags": 2}, + {"x": 216, "y": 43, "flags": 2}, + {"x": 216, "y": 5, "flags": 2}, + {"x": 184, "y": 1, "flags": 2}, + {"x": 152, "y": 3, "flags": 2} + ], "max_brightness": 120, "sleep": true, "split_count": [34, 34] diff --git a/keyboards/keebio/iris/rev7/rev7.c b/keyboards/keebio/iris/rev7/rev7.c index deab7acc8a..197a9dec75 100644 --- a/keyboards/keebio/iris/rev7/rev7.c +++ b/keyboards/keebio/iris/rev7/rev7.c @@ -13,59 +13,6 @@ along with this program. If not, see . */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - // Left Half - { 0, 1, 2, 3, 4, 5 }, - { 11, 10, 9, 8, 7, 6 }, - { 12, 13, 14, 15, 16, 17 }, - { 23, 22, 21, 20, 19, 18 }, - { NO_LED, NO_LED, 24, 25, 26, 27 }, - // Right Half - { 34, 35, 36, 37, 38, 39 }, - { 45, 44, 43, 42, 41, 40 }, - { 46, 47, 48, 49, 50, 51 }, - { 57, 56, 55, 54, 53, 52 }, - { NO_LED, NO_LED, 58, 59, 60, 61 } -}, { - // LED Index to Physical Position - // Left Half - { 0, 5 }, { 16, 5 }, { 32, 2 }, { 48, 0 }, { 64, 2 }, { 80, 3 }, - { 80, 17 }, { 64, 15 }, { 48, 13 }, { 32, 15 }, { 16, 18 }, { 0, 18 }, - { 0, 32 }, { 16, 32 }, { 32, 28 }, { 48, 27 }, { 64, 28 }, { 80, 30 }, - { 80, 43 }, { 64, 42 }, { 48, 40 }, { 32, 42 }, { 16, 45 }, { 0, 45 }, - { 56, 47 }, { 72, 58 }, { 90, 64 }, { 98, 52 }, - { 80, 58 }, { 40, 50 }, { 8, 43 }, { 8, 5 }, { 40, 1 }, { 72, 3 }, - // Right Half - { 224, 5 }, { 208, 5 }, { 192, 2 }, { 176, 0 }, { 160, 2 }, { 144, 3 }, - { 144, 18 }, { 160, 18 }, { 176, 15 }, { 192, 13 }, { 208, 15 }, { 224, 17 }, - { 224, 32 }, { 208, 32 }, { 192, 28 }, { 176, 27 }, { 160, 28 }, { 144, 30 }, - { 144, 45 }, { 160, 45 }, { 176, 42 }, { 192, 40 }, { 208, 42 }, { 224, 43 }, - { 168, 47 }, { 152, 58 }, { 134, 64 }, { 126, 52 }, - { 144, 58 }, { 184, 50 }, { 216, 43 }, { 216, 5 }, { 184, 1 }, { 152, 3 } -}, { - // LED Index to Flag - // Left Half - 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, - 2, 2, 2, 2, 2, 2, - // Right Half - 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, - 2, 2, 2, 2, 2, 2 - -} }; - - -#endif - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } diff --git a/keyboards/keebio/stick/keyboard.json b/keyboards/keebio/stick/keyboard.json index b8d1184ec1..00102c565a 100644 --- a/keyboards/keebio/stick/keyboard.json +++ b/keyboards/keebio/stick/keyboard.json @@ -54,7 +54,21 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 100, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 200, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 220, "y": 0, "flags": 4} + ] }, "encoder": { "rotary": [ diff --git a/keyboards/keebio/stick/stick.c b/keyboards/keebio/stick/stick.c index 6fac145091..e54a0aa09f 100644 --- a/keyboards/keebio/stick/stick.c +++ b/keyboards/keebio/stick/stick.c @@ -17,21 +17,6 @@ along with this program. If not, see . #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 } -}, { - // LED Index to Physical Position - { 0, 0 }, { 20, 0 }, { 40, 0 }, { 60, 0 }, - { 80, 0 }, { 100, 0 }, { 120, 0 }, { 140, 0 }, - { 160, 0 }, { 180, 0 }, { 200, 0 }, { 220, 0 }, -}, { - // LED Index to Flag - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 -} }; -#endif - void eeconfig_init_kb(void) { #ifdef RGBLIGHT_ENABLE rgblight_enable(); // Enable RGB by default diff --git a/keyboards/keybee/keybee65/keybee65.c b/keyboards/keybee/keybee65/keybee65.c deleted file mode 100644 index 6033dbeaaa..0000000000 --- a/keyboards/keybee/keybee65/keybee65.c +++ /dev/null @@ -1,39 +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" - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14 }, - { 29, NO_LED, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, - { 30, NO_LED, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 }, - { 57, NO_LED, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, NO_LED, 45, 44 }, - { 58, 59, 60, NO_LED, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 } - }, { - // LED Index to Physical Position - { 6, 2 }, { 20, 2 }, { 35, 11 }, { 49, 11 }, { 64, 11 }, { 78, 11 }, { 92, 11 }, { 107, 11 }, { 120, 11 }, { 135, 11 }, { 148, 11 }, { 164, 11 }, { 177, 11 }, { 198, 11 }, { 220, 11 }, - { 9, 24 }, { 26, 24 }, { 42, 24 }, { 56, 24 }, { 70, 24 }, { 85, 24 }, { 100, 24 }, { 113, 24 }, { 128, 24 }, { 143, 24 }, { 156, 24 }, { 170, 24 }, { 184, 24 }, { 202, 24 }, { 220, 24 }, - { 11, 38 }, { 29, 38 }, { 46, 38 }, { 60, 38 }, { 74, 38 }, { 88, 38 }, { 103, 38 }, { 118, 38 }, { 132, 38 }, { 146, 38 }, { 160, 38 }, { 174, 38 }, { 198, 38 }, { 220, 38 }, - { 16, 53 }, { 37, 53 }, { 52, 53 }, { 66, 53 }, { 80, 53 }, { 96, 53 }, { 110, 53 }, { 125, 53 }, { 140, 53 }, { 153, 53 }, { 168, 53 }, { 187, 53 }, { 207, 53 }, { 220, 53 }, - { 6, 68 }, { 25, 68 }, { 44, 68 }, { 96, 68 }, { 148, 68 }, { 164, 68 }, { 180, 68 }, { 192, 68 }, { 207, 68 }, { 220, 68 } - }, { - // 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, 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, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 - } -}; diff --git a/keyboards/keybee/keybee65/keyboard.json b/keyboards/keybee/keybee65/keyboard.json index a2a4862836..a1f3426dbe 100644 --- a/keyboards/keybee/keybee65/keyboard.json +++ b/keyboards/keybee/keybee65/keyboard.json @@ -12,6 +12,76 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 6, "y": 2, "flags": 4}, + {"matrix": [0, 1], "x": 20, "y": 2, "flags": 4}, + {"matrix": [0, 2], "x": 35, "y": 11, "flags": 4}, + {"matrix": [0, 3], "x": 49, "y": 11, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 11, "flags": 4}, + {"matrix": [0, 5], "x": 78, "y": 11, "flags": 4}, + {"matrix": [0, 6], "x": 92, "y": 11, "flags": 4}, + {"matrix": [0, 7], "x": 107, "y": 11, "flags": 4}, + {"matrix": [0, 8], "x": 120, "y": 11, "flags": 4}, + {"matrix": [0, 9], "x": 135, "y": 11, "flags": 4}, + {"matrix": [0, 10], "x": 148, "y": 11, "flags": 4}, + {"matrix": [0, 11], "x": 164, "y": 11, "flags": 4}, + {"matrix": [0, 12], "x": 177, "y": 11, "flags": 4}, + {"matrix": [0, 14], "x": 198, "y": 11, "flags": 4}, + {"matrix": [0, 15], "x": 220, "y": 11, "flags": 4}, + {"matrix": [1, 15], "x": 9, "y": 24, "flags": 4}, + {"matrix": [1, 14], "x": 26, "y": 24, "flags": 4}, + {"matrix": [1, 13], "x": 42, "y": 24, "flags": 4}, + {"matrix": [1, 12], "x": 56, "y": 24, "flags": 4}, + {"matrix": [1, 11], "x": 70, "y": 24, "flags": 4}, + {"matrix": [1, 10], "x": 85, "y": 24, "flags": 4}, + {"matrix": [1, 9], "x": 100, "y": 24, "flags": 4}, + {"matrix": [1, 8], "x": 113, "y": 24, "flags": 4}, + {"matrix": [1, 7], "x": 128, "y": 24, "flags": 4}, + {"matrix": [1, 6], "x": 143, "y": 24, "flags": 4}, + {"matrix": [1, 5], "x": 156, "y": 24, "flags": 4}, + {"matrix": [1, 4], "x": 170, "y": 24, "flags": 4}, + {"matrix": [1, 3], "x": 184, "y": 24, "flags": 4}, + {"matrix": [1, 2], "x": 202, "y": 24, "flags": 4}, + {"matrix": [1, 0], "x": 220, "y": 24, "flags": 4}, + {"matrix": [2, 0], "x": 11, "y": 38, "flags": 4}, + {"matrix": [2, 2], "x": 29, "y": 38, "flags": 4}, + {"matrix": [2, 3], "x": 46, "y": 38, "flags": 4}, + {"matrix": [2, 4], "x": 60, "y": 38, "flags": 4}, + {"matrix": [2, 5], "x": 74, "y": 38, "flags": 4}, + {"matrix": [2, 6], "x": 88, "y": 38, "flags": 4}, + {"matrix": [2, 7], "x": 103, "y": 38, "flags": 4}, + {"matrix": [2, 8], "x": 118, "y": 38, "flags": 4}, + {"matrix": [2, 9], "x": 132, "y": 38, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 38, "flags": 4}, + {"matrix": [2, 11], "x": 160, "y": 38, "flags": 4}, + {"matrix": [2, 12], "x": 174, "y": 38, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 38, "flags": 4}, + {"matrix": [2, 15], "x": 220, "y": 38, "flags": 4}, + {"matrix": [3, 15], "x": 16, "y": 53, "flags": 4}, + {"matrix": [3, 14], "x": 37, "y": 53, "flags": 4}, + {"matrix": [3, 12], "x": 52, "y": 53, "flags": 4}, + {"matrix": [3, 11], "x": 66, "y": 53, "flags": 4}, + {"matrix": [3, 10], "x": 80, "y": 53, "flags": 4}, + {"matrix": [3, 9], "x": 96, "y": 53, "flags": 4}, + {"matrix": [3, 8], "x": 110, "y": 53, "flags": 4}, + {"matrix": [3, 7], "x": 125, "y": 53, "flags": 4}, + {"matrix": [3, 6], "x": 140, "y": 53, "flags": 4}, + {"matrix": [3, 5], "x": 153, "y": 53, "flags": 4}, + {"matrix": [3, 4], "x": 164, "y": 53, "flags": 4}, + {"matrix": [3, 3], "x": 187, "y": 53, "flags": 4}, + {"matrix": [3, 2], "x": 207, "y": 53, "flags": 4}, + {"matrix": [3, 0], "x": 220, "y": 53, "flags": 4}, + {"matrix": [4, 0], "x": 6, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 25, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 44, "y": 64, "flags": 4}, + {"matrix": [4, 7], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 148, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 164, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 180, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 207, "y": 64, "flags": 4}, + {"matrix": [4, 15], "x": 220, "y": 64, "flags": 4} + ], "sleep": true }, "rgblight": { diff --git a/keyboards/keycapsss/kimiko/kimiko.c b/keyboards/keycapsss/kimiko/kimiko.c deleted file mode 100644 index c99a966603..0000000000 --- a/keyboards/keycapsss/kimiko/kimiko.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright 2023 @BenRoe (keycapsss.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" - -#ifdef KEYBOARD_keycapsss_kimiko_rev1 -#ifdef RGB_MATRIX_ENABLE - -//Thanks to Ben (keycapsss) for helpipng me to create g_led_config - -// Physical LED position -// X 0 16 32 48 64 80 96 112 128 144 160 176 208 224 -// -----------------------------------------------------------| Y -// 5 4 3 2 1 0 0 1 2 3 4 5 | 0 -// 6 7 8 9 10 11 11 10 9 8 7 6 | 16 -// 17 16 15 14 13 12 12 13 14 15 16 17 | 32 -// 18 19 20 21 22 23 24 24 23 22 21 20 19 18 | 48 -// 29 28 27 26 25 25 26 27 28 29 | 64 - -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 5, 4, 3, 2, 1, 0 }, - { 6, 7, 8, 9, 10, 11 }, - { 17, 16, 15, 14, 13, 12 }, - { 18, 19, 20, 21, 22, 23 }, - { 29, 28, 27, 26, 25, 24 }, - { 35, 34, 33, 32, 31, 30 }, - { 36, 37, 38, 39, 40, 41 }, - { 47, 46, 45, 44, 43, 42 }, - { 48, 49, 50, 51, 52, 53 }, - { 59, 58, 57, 56, 55, 54 } -}, { - // LED Index to Physical Position - // Left half - { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, - { 0, 16 }, { 16, 16 }, { 32, 16 }, { 48, 16 }, { 64, 16 }, { 80, 16 }, - { 80, 32 }, { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 32 }, - { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, - { 96, 48 }, { 96, 64 }, { 80, 64 }, { 64, 64 }, { 48, 64 }, { 32, 64 }, - // Right half - { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 208, 0 }, { 224, 0 }, - { 224, 16 }, { 208, 16 }, { 176, 16 }, { 160, 16 }, { 144, 16 }, { 128, 16 }, - { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 208, 32 }, { 224, 32 }, - { 224, 48 }, { 208, 48 }, { 176, 48 }, { 160, 48 }, { 144, 48 }, { 128, 48 }, - { 112, 48 }, { 112, 64 }, { 128, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 } - -}, { - // LED Index to Flag - // 0x01 = 1 = modifier key - // 0x02 = 2 = underglow - // 0x04 = 4 = key backlight - // 0x08 = 8 = keyboard state indication - // Left half - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 1, - 4, 4, 4, 4, 4, 1, - 4, 4, 1, 1, 1, 1, - // Right half - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, - 4, 4, 1, 1, 1, 1 -} }; - -#endif // RGB_MATRIX_ENABLE -#endif // KEYBOARD_keycapsss_kimiko_rev1 - - diff --git a/keyboards/keycapsss/kimiko/rev1/keyboard.json b/keyboards/keycapsss/kimiko/rev1/keyboard.json index ae09eb83c8..bf9aa76ed7 100644 --- a/keyboards/keycapsss/kimiko/rev1/keyboard.json +++ b/keyboards/keycapsss/kimiko/rev1/keyboard.json @@ -40,6 +40,71 @@ "led_count": 60, "split_count": [30, 30] }, + "rgb_matrix": { + "driver": "ws2812", + "layout": [ + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 1}, + {"matrix": [4, 5], "x": 96, "y": 48, "flags": 4}, + {"matrix": [4, 4], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 80, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 64, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 48, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 32, "y": 64, "flags": 1}, + {"matrix": [5, 5], "x": 128, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 144, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 160, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 176, "y": 0, "flags": 4}, + {"matrix": [5, 1], "x": 208, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 224, "y": 0, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 208, "y": 16, "flags": 4}, + {"matrix": [6, 2], "x": 176, "y": 16, "flags": 4}, + {"matrix": [6, 3], "x": 160, "y": 16, "flags": 4}, + {"matrix": [6, 4], "x": 144, "y": 16, "flags": 4}, + {"matrix": [6, 5], "x": 128, "y": 16, "flags": 4}, + {"matrix": [7, 5], "x": 128, "y": 32, "flags": 4}, + {"matrix": [7, 4], "x": 144, "y": 32, "flags": 4}, + {"matrix": [7, 3], "x": 160, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 176, "y": 32, "flags": 4}, + {"matrix": [7, 1], "x": 208, "y": 32, "flags": 4}, + {"matrix": [7, 0], "x": 224, "y": 32, "flags": 4}, + {"matrix": [8, 0], "x": 224, "y": 48, "flags": 1}, + {"matrix": [8, 1], "x": 208, "y": 48, "flags": 4}, + {"matrix": [8, 2], "x": 176, "y": 48, "flags": 4}, + {"matrix": [8, 3], "x": 160, "y": 48, "flags": 4}, + {"matrix": [8, 4], "x": 144, "y": 48, "flags": 4}, + {"matrix": [8, 5], "x": 128, "y": 48, "flags": 4}, + {"matrix": [9, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [9, 4], "x": 112, "y": 64, "flags": 4}, + {"matrix": [9, 3], "x": 128, "y": 64, "flags": 1}, + {"matrix": [9, 2], "x": 144, "y": 64, "flags": 1}, + {"matrix": [9, 1], "x": 160, "y": 64, "flags": 1}, + {"matrix": [9, 0], "x": 176, "y": 64, "flags": 1} + ] + }, "ws2812": { "pin": "D3" }, diff --git a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c index a4432cd4ce..5359d2b30b 100644 --- a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c @@ -121,37 +121,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA2, CB4_CA2, CB5_CA2}, // Down {1, CB6_CA1, CB4_CA1, CB5_CA1}, // Right }; - -#define __ NO_LED - -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, 87 }, - }, - { - // LED Index to Physical Position - {19,0}, {34,0}, {46,0}, {60,1}, {72,3}, {87,6}, {99,8}, {120,8}, {132,6}, {147,3}, {159,1}, {173,0}, {185,0}, {201,1}, {219,1}, - {5,14}, {24,14}, {36,14}, {48,13}, {62,15}, {74,17}, {86,20}, {98,22}, {115,22}, {127,20}, {139,17}, {151,15}, {165,13}, {177,14}, {195,14}, {220,13}, - {4,24}, {24,24}, {40,24}, {53,24}, {65,27}, {77,29}, {89,31}, {112,33}, {124,31}, {136,29}, {148,27}, {160,24}, {174,24}, {186,24}, {201,24}, {222,25}, - {2,34}, {23,34}, {40,34}, {54,35}, {66,37}, {78,39}, {90,42}, {118,43}, {130,40}, {142,38}, {154,36}, {167,35}, {179,35}, {199,35}, {224,36}, - {0,45}, {24,45}, {44,45}, {57,46}, {69,48}, {81,51}, {93,53}, {111,54}, {123,52}, {135,50}, {147,48}, {159,46}, {173,45}, {190,45}, {210,47}, - {0,55}, {18,55}, {33,55}, {56,57}, {77,61}, {97,64}, {124,63}, {147,59}, {198,58}, {210,58}, {222,58}, - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 1, 4, 1, 4, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q10/ansi_encoder/keyboard.json b/keyboards/keychron/q10/ansi_encoder/keyboard.json index f47136edf7..6cfb637b0d 100644 --- a/keyboards/keychron/q10/ansi_encoder/keyboard.json +++ b/keyboards/keychron/q10/ansi_encoder/keyboard.json @@ -27,6 +27,98 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 1], "x": 19, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 46, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 60, "y": 1, "flags": 1}, + {"matrix": [0, 5], "x": 72, "y": 3, "flags": 1}, + {"matrix": [0, 6], "x": 87, "y": 6, "flags": 1}, + {"matrix": [0, 7], "x": 99, "y": 8, "flags": 1}, + {"matrix": [0, 8], "x": 120, "y": 8, "flags": 1}, + {"matrix": [0, 9], "x": 132, "y": 6, "flags": 1}, + {"matrix": [0, 10], "x": 147, "y": 3, "flags": 1}, + {"matrix": [0, 11], "x": 159, "y": 1, "flags": 1}, + {"matrix": [0, 12], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 185, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 201, "y": 1, "flags": 1}, + {"matrix": [0, 15], "x": 219, "y": 1, "flags": 1}, + {"matrix": [1, 0], "x": 5, "y": 14, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 14, "flags": 1}, + {"matrix": [1, 2], "x": 36, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 62, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 74, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 86, "y": 20, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 22, "flags": 4}, + {"matrix": [1, 8], "x": 115, "y": 22, "flags": 4}, + {"matrix": [1, 9], "x": 127, "y": 20, "flags": 4}, + {"matrix": [1, 10], "x": 139, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 151, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 165, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 177, "y": 14, "flags": 4}, + {"matrix": [1, 14], "x": 195, "y": 14, "flags": 1}, + {"matrix": [1, 15], "x": 220, "y": 13, "flags": 1}, + {"matrix": [2, 0], "x": 4, "y": 24, "flags": 1}, + {"matrix": [2, 1], "x": 24, "y": 24, "flags": 1}, + {"matrix": [2, 2], "x": 40, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 53, "y": 24, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 77, "y": 29, "flags": 4}, + {"matrix": [2, 6], "x": 89, "y": 31, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 33, "flags": 4}, + {"matrix": [2, 8], "x": 124, "y": 31, "flags": 4}, + {"matrix": [2, 9], "x": 136, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 148, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 160, "y": 24, "flags": 4}, + {"matrix": [2, 12], "x": 174, "y": 24, "flags": 4}, + {"matrix": [2, 13], "x": 186, "y": 24, "flags": 4}, + {"matrix": [2, 14], "x": 201, "y": 24, "flags": 4}, + {"matrix": [2, 15], "x": 222, "y": 25, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 34, "flags": 1}, + {"matrix": [3, 1], "x": 23, "y": 34, "flags": 8}, + {"matrix": [3, 2], "x": 40, "y": 34, "flags": 4}, + {"matrix": [3, 3], "x": 54, "y": 35, "flags": 4}, + {"matrix": [3, 4], "x": 66, "y": 37, "flags": 4}, + {"matrix": [3, 5], "x": 78, "y": 39, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 42, "flags": 4}, + {"matrix": [3, 8], "x": 118, "y": 43, "flags": 4}, + {"matrix": [3, 9], "x": 130, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 142, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 36, "flags": 4}, + {"matrix": [3, 12], "x": 167, "y": 35, "flags": 4}, + {"matrix": [3, 13], "x": 179, "y": 35, "flags": 4}, + {"matrix": [3, 14], "x": 199, "y": 35, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 36, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 45, "flags": 1}, + {"matrix": [4, 1], "x": 24, "y": 45, "flags": 1}, + {"matrix": [4, 3], "x": 44, "y": 45, "flags": 4}, + {"matrix": [4, 4], "x": 57, "y": 46, "flags": 4}, + {"matrix": [4, 5], "x": 69, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 93, "y": 53, "flags": 4}, + {"matrix": [4, 8], "x": 111, "y": 54, "flags": 4}, + {"matrix": [4, 9], "x": 123, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 135, "y": 50, "flags": 4}, + {"matrix": [4, 11], "x": 147, "y": 48, "flags": 4}, + {"matrix": [4, 12], "x": 159, "y": 46, "flags": 4}, + {"matrix": [4, 13], "x": 173, "y": 45, "flags": 4}, + {"matrix": [4, 14], "x": 190, "y": 45, "flags": 1}, + {"matrix": [4, 15], "x": 210, "y": 47, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 55, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 55, "flags": 1}, + {"matrix": [5, 2], "x": 33, "y": 55, "flags": 1}, + {"matrix": [5, 3], "x": 56, "y": 57, "flags": 1}, + {"matrix": [5, 4], "x": 77, "y": 61, "flags": 4}, + {"matrix": [5, 7], "x": 97, "y": 64, "flags": 1}, + {"matrix": [5, 8], "x": 124, "y": 63, "flags": 4}, + {"matrix": [5, 9], "x": 147, "y": 59, "flags": 1}, + {"matrix": [5, 13], "x": 198, "y": 58, "flags": 1}, + {"matrix": [5, 14], "x": 210, "y": 58, "flags": 1}, + {"matrix": [5, 15], "x": 222, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_89": { "layout": [ diff --git a/keyboards/keychron/q10/iso_encoder/iso_encoder.c b/keyboards/keychron/q10/iso_encoder/iso_encoder.c index 9ff43263b2..c857c854ac 100644 --- a/keyboards/keychron/q10/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q10/iso_encoder/iso_encoder.c @@ -122,37 +122,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB6_CA2, CB4_CA2, CB5_CA2}, // Down {1, CB6_CA1, CB4_CA1, CB5_CA1}, // Right }; - -#define __ NO_LED - -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, 59, 45 }, - { 46, 47, 48, 49, 50, 51, 52, __, 53, 54, 55, 56, 57, 58, 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, 87, 88 }, - }, - { - // LED Index to Physical Position - {0,0}, {19,0}, {34,0}, {60,1}, {72,3}, {87,6}, {99,8}, {120,8}, {132,6}, {147,3}, {159,1}, {173,0}, {185,0}, {201,1}, {219,1}, - {5,14}, {24,14}, {36,14}, {48,13}, {62,15}, {74,17}, {86,20}, {98,22}, {115,22}, {127,20}, {139,17}, {151,15}, {165,13}, {177,14}, {195,14}, {220,15}, - {4,24}, {24,24}, {40,24}, {53,24}, {65,27}, {77,29}, {89,31}, {112,33}, {124,31}, {136,29}, {148,27}, {160,24}, {176,24}, {189,24}, {222,25}, - {2,34}, {23,34}, {40,34}, {54,35}, {66,37}, {78,39}, {90,42}, {118,43}, {130,40}, {142,38}, {154,36}, {167,35}, {179,35}, {192,35}, {208,31}, {224,36}, - {0,45}, {18,45}, {31,45}, {44,45}, {57,46}, {69,48}, {81,51}, {93,53}, {111,54}, {123,52}, {135,50}, {147,48}, {159,46}, {173,45}, {190,45}, {210,47}, - {0,55}, {18,55}, {33,55}, {56,57}, {77,61}, {97,64}, {124,63}, {147,59}, {198,58}, {210,58}, {222,58}, - }, - { - // RGB LED Index to Flag - 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, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 1, 4, 1, 4, 1, 1, 1, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q10/iso_encoder/keyboard.json b/keyboards/keychron/q10/iso_encoder/keyboard.json index 5ec70d1a14..b83015971f 100644 --- a/keyboards/keychron/q10/iso_encoder/keyboard.json +++ b/keyboards/keychron/q10/iso_encoder/keyboard.json @@ -27,6 +27,99 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 1], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 19, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 60, "y": 1, "flags": 1}, + {"matrix": [0, 5], "x": 72, "y": 3, "flags": 1}, + {"matrix": [0, 6], "x": 87, "y": 6, "flags": 1}, + {"matrix": [0, 7], "x": 99, "y": 8, "flags": 1}, + {"matrix": [0, 8], "x": 120, "y": 8, "flags": 1}, + {"matrix": [0, 9], "x": 132, "y": 6, "flags": 1}, + {"matrix": [0, 10], "x": 147, "y": 3, "flags": 1}, + {"matrix": [0, 11], "x": 159, "y": 1, "flags": 1}, + {"matrix": [0, 12], "x": 173, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 185, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 201, "y": 1, "flags": 1}, + {"matrix": [0, 15], "x": 219, "y": 1, "flags": 1}, + {"matrix": [1, 0], "x": 5, "y": 14, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 14, "flags": 1}, + {"matrix": [1, 2], "x": 36, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 62, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 74, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 86, "y": 20, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 22, "flags": 4}, + {"matrix": [1, 8], "x": 115, "y": 22, "flags": 4}, + {"matrix": [1, 9], "x": 127, "y": 20, "flags": 4}, + {"matrix": [1, 10], "x": 139, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 151, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 165, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 177, "y": 14, "flags": 4}, + {"matrix": [1, 14], "x": 195, "y": 14, "flags": 1}, + {"matrix": [1, 15], "x": 220, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 4, "y": 24, "flags": 1}, + {"matrix": [2, 1], "x": 24, "y": 24, "flags": 1}, + {"matrix": [2, 2], "x": 40, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 53, "y": 24, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 77, "y": 29, "flags": 4}, + {"matrix": [2, 6], "x": 89, "y": 31, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 33, "flags": 4}, + {"matrix": [2, 8], "x": 124, "y": 31, "flags": 4}, + {"matrix": [2, 9], "x": 136, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 148, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 160, "y": 24, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 24, "flags": 4}, + {"matrix": [2, 13], "x": 189, "y": 24, "flags": 4}, + {"matrix": [2, 15], "x": 222, "y": 25, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 34, "flags": 1}, + {"matrix": [3, 1], "x": 23, "y": 34, "flags": 8}, + {"matrix": [3, 2], "x": 40, "y": 34, "flags": 4}, + {"matrix": [3, 3], "x": 54, "y": 35, "flags": 4}, + {"matrix": [3, 4], "x": 66, "y": 37, "flags": 4}, + {"matrix": [3, 5], "x": 78, "y": 39, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 42, "flags": 4}, + {"matrix": [3, 8], "x": 118, "y": 43, "flags": 4}, + {"matrix": [3, 9], "x": 130, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 142, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 36, "flags": 4}, + {"matrix": [3, 12], "x": 167, "y": 35, "flags": 4}, + {"matrix": [3, 13], "x": 179, "y": 35, "flags": 4}, + {"matrix": [2, 14], "x": 192, "y": 35, "flags": 4}, + {"matrix": [3, 14], "x": 208, "y": 31, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 36, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 45, "flags": 1}, + {"matrix": [4, 1], "x": 18, "y": 45, "flags": 1}, + {"matrix": [4, 2], "x": 31, "y": 45, "flags": 4}, + {"matrix": [4, 3], "x": 44, "y": 45, "flags": 4}, + {"matrix": [4, 4], "x": 57, "y": 46, "flags": 4}, + {"matrix": [4, 5], "x": 69, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 93, "y": 53, "flags": 4}, + {"matrix": [4, 8], "x": 111, "y": 54, "flags": 4}, + {"matrix": [4, 9], "x": 123, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 135, "y": 50, "flags": 4}, + {"matrix": [4, 11], "x": 147, "y": 48, "flags": 4}, + {"matrix": [4, 12], "x": 159, "y": 46, "flags": 4}, + {"matrix": [4, 13], "x": 173, "y": 45, "flags": 4}, + {"matrix": [4, 14], "x": 190, "y": 45, "flags": 1}, + {"matrix": [4, 15], "x": 210, "y": 47, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 55, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 55, "flags": 1}, + {"matrix": [5, 2], "x": 33, "y": 55, "flags": 1}, + {"matrix": [5, 3], "x": 56, "y": 57, "flags": 1}, + {"matrix": [5, 4], "x": 77, "y": 61, "flags": 4}, + {"matrix": [5, 7], "x": 97, "y": 64, "flags": 1}, + {"matrix": [5, 8], "x": 124, "y": 63, "flags": 4}, + {"matrix": [5, 9], "x": 147, "y": 59, "flags": 1}, + {"matrix": [5, 13], "x": 198, "y": 58, "flags": 1}, + {"matrix": [5, 14], "x": 210, "y": 58, "flags": 1}, + {"matrix": [5, 15], "x": 222, "y": 58, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_90": { "layout": [ diff --git a/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c index ba32f58fc6..35e8414be6 100644 --- a/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c @@ -135,36 +135,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA6, CB10_CA6, CB11_CA6}, // Down {1, CB12_CA7, CB10_CA7, CB11_CA7}, // Right }; - -#define __ NO_LED - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, __, 0, 1 }, - { 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 18, 19, 20 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 37, 38, 39 }, - { 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 76, 71, 72, 56, 57, 58 }, - { 77, __, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, __, 88, 89, 73, 74, 75 }, - { 92, 93, 94, __, __, 21, 95, 40, __, 96, 97, 98, 99, 100, 101, 90, 2, 91 }, - }, - { - // LED Index to Physical Position - {11,0}, {23,0}, {34,0}, {49,0}, {63,0}, {75,0}, {86,0}, {98,0}, {112,0}, {123,0}, {135,0}, {146,0}, {161,0}, {172,0}, {184,0}, {195,0}, {209,0}, {224,0}, - {0,15}, {11,15}, {23,15}, {34,15}, {49,15}, {60,15}, {72,15}, {83,15}, {95,15}, {106,15}, {118,15}, {129,15}, {141,15}, {152,15}, {164,15}, {175,15}, {186,15}, {204,15}, {224,15}, - {0,26}, {11,26}, {23,26}, {34,32}, {52,26}, {66,26}, {78,26}, {89,26}, {101,26}, {112,26}, {123,26}, {135,26}, {146,26}, {158,26}, {169,26}, {181,26}, {192,26}, {207,26}, {224,26}, - {0,38}, {11,38}, {23,38}, {53,38}, {69,38}, {81,38}, {92,38}, {103,38}, {115,38}, {126,38}, {138,38}, {149,38}, {161,38}, {172,38}, {184,38}, {202,38}, {224,38}, - {0,49}, {11,49}, {23,49}, {34,55}, {56,49}, {75,49}, {86,49}, {98,49}, {109,49}, {121,49}, {132,49}, {144,49}, {155,49}, {166,49}, {178,49}, {194,49}, {213,52}, - {6,61}, {23,61}, {50,61}, {65,61}, {79,61}, {122,61}, {163,61}, {175,61}, {186,61}, {201,64}, {213,64}, {224,64}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 1, 1, 1, 4, 1, 4, 1, 1, 1, 1, - } -}; #endif diff --git a/keyboards/keychron/q12/ansi_encoder/keyboard.json b/keyboards/keychron/q12/ansi_encoder/keyboard.json index d2f90cb8ac..faf8b5527e 100644 --- a/keyboards/keychron/q12/ansi_encoder/keyboard.json +++ b/keyboards/keychron/q12/ansi_encoder/keyboard.json @@ -24,6 +24,112 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 16], "x": 11, "y": 0, "flags": 1}, + {"matrix": [0, 17], "x": 23, "y": 0, "flags": 1}, + {"matrix": [5, 16], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 49, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 63, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 86, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 98, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 123, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 135, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 146, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 161, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 172, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 184, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 195, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 209, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 15], "x": 0, "y": 15, "flags": 8}, + {"matrix": [1, 16], "x": 11, "y": 15, "flags": 4}, + {"matrix": [1, 17], "x": 23, "y": 15, "flags": 4}, + {"matrix": [5, 5], "x": 34, "y": 15, "flags": 4}, + {"matrix": [1, 0], "x": 49, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 60, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 72, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 95, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 106, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 118, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 129, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 141, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 164, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 175, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 186, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 204, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 15], "x": 0, "y": 26, "flags": 4}, + {"matrix": [2, 16], "x": 11, "y": 26, "flags": 4}, + {"matrix": [2, 17], "x": 23, "y": 26, "flags": 4}, + {"matrix": [5, 7], "x": 34, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 52, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 78, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 89, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 101, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 112, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 123, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 135, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 146, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 158, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 169, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 181, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 207, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 26, "flags": 1}, + {"matrix": [3, 15], "x": 0, "y": 38, "flags": 4}, + {"matrix": [3, 16], "x": 11, "y": 38, "flags": 4}, + {"matrix": [3, 17], "x": 23, "y": 38, "flags": 4}, + {"matrix": [3, 0], "x": 53, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 81, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 92, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 103, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 115, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 126, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 138, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 149, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 161, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 172, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 184, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 202, "y": 38, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1}, + {"matrix": [4, 15], "x": 0, "y": 49, "flags": 4}, + {"matrix": [4, 16], "x": 11, "y": 49, "flags": 4}, + {"matrix": [4, 17], "x": 23, "y": 49, "flags": 4}, + {"matrix": [3, 12], "x": 34, "y": 55, "flags": 4}, + {"matrix": [4, 0], "x": 56, "y": 49, "flags": 1}, + {"matrix": [4, 2], "x": 75, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 86, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 98, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 109, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 121, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 132, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 144, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 155, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 166, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 178, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 194, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 213, "y": 52, "flags": 1}, + {"matrix": [5, 15], "x": 6, "y": 61, "flags": 4}, + {"matrix": [5, 17], "x": 23, "y": 61, "flags": 4}, + {"matrix": [5, 0], "x": 50, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 65, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 79, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 122, "y": 61, "flags": 4}, + {"matrix": [5, 9], "x": 163, "y": 61, "flags": 1}, + {"matrix": [5, 10], "x": 175, "y": 61, "flags": 4}, + {"matrix": [5, 11], "x": 186, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 201, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 213, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 224, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_ansi_103": { "layout": [ diff --git a/keyboards/keychron/q12/iso_encoder/iso_encoder.c b/keyboards/keychron/q12/iso_encoder/iso_encoder.c index f9513e7f41..058a5d2ff4 100644 --- a/keyboards/keychron/q12/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q12/iso_encoder/iso_encoder.c @@ -138,36 +138,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {1, CB12_CA6, CB10_CA6, CB11_CA6}, // Down {1, CB12_CA7, CB10_CA7, CB11_CA7}, // Right }; - -#define __ NO_LED - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, __, 0, 1 }, - { 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 18, 19, 20 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 71, 54, 37, 38, 39 }, - { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 76, 70, 72, 55, 56, 57 }, - { 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, __, 89, 90, 73, 74, 75 }, - { 93, 94, 95, __, __, 21, 96, 40, __, 97, 98, 99, 100, 101, 102, 91, 2, 92 }, - }, - { - // LED Index to Physical Position - {11,0}, {23,0}, {34,0}, {49,0}, {63,0}, {75,0}, {86,0}, {98,0}, {112,0}, {123,0}, {135,0}, {146,0}, {160,0}, {172,0}, {183,0}, {194,0}, {209,0}, {224,0}, - {0,15}, {11,15}, {23,15}, {34,15}, {49,15}, {60,15}, {72,15}, {83,15}, {95,15}, {106,15}, {117,15}, {129,15}, {140,15}, {152,15}, {163,15}, {175,15}, {186,15}, {204,15}, {224,15}, - {0,26}, {11,26}, {23,26}, {34,32}, {52,26}, {66,26}, {77,26}, {89,26}, {100,26}, {112,26}, {123,26}, {135,26}, {146,26}, {158,26}, {169,26}, {180,26}, {192,26}, {224,26}, - {0,38}, {11,38}, {23,38}, {53,38}, {69,38}, {80,38}, {92,38}, {103,38}, {115,38}, {126,38}, {137,38}, {149,38}, {160,38}, {172,38}, {183,38}, {195,38}, {210,34}, {224,38}, - {0,49}, {11,49}, {23,49}, {34,55}, {50,49}, {63,49}, {75,49}, {86,49}, {97,49}, {109,49}, {120,49}, {132,49}, {143,49}, {155,49}, {166,49}, {177,49}, {193,49}, {212,52}, - {6,61}, {23,61}, {50,61}, {65,61}, {79,61}, {122,61}, {163,61}, {174,61}, {186,61}, {201,64}, {212,64}, {223,64}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 1, 1, 1, 4, 1, 4, 1, 1, 1, 1, - } -}; #endif diff --git a/keyboards/keychron/q12/iso_encoder/keyboard.json b/keyboards/keychron/q12/iso_encoder/keyboard.json index 29e24a1491..d5105ac2b3 100644 --- a/keyboards/keychron/q12/iso_encoder/keyboard.json +++ b/keyboards/keychron/q12/iso_encoder/keyboard.json @@ -24,6 +24,113 @@ "encoder": true, "dip_switch": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 16], "x": 11, "y": 0, "flags": 1}, + {"matrix": [0, 17], "x": 23, "y": 0, "flags": 1}, + {"matrix": [5, 16], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 49, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 63, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 86, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 98, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 123, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 135, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 146, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 160, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 172, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 183, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 194, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 209, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 15], "x": 0, "y": 15, "flags": 8}, + {"matrix": [1, 16], "x": 11, "y": 15, "flags": 4}, + {"matrix": [1, 17], "x": 23, "y": 15, "flags": 4}, + {"matrix": [5, 5], "x": 34, "y": 15, "flags": 4}, + {"matrix": [1, 0], "x": 49, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 60, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 72, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 83, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 95, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 106, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 129, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 140, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 163, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 175, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 186, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 204, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1}, + {"matrix": [2, 15], "x": 0, "y": 26, "flags": 4}, + {"matrix": [2, 16], "x": 11, "y": 26, "flags": 4}, + {"matrix": [2, 17], "x": 23, "y": 26, "flags": 4}, + {"matrix": [5, 7], "x": 34, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 52, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 77, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 89, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 100, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 112, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 123, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 135, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 146, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 158, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 169, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 180, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 26, "flags": 1}, + {"matrix": [3, 15], "x": 0, "y": 38, "flags": 4}, + {"matrix": [3, 16], "x": 11, "y": 38, "flags": 4}, + {"matrix": [3, 17], "x": 23, "y": 38, "flags": 4}, + {"matrix": [3, 0], "x": 53, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 80, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 92, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 103, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 115, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 126, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 137, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 149, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 160, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 172, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 183, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 195, "y": 38, "flags": 4}, + {"matrix": [2, 13], "x": 210, "y": 34, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1}, + {"matrix": [4, 15], "x": 0, "y": 49, "flags": 4}, + {"matrix": [4, 16], "x": 11, "y": 49, "flags": 4}, + {"matrix": [4, 17], "x": 23, "y": 49, "flags": 4}, + {"matrix": [3, 12], "x": 34, "y": 55, "flags": 4}, + {"matrix": [4, 0], "x": 50, "y": 49, "flags": 1}, + {"matrix": [4, 1], "x": 63, "y": 49, "flags": 4}, + {"matrix": [4, 2], "x": 75, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 86, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 97, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 109, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 120, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 132, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 143, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 155, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 166, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 177, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 193, "y": 49, "flags": 4}, + {"matrix": [4, 14], "x": 212, "y": 52, "flags": 1}, + {"matrix": [5, 15], "x": 6, "y": 61, "flags": 4}, + {"matrix": [5, 17], "x": 23, "y": 61, "flags": 4}, + {"matrix": [5, 0], "x": 50, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 65, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 79, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 122, "y": 61, "flags": 4}, + {"matrix": [5, 9], "x": 163, "y": 61, "flags": 1}, + {"matrix": [5, 10], "x": 174, "y": 61, "flags": 4}, + {"matrix": [5, 11], "x": 186, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 201, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 212, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 223, "y": 64, "flags": 1} + ] + }, "layouts": { "LAYOUT_iso_104": { "layout": [ From c1b428bb4e4d2ecf4b904c8e4886d8e8e37602c7 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:03:52 -0600 Subject: [PATCH 16/95] Migrate `g_led_config` to DD (JK1) (#25601) --- keyboards/joshajohnson/hub20/hub20.c | 171 ------------------ keyboards/joshajohnson/hub20/keyboard.json | 31 +++- keyboards/junco/rev1/keyboard.json | 76 ++++++++ keyboards/junco/rev1/rev1.c | 103 ----------- keyboards/kapl/rev1/keyboard.json | 90 +++++++++ keyboards/kapl/rev1/rev1.c | 55 ------ .../kbdfans/baguette66/rgb/keyboard.json | 68 +++++++ keyboards/kbdfans/baguette66/rgb/rgb.c | 20 -- keyboards/kbdfans/bella/rgb/keyboard.json | 96 ++++++++++ keyboards/kbdfans/bella/rgb/rgb.c | 30 --- keyboards/kbdfans/bella/rgb_iso/keyboard.json | 97 ++++++++++ keyboards/kbdfans/bella/rgb_iso/rgb_iso.c | 30 --- keyboards/kbdfans/boop65/rgb/keyboard.json | 85 +++++++++ keyboards/kbdfans/boop65/rgb/rgb.c | 23 --- .../kbdfans/kbd67/mkiirgb/v1/keyboard.json | 69 +++++++ keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c | 4 - .../kbdfans/kbd67/mkiirgb/v2/keyboard.json | 69 +++++++ keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c | 21 --- .../kbdfans/kbd67/mkiirgb/v3/keyboard.json | 69 +++++++ keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c | 26 --- .../kbdfans/kbd67/mkiirgb/v4/keyboard.json | 69 +++++++ keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c | 22 --- .../kbdfans/kbd67/mkiirgb_iso/keyboard.json | 70 +++++++ .../kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c | 22 --- keyboards/kbdfans/kbd75rgb/kbd75rgb.c | 23 --- keyboards/kbdfans/kbd75rgb/keyboard.json | 86 +++++++++ keyboards/kbdfans/kbdmini/kbdmini.c | 19 -- keyboards/kbdfans/kbdmini/keyboard.json | 54 ++++++ keyboards/kbdfans/maja/keyboard.json | 69 +++++++ keyboards/kbdfans/maja/maja.c | 20 -- keyboards/kbdfans/odin/rgb/keyboard.json | 106 +++++++++++ keyboards/kbdfans/odin/rgb/rgb.c | 25 --- 32 files changed, 1203 insertions(+), 615 deletions(-) delete mode 100644 keyboards/joshajohnson/hub20/hub20.c delete mode 100644 keyboards/kapl/rev1/rev1.c diff --git a/keyboards/joshajohnson/hub20/hub20.c b/keyboards/joshajohnson/hub20/hub20.c deleted file mode 100644 index 8b1c58e1f7..0000000000 --- a/keyboards/joshajohnson/hub20/hub20.c +++ /dev/null @@ -1,171 +0,0 @@ -/* Copyright 2020 joshajohnson 2021 peepeetee - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - {NO_LED,NO_LED,NO_LED,NO_LED}, - { 7, 8, 9, 10}, - { 11, 12, 13, 14}, - { 15, 16, 17, 18}, - { 19, 20, 21, 22}, - { 23, 24, 25, 26} - //todo: assign leds to keys differently for the different layouts -}, { - // LED Index to Physical Position - { 190, 50}, { 111, 50}, { 35, 50}, {38, 0}, {38, 35}, {186, 35}, {186, 0}, // UNDERGLOW - //todo: underglow location needs to be recalculated. The top row is above row 4, and for now they have the same y value 0 - { 0, 0}, {75, 0}, {150, 0}, {225, 0}, // row 4 - { 0, 16}, {75, 16}, {150, 16}, {225, 16}, // row 3 - { 0, 32}, {75, 32}, {150, 32}, {225, 32}, // row 2 - { 0, 48}, {75, 48}, {150, 48}, {225, 48}, // row 1 - { 0, 64}, {75, 64}, {150, 64}, {225, 64} // row 0 - -}, { - // LED Index to Flag - LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, // UNDERGLOW - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // row 4 - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // row 3 - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // row 2 - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // row 1 - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT // row 0 - -} }; -#endif - - - -// #if LED_MERGE_NUMPAD_LEFT_HANDED_ENTER && LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO -// #error lower left enter conflicts with lower left zero -// #endif - -// #if LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER && LED_MERGE_NUMPAD_LEFT_HANDED_ZERO -// #error lower right enter conflicts with lower right zero -// #endif - -// /* LAYOUT_left_handed - - -// * ┌───┬───┐ -// * │01 │02 │ -// * ┌───┼───┼───┼───┐ -// * │10 │11 │12 │13 │ -// * ├───┼───┼───┼───┤ -// * │ │21 │22 │23 │ -// * │20 ├───┼───┼───┤ -// * │ │31 │32 │33 │ -// * ├───┼───┼───┼───┤ -// * │ │41 │42 │43 │ -// * │40 ├───┼───┴───┤ -// * │ │51 │ 52 │ -// * └───┴───┴───────┘ -// */ - -// #ifndef LED_MERGE_NUMPAD_LEFT_HANDED_PLUS //key 20 -// #define LED_MERGE_NUMPAD_LEFT_HANDED_PLUS FALSE -// #endif // LED_MERGE_NUMPAD_LEFT_HANDED_PLUS - -// #ifndef LED_MERGE_NUMPAD_LEFT_HANDED_ENTER //key 40 -// #define LED_MERGE_NUMPAD_LEFT_HANDED_ENTER FALSE -// #endif // LED_MERGE_NUMPAD_LEFT_HANDED_ENTER - -// #ifndef LED_MERGE_NUMPAD_LEFT_HANDED_ZERO //key 52 -// #define LED_MERGE_NUMPAD_LEFT_HANDED_ZERO FALSE -// #endif // LED_MERGE_NUMPAD_LEFT_HANDED_ZERO - - -// /* LAYOUT_right_handed - - -// * ┌───┬───┐ -// * │01 │02 │ -// * ┌───┼───┼───┼───┐ -// * │10 │11 │12 │13 │ -// * ├───┼───┼───┼───┤ -// * │20 │21 │22 │ │ -// * ├───┼───┼───┤23 │ -// * │30 │31 │32 │ │ -// * ├───┼───┼───┼───┤ -// * │40 │41 │42 │ │ -// * ├───┴───┼───┤43 │ -// * │ 50 │52 │ │ -// * └───────┴───┴───┘ -// */ -// //LOCATION OF bottom row 0 NOT TESTED, WAITING ENDORSEMENT FROM MANUFACTURER - -// #ifndef LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS // key 23 -// #define LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS FALSE -// #endif // LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS - -// #ifndef LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER // key 43 -// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER FALSE -// #endif // LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER - -// #ifndef LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO // key 50 (confirm with manufacturer) -// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO FALSE -// #endif // LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO - -// uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { -// // Keys here have 2 leds. Here we add the led that is not bound to the key -// // and the default led would be added -// // by the default code that runs after this in rgb_matrix_map_row_column_to_led - -// uint8_t counter = 0; - -// #if LED_MERGE_NUMPAD_LEFT_HANDED_PLUS //key 20, leds 7 and 11, 7 already bound - -// if (row == 2 && column == 0) { -// led_i[counter] = 11; -// counter ++; -// } -// #endif -// #if LED_MERGE_NUMPAD_LEFT_HANDED_ENTER //key 40, leds 19 and 23, 23 already bound -// if (row == 4 && column == 0) { -// led_i[counter] = 23; -// counter ++; -// } -// #endif -// #if LED_MERGE_NUMPAD_LEFT_HANDED_ZERO //key 52, leds 25 and 26, 26 already bound -// if (row == 5 && column == 2) { -// led_i[counter] = 26; -// counter ++; -// } -// #endif - -// #if LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS // key 23, led 14 and 18, 14 already bound -// if (row == 2 && column == 3) { -// led_i[counter] = 18; -// counter ++; -// } -// #endif -// #if LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER // key 43, led 22 and 26, 22 already bound -// if (row == 4 && column == 3) { -// led_i[counter] = 26; -// counter ++; -// } -// #endif -// #if LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO // key 50 (confirm with manufacturer) -// // LED 23 and 24, 23(?) already bound -// if (row == 5 && column == 0) { -// led_i[counter] = 24; -// counter ++; -// } -// #endif -// return counter; -// } diff --git a/keyboards/joshajohnson/hub20/keyboard.json b/keyboards/joshajohnson/hub20/keyboard.json index 0d557c58b5..c26a25de3c 100644 --- a/keyboards/joshajohnson/hub20/keyboard.json +++ b/keyboards/joshajohnson/hub20/keyboard.json @@ -28,7 +28,36 @@ "solid_reactive_simple": true, "solid_reactive": true }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"x": 190, "y": 50, "flags": 2}, + {"x": 111, "y": 50, "flags": 2}, + {"x": 35, "y": 50, "flags": 2}, + {"x": 38, "y": 0, "flags": 2}, + {"x": 38, "y": 35, "flags": 2}, + {"x": 186, "y": 35, "flags": 2}, + {"x": 186, "y": 0, "flags": 2}, + {"matrix": [1, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 75, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 150, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 224, "y": 0, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 75, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 150, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 224, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [3, 1], "x": 75, "y": 32, "flags": 4}, + {"matrix": [3, 2], "x": 150, "y": 32, "flags": 4}, + {"matrix": [3, 3], "x": 224, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [4, 1], "x": 75, "y": 48, "flags": 4}, + {"matrix": [4, 2], "x": 150, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 224, "y": 48, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 75, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 150, "y": 64, "flags": 4}, + {"matrix": [5, 3], "x": 224, "y": 64, "flags": 4} + ] }, "features": { "bootmagic": true, diff --git a/keyboards/junco/rev1/keyboard.json b/keyboards/junco/rev1/keyboard.json index 936a0bf29c..1ec680aa3a 100644 --- a/keyboards/junco/rev1/keyboard.json +++ b/keyboards/junco/rev1/keyboard.json @@ -22,6 +22,82 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"x": 95, "y": 64, "flags": 2}, + {"x": 52, "y": 64, "flags": 2}, + {"x": 86, "y": 40, "flags": 2}, + {"x": 52, "y": 40, "flags": 2}, + {"x": 9, "y": 40, "flags": 2}, + {"x": 9, "y": 8, "flags": 2}, + {"x": 52, "y": 8, "flags": 2}, + {"x": 86, "y": 8, "flags": 2}, + {"matrix": [0, 5], "x": 86, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 69, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 69, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 86, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 17, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 17, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 86, "y": 48, "flags": 4}, + {"matrix": [4, 4], "x": 103, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 86, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 69, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 52, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 34, "y": 64, "flags": 4}, + {"x": 129, "y": 64, "flags": 2}, + {"x": 172, "y": 64, "flags": 2}, + {"x": 138, "y": 40, "flags": 2}, + {"x": 172, "y": 40, "flags": 2}, + {"x": 215, "y": 40, "flags": 2}, + {"x": 215, "y": 8, "flags": 2}, + {"x": 172, "y": 8, "flags": 2}, + {"x": 138, "y": 8, "flags": 2}, + {"matrix": [5, 5], "x": 138, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 155, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 172, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 190, "y": 0, "flags": 4}, + {"matrix": [5, 1], "x": 207, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 224, "y": 0, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 207, "y": 16, "flags": 4}, + {"matrix": [6, 2], "x": 190, "y": 16, "flags": 4}, + {"matrix": [6, 3], "x": 172, "y": 16, "flags": 4}, + {"matrix": [6, 4], "x": 155, "y": 16, "flags": 4}, + {"matrix": [6, 5], "x": 138, "y": 16, "flags": 4}, + {"matrix": [7, 5], "x": 138, "y": 32, "flags": 4}, + {"matrix": [7, 4], "x": 155, "y": 32, "flags": 4}, + {"matrix": [7, 3], "x": 172, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 190, "y": 32, "flags": 4}, + {"matrix": [7, 1], "x": 207, "y": 32, "flags": 4}, + {"matrix": [7, 0], "x": 224, "y": 32, "flags": 4}, + {"matrix": [8, 0], "x": 224, "y": 48, "flags": 4}, + {"matrix": [8, 1], "x": 207, "y": 48, "flags": 4}, + {"matrix": [8, 2], "x": 190, "y": 48, "flags": 4}, + {"matrix": [8, 3], "x": 172, "y": 48, "flags": 4}, + {"matrix": [8, 4], "x": 155, "y": 48, "flags": 4}, + {"matrix": [8, 5], "x": 138, "y": 48, "flags": 4}, + {"matrix": [9, 4], "x": 121, "y": 64, "flags": 4}, + {"matrix": [9, 3], "x": 138, "y": 64, "flags": 4}, + {"matrix": [9, 2], "x": 155, "y": 64, "flags": 4}, + {"matrix": [9, 1], "x": 172, "y": 64, "flags": 4}, + {"matrix": [9, 0], "x": 190, "y": 64, "flags": 4} + ], "split_count": [37, 37] }, "encoder": { diff --git a/keyboards/junco/rev1/rev1.c b/keyboards/junco/rev1/rev1.c index d1346b82e2..0167a095ad 100644 --- a/keyboards/junco/rev1/rev1.c +++ b/keyboards/junco/rev1/rev1.c @@ -21,106 +21,3 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}} }; #endif - -/* RGB LED matrix */ -#ifdef RGB_MATRIX_ENABLE -/* - Key Matrix Physical - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, - L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, - L40, L41, L42, L43, L44, R42, R41, R43, R44, R45 - - Key Electrical - Left: - { L00, L01, L02, L03, L04, L05 }, - { L10, L11, L12, L13, L14, L15 }, - { L20, L21, L22, L23, L24, L25 }, - { L30, L31, L32, L33, L34, L35 }, - { L40, L41, L42, L43, L44, L45 }, - Right: - { R05, R04, R03, R02, R01, R00 }, - { R15, R14, R13, R12, R11, R10 }, - { R25, R24, R23, R22, R21, R20 }, - { R35, R34, R33, R32, R31, R30 }, - { R45, R44, R43, R42, R41, R40 } - - Key matrix physical filled with LED electrical indexes, count starting at 1 - - Col - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Row - - 14 13 12 11 10 9 46 47 48 49 50 51 0 - 6 7 8 45 44 43 - 15 16 17 18 19 20 57 56 55 54 53 52 1 - - 26 25 24 23 22 21 58 59 60 61 62 63 2 - 5 4 3 40 41 42 - 27 28 29 30 31 32 NO NO 69 68 67 66 65 64 3 - - 37 36 35 34 33 70 71 72 73 74 4 - 2 1 38 39 -*/ - -// clang-format off -led_config_t g_led_config = { - { // Key Electrical Matrix to LED Index (count start at 0, so 8 is the first non-underglow key) - - // Left Half - { 13, 12, 11, 10, 9, 8 }, - { 14, 15, 16, 17, 18, 19 }, - { 25, 24, 23, 22, 21, 20 }, - { 26, 27, 28, 29, 30, 31 }, - { 36, 35, 34, 33, 32, NO_LED }, - - // Right Half - { 50, 49, 48, 47, 46, 45 }, - { 51, 52, 53, 54, 55, 56 }, - { 62, 61, 60, 59, 58, 57 }, - { 63, 64, 65, 66, 67, 68 }, - { 73, 72, 71, 70, 69, NO_LED } - }, - { // LED Index to LED Physical Position (mirrored on right half) - - // Left Underglow (indicies 1 - 8) - { 95, 72 }, { 52, 72 }, { 86, 40 }, { 52, 40 }, { 9, 40 }, { 9, 8 }, { 52, 8 }, { 86, 8 }, - // Left Matrix (indicies 9 - 37) - { 86, 0 }, { 69, 0 }, { 52, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, - { 0, 16 }, { 17, 16 }, { 34, 16 }, { 52, 16 }, { 69, 16 }, { 86, 16 }, - { 86, 32 }, { 69, 32 }, { 52, 32 }, { 34, 32 }, { 17, 32 }, { 0, 32 }, - { 0, 48 }, { 17, 48 }, { 34, 48 }, { 52, 48 }, { 69, 48 }, { 86, 48 }, /* No Led */ - { 103, 64 }, { 86, 64 }, { 69, 64 }, { 52, 64 }, { 34, 64 }, - - // Right Underglow (indicies 38 - 45) - { 129, 72 }, { 172, 72 }, { 138, 40 }, { 172, 40 }, { 215, 40 }, { 215, 8 }, { 172, 8 }, { 138, 8 }, - // Right Matrix (indicies 46 - 74) - { 138, 0 }, { 155, 0 }, { 172, 0 }, { 190, 0 }, { 207, 0 }, { 224, 0 }, - { 224, 16 }, { 207, 16 }, { 190, 16 }, { 172, 16 }, { 155, 16 }, { 138, 16 }, - { 138, 32 }, { 155, 32 }, { 172, 32 }, { 190, 32 }, { 207, 32 }, { 224, 32 }, - /* No Led */ { 224, 48 }, { 207, 48 }, { 190, 48 }, { 172, 48 }, { 155, 48 }, { 138, 48 }, - { 121, 64 }, { 138, 64 }, { 155, 64 }, { 172, 64 }, { 190, 64 } - }, - { // LED Index to Flag (2 - Underglow, 4 - Key Backlight) - - // Left Underglow - 2, 2, 2, 2, 2, 2, 2, 2, - // Left Matrix - 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, - - // Right Underglow - 2, 2, 2, 2, 2, 2, 2, 2, - // Right Matrix - 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 diff --git a/keyboards/kapl/rev1/keyboard.json b/keyboards/kapl/rev1/keyboard.json index 843847d8fe..9354a5e4fe 100644 --- a/keyboards/kapl/rev1/keyboard.json +++ b/keyboards/kapl/rev1/keyboard.json @@ -35,6 +35,96 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"x": 96, "y": 57, "flags": 2}, + {"x": 112, "y": 44, "flags": 2}, + {"x": 112, "y": 19, "flags": 2}, + {"x": 80, "y": 19, "flags": 2}, + {"x": 48, "y": 19, "flags": 2}, + {"x": 16, "y": 19, "flags": 2}, + {"x": 16, "y": 57, "flags": 2}, + {"x": 48, "y": 57, "flags": 2}, + {"x": 80, "y": 57, "flags": 2}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 69, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 86, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 103, "y": 0, "flags": 1}, + {"matrix": [1, 6], "x": 103, "y": 16, "flags": 1}, + {"matrix": [1, 5], "x": 86, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 69, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 17, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 103, "y": 32, "flags": 1}, + {"matrix": [3, 6], "x": 103, "y": 48, "flags": 1}, + {"matrix": [3, 5], "x": 86, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 17, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 17, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 52, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 69, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 86, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 103, "y": 64, "flags": 1}, + {"x": 144, "y": 57, "flags": 2}, + {"x": 128, "y": 44, "flags": 2}, + {"x": 128, "y": 19, "flags": 2}, + {"x": 160, "y": 19, "flags": 2}, + {"x": 192, "y": 19, "flags": 2}, + {"x": 224, "y": 19, "flags": 2}, + {"x": 224, "y": 57, "flags": 2}, + {"x": 192, "y": 57, "flags": 2}, + {"x": 160, "y": 57, "flags": 2}, + {"matrix": [5, 0], "x": 224, "y": 0, "flags": 1}, + {"matrix": [5, 1], "x": 207, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 190, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 172, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 155, "y": 0, "flags": 4}, + {"matrix": [5, 5], "x": 138, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 121, "y": 0, "flags": 1}, + {"matrix": [6, 6], "x": 121, "y": 16, "flags": 1}, + {"matrix": [6, 5], "x": 138, "y": 16, "flags": 4}, + {"matrix": [6, 4], "x": 155, "y": 16, "flags": 4}, + {"matrix": [6, 3], "x": 172, "y": 16, "flags": 4}, + {"matrix": [6, 2], "x": 190, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 207, "y": 16, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 16, "flags": 1}, + {"matrix": [7, 0], "x": 224, "y": 32, "flags": 1}, + {"matrix": [7, 1], "x": 207, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 190, "y": 32, "flags": 4}, + {"matrix": [7, 3], "x": 172, "y": 32, "flags": 4}, + {"matrix": [7, 4], "x": 155, "y": 32, "flags": 4}, + {"matrix": [7, 5], "x": 138, "y": 32, "flags": 4}, + {"matrix": [7, 6], "x": 121, "y": 32, "flags": 1}, + {"matrix": [8, 6], "x": 121, "y": 48, "flags": 1}, + {"matrix": [8, 5], "x": 138, "y": 48, "flags": 4}, + {"matrix": [8, 4], "x": 155, "y": 48, "flags": 4}, + {"matrix": [8, 3], "x": 172, "y": 48, "flags": 4}, + {"matrix": [8, 2], "x": 190, "y": 48, "flags": 4}, + {"matrix": [8, 1], "x": 207, "y": 48, "flags": 4}, + {"matrix": [8, 0], "x": 224, "y": 48, "flags": 1}, + {"matrix": [9, 0], "x": 224, "y": 64, "flags": 1}, + {"matrix": [9, 1], "x": 207, "y": 64, "flags": 1}, + {"matrix": [9, 2], "x": 190, "y": 64, "flags": 1}, + {"matrix": [9, 3], "x": 172, "y": 64, "flags": 1}, + {"matrix": [9, 4], "x": 155, "y": 64, "flags": 1}, + {"matrix": [9, 5], "x": 138, "y": 64, "flags": 1}, + {"matrix": [9, 6], "x": 121, "y": 64, "flags": 1} + ], "max_brightness": 120, "speed_steps": 10, "split_count": [44, 44] diff --git a/keyboards/kapl/rev1/rev1.c b/keyboards/kapl/rev1/rev1.c deleted file mode 100644 index fd3b9289dc..0000000000 --- a/keyboards/kapl/rev1/rev1.c +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Alexander Lozyuk (@keyzog) -// SPDX-License-Identifier: GPL-2.0-or-later -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Left Hand - // { 8, 7, 6, 5, 4, 3, 2, 1, 0 }, // underglow - { 9, 10, 11, 12, 13, 14, 15 }, - { 22, 21, 20, 19, 18, 17, 16 }, - { 23, 24, 25, 26, 27, 28, 29 }, - { 36, 35, 34, 33, 32, 31, 30 }, - { 37, 38, 39, 40, 41, 42, 43 }, - - // Right Hand - // { 44, 45, 46, 47, 48, 49, 50, 51, 52 }, // underglow - { 53, 54, 55, 56, 57, 58, 59 }, - { 66, 65, 64, 63, 62, 61, 60 }, - { 67, 68, 69, 70, 71, 72, 73 }, - { 80, 79, 78, 77, 76, 75, 74 }, - { 81, 82, 83, 84, 85, 86, 87 } -}, { - // Left Hand - {96, 57}, {112, 44}, {112, 19}, {80, 19}, {48, 19}, {16, 19}, {16, 57}, {48, 57}, {80, 57}, // underglow - {0, 0}, {17, 0}, {34, 0}, {52, 0}, {69, 0}, {86, 0}, {103, 0}, - {103, 16}, {86, 16}, {69, 16}, {52, 16}, {34, 16}, {17, 16}, {0, 16}, - {0, 32}, {17, 32}, {34, 32}, {52, 32}, {69, 32}, {86, 32}, {103, 32}, - {103, 48}, {86, 48}, {69, 48}, {52, 48}, {34, 48}, {17, 48}, {0, 48}, - {0, 64}, {17, 64}, {34, 64}, {52, 64}, {69, 64}, {86, 64}, {103, 64}, - - // Right Hand - {144, 57}, {128, 44}, {128, 19}, {160, 19}, {192, 19}, {224, 19}, {224, 57}, {192, 57}, {160, 57}, // underglow - {224, 0}, {207, 0}, {190, 0}, {172, 0}, {155, 0}, {138, 0}, {121, 0}, - {121, 16}, {138, 16}, {155, 16}, {172, 16}, {190, 16}, {207, 16}, {224, 16}, - {224, 32}, {207, 32}, {190, 32}, {172, 32}, {155, 32}, {138, 32}, {121, 32}, - {121, 48}, {138, 48}, {155, 48}, {172, 48}, {190, 48}, {207, 48}, {224, 48}, - {224, 64}, {207, 64}, {190, 64}, {172, 64}, {155, 64}, {138, 64}, {121, 64} -}, { - // Left Hand - 2, 2, 2, 2, 2, 2, 2, 2, 2, // underglow - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, - - // Right Hand - 2, 2, 2, 2, 2, 2, 2, 2, 2, // underglow - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1 -} }; -#endif diff --git a/keyboards/kbdfans/baguette66/rgb/keyboard.json b/keyboards/kbdfans/baguette66/rgb/keyboard.json index 5955add028..77103382bd 100644 --- a/keyboards/kbdfans/baguette66/rgb/keyboard.json +++ b/keyboards/kbdfans/baguette66/rgb/keyboard.json @@ -58,6 +58,74 @@ "animation": "cycle_all" }, "driver": "ws2812", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 195, "y": 0, "flags": 4}, + {"matrix": [2, 14], "x": 210, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 4}, + {"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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 201, "y": 32, "flags": 4}, + {"matrix": [3, 13], "x": 220, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 205, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 187, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 4}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 39, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 152, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 171, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "max_brightness": 150, "sat_steps": 8, "sleep": true, diff --git a/keyboards/kbdfans/baguette66/rgb/rgb.c b/keyboards/kbdfans/baguette66/rgb/rgb.c index 8e1dbc5bcd..379597b58e 100644 --- a/keyboards/kbdfans/baguette66/rgb/rgb.c +++ b/keyboards/kbdfans/baguette66/rgb/rgb.c @@ -17,26 +17,6 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15 }, - { 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16 }, - { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,NO_LED, 14 }, - { 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, NO_LED}, - { NO_LED, 58, 59, NO_LED, NO_LED, 60, NO_LED, NO_LED, 61, NO_LED, 62, NO_LED, 63, 64, 65 } -}, { - {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,16}, {206,16},{188,16},{173,16},{158,16},{143,16},{128,16},{113,16},{98,16},{83,16},{68,16},{53,16},{38,16},{23,16},{4,16}, - {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}, - {220,48},{205,48},{187,48},{169,48},{154,48},{139,48},{124,48},{109,48},{94,48},{79,48},{64,48},{49,48},{34,48},{9,48}, - {21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,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, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 1, 1, 1 -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kbdfans/bella/rgb/keyboard.json b/keyboards/kbdfans/bella/rgb/keyboard.json index 2ca18d2851..7bbc5ea7a2 100644 --- a/keyboards/kbdfans/bella/rgb/keyboard.json +++ b/keyboards/kbdfans/bella/rgb/keyboard.json @@ -54,6 +54,102 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 44, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 59, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 73, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 95, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 140, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 161, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 176, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 191, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 206, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 17, "flags": 4}, + {"matrix": [1, 1], "x": 15, "y": 17, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 17, "flags": 4}, + {"matrix": [1, 3], "x": 44, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 17, "flags": 4}, + {"matrix": [1, 5], "x": 73, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 88, "y": 17, "flags": 4}, + {"matrix": [1, 7], "x": 102, "y": 17, "flags": 4}, + {"matrix": [1, 8], "x": 117, "y": 17, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 161, "y": 17, "flags": 4}, + {"matrix": [1, 12], "x": 176, "y": 17, "flags": 4}, + {"matrix": [1, 14], "x": 198, "y": 17, "flags": 4}, + {"matrix": [1, 15], "x": 224, "y": 17, "flags": 4}, + {"matrix": [2, 0], "x": 4, "y": 29, "flags": 4}, + {"matrix": [2, 1], "x": 22, "y": 29, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 29, "flags": 4}, + {"matrix": [2, 3], "x": 51, "y": 29, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 29, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 29, "flags": 4}, + {"matrix": [2, 6], "x": 95, "y": 29, "flags": 4}, + {"matrix": [2, 7], "x": 110, "y": 29, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 29, "flags": 4}, + {"matrix": [2, 9], "x": 140, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 169, "y": 29, "flags": 4}, + {"matrix": [2, 12], "x": 184, "y": 29, "flags": 4}, + {"matrix": [2, 13], "x": 202, "y": 29, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 29, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 41, "flags": 4}, + {"matrix": [3, 1], "x": 26, "y": 41, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 41, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 41, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 41, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 41, "flags": 4}, + {"matrix": [3, 6], "x": 99, "y": 41, "flags": 4}, + {"matrix": [3, 7], "x": 114, "y": 41, "flags": 4}, + {"matrix": [3, 8], "x": 129, "y": 41, "flags": 4}, + {"matrix": [3, 9], "x": 143, "y": 41, "flags": 4}, + {"matrix": [3, 10], "x": 158, "y": 41, "flags": 4}, + {"matrix": [3, 11], "x": 172, "y": 41, "flags": 4}, + {"matrix": [3, 13], "x": 196, "y": 41, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 41, "flags": 4}, + {"matrix": [4, 0], "x": 9, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 33, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 62, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 77, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 92, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 106, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 121, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 136, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 150, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 165, "y": 52, "flags": 4}, + {"matrix": [4, 12], "x": 185, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 209, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 20, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 38, "y": 64, "flags": 4}, + {"matrix": [5, 6], "x": 94, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 150, "y": 64, "flags": 4}, + {"matrix": [5, 11], "x": 172, "y": 64, "flags": 4}, + {"matrix": [5, 12], "x": 195, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 1}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 45, "y": 0, "flags": 2}, + {"x": 90, "y": 0, "flags": 2}, + {"x": 134, "y": 0, "flags": 2}, + {"x": 179, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 0, "y": 32, "flags": 2}, + {"x": 224, "y": 32, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 45, "y": 64, "flags": 2}, + {"x": 90, "y": 64, "flags": 2}, + {"x": 134, "y": 64, "flags": 2}, + {"x": 179, "y": 64, "flags": 2}, + {"x": 224, "y": 64, "flags": 2} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/kbdfans/bella/rgb/rgb.c b/keyboards/kbdfans/bella/rgb/rgb.c index 4818c99005..2dd792c5bc 100644 --- a/keyboards/kbdfans/bella/rgb/rgb.c +++ b/keyboards/kbdfans/bella/rgb/rgb.c @@ -118,36 +118,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW4_CS3, SW4_CS2, SW4_CS1}, /* RGB40 */ }; -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15*/ - { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, NO_LED, 9, 10, 11, 12, 13, }, /* R0 */ - { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, NO_LED, 27, 28, }, /* R1 */ - { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NO_LED, 43, }, /* R2 */ - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, NO_LED, 57, }, /* R3 */ - { 58, NO_LED, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, NO_LED, 70, NO_LED, }, /* R4 */ - { 71, 72, 73, NO_LED, NO_LED, NO_LED, 74, NO_LED, NO_LED, NO_LED, 75, 76, 77, NO_LED, 78, 79, }, /* R5 */ - }, { - {0, 0}, {29, 0}, {44, 0}, {59, 0}, {73, 0}, {95, 0}, {110, 0}, {125, 0}, {140, 0}, {161, 0}, {176, 0}, {191, 0}, {206, 0}, {224, 0}, - {0, 17}, {15, 17}, {29, 17}, {44, 17}, {59, 17}, {73, 17}, {88, 17}, {102, 17}, {117, 17}, {132, 17}, {147, 17}, {161, 17}, {176, 17}, {198, 17}, {224, 17}, - {4, 29}, {22, 29}, {37, 29}, {51, 29}, {66, 29}, {81, 29}, {95, 29}, {110, 29}, {125, 29}, {140, 29}, {154, 29}, {169, 29}, {184, 29}, {202, 29}, {224, 29}, - {5, 41}, {26, 41}, {40, 41}, {55, 41}, {70, 41}, {84, 41}, {99, 41}, {114, 41}, {129, 41}, {143, 41}, {158, 41}, {172, 41}, {196, 41}, {224, 41}, - {9, 52}, {33, 52}, {48, 52}, {62, 52}, {77, 52}, {92, 52}, {106, 52}, {121, 52}, {136, 52}, {150, 52}, {165, 52}, {185, 52}, {209, 52}, - {2, 64}, {20, 64}, {38, 64}, {94, 64}, {150, 64}, {172, 64}, {195, 64}, {209, 64}, {224, 64}, - {0, 0}, {45, 0}, {90, 0}, {134, 0}, {179, 0}, {224, 0}, - {0, 32}, {224,32}, - {0, 64}, {45, 64}, {90, 64}, {134, 64}, {179, 64}, {224, 64}, - }, { - 4,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,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,4,4,4,4,4,4,4,4,1, - 4,4,4,4,4,4,1,1,1, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2, - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kbdfans/bella/rgb_iso/keyboard.json b/keyboards/kbdfans/bella/rgb_iso/keyboard.json index c7dd6423b5..43f36625f9 100644 --- a/keyboards/kbdfans/bella/rgb_iso/keyboard.json +++ b/keyboards/kbdfans/bella/rgb_iso/keyboard.json @@ -54,6 +54,103 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 44, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 59, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 73, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 95, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 125, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 140, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 161, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 176, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 191, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 206, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 17, "flags": 4}, + {"matrix": [1, 1], "x": 15, "y": 17, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 17, "flags": 4}, + {"matrix": [1, 3], "x": 44, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 17, "flags": 4}, + {"matrix": [1, 5], "x": 73, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 88, "y": 17, "flags": 4}, + {"matrix": [1, 7], "x": 102, "y": 17, "flags": 4}, + {"matrix": [1, 8], "x": 117, "y": 17, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 161, "y": 17, "flags": 4}, + {"matrix": [1, 12], "x": 176, "y": 17, "flags": 4}, + {"matrix": [1, 14], "x": 198, "y": 17, "flags": 4}, + {"matrix": [1, 15], "x": 224, "y": 17, "flags": 4}, + {"matrix": [2, 0], "x": 4, "y": 29, "flags": 4}, + {"matrix": [2, 1], "x": 22, "y": 29, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 29, "flags": 4}, + {"matrix": [2, 3], "x": 51, "y": 29, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 29, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 29, "flags": 4}, + {"matrix": [2, 6], "x": 95, "y": 29, "flags": 4}, + {"matrix": [2, 7], "x": 110, "y": 29, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 29, "flags": 4}, + {"matrix": [2, 9], "x": 140, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 169, "y": 29, "flags": 4}, + {"matrix": [2, 12], "x": 184, "y": 29, "flags": 4}, + {"matrix": [3, 13], "x": 200, "y": 35, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 29, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 41, "flags": 4}, + {"matrix": [3, 1], "x": 26, "y": 41, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 41, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 41, "flags": 4}, + {"matrix": [3, 4], "x": 70, "y": 41, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 41, "flags": 4}, + {"matrix": [3, 6], "x": 99, "y": 41, "flags": 4}, + {"matrix": [3, 7], "x": 114, "y": 41, "flags": 4}, + {"matrix": [3, 8], "x": 129, "y": 41, "flags": 4}, + {"matrix": [3, 9], "x": 143, "y": 41, "flags": 4}, + {"matrix": [3, 10], "x": 158, "y": 41, "flags": 4}, + {"matrix": [3, 11], "x": 172, "y": 41, "flags": 4}, + {"matrix": [2, 13], "x": 187, "y": 41, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 41, "flags": 4}, + {"matrix": [4, 0], "x": 2, "y": 52, "flags": 4}, + {"matrix": [4, 1], "x": 18, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 33, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 62, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 77, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 92, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 106, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 121, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 136, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 150, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 165, "y": 52, "flags": 4}, + {"matrix": [4, 12], "x": 185, "y": 52, "flags": 4}, + {"matrix": [4, 14], "x": 209, "y": 52, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 20, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 38, "y": 64, "flags": 4}, + {"matrix": [5, 6], "x": 94, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 150, "y": 64, "flags": 4}, + {"matrix": [5, 11], "x": 172, "y": 64, "flags": 4}, + {"matrix": [5, 12], "x": 195, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 1}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 45, "y": 0, "flags": 2}, + {"x": 90, "y": 0, "flags": 2}, + {"x": 134, "y": 0, "flags": 2}, + {"x": 179, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 0, "y": 32, "flags": 2}, + {"x": 224, "y": 32, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 45, "y": 64, "flags": 2}, + {"x": 90, "y": 64, "flags": 2}, + {"x": 134, "y": 64, "flags": 2}, + {"x": 179, "y": 64, "flags": 2}, + {"x": 224, "y": 64, "flags": 2} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c index 8d9349e295..ecbe4b3122 100644 --- a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c +++ b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c @@ -119,36 +119,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW4_CS3, SW4_CS2, SW4_CS1}, /* RGB40 */ }; -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15*/ - { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, NO_LED, 9, 10, 11, 12, 13, }, /* R0 */ - { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, NO_LED, 27, 28, }, /* R1 */ - { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 56, NO_LED, 43, }, /* R2 */ - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 42, NO_LED, 57, }, /* R3 */ - { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, NO_LED, 71, NO_LED, }, /* R4 */ - { 72, 73, 74, NO_LED, NO_LED, NO_LED, 75, NO_LED, NO_LED, NO_LED, 76, 77, 78, NO_LED, 79, 80, }, /* R5 */ - }, { - {0, 0}, {29, 0}, {44, 0}, {59, 0}, {73, 0}, {95, 0}, {110, 0}, {125, 0}, {140, 0}, {161, 0}, {176, 0}, {191, 0}, {206, 0}, {224, 0}, - {0, 17}, {15, 17}, {29, 17}, {44, 17}, {59, 17}, {73, 17}, {88, 17}, {102, 17}, {117, 17}, {132, 17}, {147, 17}, {161, 17}, {176, 17}, {198, 17}, {224, 17}, - {4, 29}, {22, 29}, {37, 29}, {51, 29}, {66, 29}, {81, 29}, {95, 29}, {110, 29}, {125, 29}, {140, 29}, {154, 29}, {169, 29}, {184, 29}, {200, 35}, {224, 29}, - {5, 41}, {26, 41}, {40, 41}, {55, 41}, {70, 41}, {84, 41}, {99, 41}, {114, 41}, {129, 41}, {143, 41}, {158, 41}, {172, 41}, {187, 41}, {224, 41}, - {2, 52}, {18, 52}, {33, 52}, {48, 52}, {62, 52}, {77, 52}, {92, 52}, {106, 52}, {121, 52}, {136, 52}, {150, 52}, {165, 52}, {185, 52}, {209, 52}, - {2, 64}, {20, 64}, {38, 64}, {94, 64}, {150, 64}, {172, 64}, {195, 64}, {209, 64}, {224, 64}, - {0, 0}, {45, 0}, {90, 0}, {134, 0}, {179, 0}, {224, 0}, - {0, 32}, {224,32}, - {0, 64}, {45, 64}, {90, 64}, {134, 64}, {179, 64}, {224, 64}, - }, { - 4,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,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,4,4,4,4,4,4,4,4,4,1, - 4,4,4,4,4,4,1,1,1, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2, - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kbdfans/boop65/rgb/keyboard.json b/keyboards/kbdfans/boop65/rgb/keyboard.json index 4a051c9112..6fc36d1539 100644 --- a/keyboards/kbdfans/boop65/rgb/keyboard.json +++ b/keyboards/kbdfans/boop65/rgb/keyboard.json @@ -56,6 +56,91 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "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, 5], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 152, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 171, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"x": 0, "y": 8, "flags": 2}, + {"x": 32, "y": 8, "flags": 2}, + {"x": 64, "y": 8, "flags": 2}, + {"x": 96, "y": 8, "flags": 2}, + {"x": 128, "y": 8, "flags": 2}, + {"x": 160, "y": 8, "flags": 2}, + {"x": 192, "y": 8, "flags": 2}, + {"x": 224, "y": 8, "flags": 2}, + {"x": 0, "y": 56, "flags": 2}, + {"x": 32, "y": 56, "flags": 2}, + {"x": 64, "y": 56, "flags": 2}, + {"x": 96, "y": 56, "flags": 2}, + {"x": 128, "y": 56, "flags": 2}, + {"x": 160, "y": 56, "flags": 2}, + {"x": 192, "y": 56, "flags": 2}, + {"x": 224, "y": 56, "flags": 2} + ], "led_flush_limit": 26, "led_process_limit": 4, "max_brightness": 200, diff --git a/keyboards/kbdfans/boop65/rgb/rgb.c b/keyboards/kbdfans/boop65/rgb/rgb.c index f70c92812f..5a6caf64d1 100644 --- a/keyboards/kbdfans/boop65/rgb/rgb.c +++ b/keyboards/kbdfans/boop65/rgb/rgb.c @@ -112,29 +112,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW6_CS39, SW6_CS38, SW6_CS37} }; -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, NO_LED,42, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED,56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED, 63, 64, NO_LED, 65, 66 } -}, { - {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},{203,0},{224,0}, - {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, - {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},{224,32}, - {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, - {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64}, - {0,8},{32,8},{64,8},{96,8},{128,8},{160,8},{192,8},{224,8}, - {0,56},{32,56},{64,56},{96,56},{128,56},{160,56},{192,56},{224,56} -}, { - 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, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2 -} }; bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/keyboard.json b/keyboards/kbdfans/kbd67/mkiirgb/v1/keyboard.json index f55a649f43..9b034ef194 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/keyboard.json +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/keyboard.json @@ -37,6 +37,75 @@ "animation": "cycle_all" }, "driver": "is31fl3731", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "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, 5], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 152, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 171, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "led_flush_limit": 26, "led_process_limit": 4, "max_brightness": 200, diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c index 210be85d3f..7d25400d7f 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c @@ -92,10 +92,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { }; -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, NO_LED, 42, 43}, {44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57}, {58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED, 63, 64, NO_LED, 65, 66}}, - {{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}, {203, 0}, {224, 0}, {4, 16}, {23, 16}, {38, 16}, {53, 16}, {68, 16}, {83, 16}, {98, 16}, {113, 16}, {128, 16}, {143, 16}, {158, 16}, {173, 16}, {188, 16}, {206, 16}, {224, 16}, {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}, {224, 32}, {9, 48}, {34, 48}, {49, 48}, {64, 48}, {79, 48}, {94, 48}, {109, 48}, {124, 48}, {139, 48}, {154, 48}, {169, 48}, {189, 48}, {210, 48}, {224, 48}, {2, 64}, {21, 64}, {39, 64}, {96, 64}, {152, 64}, {171, 64}, {195, 64}, {210, 64}, {224, 64}}, - {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, 1, 1}}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/keyboard.json b/keyboards/kbdfans/kbd67/mkiirgb/v2/keyboard.json index 916ee0f33a..012ab5257b 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/keyboard.json +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/keyboard.json @@ -35,6 +35,75 @@ "animation": "cycle_all" }, "driver": "is31fl3731", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "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, 5], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 152, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 171, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c index 50958017a2..f32d5b2f1d 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c @@ -92,27 +92,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { }; -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, NO_LED,42, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED,56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED, 63, 64, NO_LED, 65, 66 } -}, { - {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},{203,0},{224,0}, - {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, - {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},{224,32}, - {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, - {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64} -}, { - 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, 1, 1 -} }; - - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/keyboard.json b/keyboards/kbdfans/kbd67/mkiirgb/v3/keyboard.json index 4a3beea9eb..bab449e144 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/keyboard.json +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/keyboard.json @@ -37,6 +37,75 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "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": 119, "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": 202, "y": 0, "flags": 4}, + {"matrix": [0, 14], "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, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 9}, + {"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": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 63, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 78, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 93, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 108, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 123, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 138, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 153, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 168, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 209, "y": 48, "flags": 4}, + {"matrix": [3, 14], "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, 5], "x": 95, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 151, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 170, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 194, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "val_steps": 8, "led_flush_limit": 26, "led_process_limit": 4, diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c index 0b40afadf9..dd3fd96e1c 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c @@ -94,33 +94,7 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { }; -#define __ NO_LED #define CAPS_LOCK_LED_INDEX 30 - -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 } -}, { - // LED Index to Physical Position - // based on: https://gist.github.com/vinorodrigues/07fd735683856b2a06c7c52b9b3878cb - {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}, {202, 0}, {224, 0}, - {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}, {205, 16}, {224, 16}, - {6, 32}, {26, 32}, {41, 32}, {56, 32}, {71, 32}, {86, 32}, {101, 32}, {116, 32}, {131, 32}, {146, 32}, {161, 32}, {175, 32}, {200, 32}, {224, 32}, - {9, 48}, {34, 48}, {49, 48}, {63, 48}, {78, 48}, {93, 48}, {108, 48}, {123, 48}, {138, 48}, {153, 48}, {168, 48}, {189, 48}, {209, 48}, {224, 48}, - {2, 64}, {21, 64}, {39, 64}, {95, 64}, {151, 64}, {170, 64}, {194, 64}, {209, 64}, {224, 64} -}, { - // LED Index to Flag - 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, - 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // caps lock is also an indicator so mask is `0x01 | 0x08` - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1 -} }; - #endif #if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX) diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/keyboard.json b/keyboards/kbdfans/kbd67/mkiirgb/v4/keyboard.json index ed47182ae5..574a02088f 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v4/keyboard.json +++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/keyboard.json @@ -52,6 +52,75 @@ "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 9, "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, 5], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 152, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 171, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "max_brightness": 150, "sat_steps": 8, "val_steps": 8, diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c index 24ccaea968..f9af0a3df9 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c @@ -17,28 +17,6 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE - -led_config_t g_led_config = { -{ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,NO_LED, 43 }, - { 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, NO_LED,45, 44 }, - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, NO_LED,65, 66 } -}, { - {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},{203,0},{224,0}, - {224,16},{206,16},{188,16},{173,16},{158,16},{143,16},{128,16},{113,16},{98,16},{83,16}, {68,16},{53,16},{38,16},{23,16},{4,16}, - {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},{224,32}, - {224,48},{210,48},{189,48},{169,48},{154,48},{139,48},{124,48},{109,48},{94,48},{79,48},{64,48},{49,48},{34,48},{9,48}, - {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64} -}, { - 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, 1, 1 -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kbdfans/kbd67/mkiirgb_iso/keyboard.json b/keyboards/kbdfans/kbd67/mkiirgb_iso/keyboard.json index 5000f8fb0a..3d544fe88c 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb_iso/keyboard.json +++ b/keyboards/kbdfans/kbd67/mkiirgb_iso/keyboard.json @@ -40,6 +40,76 @@ "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 191, "y": 32, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 24, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 21, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 2, "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, 5], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 152, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 171, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "sat_steps": 8, "val_steps": 8, "speed_steps": 10, diff --git a/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c b/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c index 432c871dba..8aa7d42ef3 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c +++ b/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c @@ -17,28 +17,6 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { -{ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 42, 15 }, - { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,NO_LED, 43 }, - { 58, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, NO_LED,45, 44 }, - { 59, 60, 61, 57, NO_LED, 62, NO_LED, NO_LED, NO_LED, 63, 64, 65, NO_LED,66, 67 } -}, { - {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},{203,0},{224,0}, - {224,16},{188,16},{173,16},{158,16},{143,16},{128,16},{113,16},{98,16},{83,16}, {68,16},{53,16},{38,16},{23,16},{4,16}, - {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{191,32},{206,24},{224,32}, - {224,48},{210,48},{189,48},{169,48},{154,48},{139,48},{124,48},{109,48},{94,48},{79,48},{64,48},{49,48},{34,48},{21,48},{2,48}, - {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64} -}, { - 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, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1 -} }; - - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kbdfans/kbd75rgb/kbd75rgb.c b/keyboards/kbdfans/kbd75rgb/kbd75rgb.c index 622ca83b68..45e195524a 100644 --- a/keyboards/kbdfans/kbd75rgb/kbd75rgb.c +++ b/keyboards/kbdfans/kbd75rgb/kbd75rgb.c @@ -17,29 +17,6 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15}, - { 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16}, - { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45}, - { 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 14, 47, 46}, - { 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, NO_LED,72, 73}, - { 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}, {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, -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,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,1,4,1,1,1,4,4,4, -4,4,4,4 -} }; - - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kbdfans/kbd75rgb/keyboard.json b/keyboards/kbdfans/kbd75rgb/keyboard.json index 6a69d78c03..af6379071d 100644 --- a/keyboards/kbdfans/kbd75rgb/keyboard.json +++ b/keyboards/kbdfans/kbd75rgb/keyboard.json @@ -58,6 +58,92 @@ "animation": "cycle_all" }, "driver": "ws2812", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 195, "y": 0, "flags": 4}, + {"matrix": [3, 12], "x": 210, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 12, "flags": 4}, + {"matrix": [1, 13], "x": 218, "y": 12, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 16, "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": 16, "y": 25, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 25, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 25, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 25, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 25, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 25, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 25, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 25, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 25, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 25, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 25, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 25, "flags": 4}, + {"matrix": [2, 13], "x": 218, "y": 25, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 25, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 200, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 144, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 16, "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": 16, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 32, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 64, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 80, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 112, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 128, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 144, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 160, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 189, "y": 51, "flags": 4}, + {"matrix": [4, 13], "x": 218, "y": 51, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 51, "flags": 4}, + {"matrix": [5, 14], "x": 224, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 218, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 192, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 176, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 160, "y": 64, "flags": 4}, + {"matrix": [5, 8], "x": 144, "y": 64, "flags": 4}, + {"matrix": [5, 5], "x": 80, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 32, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 16, "y": 64, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 4} + ], "sat_steps": 8, "val_steps": 8, "speed_steps": 10, diff --git a/keyboards/kbdfans/kbdmini/kbdmini.c b/keyboards/kbdfans/kbdmini/kbdmini.c index 18acc21da4..c9b558b7d3 100644 --- a/keyboards/kbdfans/kbdmini/kbdmini.c +++ b/keyboards/kbdfans/kbdmini/kbdmini.c @@ -57,22 +57,3 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW11_CS2, SW10_CS2, SW12_CS2 }, //LA8 { 0, SW11_CS1, SW10_CS1, SW12_CS1 } //LA4 }; - -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 } - }, { - { 0, 0 }, { 19, 0 }, { 38, 0 }, { 57, 0 }, { 76, 0 }, { 95, 0 }, { 114, 0 }, { 133, 0 }, { 152, 0 }, { 171, 0 }, { 190, 0 }, { 209, 0 }, { 224, 0 }, - { 0, 21 }, { 19, 21 }, { 38, 21 }, { 57, 21 }, { 76, 21 }, { 95, 21 }, { 114, 21 }, { 133, 21 }, { 152, 21 }, { 171, 21 }, { 190, 21 }, { 209, 21 }, { 224, 21 }, - { 0, 42 }, { 19, 42 }, { 38, 42 }, { 57, 42 }, { 76, 42 }, { 95, 42 }, { 114, 42 }, { 133, 42 }, { 152, 42 }, { 171, 42 }, { 190, 42 }, { 209, 42 }, { 224, 42 }, - { 0, 64 }, { 19, 64 }, { 38, 64 }, { 57, 64 }, { 76, 64 }, { 95, 64 }, { 114, 64 }, { 133, 64 }, { 152, 64 }, { 171, 64 }, { 190, 64 }, { 209, 64 }, { 224, 64 } - }, { - 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, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 - } -}; diff --git a/keyboards/kbdfans/kbdmini/keyboard.json b/keyboards/kbdfans/kbdmini/keyboard.json index 97edf073e6..90ec227140 100644 --- a/keyboards/kbdfans/kbdmini/keyboard.json +++ b/keyboards/kbdfans/kbdmini/keyboard.json @@ -37,6 +37,60 @@ "typing_heatmap": true }, "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 19, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 38, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 57, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 76, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 95, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 114, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 152, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 171, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 190, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 209, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 19, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 57, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 76, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 95, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 114, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 133, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 152, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 171, "y": 21, "flags": 4}, + {"matrix": [1, 10], "x": 190, "y": 21, "flags": 4}, + {"matrix": [1, 11], "x": 209, "y": 21, "flags": 4}, + {"matrix": [1, 12], "x": 224, "y": 21, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1}, + {"matrix": [2, 1], "x": 19, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 38, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 57, "y": 42, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 95, "y": 42, "flags": 4}, + {"matrix": [2, 6], "x": 114, "y": 42, "flags": 4}, + {"matrix": [2, 7], "x": 133, "y": 42, "flags": 4}, + {"matrix": [2, 8], "x": 152, "y": 42, "flags": 4}, + {"matrix": [2, 9], "x": 171, "y": 42, "flags": 4}, + {"matrix": [2, 10], "x": 190, "y": 42, "flags": 4}, + {"matrix": [2, 11], "x": 209, "y": 42, "flags": 4}, + {"matrix": [2, 12], "x": 224, "y": 42, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 19, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 38, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 57, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 76, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 95, "y": 64, "flags": 1}, + {"matrix": [3, 6], "x": 114, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 133, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 152, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 171, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 190, "y": 64, "flags": 1}, + {"matrix": [3, 11], "x": 209, "y": 64, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 64, "flags": 1} + ], "sleep": true }, "features": { diff --git a/keyboards/kbdfans/maja/keyboard.json b/keyboards/kbdfans/maja/keyboard.json index 949dd09fe2..fd5d10d833 100644 --- a/keyboards/kbdfans/maja/keyboard.json +++ b/keyboards/kbdfans/maja/keyboard.json @@ -40,6 +40,75 @@ "animation": "cycle_all" }, "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 4, "y": 1, "flags": 1}, + {"matrix": [0, 1], "x": 18, "y": 1, "flags": 4}, + {"matrix": [0, 2], "x": 31, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 46, "y": 3, "flags": 4}, + {"matrix": [0, 4], "x": 59, "y": 5, "flags": 4}, + {"matrix": [0, 5], "x": 73, "y": 7, "flags": 4}, + {"matrix": [0, 6], "x": 86, "y": 10, "flags": 4}, + {"matrix": [0, 7], "x": 107, "y": 9, "flags": 4}, + {"matrix": [0, 8], "x": 121, "y": 7, "flags": 4}, + {"matrix": [0, 9], "x": 134, "y": 4, "flags": 4}, + {"matrix": [0, 10], "x": 148, "y": 2, "flags": 4}, + {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 176, "y": 2, "flags": 4}, + {"matrix": [0, 13], "x": 196, "y": 2, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 5, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 50, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 20, "flags": 4}, + {"matrix": [1, 5], "x": 77, "y": 22, "flags": 4}, + {"matrix": [1, 6], "x": 103, "y": 23, "flags": 4}, + {"matrix": [1, 7], "x": 117, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 130, "y": 19, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 171, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 186, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 202, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 4, "y": 28, "flags": 4}, + {"matrix": [2, 1], "x": 23, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 38, "y": 29, "flags": 4}, + {"matrix": [2, 3], "x": 51, "y": 31, "flags": 4}, + {"matrix": [2, 4], "x": 65, "y": 34, "flags": 4}, + {"matrix": [2, 5], "x": 78, "y": 36, "flags": 4}, + {"matrix": [2, 6], "x": 109, "y": 36, "flags": 4}, + {"matrix": [2, 7], "x": 122, "y": 34, "flags": 4}, + {"matrix": [2, 8], "x": 136, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 150, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 164, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 177, "y": 29, "flags": 4}, + {"matrix": [2, 13], "x": 200, "y": 29, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 29, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 42, "flags": 4}, + {"matrix": [3, 1], "x": 27, "y": 42, "flags": 4}, + {"matrix": [3, 2], "x": 42, "y": 43, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 46, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 82, "y": 51, "flags": 4}, + {"matrix": [3, 6], "x": 104, "y": 51, "flags": 4}, + {"matrix": [3, 7], "x": 118, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 131, "y": 46, "flags": 4}, + {"matrix": [3, 9], "x": 145, "y": 44, "flags": 4}, + {"matrix": [3, 10], "x": 159, "y": 43, "flags": 4}, + {"matrix": [3, 11], "x": 173, "y": 43, "flags": 4}, + {"matrix": [3, 12], "x": 192, "y": 43, "flags": 4}, + {"matrix": [3, 13], "x": 214, "y": 46, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 55, "flags": 4}, + {"matrix": [4, 2], "x": 40, "y": 58, "flags": 4}, + {"matrix": [4, 3], "x": 62, "y": 61, "flags": 4}, + {"matrix": [4, 5], "x": 86, "y": 64, "flags": 1}, + {"matrix": [4, 7], "x": 119, "y": 62, "flags": 4}, + {"matrix": [4, 9], "x": 147, "y": 58, "flags": 4}, + {"matrix": [4, 12], "x": 201, "y": 60, "flags": 1}, + {"matrix": [4, 13], "x": 214, "y": 60, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 60, "flags": 1} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/kbdfans/maja/maja.c b/keyboards/kbdfans/maja/maja.c index cc073930bc..c1db8e606c 100755 --- a/keyboards/kbdfans/maja/maja.c +++ b/keyboards/kbdfans/maja/maja.c @@ -74,26 +74,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C8_16, C7_16, C6_16} // LD17 }; -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, NO_LED, 42, 43}, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NO_LED}, - { 58, NO_LED, 59, 60, NO_LED, 61, NO_LED, 62, NO_LED, 63, NO_LED, NO_LED, 64, 65, 66} -}, { - {4,1},{18,1},{31,0},{46,3},{59,5},{73,7},{86,10},{107,9},{121,7},{134,4},{148,2},{162,0},{176,2},{196,2},{224,0}, - {5,15},{22,15},{37,15},{50,17},{64,20},{77,22},{103,23},{117,21},{130,19},{143,16},{158,15},{171,16},{186,16},{202,16},{224,16}, - {4,28},{23,28},{38,29},{51,31},{65,34},{78,36},{109,36},{122,34},{136,32},{150,29},{164,29},{177,29},{200,29},{224,29}, - {5,42},{27,42},{42,43},{55,46},{69,48},{82,51},{104,51},{118,48},{131,46},{145,44},{159,43},{173,43},{192,43},{214,46}, - {0,55},{40,58},{62,61},{86,64},{119,62},{147,58},{201,60},{214,60},{224,60} -}, { - 1, 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, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 4, 1, 4, 4, 1, 1, 1 -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kbdfans/odin/rgb/keyboard.json b/keyboards/kbdfans/odin/rgb/keyboard.json index 1fb5a833ec..8e14e1210a 100644 --- a/keyboards/kbdfans/odin/rgb/keyboard.json +++ b/keyboards/kbdfans/odin/rgb/keyboard.json @@ -59,6 +59,112 @@ "animation": "cycle_all" }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 36, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 108, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 156, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 168, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 16], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 17], "x": 204, "y": 0, "flags": 4}, + {"matrix": [0, 18], "x": 216, "y": 0, "flags": 4}, + {"matrix": [0, 19], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 19], "x": 224, "y": 14, "flags": 4}, + {"matrix": [1, 18], "x": 216, "y": 14, "flags": 4}, + {"matrix": [1, 17], "x": 204, "y": 14, "flags": 4}, + {"matrix": [1, 16], "x": 192, "y": 14, "flags": 4}, + {"matrix": [1, 15], "x": 180, "y": 14, "flags": 4}, + {"matrix": [1, 13], "x": 156, "y": 14, "flags": 4}, + {"matrix": [1, 12], "x": 144, "y": 14, "flags": 4}, + {"matrix": [1, 11], "x": 132, "y": 14, "flags": 4}, + {"matrix": [1, 10], "x": 120, "y": 14, "flags": 4}, + {"matrix": [1, 9], "x": 108, "y": 14, "flags": 4}, + {"matrix": [1, 8], "x": 96, "y": 14, "flags": 4}, + {"matrix": [1, 7], "x": 84, "y": 14, "flags": 4}, + {"matrix": [1, 6], "x": 72, "y": 14, "flags": 4}, + {"matrix": [1, 5], "x": 60, "y": 14, "flags": 4}, + {"matrix": [1, 4], "x": 48, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 14, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 14, "flags": 4}, + {"matrix": [1, 1], "x": 12, "y": 14, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 14, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 27, "flags": 4}, + {"matrix": [2, 1], "x": 12, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 24, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 48, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 60, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 72, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 84, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 96, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 108, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 120, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 132, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 144, "y": 27, "flags": 4}, + {"matrix": [2, 13], "x": 156, "y": 27, "flags": 4}, + {"matrix": [2, 15], "x": 180, "y": 27, "flags": 4}, + {"matrix": [2, 16], "x": 192, "y": 27, "flags": 4}, + {"matrix": [2, 17], "x": 204, "y": 27, "flags": 4}, + {"matrix": [2, 18], "x": 216, "y": 27, "flags": 4}, + {"matrix": [2, 19], "x": 224, "y": 33, "flags": 4}, + {"matrix": [3, 18], "x": 216, "y": 40, "flags": 4}, + {"matrix": [3, 17], "x": 204, "y": 40, "flags": 4}, + {"matrix": [3, 16], "x": 192, "y": 40, "flags": 4}, + {"x": 224, "y": 0, "flags": 4}, + {"x": 0, "y": 0, "flags": 4}, + {"x": 0, "y": 64, "flags": 4}, + {"x": 224, "y": 64, "flags": 4}, + {"matrix": [3, 13], "x": 156, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 132, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 120, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 108, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 96, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 84, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 72, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 48, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 24, "y": 40, "flags": 4}, + {"matrix": [3, 1], "x": 12, "y": 40, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 40, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 24, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 36, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 48, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 60, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 72, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 84, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 96, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 108, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 132, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 156, "y": 52, "flags": 4}, + {"matrix": [4, 15], "x": 180, "y": 52, "flags": 4}, + {"matrix": [4, 16], "x": 192, "y": 52, "flags": 4}, + {"matrix": [4, 17], "x": 204, "y": 52, "flags": 4}, + {"matrix": [4, 18], "x": 216, "y": 52, "flags": 4}, + {"matrix": [4, 19], "x": 224, "y": 58, "flags": 4}, + {"matrix": [5, 18], "x": 216, "y": 64, "flags": 4}, + {"matrix": [5, 17], "x": 204, "y": 64, "flags": 4}, + {"matrix": [5, 16], "x": 192, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 180, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 168, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 156, "y": 64, "flags": 4}, + {"matrix": [5, 11], "x": 132, "y": 64, "flags": 4}, + {"matrix": [5, 6], "x": 72, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 24, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 12, "y": 64, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 4} + ], "max_brightness": 150, "sleep": true }, diff --git a/keyboards/kbdfans/odin/rgb/rgb.c b/keyboards/kbdfans/odin/rgb/rgb.c index 2774ca7a6e..1cfe8d487c 100644 --- a/keyboards/kbdfans/odin/rgb/rgb.c +++ b/keyboards/kbdfans/odin/rgb/rgb.c @@ -16,31 +16,6 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - { 0, NO_LED, 1, 2, 3, 4, NO_LED, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }, - { 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, NO_LED, 22, 21, 20, 19, 18 }, - { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, NO_LED, 51, 52, 53, 54, 55 }, - { 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, NO_LED, 63, NO_LED, NO_LED, 58, 57, 56, NO_LED }, - { 76, NO_LED, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, NO_LED, 87, NO_LED, 88, 89, 90, 91, 92 }, - { 103, 102, 101, NO_LED, NO_LED, NO_LED, 100, NO_LED, NO_LED, NO_LED, NO_LED, 99, NO_LED, 98, 97, 96, 95, 94, 93, NO_LED } - }, { - { 0, 0 }, { 24, 0 }, { 36, 0 }, { 48, 0 }, { 60, 0 }, { 84, 0 }, { 96, 0 }, { 108, 0 }, { 120, 0 }, { 132, 0 }, { 144, 0 }, { 156, 0 }, { 168, 0 }, { 180, 0 }, { 192, 0 }, { 204, 0 }, { 216, 0 }, { 224, 0 }, - { 224, 14 }, { 216, 14 }, { 204, 14 }, { 192, 14 }, { 180, 14 }, { 156, 14 }, { 144, 14 }, { 132, 14 }, { 120, 14 }, { 108, 14 }, { 96, 14 }, { 84, 14 }, { 72, 14 }, { 60, 14 }, { 48, 14 }, { 36, 14 }, { 24, 14 }, { 12, 14 }, { 0, 14 }, - { 0, 27 }, { 12, 27 }, { 24, 27 }, { 36, 27 }, { 48, 27 }, { 60, 27 }, { 72, 27 }, { 84, 27 }, { 96, 27 }, { 108, 27 }, { 120, 27 }, { 132, 27 }, { 144, 27 }, { 156, 27 }, { 180, 27 }, { 192, 27 }, { 204, 27 }, { 216, 27 }, { 224, 33 }, - { 216, 40 }, { 204, 40 }, { 192, 40 }, { 224, 0 }, { 0, 0 }, { 0, 64 }, { 224, 64 }, { 156, 40 }, { 132, 40 }, { 120, 40 }, { 108, 40 }, { 96, 40 }, { 84, 40 }, { 72, 40 }, { 60, 40 }, { 48, 40 }, { 36, 40 }, { 24, 40 }, { 12, 40 }, { 0, 40 }, - { 0, 52 }, { 24, 52 }, { 36, 52 }, { 48, 52 }, { 60, 52 }, { 72, 52 }, { 84, 52 }, { 96, 52 }, { 108, 52 }, { 120, 52 }, { 132, 52 }, { 156, 52 }, { 180, 52 }, { 192, 52 }, { 204, 52 }, { 216, 52 }, { 224, 58 }, - { 216, 64 }, { 204, 64 }, { 192, 64 }, { 180, 64 }, { 168, 64 }, { 156, 64 }, { 132, 64 }, { 72, 64 }, { 24, 64 }, { 12, 64 }, { 0, 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, 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, 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 - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; From 177ff71d0c727632ff30e2d0bc066b9214177096 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:04:40 -0600 Subject: [PATCH 17/95] Migrate `g_led_config` to DD (H) (#25599) --- keyboards/hadron/ver3/keyboard.json | 14 +- keyboards/hadron/ver3/ver3.c | 18 --- keyboards/handwired/colorlice/colorlice.c | 39 ----- keyboards/handwired/colorlice/keyboard.json | 71 +++++++++ keyboards/handwired/dygma/raise/ansi/ansi.c | 41 ------ .../handwired/dygma/raise/ansi/keyboard.json | 136 ++++++++++++++++++ keyboards/handwired/dygma/raise/iso/iso.c | 39 ----- .../handwired/dygma/raise/iso/keyboard.json | 136 ++++++++++++++++++ keyboards/handwired/hnah108/hnah108.c | 47 ------ keyboards/handwired/hnah108/keyboard.json | 34 ++++- keyboards/handwired/hnah40rgb/hnah40rgb.c | 47 ------ keyboards/handwired/hnah40rgb/keyboard.json | 52 +++++++ .../handwired/hnah40rgb/keymaps/ansi/config.h | 18 --- keyboards/handwired/orbweaver/keyboard.json | 25 +++- keyboards/handwired/orbweaver/orbweaver.c | 53 ++----- .../tractyl_manuform/4x6_right/4x6_right.c | 33 ----- .../tractyl_manuform/4x6_right/keyboard.json | 56 ++++++++ keyboards/hfdkb/ac001/ac001.c | 36 ----- keyboards/hfdkb/ac001/keyboard.json | 7 + .../chinese_pcb/devil68_pro/devil68_pro.c | 49 ------- .../chinese_pcb/devil68_pro/keyboard.json | 88 ++++++++++++ keyboards/hotdox76v2/hotdox76v2.c | 50 ------- keyboards/hotdox76v2/keyboard.json | 88 ++++++++++++ 23 files changed, 714 insertions(+), 463 deletions(-) delete mode 100644 keyboards/handwired/colorlice/colorlice.c delete mode 100644 keyboards/handwired/hnah108/hnah108.c delete mode 100644 keyboards/handwired/hnah40rgb/hnah40rgb.c delete mode 100644 keyboards/handwired/hnah40rgb/keymaps/ansi/config.h delete mode 100644 keyboards/hfdkb/ac001/ac001.c delete mode 100644 keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.c diff --git a/keyboards/hadron/ver3/keyboard.json b/keyboards/hadron/ver3/keyboard.json index f3e4bba06f..525b15df80 100644 --- a/keyboards/hadron/ver3/keyboard.json +++ b/keyboards/hadron/ver3/keyboard.json @@ -3,7 +3,19 @@ "device_version": "0.0.3" }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [1, 13], "x": 195, "y": 3, "flags": 4}, + {"matrix": [4, 13], "x": 195, "y": 16, "flags": 4}, + {"matrix": [4, 10], "x": 150, "y": 16, "flags": 4}, + {"matrix": [4, 7], "x": 105, "y": 16, "flags": 4}, + {"matrix": [4, 4], "x": 60, "y": 16, "flags": 4}, + {"matrix": [4, 1], "x": 15, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 15, "y": 3, "flags": 4}, + {"matrix": [1, 4], "x": 60, "y": 3, "flags": 4}, + {"matrix": [1, 7], "x": 105, "y": 3, "flags": 4}, + {"matrix": [1, 10], "x": 150, "y": 3, "flags": 4} + ] }, "matrix_pins": { "cols": ["B8", "B2", "B10", "A0", "A1", "A2", "B0", "A3", "B1", "A6", "A7", "B12", "C13", "B11", "B9"], diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c index d337fd9681..212aa15725 100644 --- a/keyboards/hadron/ver3/ver3.c +++ b/keyboards/hadron/ver3/ver3.c @@ -15,24 +15,6 @@ */ #include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -#include "rgb_matrix.h" - -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, 6, NO_LED, NO_LED, 7, NO_LED, NO_LED, 8, NO_LED, NO_LED, 9, NO_LED, NO_LED, 0, 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, 5, NO_LED, NO_LED, 4, NO_LED, NO_LED, 3, NO_LED, NO_LED, 2, NO_LED, NO_LED, 1, NO_LED } -}, { - { 195, 3 }, { 195, 16 }, { 150, 16 }, { 105, 16 }, { 60, 16 }, { 15, 16 }, { 15, 3 }, { 60, 3 }, { 105, 3 }, { 150, 3 } -}, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 -} }; - -#endif - #ifdef OLED_ENABLE oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/handwired/colorlice/colorlice.c b/keyboards/handwired/colorlice/colorlice.c deleted file mode 100644 index 81e87d8c7a..0000000000 --- a/keyboards/handwired/colorlice/colorlice.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 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" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, - { 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, NO_LED }, - { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NO_LED, 44, NO_LED }, - { 58, 57, 56, 55, 54, 53, NO_LED, 52, 51, 50, 49, 48, 47, 46, 45, NO_LED}, - { 59, NO_LED, 60, 61, 62, NO_LED, NO_LED,63, NO_LED, NO_LED, 64, 65,66,67, 68, NO_LED } -}, { - { 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, 16 }, { 210, 16 }, { 195, 16 }, { 180, 16 }, { 165, 16 }, { 150, 16 }, { 135, 16 }, { 120, 16 }, { 90, 16 }, { 75, 16 }, { 60, 16 }, { 45, 16 }, { 30, 16 }, { 15, 16 }, { 0, 16 }, - { 0, 32 }, { 15, 32 }, { 30, 32 }, { 45, 32 }, { 60, 32 }, { 75, 32 }, { 90, 32 }, { 135, 32 }, { 150, 32 }, { 165, 32 }, { 180, 32 }, { 195, 32 }, { 210, 32 }, { 224, 32 }, - { 225, 48 }, { 224, 48 }, { 210, 48 }, { 195, 48 }, { 180, 48 }, { 165, 48 }, { 150, 48 }, { 135, 48 }, { 90, 48 }, { 75, 48 }, { 60, 48 }, { 45, 48 }, { 30, 48 }, { 15, 48 }, - { 15, 64 }, { 45, 64 }, { 75, 64 }, { 90, 64 }, { 150, 64 }, { 180, 64 }, { 210, 64 }, { 215, 64 }, { 220, 64 }, { 225, 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, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -} }; -#endif diff --git a/keyboards/handwired/colorlice/keyboard.json b/keyboards/handwired/colorlice/keyboard.json index b2606afb89..5780f012d5 100644 --- a/keyboards/handwired/colorlice/keyboard.json +++ b/keyboards/handwired/colorlice/keyboard.json @@ -57,6 +57,77 @@ "solid_multisplash": true }, "driver": "ws2812", + "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": 120, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 135, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 195, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 210, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 210, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 195, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 180, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 165, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 150, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 135, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 90, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 75, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 60, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 45, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 30, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 15, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 15, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 30, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 75, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 90, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 135, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 150, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 165, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 180, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 195, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 210, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 195, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 150, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 135, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 60, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 30, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 15, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 15, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 45, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 75, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 90, "y": 64, "flags": 1}, + {"matrix": [4, 7], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 180, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 215, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 220, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/handwired/dygma/raise/ansi/ansi.c b/keyboards/handwired/dygma/raise/ansi/ansi.c index 67b84c3bc8..de2b9dedf6 100644 --- a/keyboards/handwired/dygma/raise/ansi/ansi.c +++ b/keyboards/handwired/dygma/raise/ansi/ansi.c @@ -38,44 +38,3 @@ const uint8_t led_map[RGB_MATRIX_LED_COUNT] = { 34 + LPH, 35 + LPH, 36 + LPH, 37 + LPH, 38 + LPH, 39 + LPH, 40 + LPH, 41 + LPH, 42 + LPH, 43 + LPH, 44 + LPH, 45 + LPH, 46 + LPH, 47 + LPH, 48 + LPH, 49 + LPH, 50 + LPH, 51 + LPH, 52 + LPH, 53 + LPH, 54 + LPH, 55 + LPH, 56 + LPH, 57 + LPH, 58 + LPH, 59 + LPH, 60 + LPH, 61 + LPH, 62 + LPH, 63 + LPH, 64 + LPH, 65 + LPH, 0xff }; - -// taken from "key_led_map" and reformatted -// ISO & ANSI (ANSI has no LED at 20, but this key can never be pressed so we can have just one map). -led_config_t g_led_config = { { - // left hand - { 0 , 1 , 2 , 3 , 4 , 5 , 6 , NO_LED } , - { 7 , 8 , 9 , 10 , 11 , 12 , NO_LED , NO_LED } , - { 13 , 14 , 15 , 16 , 17 , 18 , NO_LED , NO_LED } , - { 19 , 20 , 21 , 22 , 23 , 24 , 25 , NO_LED } , - { 26 , 27 , 28 , 29 , 30 , NO_LED , 31 , 32 } , - - // right hand - { 33 , 34 , 35 , 36 , 37 , 38 , 39 , NO_LED } , - { 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 } , - { 48 , 49 , 50 , 51 , 52 , 53 , 54 , NO_LED } , - { 55 , 56 , 57 , 58 , 59 , 60 , NO_LED , NO_LED } , - { 61 , 62 , 63 , 64 , 65 , 66 , 67 , 68 } - }, { - // generated from the svg image of the keyboard, see create-led-config.js - {82, 3}, {88, 3}, {94, 3}, {100, 3}, {106, 3}, {112, 3}, {118, 3}, {84, 10}, {91, 10}, {97, 10}, {103, 10}, {109, 10}, - {115, 10}, {84, 16}, {92, 16}, {98, 16}, {104, 16}, {110, 16}, {116, 16}, {85, 22}, - {0, 0}, - {94, 22}, {100, 22}, {106, 22}, {112, 22}, {118, 22}, {83, 28}, {90, 28}, {98, 28}, {106, 28}, {116, 28}, {111, 34}, - {118, 34}, {168, 3}, {159, 3}, {153, 3}, {147, 3}, {141, 3}, {135, 3}, {129, 3}, {168, 16}, {162, 10}, {156, 10}, - {150, 10}, {144, 10}, {139, 10}, {133, 10}, {127, 10}, {170, 10}, {159, 16}, {153, 16}, {147, 16}, {141, 16}, {135, 16}, - {129, 16}, {166, 22}, {154, 22}, {148, 22}, {142, 22}, {136, 22}, {130, 22}, {170, 28}, {163, 28}, {156, 28}, {149, 28}, - {140, 28}, {131, 28}, {136, 34}, {128, 34}, {78, 13}, {78, 6}, {80, 0}, {87, 0}, {95, 0}, {103, 0}, {111, 0}, {119, 0}, - {122, 3}, {121, 9}, {120, 15}, {122, 21}, {123, 27}, {123, 33}, {120, 38}, {116, 42}, {114, 48}, {112, 55}, {109, 61}, - {103, 64}, {96, 64}, {88, 64}, {81, 63}, {76, 60}, {75, 52}, {75, 46}, {74, 38}, {74, 32}, {75, 27}, {77, 21}, {175, 10}, - {175, 4}, {172, 0}, {164, 0}, {157, 0}, {149, 0}, {142, 0}, {134, 0}, {127, 0}, {123, 3}, {122, 8}, {122, 15}, {124, 21}, - {124, 27}, {124, 33}, {126, 38}, {131, 42}, {134, 48}, {135, 55}, {137, 61}, {143, 63}, {150, 63}, {158, 63}, {166, 63}, - {173, 63}, {177, 59}, {178, 49}, {179, 40}, {179, 31}, {177, 25}, {175, 20}, {175, 15}, {123, 54} - }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 0, - 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4 - } -}; diff --git a/keyboards/handwired/dygma/raise/ansi/keyboard.json b/keyboards/handwired/dygma/raise/ansi/keyboard.json index 9abe98fdfa..703ae91244 100644 --- a/keyboards/handwired/dygma/raise/ansi/keyboard.json +++ b/keyboards/handwired/dygma/raise/ansi/keyboard.json @@ -6,6 +6,142 @@ "rgb_matrix": true, "raw": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 82, "y": 3, "flags": 4}, + {"matrix": [0, 1], "x": 88, "y": 3, "flags": 4}, + {"matrix": [0, 2], "x": 94, "y": 3, "flags": 4}, + {"matrix": [0, 3], "x": 100, "y": 3, "flags": 4}, + {"matrix": [0, 4], "x": 106, "y": 3, "flags": 4}, + {"matrix": [0, 5], "x": 112, "y": 3, "flags": 4}, + {"matrix": [0, 6], "x": 118, "y": 3, "flags": 4}, + {"matrix": [1, 0], "x": 84, "y": 10, "flags": 4}, + {"matrix": [1, 1], "x": 91, "y": 10, "flags": 4}, + {"matrix": [1, 2], "x": 97, "y": 10, "flags": 4}, + {"matrix": [1, 3], "x": 103, "y": 10, "flags": 4}, + {"matrix": [1, 4], "x": 109, "y": 10, "flags": 4}, + {"matrix": [1, 5], "x": 115, "y": 10, "flags": 4}, + {"matrix": [2, 0], "x": 84, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 92, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 98, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 104, "y": 16, "flags": 4}, + {"matrix": [2, 4], "x": 110, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 116, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 85, "y": 22, "flags": 4}, + {"matrix": [3, 1], "x": 0, "y": 0, "flags": 0}, + {"matrix": [3, 2], "x": 94, "y": 22, "flags": 4}, + {"matrix": [3, 3], "x": 100, "y": 22, "flags": 4}, + {"matrix": [3, 4], "x": 106, "y": 22, "flags": 4}, + {"matrix": [3, 5], "x": 112, "y": 22, "flags": 4}, + {"matrix": [3, 6], "x": 118, "y": 22, "flags": 4}, + {"matrix": [4, 0], "x": 83, "y": 28, "flags": 4}, + {"matrix": [4, 1], "x": 90, "y": 28, "flags": 4}, + {"matrix": [4, 2], "x": 98, "y": 28, "flags": 4}, + {"matrix": [4, 3], "x": 106, "y": 28, "flags": 4}, + {"matrix": [4, 4], "x": 116, "y": 28, "flags": 4}, + {"matrix": [4, 6], "x": 111, "y": 34, "flags": 4}, + {"matrix": [4, 7], "x": 118, "y": 34, "flags": 4}, + {"matrix": [5, 0], "x": 168, "y": 3, "flags": 4}, + {"matrix": [5, 1], "x": 159, "y": 3, "flags": 4}, + {"matrix": [5, 2], "x": 153, "y": 3, "flags": 4}, + {"matrix": [5, 3], "x": 147, "y": 3, "flags": 4}, + {"matrix": [5, 4], "x": 141, "y": 3, "flags": 4}, + {"matrix": [5, 5], "x": 135, "y": 3, "flags": 4}, + {"matrix": [5, 6], "x": 129, "y": 3, "flags": 4}, + {"matrix": [6, 0], "x": 168, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 162, "y": 10, "flags": 4}, + {"matrix": [6, 2], "x": 156, "y": 10, "flags": 4}, + {"matrix": [6, 3], "x": 150, "y": 10, "flags": 4}, + {"matrix": [6, 4], "x": 144, "y": 10, "flags": 4}, + {"matrix": [6, 5], "x": 139, "y": 10, "flags": 4}, + {"matrix": [6, 6], "x": 133, "y": 10, "flags": 4}, + {"matrix": [6, 7], "x": 127, "y": 10, "flags": 4}, + {"matrix": [7, 0], "x": 170, "y": 10, "flags": 4}, + {"matrix": [7, 1], "x": 159, "y": 16, "flags": 4}, + {"matrix": [7, 2], "x": 153, "y": 16, "flags": 4}, + {"matrix": [7, 3], "x": 147, "y": 16, "flags": 4}, + {"matrix": [7, 4], "x": 141, "y": 16, "flags": 4}, + {"matrix": [7, 5], "x": 135, "y": 16, "flags": 4}, + {"matrix": [7, 6], "x": 129, "y": 16, "flags": 4}, + {"matrix": [8, 0], "x": 166, "y": 22, "flags": 4}, + {"matrix": [8, 1], "x": 154, "y": 22, "flags": 4}, + {"matrix": [8, 2], "x": 148, "y": 22, "flags": 4}, + {"matrix": [8, 3], "x": 142, "y": 22, "flags": 4}, + {"matrix": [8, 4], "x": 136, "y": 22, "flags": 4}, + {"matrix": [8, 5], "x": 130, "y": 22, "flags": 4}, + {"matrix": [9, 0], "x": 170, "y": 28, "flags": 4}, + {"matrix": [9, 1], "x": 163, "y": 28, "flags": 4}, + {"matrix": [9, 2], "x": 156, "y": 28, "flags": 4}, + {"matrix": [9, 3], "x": 149, "y": 28, "flags": 4}, + {"matrix": [9, 4], "x": 140, "y": 28, "flags": 4}, + {"matrix": [9, 5], "x": 131, "y": 28, "flags": 4}, + {"matrix": [9, 6], "x": 136, "y": 34, "flags": 4}, + {"matrix": [9, 7], "x": 128, "y": 34, "flags": 4}, + {"x": 78, "y": 13, "flags": 2}, + {"x": 78, "y": 6, "flags": 2}, + {"x": 80, "y": 0, "flags": 2}, + {"x": 87, "y": 0, "flags": 2}, + {"x": 95, "y": 0, "flags": 2}, + {"x": 103, "y": 0, "flags": 2}, + {"x": 111, "y": 0, "flags": 2}, + {"x": 119, "y": 0, "flags": 2}, + {"x": 122, "y": 3, "flags": 2}, + {"x": 121, "y": 9, "flags": 2}, + {"x": 120, "y": 15, "flags": 2}, + {"x": 122, "y": 21, "flags": 2}, + {"x": 123, "y": 27, "flags": 2}, + {"x": 123, "y": 33, "flags": 2}, + {"x": 120, "y": 38, "flags": 2}, + {"x": 116, "y": 42, "flags": 2}, + {"x": 114, "y": 48, "flags": 2}, + {"x": 112, "y": 55, "flags": 2}, + {"x": 109, "y": 61, "flags": 2}, + {"x": 103, "y": 64, "flags": 2}, + {"x": 96, "y": 64, "flags": 2}, + {"x": 88, "y": 64, "flags": 2}, + {"x": 81, "y": 63, "flags": 2}, + {"x": 76, "y": 60, "flags": 2}, + {"x": 75, "y": 52, "flags": 2}, + {"x": 75, "y": 46, "flags": 2}, + {"x": 74, "y": 38, "flags": 2}, + {"x": 74, "y": 32, "flags": 2}, + {"x": 75, "y": 27, "flags": 2}, + {"x": 77, "y": 21, "flags": 2}, + {"x": 175, "y": 10, "flags": 2}, + {"x": 175, "y": 4, "flags": 2}, + {"x": 172, "y": 0, "flags": 2}, + {"x": 164, "y": 0, "flags": 2}, + {"x": 157, "y": 0, "flags": 2}, + {"x": 149, "y": 0, "flags": 2}, + {"x": 142, "y": 0, "flags": 2}, + {"x": 134, "y": 0, "flags": 2}, + {"x": 127, "y": 0, "flags": 2}, + {"x": 123, "y": 3, "flags": 2}, + {"x": 122, "y": 8, "flags": 2}, + {"x": 122, "y": 15, "flags": 2}, + {"x": 124, "y": 21, "flags": 2}, + {"x": 124, "y": 27, "flags": 2}, + {"x": 124, "y": 33, "flags": 2}, + {"x": 126, "y": 38, "flags": 2}, + {"x": 131, "y": 42, "flags": 2}, + {"x": 134, "y": 48, "flags": 2}, + {"x": 135, "y": 55, "flags": 2}, + {"x": 137, "y": 61, "flags": 2}, + {"x": 143, "y": 63, "flags": 2}, + {"x": 150, "y": 63, "flags": 2}, + {"x": 158, "y": 63, "flags": 2}, + {"x": 166, "y": 63, "flags": 2}, + {"x": 173, "y": 63, "flags": 2}, + {"x": 177, "y": 59, "flags": 2}, + {"x": 178, "y": 49, "flags": 2}, + {"x": 179, "y": 40, "flags": 2}, + {"x": 179, "y": 31, "flags": 2}, + {"x": 177, "y": 25, "flags": 2}, + {"x": 175, "y": 20, "flags": 2}, + {"x": 175, "y": 15, "flags": 2}, + {"x": 123, "y": 54, "flags": 4} + ] + }, "layouts": { "LAYOUT_all": { "layout": [ diff --git a/keyboards/handwired/dygma/raise/iso/iso.c b/keyboards/handwired/dygma/raise/iso/iso.c index 9643af7b8c..247a9646df 100644 --- a/keyboards/handwired/dygma/raise/iso/iso.c +++ b/keyboards/handwired/dygma/raise/iso/iso.c @@ -38,42 +38,3 @@ const uint8_t led_map[RGB_MATRIX_LED_COUNT] = { 34 + LPH, 35 + LPH, 36 + LPH, 37 + LPH, 38 + LPH, 39 + LPH, 40 + LPH, 41 + LPH, 42 + LPH, 43 + LPH, 44 + LPH, 45 + LPH, 46 + LPH, 47 + LPH, 48 + LPH, 49 + LPH, 50 + LPH, 51 + LPH, 52 + LPH, 53 + LPH, 54 + LPH, 55 + LPH, 56 + LPH, 57 + LPH, 58 + LPH, 59 + LPH, 60 + LPH, 61 + LPH, 62 + LPH, 63 + LPH, 64 + LPH, 65 + LPH, 0xff }; - -// taken from "key_led_map" and reformatted -// ISO & ANSI (ANSI has no LED at 20, but this key can never be pressed so we can have just one map). -led_config_t g_led_config = { { - // left hand - { 0 , 1 , 2 , 3 , 4 , 5 , 6 , NO_LED } , - { 7 , 8 , 9 , 10 , 11 , 12 , NO_LED , NO_LED } , - { 13 , 14 , 15 , 16 , 17 , 18 , NO_LED , NO_LED } , - { 19 , 20 , 21 , 22 , 23 , 24 , 25 , NO_LED } , - { 26 , 27 , 28 , 29 , 30 , NO_LED , 31 , 32 } , - - // right hand - { 33 , 34 , 35 , 36 , 37 , 38 , 39 , NO_LED } , - { 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 } , - { 48 , 49 , 50 , 51 , 52 , 53 , 54 , NO_LED } , - { 55 , 56 , 57 , 58 , 59 , 60 , NO_LED , NO_LED } , - { 61 , 62 , 63 , 64 , 65 , 66 , 67 , 68 } - }, { - // generated from the svg image of the keyboard, see create-led-config.js - {82, 3}, {88, 3}, {94, 3}, {100, 3}, {106, 3}, {112, 3}, {118, 3}, {84, 10}, {91, 10}, {97, 10}, {103, 10}, {109, 10}, - {115, 10}, {84, 16}, {92, 16}, {98, 16}, {104, 16}, {110, 16}, {116, 16}, {82, 22}, {88, 22}, {94, 22}, {100, 22}, - {106, 22}, {112, 22}, {118, 22}, {83, 28}, {90, 28}, {98, 28}, {106, 28}, {116, 28}, {111, 34}, {118, 34}, {168, 3}, - {159, 3}, {153, 3}, {147, 3}, {141, 3}, {135, 3}, {129, 3}, {170, 13}, {162, 10}, {156, 10}, {150, 10}, {144, 10}, - {139, 10}, {133, 10}, {127, 10}, {164, 16}, {158, 16}, {152, 16}, {146, 16}, {140, 16}, {134, 16}, {128, 16}, {166, 22}, - {154, 22}, {148, 22}, {142, 22}, {136, 22}, {130, 22}, {170, 28}, {163, 28}, {156, 28}, {149, 28}, {140, 28}, {131, 28}, - {136, 34}, {128, 34}, {78, 13}, {78, 6}, {80, 0}, {87, 0}, {95, 0}, {103, 0}, {111, 0}, {119, 0}, {122, 3}, {121, 9}, - {120, 15}, {122, 21}, {123, 27}, {123, 33}, {120, 38}, {116, 42}, {114, 48}, {112, 55}, {109, 61}, {103, 64}, {96, 64}, - {88, 64}, {81, 63}, {76, 60}, {75, 52}, {75, 46}, {74, 38}, {74, 32}, {75, 27}, {77, 21}, {175, 10}, {175, 4}, {172, 0}, - {164, 0}, {157, 0}, {149, 0}, {142, 0}, {134, 0}, {127, 0}, {123, 3}, {122, 8}, {122, 15}, {124, 21}, {124, 27}, {124, 33}, - {126, 38}, {131, 42}, {134, 48}, {135, 55}, {137, 61}, {143, 63}, {150, 63}, {158, 63}, {166, 63}, {173, 63}, {177, 59}, - {178, 49}, {179, 40}, {179, 31}, {177, 25}, {175, 20}, {175, 15}, {123, 54} - - }, { - 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, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4 - } -}; diff --git a/keyboards/handwired/dygma/raise/iso/keyboard.json b/keyboards/handwired/dygma/raise/iso/keyboard.json index 9abe98fdfa..057851bd8c 100644 --- a/keyboards/handwired/dygma/raise/iso/keyboard.json +++ b/keyboards/handwired/dygma/raise/iso/keyboard.json @@ -6,6 +6,142 @@ "rgb_matrix": true, "raw": true }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 82, "y": 3, "flags": 4}, + {"matrix": [0, 1], "x": 88, "y": 3, "flags": 4}, + {"matrix": [0, 2], "x": 94, "y": 3, "flags": 4}, + {"matrix": [0, 3], "x": 100, "y": 3, "flags": 4}, + {"matrix": [0, 4], "x": 106, "y": 3, "flags": 4}, + {"matrix": [0, 5], "x": 112, "y": 3, "flags": 4}, + {"matrix": [0, 6], "x": 118, "y": 3, "flags": 4}, + {"matrix": [1, 0], "x": 84, "y": 10, "flags": 4}, + {"matrix": [1, 1], "x": 91, "y": 10, "flags": 4}, + {"matrix": [1, 2], "x": 97, "y": 10, "flags": 4}, + {"matrix": [1, 3], "x": 103, "y": 10, "flags": 4}, + {"matrix": [1, 4], "x": 109, "y": 10, "flags": 4}, + {"matrix": [1, 5], "x": 115, "y": 10, "flags": 4}, + {"matrix": [2, 0], "x": 84, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 92, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 98, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 104, "y": 16, "flags": 4}, + {"matrix": [2, 4], "x": 110, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 116, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 82, "y": 22, "flags": 4}, + {"matrix": [3, 1], "x": 88, "y": 22, "flags": 4}, + {"matrix": [3, 2], "x": 94, "y": 22, "flags": 4}, + {"matrix": [3, 3], "x": 100, "y": 22, "flags": 4}, + {"matrix": [3, 4], "x": 106, "y": 22, "flags": 4}, + {"matrix": [3, 5], "x": 112, "y": 22, "flags": 4}, + {"matrix": [3, 6], "x": 118, "y": 22, "flags": 4}, + {"matrix": [4, 0], "x": 83, "y": 28, "flags": 4}, + {"matrix": [4, 1], "x": 90, "y": 28, "flags": 4}, + {"matrix": [4, 2], "x": 98, "y": 28, "flags": 4}, + {"matrix": [4, 3], "x": 106, "y": 28, "flags": 4}, + {"matrix": [4, 4], "x": 116, "y": 28, "flags": 4}, + {"matrix": [4, 6], "x": 111, "y": 34, "flags": 4}, + {"matrix": [4, 7], "x": 118, "y": 34, "flags": 4}, + {"matrix": [5, 0], "x": 168, "y": 3, "flags": 4}, + {"matrix": [5, 1], "x": 159, "y": 3, "flags": 4}, + {"matrix": [5, 2], "x": 153, "y": 3, "flags": 4}, + {"matrix": [5, 3], "x": 147, "y": 3, "flags": 4}, + {"matrix": [5, 4], "x": 141, "y": 3, "flags": 4}, + {"matrix": [5, 5], "x": 135, "y": 3, "flags": 4}, + {"matrix": [5, 6], "x": 129, "y": 3, "flags": 4}, + {"matrix": [6, 0], "x": 170, "y": 13, "flags": 4}, + {"matrix": [6, 1], "x": 162, "y": 10, "flags": 4}, + {"matrix": [6, 2], "x": 156, "y": 10, "flags": 4}, + {"matrix": [6, 3], "x": 150, "y": 10, "flags": 4}, + {"matrix": [6, 4], "x": 144, "y": 10, "flags": 4}, + {"matrix": [6, 5], "x": 139, "y": 10, "flags": 4}, + {"matrix": [6, 6], "x": 133, "y": 10, "flags": 4}, + {"matrix": [6, 7], "x": 127, "y": 10, "flags": 4}, + {"matrix": [7, 0], "x": 164, "y": 16, "flags": 4}, + {"matrix": [7, 1], "x": 158, "y": 16, "flags": 4}, + {"matrix": [7, 2], "x": 152, "y": 16, "flags": 4}, + {"matrix": [7, 3], "x": 146, "y": 16, "flags": 4}, + {"matrix": [7, 4], "x": 140, "y": 16, "flags": 4}, + {"matrix": [7, 5], "x": 134, "y": 16, "flags": 4}, + {"matrix": [7, 6], "x": 128, "y": 16, "flags": 4}, + {"matrix": [8, 0], "x": 166, "y": 22, "flags": 4}, + {"matrix": [8, 1], "x": 154, "y": 22, "flags": 4}, + {"matrix": [8, 2], "x": 148, "y": 22, "flags": 4}, + {"matrix": [8, 3], "x": 142, "y": 22, "flags": 4}, + {"matrix": [8, 4], "x": 136, "y": 22, "flags": 4}, + {"matrix": [8, 5], "x": 130, "y": 22, "flags": 4}, + {"matrix": [9, 0], "x": 170, "y": 28, "flags": 4}, + {"matrix": [9, 1], "x": 163, "y": 28, "flags": 4}, + {"matrix": [9, 2], "x": 156, "y": 28, "flags": 4}, + {"matrix": [9, 3], "x": 149, "y": 28, "flags": 4}, + {"matrix": [9, 4], "x": 140, "y": 28, "flags": 4}, + {"matrix": [9, 5], "x": 131, "y": 28, "flags": 4}, + {"matrix": [9, 6], "x": 136, "y": 34, "flags": 4}, + {"matrix": [9, 7], "x": 128, "y": 34, "flags": 4}, + {"x": 78, "y": 13, "flags": 2}, + {"x": 78, "y": 6, "flags": 2}, + {"x": 80, "y": 0, "flags": 2}, + {"x": 87, "y": 0, "flags": 2}, + {"x": 95, "y": 0, "flags": 2}, + {"x": 103, "y": 0, "flags": 2}, + {"x": 111, "y": 0, "flags": 2}, + {"x": 119, "y": 0, "flags": 2}, + {"x": 122, "y": 3, "flags": 2}, + {"x": 121, "y": 9, "flags": 2}, + {"x": 120, "y": 15, "flags": 2}, + {"x": 122, "y": 21, "flags": 2}, + {"x": 123, "y": 27, "flags": 2}, + {"x": 123, "y": 33, "flags": 2}, + {"x": 120, "y": 38, "flags": 2}, + {"x": 116, "y": 42, "flags": 2}, + {"x": 114, "y": 48, "flags": 2}, + {"x": 112, "y": 55, "flags": 2}, + {"x": 109, "y": 61, "flags": 2}, + {"x": 103, "y": 64, "flags": 2}, + {"x": 96, "y": 64, "flags": 2}, + {"x": 88, "y": 64, "flags": 2}, + {"x": 81, "y": 63, "flags": 2}, + {"x": 76, "y": 60, "flags": 2}, + {"x": 75, "y": 52, "flags": 2}, + {"x": 75, "y": 46, "flags": 2}, + {"x": 74, "y": 38, "flags": 2}, + {"x": 74, "y": 32, "flags": 2}, + {"x": 75, "y": 27, "flags": 2}, + {"x": 77, "y": 21, "flags": 2}, + {"x": 175, "y": 10, "flags": 2}, + {"x": 175, "y": 4, "flags": 2}, + {"x": 172, "y": 0, "flags": 2}, + {"x": 164, "y": 0, "flags": 2}, + {"x": 157, "y": 0, "flags": 2}, + {"x": 149, "y": 0, "flags": 2}, + {"x": 142, "y": 0, "flags": 2}, + {"x": 134, "y": 0, "flags": 2}, + {"x": 127, "y": 0, "flags": 2}, + {"x": 123, "y": 3, "flags": 2}, + {"x": 122, "y": 8, "flags": 2}, + {"x": 122, "y": 15, "flags": 2}, + {"x": 124, "y": 21, "flags": 2}, + {"x": 124, "y": 27, "flags": 2}, + {"x": 124, "y": 33, "flags": 2}, + {"x": 126, "y": 38, "flags": 2}, + {"x": 131, "y": 42, "flags": 2}, + {"x": 134, "y": 48, "flags": 2}, + {"x": 135, "y": 55, "flags": 2}, + {"x": 137, "y": 61, "flags": 2}, + {"x": 143, "y": 63, "flags": 2}, + {"x": 150, "y": 63, "flags": 2}, + {"x": 158, "y": 63, "flags": 2}, + {"x": 166, "y": 63, "flags": 2}, + {"x": 173, "y": 63, "flags": 2}, + {"x": 177, "y": 59, "flags": 2}, + {"x": 178, "y": 49, "flags": 2}, + {"x": 179, "y": 40, "flags": 2}, + {"x": 179, "y": 31, "flags": 2}, + {"x": 177, "y": 25, "flags": 2}, + {"x": 175, "y": 20, "flags": 2}, + {"x": 175, "y": 15, "flags": 2}, + {"x": 123, "y": 54, "flags": 4} + ] + }, "layouts": { "LAYOUT_all": { "layout": [ diff --git a/keyboards/handwired/hnah108/hnah108.c b/keyboards/handwired/hnah108/hnah108.c deleted file mode 100644 index fde7b16564..0000000000 --- a/keyboards/handwired/hnah108/hnah108.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2019 HnahKB - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 18, 17, 16, NO_LED, 15, 14, NO_LED, NO_LED, 13, 12, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { 19, 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 }, - { 20, NO_LED, NO_LED, NO_LED, NO_LED, 24, NO_LED, NO_LED, 26, NO_LED, NO_LED }, - { 21, 22, 23, 25, 27, NO_LED, 28, 29, NO_LED, 0, 1 }, - { 11, 10, NO_LED, 9, NO_LED, 8, NO_LED, 7, 6, NO_LED, 5 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 4 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 3 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 2 } - }, { - // LED Index to Physical Position - { 0, 0 }, { 18, 0 }, { 37, 0 }, { 56, 0 }, { 74, 0 }, { 93, 0 }, { 112, 0 }, { 130, 0 }, { 149, 0 }, { 168, 0 }, { 186, 0 }, { 205, 0 }, { 224, 0 }, - { 0, 25 }, { 224, 25 }, - { 0, 51 }, { 224, 51 }, - { 0, 63 }, { 18, 63 }, { 37, 63 }, { 56, 63 }, { 74, 63 }, { 93, 63 }, { 112, 63 }, { 130, 63 }, { 149, 63 }, { 168, 63 }, { 186, 63 }, { 205, 63 }, { 224, 63 } - }, { - // LED Index to Flag - 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 - } -}; -#endif diff --git a/keyboards/handwired/hnah108/keyboard.json b/keyboards/handwired/hnah108/keyboard.json index a02a70173c..808fd9eb24 100644 --- a/keyboards/handwired/hnah108/keyboard.json +++ b/keyboards/handwired/hnah108/keyboard.json @@ -51,7 +51,39 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [5, 9], "x": 0, "y": 0, "flags": 1}, + {"matrix": [5, 10], "x": 18, "y": 0, "flags": 1}, + {"matrix": [9, 10], "x": 37, "y": 0, "flags": 1}, + {"matrix": [8, 10], "x": 56, "y": 0, "flags": 1}, + {"matrix": [7, 10], "x": 74, "y": 0, "flags": 1}, + {"matrix": [6, 10], "x": 93, "y": 0, "flags": 1}, + {"matrix": [6, 8], "x": 112, "y": 0, "flags": 1}, + {"matrix": [6, 7], "x": 130, "y": 0, "flags": 1}, + {"matrix": [6, 5], "x": 149, "y": 0, "flags": 1}, + {"matrix": [6, 3], "x": 168, "y": 0, "flags": 1}, + {"matrix": [6, 1], "x": 186, "y": 0, "flags": 1}, + {"matrix": [6, 0], "x": 205, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 224, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 0, "y": 25, "flags": 1}, + {"matrix": [0, 5], "x": 224, "y": 25, "flags": 1}, + {"matrix": [0, 4], "x": 0, "y": 51, "flags": 1}, + {"matrix": [0, 2], "x": 224, "y": 51, "flags": 1}, + {"matrix": [0, 1], "x": 0, "y": 63, "flags": 1}, + {"matrix": [0, 0], "x": 18, "y": 63, "flags": 1}, + {"matrix": [2, 0], "x": 37, "y": 63, "flags": 1}, + {"matrix": [4, 0], "x": 56, "y": 63, "flags": 1}, + {"matrix": [5, 0], "x": 74, "y": 63, "flags": 1}, + {"matrix": [5, 1], "x": 93, "y": 63, "flags": 1}, + {"matrix": [5, 2], "x": 112, "y": 63, "flags": 1}, + {"matrix": [4, 5], "x": 130, "y": 63, "flags": 1}, + {"matrix": [5, 3], "x": 149, "y": 63, "flags": 1}, + {"matrix": [4, 8], "x": 168, "y": 63, "flags": 1}, + {"matrix": [5, 4], "x": 186, "y": 63, "flags": 1}, + {"matrix": [5, 6], "x": 205, "y": 63, "flags": 1}, + {"matrix": [5, 7], "x": 224, "y": 63, "flags": 1} + ] }, "features": { "backlight": true, diff --git a/keyboards/handwired/hnah40rgb/hnah40rgb.c b/keyboards/handwired/hnah40rgb/hnah40rgb.c deleted file mode 100644 index 1f877975e5..0000000000 --- a/keyboards/handwired/hnah40rgb/hnah40rgb.c +++ /dev/null @@ -1,47 +0,0 @@ -#include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -#if defined (ansi) -led_config_t g_led_config = { { - //Key Matrix to LED Index - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - {22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12 }, - {23, 24, 25, 26, 27, 28, 29, 30, 31, NO_LED, 34}, - {43, 42, 41, NO_LED, NO_LED, NO_LED, 38, NO_LED, 36, 35, 11} -}, { - //LED Index to Physical Positon - { 0, 0}, { 20, 0}, { 40, 0 }, { 61, 0 }, { 81, 0}, { 101, 0}, { 122, 0}, { 142, 0}, { 162, 0}, { 183, 0}, { 224, 0}, { 224, 0}, - {224, 21}, {183, 21}, {162,21 }, {142, 21}, {122,21}, { 101,21}, { 81 ,21}, { 61 ,21}, { 40 ,21}, { 20 ,21}, { 0 ,21}, - { 0, 42}, { 20, 42}, { 40,42 }, { 61, 42}, { 81,42}, { 101,42}, { 122,42}, { 142,42}, { 162,42}, { 183,42}, { 224,42}, - {224, 64}, {224, 64}, {181,64 }, {162, 64}, {122,64}, {101,64}, { 61,64}, { 40,64}, { 20,64}, { 0,64}, - { 0,64}, { 0,0}, { 224,10}, { 224,18}, { 224,30}, { 224,47}, -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, -} }; - -#else -led_config_t g_led_config = { { - //Key Matrix to LED Index - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - {22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12 }, - {23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34}, - {43, 42, 41, NO_LED, 40, 39, 38, 37, 36, 35, 11} -}, { - //LED Index to Physical Positon - { 0, 0}, { 20, 0}, { 40, 0 }, { 61, 0 }, { 81, 0}, { 101, 0}, { 122, 0}, { 142, 0}, { 162, 0}, { 183, 0}, { 224, 0}, { 224, 0}, - {224, 21}, {183, 21}, {162,21 }, {142, 21}, {122,21}, { 101,21}, { 81 ,21}, { 61 ,21}, { 40 ,21}, { 20 ,21}, { 0 ,21}, - { 0, 42}, { 20, 42}, { 40,42 }, { 61, 42}, { 81,42}, { 101,42}, { 122,42}, { 142,42}, { 162,42}, { 183,42}, { 224,42}, - {224, 64}, {224, 64}, {181,64 }, {162, 64}, {122,64}, {101,64}, { 61,64}, { 40,64}, { 20,64}, { 0,64}, - { 0,64}, { 0,0}, { 224,10}, { 224,18}, { 224,30}, { 224,47}, -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, -} }; -#endif -#endif \ No newline at end of file diff --git a/keyboards/handwired/hnah40rgb/keyboard.json b/keyboards/handwired/hnah40rgb/keyboard.json index 6f13b70095..ec824ea14f 100644 --- a/keyboards/handwired/hnah40rgb/keyboard.json +++ b/keyboards/handwired/hnah40rgb/keyboard.json @@ -60,6 +60,58 @@ "animation": "cycle_pinwheel" }, "driver": "ws2812", + "layout": [ + {"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": 224, "y": 0, "flags": 4}, + {"matrix": [3, 10], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 10], "x": 224, "y": 21, "flags": 1}, + {"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": [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}, + {"x": 224, "y": 42, "flags": 1}, + {"matrix": [2, 10], "x": 224, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 224, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 181, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 162, "y": 64, "flags": 1}, + {"matrix": [3, 6], "x": 122, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 101, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 61, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"x": 0, "y": 64, "flags": 1}, + {"x": 0, "y": 0, "flags": 1}, + {"x": 224, "y": 10, "flags": 1}, + {"x": 224, "y": 18, "flags": 1}, + {"x": 224, "y": 30, "flags": 1}, + {"x": 224, "y": 47, "flags": 1} + ], "max_brightness": 200, "react_on_keyup": true }, diff --git a/keyboards/handwired/hnah40rgb/keymaps/ansi/config.h b/keyboards/handwired/hnah40rgb/keymaps/ansi/config.h deleted file mode 100644 index 66cd76a901..0000000000 --- a/keyboards/handwired/hnah40rgb/keymaps/ansi/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2019 HnahKB - * - * 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 ansi \ No newline at end of file diff --git a/keyboards/handwired/orbweaver/keyboard.json b/keyboards/handwired/orbweaver/keyboard.json index 73baa9a21d..0061c79ba2 100644 --- a/keyboards/handwired/orbweaver/keyboard.json +++ b/keyboards/handwired/orbweaver/keyboard.json @@ -12,8 +12,29 @@ "rgb_matrix": true }, "rgb_matrix": { - "center_point": [40, 30], - "driver": "is31fl3731" + "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 168, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 0, "y": 20, "flags": 4}, + {"matrix": [1, 0], "x": 56, "y": 20, "flags": 4}, + {"matrix": [1, 1], "x": 112, "y": 20, "flags": 4}, + {"matrix": [1, 2], "x": 168, "y": 20, "flags": 4}, + {"matrix": [1, 3], "x": 224, "y": 20, "flags": 4}, + {"matrix": [1, 4], "x": 0, "y": 40, "flags": 4}, + {"matrix": [2, 0], "x": 56, "y": 40, "flags": 4}, + {"matrix": [2, 1], "x": 112, "y": 40, "flags": 4}, + {"matrix": [2, 2], "x": 168, "y": 40, "flags": 4}, + {"matrix": [2, 3], "x": 224, "y": 40, "flags": 4}, + {"matrix": [2, 4], "x": 0, "y": 60, "flags": 4}, + {"matrix": [3, 0], "x": 56, "y": 60, "flags": 4}, + {"matrix": [3, 1], "x": 112, "y": 60, "flags": 4}, + {"matrix": [3, 2], "x": 168, "y": 60, "flags": 4}, + {"matrix": [3, 4], "x": 224, "y": 60, "flags": 4} + ] }, "matrix_pins": { "rows": ["GP4", "GP5", "GP6", "GP7", "GP8", "GP9"], diff --git a/keyboards/handwired/orbweaver/orbweaver.c b/keyboards/handwired/orbweaver/orbweaver.c index f89d1ca363..8c23818eea 100644 --- a/keyboards/handwired/orbweaver/orbweaver.c +++ b/keyboards/handwired/orbweaver/orbweaver.c @@ -15,10 +15,10 @@ // // SPDX-License-Identifier: GPL-2.0-or-later -// This IS31FL3731 configuration is for a Razer Orbweaver Chroma. -// It was reverse-engineered by testing all possible Cx_y combinations (144 total), +// This IS31FL3731 configuration is for a Razer Orbweaver Chroma. +// It was reverse-engineered by testing all possible Cx_y combinations (144 total), // and determining which ones addressed individual diodes (60 total). These were then -// placed in order R-G-B, sweeping left to right, and then top to bottom. +// placed in order R-G-B, sweeping left to right, and then top to bottom. #include "rgb_matrix.h" @@ -30,55 +30,24 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { * | | | B location * | | | | */ {0, C9_1, C8_1, C7_1}, //top left key. - {0, C9_2, C8_2, C7_2}, + {0, C9_2, C8_2, C7_2}, {0, C9_3, C8_3, C7_3}, {0, C9_4, C8_4, C7_4}, - {0, C9_5, C8_5, C7_5}, //top right key. + {0, C9_5, C8_5, C7_5}, //top right key. {0, C9_6, C8_6, C7_6}, - {0, C9_7, C8_7, C6_6}, + {0, C9_7, C8_7, C6_6}, {0, C9_8, C7_7, C6_7}, - {0, C1_8, C2_8, C3_8}, + {0, C1_8, C2_8, C3_8}, {0, C1_7, C2_7, C3_7}, {0, C1_6, C2_6, C3_6}, - {0, C1_5, C2_5, C3_5}, - {0, C1_4, C2_4, C3_4}, - {0, C1_3, C2_3, C3_3}, + {0, C1_5, C2_5, C3_5}, + {0, C1_4, C2_4, C3_4}, + {0, C1_3, C2_3, C3_3}, {0, C1_2, C2_2, C4_3}, {0, C1_1, C3_2, C4_2}, //lower left key - {0, C9_9, C8_9, C7_9}, + {0, C9_9, C8_9, C7_9}, {0, C9_10, C8_10, C7_10}, {0, C9_11, C8_11, C7_11}, {0, C9_12, C8_12, C7_12} //lower right key }; - -led_config_t g_led_config = { - // Matrix location to LED index - { - { 0, 2, 3, 4, 5 }, - { 6, 7, 8, 9, 10 }, - { 11, 12, 13, 14, 15 }, - { 16, 17, 18, 19, 19 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } - }, - - // LED index to physical location - { - {0,0}, {20,0}, {40,0}, {60,0}, {80,0}, - {0,20}, {20,20}, {40,20}, {60,20}, {80,20}, - {0,40}, {20,40}, {40,40}, {60,40}, {80,40}, - {0,60}, {20,60}, {40,60}, {60,60}, {80,60} - }, - - // LED index to flags - { - 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4 - } - }; - - - diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c index 298060bcb4..f678db94d8 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c +++ b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c @@ -16,39 +16,6 @@ #include "tractyl_manuform.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 24, 23, 18, 17, 10, 9 }, - { 25, 22, 19, 16, 11, 8 }, - { 26, 21, 20, 15, 12, 7 }, - { NO_LED, NO_LED, NO_LED, 14, 13, 6 }, - { NO_LED, NO_LED, NO_LED, 14, 13, 6 }, - { 51, 50, 45, 44, 37, 36 }, - { 52, 49, 46, 43, 38, 35 }, - { 53, 48, 47, 42, 39, 34 }, - { NO_LED, NO_LED, NO_LED, 41, 40, 33 }, - { NO_LED, NO_LED, NO_LED, 41, 40, 33 } -}, { - { 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, - { 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, - { 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, - { 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 }, - { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 }, - { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 }, - { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 }, - { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 } -}, { - 2, 2, 2, 2, 2, 2, 1, - 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 1, 4, - 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, - 4, 4, 1, 1, 1 -} }; -#endif - #ifdef SWAP_HANDS_ENABLE const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keyboard.json b/keyboards/handwired/tractyl_manuform/4x6_right/keyboard.json index cc651bec95..8e5290006e 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/keyboard.json +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keyboard.json @@ -7,6 +7,62 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"x": 85, "y": 16, "flags": 2}, + {"x": 50, "y": 13, "flags": 2}, + {"x": 16, "y": 20, "flags": 2}, + {"x": 16, "y": 38, "flags": 2}, + {"x": 50, "y": 48, "flags": 2}, + {"x": 85, "y": 52, "flags": 2}, + {"matrix": [4, 5], "x": 95, "y": 63, "flags": 1}, + {"matrix": [2, 5], "x": 85, "y": 39, "flags": 4}, + {"matrix": [1, 5], "x": 85, "y": 21, "flags": 4}, + {"matrix": [0, 5], "x": 85, "y": 4, "flags": 4}, + {"matrix": [0, 4], "x": 68, "y": 2, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 19, "flags": 4}, + {"matrix": [2, 4], "x": 68, "y": 37, "flags": 4}, + {"matrix": [4, 4], "x": 80, "y": 58, "flags": 1}, + {"matrix": [4, 3], "x": 60, "y": 55, "flags": 1}, + {"matrix": [2, 3], "x": 50, "y": 35, "flags": 4}, + {"matrix": [1, 3], "x": 50, "y": 13, "flags": 4}, + {"matrix": [0, 3], "x": 50, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 33, "y": 3, "flags": 4}, + {"matrix": [1, 2], "x": 33, "y": 20, "flags": 4}, + {"matrix": [2, 2], "x": 33, "y": 37, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 42, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 24, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 7, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 7, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 24, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 41, "flags": 1}, + {"x": 139, "y": 16, "flags": 2}, + {"x": 174, "y": 13, "flags": 2}, + {"x": 208, "y": 20, "flags": 2}, + {"x": 208, "y": 38, "flags": 2}, + {"x": 174, "y": 48, "flags": 2}, + {"x": 139, "y": 52, "flags": 2}, + {"matrix": [9, 5], "x": 129, "y": 63, "flags": 1}, + {"matrix": [7, 5], "x": 139, "y": 39, "flags": 4}, + {"matrix": [6, 5], "x": 139, "y": 21, "flags": 4}, + {"matrix": [5, 5], "x": 139, "y": 4, "flags": 4}, + {"matrix": [5, 4], "x": 156, "y": 2, "flags": 4}, + {"matrix": [6, 4], "x": 156, "y": 19, "flags": 4}, + {"matrix": [7, 4], "x": 156, "y": 37, "flags": 4}, + {"matrix": [9, 4], "x": 144, "y": 58, "flags": 1}, + {"matrix": [9, 3], "x": 164, "y": 55, "flags": 1}, + {"matrix": [7, 3], "x": 174, "y": 35, "flags": 4}, + {"matrix": [6, 3], "x": 174, "y": 13, "flags": 4}, + {"matrix": [5, 3], "x": 174, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 191, "y": 3, "flags": 4}, + {"matrix": [6, 2], "x": 191, "y": 20, "flags": 4}, + {"matrix": [7, 2], "x": 191, "y": 37, "flags": 4}, + {"matrix": [7, 1], "x": 208, "y": 42, "flags": 4}, + {"matrix": [6, 1], "x": 208, "y": 24, "flags": 4}, + {"matrix": [5, 1], "x": 208, "y": 7, "flags": 4}, + {"matrix": [5, 0], "x": 224, "y": 7, "flags": 1}, + {"matrix": [6, 0], "x": 224, "y": 24, "flags": 1}, + {"matrix": [7, 0], "x": 224, "y": 41, "flags": 1} + ], "max_brightness": 80, "sleep": true, "split_count": [32, 30] diff --git a/keyboards/hfdkb/ac001/ac001.c b/keyboards/hfdkb/ac001/ac001.c deleted file mode 100644 index 83dbdeb628..0000000000 --- a/keyboards/hfdkb/ac001/ac001.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 2022 jonylee@hfd - * - * 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" -/* - 3---------------2 - | | | - | | | - 4-------0-------1 -*/ -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 1, 2, 3, 4} -}, { - // LED Index to Physical Position - { 64, 112 }, { 64, 224 }, { 224, 0 }, { 0, 0 }, { 64, 0 }, - -}, { - // LED Index to Flag - 4, 4, 4, 4, 4 -} }; -#endif diff --git a/keyboards/hfdkb/ac001/keyboard.json b/keyboards/hfdkb/ac001/keyboard.json index ee9aab074b..ffb20e3c01 100644 --- a/keyboards/hfdkb/ac001/keyboard.json +++ b/keyboards/hfdkb/ac001/keyboard.json @@ -21,6 +21,13 @@ "multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 112, "y": 64, "flags": 4}, + {"matrix": [0, 1], "x": 224, "y": 64, "flags": 4}, + {"matrix": [0, 2], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 0, "y": 64, "flags": 4} + ], "react_on_keyup": true, "sleep": true }, diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.c b/keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.c deleted file mode 100644 index 98a35e7483..0000000000 --- a/keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2022 HorrorTroll - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14 }, - { 15, NO_LED, 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, NO_LED, 43 }, - { NO_LED, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, NO_LED, 55, 56, 57 }, - { 58, 59, NO_LED, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 } -}, { - // Key matrix (0 -> 67) - {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}, {224, 0}, - {3 , 16}, {21 , 16}, {36 , 16}, {51 , 16}, {66 , 16}, {81 , 16}, {96 , 16}, {111, 16}, {126, 16}, {141, 16}, {156, 16}, {171, 16}, {186, 16}, {205, 16}, {224, 16}, - {5 , 32}, {25 , 32}, {40 , 32}, {55 , 32}, {70 , 32}, {85 , 32}, {100, 32}, {115, 32}, {130, 32}, {145, 32}, {160, 32}, {175, 32}, {200, 32}, {224, 32}, - {8 , 48}, {31 , 48}, {46 , 48}, {61 , 48}, {76 , 48}, {91 , 48}, {106, 48}, {121, 48}, {136, 48}, {151, 48}, {166, 48}, {188, 48}, {210, 48}, {224, 48}, - {2 , 64}, {19 , 64}, {36 , 64}, {96 , 64}, {149, 64}, {164, 64}, {179, 64}, {194, 64}, {209, 64}, {224, 64}, - - // Underglow (68 -> 85) - {210, 60}, {186, 12}, {158, 12}, {130, 12}, {101, 12}, {71 , 12}, {39 , 12}, {13 , 12}, {13 , 35}, - {13 , 12}, {39 , 12}, {71 , 12}, {101, 12}, {130, 12}, {158, 12}, {186, 12}, {210, 12}, {210, 35}, -}, { - // Key matrix (0 -> 67) - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, - - // Underglow (68 -> 85) - 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2 -} }; -#endif diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keyboard.json b/keyboards/horrortroll/chinese_pcb/devil68_pro/keyboard.json index 250cceb3e7..80cb05a3c2 100644 --- a/keyboards/horrortroll/chinese_pcb/devil68_pro/keyboard.json +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keyboard.json @@ -59,6 +59,94 @@ "solid_multisplash": true }, "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 202, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 3, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 21, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 51, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 66, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 81, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 111, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 126, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 141, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 156, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 171, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 186, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 205, "y": 16, "flags": 4}, + {"matrix": [1, 15], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 5, "y": 32, "flags": 8}, + {"matrix": [2, 2], "x": 25, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 40, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 55, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 70, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 100, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 115, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 130, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 145, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 175, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 200, "y": 32, "flags": 1}, + {"matrix": [2, 15], "x": 224, "y": 32, "flags": 4}, + {"matrix": [3, 1], "x": 8, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 31, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 46, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 61, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 76, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 91, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 106, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 121, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 151, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 166, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 188, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 15], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 19, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 36, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 149, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 164, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 179, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 194, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 209, "y": 64, "flags": 4}, + {"matrix": [4, 15], "x": 224, "y": 64, "flags": 4}, + {"x": 210, "y": 60, "flags": 2}, + {"x": 186, "y": 12, "flags": 2}, + {"x": 158, "y": 12, "flags": 2}, + {"x": 130, "y": 12, "flags": 2}, + {"x": 101, "y": 12, "flags": 2}, + {"x": 71, "y": 12, "flags": 2}, + {"x": 39, "y": 12, "flags": 2}, + {"x": 13, "y": 12, "flags": 2}, + {"x": 13, "y": 35, "flags": 2}, + {"x": 13, "y": 12, "flags": 2}, + {"x": 39, "y": 12, "flags": 2}, + {"x": 71, "y": 12, "flags": 2}, + {"x": 101, "y": 12, "flags": 2}, + {"x": 130, "y": 12, "flags": 2}, + {"x": 158, "y": 12, "flags": 2}, + {"x": 186, "y": 12, "flags": 2}, + {"x": 210, "y": 12, "flags": 2}, + {"x": 210, "y": 35, "flags": 2} + ], "max_brightness": 200 }, "features": { diff --git a/keyboards/hotdox76v2/hotdox76v2.c b/keyboards/hotdox76v2/hotdox76v2.c index e60777703e..022bd92a1f 100644 --- a/keyboards/hotdox76v2/hotdox76v2.c +++ b/keyboards/hotdox76v2/hotdox76v2.c @@ -8,56 +8,6 @@ #include "oled_font_lib/logo2.h" #include "oled_font_lib/ext_font.h" - -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { - { - { NO_LED, 34, 33, 32, 35, 37, 36 }, - { 27, 28, 29, 30, 31, NO_LED, NO_LED }, - { 26, 25, 24, 23, 22, 21, 20 }, - { 14, 15, 16, 17, 18, 19, NO_LED }, - { 13, 12, 11, 10, 9, 8, 7 }, - { 0, 1, 2, 3, 4, 5, 6 }, - /*right*/ - { NO_LED, 77, 76, 75, 78, 80, 79 }, - { 70, 71, 72, 73, 74, NO_LED, NO_LED }, - { 69, 68, 67, 66, 65, 64, 63 }, - { 57, 58, 59, 60, 61, 62, NO_LED }, - { 56, 55, 54, 53, 52, 51, 50 }, - { 43, 44, 45, 46, 47, 48, 49 } - }, - { - // LED Index to Physical Position - {0,0}, {17,0}, {34,0}, {52,0}, {69,0}, {86,0}, {103,0}, - {103,13}, {86,13}, {69,13}, {52,13}, {34,13}, {17,13}, {0,13}, - {0,26}, {17,26}, {34,26}, {52,26}, {69,26}, {86,26}, - {103,38}, {86,38}, {69,38}, {52,38}, {34,38}, {17,38}, {0,38}, - {0,51}, {17,51}, {34,51}, {52,51}, {69,51}, - {86,64}, {69,64}, {52,64}, {34,64}, {17,64}, {0,64}, - {69,64}, {52,64}, {34,64}, {17,64}, {0,64}, - - {224,0}, {207,0}, {190,0}, {172,0}, {155,0}, {138,0}, {121,0}, - {121,13}, {138,13}, {155,13}, {172,13}, {190,13}, {207,13}, {224,13}, - {224,26}, {207,26}, {190,26}, {172,26}, {155,26}, {138,26}, - {121,38}, {138,38}, {155,38}, {172,38}, {190,38}, {207,38}, {224,38}, - {224,51}, {207,51}, {190,51}, {172,51}, {155,51}, - {138,64}, {155,64}, {172,64}, {190,64}, {207,64}, {224,64}, - {155,64}, {172,64}, {190,64}, {207,64}, {224,64} - - - }, - { - // 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,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, - 2,2,2,2,2, - 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,4,4, - 2,2,2,2,2 - } -}; -// clang-format on -#endif - #ifdef OLED_ENABLE # define UNC (' ') diff --git a/keyboards/hotdox76v2/keyboard.json b/keyboards/hotdox76v2/keyboard.json index 8881670b56..cb70bdefee 100644 --- a/keyboards/hotdox76v2/keyboard.json +++ b/keyboards/hotdox76v2/keyboard.json @@ -24,6 +24,94 @@ }, "center_point": [112, 32], "driver": "ws2812", + "layout": [ + {"matrix": [5, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [5, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 69, "y": 0, "flags": 4}, + {"matrix": [5, 5], "x": 86, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 103, "y": 0, "flags": 4}, + {"matrix": [4, 6], "x": 103, "y": 13, "flags": 4}, + {"matrix": [4, 5], "x": 86, "y": 13, "flags": 4}, + {"matrix": [4, 4], "x": 69, "y": 13, "flags": 4}, + {"matrix": [4, 3], "x": 52, "y": 13, "flags": 4}, + {"matrix": [4, 2], "x": 34, "y": 13, "flags": 4}, + {"matrix": [4, 1], "x": 17, "y": 13, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 13, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 26, "flags": 4}, + {"matrix": [3, 1], "x": 17, "y": 26, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 26, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 26, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 26, "flags": 4}, + {"matrix": [3, 5], "x": 86, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 103, "y": 38, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 38, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 38, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 38, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 38, "flags": 4}, + {"matrix": [2, 1], "x": 17, "y": 38, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 38, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 51, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 51, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 51, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 51, "flags": 4}, + {"matrix": [1, 4], "x": 69, "y": 51, "flags": 4}, + {"matrix": [0, 3], "x": 86, "y": 64, "flags": 4}, + {"matrix": [0, 2], "x": 69, "y": 64, "flags": 4}, + {"matrix": [0, 1], "x": 52, "y": 64, "flags": 4}, + {"matrix": [0, 4], "x": 34, "y": 64, "flags": 4}, + {"matrix": [0, 6], "x": 17, "y": 64, "flags": 4}, + {"matrix": [0, 5], "x": 0, "y": 64, "flags": 4}, + {"x": 69, "y": 64, "flags": 2}, + {"x": 52, "y": 64, "flags": 2}, + {"x": 34, "y": 64, "flags": 2}, + {"x": 17, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"matrix": [11, 0], "x": 224, "y": 0, "flags": 4}, + {"matrix": [11, 1], "x": 207, "y": 0, "flags": 4}, + {"matrix": [11, 2], "x": 190, "y": 0, "flags": 4}, + {"matrix": [11, 3], "x": 172, "y": 0, "flags": 4}, + {"matrix": [11, 4], "x": 155, "y": 0, "flags": 4}, + {"matrix": [11, 5], "x": 138, "y": 0, "flags": 4}, + {"matrix": [11, 6], "x": 121, "y": 0, "flags": 4}, + {"matrix": [10, 6], "x": 121, "y": 13, "flags": 4}, + {"matrix": [10, 5], "x": 138, "y": 13, "flags": 4}, + {"matrix": [10, 4], "x": 155, "y": 13, "flags": 4}, + {"matrix": [10, 3], "x": 172, "y": 13, "flags": 4}, + {"matrix": [10, 2], "x": 190, "y": 13, "flags": 4}, + {"matrix": [10, 1], "x": 207, "y": 13, "flags": 4}, + {"matrix": [10, 0], "x": 224, "y": 13, "flags": 4}, + {"matrix": [9, 0], "x": 224, "y": 26, "flags": 4}, + {"matrix": [9, 1], "x": 207, "y": 26, "flags": 4}, + {"matrix": [9, 2], "x": 190, "y": 26, "flags": 4}, + {"matrix": [9, 3], "x": 172, "y": 26, "flags": 4}, + {"matrix": [9, 4], "x": 155, "y": 26, "flags": 4}, + {"matrix": [9, 5], "x": 138, "y": 26, "flags": 4}, + {"matrix": [8, 6], "x": 121, "y": 38, "flags": 4}, + {"matrix": [8, 5], "x": 138, "y": 38, "flags": 4}, + {"matrix": [8, 4], "x": 155, "y": 38, "flags": 4}, + {"matrix": [8, 3], "x": 172, "y": 38, "flags": 4}, + {"matrix": [8, 2], "x": 190, "y": 38, "flags": 4}, + {"matrix": [8, 1], "x": 207, "y": 38, "flags": 4}, + {"matrix": [8, 0], "x": 224, "y": 38, "flags": 4}, + {"matrix": [7, 0], "x": 224, "y": 51, "flags": 4}, + {"matrix": [7, 1], "x": 207, "y": 51, "flags": 4}, + {"matrix": [7, 2], "x": 190, "y": 51, "flags": 4}, + {"matrix": [7, 3], "x": 172, "y": 51, "flags": 4}, + {"matrix": [7, 4], "x": 155, "y": 51, "flags": 4}, + {"matrix": [6, 3], "x": 138, "y": 64, "flags": 4}, + {"matrix": [6, 2], "x": 155, "y": 64, "flags": 4}, + {"matrix": [6, 1], "x": 172, "y": 64, "flags": 4}, + {"matrix": [6, 4], "x": 190, "y": 64, "flags": 4}, + {"matrix": [6, 6], "x": 207, "y": 64, "flags": 4}, + {"matrix": [6, 5], "x": 224, "y": 64, "flags": 4}, + {"x": 155, "y": 64, "flags": 2}, + {"x": 172, "y": 64, "flags": 2}, + {"x": 190, "y": 64, "flags": 2}, + {"x": 207, "y": 64, "flags": 2}, + {"x": 224, "y": 64, "flags": 2} + ], "max_brightness": 150, "sleep": true, "split_count": [43, 43] From 6c96bb5a5a90da5b4db68fc915413fb97b6c3056 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:06:12 -0600 Subject: [PATCH 18/95] Migrate `g_led_config` to DD (TUW) (#25625) --- keyboards/teleport/native/ansi/ansi.c | 51 ---------- keyboards/teleport/native/ansi/keyboard.json | 89 +++++++++++++++++ keyboards/teleport/native/iso/iso.c | 51 ---------- keyboards/teleport/native/iso/keyboard.json | 89 +++++++++++++++++ keyboards/tkc/portico/keyboard.json | 69 +++++++++++++ keyboards/tkc/portico/portico.c | 22 ---- keyboards/tkc/portico68v2/keyboard.json | 84 ++++++++++++++++ keyboards/tkc/portico68v2/portico68v2.c | 24 ----- keyboards/tkc/portico75/keyboard.json | 100 +++++++++++++++++++ keyboards/tkc/portico75/portico75.c | 25 ----- keyboards/ungodly/launch_pad/keyboard.json | 24 +++++ keyboards/ungodly/launch_pad/launch_pad.c | 44 -------- keyboards/wekey/we27/keyboard.json | 29 ++++++ keyboards/wekey/we27/we27.c | 46 --------- keyboards/work_louder/loop/info.json | 11 ++ keyboards/work_louder/loop/loop.c | 14 --- keyboards/work_louder/micro/keyboard.json | 14 +++ keyboards/work_louder/micro/micro.c | 23 ----- keyboards/work_louder/nano/keyboard.json | 4 + keyboards/work_louder/nano/nano.c | 13 --- 20 files changed, 513 insertions(+), 313 deletions(-) delete mode 100644 keyboards/teleport/native/ansi/ansi.c delete mode 100644 keyboards/teleport/native/iso/iso.c delete mode 100644 keyboards/ungodly/launch_pad/launch_pad.c delete mode 100644 keyboards/wekey/we27/we27.c diff --git a/keyboards/teleport/native/ansi/ansi.c b/keyboards/teleport/native/ansi/ansi.c deleted file mode 100644 index 9c4ea99f40..0000000000 --- a/keyboards/teleport/native/ansi/ansi.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2021 Moritz Plattner - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index, LED 61 omitted on ANSI - { 0, 2, 4, 6, 8, 10, 12, 14 }, - { 1, 3, 5, 7, 9, 11, 13, 15 }, - { 16, 18, 20, 22, 24, 26, 28, NO_LED }, - { 17, 19, 21, 23, 25, 27, 29, 30 }, - { 31, 32, 34, 36, 38, 40, 42, 44 }, - { NO_LED, 33, 35, 37, 39, 41, 43, 45 }, - { 46, 48, 50, 52, 54, 56, NO_LED, 58 }, - { 47, 49, 51, 53, 55, 57, NO_LED, 59 }, - { 60, 62, 64, 66, 68, 70, NO_LED, 73 }, - { NO_LED, 63, 65, 67, 69, 71, 72, 74 }, - { 75, 78, NO_LED, NO_LED, NO_LED, 79, 81, 83 }, - { 76, 77, NO_LED, NO_LED, NO_LED, 80, 82, 84 } -}, { - // LED Index to Physical Position, the LED at { 0,0 } in row 5 is there to catch a non-existing LED on ANSI - { 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 }, {202,13 }, {224,13 }, - { 4,26 }, { 22,26 }, { 37,26 }, { 52,26 }, { 67,26 }, { 82,26 }, { 97,26 }, {112,26 }, {127,26 }, {142,26 }, {157,26 }, {172,26 }, {187,26 }, {205,26 }, {224,26 }, - { 6,38 }, { 26,38 }, { 41,38 }, { 56,38 }, { 71,38 }, { 86,38 }, {101,38 }, {116,38 }, {131,38 }, {146,38 }, {161,38 }, {175,38 }, {200,38 }, {224,38 }, - { 9,51 }, { 0,0 }, { 34,51 }, { 49,51 }, { 63,51 }, { 78,51 }, { 93,51 }, {108,51 }, {123,51 }, {138,51 }, {153,51 }, {168,51 }, {189,51 }, {209,51 }, {224,51 }, - { 2,64 }, { 21,64 }, { 39,64 }, { 95,64 }, {149,64 }, {164,64 }, {179,64 }, {194,64 }, {209,64 }, {224,64 } -}, { - // LED Index to Flag, the 0 flag in row 5 is there to catch a non-existing LED on ANSI - 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4,12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 9, 12,12,12, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 1, - 1, 9, 1, 4, 1, 1, 1, 4, 4, 4, -} }; -#endif diff --git a/keyboards/teleport/native/ansi/keyboard.json b/keyboards/teleport/native/ansi/keyboard.json index 30a420517e..68dddfad55 100644 --- a/keyboards/teleport/native/ansi/keyboard.json +++ b/keyboards/teleport/native/ansi/keyboard.json @@ -2,6 +2,95 @@ "usb": { "pid": "0x0003" }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 30, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 60, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 90, "y": 0, "flags": 1}, + {"matrix": [1, 3], "x": 105, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 119, "y": 0, "flags": 1}, + {"matrix": [1, 4], "x": 134, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 149, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 164, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 179, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 194, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 209, "y": 0, "flags": 1}, + {"matrix": [1, 7], "x": 224, "y": 0, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 13, "flags": 4}, + {"matrix": [3, 0], "x": 15, "y": 13, "flags": 4}, + {"matrix": [2, 1], "x": 30, "y": 13, "flags": 4}, + {"matrix": [3, 1], "x": 45, "y": 13, "flags": 4}, + {"matrix": [2, 2], "x": 60, "y": 13, "flags": 4}, + {"matrix": [3, 2], "x": 75, "y": 13, "flags": 4}, + {"matrix": [2, 3], "x": 90, "y": 13, "flags": 4}, + {"matrix": [3, 3], "x": 105, "y": 13, "flags": 4}, + {"matrix": [2, 4], "x": 119, "y": 13, "flags": 4}, + {"matrix": [3, 4], "x": 134, "y": 13, "flags": 4}, + {"matrix": [2, 5], "x": 149, "y": 13, "flags": 4}, + {"matrix": [3, 5], "x": 164, "y": 13, "flags": 4}, + {"matrix": [2, 6], "x": 179, "y": 13, "flags": 4}, + {"matrix": [3, 6], "x": 202, "y": 13, "flags": 1}, + {"matrix": [3, 7], "x": 224, "y": 13, "flags": 1}, + {"matrix": [4, 0], "x": 4, "y": 26, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 26, "flags": 4}, + {"matrix": [5, 1], "x": 37, "y": 26, "flags": 12}, + {"matrix": [4, 2], "x": 52, "y": 26, "flags": 4}, + {"matrix": [5, 2], "x": 67, "y": 26, "flags": 4}, + {"matrix": [4, 3], "x": 82, "y": 26, "flags": 4}, + {"matrix": [5, 3], "x": 97, "y": 26, "flags": 4}, + {"matrix": [4, 4], "x": 112, "y": 26, "flags": 4}, + {"matrix": [5, 4], "x": 127, "y": 26, "flags": 4}, + {"matrix": [4, 5], "x": 142, "y": 26, "flags": 4}, + {"matrix": [5, 5], "x": 157, "y": 26, "flags": 4}, + {"matrix": [4, 6], "x": 172, "y": 26, "flags": 4}, + {"matrix": [5, 6], "x": 187, "y": 26, "flags": 4}, + {"matrix": [4, 7], "x": 205, "y": 26, "flags": 1}, + {"matrix": [5, 7], "x": 224, "y": 26, "flags": 1}, + {"matrix": [6, 0], "x": 6, "y": 38, "flags": 9}, + {"matrix": [7, 0], "x": 26, "y": 38, "flags": 12}, + {"matrix": [6, 1], "x": 41, "y": 38, "flags": 12}, + {"matrix": [7, 1], "x": 56, "y": 38, "flags": 12}, + {"matrix": [6, 2], "x": 71, "y": 38, "flags": 4}, + {"matrix": [7, 2], "x": 86, "y": 38, "flags": 4}, + {"matrix": [6, 3], "x": 101, "y": 38, "flags": 4}, + {"matrix": [7, 3], "x": 116, "y": 38, "flags": 4}, + {"matrix": [6, 4], "x": 131, "y": 38, "flags": 4}, + {"matrix": [7, 4], "x": 146, "y": 38, "flags": 4}, + {"matrix": [6, 5], "x": 161, "y": 38, "flags": 4}, + {"matrix": [7, 5], "x": 175, "y": 38, "flags": 4}, + {"matrix": [6, 7], "x": 200, "y": 38, "flags": 1}, + {"matrix": [7, 7], "x": 224, "y": 38, "flags": 1}, + {"matrix": [8, 0], "x": 9, "y": 51, "flags": 1}, + {"x": 0, "y": 0, "flags": 0}, + {"matrix": [8, 1], "x": 34, "y": 51, "flags": 4}, + {"matrix": [9, 1], "x": 49, "y": 51, "flags": 4}, + {"matrix": [8, 2], "x": 63, "y": 51, "flags": 4}, + {"matrix": [9, 2], "x": 78, "y": 51, "flags": 4}, + {"matrix": [8, 3], "x": 93, "y": 51, "flags": 4}, + {"matrix": [9, 3], "x": 108, "y": 51, "flags": 4}, + {"matrix": [8, 4], "x": 123, "y": 51, "flags": 4}, + {"matrix": [9, 4], "x": 138, "y": 51, "flags": 4}, + {"matrix": [8, 5], "x": 153, "y": 51, "flags": 4}, + {"matrix": [9, 5], "x": 168, "y": 51, "flags": 4}, + {"matrix": [9, 6], "x": 189, "y": 51, "flags": 1}, + {"matrix": [8, 7], "x": 209, "y": 51, "flags": 4}, + {"matrix": [9, 7], "x": 224, "y": 51, "flags": 1}, + {"matrix": [10, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [11, 0], "x": 21, "y": 64, "flags": 9}, + {"matrix": [11, 1], "x": 39, "y": 64, "flags": 1}, + {"matrix": [10, 1], "x": 95, "y": 64, "flags": 4}, + {"matrix": [10, 5], "x": 149, "y": 64, "flags": 1}, + {"matrix": [11, 5], "x": 164, "y": 64, "flags": 1}, + {"matrix": [10, 6], "x": 179, "y": 64, "flags": 1}, + {"matrix": [11, 6], "x": 194, "y": 64, "flags": 4}, + {"matrix": [10, 7], "x": 209, "y": 64, "flags": 4}, + {"matrix": [11, 7], "x": 224, "y": 64, "flags": 4} + ] + }, "community_layouts": ["75_ansi"], "layouts": { "LAYOUT_75_ansi": { diff --git a/keyboards/teleport/native/iso/iso.c b/keyboards/teleport/native/iso/iso.c deleted file mode 100644 index 5acbffe8f9..0000000000 --- a/keyboards/teleport/native/iso/iso.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2021 Moritz Plattner - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 2, 4, 6, 8, 10, 12, 14 }, - { 1, 3, 5, 7, 9, 11, 13, 15 }, - { 16, 18, 20, 22, 24, 26, 28, NO_LED }, - { 17, 19, 21, 23, 25, 27, 29, 30 }, - { 31, 32, 34, 36, 38, 40, 42, 44 }, - { NO_LED, 33, 35, 37, 39, 41, 43, 45 }, - { 46, 48, 50, 52, 54, 56, NO_LED, 58 }, - { 47, 49, 51, 53, 55, 57, NO_LED, 59 }, - { 60, 62, 64, 66, 68, 70, NO_LED, 73 }, - { 61, 63, 65, 67, 69, 71, 72, 74 }, - { 75, 78, NO_LED, NO_LED, NO_LED, 79, 81, 83 }, - { 76, 77, NO_LED, NO_LED, NO_LED, 80, 82, 84 } -}, { - // LED Index to Physical Position - { 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 }, {202,13 }, {224,13 }, - { 4,26 }, { 22,26 }, { 37,26 }, { 52,26 }, { 67,26 }, { 82,26 }, { 97,26 }, {112,26 }, {127,26 }, {142,26 }, {157,26 }, {172,26 }, {187,26 }, {207,32 }, {224,26 }, - { 6,38 }, { 26,38 }, { 41,38 }, { 56,38 }, { 71,38 }, { 86,38 }, {101,38 }, {116,38 }, {131,38 }, {146,38 }, {161,38 }, {175,38 }, {190,38 }, {224,38 }, - { 2,51 }, { 19,51 }, { 34,51 }, { 49,51 }, { 63,51 }, { 78,51 }, { 93,51 }, {108,51 }, {123,51 }, {138,51 }, {153,51 }, {168,51 }, {189,51 }, {209,51 }, {224,51 }, - { 2,64 }, { 21,64 }, { 39,64 }, { 95,64 }, {149,64 }, {164,64 }, {179,64 }, {194,64 }, {209,64 }, {224,64 } -}, { - // LED Index to Flag - 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4,12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 9, 12,12,12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 1, - 1, 9, 1, 4, 1, 1, 1, 4, 4, 4, -} }; -#endif diff --git a/keyboards/teleport/native/iso/keyboard.json b/keyboards/teleport/native/iso/keyboard.json index 57c5cdb308..03a0d811b0 100644 --- a/keyboards/teleport/native/iso/keyboard.json +++ b/keyboards/teleport/native/iso/keyboard.json @@ -2,6 +2,95 @@ "usb": { "pid": "0x0002" }, + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 30, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 60, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 90, "y": 0, "flags": 1}, + {"matrix": [1, 3], "x": 105, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 119, "y": 0, "flags": 1}, + {"matrix": [1, 4], "x": 134, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 149, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 164, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 179, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 194, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 209, "y": 0, "flags": 1}, + {"matrix": [1, 7], "x": 224, "y": 0, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 13, "flags": 4}, + {"matrix": [3, 0], "x": 15, "y": 13, "flags": 4}, + {"matrix": [2, 1], "x": 30, "y": 13, "flags": 4}, + {"matrix": [3, 1], "x": 45, "y": 13, "flags": 4}, + {"matrix": [2, 2], "x": 60, "y": 13, "flags": 4}, + {"matrix": [3, 2], "x": 75, "y": 13, "flags": 4}, + {"matrix": [2, 3], "x": 90, "y": 13, "flags": 4}, + {"matrix": [3, 3], "x": 105, "y": 13, "flags": 4}, + {"matrix": [2, 4], "x": 119, "y": 13, "flags": 4}, + {"matrix": [3, 4], "x": 134, "y": 13, "flags": 4}, + {"matrix": [2, 5], "x": 149, "y": 13, "flags": 4}, + {"matrix": [3, 5], "x": 164, "y": 13, "flags": 4}, + {"matrix": [2, 6], "x": 179, "y": 13, "flags": 4}, + {"matrix": [3, 6], "x": 202, "y": 13, "flags": 1}, + {"matrix": [3, 7], "x": 224, "y": 13, "flags": 1}, + {"matrix": [4, 0], "x": 4, "y": 26, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 26, "flags": 4}, + {"matrix": [5, 1], "x": 37, "y": 26, "flags": 12}, + {"matrix": [4, 2], "x": 52, "y": 26, "flags": 4}, + {"matrix": [5, 2], "x": 67, "y": 26, "flags": 4}, + {"matrix": [4, 3], "x": 82, "y": 26, "flags": 4}, + {"matrix": [5, 3], "x": 97, "y": 26, "flags": 4}, + {"matrix": [4, 4], "x": 112, "y": 26, "flags": 4}, + {"matrix": [5, 4], "x": 127, "y": 26, "flags": 4}, + {"matrix": [4, 5], "x": 142, "y": 26, "flags": 4}, + {"matrix": [5, 5], "x": 157, "y": 26, "flags": 4}, + {"matrix": [4, 6], "x": 172, "y": 26, "flags": 4}, + {"matrix": [5, 6], "x": 187, "y": 26, "flags": 4}, + {"matrix": [4, 7], "x": 207, "y": 32, "flags": 1}, + {"matrix": [5, 7], "x": 224, "y": 26, "flags": 1}, + {"matrix": [6, 0], "x": 6, "y": 38, "flags": 9}, + {"matrix": [7, 0], "x": 26, "y": 38, "flags": 12}, + {"matrix": [6, 1], "x": 41, "y": 38, "flags": 12}, + {"matrix": [7, 1], "x": 56, "y": 38, "flags": 12}, + {"matrix": [6, 2], "x": 71, "y": 38, "flags": 4}, + {"matrix": [7, 2], "x": 86, "y": 38, "flags": 4}, + {"matrix": [6, 3], "x": 101, "y": 38, "flags": 4}, + {"matrix": [7, 3], "x": 116, "y": 38, "flags": 4}, + {"matrix": [6, 4], "x": 131, "y": 38, "flags": 4}, + {"matrix": [7, 4], "x": 146, "y": 38, "flags": 4}, + {"matrix": [6, 5], "x": 161, "y": 38, "flags": 4}, + {"matrix": [7, 5], "x": 175, "y": 38, "flags": 4}, + {"matrix": [6, 7], "x": 190, "y": 38, "flags": 4}, + {"matrix": [7, 7], "x": 224, "y": 38, "flags": 1}, + {"matrix": [8, 0], "x": 2, "y": 51, "flags": 1}, + {"matrix": [9, 0], "x": 19, "y": 51, "flags": 4}, + {"matrix": [8, 1], "x": 34, "y": 51, "flags": 4}, + {"matrix": [9, 1], "x": 49, "y": 51, "flags": 4}, + {"matrix": [8, 2], "x": 63, "y": 51, "flags": 4}, + {"matrix": [9, 2], "x": 78, "y": 51, "flags": 4}, + {"matrix": [8, 3], "x": 93, "y": 51, "flags": 4}, + {"matrix": [9, 3], "x": 108, "y": 51, "flags": 4}, + {"matrix": [8, 4], "x": 123, "y": 51, "flags": 4}, + {"matrix": [9, 4], "x": 138, "y": 51, "flags": 4}, + {"matrix": [8, 5], "x": 153, "y": 51, "flags": 4}, + {"matrix": [9, 5], "x": 168, "y": 51, "flags": 4}, + {"matrix": [9, 6], "x": 189, "y": 51, "flags": 1}, + {"matrix": [8, 7], "x": 209, "y": 51, "flags": 4}, + {"matrix": [9, 7], "x": 224, "y": 51, "flags": 1}, + {"matrix": [10, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [11, 0], "x": 21, "y": 64, "flags": 9}, + {"matrix": [11, 1], "x": 39, "y": 64, "flags": 1}, + {"matrix": [10, 1], "x": 95, "y": 64, "flags": 4}, + {"matrix": [10, 5], "x": 149, "y": 64, "flags": 1}, + {"matrix": [11, 5], "x": 164, "y": 64, "flags": 1}, + {"matrix": [10, 6], "x": 179, "y": 64, "flags": 1}, + {"matrix": [11, 6], "x": 194, "y": 64, "flags": 4}, + {"matrix": [10, 7], "x": 209, "y": 64, "flags": 4}, + {"matrix": [11, 7], "x": 224, "y": 64, "flags": 4} + ] + }, "community_layouts": ["75_iso"], "layouts": { "LAYOUT_75_iso": { diff --git a/keyboards/tkc/portico/keyboard.json b/keyboards/tkc/portico/keyboard.json index 49efe0a942..52ad417a02 100644 --- a/keyboards/tkc/portico/keyboard.json +++ b/keyboards/tkc/portico/keyboard.json @@ -44,6 +44,75 @@ "typing_heatmap": true }, "driver": "is31fl3731", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 4}, + {"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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 39, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 152, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 171, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 195, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 4, "max_brightness": 200, diff --git a/keyboards/tkc/portico/portico.c b/keyboards/tkc/portico/portico.c index bd60df13e2..e3283e1571 100644 --- a/keyboards/tkc/portico/portico.c +++ b/keyboards/tkc/portico/portico.c @@ -99,28 +99,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { #endif #ifdef RGB_MATRIX_ENABLE -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, NO_LED, 43 }, - { 44, NO_LED, 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, NO_LED, 62, 63, 64, 65, 66 } - }, { - { 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 }, { 203, 0 }, { 224, 0 }, - { 4, 16 }, { 23, 16 }, { 38, 16 }, { 53, 16 }, { 68, 16 }, { 83, 16 }, { 98, 16 }, { 113, 16 }, { 128, 16 }, { 143, 16 }, { 158, 16 }, { 173, 16 }, { 188, 16 }, { 206, 16 }, { 224, 16 }, - { 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 }, { 224, 32 }, - { 9, 48 }, { 34, 48 }, { 49, 48 }, { 64, 48 }, { 79, 48 }, { 94, 48 }, { 109, 48 }, { 124, 48 }, { 139, 48 }, { 154, 48 }, { 169, 48 }, { 189, 48 }, { 210, 48 }, { 224, 48 }, - { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 152, 64 }, { 171, 64 }, { 195, 64 }, { 210, 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, 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 - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/tkc/portico68v2/keyboard.json b/keyboards/tkc/portico68v2/keyboard.json index 087713f3a2..0e7ccac963 100644 --- a/keyboards/tkc/portico68v2/keyboard.json +++ b/keyboards/tkc/portico68v2/keyboard.json @@ -53,6 +53,90 @@ }, "center_point": [116, 32], "driver": "is31fl3741", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 4}, + {"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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 39, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 152, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 171, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 195, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 180, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 200, "y": 64, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 224, "y": 32, "flags": 2}, + {"x": 44, "y": 0, "flags": 2}, + {"x": 88, "y": 0, "flags": 2}, + {"x": 136, "y": 0, "flags": 2}, + {"x": 0, "y": 32, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 24, "y": 64, "flags": 2}, + {"x": 78, "y": 64, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 146, "y": 64, "flags": 2} + ], "max_brightness": 175, "sleep": true }, diff --git a/keyboards/tkc/portico68v2/portico68v2.c b/keyboards/tkc/portico68v2/portico68v2.c index 0f3c557b2c..e746bda7e6 100644 --- a/keyboards/tkc/portico68v2/portico68v2.c +++ b/keyboards/tkc/portico68v2/portico68v2.c @@ -104,30 +104,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0,SW6_CS39,SW6_CS38,SW6_CS37}, /* RGB82 */ }; -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, NO_LED, 43 }, - { 44, NO_LED, 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, NO_LED, 62, 63, 64, 65, 66 } - }, { - { 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 }, { 203, 0 }, { 224, 0 }, - { 4, 16 }, { 23, 16 }, { 38, 16 }, { 53, 16 }, { 68, 16 }, { 83, 16 }, { 98, 16 }, { 113, 16 }, { 128, 16 }, { 143, 16 }, { 158, 16 }, { 173, 16 }, { 188, 16 }, { 206, 16 }, { 224, 16 }, - { 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 }, { 224, 32 }, - { 9, 48 }, { 34, 48 }, { 49, 48 }, { 64, 48 }, { 79, 48 }, { 94, 48 }, { 109, 48 }, { 124, 48 }, { 139, 48 }, { 154, 48 }, { 169, 48 }, { 189, 48 }, { 210, 48 }, { 224, 48 }, - { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 152, 64 }, { 171, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 }, - {0,0},{180,0},{224,0},{200,64},{224,64},{224,32},{44,0},{88,0},{136,0},{0,32},{0,64},{24,64},{78,64},{112,64},{146,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, 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, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/tkc/portico75/keyboard.json b/keyboards/tkc/portico75/keyboard.json index 1e84f25ebe..63f5b59f43 100644 --- a/keyboards/tkc/portico75/keyboard.json +++ b/keyboards/tkc/portico75/keyboard.json @@ -42,6 +42,106 @@ "hue_wave": true }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 18, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 33, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 62, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 110, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 125, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 143, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 158, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 173, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 187, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 205, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 74, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 118, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 162, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 198, "y": 15, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 15, "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": 51, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 110, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 140, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 154, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 169, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 183, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 202, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 26, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 25, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 54, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 98, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 113, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 143, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 157, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 172, "y": 38, "flags": 4}, + {"matrix": [3, 12], "x": 197, "y": 38, "flags": 4}, + {"matrix": [4, 0], "x": 9, "y": 49, "flags": 4}, + {"matrix": [4, 1], "x": 33, "y": 49, "flags": 4}, + {"matrix": [4, 2], "x": 48, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 62, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 77, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 92, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 107, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 121, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 151, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 165, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 186, "y": 49, "flags": 4}, + {"matrix": [4, 12], "x": 209, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 2, "y": 61, "flags": 4}, + {"matrix": [5, 1], "x": 20, "y": 61, "flags": 4}, + {"matrix": [5, 2], "x": 39, "y": 61, "flags": 4}, + {"matrix": [5, 5], "x": 94, "y": 61, "flags": 4}, + {"matrix": [5, 9], "x": 151, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 173, "y": 61, "flags": 4}, + {"matrix": [5, 11], "x": 195, "y": 64, "flags": 4}, + {"matrix": [5, 12], "x": 209, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 224, "y": 64, "flags": 4}, + {"x": 2, "y": 0, "flags": 2}, + {"x": 46, "y": 0, "flags": 2}, + {"x": 90, "y": 0, "flags": 2}, + {"x": 134, "y": 0, "flags": 2}, + {"x": 178, "y": 0, "flags": 2}, + {"x": 222, "y": 0, "flags": 2}, + {"x": 224, "y": 2, "flags": 2}, + {"x": 224, "y": 32, "flags": 2}, + {"x": 224, "y": 62, "flags": 2}, + {"x": 2, "y": 64, "flags": 2}, + {"x": 46, "y": 64, "flags": 2}, + {"x": 90, "y": 64, "flags": 2}, + {"x": 134, "y": 64, "flags": 2}, + {"x": 178, "y": 64, "flags": 2}, + {"x": 222, "y": 64, "flags": 2}, + {"x": 0, "y": 2, "flags": 2}, + {"x": 0, "y": 32, "flags": 2}, + {"x": 0, "y": 62, "flags": 2} + ], "led_flush_limit": 26, "led_process_limit": 4, "max_brightness": 200, diff --git a/keyboards/tkc/portico75/portico75.c b/keyboards/tkc/portico75/portico75.c index cd6dafe31a..9552b853c5 100644 --- a/keyboards/tkc/portico75/portico75.c +++ b/keyboards/tkc/portico75/portico75.c @@ -142,31 +142,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { #endif #ifdef RGB_MATRIX_ENABLE -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, NO_LED, NO_LED}, - { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, NO_LED, NO_LED}, - { 71, 72, 73, NO_LED, NO_LED, 74, NO_LED, NO_LED, NO_LED, 75, 76, 77, 78, 79, NO_LED}, -}, { - {0,0},{18,0},{33,0},{48,0},{62,0},{81,0},{96,0},{110,0},{125,0},{143,0},{158,0},{173,0},{187,0},{205,0},{224,0}, - {0,15},{15,15},{29,15},{44,15},{59,15},{74,15},{88,15},{103,15},{118,15},{132,15},{147,15},{162,15},{176,15},{198,15},{224,15}, - {4,26},{22,26},{37,26},{51,26},{66,26},{81,26},{96,26},{110,26},{125,26},{140,26},{154,26},{169,26},{183,26},{202,26},{224,26}, - {5,38},{25,38},{40,38},{54,38},{69,38},{84,38},{98,38},{113,38},{128,38},{143,38},{157,38},{172,38},{197,38}, - {9,49},{33,49},{48,49},{62,49},{77,49},{92,49},{107,49},{121,49},{136,49},{151,49},{165,49},{186,49},{209,52}, - {2,61},{20,61},{39,61},{94,61},{151,61},{173,61},{195,64},{209,64},{224,64}, - {2,0},{46,0},{90,0},{134,0},{178,0},{222,0},{224,2},{224,32},{224,62},{2,64},{46,64},{90,64},{134,64},{178,64},{222,64},{0,2},{0,32},{0,62}, -}, { - 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, 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, 4, 4, 4, 4, 4, 4, 4, 4, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/ungodly/launch_pad/keyboard.json b/keyboards/ungodly/launch_pad/keyboard.json index 50b6c2bcbf..2f5bc95aa6 100644 --- a/keyboards/ungodly/launch_pad/keyboard.json +++ b/keyboards/ungodly/launch_pad/keyboard.json @@ -33,6 +33,30 @@ "animation": "cycle_pinwheel" }, "driver": "ws2812", + "layout": [ + {"matrix": [4, 1], "x": 37, "y": 60, "flags": 4}, + {"matrix": [4, 2], "x": 148, "y": 60, "flags": 4}, + {"matrix": [3, 3], "x": 222, "y": 54, "flags": 4}, + {"matrix": [3, 2], "x": 148, "y": 45, "flags": 4}, + {"matrix": [3, 1], "x": 74, "y": 45, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 45, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 30, "flags": 4}, + {"matrix": [2, 1], "x": 74, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 148, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 222, "y": 30, "flags": 4}, + {"matrix": [1, 3], "x": 222, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 148, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 74, "y": 15, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 74, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 148, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 222, "y": 0, "flags": 4}, + {"x": 185, "y": 7, "flags": 2}, + {"x": 37, "y": 7, "flags": 2}, + {"x": 37, "y": 52, "flags": 2}, + {"x": 185, "y": 52, "flags": 2} + ], "max_brightness": 150, "sat_steps": 8, "val_steps": 8, diff --git a/keyboards/ungodly/launch_pad/launch_pad.c b/keyboards/ungodly/launch_pad/launch_pad.c deleted file mode 100644 index 9803d8674f..0000000000 --- a/keyboards/ungodly/launch_pad/launch_pad.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2020 Ungodly Design - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 14, 15, 16, 17 }, - { 13, 12, 11, 10 }, - { 6, 7, 8, 9 }, - { 5, 4, 3, 2 }, - {NO_LED, 0, 1, NO_LED } -}, { // LED Index to Physical Position - { 37, 60 }, { 148, 60 }, // row 5 - { 222, 54 }, { 148, 45 }, { 74, 45 }, { 0, 45 }, // row 4 - { 0, 30 }, { 74, 30 }, { 148, 30 }, { 222, 30 }, // row 3 - { 222, 15 }, { 148, 15 }, { 74, 15 }, { 0, 15 }, // row 2 - { 0, 0 }, { 74, 0 }, { 148, 0 }, { 222, 0 }, // row 1 - { 185, 7 }, { 37, 7 }, // top underglow - { 37, 52 }, { 185, 52 }, // bottom underglow -}, { - // LED Index to Flag - 4, 4, // row 5 - 4, 4, 4, 4, // row 4 - 4, 4, 4, 4, // row 3 - 4, 4, 4, 4, // row 2 - 4, 4, 4, 4, // row 1 - 2, 2, - 2, 2 -} }; -#endif diff --git a/keyboards/wekey/we27/keyboard.json b/keyboards/wekey/we27/keyboard.json index 91731cdc39..50c6de9e10 100644 --- a/keyboards/wekey/we27/keyboard.json +++ b/keyboards/wekey/we27/keyboard.json @@ -29,6 +29,35 @@ "hue": 108 }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 1, "flags": 1}, + {"matrix": [0, 1], "x": 56, "y": 1, "flags": 1}, + {"matrix": [0, 2], "x": 112, "y": 1, "flags": 1}, + {"matrix": [0, 3], "x": 168, "y": 1, "flags": 1}, + {"matrix": [0, 4], "x": 224, "y": 1, "flags": 1}, + {"matrix": [1, 4], "x": 0, "y": 16, "flags": 1}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 56, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 112, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 168, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 224, "y": 28, "flags": 4}, + {"matrix": [3, 3], "x": 0, "y": 40, "flags": 1}, + {"matrix": [3, 2], "x": 56, "y": 40, "flags": 4}, + {"matrix": [3, 1], "x": 112, "y": 40, "flags": 4}, + {"matrix": [3, 0], "x": 168, "y": 40, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 56, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 112, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 168, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 224, "y": 52, "flags": 4}, + {"matrix": [5, 3], "x": 0, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 56, "y": 64, "flags": 4}, + {"matrix": [5, 0], "x": 168, "y": 64, "flags": 4} + ], "react_on_keyup": true }, "matrix_pins": { diff --git a/keyboards/wekey/we27/we27.c b/keyboards/wekey/we27/we27.c deleted file mode 100644 index 03ec6f5512..0000000000 --- a/keyboards/wekey/we27/we27.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright 2021 @wekey - * - * 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 RGB_MATRIX_ENABLE - -#define __ NO_LED - -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4 }, - { 9, 8, 7, 6, 5 }, - { 10, 11, 12, 13, 14 }, - { 18, 17, 16, 15, __ }, - { 19, 20, 21, 22, 23 }, - { 26, 25, __, 24, __ } -}, { - {0,1},{56,1},{112,1},{168,1},{224,1}, - {0,16},{56,16},{112,16},{168,16},{224,16}, - {0,28},{56,28},{112,28},{168,28},{224,28}, - {0,40},{56,40},{112,40},{168,40}, - {0,52},{56,52},{112,52},{168,52},{224,52}, - {0,64},{56,64},{168,64} -}, { - 1, 1, 1, 1, 1, - 1, 1, 4, 4, 4, - 1, 4, 4, 4, 4, - 1, 4, 4, 4, - 1, 4, 4, 4, 4, - 1, 4, 4 -} }; - -#endif diff --git a/keyboards/work_louder/loop/info.json b/keyboards/work_louder/loop/info.json index 70dc6cc13a..d029f73117 100644 --- a/keyboards/work_louder/loop/info.json +++ b/keyboards/work_louder/loop/info.json @@ -54,6 +54,17 @@ "typing_heatmap": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [0, 10], "x": 169, "y": 32, "flags": 4}, + {"matrix": [0, 9], "x": 150, "y": 32, "flags": 4}, + {"matrix": [0, 8], "x": 131, "y": 32, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [0, 6], "x": 93, "y": 32, "flags": 4}, + {"matrix": [0, 5], "x": 74, "y": 32, "flags": 4}, + {"matrix": [0, 4], "x": 55, "y": 32, "flags": 4}, + {"matrix": [0, 3], "x": 36, "y": 32, "flags": 4} + ], "max_brightness": 120, "sleep": true }, diff --git a/keyboards/work_louder/loop/loop.c b/keyboards/work_louder/loop/loop.c index 7880584d09..138be4e75a 100644 --- a/keyboards/work_louder/loop/loop.c +++ b/keyboards/work_louder/loop/loop.c @@ -41,17 +41,3 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { return true; } #endif - -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { - { - { NO_LED, NO_LED, NO_LED, 8, 7, 6, 5, 4, 3, 2, 1, 0 } - }, { - {188, 32}, {169, 32}, {150, 32}, {131, 32}, {112, 32}, {93, 32}, {74, 32}, {55, 32}, {36, 32} - }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4 - } -}; -// clang-format on -#endif diff --git a/keyboards/work_louder/micro/keyboard.json b/keyboards/work_louder/micro/keyboard.json index b8da74dd92..677facf995 100644 --- a/keyboards/work_louder/micro/keyboard.json +++ b/keyboards/work_louder/micro/keyboard.json @@ -79,6 +79,20 @@ "digital_rain": true }, "driver": "ws2812", + "layout": [ + {"matrix": [3, 2], "x": 122, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 103, "y": 64, "flags": 4}, + {"matrix": [2, 0], "x": 84, "y": 45, "flags": 4}, + {"matrix": [2, 1], "x": 103, "y": 45, "flags": 4}, + {"matrix": [2, 2], "x": 133, "y": 45, "flags": 4}, + {"matrix": [2, 3], "x": 152, "y": 45, "flags": 4}, + {"matrix": [1, 3], "x": 152, "y": 26, "flags": 4}, + {"matrix": [1, 2], "x": 122, "y": 26, "flags": 4}, + {"matrix": [1, 1], "x": 103, "y": 26, "flags": 4}, + {"matrix": [1, 0], "x": 84, "y": 26, "flags": 4}, + {"matrix": [0, 1], "x": 103, "y": 7, "flags": 4}, + {"matrix": [0, 2], "x": 122, "y": 7, "flags": 4} + ], "max_brightness": 150, "sleep": true }, diff --git a/keyboards/work_louder/micro/micro.c b/keyboards/work_louder/micro/micro.c index f88ac8bb45..80af68ad8d 100644 --- a/keyboards/work_louder/micro/micro.c +++ b/keyboards/work_louder/micro/micro.c @@ -3,29 +3,6 @@ #include "micro.h" -#if defined(RGB_MATRIX_ENABLE) -// clang-format off -led_config_t g_led_config = { { - { NO_LED, 10, 11, NO_LED }, - { 9 , 8, 7, 6 }, - { 2, 3, 4, 5 }, - { NO_LED, 1, 0, NO_LED } - }, { - { 122, 64 }, { 103, 64 }, - { 84, 45 }, { 103, 45 }, { 133, 45 }, { 152, 45 }, - { 152, 26 }, { 122, 26 }, { 103, 26 }, { 84, 26 }, - { 103, 7 }, { 122, 7 } - }, - { - 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4 - } -}; -// clang-format on -#endif - #if defined(ENCODER_ENABLE) bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { diff --git a/keyboards/work_louder/nano/keyboard.json b/keyboards/work_louder/nano/keyboard.json index e15d095de0..c870803b1a 100644 --- a/keyboards/work_louder/nano/keyboard.json +++ b/keyboards/work_louder/nano/keyboard.json @@ -56,6 +56,10 @@ "digital_rain": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 2], "x": 103, "y": 32, "flags": 4}, + {"matrix": [0, 1], "x": 122, "y": 32, "flags": 4} + ], "max_brightness": 120, "sleep": true }, diff --git a/keyboards/work_louder/nano/nano.c b/keyboards/work_louder/nano/nano.c index 28db78e46d..a02b09d90c 100644 --- a/keyboards/work_louder/nano/nano.c +++ b/keyboards/work_louder/nano/nano.c @@ -27,16 +27,3 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { return true; } #endif - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - { NO_LED, 1, 0 } - }, { - { 103, 32 }, { 122, 32 } - }, { - 4, 4 - } -}; - -#endif From 8f22831f01299f1ae37c748f270fbee777867aa5 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:07:06 -0600 Subject: [PATCH 19/95] Migrate `g_led_config` to DD (S) (#25624) --- keyboards/s_ol/0xc_pad/0xc_pad.c | 34 ------- keyboards/s_ol/0xc_pad/keyboard.json | 17 +++- .../naked48/rev1/keyboard.json | 52 ++++++++++- keyboards/salicylic_acid3/naked48/rev1/rev1.c | 42 --------- .../sawnsprojects/satxri6key/keyboard.json | 8 ++ .../sawnsprojects/satxri6key/satxri6key.c | 32 ------- keyboards/senselessclay/ck60/ck60.c | 43 --------- keyboards/senselessclay/ck60/keyboard.json | 64 +++++++++++++ keyboards/silverbullet44/keyboard.json | 54 +++++++++++ keyboards/silverbullet44/silverbullet44.c | 45 ---------- keyboards/smallkeyboard/keyboard.json | 8 ++ keyboards/smallkeyboard/smallkeyboard.c | 15 ---- keyboards/sowbug/68keys/68keys.c | 36 -------- keyboards/sowbug/68keys/keyboard.json | 70 +++++++++++++++ keyboards/sowbug/ansi_tkl/ansi_tkl.c | 50 ----------- keyboards/sowbug/ansi_tkl/keyboard.json | 89 +++++++++++++++++++ .../spaceholdings/nebula12b/keyboard.json | 18 ++++ keyboards/spaceholdings/nebula12b/nebula12b.c | 42 --------- keyboards/spaceholdings/nebula68b/hs/hs.c | 41 --------- .../spaceholdings/nebula68b/hs/keyboard.json | 82 +++++++++++++++++ .../nebula68b/solder/keyboard.json | 83 +++++++++++++++++ .../spaceholdings/nebula68b/solder/solder.c | 41 --------- keyboards/splitkb/kyria/rev1/info.json | 22 +++++ keyboards/splitkb/kyria/rev1/rev1.c | 31 ------- keyboards/splitkb/kyria/rev2/info.json | 22 +++++ keyboards/splitkb/kyria/rev2/rev2.c | 30 ------- keyboards/system76/launch_1/keyboard.json | 86 ++++++++++++++++++ keyboards/system76/launch_1/launch_1.c | 53 ----------- 28 files changed, 672 insertions(+), 538 deletions(-) delete mode 100644 keyboards/s_ol/0xc_pad/0xc_pad.c delete mode 100644 keyboards/salicylic_acid3/naked48/rev1/rev1.c delete mode 100644 keyboards/sawnsprojects/satxri6key/satxri6key.c delete mode 100644 keyboards/senselessclay/ck60/ck60.c delete mode 100644 keyboards/silverbullet44/silverbullet44.c delete mode 100644 keyboards/sowbug/68keys/68keys.c delete mode 100644 keyboards/sowbug/ansi_tkl/ansi_tkl.c delete mode 100755 keyboards/spaceholdings/nebula12b/nebula12b.c delete mode 100755 keyboards/spaceholdings/nebula68b/hs/hs.c delete mode 100755 keyboards/spaceholdings/nebula68b/solder/solder.c diff --git a/keyboards/s_ol/0xc_pad/0xc_pad.c b/keyboards/s_ol/0xc_pad/0xc_pad.c deleted file mode 100644 index ba8cd96aec..0000000000 --- a/keyboards/s_ol/0xc_pad/0xc_pad.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2021 s-ol - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // indices - { 0, 6, KC_NO, KC_NO }, - { 1, 5, 7, KC_NO }, - { 2, 4, 8, 11 }, - { KC_NO, 3, 9, 10 } -}, { - // phys position - { 96, 110}, { 80, 83}, { 64, 55}, { 80, 28}, - { 96, 55}, {112, 83}, {128, 110}, {144, 83}, - {128, 55}, {112, 28}, {144, 28}, {160, 55} -}, { - // flags - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 -} }; -#endif diff --git a/keyboards/s_ol/0xc_pad/keyboard.json b/keyboards/s_ol/0xc_pad/keyboard.json index 1df5a5131e..3ad4e986d7 100644 --- a/keyboards/s_ol/0xc_pad/keyboard.json +++ b/keyboards/s_ol/0xc_pad/keyboard.json @@ -39,8 +39,21 @@ "solid_reactive": true, "splash": true }, - "center_point": [112, 63], - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 74, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 148, "y": 0, "flags": 4}, + {"matrix": [2, 0], "x": 37, "y": 21, "flags": 4}, + {"matrix": [3, 1], "x": 111, "y": 21, "flags": 4}, + {"matrix": [2, 1], "x": 185, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 0, "y": 42, "flags": 4}, + {"matrix": [0, 1], "x": 74, "y": 42, "flags": 4}, + {"matrix": [1, 2], "x": 148, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 224, "y": 42, "flags": 4}, + {"matrix": [3, 2], "x": 37, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 111, "y": 64, "flags": 4}, + {"matrix": [2, 3], "x": 185, "y": 64, "flags": 4} + ] }, "layouts": { "LAYOUT": { diff --git a/keyboards/salicylic_acid3/naked48/rev1/keyboard.json b/keyboards/salicylic_acid3/naked48/rev1/keyboard.json index 2cf2dbc45b..fd37a9e7cc 100644 --- a/keyboards/salicylic_acid3/naked48/rev1/keyboard.json +++ b/keyboards/salicylic_acid3/naked48/rev1/keyboard.json @@ -22,7 +22,57 @@ } }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 4}, + {"matrix": [3, 0], "x": 17, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 34, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 69, "y": 64, "flags": 4}, + {"matrix": [3, 4], "x": 86, "y": 64, "flags": 4}, + {"matrix": [3, 5], "x": 103, "y": 64, "flags": 4}, + {"matrix": [3, 6], "x": 121, "y": 64, "flags": 4}, + {"matrix": [3, 7], "x": 138, "y": 64, "flags": 4}, + {"matrix": [3, 8], "x": 155, "y": 64, "flags": 4}, + {"matrix": [3, 9], "x": 172, "y": 64, "flags": 4}, + {"matrix": [3, 10], "x": 190, "y": 64, "flags": 4}, + {"matrix": [3, 11], "x": 207, "y": 64, "flags": 4}, + {"matrix": [2, 11], "x": 224, "y": 43, "flags": 4}, + {"matrix": [1, 11], "x": 224, "y": 21, "flags": 4}, + {"matrix": [0, 11], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 207, "y": 0, "flags": 4}, + {"matrix": [1, 10], "x": 207, "y": 21, "flags": 4}, + {"matrix": [2, 10], "x": 207, "y": 43, "flags": 4}, + {"matrix": [2, 9], "x": 190, "y": 43, "flags": 4}, + {"matrix": [1, 9], "x": 190, "y": 21, "flags": 4}, + {"matrix": [0, 9], "x": 190, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 172, "y": 0, "flags": 4}, + {"matrix": [1, 8], "x": 172, "y": 21, "flags": 4}, + {"matrix": [2, 8], "x": 172, "y": 43, "flags": 4}, + {"matrix": [2, 7], "x": 155, "y": 43, "flags": 4}, + {"matrix": [1, 7], "x": 155, "y": 21, "flags": 4}, + {"matrix": [0, 7], "x": 155, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 138, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 138, "y": 21, "flags": 4}, + {"matrix": [2, 6], "x": 138, "y": 43, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 43, "flags": 4}, + {"matrix": [1, 5], "x": 86, "y": 21, "flags": 4}, + {"matrix": [0, 5], "x": 86, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 69, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 69, "y": 21, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 43, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 43, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 21, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 21, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 43, "flags": 4}, + {"matrix": [2, 1], "x": 17, "y": 43, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 21, "flags": 4}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4} + ] }, "matrix_pins": { "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2", "B6", "D7", "E6", "B4", "B5"], diff --git a/keyboards/salicylic_acid3/naked48/rev1/rev1.c b/keyboards/salicylic_acid3/naked48/rev1/rev1.c deleted file mode 100644 index d4da157a56..0000000000 --- a/keyboards/salicylic_acid3/naked48/rev1/rev1.c +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2021 Salicylic_Acid - -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 RGB_MATRIX_ENABLE - led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0,47,42,41,36,35,30,29,24,23,18,17 }, - { 1,46,43,40,37,34,31,28,25,22,19,16 }, - { 2,45,44,39,38,33,32,27,26,21,20,15 }, - { 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14 } - }, { - // LED Index to Physical Position - { 0, 0 }, { 0, 21 }, { 0, 43 }, { 17, 64 }, { 34, 64 },{ 52, 64 }, { 69, 64 }, { 86, 64 }, { 103, 64 }, { 121, 64 }, - { 138, 64 }, { 155, 64 }, { 172, 64 }, { 190, 64 }, { 207, 64 },{ 224, 43 }, { 224, 21 }, { 224, 0 }, { 207, 0 }, { 207, 21 }, - { 207, 43 }, { 190, 43 }, { 190, 21 }, { 190, 0 }, { 172, 0 },{ 172, 21 }, { 172, 43 }, { 155, 43 }, { 155, 21 }, { 155, 0 }, - { 138, 0 }, { 138, 21 }, { 138, 43 }, { 86, 43 }, { 86, 21 },{ 86, 0 }, { 69, 0 }, { 69, 21 }, { 69, 43 }, { 52, 43 }, - { 52, 21 }, { 52, 0 }, { 34, 0 }, { 34, 21 }, { 34, 43 },{ 17, 43 }, { 17, 21 }, { 17, 0 } - }, { - // 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, 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 diff --git a/keyboards/sawnsprojects/satxri6key/keyboard.json b/keyboards/sawnsprojects/satxri6key/keyboard.json index 92a798e4b2..30f1ec3fd1 100644 --- a/keyboards/sawnsprojects/satxri6key/keyboard.json +++ b/keyboards/sawnsprojects/satxri6key/keyboard.json @@ -56,6 +56,14 @@ "animation": "solid_reactive_simple" }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 2], "x": 224, "y": 64, "flags": 1}, + {"matrix": [1, 1], "x": 112, "y": 64, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 64, "flags": 1} + ], "max_brightness": 200, "react_on_keyup": true }, diff --git a/keyboards/sawnsprojects/satxri6key/satxri6key.c b/keyboards/sawnsprojects/satxri6key/satxri6key.c deleted file mode 100644 index c335e0d3ef..0000000000 --- a/keyboards/sawnsprojects/satxri6key/satxri6key.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2021 SawnsProjects - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - //Key Matrix to LED Indexccxxz - {0, 1, 2}, - {5, 4, 3} -}, { - //LED Index to Physical Positon - {0, 0}, {112, 0}, {224, 0}, - {224, 64}, {112, 64}, {0, 64}, -}, { - 1, 1, 1, - 1, 1, 1, -} }; -#endif \ No newline at end of file diff --git a/keyboards/senselessclay/ck60/ck60.c b/keyboards/senselessclay/ck60/ck60.c deleted file mode 100644 index 3f8aea611a..0000000000 --- a/keyboards/senselessclay/ck60/ck60.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2022 kb-elmo - * - * 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 __ NO_LED - -#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 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, __ }, - { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, __ }, - { 54, 55, 56, __, __, __, 57, __, __, __, 58, 59, 60, 61 } -}, { - //LED Index to Physical Positon - { 0, 0 }, { 17, 0 }, { 34, 0 }, { 52, 0 }, { 69, 0 }, { 86, 0 }, { 103, 0 }, { 121, 0 }, { 138, 0 }, { 155, 0 }, { 172, 0 }, { 190, 0 }, { 207, 0 }, { 215, 0 }, - { 224, 24 }, { 215, 16 }, { 198, 16 }, { 180, 16 }, { 164, 16 }, { 146, 16 }, { 129, 16 }, { 112, 16 }, { 95, 16 }, { 78, 16 }, { 60, 16 }, { 43, 16 }, { 26 , 16 }, { 0, 16 }, - { 0, 32 }, { 30, 32 }, { 47, 32 }, { 65, 32 }, { 81, 32 }, { 99, 32 }, { 116, 32 }, { 133, 32 }, { 150, 32 }, { 168, 32 }, { 185, 32 }, { 202, 32 }, { 220, 32 }, - { 207, 48 }, { 190, 48 }, { 172, 48 }, { 155, 48 }, { 138, 48 }, { 121, 48 }, { 103, 48 }, { 86, 48 }, { 69, 48 }, { 52, 48 }, { 34, 48 }, { 17, 48 }, { 0, 48 }, - { 0, 64 }, { 17, 64 }, { 34, 64 }, { 103, 64 }, { 172, 64 }, { 190, 64 }, { 207, 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, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1 -} }; -#endif diff --git a/keyboards/senselessclay/ck60/keyboard.json b/keyboards/senselessclay/ck60/keyboard.json index d4fa5336e6..4b1937513e 100644 --- a/keyboards/senselessclay/ck60/keyboard.json +++ b/keyboards/senselessclay/ck60/keyboard.json @@ -36,6 +36,70 @@ "animation": "cycle_all" }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 69, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 86, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 103, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 121, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 138, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 155, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 172, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 190, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 207, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 215, "y": 0, "flags": 1}, + {"matrix": [1, 13], "x": 224, "y": 24, "flags": 1}, + {"matrix": [1, 12], "x": 215, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 198, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 180, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 164, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 146, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 129, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 95, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 78, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 60, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 43, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 26, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 30, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 47, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 65, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 81, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 99, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 133, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 150, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 168, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 185, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 202, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 220, "y": 32, "flags": 4}, + {"matrix": [3, 12], "x": 207, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 190, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 172, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 155, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 138, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 121, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 103, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 86, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 17, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 17, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 103, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 172, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 190, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 207, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1} + ], "max_brightness": 160, "sleep": true }, diff --git a/keyboards/silverbullet44/keyboard.json b/keyboards/silverbullet44/keyboard.json index 26e2bcce3a..a724314212 100644 --- a/keyboards/silverbullet44/keyboard.json +++ b/keyboards/silverbullet44/keyboard.json @@ -30,6 +30,60 @@ "animation": "typing_heatmap" }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 3], "x": 139, "y": 16, "flags": 2}, + {"matrix": [0, 4], "x": 174, "y": 13, "flags": 2}, + {"matrix": [0, 5], "x": 208, "y": 20, "flags": 2}, + {"matrix": [1, 5], "x": 208, "y": 38, "flags": 2}, + {"matrix": [1, 4], "x": 174, "y": 48, "flags": 2}, + {"matrix": [1, 3], "x": 139, "y": 52, "flags": 2}, + {"matrix": [0, 2], "x": 129, "y": 63, "flags": 1}, + {"matrix": [0, 1], "x": 139, "y": 39, "flags": 4}, + {"matrix": [1, 2], "x": 139, "y": 21, "flags": 4}, + {"matrix": [2, 3], "x": 139, "y": 4, "flags": 4}, + {"matrix": [2, 4], "x": 156, "y": 2, "flags": 4}, + {"matrix": [2, 5], "x": 156, "y": 19, "flags": 4}, + {"matrix": [3, 5], "x": 156, "y": 37, "flags": 4}, + {"matrix": [3, 4], "x": 144, "y": 58, "flags": 1}, + {"matrix": [3, 3], "x": 164, "y": 55, "flags": 1}, + {"matrix": [3, 2], "x": 174, "y": 35, "flags": 4}, + {"matrix": [2, 2], "x": 174, "y": 13, "flags": 4}, + {"matrix": [1, 1], "x": 174, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 191, "y": 3, "flags": 4}, + {"matrix": [1, 0], "x": 191, "y": 20, "flags": 4}, + {"matrix": [2, 1], "x": 191, "y": 37, "flags": 4}, + {"matrix": [2, 0], "x": 208, "y": 42, "flags": 4}, + {"x": 208, "y": 24, "flags": 4}, + {"x": 208, "y": 7, "flags": 4}, + {"x": 224, "y": 7, "flags": 1}, + {"x": 224, "y": 24, "flags": 1}, + {"x": 224, "y": 41, "flags": 1}, + {"x": 85, "y": 16, "flags": 2}, + {"x": 50, "y": 13, "flags": 2}, + {"x": 16, "y": 20, "flags": 2}, + {"x": 16, "y": 38, "flags": 2}, + {"x": 50, "y": 48, "flags": 2}, + {"x": 85, "y": 52, "flags": 2}, + {"x": 95, "y": 63, "flags": 1}, + {"x": 85, "y": 39, "flags": 4}, + {"x": 85, "y": 21, "flags": 4}, + {"x": 85, "y": 4, "flags": 4}, + {"x": 68, "y": 2, "flags": 4}, + {"x": 68, "y": 19, "flags": 4}, + {"x": 68, "y": 37, "flags": 4}, + {"x": 80, "y": 58, "flags": 1}, + {"x": 60, "y": 55, "flags": 1}, + {"x": 50, "y": 35, "flags": 4}, + {"x": 50, "y": 13, "flags": 4}, + {"x": 50, "y": 0, "flags": 4}, + {"x": 33, "y": 3, "flags": 4}, + {"x": 33, "y": 20, "flags": 4}, + {"x": 33, "y": 37, "flags": 4}, + {"x": 16, "y": 42, "flags": 4}, + {"x": 16, "y": 24, "flags": 4}, + {"x": 16, "y": 7, "flags": 4}, + {"x": 0, "y": 7, "flags": 1} + ], "max_brightness": 150, "sat_steps": 8, "val_steps": 8, diff --git a/keyboards/silverbullet44/silverbullet44.c b/keyboards/silverbullet44/silverbullet44.c deleted file mode 100644 index 00bd6153c9..0000000000 --- a/keyboards/silverbullet44/silverbullet44.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright 2019 SwanMatch - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 18, 7, 6, 0, 1, 2}, - { 19, 17, 8, 5, 4, 3}, - { 21, 20, 16, 9, 10, 11}, - { NO_LED, NO_LED, 15, 14, 13, 12}, -}, { - { 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, - { 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, - { 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, - { 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 }, - { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 }, - { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 }, - { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 }, - { 16, 24 }, { 16, 7 }, { 0, 7 } -}, { - 2, 2, 2, 2, 2, 2, 1, - 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 1, 4, - 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, - 4, 4, 1 -} }; - -#endif diff --git a/keyboards/smallkeyboard/keyboard.json b/keyboards/smallkeyboard/keyboard.json index dfbdee1cdd..da08cf66c2 100644 --- a/keyboards/smallkeyboard/keyboard.json +++ b/keyboards/smallkeyboard/keyboard.json @@ -44,6 +44,14 @@ "solid_reactive": true }, "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [1, 1], "x": 112, "y": 64, "flags": 1}, + {"matrix": [1, 2], "x": 224, "y": 64, "flags": 4} + ], "sleep": true }, "matrix_pins": { diff --git a/keyboards/smallkeyboard/smallkeyboard.c b/keyboards/smallkeyboard/smallkeyboard.c index 7442444b00..c3b4a35f84 100644 --- a/keyboards/smallkeyboard/smallkeyboard.c +++ b/keyboards/smallkeyboard/smallkeyboard.c @@ -31,19 +31,4 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C1_12, C2_12, C3_12}, // BL5 {0, C1_13, C2_13, C3_13}, // BL6 }; - -led_config_t g_led_config = { - { - { 0, 1, 2}, - { 3, 4, 5}, - }, - { - { 48, 32},{ 48, 48},{ 64, 48}, - { 80, 16},{ 64, 32},{ 80, 32} - }, - { - 4, 4, 4, - 1, 1, 4 - } -}; #endif diff --git a/keyboards/sowbug/68keys/68keys.c b/keyboards/sowbug/68keys/68keys.c deleted file mode 100644 index df9681481f..0000000000 --- a/keyboards/sowbug/68keys/68keys.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2021 Mike Tsao - * - * 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 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, 31 }, - { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, NO_LED, NO_LED }, - { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NO_LED, NO_LED, NO_LED }, - { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } -}, { - // LED Index to Physical Position - {0, 0}, {12, 0}, {25, 0}, {38, 0}, {51, 0}, {64, 0}, {77, 0}, {90, 0}, {103, 0}, {116, 0}, {129, 0}, {142, 0}, {155, 0}, {175, 0}, {198, 0}, {211, 0}, {3, 12}, {19, 12}, {32, 12}, {45, 12}, {58, 12}, {71, 12}, {84, 12}, {97, 12}, {110, 12}, {123, 12}, {136, 12}, {149, 12}, {162, 12}, {178, 12}, {198, 12}, {211, 12}, {4, 25}, {22, 25}, {35, 25}, {48, 25}, {61, 25}, {74, 25}, {87, 25}, {100, 25}, {113, 25}, {126, 25}, {139, 25}, {152, 25}, {173, 25}, {8, 38}, {29, 38}, {42, 38}, {55, 38}, {68, 38}, {81, 38}, {94, 38}, {107, 38}, {120, 38}, {133, 38}, {146, 38}, {170, 38}, {198, 38}, {1, 51}, {17, 51}, {34, 51}, {82, 51}, {131, 51}, {147, 51}, {163, 51}, {185, 51}, {198, 51}, {211, 51} -}, { - // LED Index to Flag - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT -} -}; - -#endif // #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/sowbug/68keys/keyboard.json b/keyboards/sowbug/68keys/keyboard.json index be4ffbf9a9..38ed02706d 100644 --- a/keyboards/sowbug/68keys/keyboard.json +++ b/keyboards/sowbug/68keys/keyboard.json @@ -58,6 +58,76 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 12, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 25, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 38, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 51, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 77, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 103, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 116, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 129, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 142, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 155, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 175, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 3, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 19, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 45, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 58, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 71, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 84, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 97, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 110, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 123, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 136, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 149, "y": 12, "flags": 4}, + {"matrix": [1, 12], "x": 162, "y": 12, "flags": 4}, + {"matrix": [1, 13], "x": 178, "y": 12, "flags": 4}, + {"matrix": [1, 14], "x": 198, "y": 12, "flags": 4}, + {"matrix": [1, 15], "x": 211, "y": 12, "flags": 4}, + {"matrix": [2, 0], "x": 4, "y": 25, "flags": 4}, + {"matrix": [2, 1], "x": 22, "y": 25, "flags": 4}, + {"matrix": [2, 2], "x": 35, "y": 25, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 25, "flags": 4}, + {"matrix": [2, 4], "x": 61, "y": 25, "flags": 4}, + {"matrix": [2, 5], "x": 74, "y": 25, "flags": 4}, + {"matrix": [2, 6], "x": 87, "y": 25, "flags": 4}, + {"matrix": [2, 7], "x": 100, "y": 25, "flags": 4}, + {"matrix": [2, 8], "x": 113, "y": 25, "flags": 4}, + {"matrix": [2, 9], "x": 126, "y": 25, "flags": 4}, + {"matrix": [2, 10], "x": 139, "y": 25, "flags": 4}, + {"matrix": [2, 11], "x": 152, "y": 25, "flags": 4}, + {"matrix": [2, 12], "x": 173, "y": 25, "flags": 4}, + {"matrix": [3, 0], "x": 8, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 29, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 42, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 55, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 68, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 81, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 94, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 107, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 120, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 133, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 146, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 170, "y": 38, "flags": 4}, + {"matrix": [3, 12], "x": 198, "y": 38, "flags": 4}, + {"matrix": [4, 0], "x": 1, "y": 51, "flags": 4}, + {"matrix": [4, 1], "x": 17, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 34, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 82, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 131, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 147, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 163, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 185, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 198, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 211, "y": 51, "flags": 4} + ], "max_brightness": 128, "sleep": true }, diff --git a/keyboards/sowbug/ansi_tkl/ansi_tkl.c b/keyboards/sowbug/ansi_tkl/ansi_tkl.c deleted file mode 100644 index 508bf62fe1..0000000000 --- a/keyboards/sowbug/ansi_tkl/ansi_tkl.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright 2021 Mike Tsao - * - * 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 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, NO_LED}, - {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, NO_LED, NO_LED, NO_LED, NO_LED}, - {63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, NO_LED, NO_LED, NO_LED, NO_LED}, - {76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED} - }, - {// LED Index to Physical Position - {0, 0}, {24, 0}, {36, 0}, {49, 0}, {61, 0}, {79, 0}, {92, 0}, {104, 0}, {116, 0}, {135, 0}, {147, 0}, {159, 0}, {171, 0}, {187, 0}, {199, 0}, {211, 0}, - {0, 14}, {12, 14}, {24, 14}, {36, 14}, {49, 14}, {61, 14}, {73, 14}, {85, 14}, {98, 14}, {110, 14}, {122, 14}, {135, 14}, {147, 14}, {165, 14}, {187, 14}, {199, 14}, {211, 14}, - {3, 24}, {18, 24}, {30, 24}, {42, 24}, {55, 24}, {67, 24}, {79, 24}, {92, 24}, {104, 24}, {116, 24}, {128, 24}, {141, 24}, {153, 24}, {168, 24}, {187, 24}, {199, 24}, {211, 24}, - {4, 34}, {21, 34}, {33, 34}, {46, 34}, {58, 34}, {70, 34}, {82, 34}, {95, 34}, {107, 34}, {119, 34}, {131, 34}, {144, 34}, {164, 34}, - {7, 44}, {27, 44}, {39, 44}, {52, 44}, {64, 44}, {76, 44}, {88, 44}, {101, 44}, {113, 44}, {125, 44}, {138, 44}, {161, 44}, {199, 44}, - {1, 54}, {16, 54}, {32, 54}, {78, 54}, {124, 54}, {139, 54}, {154, 54}, {170, 54}, {187, 54}, {199, 54}, {211, 54}}, - {// LED Index to Flag - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT - } -}; - -#endif // #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/sowbug/ansi_tkl/keyboard.json b/keyboards/sowbug/ansi_tkl/keyboard.json index 50b9d8095a..95f3925ff6 100644 --- a/keyboards/sowbug/ansi_tkl/keyboard.json +++ b/keyboards/sowbug/ansi_tkl/keyboard.json @@ -58,6 +58,95 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 24, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 36, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 49, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 79, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 92, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 104, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 116, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 159, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 171, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 187, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 199, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 14, "flags": 4}, + {"matrix": [1, 1], "x": 12, "y": 14, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 14, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 14, "flags": 4}, + {"matrix": [1, 4], "x": 49, "y": 14, "flags": 4}, + {"matrix": [1, 5], "x": 61, "y": 14, "flags": 4}, + {"matrix": [1, 6], "x": 73, "y": 14, "flags": 4}, + {"matrix": [1, 7], "x": 85, "y": 14, "flags": 4}, + {"matrix": [1, 8], "x": 98, "y": 14, "flags": 4}, + {"matrix": [1, 9], "x": 110, "y": 14, "flags": 4}, + {"matrix": [1, 10], "x": 122, "y": 14, "flags": 4}, + {"matrix": [1, 11], "x": 135, "y": 14, "flags": 4}, + {"matrix": [1, 12], "x": 147, "y": 14, "flags": 4}, + {"matrix": [1, 13], "x": 165, "y": 14, "flags": 4}, + {"matrix": [1, 14], "x": 187, "y": 14, "flags": 4}, + {"matrix": [1, 15], "x": 199, "y": 14, "flags": 4}, + {"matrix": [1, 16], "x": 211, "y": 14, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 24, "flags": 4}, + {"matrix": [2, 1], "x": 18, "y": 24, "flags": 4}, + {"matrix": [2, 2], "x": 30, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 24, "flags": 4}, + {"matrix": [2, 4], "x": 55, "y": 24, "flags": 4}, + {"matrix": [2, 5], "x": 67, "y": 24, "flags": 4}, + {"matrix": [2, 6], "x": 79, "y": 24, "flags": 4}, + {"matrix": [2, 7], "x": 92, "y": 24, "flags": 4}, + {"matrix": [2, 8], "x": 104, "y": 24, "flags": 4}, + {"matrix": [2, 9], "x": 116, "y": 24, "flags": 4}, + {"matrix": [2, 10], "x": 128, "y": 24, "flags": 4}, + {"matrix": [2, 11], "x": 141, "y": 24, "flags": 4}, + {"matrix": [2, 12], "x": 153, "y": 24, "flags": 4}, + {"matrix": [2, 13], "x": 168, "y": 24, "flags": 4}, + {"matrix": [2, 14], "x": 187, "y": 24, "flags": 4}, + {"matrix": [2, 15], "x": 199, "y": 24, "flags": 4}, + {"matrix": [2, 16], "x": 211, "y": 24, "flags": 4}, + {"matrix": [3, 0], "x": 4, "y": 34, "flags": 4}, + {"matrix": [3, 1], "x": 21, "y": 34, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 34, "flags": 4}, + {"matrix": [3, 3], "x": 46, "y": 34, "flags": 4}, + {"matrix": [3, 4], "x": 58, "y": 34, "flags": 4}, + {"matrix": [3, 5], "x": 70, "y": 34, "flags": 4}, + {"matrix": [3, 6], "x": 82, "y": 34, "flags": 4}, + {"matrix": [3, 7], "x": 95, "y": 34, "flags": 4}, + {"matrix": [3, 8], "x": 107, "y": 34, "flags": 4}, + {"matrix": [3, 9], "x": 119, "y": 34, "flags": 4}, + {"matrix": [3, 10], "x": 131, "y": 34, "flags": 4}, + {"matrix": [3, 11], "x": 144, "y": 34, "flags": 4}, + {"matrix": [3, 12], "x": 164, "y": 34, "flags": 4}, + {"matrix": [4, 0], "x": 7, "y": 44, "flags": 4}, + {"matrix": [4, 1], "x": 27, "y": 44, "flags": 4}, + {"matrix": [4, 2], "x": 39, "y": 44, "flags": 4}, + {"matrix": [4, 3], "x": 52, "y": 44, "flags": 4}, + {"matrix": [4, 4], "x": 64, "y": 44, "flags": 4}, + {"matrix": [4, 5], "x": 76, "y": 44, "flags": 4}, + {"matrix": [4, 6], "x": 88, "y": 44, "flags": 4}, + {"matrix": [4, 7], "x": 101, "y": 44, "flags": 4}, + {"matrix": [4, 8], "x": 113, "y": 44, "flags": 4}, + {"matrix": [4, 9], "x": 125, "y": 44, "flags": 4}, + {"matrix": [4, 10], "x": 138, "y": 44, "flags": 4}, + {"matrix": [4, 11], "x": 161, "y": 44, "flags": 4}, + {"matrix": [4, 12], "x": 199, "y": 44, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 54, "flags": 4}, + {"matrix": [5, 1], "x": 16, "y": 54, "flags": 4}, + {"matrix": [5, 2], "x": 32, "y": 54, "flags": 4}, + {"matrix": [5, 3], "x": 78, "y": 54, "flags": 4}, + {"matrix": [5, 4], "x": 124, "y": 54, "flags": 4}, + {"matrix": [5, 5], "x": 139, "y": 54, "flags": 4}, + {"matrix": [5, 6], "x": 154, "y": 54, "flags": 4}, + {"matrix": [5, 7], "x": 170, "y": 54, "flags": 4}, + {"matrix": [5, 8], "x": 187, "y": 54, "flags": 4}, + {"matrix": [5, 9], "x": 199, "y": 54, "flags": 4}, + {"matrix": [5, 10], "x": 211, "y": 54, "flags": 4} + ], "max_brightness": 128, "sleep": true }, diff --git a/keyboards/spaceholdings/nebula12b/keyboard.json b/keyboards/spaceholdings/nebula12b/keyboard.json index 6990da485b..c1092a75db 100755 --- a/keyboards/spaceholdings/nebula12b/keyboard.json +++ b/keyboards/spaceholdings/nebula12b/keyboard.json @@ -57,6 +57,24 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"x": 224, "y": 0, "flags": 2}, + {"matrix": [0, 2], "x": 224, "y": 9, "flags": 4}, + {"matrix": [1, 2], "x": 224, "y": 27, "flags": 4}, + {"matrix": [1, 1], "x": 112, "y": 27, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 27, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 46, "flags": 4}, + {"matrix": [2, 1], "x": 112, "y": 46, "flags": 4}, + {"matrix": [2, 2], "x": 224, "y": 46, "flags": 4}, + {"x": 224, "y": 55, "flags": 2}, + {"matrix": [3, 2], "x": 224, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 112, "y": 64, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 4}, + {"x": 0, "y": 55, "flags": 2}, + {"matrix": [0, 0], "x": 0, "y": 9, "flags": 4}, + {"x": 0, "y": 0, "flags": 2}, + {"matrix": [0, 1], "x": 112, "y": 9, "flags": 4} + ], "sleep": true }, "build": { diff --git a/keyboards/spaceholdings/nebula12b/nebula12b.c b/keyboards/spaceholdings/nebula12b/nebula12b.c deleted file mode 100755 index 6bca6c331b..0000000000 --- a/keyboards/spaceholdings/nebula12b/nebula12b.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright 2022 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" - -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 13, 15, 1 }, - { 4, 3, 2 }, - { 5, 6, 7 }, - { 11, 10, 9 }, -}, { - {224, 0 }, {224, 9 }, {224, 27 }, {112, 27 }, { 0,27 }, - { 0, 46 }, {112, 46 }, {224, 46 }, {224, 55 }, {224,64 }, - {112, 64 }, { 0, 64 }, { 0, 55 }, { 0, 9 }, { 0, 0 }, {112, 9 } -}, { - 2, - 4, 4, 4, 4, 4, 4, 4, - 2, - 4, 4, 4, - 2, - 4, - 2, - 4 -} }; -// clang-format on -#endif - diff --git a/keyboards/spaceholdings/nebula68b/hs/hs.c b/keyboards/spaceholdings/nebula68b/hs/hs.c deleted file mode 100755 index 7ac8da2e0d..0000000000 --- a/keyboards/spaceholdings/nebula68b/hs/hs.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2021 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" - -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 0, 1, 2, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18 }, - { 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, NO_LED, 21 }, - { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 22, 49, 19 }, - { 63, NO_LED, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 20 }, - { 64, 65, 67, NO_LED, NO_LED, NO_LED, 69, NO_LED, NO_LED, 71, 72, 73, 75, 76, 77 } -}, { - { 6, 10}, { 19, 10}, { 32, 10}, { 39, 11}, { 45, 10}, { 58, 10}, { 71, 10}, { 84, 10}, { 90, 11}, { 97, 10}, {110, 10}, {123, 10}, {130, 11}, {136, 10}, {149, 10}, {162, 10}, - {178, 13}, {182, 10}, {205, 10}, {218, 10}, {218, 23}, {205, 23}, {185, 23}, {169, 23}, {156, 23}, {143, 23}, {130, 23}, {117, 23}, {104, 23}, { 91, 23}, { 78, 23}, - { 65, 23}, { 52, 23}, { 39, 23}, { 26, 23}, { 10, 23}, { 4, 26}, { 17, 29}, { 29, 35}, { 42, 35}, { 55, 35}, { 68, 35}, { 81, 35}, { 94, 35}, {107, 35}, {120, 35}, {133, 35}, - {146, 35}, {159, 35}, {180, 35}, {220, 32}, {205, 48}, {177, 48}, {153, 48}, {140, 48}, {127, 48}, {114, 48}, {101, 48}, { 88, 48}, { 75, 48}, { 62, 48}, { 49, 48}, { 36, 48}, - { 15, 48}, { 8, 61}, { 24, 61}, { 32, 52}, { 41, 61}, { 81, 56}, { 89, 61}, {132, 53}, {138, 61}, {154, 61}, {170, 61}, {179, 53}, {192, 61}, {205, 61}, {218, 61} -}, { - 1, 4, 4, 2, 4, 4, 4, 4, 2, 4, 4, 4, 2, 4, 4, 4, 2, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 2, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 2, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 2, 1, 2, 4, 2, 1, 1, 1, 2, 1, 1, 1 -} }; -// clang-format on -#endif diff --git a/keyboards/spaceholdings/nebula68b/hs/keyboard.json b/keyboards/spaceholdings/nebula68b/hs/keyboard.json index ca41cff8e6..f99fd95bc4 100755 --- a/keyboards/spaceholdings/nebula68b/hs/keyboard.json +++ b/keyboards/spaceholdings/nebula68b/hs/keyboard.json @@ -1,5 +1,87 @@ { "keyboard_name": "NEBULA68B HOTSWAP", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 6, "y": 10, "flags": 1}, + {"matrix": [0, 1], "x": 19, "y": 10, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 10, "flags": 4}, + {"x": 39, "y": 11, "flags": 2}, + {"matrix": [0, 3], "x": 45, "y": 10, "flags": 4}, + {"matrix": [0, 4], "x": 58, "y": 10, "flags": 4}, + {"matrix": [0, 5], "x": 71, "y": 10, "flags": 4}, + {"matrix": [0, 6], "x": 84, "y": 10, "flags": 4}, + {"x": 90, "y": 11, "flags": 2}, + {"matrix": [0, 7], "x": 97, "y": 10, "flags": 4}, + {"matrix": [0, 8], "x": 110, "y": 10, "flags": 4}, + {"matrix": [0, 9], "x": 123, "y": 10, "flags": 4}, + {"x": 130, "y": 11, "flags": 2}, + {"matrix": [0, 10], "x": 136, "y": 10, "flags": 4}, + {"matrix": [0, 11], "x": 149, "y": 10, "flags": 4}, + {"matrix": [0, 12], "x": 162, "y": 10, "flags": 4}, + {"x": 178, "y": 13, "flags": 2}, + {"matrix": [0, 13], "x": 182, "y": 10, "flags": 1}, + {"matrix": [0, 14], "x": 205, "y": 10, "flags": 1}, + {"matrix": [2, 14], "x": 218, "y": 10, "flags": 1}, + {"matrix": [3, 14], "x": 218, "y": 23, "flags": 1}, + {"matrix": [1, 14], "x": 205, "y": 23, "flags": 1}, + {"matrix": [2, 12], "x": 185, "y": 23, "flags": 4}, + {"matrix": [1, 12], "x": 169, "y": 23, "flags": 4}, + {"matrix": [1, 11], "x": 156, "y": 23, "flags": 4}, + {"matrix": [1, 10], "x": 143, "y": 23, "flags": 4}, + {"matrix": [1, 9], "x": 130, "y": 23, "flags": 4}, + {"matrix": [1, 8], "x": 117, "y": 23, "flags": 4}, + {"matrix": [1, 7], "x": 104, "y": 23, "flags": 4}, + {"matrix": [1, 6], "x": 91, "y": 23, "flags": 4}, + {"matrix": [1, 5], "x": 78, "y": 23, "flags": 4}, + {"matrix": [1, 4], "x": 65, "y": 23, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 23, "flags": 4}, + {"matrix": [1, 2], "x": 39, "y": 23, "flags": 4}, + {"matrix": [1, 1], "x": 26, "y": 23, "flags": 4}, + {"matrix": [1, 0], "x": 10, "y": 23, "flags": 1}, + {"x": 4, "y": 26, "flags": 2}, + {"matrix": [2, 0], "x": 17, "y": 29, "flags": 1}, + {"matrix": [2, 1], "x": 29, "y": 35, "flags": 4}, + {"matrix": [2, 2], "x": 42, "y": 35, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 35, "flags": 4}, + {"matrix": [2, 4], "x": 68, "y": 35, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 35, "flags": 4}, + {"matrix": [2, 6], "x": 94, "y": 35, "flags": 4}, + {"matrix": [2, 7], "x": 107, "y": 35, "flags": 4}, + {"matrix": [2, 8], "x": 120, "y": 35, "flags": 4}, + {"matrix": [2, 9], "x": 133, "y": 35, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 35, "flags": 4}, + {"matrix": [2, 11], "x": 159, "y": 35, "flags": 4}, + {"matrix": [2, 13], "x": 180, "y": 35, "flags": 1}, + {"x": 220, "y": 32, "flags": 2}, + {"matrix": [3, 13], "x": 205, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 177, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 153, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 15, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 61, "flags": 1}, + {"matrix": [4, 1], "x": 24, "y": 61, "flags": 1}, + {"x": 32, "y": 52, "flags": 2}, + {"matrix": [4, 2], "x": 41, "y": 61, "flags": 1}, + {"x": 81, "y": 56, "flags": 2}, + {"matrix": [4, 6], "x": 89, "y": 61, "flags": 4}, + {"x": 132, "y": 53, "flags": 2}, + {"matrix": [4, 9], "x": 138, "y": 61, "flags": 1}, + {"matrix": [4, 10], "x": 154, "y": 61, "flags": 1}, + {"matrix": [4, 11], "x": 170, "y": 61, "flags": 1}, + {"x": 179, "y": 53, "flags": 2}, + {"matrix": [4, 12], "x": 192, "y": 61, "flags": 1}, + {"matrix": [4, 13], "x": 205, "y": 61, "flags": 1}, + {"matrix": [4, 14], "x": 218, "y": 61, "flags": 1} + ] + }, "community_layouts": ["68_ansi"], "layouts": { "LAYOUT_68_ansi": { diff --git a/keyboards/spaceholdings/nebula68b/solder/keyboard.json b/keyboards/spaceholdings/nebula68b/solder/keyboard.json index 3a50385fe3..ea002840e2 100755 --- a/keyboards/spaceholdings/nebula68b/solder/keyboard.json +++ b/keyboards/spaceholdings/nebula68b/solder/keyboard.json @@ -1,5 +1,88 @@ { "keyboard_name": "NEBULA68B SOLDER", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 6, "y": 10, "flags": 1}, + {"matrix": [0, 1], "x": 19, "y": 10, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 10, "flags": 4}, + {"x": 44, "y": 13, "flags": 2}, + {"matrix": [0, 3], "x": 45, "y": 10, "flags": 4}, + {"matrix": [0, 4], "x": 58, "y": 10, "flags": 4}, + {"matrix": [0, 5], "x": 71, "y": 10, "flags": 4}, + {"matrix": [0, 6], "x": 84, "y": 10, "flags": 4}, + {"x": 88, "y": 13, "flags": 2}, + {"matrix": [0, 7], "x": 97, "y": 10, "flags": 4}, + {"matrix": [0, 8], "x": 110, "y": 10, "flags": 4}, + {"matrix": [0, 9], "x": 123, "y": 10, "flags": 4}, + {"x": 132, "y": 13, "flags": 2}, + {"matrix": [0, 10], "x": 136, "y": 10, "flags": 4}, + {"matrix": [0, 11], "x": 149, "y": 10, "flags": 4}, + {"matrix": [0, 12], "x": 162, "y": 10, "flags": 4}, + {"matrix": [1, 13], "x": 175, "y": 10, "flags": 4}, + {"x": 179, "y": 13, "flags": 2}, + {"matrix": [0, 13], "x": 188, "y": 10, "flags": 1}, + {"matrix": [0, 14], "x": 205, "y": 10, "flags": 1}, + {"matrix": [2, 14], "x": 218, "y": 10, "flags": 1}, + {"matrix": [3, 14], "x": 218, "y": 23, "flags": 1}, + {"matrix": [1, 14], "x": 205, "y": 23, "flags": 1}, + {"matrix": [2, 12], "x": 185, "y": 23, "flags": 4}, + {"matrix": [1, 12], "x": 169, "y": 23, "flags": 4}, + {"matrix": [1, 11], "x": 156, "y": 23, "flags": 4}, + {"matrix": [1, 10], "x": 143, "y": 23, "flags": 4}, + {"matrix": [1, 9], "x": 130, "y": 23, "flags": 4}, + {"matrix": [1, 8], "x": 117, "y": 23, "flags": 4}, + {"matrix": [1, 7], "x": 104, "y": 23, "flags": 4}, + {"matrix": [1, 6], "x": 91, "y": 23, "flags": 4}, + {"matrix": [1, 5], "x": 78, "y": 23, "flags": 4}, + {"matrix": [1, 4], "x": 65, "y": 23, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 23, "flags": 4}, + {"matrix": [1, 2], "x": 39, "y": 23, "flags": 4}, + {"matrix": [1, 1], "x": 26, "y": 23, "flags": 4}, + {"matrix": [1, 0], "x": 10, "y": 23, "flags": 1}, + {"x": 4, "y": 26, "flags": 2}, + {"matrix": [2, 0], "x": 11, "y": 35, "flags": 1}, + {"matrix": [2, 1], "x": 29, "y": 35, "flags": 4}, + {"matrix": [2, 2], "x": 42, "y": 35, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 35, "flags": 4}, + {"matrix": [2, 4], "x": 68, "y": 35, "flags": 4}, + {"matrix": [2, 5], "x": 81, "y": 35, "flags": 4}, + {"matrix": [2, 6], "x": 94, "y": 35, "flags": 4}, + {"matrix": [2, 7], "x": 107, "y": 35, "flags": 4}, + {"matrix": [2, 8], "x": 120, "y": 35, "flags": 4}, + {"matrix": [2, 9], "x": 133, "y": 35, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 35, "flags": 4}, + {"matrix": [2, 11], "x": 159, "y": 35, "flags": 4}, + {"matrix": [2, 13], "x": 180, "y": 35, "flags": 1}, + {"x": 220, "y": 32, "flags": 2}, + {"matrix": [3, 13], "x": 205, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 177, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 153, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 15, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 61, "flags": 1}, + {"matrix": [4, 1], "x": 24, "y": 61, "flags": 1}, + {"x": 32, "y": 52, "flags": 2}, + {"matrix": [4, 2], "x": 41, "y": 61, "flags": 1}, + {"x": 82, "y": 56, "flags": 2}, + {"matrix": [4, 6], "x": 89, "y": 61, "flags": 4}, + {"x": 132, "y": 53, "flags": 2}, + {"matrix": [4, 9], "x": 138, "y": 61, "flags": 1}, + {"matrix": [4, 10], "x": 154, "y": 61, "flags": 1}, + {"matrix": [4, 11], "x": 170, "y": 61, "flags": 1}, + {"x": 179, "y": 53, "flags": 2}, + {"matrix": [4, 12], "x": 192, "y": 61, "flags": 1}, + {"matrix": [4, 13], "x": 205, "y": 61, "flags": 1}, + {"matrix": [4, 14], "x": 218, "y": 61, "flags": 1} + ] + }, "community_layouts": ["68_ansi"], "layouts": { "LAYOUT_68_ansi": { diff --git a/keyboards/spaceholdings/nebula68b/solder/solder.c b/keyboards/spaceholdings/nebula68b/solder/solder.c deleted file mode 100755 index 352cee1d52..0000000000 --- a/keyboards/spaceholdings/nebula68b/solder/solder.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2021 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" - -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 0, 1, 2, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 18, 19 }, - { 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 16, 22 }, - { 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 23, 50, 20 }, - { 64, NO_LED, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 21 }, - { 65, 66, 68, NO_LED, NO_LED, NO_LED, 70, NO_LED, NO_LED, 72, 73, 74, 76, 77, 78 } -}, { - { 6, 10}, { 19, 10}, { 32, 10}, { 44, 13}, { 45, 10}, { 58, 10}, { 71, 10}, { 84, 10}, { 88, 13}, { 97, 10}, {110, 10}, {123, 10}, {132, 13}, {136, 10}, {149, 10}, {162, 10}, - {175, 10}, {179, 13}, {188, 10}, {205, 10}, {218, 10}, {218, 23}, {205, 23}, {185, 23}, {169, 23}, {156, 23}, {143, 23}, {130, 23}, {117, 23}, {104, 23}, { 91, 23}, { 78, 23}, - { 65, 23}, { 52, 23}, { 39, 23}, { 26, 23}, { 10, 23}, { 4, 26}, { 11, 35}, { 29, 35}, { 42, 35}, { 55, 35}, { 68, 35}, { 81, 35}, { 94, 35}, {107, 35}, {120, 35}, {133, 35}, - {146, 35}, {159, 35}, {180, 35}, {220, 32}, {205, 48}, {177, 48}, {153, 48}, {140, 48}, {127, 48}, {114, 48}, {101, 48}, { 88, 48}, { 75, 48}, { 62, 48}, { 49, 48}, { 36, 48}, - { 15, 48}, { 8, 61}, { 24, 61}, { 32, 52}, { 41, 61}, { 82, 56}, { 89, 61}, {132, 53}, {138, 61}, {154, 61}, {170, 61}, {179, 53}, {192, 61}, {205, 61}, {218, 61} -}, { - 1, 4, 4, 2, 4, 4, 4, 4, 2, 4, 4, 4, 2, 4, 4, 4, 4, 2, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 2, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 2, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 2, 1, 2, 4, 2, 1, 1, 1, 2, 1, 1, 1 -} }; -// clang-format on -#endif diff --git a/keyboards/splitkb/kyria/rev1/info.json b/keyboards/splitkb/kyria/rev1/info.json index 1e21c60978..54758180fa 100644 --- a/keyboards/splitkb/kyria/rev1/info.json +++ b/keyboards/splitkb/kyria/rev1/info.json @@ -19,6 +19,28 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [2, 1], "x": 91, "y": 40, "flags": 255}, + {"matrix": [3, 2], "x": 77, "y": 56, "flags": 255}, + {"matrix": [3, 3], "x": 63, "y": 56, "flags": 255}, + {"matrix": [1, 2], "x": 77, "y": 24, "flags": 255}, + {"matrix": [0, 3], "x": 63, "y": 8, "flags": 255}, + {"matrix": [0, 6], "x": 21, "y": 8, "flags": 255}, + {"matrix": [2, 6], "x": 21, "y": 40, "flags": 255}, + {"matrix": [2, 5], "x": 35, "y": 40, "flags": 255}, + {"matrix": [2, 7], "x": 7, "y": 40, "flags": 255}, + {"matrix": [0, 7], "x": 7, "y": 8, "flags": 255}, + {"matrix": [6, 1], "x": 133, "y": 40, "flags": 255}, + {"matrix": [7, 2], "x": 147, "y": 56, "flags": 255}, + {"matrix": [7, 3], "x": 161, "y": 56, "flags": 255}, + {"matrix": [5, 2], "x": 147, "y": 24, "flags": 255}, + {"matrix": [4, 3], "x": 161, "y": 8, "flags": 255}, + {"matrix": [4, 6], "x": 203, "y": 8, "flags": 255}, + {"matrix": [6, 6], "x": 203, "y": 40, "flags": 255}, + {"matrix": [6, 5], "x": 189, "y": 40, "flags": 255}, + {"matrix": [6, 7], "x": 217, "y": 40, "flags": 255}, + {"matrix": [4, 7], "x": 217, "y": 8, "flags": 255} + ], "max_brightness": 170, "sleep": true, "split_count": [10, 10] diff --git a/keyboards/splitkb/kyria/rev1/rev1.c b/keyboards/splitkb/kyria/rev1/rev1.c index db14411933..2b64504cc3 100644 --- a/keyboards/splitkb/kyria/rev1/rev1.c +++ b/keyboards/splitkb/kyria/rev1/rev1.c @@ -32,34 +32,3 @@ __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATR const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0}; # endif #endif - -#ifdef RGB_MATRIX_ENABLE -/* Map physical under glow LEDs for RGB matrix support - * - * 09, 05, xx, xx, 04, xx, xx, 14, xx, xx, 15, 19, - * xx, xx, xx, xx, xx, 03, 13, xx, xx, xx, xx, xx, - * 08, 06, 07, xx, xx, xx, 00, xx, xx, 10, xx, xx, xx, 17, 16, 18, - * xx, 02, 01, xx, xx, xx, xx, 11, 12, xx - */ -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, NO_LED, NO_LED, 4, NO_LED, NO_LED, 5, 9 }, - { NO_LED, NO_LED, 3, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, 0, NO_LED, NO_LED, NO_LED, 7, 6, 8 }, - { NO_LED, NO_LED, 1, 2, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, 14, NO_LED, NO_LED, 15, 19 }, - { NO_LED, NO_LED, 13, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, 10, NO_LED, NO_LED, NO_LED, 17, 16, 18 }, - { NO_LED, NO_LED, 11, 12, NO_LED, NO_LED, NO_LED, NO_LED }, -}, { - // LED Index to Physical Position - {91,40}, {77,56}, {63,56}, {77,24}, {63,8}, {21,8}, {21,40}, {35,40}, {7,40}, {7,8}, - {133,40}, {147,56}, {161,56}, {147,24}, {161,8}, {203,8}, {203,40}, {189,40}, {217,40}, {217,8} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; -#endif diff --git a/keyboards/splitkb/kyria/rev2/info.json b/keyboards/splitkb/kyria/rev2/info.json index d1507a26b0..41c55cc025 100644 --- a/keyboards/splitkb/kyria/rev2/info.json +++ b/keyboards/splitkb/kyria/rev2/info.json @@ -19,6 +19,28 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [1, 2], "x": 77, "y": 24, "flags": 255}, + {"matrix": [0, 3], "x": 63, "y": 8, "flags": 255}, + {"matrix": [0, 6], "x": 21, "y": 8, "flags": 255}, + {"matrix": [2, 6], "x": 21, "y": 40, "flags": 255}, + {"matrix": [2, 5], "x": 35, "y": 40, "flags": 255}, + {"matrix": [3, 3], "x": 63, "y": 56, "flags": 255}, + {"matrix": [3, 2], "x": 77, "y": 56, "flags": 255}, + {"matrix": [2, 1], "x": 91, "y": 40, "flags": 255}, + {"matrix": [2, 7], "x": 7, "y": 40, "flags": 255}, + {"matrix": [0, 7], "x": 7, "y": 8, "flags": 255}, + {"matrix": [5, 2], "x": 147, "y": 24, "flags": 255}, + {"matrix": [4, 3], "x": 161, "y": 8, "flags": 255}, + {"matrix": [4, 6], "x": 203, "y": 8, "flags": 255}, + {"matrix": [6, 6], "x": 203, "y": 40, "flags": 255}, + {"matrix": [6, 5], "x": 189, "y": 40, "flags": 255}, + {"matrix": [7, 3], "x": 161, "y": 56, "flags": 255}, + {"matrix": [7, 2], "x": 147, "y": 56, "flags": 255}, + {"matrix": [6, 1], "x": 133, "y": 40, "flags": 255}, + {"matrix": [6, 7], "x": 217, "y": 40, "flags": 255}, + {"matrix": [4, 7], "x": 217, "y": 8, "flags": 255} + ], "max_brightness": 170, "sleep": true, "split_count": [10, 10] diff --git a/keyboards/splitkb/kyria/rev2/rev2.c b/keyboards/splitkb/kyria/rev2/rev2.c index 37300c8188..70f894b64d 100644 --- a/keyboards/splitkb/kyria/rev2/rev2.c +++ b/keyboards/splitkb/kyria/rev2/rev2.c @@ -47,33 +47,3 @@ __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATR const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0}; # endif #endif - -#ifdef RGB_MATRIX_ENABLE -/* Map physical under glow LEDs for RGB matrix support - * 09, 02, xx, xx, 01, xx, xx, 11, xx, xx, 12, 19, - * xx, xx, xx, xx, xx, 00, 10, xx, xx, xx, xx, xx, - * 08, 03, 04, xx, xx, xx, 07, xx, xx, 17, xx, xx, xx, 14, 13, 18, - * xx, 05, 06, xx, xx, xx, xx, 16, 15, xx - */ -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, NO_LED, NO_LED, 1, NO_LED, NO_LED, 2, 9 }, - { NO_LED, NO_LED, 0, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, 7, NO_LED, NO_LED, NO_LED, 4, 3, 8 }, - { NO_LED, NO_LED, 6, 5, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, 11, NO_LED, NO_LED, 12, 19 }, - { NO_LED, NO_LED, 10, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, 17, NO_LED, NO_LED, NO_LED, 14, 13, 18 }, - { NO_LED, NO_LED, 16, 15, NO_LED, NO_LED, NO_LED, NO_LED }, -}, { - // LED Index to Physical Position - {77,24}, {63,8}, {21,8}, {21,40}, {35,40}, {63,56}, {77,56}, {91,40}, {7,40}, {7,8}, - {147,24}, {161,8}, {203,8}, {203,40}, {189,40}, {161,56}, {147,56}, {133,40}, {217,40}, {217,8} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; -#endif diff --git a/keyboards/system76/launch_1/keyboard.json b/keyboards/system76/launch_1/keyboard.json index b5317dd9bc..3a7ecc928e 100644 --- a/keyboards/system76/launch_1/keyboard.json +++ b/keyboards/system76/launch_1/keyboard.json @@ -47,6 +47,92 @@ "hue": 142 }, "driver": "ws2812", + "layout": [ + {"matrix": [4, 12], "x": 209, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 190, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 171, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 156, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 140, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 125, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 110, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 95, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 80, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 65, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 49, "y": 51, "flags": 4}, + {"matrix": [4, 1], "x": 34, "y": 51, "flags": 4}, + {"matrix": [4, 0], "x": 11, "y": 51, "flags": 4}, + {"matrix": [5, 0], "x": 8, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 27, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 42, "y": 64, "flags": 4}, + {"matrix": [5, 3], "x": 57, "y": 64, "flags": 4}, + {"matrix": [5, 4], "x": 80, "y": 64, "flags": 4}, + {"matrix": [5, 6], "x": 110, "y": 64, "flags": 4}, + {"matrix": [5, 7], "x": 133, "y": 64, "flags": 4}, + {"matrix": [5, 8], "x": 148, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 167, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 194, "y": 64, "flags": 4}, + {"matrix": [5, 11], "x": 209, "y": 64, "flags": 4}, + {"matrix": [5, 12], "x": 224, "y": 64, "flags": 4}, + {"matrix": [5, 5], "x": 224, "y": 38, "flags": 4}, + {"matrix": [3, 12], "x": 197, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 178, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 163, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 148, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 133, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 118, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 103, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 87, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 72, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 57, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 42, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 27, "y": 38, "flags": 4}, + {"matrix": [3, 0], "x": 8, "y": 38, "flags": 4}, + {"matrix": [2, 0], "x": 4, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 23, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 38, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 53, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 68, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 99, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 114, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 129, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 159, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 175, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 190, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 205, "y": 26, "flags": 4}, + {"matrix": [5, 13], "x": 224, "y": 26, "flags": 4}, + {"matrix": [4, 13], "x": 224, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 201, "y": 13, "flags": 4}, + {"matrix": [1, 12], "x": 182, "y": 13, "flags": 4}, + {"matrix": [1, 11], "x": 167, "y": 13, "flags": 4}, + {"matrix": [1, 10], "x": 152, "y": 13, "flags": 4}, + {"matrix": [1, 9], "x": 137, "y": 13, "flags": 4}, + {"matrix": [1, 8], "x": 121, "y": 13, "flags": 4}, + {"matrix": [1, 7], "x": 106, "y": 13, "flags": 4}, + {"matrix": [1, 6], "x": 91, "y": 13, "flags": 4}, + {"matrix": [1, 5], "x": 76, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 61, "y": 13, "flags": 4}, + {"matrix": [1, 3], "x": 46, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 30, "y": 13, "flags": 4}, + {"matrix": [1, 1], "x": 15, "y": 13, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 13, "flags": 4}, + {"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": 46, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 76, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 91, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 106, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 121, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 137, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 152, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 167, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 182, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 201, "y": 0, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 0, "flags": 4} + ], "max_brightness": 176, "sleep": true }, diff --git a/keyboards/system76/launch_1/launch_1.c b/keyboards/system76/launch_1/launch_1.c index 2cff70076e..3a4c4749c6 100644 --- a/keyboards/system76/launch_1/launch_1.c +++ b/keyboards/system76/launch_1/launch_1.c @@ -21,59 +21,6 @@ #include "usb_mux.h" // clang-format off -#ifdef RGB_MATRIX_ENABLE -// LEDs by index -// 0 1 2 3 4 5 6 7 8 9 -// 00 LM4 LL4 LK4 LJ4 LI4 LH4 LG4 LF4 LE4 LD4 -// 10 LC4 LB4 LA4 LA5 LB5 LC5 LD5 LE5 LG5 LH5 -// 20 LI5 LJ5 LK5 LL5 LM5 LO3 LM3 LL3 LK3 LJ3 -// 30 LI3 LH3 LG3 LF3 LE3 LD3 LC3 LB3 LA3 LA2 -// 40 LB2 LC2 LD2 LE2 LF2 LG2 LH2 LI2 LJ2 LK2 -// 50 LL2 LM2 LN2 LO2 LO1 LN1 LM1 LL1 LK1 LJ1 -// 60 LI1 LH1 LG1 LF1 LE1 LD1 LC1 LB1 LA1 LA0 -// 70 LB0 LC0 LD0 LE0 LF0 LG0 LH0 LI0 LJ0 LK0 -// 80 LL0 LM0 LN0 LO0 -led_config_t g_led_config = { { - // Key matrix to LED index -/* A B C D E F G H I J K L M N O */ -/* 0 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, */ -/* 1 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, */ -/* 2 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, */ -/* 3 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, */ -/* 4 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, */ -/* 5 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 */ - { 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82 }, - { 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55 }, - { 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 }, - { 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 83 }, - { 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 54 }, - { 13, 14, 15, 16, 17, 25, 18, 19, 20, 21, 22, 23, 24, 53 }, -}, { - // LED index to physical position (see leds.sh in `launch' repo) -/* 00 */ {209, 51}, {190, 51}, {171, 51}, {156, 51}, {140, 51}, {125, 51}, {110, 51}, {95, 51}, {80, 51}, {65, 51}, -/* 10 */ {49, 51}, {34, 51}, {11, 51}, {8, 64}, {27, 64}, {42, 64}, {57, 64}, {80, 64}, {110, 64}, {133, 64}, -/* 20 */ {148, 64}, {167, 64}, {194, 64}, {209, 64}, {224, 64}, {224, 38}, {197, 38}, {178, 38}, {163, 38}, {148, 38}, -/* 30 */ {133, 38}, {118, 38}, {103, 38}, {87, 38}, {72, 38}, {57, 38}, {42, 38}, {27, 38}, {8, 38}, {4, 26}, -/* 40 */ {23, 26}, {38, 26}, {53, 26}, {68, 26}, {84, 26}, {99, 26}, {114, 26}, {129, 26}, {144, 26}, {159, 26}, -/* 50 */ {175, 26}, {190, 26}, {205, 26}, {224, 26}, {224, 13}, {201, 13}, {182, 13}, {167, 13}, {152, 13}, {137, 13}, -/* 60 */ {121, 13}, {106, 13}, {91, 13}, {76, 13}, {61, 13}, {46, 13}, {30, 13}, {15, 13}, {0, 13}, {0, 0}, -/* 70 */ {15, 0}, {30, 0}, {46, 0}, {61, 0}, {76, 0}, {91, 0}, {106, 0}, {121, 0}, {137, 0}, {152, 0}, -/* 80 */ {167, 0}, {182, 0}, {201, 0}, {224, 0} -}, { - // LED index to flags (set all to LED_FLAG_KEYLIGHT) - /* 0 1 2 3 4 5 6 7 8 9 */ -/* 00 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -/* 10 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -/* 20 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -/* 30 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -/* 40 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -/* 50 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -/* 60 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -/* 70 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -/* 80 */ 4, 4, 4, 4 -} }; -#endif // RGB_MATRIX_ENABLE - bool eeprom_is_valid(void) { return ( eeprom_read_word(((void *)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && From d17671cd23ffe94be29b696fbdcaeeb2b5d47018 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:07:47 -0600 Subject: [PATCH 20/95] Migrate `g_led_config` to DD (QR) (#25623) --- keyboards/quarkeys/z40/keyboard.json | 49 ++++++++ keyboards/quarkeys/z40/z40.c | 44 ------- keyboards/rgbkb/mun/rev1/keyboard.json | 100 +++++++++++++++ keyboards/rgbkb/mun/rev1/rev1.c | 47 ------- keyboards/rgbkb/sol/rev1/keyboard.json | 74 ++++++++++- keyboards/rgbkb/sol/rev1/rev1.c | 46 ------- keyboards/rgbkb/sol3/rev1/keyboard.json | 158 ++++++++++++++++++++++++ keyboards/rgbkb/sol3/rev1/rev1.c | 57 --------- 8 files changed, 380 insertions(+), 195 deletions(-) delete mode 100644 keyboards/quarkeys/z40/z40.c delete mode 100644 keyboards/rgbkb/sol/rev1/rev1.c diff --git a/keyboards/quarkeys/z40/keyboard.json b/keyboards/quarkeys/z40/keyboard.json index 05d81e5b6f..0f13d8aefd 100644 --- a/keyboards/quarkeys/z40/keyboard.json +++ b/keyboards/quarkeys/z40/keyboard.json @@ -29,6 +29,55 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [3, 11], "x": 225, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 200, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 180, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 160, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 140, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 110, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 80, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 60, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [2, 11], "x": 225, "y": 42, "flags": 1}, + {"matrix": [2, 10], "x": 200, "y": 42, "flags": 2}, + {"matrix": [2, 9], "x": 180, "y": 42, "flags": 2}, + {"matrix": [2, 8], "x": 160, "y": 42, "flags": 2}, + {"matrix": [2, 7], "x": 140, "y": 42, "flags": 2}, + {"matrix": [2, 6], "x": 120, "y": 42, "flags": 2}, + {"matrix": [2, 5], "x": 100, "y": 42, "flags": 2}, + {"matrix": [2, 4], "x": 80, "y": 42, "flags": 2}, + {"x": 60, "y": 42, "flags": 2}, + {"matrix": [2, 2], "x": 40, "y": 42, "flags": 2}, + {"matrix": [2, 1], "x": 20, "y": 42, "flags": 2}, + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1}, + {"matrix": [1, 11], "x": 225, "y": 21, "flags": 1}, + {"matrix": [1, 10], "x": 200, "y": 21, "flags": 2}, + {"matrix": [1, 9], "x": 180, "y": 21, "flags": 2}, + {"matrix": [1, 8], "x": 160, "y": 21, "flags": 2}, + {"matrix": [1, 7], "x": 140, "y": 21, "flags": 2}, + {"matrix": [1, 6], "x": 120, "y": 21, "flags": 2}, + {"matrix": [2, 3], "x": 100, "y": 21, "flags": 2}, + {"matrix": [1, 4], "x": 80, "y": 21, "flags": 2}, + {"matrix": [1, 3], "x": 60, "y": 21, "flags": 2}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 2}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 2}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [0, 11], "x": 225, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 200, "y": 0, "flags": 2}, + {"matrix": [0, 9], "x": 180, "y": 0, "flags": 2}, + {"matrix": [0, 8], "x": 160, "y": 0, "flags": 2}, + {"matrix": [0, 7], "x": 140, "y": 0, "flags": 2}, + {"matrix": [0, 6], "x": 120, "y": 0, "flags": 2}, + {"matrix": [0, 5], "x": 100, "y": 0, "flags": 2}, + {"matrix": [0, 4], "x": 80, "y": 0, "flags": 2}, + {"matrix": [0, 3], "x": 60, "y": 0, "flags": 2}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 2}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 2}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1} + ], "sat_steps": 8, "val_steps": 8, "speed_steps": 10, diff --git a/keyboards/quarkeys/z40/z40.c b/keyboards/quarkeys/z40/z40.c deleted file mode 100644 index edd8946c11..0000000000 --- a/keyboards/quarkeys/z40/z40.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -/ Copyright 2022 quarkeys -/ 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - /* - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ - { k30, k31, k32, k33, k34, k35, XXX, k36, k37, k38, k39, k3A }\ - */ - { 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, 29, 18, 17, 16, 15, 14, 13, 12, 11 }, - { 10, 9, 8, 7, 6, 5, NO_LED, 4, 3, 2, 1, 0 } - }, - { // Index to Physical Position - {225, 64}, {200, 64}, {180, 64}, {160, 64}, {140, 64}, {110, 64}, { 80, 64}, { 60, 64}, { 40, 64}, { 20, 64}, { 0, 64}, - {225, 42}, {200, 42}, {180, 42}, {160, 42}, {140, 42}, {120, 42}, {100, 42}, { 80, 42}, { 60, 42}, { 40, 42}, { 20, 42}, { 0, 42}, - {225, 21}, {200, 21}, {180, 21}, {160, 21}, {140, 21}, {120, 21}, {100, 21}, { 80, 21}, { 60, 21}, { 40, 21}, { 20, 21}, { 0, 21}, - {225, 0}, {200, 0}, {180, 0}, {160, 0}, {140, 0}, {120, 0}, {100, 0}, { 80, 0}, { 60, 0}, { 40, 0}, { 20, 0}, { 0, 0} - }, - { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, - 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, - 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 - } -}; -#endif diff --git a/keyboards/rgbkb/mun/rev1/keyboard.json b/keyboards/rgbkb/mun/rev1/keyboard.json index ec02a2f2dd..96cbf887f7 100644 --- a/keyboards/rgbkb/mun/rev1/keyboard.json +++ b/keyboards/rgbkb/mun/rev1/keyboard.json @@ -88,6 +88,106 @@ }, "center_point": [128, 34], "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 16, "y": 16, "flags": 1}, + {"matrix": [0, 1], "x": 34, "y": 16, "flags": 4}, + {"matrix": [0, 2], "x": 49, "y": 16, "flags": 4}, + {"matrix": [0, 3], "x": 64, "y": 16, "flags": 4}, + {"matrix": [0, 4], "x": 79, "y": 16, "flags": 4}, + {"matrix": [0, 5], "x": 94, "y": 16, "flags": 4}, + {"matrix": [0, 6], "x": 109, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 109, "y": 31, "flags": 4}, + {"matrix": [1, 5], "x": 94, "y": 31, "flags": 4}, + {"matrix": [1, 4], "x": 79, "y": 31, "flags": 4}, + {"matrix": [1, 3], "x": 64, "y": 31, "flags": 4}, + {"matrix": [1, 2], "x": 49, "y": 31, "flags": 4}, + {"matrix": [1, 1], "x": 34, "y": 31, "flags": 4}, + {"matrix": [1, 0], "x": 16, "y": 31, "flags": 1}, + {"matrix": [2, 0], "x": 16, "y": 46, "flags": 1}, + {"matrix": [2, 1], "x": 34, "y": 46, "flags": 4}, + {"matrix": [2, 2], "x": 49, "y": 46, "flags": 4}, + {"matrix": [2, 3], "x": 64, "y": 46, "flags": 4}, + {"matrix": [2, 4], "x": 79, "y": 46, "flags": 4}, + {"matrix": [2, 5], "x": 94, "y": 46, "flags": 4}, + {"matrix": [2, 6], "x": 109, "y": 46, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 61, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 61, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 61, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 61, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 61, "flags": 4}, + {"matrix": [3, 1], "x": 34, "y": 61, "flags": 4}, + {"matrix": [3, 0], "x": 16, "y": 61, "flags": 1}, + {"matrix": [4, 0], "x": 16, "y": 76, "flags": 1}, + {"matrix": [4, 1], "x": 34, "y": 76, "flags": 1}, + {"matrix": [4, 2], "x": 49, "y": 76, "flags": 1}, + {"matrix": [4, 3], "x": 64, "y": 76, "flags": 1}, + {"matrix": [4, 4], "x": 83, "y": 72, "flags": 1}, + {"matrix": [4, 5], "x": 98, "y": 72, "flags": 1}, + {"matrix": [4, 6], "x": 113, "y": 72, "flags": 1}, + {"x": 97, "y": 5, "flags": 2}, + {"x": 91, "y": 5, "flags": 2}, + {"x": 86, "y": 5, "flags": 2}, + {"x": 80, "y": 5, "flags": 2}, + {"x": 75, "y": 5, "flags": 2}, + {"x": 69, "y": 5, "flags": 2}, + {"x": 63, "y": 5, "flags": 2}, + {"x": 58, "y": 5, "flags": 2}, + {"x": 52, "y": 5, "flags": 2}, + {"x": 46, "y": 5, "flags": 2}, + {"x": 41, "y": 5, "flags": 2}, + {"x": 35, "y": 5, "flags": 2}, + {"x": 30, "y": 5, "flags": 2}, + {"x": 24, "y": 5, "flags": 2}, + {"matrix": [7, 0], "x": 240, "y": 16, "flags": 1}, + {"matrix": [7, 1], "x": 222, "y": 16, "flags": 4}, + {"matrix": [7, 2], "x": 207, "y": 16, "flags": 4}, + {"matrix": [7, 3], "x": 192, "y": 16, "flags": 4}, + {"matrix": [7, 4], "x": 177, "y": 16, "flags": 4}, + {"matrix": [7, 5], "x": 162, "y": 16, "flags": 4}, + {"matrix": [7, 6], "x": 147, "y": 16, "flags": 4}, + {"matrix": [8, 6], "x": 147, "y": 31, "flags": 4}, + {"matrix": [8, 5], "x": 162, "y": 31, "flags": 4}, + {"matrix": [8, 4], "x": 177, "y": 31, "flags": 4}, + {"matrix": [8, 3], "x": 192, "y": 31, "flags": 4}, + {"matrix": [8, 2], "x": 207, "y": 31, "flags": 4}, + {"matrix": [8, 1], "x": 222, "y": 31, "flags": 4}, + {"matrix": [8, 0], "x": 240, "y": 31, "flags": 1}, + {"matrix": [9, 0], "x": 240, "y": 46, "flags": 1}, + {"matrix": [9, 1], "x": 222, "y": 46, "flags": 4}, + {"matrix": [9, 2], "x": 207, "y": 46, "flags": 4}, + {"matrix": [9, 3], "x": 192, "y": 46, "flags": 4}, + {"matrix": [9, 4], "x": 177, "y": 46, "flags": 4}, + {"matrix": [9, 5], "x": 162, "y": 46, "flags": 4}, + {"matrix": [9, 6], "x": 147, "y": 46, "flags": 4}, + {"matrix": [10, 6], "x": 147, "y": 61, "flags": 4}, + {"matrix": [10, 5], "x": 162, "y": 61, "flags": 4}, + {"matrix": [10, 4], "x": 177, "y": 61, "flags": 4}, + {"matrix": [10, 3], "x": 192, "y": 61, "flags": 4}, + {"matrix": [10, 2], "x": 207, "y": 61, "flags": 4}, + {"matrix": [10, 1], "x": 222, "y": 61, "flags": 4}, + {"matrix": [10, 0], "x": 240, "y": 61, "flags": 1}, + {"matrix": [11, 0], "x": 240, "y": 76, "flags": 1}, + {"matrix": [11, 1], "x": 222, "y": 76, "flags": 1}, + {"matrix": [11, 2], "x": 207, "y": 76, "flags": 1}, + {"matrix": [11, 3], "x": 192, "y": 76, "flags": 1}, + {"matrix": [11, 4], "x": 180, "y": 72, "flags": 1}, + {"matrix": [11, 5], "x": 165, "y": 72, "flags": 1}, + {"matrix": [11, 6], "x": 150, "y": 72, "flags": 1}, + {"x": 159, "y": 5, "flags": 2}, + {"x": 164, "y": 5, "flags": 2}, + {"x": 170, "y": 5, "flags": 2}, + {"x": 176, "y": 5, "flags": 2}, + {"x": 181, "y": 5, "flags": 2}, + {"x": 187, "y": 5, "flags": 2}, + {"x": 192, "y": 5, "flags": 2}, + {"x": 198, "y": 5, "flags": 2}, + {"x": 204, "y": 5, "flags": 2}, + {"x": 209, "y": 5, "flags": 2}, + {"x": 215, "y": 5, "flags": 2}, + {"x": 221, "y": 5, "flags": 2}, + {"x": 226, "y": 5, "flags": 2}, + {"x": 232, "y": 5, "flags": 2} + ], "led_flush_limit": 33, "led_process_limit": 10, "sleep": true, diff --git a/keyboards/rgbkb/mun/rev1/rev1.c b/keyboards/rgbkb/mun/rev1/rev1.c index 206a30d654..7a16d7cb86 100644 --- a/keyboards/rgbkb/mun/rev1/rev1.c +++ b/keyboards/rgbkb/mun/rev1/rev1.c @@ -42,53 +42,6 @@ bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) { return false; } -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6 }, - { 13, 12, 11, 10, 9, 8, 7 }, - { 14, 15, 16, 17, 18, 19, 20 }, - { 27, 26, 25, 24, 23, 22, 21 }, - { 28, 29, 30, 31, 32, 33, 34 }, - { 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 }, - { 49, 50, 51, 52, 53, 54, 55 }, - { 62, 61, 60, 59, 58, 57, 56 }, - { 63, 64, 65, 66, 67, 68, 69 }, - { 76, 75, 74, 73, 72, 71, 70 }, - { 77, 78, 79, 80, 81, 82, 83 }, - { 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 } -}, { - { 16, 16},{ 34, 16},{ 49, 16},{ 64, 16},{ 79, 16},{ 94, 16},{ 109, 16}, - { 109, 31},{ 94, 31},{ 79, 31},{ 64, 31},{ 49, 31},{ 34, 31},{ 16, 31}, - { 16, 46},{ 34, 46},{ 49, 46},{ 64, 46},{ 79, 46},{ 94, 46},{ 109, 46}, - { 109, 61},{ 94, 61},{ 79, 61},{ 64, 61},{ 49, 61},{ 34, 61},{ 16, 61}, - { 16, 76},{ 34, 76},{ 49, 76},{ 64, 76},{ 83, 72},{ 98, 72},{ 113, 72}, - { 97, 5},{ 91, 5},{ 86, 5},{ 80, 5},{ 75, 5},{ 69, 5},{ 63, 5},{ 58, 5},{ 52, 5},{ 46, 5},{ 41, 5},{ 35, 5},{ 30, 5},{ 24, 5}, - { 240, 16},{ 222, 16},{ 207, 16},{ 192, 16},{ 177, 16},{ 162, 16},{ 147, 16}, - { 147, 31},{ 162, 31},{ 177, 31},{ 192, 31},{ 207, 31},{ 222, 31},{ 240, 31}, - { 240, 46},{ 222, 46},{ 207, 46},{ 192, 46},{ 177, 46},{ 162, 46},{ 147, 46}, - { 147, 61},{ 162, 61},{ 177, 61},{ 192, 61},{ 207, 61},{ 222, 61},{ 240, 61}, - { 240, 76},{ 222, 76},{ 207, 76},{ 192, 76},{ 180, 72},{ 165, 72},{ 150, 72}, - { 159, 5},{ 164, 5},{ 170, 5},{ 176, 5},{ 181, 5},{ 187, 5},{ 192, 5},{ 198, 5},{ 204, 5},{ 209, 5},{ 215, 5},{ 221, 5},{ 226, 5},{ 232, 5}, -}, { - 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, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 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, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -} }; -// clang-format on -#endif - void keyboard_post_init_kb(void) { touch_encoder_init(); transaction_register_rpc(TOUCH_ENCODER_SYNC, touch_encoder_slave_sync); diff --git a/keyboards/rgbkb/sol/rev1/keyboard.json b/keyboards/rgbkb/sol/rev1/keyboard.json index 9a4c538e55..6bb41e1c37 100644 --- a/keyboards/rgbkb/sol/rev1/keyboard.json +++ b/keyboards/rgbkb/sol/rev1/keyboard.json @@ -63,7 +63,79 @@ "solid_multisplash": true }, "center_point": [112, 35], - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 21, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 38, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 73, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 91, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 112, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 18, "flags": 1}, + {"matrix": [1, 1], "x": 21, "y": 18, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 18, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 18, "flags": 4}, + {"matrix": [1, 4], "x": 73, "y": 18, "flags": 4}, + {"matrix": [1, 5], "x": 91, "y": 18, "flags": 4}, + {"matrix": [1, 6], "x": 108, "y": 13, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 35, "flags": 1}, + {"matrix": [2, 1], "x": 21, "y": 35, "flags": 4}, + {"matrix": [2, 2], "x": 38, "y": 35, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 35, "flags": 4}, + {"matrix": [2, 4], "x": 73, "y": 35, "flags": 4}, + {"matrix": [2, 5], "x": 91, "y": 35, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 31, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 52, "flags": 1}, + {"matrix": [3, 1], "x": 21, "y": 52, "flags": 4}, + {"matrix": [3, 2], "x": 38, "y": 52, "flags": 4}, + {"matrix": [3, 3], "x": 56, "y": 52, "flags": 4}, + {"matrix": [3, 4], "x": 73, "y": 52, "flags": 4}, + {"matrix": [3, 5], "x": 91, "y": 52, "flags": 4}, + {"matrix": [3, 6], "x": 108, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 70, "flags": 1}, + {"matrix": [4, 1], "x": 21, "y": 70, "flags": 1}, + {"matrix": [4, 2], "x": 38, "y": 70, "flags": 1}, + {"matrix": [4, 3], "x": 56, "y": 70, "flags": 1}, + {"matrix": [4, 4], "x": 73, "y": 70, "flags": 1}, + {"matrix": [5, 5], "x": 89, "y": 91, "flags": 1}, + {"matrix": [5, 6], "x": 101, "y": 103, "flags": 1}, + {"matrix": [6, 0], "x": 224, "y": 0, "flags": 1}, + {"matrix": [6, 1], "x": 203, "y": 0, "flags": 4}, + {"matrix": [6, 2], "x": 186, "y": 0, "flags": 4}, + {"matrix": [6, 3], "x": 168, "y": 0, "flags": 4}, + {"matrix": [6, 4], "x": 151, "y": 0, "flags": 4}, + {"matrix": [6, 5], "x": 133, "y": 0, "flags": 4}, + {"matrix": [6, 6], "x": 112, "y": 0, "flags": 1}, + {"matrix": [7, 0], "x": 224, "y": 18, "flags": 1}, + {"matrix": [7, 1], "x": 203, "y": 18, "flags": 4}, + {"matrix": [7, 2], "x": 186, "y": 18, "flags": 4}, + {"matrix": [7, 3], "x": 168, "y": 18, "flags": 4}, + {"matrix": [7, 4], "x": 151, "y": 18, "flags": 4}, + {"matrix": [7, 5], "x": 133, "y": 18, "flags": 4}, + {"matrix": [7, 6], "x": 116, "y": 13, "flags": 1}, + {"matrix": [8, 0], "x": 224, "y": 35, "flags": 1}, + {"matrix": [8, 1], "x": 203, "y": 35, "flags": 4}, + {"matrix": [8, 2], "x": 186, "y": 35, "flags": 4}, + {"matrix": [8, 3], "x": 168, "y": 35, "flags": 4}, + {"matrix": [8, 4], "x": 151, "y": 35, "flags": 4}, + {"matrix": [8, 5], "x": 133, "y": 35, "flags": 4}, + {"matrix": [8, 6], "x": 116, "y": 31, "flags": 1}, + {"matrix": [9, 0], "x": 224, "y": 52, "flags": 1}, + {"matrix": [9, 1], "x": 203, "y": 52, "flags": 4}, + {"matrix": [9, 2], "x": 186, "y": 52, "flags": 4}, + {"matrix": [9, 3], "x": 168, "y": 52, "flags": 4}, + {"matrix": [9, 4], "x": 151, "y": 52, "flags": 4}, + {"matrix": [9, 5], "x": 133, "y": 52, "flags": 4}, + {"matrix": [9, 6], "x": 116, "y": 48, "flags": 1}, + {"matrix": [10, 0], "x": 224, "y": 70, "flags": 1}, + {"matrix": [10, 1], "x": 203, "y": 70, "flags": 1}, + {"matrix": [10, 2], "x": 186, "y": 70, "flags": 1}, + {"matrix": [10, 3], "x": 168, "y": 70, "flags": 1}, + {"matrix": [10, 4], "x": 151, "y": 70, "flags": 1}, + {"matrix": [11, 6], "x": 135, "y": 91, "flags": 1}, + {"x": 123, "y": 103, "flags": 1} + ] }, "rgblight": { "animations": { diff --git a/keyboards/rgbkb/sol/rev1/rev1.c b/keyboards/rgbkb/sol/rev1/rev1.c deleted file mode 100644 index f5997bac00..0000000000 --- a/keyboards/rgbkb/sol/rev1/rev1.c +++ /dev/null @@ -1,46 +0,0 @@ -#include "sol.h" - -#ifdef RGB_MATRIX_ENABLE -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 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 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, 68 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 } -}, { - // Left Hand Mapped Left to Right - { 0, 0 }, { 21, 0 }, { 38, 0 }, { 56, 0 }, { 73, 0 }, { 91, 0 }, { 112, 0 }, - { 0, 18 }, { 21, 18 }, { 38, 18 }, { 56, 18 }, { 73, 18 }, { 91, 18 }, { 108, 13 }, - { 0, 35 }, { 21, 35 }, { 38, 35 }, { 56, 35 }, { 73, 35 }, { 91, 35 }, { 108, 31 }, - { 0, 52 }, { 21, 52 }, { 38, 52 }, { 56, 52 }, { 73, 52 }, { 91, 52 }, { 108, 48 }, - { 0, 70 }, { 21, 70 }, { 38, 70 }, { 56, 70 }, { 73, 70 }, { 89, 91 }, { 101, 103 }, - // Left Hand Mapped Right to Left - { 224, 0 }, { 203, 0 }, { 186, 0 }, { 168, 0 }, { 151, 0 }, { 133, 0 }, { 112, 0 }, - { 224, 18 }, { 203, 18 }, { 186, 18 }, { 168, 18 }, { 151, 18 }, { 133, 18 }, { 116, 13 }, - { 224, 35 }, { 203, 35 }, { 186, 35 }, { 168, 35 }, { 151, 35 }, { 133, 35 }, { 116, 31 }, - { 224, 52 }, { 203, 52 }, { 186, 52 }, { 168, 52 }, { 151, 52 }, { 133, 52 }, { 116, 48 }, - { 224, 70 }, { 203, 70 }, { 186, 70 }, { 168, 70 }, { 151, 70 }, { 135, 91 }, { 123, 103 }, -}, { - // Left Hand Mapped Left to Right - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, - // Left Hand Mapped Right to Left - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1 -} }; - -#endif - diff --git a/keyboards/rgbkb/sol3/rev1/keyboard.json b/keyboards/rgbkb/sol3/rev1/keyboard.json index dc9e6d4035..f7780ae37a 100644 --- a/keyboards/rgbkb/sol3/rev1/keyboard.json +++ b/keyboards/rgbkb/sol3/rev1/keyboard.json @@ -96,6 +96,164 @@ }, "center_point": [81, 28], "driver": "ws2812", + "layout": [ + {"x": 1, "y": 6, "flags": 2}, + {"x": 1, "y": 13, "flags": 2}, + {"x": 1, "y": 19, "flags": 2}, + {"x": 1, "y": 25, "flags": 2}, + {"x": 1, "y": 31, "flags": 2}, + {"x": 1, "y": 37, "flags": 2}, + {"x": 1, "y": 43, "flags": 2}, + {"x": 1, "y": 49, "flags": 2}, + {"x": 4, "y": 52, "flags": 2}, + {"x": 11, "y": 52, "flags": 2}, + {"x": 17, "y": 52, "flags": 2}, + {"x": 23, "y": 52, "flags": 2}, + {"x": 29, "y": 52, "flags": 2}, + {"x": 35, "y": 52, "flags": 2}, + {"x": 41, "y": 54, "flags": 2}, + {"x": 46, "y": 57, "flags": 2}, + {"x": 52, "y": 60, "flags": 2}, + {"x": 57, "y": 63, "flags": 2}, + {"x": 62, "y": 66, "flags": 2}, + {"x": 68, "y": 69, "flags": 2}, + {"x": 73, "y": 67, "flags": 2}, + {"x": 76, "y": 62, "flags": 2}, + {"x": 79, "y": 57, "flags": 2}, + {"x": 78, "y": 51, "flags": 2}, + {"x": 77, "y": 45, "flags": 2}, + {"x": 76, "y": 39, "flags": 2}, + {"x": 76, "y": 33, "flags": 2}, + {"x": 76, "y": 27, "flags": 2}, + {"x": 76, "y": 21, "flags": 2}, + {"x": 76, "y": 14, "flags": 2}, + {"x": 76, "y": 8, "flags": 2}, + {"x": 72, "y": 3, "flags": 2}, + {"x": 59, "y": 3, "flags": 2}, + {"x": 53, "y": 3, "flags": 2}, + {"x": 46, "y": 3, "flags": 2}, + {"x": 40, "y": 3, "flags": 2}, + {"x": 34, "y": 3, "flags": 2}, + {"x": 28, "y": 3, "flags": 2}, + {"x": 22, "y": 3, "flags": 2}, + {"x": 10, "y": 3, "flags": 2}, + {"x": 3, "y": 3, "flags": 2}, + {"matrix": [0, 0], "x": 9, "y": 6, "flags": 1}, + {"matrix": [0, 1], "x": 21, "y": 6, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 6, "flags": 4}, + {"matrix": [0, 3], "x": 40, "y": 6, "flags": 4}, + {"matrix": [0, 4], "x": 49, "y": 6, "flags": 4}, + {"matrix": [0, 5], "x": 59, "y": 6, "flags": 4}, + {"matrix": [0, 6], "x": 71, "y": 6, "flags": 1}, + {"matrix": [1, 6], "x": 71, "y": 16, "flags": 1}, + {"matrix": [1, 5], "x": 59, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 49, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 30, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 21, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 9, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 9, "y": 25, "flags": 1}, + {"matrix": [2, 1], "x": 21, "y": 25, "flags": 4}, + {"matrix": [2, 2], "x": 30, "y": 25, "flags": 4}, + {"matrix": [2, 3], "x": 40, "y": 25, "flags": 4}, + {"matrix": [2, 4], "x": 49, "y": 25, "flags": 4}, + {"matrix": [2, 5], "x": 59, "y": 25, "flags": 4}, + {"matrix": [2, 6], "x": 71, "y": 25, "flags": 1}, + {"matrix": [3, 6], "x": 71, "y": 35, "flags": 1}, + {"matrix": [3, 5], "x": 59, "y": 35, "flags": 4}, + {"matrix": [3, 4], "x": 49, "y": 35, "flags": 4}, + {"matrix": [3, 3], "x": 40, "y": 35, "flags": 4}, + {"matrix": [3, 2], "x": 30, "y": 35, "flags": 4}, + {"matrix": [3, 1], "x": 21, "y": 35, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 35, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 44, "flags": 1}, + {"matrix": [4, 1], "x": 21, "y": 44, "flags": 1}, + {"matrix": [4, 2], "x": 30, "y": 44, "flags": 1}, + {"matrix": [4, 3], "x": 40, "y": 44, "flags": 1}, + {"matrix": [4, 4], "x": 49, "y": 44, "flags": 1}, + {"matrix": [4, 5], "x": 66, "y": 50, "flags": 1}, + {"matrix": [4, 6], "x": 75, "y": 54, "flags": 1}, + {"matrix": [4, 7], "x": 70, "y": 62, "flags": 1}, + {"x": 60, "y": 60, "flags": 1}, + {"x": 160, "y": 6, "flags": 2}, + {"x": 160, "y": 13, "flags": 2}, + {"x": 160, "y": 19, "flags": 2}, + {"x": 160, "y": 25, "flags": 2}, + {"x": 160, "y": 31, "flags": 2}, + {"x": 160, "y": 37, "flags": 2}, + {"x": 160, "y": 43, "flags": 2}, + {"x": 160, "y": 49, "flags": 2}, + {"x": 157, "y": 52, "flags": 2}, + {"x": 151, "y": 52, "flags": 2}, + {"x": 145, "y": 52, "flags": 2}, + {"x": 138, "y": 52, "flags": 2}, + {"x": 132, "y": 52, "flags": 2}, + {"x": 126, "y": 52, "flags": 2}, + {"x": 120, "y": 54, "flags": 2}, + {"x": 115, "y": 57, "flags": 2}, + {"x": 110, "y": 60, "flags": 2}, + {"x": 105, "y": 63, "flags": 2}, + {"x": 99, "y": 66, "flags": 2}, + {"x": 94, "y": 69, "flags": 2}, + {"x": 89, "y": 67, "flags": 2}, + {"x": 86, "y": 62, "flags": 2}, + {"x": 83, "y": 57, "flags": 2}, + {"x": 83, "y": 51, "flags": 2}, + {"x": 85, "y": 45, "flags": 2}, + {"x": 86, "y": 39, "flags": 2}, + {"x": 86, "y": 33, "flags": 2}, + {"x": 86, "y": 27, "flags": 2}, + {"x": 86, "y": 21, "flags": 2}, + {"x": 86, "y": 14, "flags": 2}, + {"x": 86, "y": 8, "flags": 2}, + {"x": 90, "y": 3, "flags": 2}, + {"x": 103, "y": 3, "flags": 2}, + {"x": 109, "y": 3, "flags": 2}, + {"x": 115, "y": 3, "flags": 2}, + {"x": 121, "y": 3, "flags": 2}, + {"x": 127, "y": 3, "flags": 2}, + {"x": 133, "y": 3, "flags": 2}, + {"x": 140, "y": 3, "flags": 2}, + {"x": 152, "y": 3, "flags": 2}, + {"x": 158, "y": 3, "flags": 2}, + {"matrix": [6, 0], "x": 153, "y": 6, "flags": 1}, + {"matrix": [6, 1], "x": 141, "y": 6, "flags": 4}, + {"matrix": [6, 2], "x": 131, "y": 6, "flags": 4}, + {"matrix": [6, 3], "x": 122, "y": 6, "flags": 4}, + {"matrix": [6, 4], "x": 112, "y": 6, "flags": 4}, + {"matrix": [6, 5], "x": 103, "y": 6, "flags": 4}, + {"matrix": [6, 6], "x": 91, "y": 6, "flags": 1}, + {"matrix": [7, 6], "x": 91, "y": 16, "flags": 1}, + {"matrix": [7, 5], "x": 103, "y": 16, "flags": 4}, + {"matrix": [7, 4], "x": 112, "y": 16, "flags": 4}, + {"matrix": [7, 3], "x": 122, "y": 16, "flags": 4}, + {"matrix": [7, 2], "x": 131, "y": 16, "flags": 4}, + {"matrix": [7, 1], "x": 141, "y": 16, "flags": 4}, + {"matrix": [7, 0], "x": 153, "y": 16, "flags": 1}, + {"matrix": [8, 0], "x": 153, "y": 25, "flags": 1}, + {"matrix": [8, 1], "x": 141, "y": 25, "flags": 4}, + {"matrix": [8, 2], "x": 131, "y": 25, "flags": 4}, + {"matrix": [8, 3], "x": 122, "y": 25, "flags": 4}, + {"matrix": [8, 4], "x": 112, "y": 25, "flags": 4}, + {"matrix": [8, 5], "x": 103, "y": 25, "flags": 4}, + {"matrix": [8, 6], "x": 91, "y": 25, "flags": 1}, + {"matrix": [9, 6], "x": 91, "y": 35, "flags": 1}, + {"matrix": [9, 5], "x": 103, "y": 35, "flags": 4}, + {"matrix": [9, 4], "x": 112, "y": 35, "flags": 4}, + {"matrix": [9, 3], "x": 122, "y": 35, "flags": 4}, + {"matrix": [9, 2], "x": 131, "y": 35, "flags": 4}, + {"matrix": [9, 1], "x": 141, "y": 35, "flags": 4}, + {"matrix": [9, 0], "x": 153, "y": 35, "flags": 1}, + {"matrix": [10, 0], "x": 153, "y": 44, "flags": 1}, + {"matrix": [10, 1], "x": 141, "y": 44, "flags": 1}, + {"matrix": [10, 2], "x": 131, "y": 44, "flags": 1}, + {"matrix": [10, 3], "x": 122, "y": 44, "flags": 1}, + {"matrix": [10, 4], "x": 112, "y": 44, "flags": 1}, + {"matrix": [10, 5], "x": 96, "y": 50, "flags": 1}, + {"matrix": [10, 6], "x": 87, "y": 54, "flags": 1}, + {"matrix": [10, 7], "x": 92, "y": 62, "flags": 1}, + {"x": 102, "y": 60, "flags": 1} + ], "led_flush_limit": 33, "led_process_limit": 10, "sleep": true, diff --git a/keyboards/rgbkb/sol3/rev1/rev1.c b/keyboards/rgbkb/sol3/rev1/rev1.c index 086ce0af01..96402f851c 100644 --- a/keyboards/rgbkb/sol3/rev1/rev1.c +++ b/keyboards/rgbkb/sol3/rev1/rev1.c @@ -81,63 +81,6 @@ void matrix_slave_scan_kb(void) { } #ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 41, 42, 43, 44, 45, 46, 47, NO_LED }, - { 54, 53, 52, 51, 50, 49, 48, NO_LED }, - { 55, 56, 57, 58, 59, 60, 61, NO_LED }, - { 68, 67, 66, 65, 64, 63, 62, NO_LED }, - { 69, 70, 71, 72, 73, 74, 75, 76 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { 119, 120, 121, 122, 123, 124, 125, NO_LED }, - { 132, 131, 130, 129, 128, 127, 126, NO_LED }, - { 133, 134, 135, 136, 137, 138, 139, NO_LED }, - { 146, 145, 144, 143, 142, 141, 140, NO_LED }, - { 147, 148, 149, 150, 151, 152, 153, 154 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } -}, { // ALL XY VALUES DIVIDE BY 2, THEN ADD 5 - { 1, 6 }, { 1, 13 }, { 1, 19 }, { 1, 25 }, { 1, 31 }, { 1, 37 }, { 1, 43 }, { 1, 49 }, { 4, 52 }, { 11, 52 }, - { 17, 52 }, { 23, 52 }, { 29, 52 }, { 35, 52 }, { 41, 54 }, { 46, 57 }, { 52, 60 }, { 57, 63 }, { 62, 66 }, { 68, 69 }, - { 73, 67 }, { 76, 62 }, { 79, 57 }, { 78, 51 }, { 77, 45 }, { 76, 39 }, { 76, 33 }, { 76, 27 }, { 76, 21 }, { 76, 14 }, - { 76, 8 }, { 72, 3 }, { 59, 3 }, { 53, 3 }, { 46, 3 }, { 40, 3 }, { 34, 3 }, { 28, 3 }, { 22, 3 }, { 10, 3 }, { 3, 3 }, - { 9, 6 }, { 21, 6 }, { 30, 6 }, { 40, 6 }, { 49, 6 }, { 59, 6 }, { 71, 6 }, - { 71, 16 }, { 59, 16 }, { 49, 16 }, { 40, 16 }, { 30, 16 }, { 21, 16 }, { 9, 16 }, - { 9, 25 }, { 21, 25 }, { 30, 25 }, { 40, 25 }, { 49, 25 }, { 59, 25 }, { 71, 25 }, - { 71, 35 }, { 59, 35 }, { 49, 35 }, { 40, 35 }, { 30, 35 }, { 21, 35 }, { 9, 35 }, - { 9, 44 }, { 21, 44 }, { 30, 44 }, { 40, 44 }, { 49, 44 }, { 66, 50 }, { 75, 54 }, { 70, 62 }, { 60, 60 }, - - { 160, 6 }, { 160, 13 }, { 160, 19 }, { 160, 25 }, { 160, 31 }, { 160, 37 }, { 160, 43 }, { 160, 49 }, { 157, 52 }, { 151, 52 }, - { 145, 52 }, { 138, 52 }, { 132, 52 }, { 126, 52 }, { 120, 54 }, { 115, 57 }, { 110, 60 }, { 105, 63 }, { 99, 66 }, { 94, 69 }, - { 89, 67 }, { 86, 62 }, { 83, 57 }, { 83, 51 }, { 85, 45 }, { 86, 39 }, { 86, 33 }, { 86, 27 }, { 86, 21 }, { 86, 14 }, - { 86, 8 }, { 90, 3 }, { 103, 3 }, { 109, 3 }, { 115, 3 }, { 121, 3 }, { 127, 3 }, { 133, 3 }, { 140, 3 }, { 152, 3 }, { 158, 3 }, - { 153, 6 }, { 141, 6 }, { 131, 6 }, { 122, 6 }, { 112, 6 }, { 103, 6 }, { 91, 6 }, - { 91, 16 }, { 103, 16 }, { 112, 16 }, { 122, 16 }, { 131, 16 }, { 141, 16 }, { 153, 16 }, - { 153, 25 }, { 141, 25 }, { 131, 25 }, { 122, 25 }, { 112, 25 }, { 103, 25 }, { 91, 25 }, - { 91, 35 }, { 103, 35 }, { 112, 35 }, { 122, 35 }, { 131, 35 }, { 141, 35 }, { 153, 35 }, - { 153, 44 }, { 141, 44 }, { 131, 44 }, { 122, 44 }, { 112, 44 }, { 96, 50 }, { 87, 54 }, { 92, 62 }, { 102, 60 }, -}, { - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1 -} }; -// clang-format on - void rgb_matrix_increase_flags(void) { switch (rgb_matrix_get_flags()) { From 2818085d3fffb645e1835326104534ee94b03fdb Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:08:20 -0600 Subject: [PATCH 21/95] Migrate `g_led_config` to DD (P) (#25622) --- keyboards/paprikman/albacore/albacore.c | 30 ----- keyboards/paprikman/albacore/keyboard.json | 10 ++ keyboards/percent/canoe_gen2/canoe_gen2.c | 119 ------------------ keyboards/percent/canoe_gen2/keyboard.json | 79 ++++++++++++ keyboards/phage_studio/pila87/keyboard.json | 93 ++++++++++++++ keyboards/phage_studio/pila87/pila87.c | 23 ---- .../phase_studio/titan65/hotswap/hotswap.c | 42 ------- .../titan65/hotswap/keyboard.json | 69 ++++++++++ keyboards/planck/light/keyboard.json | 51 ++++++++ keyboards/planck/light/light.c | 19 --- keyboards/planck/rev6/keyboard.json | 11 ++ keyboards/planck/rev6/rev6.c | 29 +---- keyboards/planck/rev6_drop/keyboard.json | 11 ++ keyboards/planck/rev6_drop/rev6_drop.c | 30 +---- keyboards/planck/rev7/keyboard.json | 11 ++ keyboards/planck/rev7/rev7.c | 30 +---- keyboards/preonic/rev3/keyboard.json | 13 +- keyboards/preonic/rev3/rev3.c | 29 ----- keyboards/preonic/rev3_drop/keyboard.json | 13 +- keyboards/preonic/rev3_drop/rev3_drop.c | 29 ----- 20 files changed, 362 insertions(+), 379 deletions(-) delete mode 100644 keyboards/paprikman/albacore/albacore.c delete mode 100644 keyboards/percent/canoe_gen2/canoe_gen2.c delete mode 100644 keyboards/phase_studio/titan65/hotswap/hotswap.c diff --git a/keyboards/paprikman/albacore/albacore.c b/keyboards/paprikman/albacore/albacore.c deleted file mode 100644 index b6cf742a11..0000000000 --- a/keyboards/paprikman/albacore/albacore.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2021 paprikman - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 0, 1, 2, 3 }, - { 7, 6, 5, 4 } -}, { - { 56, 16 }, { 112, 16 }, { 168, 16 }, { 224, 16 }, - { 56, 24 }, { 112, 24 }, { 168, 24 }, { 224, 24 } -}, { - 1, 1, 1, 1, - 1, 1, 1, 1 -} }; -#endif diff --git a/keyboards/paprikman/albacore/keyboard.json b/keyboards/paprikman/albacore/keyboard.json index 8706c67bcd..a2005221c3 100644 --- a/keyboards/paprikman/albacore/keyboard.json +++ b/keyboards/paprikman/albacore/keyboard.json @@ -10,6 +10,16 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 150, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 3], "x": 0, "y": 64, "flags": 1}, + {"matrix": [1, 2], "x": 75, "y": 64, "flags": 1}, + {"matrix": [1, 1], "x": 150, "y": 64, "flags": 1}, + {"matrix": [1, 0], "x": 224, "y": 64, "flags": 1} + ], "max_brightness": 220, "sleep": true }, diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.c b/keyboards/percent/canoe_gen2/canoe_gen2.c deleted file mode 100644 index 6cbbed412d..0000000000 --- a/keyboards/percent/canoe_gen2/canoe_gen2.c +++ /dev/null @@ -1,119 +0,0 @@ -/* -Copyright 2020 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" - -#ifdef RGB_MATRIX_ENABLE - -led_config_t g_led_config = { { - // Key Matrix to LED Index - // 15, 44, 46, 48, - // 74, 75, 76 - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16 }, - { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 13, 31 }, - { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 30, 45, 47 }, - { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }, - { 64, 65, 66, NO_LED, NO_LED, NO_LED, 67, NO_LED, NO_LED, 69, 70, NO_LED, 71, 72, 73 } -}, { - // LED Index to Physical Position - { 7, 8 }, // Esc - { 22, 8 }, // 1 - { 37, 8 }, // 2 - { 52, 8 }, // 3 - { 67, 8 }, // 4 - { 82, 8 }, // 5 - { 97, 8 }, // 6 - { 112, 8 }, // 7 - { 127, 8 }, // 8 - { 142, 8 }, // 9 - { 157, 8 }, // 0 - { 172, 8 }, // - - { 187, 8 }, // = - { 202, 8 }, // split bs - { 209, 8 }, // bs - { 217, 8 }, // split bs - { 231, 8 }, // ins - { 11, 24 }, // tab - { 30, 24 }, // q - { 45, 24 }, // w - { 60, 24 }, // e - { 75, 24 }, // r - { 90, 24 }, // t - { 104, 24 }, // y - { 119, 24 }, // u - { 134, 24 }, // i - { 149, 24 }, // o - { 164, 24 }, // p - { 179, 24 }, // [ - { 194, 24 }, // ] - { 212, 24 }, // backslash - { 231, 24 }, // del - { 11, 40 }, // caps - { 34, 40 }, // a - { 49, 40 }, // s - { 64, 40 }, // d - { 79, 40 }, // f - { 94, 40 }, // g - { 108, 40 }, // h - { 123, 40 }, // j - { 138, 40 }, // k - { 153, 40 }, // l - { 168, 40 }, // ; - { 183, 40 }, // ' - { 198, 40 }, // iso hash - { 200, 40 }, // ansi enter - { 215, 32 }, // iso enter - { 231, 40 }, // pgup - { 9, 56 }, // iso shift - { 17, 56 }, // ansi shift - { 26, 56 }, // iso nubs - { 41, 56 }, // z - { 56, 56 }, // x - { 71, 56 }, // c - { 86, 56 }, // v - { 101, 56 }, // b - { 116, 56 }, // n - { 131, 56 }, // m - { 146, 56 }, // , - { 161, 56 }, // . - { 175, 56 }, // ? - { 196, 56 }, // shift - { 217, 56 }, // up - { 231, 56 }, // pgdn - { 10, 72 }, // ctrl - { 29, 72 }, // win - { 48, 72 }, // alt - { 103, 72 }, // space - { 112, 72 }, // space - { 161, 72 }, // alt - { 176, 72 }, // fn - { 202, 72 }, // left - { 217, 72 }, // down - { 231, 72 }, // right - { 7, 40 }, // top 1 - { 119, 40 }, // top 2 - { 231, 40 } // top 3 -}, { - // LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, - 2, 2, 2 -} }; -#endif diff --git a/keyboards/percent/canoe_gen2/keyboard.json b/keyboards/percent/canoe_gen2/keyboard.json index b6a8a47a5f..45e1817ad5 100644 --- a/keyboards/percent/canoe_gen2/keyboard.json +++ b/keyboards/percent/canoe_gen2/keyboard.json @@ -61,6 +61,85 @@ "pixel_fractal": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 16, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 16, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 16, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 16, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 16, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 16, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 16, "flags": 4}, + {"matrix": [0, 8], "x": 120, "y": 16, "flags": 4}, + {"matrix": [0, 9], "x": 135, "y": 16, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 16, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 16, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 195, "y": 16, "flags": 4}, + {"matrix": [0, 13], "x": 210, "y": 16, "flags": 1}, + {"x": 217, "y": 16, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 28, "flags": 1}, + {"matrix": [1, 1], "x": 23, "y": 28, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 28, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 28, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 28, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 28, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 28, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 28, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 28, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 28, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 28, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 28, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 206, "y": 28, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 28, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 40, "flags": 1}, + {"matrix": [2, 1], "x": 26, "y": 40, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 40, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 40, "flags": 4}, + {"matrix": [2, 4], "x": 71, "y": 40, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 40, "flags": 4}, + {"matrix": [2, 6], "x": 101, "y": 40, "flags": 4}, + {"matrix": [2, 7], "x": 116, "y": 40, "flags": 4}, + {"matrix": [2, 8], "x": 131, "y": 40, "flags": 4}, + {"matrix": [2, 9], "x": 146, "y": 40, "flags": 4}, + {"matrix": [2, 10], "x": 161, "y": 40, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 40, "flags": 4}, + {"x": 192, "y": 40, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 40, "flags": 1}, + {"x": 209, "y": 40, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 40, "flags": 1}, + {"x": 5, "y": 52, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 52, "flags": 1}, + {"matrix": [3, 1], "x": 15, "y": 52, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 52, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 52, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 52, "flags": 4}, + {"matrix": [3, 5], "x": 79, "y": 52, "flags": 4}, + {"matrix": [3, 6], "x": 94, "y": 52, "flags": 4}, + {"matrix": [3, 7], "x": 109, "y": 52, "flags": 4}, + {"matrix": [3, 8], "x": 124, "y": 52, "flags": 4}, + {"matrix": [3, 9], "x": 139, "y": 52, "flags": 4}, + {"matrix": [3, 10], "x": 154, "y": 52, "flags": 4}, + {"matrix": [3, 11], "x": 169, "y": 52, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 52, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 52, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 52, "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": 96, "y": 64, "flags": 4}, + {"x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 133, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 152, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"x": 220, "y": 0, "flags": 2}, + {"x": 222, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2} + ], "max_brightness": 150, "sleep": true }, diff --git a/keyboards/phage_studio/pila87/keyboard.json b/keyboards/phage_studio/pila87/keyboard.json index fbdf5f637a..135a4f0a81 100644 --- a/keyboards/phage_studio/pila87/keyboard.json +++ b/keyboards/phage_studio/pila87/keyboard.json @@ -62,6 +62,99 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 7], "x": 110, "y": 61, "flags": 4}, + {"matrix": [5, 6], "x": 104, "y": 61, "flags": 4}, + {"matrix": [5, 5], "x": 83, "y": 64, "flags": 4}, + {"matrix": [5, 4], "x": 65, "y": 61, "flags": 4}, + {"matrix": [5, 3], "x": 58, "y": 61, "flags": 4}, + {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 13], "x": 170, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 4}, + {"matrix": [3, 13], "x": 174, "y": 41, "flags": 1}, + {"matrix": [3, 11], "x": 153, "y": 41, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 41, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 41, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 41, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 41, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 41, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 41, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 41, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 41, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 41, "flags": 4}, + {"matrix": [3, 1], "x": 23, "y": 41, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 41, "flags": 8}, + {"matrix": [2, 0], "x": 3, "y": 29, "flags": 1}, + {"matrix": [2, 1], "x": 19, "y": 29, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 29, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 29, "flags": 4}, + {"matrix": [2, 4], "x": 58, "y": 29, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 29, "flags": 4}, + {"matrix": [2, 6], "x": 84, "y": 29, "flags": 4}, + {"matrix": [2, 7], "x": 97, "y": 29, "flags": 4}, + {"matrix": [2, 8], "x": 110, "y": 29, "flags": 4}, + {"matrix": [2, 9], "x": 123, "y": 29, "flags": 4}, + {"matrix": [2, 10], "x": 136, "y": 29, "flags": 4}, + {"matrix": [2, 11], "x": 149, "y": 29, "flags": 4}, + {"matrix": [2, 12], "x": 162, "y": 29, "flags": 4}, + {"matrix": [2, 13], "x": 179, "y": 29, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 29, "flags": 4}, + {"matrix": [2, 15], "x": 211, "y": 29, "flags": 4}, + {"matrix": [2, 16], "x": 224, "y": 29, "flags": 4}, + {"matrix": [1, 16], "x": 224, "y": 17, "flags": 4}, + {"matrix": [1, 15], "x": 211, "y": 17, "flags": 4}, + {"matrix": [1, 14], "x": 198, "y": 17, "flags": 4}, + {"matrix": [1, 13], "x": 175, "y": 17, "flags": 1}, + {"matrix": [1, 12], "x": 156, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 17, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 17, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 17, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 17, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 17, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 17, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 17, "flags": 4}, + {"matrix": [1, 1], "x": 13, "y": 17, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 17, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 26, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 39, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 65, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 97, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 110, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 123, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 143, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 156, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 169, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 182, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 8}, + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 4} + ], "max_brightness": 200 }, "processor": "STM32F103", diff --git a/keyboards/phage_studio/pila87/pila87.c b/keyboards/phage_studio/pila87/pila87.c index 619623cc09..927f349cf3 100644 --- a/keyboards/phage_studio/pila87/pila87.c +++ b/keyboards/phage_studio/pila87/pila87.c @@ -23,29 +23,6 @@ #include #include -led_config_t g_led_config = { { - { 75, NO_LED, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90 }, - { 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }, - { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28, NO_LED, NO_LED, NO_LED }, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, NO_LED, NO_LED, 26, NO_LED, 27, NO_LED }, - { 14, 13, 12, 11, 10, 9, 8, 7, NO_LED, NO_LED, 6, 5, 4, 3, 2, 1, 0 } -}, { - {224, 64}, {211, 64}, {198, 64}, {180, 64}, {164, 64}, {148, 64}, {131, 64}, {110, 61}, {104, 61}, {83 , 64}, {65 , 61}, {58 , 61}, {34 , 64}, {18 , 64}, {2 , 64}, - {8 , 52}, {29 , 52}, {42 , 52}, {55 , 52}, {68 , 52}, {81 , 52}, {94 , 52}, {107, 52}, {120, 52}, {133, 52}, {146, 52}, {170, 52}, {211, 52}, - {174, 41}, {153, 41}, {140, 41}, {127, 41}, {114, 41}, {101, 41}, {88 , 41}, {75 , 41}, {62 , 41}, {49 , 41}, {36 , 41}, {23 , 41}, {5 , 41}, - {3 , 29}, {19 , 29}, {32 , 29}, {45 , 29}, {58 , 29}, {71 , 29}, {84 , 29}, {97 , 29}, {110, 29}, {123, 29}, {136, 29}, {149, 29}, {162, 29}, {179, 29}, {198, 29}, {211, 29}, {224, 29}, - {224, 17}, {211, 17}, {198, 17}, {175, 17}, {156, 17}, {143, 17}, {130, 17}, {117, 17}, {104, 17}, {91 , 17}, {78 , 17}, {65 , 17}, {52 , 17}, {39 , 17}, {26 , 17}, {13 , 17}, {0 , 17}, - {0 , 0}, {26 , 0}, {39 , 0}, {52 , 0}, {65 , 0}, {84 , 0}, {97 , 0}, {110, 0}, {123, 0}, {143, 0}, {156, 0}, {169, 0}, {182, 0}, {198, 0}, {211, 0}, {224, 0}, -}, { - 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4, -} }; - bool process_record_kb(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QK_RGB_MATRIX_TOGGLE: diff --git a/keyboards/phase_studio/titan65/hotswap/hotswap.c b/keyboards/phase_studio/titan65/hotswap/hotswap.c deleted file mode 100644 index 1bcd581785..0000000000 --- a/keyboards/phase_studio/titan65/hotswap/hotswap.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - { 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, NO_LED, 65, 66 }, - { 51, NO_LED, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37 }, - { 23, NO_LED, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, NO_LED, 36 }, - { NO_LED, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, NO_LED, 11, 10, 9 }, - { 0, 1, NO_LED, 2, NO_LED, NO_LED, 3, NO_LED, NO_LED, NO_LED, 4, 5, NO_LED, 6, 7, 8 } - }, { - { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 150, 64 }, { 165, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 }, - { 224, 48 }, { 210, 48 }, { 189, 48 }, { 154, 48 }, { 139, 48 }, { 124, 48 }, { 109, 48 }, { 94, 48 }, { 79, 48 }, { 64, 48 }, { 49, 48 }, { 34, 48 }, { 22, 48 }, { 5, 48 }, - { 6, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 181, 32 }, { 201, 32 }, { 224, 32 }, - { 224, 16 }, { 206, 16 },{ 188, 16 }, { 173, 16 }, { 158, 16 }, { 143, 16 }, { 128, 16 }, { 113, 16 }, { 98, 16 }, { 83, 16 }, { 68, 16 }, { 53, 16 }, { 38, 16 }, { 22, 16 }, { 4, 16 }, - { 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 }, { 203, 0 }, { 224, 0 } - }, { - 1, 1, 1, 4, 1, 1, 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, 4, 1, 1, - 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, 4, 1, 1 - } -}; - -#endif diff --git a/keyboards/phase_studio/titan65/hotswap/keyboard.json b/keyboards/phase_studio/titan65/hotswap/keyboard.json index c9d1b0f726..599684322a 100644 --- a/keyboards/phase_studio/titan65/hotswap/keyboard.json +++ b/keyboards/phase_studio/titan65/hotswap/keyboard.json @@ -19,6 +19,75 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 39, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 165, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 15], "x": 224, "y": 64, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 210, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 189, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 22, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 5, "y": 48, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 181, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 1}, + {"matrix": [2, 15], "x": 224, "y": 32, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 16, "flags": 1}, + {"matrix": [1, 14], "x": 206, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 22, "y": 16, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 203, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1} + ], "max_brightness": 150, "sleep": true }, diff --git a/keyboards/planck/light/keyboard.json b/keyboards/planck/light/keyboard.json index 413c753f92..f445cca931 100644 --- a/keyboards/planck/light/keyboard.json +++ b/keyboards/planck/light/keyboard.json @@ -55,6 +55,57 @@ "solid_multisplash": true }, "driver": "is31fl3731", + "layout": [ + {"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": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4}, + {"matrix": [1, 11], "x": 223, "y": 21, "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": [3, 0], "x": 0, "y": 63, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 63, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 63, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 63, "flags": 1}, + {"matrix": [3, 4], "x": 81, "y": 63, "flags": 1}, + {"matrix": [3, 5], "x": 101, "y": 63, "flags": 4}, + {"x": 111, "y": 63, "flags": 4}, + {"matrix": [3, 6], "x": 122, "y": 63, "flags": 4}, + {"matrix": [3, 7], "x": 142, "y": 63, "flags": 1}, + {"matrix": [3, 8], "x": 162, "y": 63, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 63, "flags": 1}, + {"matrix": [3, 10], "x": 203, "y": 63, "flags": 1}, + {"matrix": [3, 11], "x": 223, "y": 63, "flags": 1} + ], "sleep": true }, "features": { diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c index 43487e2e21..97ea06c467 100644 --- a/keyboards/planck/light/light.c +++ b/keyboards/planck/light/light.c @@ -77,25 +77,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C9_14, C8_14, C7_14} }; -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, 43, 44, 45, 46, 47, 48 } -}, { - { 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 }, - { 0, 21 }, { 20, 21 }, { 40, 21 }, { 61, 21 }, { 81, 21 }, { 101, 21 }, { 122, 21 }, { 142, 21 }, { 162, 21 }, { 183, 21 }, { 203, 21 }, { 223, 21 }, - { 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 }, - { 0, 63 }, { 20, 63 }, { 40, 63 }, { 61, 63 }, { 81, 63 }, { 101, 63 }, { 111, 63 }, { 122, 63 }, { 142, 63 }, { 162, 63 }, { 183, 63 }, { 203, 63 }, - { 223, 63 } -}, { - 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, - 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, - 1 -} }; - void matrix_init_kb(void) { // Turn status LED on diff --git a/keyboards/planck/rev6/keyboard.json b/keyboards/planck/rev6/keyboard.json index b0028795fe..aee39c8b3a 100644 --- a/keyboards/planck/rev6/keyboard.json +++ b/keyboards/planck/rev6/keyboard.json @@ -17,6 +17,17 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [7, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [3, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [3, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [7, 4], "x": 77, "y": 60, "flags": 255} + ], "sleep": true }, "features": { diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c index 49f7d83123..e8439b1705 100644 --- a/keyboards/planck/rev6/rev6.c +++ b/keyboards/planck/rev6/rev6.c @@ -15,33 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, - { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 4, NO_LED, NO_LED, 3, 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, 1, NO_LED, NO_LED, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 - -#endif - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { @@ -49,7 +22,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, - + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/planck/rev6_drop/keyboard.json b/keyboards/planck/rev6_drop/keyboard.json index ff301f8c86..4f089f83f3 100644 --- a/keyboards/planck/rev6_drop/keyboard.json +++ b/keyboards/planck/rev6_drop/keyboard.json @@ -29,6 +29,17 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [7, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [3, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [3, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [7, 4], "x": 77, "y": 60, "flags": 255} + ], "sleep": true }, "matrix_pins": { diff --git a/keyboards/planck/rev6_drop/rev6_drop.c b/keyboards/planck/rev6_drop/rev6_drop.c index 8f613851dc..e8439b1705 100644 --- a/keyboards/planck/rev6_drop/rev6_drop.c +++ b/keyboards/planck/rev6_drop/rev6_drop.c @@ -15,34 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, - { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 4, NO_LED, NO_LED, 3, 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, 1, NO_LED, NO_LED, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 - -#endif - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { @@ -50,7 +22,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, - + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/planck/rev7/keyboard.json b/keyboards/planck/rev7/keyboard.json index 691394d5d5..3bc274b1fa 100644 --- a/keyboards/planck/rev7/keyboard.json +++ b/keyboards/planck/rev7/keyboard.json @@ -14,6 +14,17 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [7, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [3, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [3, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [7, 4], "x": 77, "y": 60, "flags": 255} + ], "sleep": true }, "matrix_pins": { diff --git a/keyboards/planck/rev7/rev7.c b/keyboards/planck/rev7/rev7.c index bb9d0ee1e8..09fd5901c2 100644 --- a/keyboards/planck/rev7/rev7.c +++ b/keyboards/planck/rev7/rev7.c @@ -15,34 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, - { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 4, NO_LED, NO_LED, 3, 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, 1, NO_LED, NO_LED, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 - -#endif - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { @@ -50,7 +22,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, - + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, diff --git a/keyboards/preonic/rev3/keyboard.json b/keyboards/preonic/rev3/keyboard.json index 96cebf9ea0..9babc119b0 100644 --- a/keyboards/preonic/rev3/keyboard.json +++ b/keyboards/preonic/rev3/keyboard.json @@ -26,7 +26,18 @@ "driver": "pwm" }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [9, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [8, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [8, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [9, 4], "x": 77, "y": 60, "flags": 255} + ] }, "features": { "audio": true, diff --git a/keyboards/preonic/rev3/rev3.c b/keyboards/preonic/rev3/rev3.c index 5a751cbba5..12a11c98eb 100644 --- a/keyboards/preonic/rev3/rev3.c +++ b/keyboards/preonic/rev3/rev3.c @@ -15,35 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, 4, NO_LED, NO_LED, 3, 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, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 -#endif - - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/preonic/rev3_drop/keyboard.json b/keyboards/preonic/rev3_drop/keyboard.json index 22374fa5f7..ece6bf32f9 100644 --- a/keyboards/preonic/rev3_drop/keyboard.json +++ b/keyboards/preonic/rev3_drop/keyboard.json @@ -44,7 +44,18 @@ "driver": "pwm" }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [2, 5], "x": 112, "y": 39, "flags": 255}, + {"matrix": [9, 1], "x": 148, "y": 60, "flags": 255}, + {"matrix": [8, 4], "x": 206, "y": 53, "flags": 255}, + {"matrix": [4, 4], "x": 206, "y": 3, "flags": 255}, + {"matrix": [4, 1], "x": 150, "y": 3, "flags": 255}, + {"matrix": [0, 4], "x": 74, "y": 3, "flags": 255}, + {"matrix": [0, 1], "x": 18, "y": 3, "flags": 255}, + {"matrix": [8, 1], "x": 18, "y": 54, "flags": 255}, + {"matrix": [9, 4], "x": 77, "y": 60, "flags": 255} + ] }, "matrix_pins": { "cols": ["B11", "B10", "B2", "B1", "A7", "B0"], diff --git a/keyboards/preonic/rev3_drop/rev3_drop.c b/keyboards/preonic/rev3_drop/rev3_drop.c index 5a751cbba5..12a11c98eb 100644 --- a/keyboards/preonic/rev3_drop/rev3_drop.c +++ b/keyboards/preonic/rev3_drop/rev3_drop.c @@ -15,35 +15,6 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { NO_LED, 4, NO_LED, NO_LED, 3, 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, 7, NO_LED, NO_LED, 2, NO_LED }, - { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED }, -}, { - // LED Index to Physical Position - {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; - -// LED physical location index -// 6 5 4 3 -// 0 -// 7 8 1 2 -#endif - - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { From ff1900190c166d28f8d903ea7bf723658780d192 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:08:42 -0600 Subject: [PATCH 22/95] Migrate `g_led_config` to DD (NO) (#25621) --- keyboards/nack/keyboard.json | 54 +++++++++++ keyboards/nack/nack.c | 39 -------- .../ning/tiny_board/tb16_rgb/keyboard.json | 20 ++++- keyboards/ning/tiny_board/tb16_rgb/tb16_rgb.c | 31 ------- keyboards/novelkeys/nk20/keyboard.json | 22 +++++ keyboards/novelkeys/nk20/nk20.c | 40 --------- keyboards/novelkeys/nk65b/keyboard.json | 70 +++++++++++++++ keyboards/novelkeys/nk65b/nk65b.c | 24 ----- keyboards/novelkeys/nk87b/keyboard.json | 89 +++++++++++++++++++ keyboards/novelkeys/nk87b/nk87b.c | 27 ------ keyboards/omkbd/runner3680/5x6_5x8/5x6_5x8.c | 52 ----------- .../omkbd/runner3680/5x6_5x8/keyboard.json | 72 +++++++++++++++ keyboards/owlab/voice65/hotswap/hotswap.c | 23 ----- keyboards/owlab/voice65/hotswap/keyboard.json | 69 ++++++++++++++ .../owlab/voice65/soldered/keyboard.json | 73 +++++++++++++++ keyboards/owlab/voice65/soldered/soldered.c | 23 ----- 16 files changed, 468 insertions(+), 260 deletions(-) delete mode 100644 keyboards/nack/nack.c delete mode 100644 keyboards/ning/tiny_board/tb16_rgb/tb16_rgb.c delete mode 100644 keyboards/novelkeys/nk20/nk20.c delete mode 100644 keyboards/omkbd/runner3680/5x6_5x8/5x6_5x8.c diff --git a/keyboards/nack/keyboard.json b/keyboards/nack/keyboard.json index cd08aac0af..2368786530 100644 --- a/keyboards/nack/keyboard.json +++ b/keyboards/nack/keyboard.json @@ -73,6 +73,60 @@ "val": 64 }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 19, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 38, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 57, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 76, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 95, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 114, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 133, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 152, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 171, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 190, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 209, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 223, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 19, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 57, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 76, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 95, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 114, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 133, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 152, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 171, "y": 21, "flags": 4}, + {"matrix": [1, 10], "x": 190, "y": 21, "flags": 4}, + {"matrix": [1, 11], "x": 209, "y": 21, "flags": 4}, + {"matrix": [1, 12], "x": 223, "y": 21, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 4}, + {"matrix": [2, 1], "x": 19, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 38, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 57, "y": 42, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 95, "y": 42, "flags": 4}, + {"matrix": [2, 6], "x": 114, "y": 42, "flags": 4}, + {"matrix": [2, 7], "x": 133, "y": 42, "flags": 4}, + {"matrix": [2, 8], "x": 152, "y": 42, "flags": 4}, + {"matrix": [2, 9], "x": 171, "y": 42, "flags": 4}, + {"matrix": [2, 10], "x": 190, "y": 42, "flags": 4}, + {"matrix": [2, 11], "x": 209, "y": 42, "flags": 4}, + {"matrix": [2, 12], "x": 223, "y": 42, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 63, "flags": 4}, + {"matrix": [3, 1], "x": 19, "y": 63, "flags": 4}, + {"matrix": [3, 2], "x": 38, "y": 63, "flags": 4}, + {"matrix": [3, 3], "x": 57, "y": 63, "flags": 4}, + {"matrix": [3, 4], "x": 76, "y": 63, "flags": 4}, + {"matrix": [3, 5], "x": 95, "y": 63, "flags": 4}, + {"matrix": [3, 6], "x": 114, "y": 63, "flags": 4}, + {"matrix": [3, 7], "x": 133, "y": 63, "flags": 4}, + {"matrix": [3, 8], "x": 152, "y": 63, "flags": 4}, + {"matrix": [3, 9], "x": 171, "y": 63, "flags": 4}, + {"matrix": [3, 10], "x": 190, "y": 63, "flags": 4}, + {"matrix": [3, 11], "x": 209, "y": 63, "flags": 4}, + {"matrix": [3, 12], "x": 223, "y": 63, "flags": 4} + ], "hue_steps": 10, "sat_steps": 10, "val_steps": 10, diff --git a/keyboards/nack/nack.c b/keyboards/nack/nack.c deleted file mode 100644 index 27e029a9fd..0000000000 --- a/keyboards/nack/nack.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2020 farfalleflickan - * - * 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 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, 31, 32, 33, 34, 35, 36, 37, 38 }, - { 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 } - }, { - // LED Index to Physical Position - { 0, 0 }, { 19, 0 }, { 38, 0 }, { 57, 0 }, { 76, 0 }, { 95, 0 }, { 114, 0 }, { 133, 0 }, { 152, 0 }, { 171, 0 }, { 190, 0 }, { 209, 0 }, { 223, 0 }, - { 0, 21 }, { 19, 21 }, { 38, 21 }, { 57, 21 }, { 76, 21 }, { 95, 21 }, { 114, 21 }, { 133, 21 }, { 152, 21 }, { 171, 21 }, { 190, 21 }, { 209, 21 }, { 223, 21 }, - { 0, 42 }, { 19, 42 }, { 38, 42 }, { 57, 42 }, { 76, 42 }, { 95, 42 }, { 114, 42 }, { 133, 42 }, { 152, 42 }, { 171, 42 }, { 190, 42 }, { 209, 42 }, { 223, 42 }, - { 0, 63 }, { 19, 63 }, { 38, 63 }, { 57, 63 }, { 76, 63 }, { 95, 63 }, { 114, 63 }, { 133, 63 }, { 152, 63 }, { 171, 63 }, { 190, 63 }, { 209, 63 }, { 223, 63 } - }, { - // 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, 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 diff --git a/keyboards/ning/tiny_board/tb16_rgb/keyboard.json b/keyboards/ning/tiny_board/tb16_rgb/keyboard.json index 9e99ef879a..104a4a84a6 100644 --- a/keyboards/ning/tiny_board/tb16_rgb/keyboard.json +++ b/keyboards/ning/tiny_board/tb16_rgb/keyboard.json @@ -20,7 +20,25 @@ "default": { "animation": "typing_heatmap" }, - "driver": "ws2812" + "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": 150, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 75, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 150, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 224, "y": 21, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 4}, + {"matrix": [2, 1], "x": 75, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 150, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 224, "y": 42, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 75, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 150, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 224, "y": 64, "flags": 4} + ] }, "matrix_pins": { "cols": ["B6", "B1", "B3", "B2"], diff --git a/keyboards/ning/tiny_board/tb16_rgb/tb16_rgb.c b/keyboards/ning/tiny_board/tb16_rgb/tb16_rgb.c deleted file mode 100644 index e7807be5e8..0000000000 --- a/keyboards/ning/tiny_board/tb16_rgb/tb16_rgb.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2023 Ning (@ningjx) - * - * 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" - -led_config_t g_led_config = { { - { 0, 1, 2, 3 }, - { 4, 5, 6, 7 }, - { 8, 9, 10, 11 }, - { 12, 13, 14, 15 } -}, { - {0,0},{75,0},{150,0},{224,0}, - {0,21},{75,21},{150,21},{224,21}, - {0,42},{75,42},{150,42},{224,42}, - {0,64},{75,64},{150,64},{224,64} -}, { - 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 -} }; diff --git a/keyboards/novelkeys/nk20/keyboard.json b/keyboards/novelkeys/nk20/keyboard.json index f2728967b4..e2560e0c30 100644 --- a/keyboards/novelkeys/nk20/keyboard.json +++ b/keyboards/novelkeys/nk20/keyboard.json @@ -66,6 +66,28 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 149, "y": 0, "flags": 1}, + {"matrix": [1, 3], "x": 224, "y": 15, "flags": 1}, + {"matrix": [1, 2], "x": 149, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 75, "y": 15, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 27, "flags": 4}, + {"matrix": [2, 1], "x": 75, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 149, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 224, "y": 34, "flags": 1}, + {"matrix": [3, 2], "x": 149, "y": 40, "flags": 4}, + {"matrix": [3, 1], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 40, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 52, "flags": 4}, + {"matrix": [4, 1], "x": 75, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 149, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 224, "y": 58, "flags": 1}, + {"matrix": [5, 2], "x": 149, "y": 64, "flags": 4}, + {"matrix": [5, 0], "x": 37, "y": 64, "flags": 4} + ], "max_brightness": 210, "sleep": true }, diff --git a/keyboards/novelkeys/nk20/nk20.c b/keyboards/novelkeys/nk20/nk20.c deleted file mode 100644 index 23350e1037..0000000000 --- a/keyboards/novelkeys/nk20/nk20.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright 2022 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" - -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 0, 1, 2, NO_LED }, - { 6, 5, 4, 3 }, - { 7, 8, 9, 10 }, - { 13, 12, 11, NO_LED }, - { 14, 15, 16, 17 }, - { 19, NO_LED, 18, NO_LED }, -}, { - { 0,0 }, { 75,0 }, {149,0 }, {224,15 }, {149,15 }, { 75,15 }, { 0,15 }, { 0,27 }, { 75,27 }, {149,27 }, - {224,34 }, {149,40 }, { 75,40 }, { 0,40 }, { 0,52 }, { 75,52 }, {149,52 }, {224,58 }, {149,64 }, { 37,64 } -}, { - 1, 1, 1, - 1, 1, 1, 1, - 4, 4, 4, 1, - 4, 4, 4, - 4, 4, 4, 1, - 4, 4 -} }; -// clang-format on -#endif diff --git a/keyboards/novelkeys/nk65b/keyboard.json b/keyboards/novelkeys/nk65b/keyboard.json index 0c2794c120..74204a4413 100755 --- a/keyboards/novelkeys/nk65b/keyboard.json +++ b/keyboards/novelkeys/nk65b/keyboard.json @@ -66,6 +66,76 @@ "solid_multisplash": true }, "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 225, "y": 0, "flags": 1}, + {"matrix": [1, 14], "x": 225, "y": 16, "flags": 1}, + {"matrix": [2, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 201, "y": 32, "flags": 1}, + {"matrix": [2, 14], "x": 225, "y": 32, "flags": 1}, + {"matrix": [3, 14], "x": 225, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 9, "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, 9], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 165, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 180, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 210, "y": 64, "flags": 1}, + {"x": 225, "y": 64, "flags": 1} + ], "max_brightness": 130, "sleep": true }, diff --git a/keyboards/novelkeys/nk65b/nk65b.c b/keyboards/novelkeys/nk65b/nk65b.c index 369bab262f..400ab35ef3 100755 --- a/keyboards/novelkeys/nk65b/nk65b.c +++ b/keyboards/novelkeys/nk65b/nk65b.c @@ -28,27 +28,3 @@ layer_state_t layer_state_set_kb(layer_state_t state) { gpio_write_pin(B3, !layer_state_cmp(state, 2)); return layer_state_set_user(state); } - -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, NO_LED, 15 }, - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 16, 43 }, - { 57, NO_LED, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44 }, - { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 61, 62, 63, 64, 65, 66 } -}, { - { 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 }, {203,0 }, - {225,0 }, {225,16 }, {206,16 }, {188,16 }, {173,16 }, {158,16 }, {143,16 }, {128,16 }, {113,16 }, { 98,16 }, { 83,16 }, { 68,16 }, { 53,16 }, { 38,16 }, - { 23,16 }, { 4,16 }, { 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 }, {225,48 }, {210,48 }, {189,48 }, {169,48 }, {154,48 }, {139,48 }, {124,48 }, {109,48 }, { 94,48 }, { 79,48 }, { 64,48 }, { 49,48 }, - { 34,48 }, { 9,48 }, { 2,64 }, { 21,64 }, { 39,64 }, { 96,64 }, {150,64 }, {165,64 }, {180,64 }, {195,64 }, {210,64 }, {225,64 } -}, { - 1, 4, 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, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 -} }; -// clang-format on -#endif diff --git a/keyboards/novelkeys/nk87b/keyboard.json b/keyboards/novelkeys/nk87b/keyboard.json index 563f502aae..2213dfa86d 100755 --- a/keyboards/novelkeys/nk87b/keyboard.json +++ b/keyboards/novelkeys/nk87b/keyboard.json @@ -66,6 +66,95 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 55, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 71, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 97, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 127, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 153, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 166, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 182, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 16], "x": 224, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 13], "x": 175, "y": 15, "flags": 1}, + {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 27, "flags": 1}, + {"matrix": [2, 1], "x": 19, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 58, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 84, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 97, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 110, "y": 27, "flags": 4}, + {"matrix": [2, 9], "x": 123, "y": 27, "flags": 4}, + {"matrix": [2, 10], "x": 136, "y": 27, "flags": 4}, + {"matrix": [2, 11], "x": 149, "y": 27, "flags": 4}, + {"matrix": [2, 12], "x": 162, "y": 27, "flags": 4}, + {"matrix": [3, 12], "x": 179, "y": 27, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 27, "flags": 1}, + {"matrix": [2, 15], "x": 211, "y": 27, "flags": 1}, + {"matrix": [2, 16], "x": 224, "y": 27, "flags": 1}, + {"matrix": [3, 13], "x": 174, "y": 40, "flags": 1}, + {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1}, + {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4}, + {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4}, + {"matrix": [4, 12], "x": 170, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1}, + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 179, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 162, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 146, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 91, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 36, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 19, "y": 64, "flags": 1}, + {"matrix": [5, 0], "x": 3, "y": 64, "flags": 1} + ], "max_brightness": 114, "sleep": true }, diff --git a/keyboards/novelkeys/nk87b/nk87b.c b/keyboards/novelkeys/nk87b/nk87b.c index 125b5d7404..9cd36e745f 100644 --- a/keyboards/novelkeys/nk87b/nk87b.c +++ b/keyboards/novelkeys/nk87b/nk87b.c @@ -29,30 +29,3 @@ layer_state_t layer_state_set_kb(layer_state_t state) { gpio_write_pin(A4, !layer_state_cmp(state, 2)); return layer_state_set_user(state); } - -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, - { 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17 }, - { 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, NO_LED, 48, 49, 50 }, - { 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 47, 51, NO_LED, NO_LED, NO_LED }, - { 64, NO_LED, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, NO_LED, NO_LED, 76, NO_LED }, - { 86, 85, 84, NO_LED, NO_LED, NO_LED, 83, NO_LED, NO_LED, NO_LED, NO_LED, 82, 81, 80, 79, 78, 77 }, -}, { - { 0,0 }, { 16,0 }, { 29,0 }, { 42,0 }, { 55,0 }, { 71,0 }, { 84,0 }, { 97,0 }, {110,0 }, {127,0 }, {140,0 }, {153,0 }, {166,0 }, {182,0 }, {198,0 }, {211,0 }, {224,0 }, - {224,15 }, {211,15 }, {198,15 }, {175,15 }, {156,15 }, {143,15 }, {130,15 }, {117,15 }, {104,15 }, { 91,15 }, { 78,15 }, { 65,15 }, { 52,15 }, { 39,15 }, { 26,15 }, { 13,15 }, { 0,15 }, - { 3,27 }, { 19,27 }, { 32,27 }, { 45,27 }, { 58,27 }, { 71,27 }, { 84,27 }, { 97,27 }, {110,27 }, {123,27 }, {136,27 }, {149,27 }, {162,27 }, {179,27 }, {198,27 }, {211,27 }, {224,27 }, - {174,40 }, {153,40 }, {140,40 }, {127,40 }, {114,40 }, {101,40 }, { 88,40 }, { 75,40 }, { 62,40 }, { 49,40 }, { 36,40 }, { 23,40 }, { 5,40 }, { 8,52 }, { 29,52 }, { 42,52 }, { 55,52 }, - { 68,52 }, { 81,52 }, { 94,52 }, {107,52 }, {120,52 }, {133,52 }, {146,52 }, {170,52 }, {211,52 }, {224,64 }, {211,64 }, {198,64 }, {179,64 }, {162,64 }, {146,64 }, { 91,64 }, { 36,64 }, - { 19,64 }, { 3,64 } -}, { - 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 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, 1, 1, - 1, 1, 1, 1, 1, 1, 4, 1, 1, 1 -} }; -// clang-format on -#endif diff --git a/keyboards/omkbd/runner3680/5x6_5x8/5x6_5x8.c b/keyboards/omkbd/runner3680/5x6_5x8/5x6_5x8.c deleted file mode 100644 index 3fda310364..0000000000 --- a/keyboards/omkbd/runner3680/5x6_5x8/5x6_5x8.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2021 omkbd - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { NO_LED, NO_LED, 5, 4, 3, 2, 1, 0 }, - { NO_LED, NO_LED, 6, 7, 8, 9, 10, 11 }, - { NO_LED, NO_LED, 17, 16, 15, 14, 13, 12 }, - { NO_LED, NO_LED, 18, 19, 20, 21, 22, 23 }, - { NO_LED, NO_LED, 29, 28, 27, 26, 25, 24 }, - { 37, 36, 35, 34, 33, 32, 31, 30 }, - { 38, 39, 40, 41, 42, 43, 44, 45 }, - { 53, 52, 51, 50, 49, 48, 47, 46 }, - { 54, 55, 56, 57, 58, 59, 60, 61 }, - { 69, 68, 67, 66, 65, 64, 63, 62 } -}, { - // LED Index to Physical Position - { 86, 0 }, { 69, 0 }, { 52, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, - { 0, 16 }, { 17, 16 }, { 34, 16 }, { 52, 16 }, { 69, 16 }, { 86, 16 }, - { 86, 32 }, { 69, 32 }, { 52, 32 }, { 34, 32 }, { 17, 32 }, { 0, 32 }, - { 0, 48 }, { 17, 48 }, { 34, 48 }, { 52, 48 }, { 69, 48 }, { 86, 48 }, - { 86, 64 }, { 69, 64 }, { 52, 64 }, { 34, 64 }, { 17, 64 }, { 0, 64 }, - { 103, 0 }, { 121, 0 }, { 138, 0 }, { 155, 0 }, { 172, 0 }, { 190, 0 }, { 207, 0 }, { 224, 0 }, - { 224, 16 }, { 207, 16 }, { 190, 16 }, { 172, 16 }, { 155, 16 }, { 138, 16 }, { 121, 16 }, { 103, 16 }, - { 103, 32 }, { 121, 32 }, { 138, 32 }, { 155, 32 }, { 172, 32 }, { 190, 32 }, { 207, 32 }, { 224, 32 }, - { 224, 48 }, { 207, 48 }, { 190, 48 }, { 172, 48 }, { 155, 48 }, { 138, 48 }, { 121, 48 }, { 103, 48 }, - { 103, 64 }, { 121, 64 }, { 138, 64 }, { 155, 64 }, { 172, 64 }, { 190, 64 }, { 207, 64 }, { 224, 64 } -}, { - // LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -} }; -#endif diff --git a/keyboards/omkbd/runner3680/5x6_5x8/keyboard.json b/keyboards/omkbd/runner3680/5x6_5x8/keyboard.json index 2d912a1445..2033b0330d 100644 --- a/keyboards/omkbd/runner3680/5x6_5x8/keyboard.json +++ b/keyboards/omkbd/runner3680/5x6_5x8/keyboard.json @@ -15,6 +15,78 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [0, 7], "x": 86, "y": 0, "flags": 255}, + {"matrix": [0, 6], "x": 69, "y": 0, "flags": 255}, + {"matrix": [0, 5], "x": 52, "y": 0, "flags": 255}, + {"matrix": [0, 4], "x": 34, "y": 0, "flags": 255}, + {"matrix": [0, 3], "x": 17, "y": 0, "flags": 255}, + {"matrix": [0, 2], "x": 0, "y": 0, "flags": 255}, + {"matrix": [1, 2], "x": 0, "y": 16, "flags": 255}, + {"matrix": [1, 3], "x": 17, "y": 16, "flags": 255}, + {"matrix": [1, 4], "x": 34, "y": 16, "flags": 255}, + {"matrix": [1, 5], "x": 52, "y": 16, "flags": 255}, + {"matrix": [1, 6], "x": 69, "y": 16, "flags": 255}, + {"matrix": [1, 7], "x": 86, "y": 16, "flags": 255}, + {"matrix": [2, 7], "x": 86, "y": 32, "flags": 255}, + {"matrix": [2, 6], "x": 69, "y": 32, "flags": 255}, + {"matrix": [2, 5], "x": 52, "y": 32, "flags": 255}, + {"matrix": [2, 4], "x": 34, "y": 32, "flags": 255}, + {"matrix": [2, 3], "x": 17, "y": 32, "flags": 255}, + {"matrix": [2, 2], "x": 0, "y": 32, "flags": 255}, + {"matrix": [3, 2], "x": 0, "y": 48, "flags": 255}, + {"matrix": [3, 3], "x": 17, "y": 48, "flags": 255}, + {"matrix": [3, 4], "x": 34, "y": 48, "flags": 255}, + {"matrix": [3, 5], "x": 52, "y": 48, "flags": 255}, + {"matrix": [3, 6], "x": 69, "y": 48, "flags": 255}, + {"matrix": [3, 7], "x": 86, "y": 48, "flags": 255}, + {"matrix": [4, 7], "x": 86, "y": 64, "flags": 255}, + {"matrix": [4, 6], "x": 69, "y": 64, "flags": 255}, + {"matrix": [4, 5], "x": 52, "y": 64, "flags": 255}, + {"matrix": [4, 4], "x": 34, "y": 64, "flags": 255}, + {"matrix": [4, 3], "x": 17, "y": 64, "flags": 255}, + {"matrix": [4, 2], "x": 0, "y": 64, "flags": 255}, + {"matrix": [5, 7], "x": 103, "y": 0, "flags": 255}, + {"matrix": [5, 6], "x": 121, "y": 0, "flags": 255}, + {"matrix": [5, 5], "x": 138, "y": 0, "flags": 255}, + {"matrix": [5, 4], "x": 155, "y": 0, "flags": 255}, + {"matrix": [5, 3], "x": 172, "y": 0, "flags": 255}, + {"matrix": [5, 2], "x": 190, "y": 0, "flags": 255}, + {"matrix": [5, 1], "x": 207, "y": 0, "flags": 255}, + {"matrix": [5, 0], "x": 224, "y": 0, "flags": 255}, + {"matrix": [6, 0], "x": 224, "y": 16, "flags": 255}, + {"matrix": [6, 1], "x": 207, "y": 16, "flags": 255}, + {"matrix": [6, 2], "x": 190, "y": 16, "flags": 255}, + {"matrix": [6, 3], "x": 172, "y": 16, "flags": 255}, + {"matrix": [6, 4], "x": 155, "y": 16, "flags": 255}, + {"matrix": [6, 5], "x": 138, "y": 16, "flags": 255}, + {"matrix": [6, 6], "x": 121, "y": 16, "flags": 255}, + {"matrix": [6, 7], "x": 103, "y": 16, "flags": 255}, + {"matrix": [7, 7], "x": 103, "y": 32, "flags": 255}, + {"matrix": [7, 6], "x": 121, "y": 32, "flags": 255}, + {"matrix": [7, 5], "x": 138, "y": 32, "flags": 255}, + {"matrix": [7, 4], "x": 155, "y": 32, "flags": 255}, + {"matrix": [7, 3], "x": 172, "y": 32, "flags": 255}, + {"matrix": [7, 2], "x": 190, "y": 32, "flags": 255}, + {"matrix": [7, 1], "x": 207, "y": 32, "flags": 255}, + {"matrix": [7, 0], "x": 224, "y": 32, "flags": 255}, + {"matrix": [8, 0], "x": 224, "y": 48, "flags": 255}, + {"matrix": [8, 1], "x": 207, "y": 48, "flags": 255}, + {"matrix": [8, 2], "x": 190, "y": 48, "flags": 255}, + {"matrix": [8, 3], "x": 172, "y": 48, "flags": 255}, + {"matrix": [8, 4], "x": 155, "y": 48, "flags": 255}, + {"matrix": [8, 5], "x": 138, "y": 48, "flags": 255}, + {"matrix": [8, 6], "x": 121, "y": 48, "flags": 255}, + {"matrix": [8, 7], "x": 103, "y": 48, "flags": 255}, + {"matrix": [9, 7], "x": 103, "y": 64, "flags": 255}, + {"matrix": [9, 6], "x": 121, "y": 64, "flags": 255}, + {"matrix": [9, 5], "x": 138, "y": 64, "flags": 255}, + {"matrix": [9, 4], "x": 155, "y": 64, "flags": 255}, + {"matrix": [9, 3], "x": 172, "y": 64, "flags": 255}, + {"matrix": [9, 2], "x": 190, "y": 64, "flags": 255}, + {"matrix": [9, 1], "x": 207, "y": 64, "flags": 255}, + {"matrix": [9, 0], "x": 224, "y": 64, "flags": 255} + ], "split_count": [30, 40] }, "matrix_pins": { diff --git a/keyboards/owlab/voice65/hotswap/hotswap.c b/keyboards/owlab/voice65/hotswap/hotswap.c index 79179d1661..ec27cf9b75 100644 --- a/keyboards/owlab/voice65/hotswap/hotswap.c +++ b/keyboards/owlab/voice65/hotswap/hotswap.c @@ -86,29 +86,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW5_CS39, SW5_CS38, SW5_CS37}, /* RGB65-dn- */ {0, SW7_CS39, SW7_CS38, SW7_CS37}, /* RGB66-right- */ }; - -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, NO_LED, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, NO_LED, 65, 66 } -}, { - { 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 }, { 208, 0 }, { 224, 0 }, - { 2, 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 }, { 210, 16 }, { 224, 16 }, - { 4, 32 }, { 20, 32 }, { 36, 32 }, { 52, 32 }, { 68, 32 }, { 84, 32 }, { 100, 32 }, { 116, 32 }, { 132, 32 }, { 148, 32 }, { 164, 32 }, { 180, 32 }, { 196, 32 }, { 224, 32 }, - { 8, 48 }, { 24, 48 }, { 40, 48 }, { 56, 48 }, { 72, 48 }, { 88, 48 }, { 104, 48 }, { 120, 48 }, { 136, 48 }, { 152, 48 }, { 168, 48 }, { 184, 48 }, { 208, 48 }, { 224, 48 }, - { 2, 64 }, { 18, 64 }, { 34, 64 }, { 82, 64 }, { 146, 64 }, { 162, 64 }, { 178, 64 }, { 210, 64 }, { 224, 64 } -}, { - 1, 4, 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, 4, 4, 1, - 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - } -}; - - #endif bool rgb_matrix_indicators_kb(void) { diff --git a/keyboards/owlab/voice65/hotswap/keyboard.json b/keyboards/owlab/voice65/hotswap/keyboard.json index 79ca2a57ed..e31a7b5e65 100644 --- a/keyboards/owlab/voice65/hotswap/keyboard.json +++ b/keyboards/owlab/voice65/hotswap/keyboard.json @@ -63,6 +63,75 @@ "val": 128 }, "driver": "is31fl3741", + "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": 208, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 2, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 18, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 50, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 82, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 114, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 130, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 146, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 162, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 178, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 194, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 210, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 4, "y": 32, "flags": 0}, + {"matrix": [2, 1], "x": 20, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 36, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 68, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 100, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 132, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 148, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 164, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 180, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 196, "y": 32, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 8, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 24, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 56, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 72, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 88, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 104, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 120, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 136, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 152, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 168, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 184, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 208, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 82, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 146, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 162, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 178, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "led_flush_limit": 26, "led_process_limit": 4, "max_brightness": 200, diff --git a/keyboards/owlab/voice65/soldered/keyboard.json b/keyboards/owlab/voice65/soldered/keyboard.json index edd79a064f..312b612561 100644 --- a/keyboards/owlab/voice65/soldered/keyboard.json +++ b/keyboards/owlab/voice65/soldered/keyboard.json @@ -63,6 +63,79 @@ "val": 128 }, "driver": "is31fl3741", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 195, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 209, "y": 0, "flags": 4}, + {"matrix": [2, 13], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 2, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 18, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 50, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 82, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 114, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 130, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 146, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 162, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 178, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 194, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 2, "y": 32, "flags": 0}, + {"matrix": [2, 1], "x": 20, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 36, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 68, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 100, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 132, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 148, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 164, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 180, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 202, "y": 32, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 192, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 208, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 40, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 60, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 95, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 132, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 152, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 172, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 192, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 208, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "led_flush_limit": 26, "led_process_limit": 4, "max_brightness": 200, diff --git a/keyboards/owlab/voice65/soldered/soldered.c b/keyboards/owlab/voice65/soldered/soldered.c index 23144914fe..5a47de96e8 100644 --- a/keyboards/owlab/voice65/soldered/soldered.c +++ b/keyboards/owlab/voice65/soldered/soldered.c @@ -90,29 +90,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW5_CS39, SW5_CS38, SW5_CS37}, /* RGB69-dn- */ {0, SW5_CS27, SW5_CS26, SW5_CS25}, /* RGB70-right- */ }; - -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 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, 15, 44 }, - { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59 }, - { 60, 61, 62, 63, 64, NO_LED, 65, NO_LED, NO_LED, 66, 67, 68, 69, NO_LED, 70 } -}, { - { 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 }, { 209, 0 }, { 224, 0 }, - { 2, 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 }, { 208, 16 }, { 224, 16 }, - { 2, 32 }, { 20, 32 }, { 36, 32 }, { 52, 32 }, { 68, 32 }, { 84, 32 }, { 100, 32 }, { 116, 32 }, { 132, 32 }, { 148, 32 }, { 164, 32 }, { 180, 32 }, { 202, 32 }, { 224, 32 }, - { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, { 96, 48 }, { 112, 48 }, { 128, 48 }, { 144, 48 }, { 160, 48 }, { 176, 48 }, { 192, 48 }, { 208, 48 }, { 224, 48 }, - { 0, 64 }, { 20, 64 }, { 40, 64 }, { 60, 64 }, { 95, 64 }, { 132, 64 }, { 152, 64 }, { 172, 64 }, { 192, 64 }, { 208, 64 }, { 224, 64 } -}, { - 1, 4, 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, - 0, 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, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 - } -}; - - #endif bool rgb_matrix_indicators_kb(void) { From 7186a631721da92c02e1d487c7a99605ee2db269 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:09:14 -0600 Subject: [PATCH 23/95] Migrate `g_led_config` to DD (M3) (#25620) --- keyboards/merge/um70/keyboard.json | 85 ++++++++++++++ keyboards/merge/um70/um70.c | 77 ------------- keyboards/miller/gm862/gm862.c | 20 ---- keyboards/miller/gm862/keyboard.json | 63 +++++++++++ keyboards/ml/gas75/gas75.c | 34 ------ keyboards/ml/gas75/keyboard.json | 5 + keyboards/momokai/tap_duo/keyboard.json | 6 + keyboards/momokai/tap_duo/tap_duo.c | 31 ----- keyboards/momokai/tap_trio/keyboard.json | 7 ++ keyboards/momokai/tap_trio/tap_trio.c | 31 ----- keyboards/monstargear/xo87/rgb/keyboard.json | 112 +++++++++++++++++++ keyboards/monstargear/xo87/rgb/rgb.c | 50 --------- keyboards/mss_studio/m63_rgb/keyboard.json | 77 +++++++++++++ keyboards/mss_studio/m63_rgb/m63_rgb.c | 50 --------- keyboards/mss_studio/m64_rgb/keyboard.json | 78 +++++++++++++ keyboards/mss_studio/m64_rgb/m64_rgb.c | 50 --------- keyboards/mwstudio/mw65_rgb/keyboard.json | 85 ++++++++++++++ keyboards/mwstudio/mw65_rgb/mw65_rgb.c | 47 -------- keyboards/mwstudio/mw75/keyboard.json | 99 ++++++++++++++++ keyboards/mwstudio/mw75/mw75.c | 47 -------- keyboards/mwstudio/mw75r2/keyboard.json | 25 ++++- keyboards/mwstudio/mw75r2/mw75r2.c | 31 ----- 22 files changed, 641 insertions(+), 469 deletions(-) delete mode 100644 keyboards/merge/um70/um70.c delete mode 100644 keyboards/ml/gas75/gas75.c delete mode 100644 keyboards/momokai/tap_duo/tap_duo.c delete mode 100644 keyboards/momokai/tap_trio/tap_trio.c delete mode 100644 keyboards/mss_studio/m63_rgb/m63_rgb.c delete mode 100644 keyboards/mss_studio/m64_rgb/m64_rgb.c delete mode 100644 keyboards/mwstudio/mw65_rgb/mw65_rgb.c delete mode 100644 keyboards/mwstudio/mw75/mw75.c delete mode 100644 keyboards/mwstudio/mw75r2/mw75r2.c diff --git a/keyboards/merge/um70/keyboard.json b/keyboards/merge/um70/keyboard.json index 7ebb61f7fe..0499ef5060 100644 --- a/keyboards/merge/um70/keyboard.json +++ b/keyboards/merge/um70/keyboard.json @@ -38,6 +38,91 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 13, "flags": 2}, + {"x": 224, "y": 26, "flags": 2}, + {"x": 148, "y": 39, "flags": 2}, + {"x": 185, "y": 52, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"matrix": [0, 0], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 32, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 192, "y": 16, "flags": 4}, + {"matrix": [4, 5], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 32, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 192, "y": 32, "flags": 4}, + {"matrix": [4, 6], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 32, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 192, "y": 48, "flags": 4}, + {"matrix": [4, 7], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 32, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 64, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 96, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 128, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 160, "y": 64, "flags": 1}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 13, "flags": 2}, + {"x": 224, "y": 26, "flags": 2}, + {"x": 148, "y": 39, "flags": 2}, + {"x": 185, "y": 52, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"matrix": [5, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [5, 1], "x": 32, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 64, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 96, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 128, "y": 0, "flags": 4}, + {"matrix": [5, 5], "x": 160, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 192, "y": 0, "flags": 4}, + {"matrix": [5, 7], "x": 224, "y": 0, "flags": 1}, + {"matrix": [6, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 32, "y": 16, "flags": 4}, + {"matrix": [6, 2], "x": 64, "y": 16, "flags": 4}, + {"matrix": [6, 3], "x": 96, "y": 16, "flags": 4}, + {"matrix": [6, 4], "x": 128, "y": 16, "flags": 4}, + {"matrix": [6, 5], "x": 160, "y": 16, "flags": 4}, + {"matrix": [6, 6], "x": 192, "y": 16, "flags": 4}, + {"matrix": [6, 7], "x": 223, "y": 16, "flags": 1}, + {"matrix": [8, 7], "x": 224, "y": 16, "flags": 4}, + {"matrix": [7, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [7, 1], "x": 32, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 64, "y": 32, "flags": 4}, + {"matrix": [7, 3], "x": 96, "y": 32, "flags": 4}, + {"matrix": [7, 4], "x": 128, "y": 32, "flags": 4}, + {"matrix": [7, 5], "x": 160, "y": 32, "flags": 4}, + {"matrix": [7, 6], "x": 192, "y": 32, "flags": 1}, + {"matrix": [9, 7], "x": 223, "y": 32, "flags": 4}, + {"matrix": [8, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [8, 1], "x": 32, "y": 48, "flags": 4}, + {"matrix": [8, 2], "x": 64, "y": 48, "flags": 4}, + {"matrix": [8, 3], "x": 96, "y": 48, "flags": 4}, + {"matrix": [8, 4], "x": 128, "y": 48, "flags": 4}, + {"matrix": [8, 5], "x": 160, "y": 48, "flags": 1}, + {"matrix": [8, 6], "x": 192, "y": 48, "flags": 4}, + {"matrix": [9, 0], "x": 0, "y": 46, "flags": 1}, + {"matrix": [9, 1], "x": 32, "y": 46, "flags": 1}, + {"matrix": [9, 2], "x": 64, "y": 64, "flags": 1}, + {"matrix": [9, 3], "x": 96, "y": 64, "flags": 4}, + {"matrix": [9, 4], "x": 128, "y": 64, "flags": 4}, + {"matrix": [9, 5], "x": 160, "y": 64, "flags": 4} + ], "split_count": [39, 44] }, "rgblight": { diff --git a/keyboards/merge/um70/um70.c b/keyboards/merge/um70/um70.c deleted file mode 100644 index b63fcdbedd..0000000000 --- a/keyboards/merge/um70/um70.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright 2021 duoshock - * - * 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 RGB_MATRIX_ENABLE -/* - Underglow Underglow 13,14 = split bksp, 14 = 2u bksp - 07 08 09 10 11 12 13 01 01 07 08 09 10 11 12 13 14 - 14 15 16 17 18 19 02 02 15 16 17 18 19 20 21 22 23 -20 21 22 23 24 25 26 03 03 24 25 26 27 28 29 30 31 -27 28 29 30 31 32 33 04 04 32 33 34 35 36 37 38 -34 35 36 37 38 39 05 05 39 40 41 42 43 44 - 06 06 -*/ - -#define XX NO_LED - -led_config_t g_led_config = { { - { 6, 7, 8, 9, 10, 11, 12, XX }, - { 13, 14, 15, 16, 17, 18, XX, XX }, - { 20, 21, 22, 23, 24, 25, XX, XX }, - { 27, 28, 29, 30, 31, 32, XX, XX }, - { 34, 35, 36, 37, 38, 19, 26, 33 }, - - { 45, 46, 47, 48, 49, 50, 51, 52 }, - { 53, 54, 55, 56, 57, 58, 59, 60 }, - { 62, 63, 64, 65, 66, 67, 68, XX }, - { 70, 71, 72, 73, 74, 75, 76, 61 }, - { 77, 78, 79, 80, 81, 82, XX, 69 }, -}, { - { 224, 0 }, { 224, 13 }, { 224, 26 }, { 148, 39 }, { 185, 52 }, { 224, 64 }, - - { 32, 0 }, { 64, 0 }, { 96, 0 }, { 128, 0 }, { 160, 0 }, { 192, 0 }, { 224, 0 }, - { 32, 16 }, { 64, 16 }, { 96, 16 }, { 128, 16 }, { 160, 16 }, { 192, 16 }, - { 0, 32 }, { 32, 32 }, { 64, 32 }, { 96, 32 }, { 128, 32 }, { 160, 32 }, { 192, 32 }, - { 0, 48 }, { 32, 48 }, { 64, 48 }, { 96, 48 }, { 128, 48 }, { 160, 48 }, { 192, 48 }, - { 0, 64 }, { 32, 64 }, { 64, 64 }, { 96, 64 }, { 128, 64 }, { 160, 64 }, - - { 224, 0 }, { 224, 13 }, { 224, 26 }, { 148, 39 }, { 185, 52 }, { 224, 64 }, - - { 0, 0 }, { 32, 0 }, { 64, 0 }, { 96, 0 }, { 128, 0 }, { 160, 0 }, { 192, 0 }, { 224, 0 }, - { 0, 16 }, { 32, 16 }, { 64, 16 }, { 96, 16 }, { 128, 16 }, { 160, 16 }, { 192, 16 }, { 223, 16 }, { 224, 16 }, - { 0, 32 }, { 32, 32 }, { 64, 32 }, { 96, 32 }, { 128, 32 }, { 160, 32 }, { 192, 32 }, { 223, 32 }, - { 0, 48 }, { 32, 48 }, { 64, 48 }, { 96, 48 }, { 128, 48 }, { 160, 48 }, { 192, 48 }, - { 0, 46 }, { 32, 46 }, { 64, 64 }, { 96, 64 }, { 128, 64 }, { 160, 64 } - -}, { - 2, 2, 2, 2, 2, 2, - 4, 4, 4, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, - 4, 1, 4, 4, 4, 4, 4, - 4, 1, 4, 4, 4, 4, 4, - 4, 1, 1, 1, 1, 1, - - 2, 2, 2, 2, 2, 2, - 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 4, 4, 4, 4, 4, 1, 4, - 4, 4, 4, 4, 4, 4, 1, 4, - 4, 4, 4, 4, 4, 1, 4, - 1, 1, 1, 4, 4, 4 -} }; - -#endif \ No newline at end of file diff --git a/keyboards/miller/gm862/gm862.c b/keyboards/miller/gm862/gm862.c index 534ef6cdc6..ae275479ba 100644 --- a/keyboards/miller/gm862/gm862.c +++ b/keyboards/miller/gm862/gm862.c @@ -64,26 +64,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {0, SW11_CS13, SW10_CS13, SW12_CS13}, {0, SW8_CS14, SW7_CS14, SW9_CS14}, }; - -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, NO_LED, 40 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED,NO_LED, 52 }, - { 53, 54, 55, NO_LED, NO_LED, 56, NO_LED, NO_LED, NO_LED, 57, 58, NO_LED,59, 60 } -}, { - { 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 }, { 24, 16 }, { 40, 16 }, { 56, 16 }, { 72, 16 }, { 88, 16 }, { 104, 16 }, { 120, 16 }, { 136, 16 }, { 152, 16 }, { 168, 16 }, { 184, 16 }, { 200, 16 }, { 220, 16 }, - { 6, 32 }, { 28, 32 }, { 44, 32 }, { 60, 32 }, { 76, 32 }, { 92, 32 }, { 108, 32 }, { 124, 32 }, { 140, 32 }, { 156, 32 }, { 172, 32 }, { 188, 32 }, { 204, 32 }, - { 10, 48 }, { 20, 48 }, { 52, 48 }, { 68, 48 }, { 84, 48 }, { 100, 48 }, { 116, 48 }, { 132, 48 }, { 148, 48 }, { 164, 48 }, { 180, 48 }, { 210, 48 }, - { 2, 64 }, { 22, 64 }, { 42, 64 }, { 102, 64 }, { 162, 64 }, { 182, 64 }, { 202, 64 }, { 222, 64 }, -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 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, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1 -} }; #endif bool rgb_matrix_indicators_kb(void) { diff --git a/keyboards/miller/gm862/keyboard.json b/keyboards/miller/gm862/keyboard.json index db08a580a9..15c6eb46ae 100644 --- a/keyboards/miller/gm862/keyboard.json +++ b/keyboards/miller/gm862/keyboard.json @@ -39,6 +39,69 @@ "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": 4}, + {"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": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 4}, + {"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, 13], "x": 204, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "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": 162, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 182, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 202, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 222, "y": 64, "flags": 1} + ], "sleep": true }, "features": { diff --git a/keyboards/ml/gas75/gas75.c b/keyboards/ml/gas75/gas75.c deleted file mode 100644 index 0744dd8092..0000000000 --- a/keyboards/ml/gas75/gas75.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2022 ML - * - * 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 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 } -}, { - //Key matrix (0 -> 2) - {224, 0}, {0 , 0}, {6 , 38}, -}, { - //Key matrix (0 -> 2) - 4, 1, 8, -} }; -#endif diff --git a/keyboards/ml/gas75/keyboard.json b/keyboards/ml/gas75/keyboard.json index 280735eb14..ac04365b6b 100644 --- a/keyboards/ml/gas75/keyboard.json +++ b/keyboards/ml/gas75/keyboard.json @@ -58,6 +58,11 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"x": 224, "y": 0, "flags": 4}, + {"x": 0, "y": 0, "flags": 1}, + {"x": 6, "y": 38, "flags": 8} + ], "max_brightness": 200 }, "features": { diff --git a/keyboards/momokai/tap_duo/keyboard.json b/keyboards/momokai/tap_duo/keyboard.json index 1d5302985c..82f8925594 100644 --- a/keyboards/momokai/tap_duo/keyboard.json +++ b/keyboards/momokai/tap_duo/keyboard.json @@ -42,6 +42,12 @@ "solid_splash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 168, "y": 0, "flags": 4}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 224, "y": 64, "flags": 2} + ], "max_brightness": 200, "sleep": true }, diff --git a/keyboards/momokai/tap_duo/tap_duo.c b/keyboards/momokai/tap_duo/tap_duo.c deleted file mode 100644 index 4e0bc9f42c..0000000000 --- a/keyboards/momokai/tap_duo/tap_duo.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2022 Momokai - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 1, NO_LED, NO_LED, NO_LED} -}, { - // LED Index to Physical Position - { 112, 0}, { 168, 0}, { 0, 64}, { 224, 64} -}, { - // LED Index to Flag - 4,4,2,2 -} }; - -#endif diff --git a/keyboards/momokai/tap_trio/keyboard.json b/keyboards/momokai/tap_trio/keyboard.json index 41da5585f6..536ea91a30 100644 --- a/keyboards/momokai/tap_trio/keyboard.json +++ b/keyboards/momokai/tap_trio/keyboard.json @@ -42,6 +42,13 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 168, "y": 0, "flags": 4}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 224, "y": 64, "flags": 2} + ], "max_brightness": 200, "sleep": true }, diff --git a/keyboards/momokai/tap_trio/tap_trio.c b/keyboards/momokai/tap_trio/tap_trio.c deleted file mode 100644 index 73957745a9..0000000000 --- a/keyboards/momokai/tap_trio/tap_trio.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2022 Momokai - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 1, 2, NO_LED, NO_LED, NO_LED} -}, { - // LED Index to Physical Position - { 56, 0}, { 112, 0}, { 168, 0}, { 0, 64}, { 224, 64} -}, { - // LED Index to Flag - 4,4,4,2,2 -} }; - -#endif diff --git a/keyboards/monstargear/xo87/rgb/keyboard.json b/keyboards/monstargear/xo87/rgb/keyboard.json index 9ee83deb00..dc4015a266 100644 --- a/keyboards/monstargear/xo87/rgb/keyboard.json +++ b/keyboards/monstargear/xo87/rgb/keyboard.json @@ -58,6 +58,118 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"x": 224, "y": 63, "flags": 2}, + {"matrix": [5, 15], "x": 224, "y": 63, "flags": 1}, + {"matrix": [5, 14], "x": 215, "y": 63, "flags": 1}, + {"matrix": [5, 13], "x": 206, "y": 63, "flags": 1}, + {"matrix": [4, 15], "x": 180, "y": 63, "flags": 1}, + {"matrix": [5, 12], "x": 168, "y": 63, "flags": 1}, + {"matrix": [5, 11], "x": 153, "y": 63, "flags": 1}, + {"matrix": [5, 10], "x": 135, "y": 63, "flags": 1}, + {"matrix": [5, 6], "x": 101, "y": 63, "flags": 4}, + {"matrix": [5, 2], "x": 33, "y": 63, "flags": 1}, + {"matrix": [5, 1], "x": 22, "y": 63, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 63, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 48, "flags": 1}, + {"matrix": [4, 2], "x": 30, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 45, "y": 48, "flags": 4}, + {"matrix": [4, 4], "x": 60, "y": 48, "flags": 4}, + {"matrix": [4, 5], "x": 75, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 90, "y": 48, "flags": 4}, + {"matrix": [4, 7], "x": 105, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 120, "y": 48, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 48, "flags": 4}, + {"matrix": [4, 10], "x": 150, "y": 48, "flags": 4}, + {"matrix": [4, 11], "x": 165, "y": 48, "flags": 4}, + {"matrix": [4, 12], "x": 198, "y": 48, "flags": 1}, + {"matrix": [4, 14], "x": 215, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 198, "y": 36, "flags": 1}, + {"matrix": [3, 11], "x": 180, "y": 36, "flags": 4}, + {"matrix": [3, 10], "x": 176, "y": 36, "flags": 4}, + {"matrix": [3, 9], "x": 161, "y": 36, "flags": 4}, + {"matrix": [3, 8], "x": 146, "y": 36, "flags": 4}, + {"matrix": [3, 7], "x": 131, "y": 36, "flags": 4}, + {"matrix": [3, 6], "x": 116, "y": 36, "flags": 4}, + {"matrix": [3, 5], "x": 101, "y": 36, "flags": 4}, + {"matrix": [3, 4], "x": 86, "y": 36, "flags": 4}, + {"matrix": [3, 3], "x": 71, "y": 36, "flags": 4}, + {"matrix": [3, 2], "x": 56, "y": 36, "flags": 4}, + {"matrix": [3, 1], "x": 41, "y": 36, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 36, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 24, "flags": 1}, + {"matrix": [2, 1], "x": 22, "y": 24, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 24, "flags": 4}, + {"matrix": [2, 4], "x": 67, "y": 24, "flags": 4}, + {"matrix": [2, 5], "x": 82, "y": 24, "flags": 4}, + {"matrix": [2, 6], "x": 97, "y": 24, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 24, "flags": 4}, + {"matrix": [2, 8], "x": 127, "y": 24, "flags": 4}, + {"matrix": [2, 9], "x": 142, "y": 24, "flags": 4}, + {"matrix": [2, 10], "x": 157, "y": 24, "flags": 4}, + {"matrix": [2, 11], "x": 172, "y": 24, "flags": 4}, + {"matrix": [2, 12], "x": 187, "y": 24, "flags": 4}, + {"matrix": [4, 13], "x": 202, "y": 24, "flags": 1}, + {"matrix": [2, 13], "x": 206, "y": 24, "flags": 1}, + {"matrix": [2, 14], "x": 215, "y": 24, "flags": 1}, + {"matrix": [2, 15], "x": 224, "y": 24, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 12, "flags": 1}, + {"matrix": [1, 14], "x": 215, "y": 12, "flags": 1}, + {"matrix": [1, 13], "x": 206, "y": 12, "flags": 1}, + {"matrix": [3, 13], "x": 202, "y": 12, "flags": 1}, + {"matrix": [1, 12], "x": 187, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 172, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 157, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 142, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 127, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 97, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 82, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 67, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 22, "y": 12, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"x": 0, "y": 0, "flags": 8}, + {"x": 0, "y": 0, "flags": 8}, + {"x": 0, "y": 0, "flags": 8}, + {"matrix": [0, 1], "x": 25, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 55, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 82, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 108, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 120, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 130, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 148, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 172, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 187, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 190, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 195, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 206, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 215, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1} + ], "max_brightness": 100, "sleep": true }, diff --git a/keyboards/monstargear/xo87/rgb/rgb.c b/keyboards/monstargear/xo87/rgb/rgb.c index c064953444..1e29c8b70b 100644 --- a/keyboards/monstargear/xo87/rgb/rgb.c +++ b/keyboards/monstargear/xo87/rgb/rgb.c @@ -15,56 +15,6 @@ */ #include "quantum.h" -led_config_t g_led_config = { { - // esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtscr scrl brk - { 91, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109 }, - //tilde 1 2 3 4 5 6 7 8 9 0 - = ins home pgup - { 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 76, 75, 74 }, - //tab q w e r t y u i o p [ ] del end pgdn - { 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73 }, - //caps a s d f g h j k l ; ' return bspc - { 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 77, NO_LED, NO_LED }, - //lshift z x c v b n m , . / rshift bsls up rctl - { 31, NO_LED, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 70, 43, 23 }, - //ctrl win alt space alt win mod left down right - { 30, 29, 28, NO_LED, NO_LED, NO_LED, 27, NO_LED, NO_LED, NO_LED, 26, 25, 24, 22, 21, 20 }, - //underglow lights - //{ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }, - //{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } - -}, { - // Underglow lights - { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, { 254, 63 }, - // right down left rctl mod rwin ralt space lalt lwin lctl - { 225, 63 }, { 215, 63 }, { 206, 63 }, { 180, 63 }, { 168, 63}, { 153, 63 }, { 135, 63 }, { 101, 63 }, { 33, 63 }, { 22, 63 }, { 0, 63 }, - // lshift z x c v b n m comma period question rshift up - { 0, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 198, 48 }, { 215, 48}, - // return ' ; l k j h g f d s a capslock - { 198, 36 }, { 180, 36 }, { 176, 36 }, { 161, 36 }, { 146, 36 }, { 131, 36 }, { 116, 36 }, { 101, 36 }, { 86, 36 }, { 71, 36 }, { 56, 36 }, { 41, 36 }, { 0, 36 }, - // tab q w e r t y u i o p [ ] backslash del end pgdn - { 0, 24 }, { 22, 24}, { 37, 24 }, { 52, 24 }, { 67, 24 }, { 82, 24 }, { 97, 24 }, { 112, 24 }, { 127, 24 }, { 142, 24 }, { 157, 24 }, { 172, 24 }, { 187, 24 }, { 202, 24}, { 206, 24 }, {215, 24}, { 225, 24 }, - // pgup home ins backspace = - 0 9 8 7 6 5 4 3 2 1 tilde - { 225, 12 }, {215, 12}, { 206, 12 }, { 202, 12}, { 187, 12 }, { 172, 12 }, { 157, 12 }, { 142, 12 }, { 127, 12 }, { 112, 12 }, { 97, 12 }, { 82, 12 }, { 67, 12 }, { 52, 12 }, { 37, 12 }, { 22, 12}, { 0, 12 }, - // esc ind1 ind2 ind3 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 prtscr scrlck pause - { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 25, 0 }, { 40, 0 }, { 55, 0 }, { 82, 0 }, { 108, 0 }, { 120, 0 }, { 130, 0 }, { 148, 0 }, { 172, 0 }, { 187, 0 }, { 190, 0 }, { 195, 0 }, { 206, 0 }, { 215, 0}, { 225, 0 } -}, { - // underglow - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - // bottom row - 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, - // 2nd row up - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - // 3rd row up - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // 4th row up - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - // 5th row up - 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - // top row - 1, 8, 8, 8, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1 -} }; - - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/mss_studio/m63_rgb/keyboard.json b/keyboards/mss_studio/m63_rgb/keyboard.json index b798df21dd..5aa3a753e2 100644 --- a/keyboards/mss_studio/m63_rgb/keyboard.json +++ b/keyboards/mss_studio/m63_rgb/keyboard.json @@ -61,6 +61,83 @@ "solid_multisplash": true }, "driver": "ws2812", + "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": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 8}, + {"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, 13], "x": 214, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 186, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 4}, + {"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}, + {"x": 216, "y": 56, "flags": 2}, + {"x": 181, "y": 57, "flags": 2}, + {"x": 138, "y": 59, "flags": 2}, + {"x": 105, "y": 58, "flags": 2}, + {"x": 52, "y": 60, "flags": 2}, + {"x": 10, "y": 60, "flags": 2}, + {"x": 20, "y": 12, "flags": 2}, + {"x": 54, "y": 12, "flags": 2}, + {"x": 102, "y": 10, "flags": 2}, + {"x": 145, "y": 13, "flags": 2}, + {"x": 182, "y": 9, "flags": 2}, + {"x": 211, "y": 10, "flags": 2} + ], "max_brightness": 200 }, "features": { diff --git a/keyboards/mss_studio/m63_rgb/m63_rgb.c b/keyboards/mss_studio/m63_rgb/m63_rgb.c deleted file mode 100644 index 71a43720cc..0000000000 --- a/keyboards/mss_studio/m63_rgb/m63_rgb.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright 2021 Mss Studio - * Copyright 2022 HorrorTroll - * - * 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 RGB_MATRIX_ENABLE -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, NO_LED, 40 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52, 53 }, - { 54, 55, 56, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 58, 59, 60, 61, 62 } -}, { - // Key matrix (0 -> 62) - {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}, {24 , 16}, {40 , 16}, {56 , 16}, {72 , 16}, {88 , 16}, {104, 16}, {120, 16}, {136, 16}, {152, 16}, {168, 16}, {184, 16}, {200, 16}, {220, 16}, - {6 , 32}, {28 , 32}, {44 , 32}, {60 , 32}, {76 , 32}, {92 , 32}, {108, 32}, {124, 32}, {140, 32}, {156, 32}, {172, 32}, {188, 32}, {214, 32}, - {10 , 48}, {36 , 48}, {52 , 48}, {68 , 48}, {84 , 48}, {100, 48}, {116, 48}, {132, 48}, {148, 48}, {164, 48}, {186, 48}, {208, 48}, {224, 48}, - {2 , 64}, {22 , 64}, {42 , 64}, {102, 64}, {160, 64}, {176, 64}, {192, 64}, {208, 64}, {224, 64}, - - // Underglow (63 -> 74) - {216, 56}, {181, 57}, {138, 59}, {105, 58}, {52 , 60}, {10 , 60}, - {20 , 12}, {54 , 12}, {102, 10}, {145, 13}, {182, 9}, {211, 10}, -}, { - // Key matrix (0 -> 62) - 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, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, - 1, 1, 1, 4, 1, 1, 4, 4, 4, - - // Underglow (63 -> 74) - 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2 -} }; -#endif diff --git a/keyboards/mss_studio/m64_rgb/keyboard.json b/keyboards/mss_studio/m64_rgb/keyboard.json index 083afec8c7..b2aa92d8f2 100644 --- a/keyboards/mss_studio/m64_rgb/keyboard.json +++ b/keyboards/mss_studio/m64_rgb/keyboard.json @@ -61,6 +61,84 @@ "solid_multisplash": true }, "driver": "ws2812", + "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": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 8}, + {"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, 13], "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": 1}, + {"matrix": [3, 12], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 4}, + {"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}, + {"x": 216, "y": 56, "flags": 2}, + {"x": 181, "y": 57, "flags": 2}, + {"x": 138, "y": 59, "flags": 2}, + {"x": 105, "y": 58, "flags": 2}, + {"x": 52, "y": 60, "flags": 2}, + {"x": 10, "y": 60, "flags": 2}, + {"x": 20, "y": 12, "flags": 2}, + {"x": 54, "y": 12, "flags": 2}, + {"x": 102, "y": 10, "flags": 2}, + {"x": 145, "y": 13, "flags": 2}, + {"x": 182, "y": 9, "flags": 2}, + {"x": 211, "y": 10, "flags": 2} + ], "max_brightness": 200 }, "features": { diff --git a/keyboards/mss_studio/m64_rgb/m64_rgb.c b/keyboards/mss_studio/m64_rgb/m64_rgb.c deleted file mode 100644 index f9b2778371..0000000000 --- a/keyboards/mss_studio/m64_rgb/m64_rgb.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright 2021 Mss Studio - * Copyright 2022 HorrorTroll - * - * 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 RGB_MATRIX_ENABLE -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, NO_LED, 40 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 }, - { 55, 56, 57, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, 59, 60, 61, 62, 63 } -}, { - // Key matrix (0 -> 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}, {24 , 16}, {40 , 16}, {56 , 16}, {72 , 16}, {88 , 16}, {104, 16}, {120, 16}, {136, 16}, {152, 16}, {168, 16}, {184, 16}, {200, 16}, {220, 16}, - {6 , 32}, {28 , 32}, {44 , 32}, {60 , 32}, {76 , 32}, {92 , 32}, {108, 32}, {124, 32}, {140, 32}, {156, 32}, {172, 32}, {188, 32}, {214, 32}, - {8 , 48}, {32 , 48}, {48 , 48}, {64 , 48}, {80 , 48}, {96 , 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, {224, 48}, - {2 , 64}, {22 , 64}, {42 , 64}, {102, 64}, {160, 64}, {176, 64}, {192, 64}, {208, 64}, {224, 64}, - - // Underglow (64 -> 75) - {216, 56}, {181, 57}, {138, 59}, {105, 58}, {52 , 60}, {10 , 60}, - {20 , 12}, {54 , 12}, {102, 10}, {145, 13}, {182, 9}, {211, 10}, -}, { - // Key matrix (0 -> 63) - 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, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, - 1, 1, 1, 4, 1, 1, 4, 4, 4, - - // Underglow (64 -> 75) - 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2 -} }; -#endif diff --git a/keyboards/mwstudio/mw65_rgb/keyboard.json b/keyboards/mwstudio/mw65_rgb/keyboard.json index ce8e3f978c..5508e3b663 100644 --- a/keyboards/mwstudio/mw65_rgb/keyboard.json +++ b/keyboards/mwstudio/mw65_rgb/keyboard.json @@ -54,6 +54,91 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"x": 180, "y": 52, "flags": 2}, + {"x": 146, "y": 52, "flags": 2}, + {"x": 86, "y": 52, "flags": 2}, + {"x": 45, "y": 52, "flags": 2}, + {"x": 7, "y": 52, "flags": 2}, + {"x": 7, "y": 36, "flags": 2}, + {"x": 7, "y": 20, "flags": 2}, + {"x": 7, "y": 4, "flags": 2}, + {"x": 45, "y": 4, "flags": 2}, + {"x": 86, "y": 4, "flags": 2}, + {"x": 146, "y": 4, "flags": 2}, + {"x": 180, "y": 4, "flags": 2}, + {"x": 217, "y": 4, "flags": 2}, + {"x": 217, "y": 20, "flags": 2}, + {"x": 217, "y": 36, "flags": 2}, + {"x": 217, "y": 52, "flags": 2}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 209, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 194, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 173, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 156, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 36, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 19, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 8, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 31, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 46, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 61, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 76, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 91, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 106, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 121, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 151, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 166, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 188, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 200, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 175, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 145, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 130, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 115, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 100, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 85, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 70, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 25, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 5, "y": 32, "flags": 8}, + {"matrix": [1, 0], "x": 3, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 21, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 36, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 81, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 111, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 126, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 141, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 156, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 171, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 186, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 205, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 135, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1} + ], "max_brightness": 200 }, "features": { diff --git a/keyboards/mwstudio/mw65_rgb/mw65_rgb.c b/keyboards/mwstudio/mw65_rgb/mw65_rgb.c deleted file mode 100644 index 0cd8fdaa75..0000000000 --- a/keyboards/mwstudio/mw65_rgb/mw65_rgb.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2021 TW59420 - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68 }, - { 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 }, - { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, 40, 39 }, - { 25, NO_LED, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38 }, - { 24, 23, 22, NO_LED, NO_LED, NO_LED, 21, NO_LED, NO_LED, NO_LED, 20, 19, 18, 17, 16 } -}, { - //Underglow (0 -> 15) - {180, 52}, {146, 52}, {86 , 52}, {45 , 52}, {7 , 52}, {7 , 36}, {7 , 20}, {7 , 4}, {45 , 4}, {86 , 4}, {146, 4}, {180, 4}, {217, 4}, {217, 20}, {217, 36}, {217, 52}, - - //Key matrix (16 -> 83) - {224, 64}, {209, 64}, {194, 64}, {173, 64}, {156, 64}, {96 , 64}, {36 , 64}, {19 , 64}, {2 , 64}, - {8 , 48}, {31 , 48}, {46 , 48}, {61 , 48}, {76 , 48}, {91 , 48}, {106, 48}, {121, 48}, {136, 48}, {151, 48}, {166, 48}, {188, 48}, {210, 48}, {224, 48}, - {224, 32}, {200, 32}, {175, 32}, {160, 32}, {145, 32}, {130, 32}, {115, 32}, {100, 32}, {85 , 32}, {70 , 32}, {55 , 32}, {40 , 32}, {25 , 32}, {5 , 32}, - {3 , 16}, {21 , 16}, {36 , 16}, {51 , 16}, {66 , 16}, {81 , 16}, {96 , 16}, {111, 16}, {126, 16}, {141, 16}, {156, 16}, {171, 16}, {186, 16}, {205, 16}, {224, 16}, - {224, 0}, {202, 0}, {180, 0}, {165, 0}, {150, 0}, {135, 0}, {120, 0}, {105, 0}, {90 , 0}, {75 , 0}, {60 , 0}, {45 , 0}, {30 , 0}, {15 , 0}, {0 , 0}, -}, { - //Underglow (0 -> 15) - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - //Key matrix (16 -> 82) - 4, 4, 4, 1, 1, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, - 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, -} }; -#endif diff --git a/keyboards/mwstudio/mw75/keyboard.json b/keyboards/mwstudio/mw75/keyboard.json index 489e711c5b..4096bd943a 100644 --- a/keyboards/mwstudio/mw75/keyboard.json +++ b/keyboards/mwstudio/mw75/keyboard.json @@ -51,6 +51,105 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [5, 14], "x": 217, "y": 60, "flags": 1}, + {"matrix": [5, 13], "x": 203, "y": 60, "flags": 1}, + {"matrix": [5, 12], "x": 189, "y": 60, "flags": 1}, + {"matrix": [5, 11], "x": 166, "y": 60, "flags": 1}, + {"matrix": [5, 10], "x": 150, "y": 60, "flags": 1}, + {"matrix": [5, 6], "x": 95, "y": 60, "flags": 1}, + {"matrix": [5, 2], "x": 40, "y": 60, "flags": 1}, + {"matrix": [5, 1], "x": 24, "y": 60, "flags": 1}, + {"matrix": [5, 0], "x": 8, "y": 60, "flags": 1}, + {"matrix": [4, 14], "x": 217, "y": 50, "flags": 1}, + {"matrix": [4, 13], "x": 203, "y": 50, "flags": 1}, + {"matrix": [4, 12], "x": 184, "y": 50, "flags": 1}, + {"matrix": [4, 11], "x": 165, "y": 50, "flags": 1}, + {"matrix": [4, 10], "x": 151, "y": 50, "flags": 1}, + {"matrix": [4, 9], "x": 137, "y": 50, "flags": 1}, + {"matrix": [4, 8], "x": 123, "y": 50, "flags": 1}, + {"matrix": [4, 7], "x": 109, "y": 50, "flags": 1}, + {"matrix": [4, 6], "x": 95, "y": 50, "flags": 1}, + {"matrix": [4, 5], "x": 81, "y": 50, "flags": 1}, + {"matrix": [4, 4], "x": 67, "y": 50, "flags": 1}, + {"matrix": [4, 3], "x": 53, "y": 50, "flags": 1}, + {"matrix": [4, 2], "x": 39, "y": 50, "flags": 1}, + {"matrix": [4, 0], "x": 17, "y": 50, "flags": 1}, + {"matrix": [3, 14], "x": 217, "y": 40, "flags": 1}, + {"matrix": [3, 13], "x": 195, "y": 40, "flags": 1}, + {"matrix": [3, 11], "x": 172, "y": 40, "flags": 1}, + {"matrix": [3, 10], "x": 158, "y": 40, "flags": 1}, + {"matrix": [3, 9], "x": 144, "y": 40, "flags": 1}, + {"matrix": [3, 8], "x": 130, "y": 40, "flags": 1}, + {"matrix": [3, 7], "x": 116, "y": 40, "flags": 1}, + {"matrix": [3, 6], "x": 102, "y": 40, "flags": 1}, + {"matrix": [3, 5], "x": 88, "y": 40, "flags": 1}, + {"matrix": [3, 4], "x": 74, "y": 40, "flags": 1}, + {"matrix": [3, 3], "x": 60, "y": 40, "flags": 1}, + {"matrix": [3, 2], "x": 46, "y": 40, "flags": 1}, + {"matrix": [3, 1], "x": 32, "y": 40, "flags": 1}, + {"matrix": [3, 0], "x": 13, "y": 40, "flags": 1}, + {"matrix": [2, 14], "x": 217, "y": 30, "flags": 1}, + {"matrix": [2, 13], "x": 199, "y": 30, "flags": 1}, + {"matrix": [2, 12], "x": 181, "y": 30, "flags": 1}, + {"matrix": [2, 11], "x": 165, "y": 30, "flags": 1}, + {"matrix": [2, 10], "x": 151, "y": 30, "flags": 1}, + {"matrix": [2, 9], "x": 137, "y": 30, "flags": 1}, + {"matrix": [2, 8], "x": 123, "y": 30, "flags": 1}, + {"matrix": [2, 7], "x": 109, "y": 30, "flags": 1}, + {"matrix": [2, 6], "x": 95, "y": 30, "flags": 1}, + {"matrix": [2, 5], "x": 81, "y": 30, "flags": 1}, + {"matrix": [2, 4], "x": 67, "y": 30, "flags": 1}, + {"matrix": [2, 3], "x": 53, "y": 30, "flags": 1}, + {"matrix": [2, 2], "x": 39, "y": 30, "flags": 1}, + {"matrix": [2, 1], "x": 25, "y": 30, "flags": 1}, + {"matrix": [2, 0], "x": 9, "y": 30, "flags": 1}, + {"matrix": [1, 14], "x": 217, "y": 20, "flags": 1}, + {"matrix": [1, 13], "x": 196, "y": 20, "flags": 1}, + {"matrix": [1, 12], "x": 175, "y": 20, "flags": 1}, + {"matrix": [1, 11], "x": 161, "y": 20, "flags": 1}, + {"matrix": [1, 10], "x": 147, "y": 20, "flags": 1}, + {"matrix": [1, 9], "x": 133, "y": 20, "flags": 1}, + {"matrix": [1, 8], "x": 119, "y": 20, "flags": 1}, + {"matrix": [1, 7], "x": 105, "y": 20, "flags": 1}, + {"matrix": [1, 6], "x": 91, "y": 20, "flags": 1}, + {"matrix": [1, 5], "x": 77, "y": 20, "flags": 1}, + {"matrix": [1, 4], "x": 63, "y": 20, "flags": 1}, + {"matrix": [1, 3], "x": 49, "y": 20, "flags": 1}, + {"matrix": [1, 2], "x": 35, "y": 20, "flags": 1}, + {"matrix": [1, 1], "x": 21, "y": 20, "flags": 1}, + {"matrix": [1, 0], "x": 7, "y": 20, "flags": 1}, + {"matrix": [0, 14], "x": 217, "y": 5, "flags": 1}, + {"matrix": [0, 13], "x": 196, "y": 5, "flags": 1}, + {"matrix": [0, 12], "x": 182, "y": 5, "flags": 1}, + {"matrix": [0, 11], "x": 168, "y": 5, "flags": 1}, + {"matrix": [0, 10], "x": 154, "y": 5, "flags": 1}, + {"matrix": [0, 9], "x": 133, "y": 5, "flags": 1}, + {"matrix": [0, 8], "x": 119, "y": 5, "flags": 1}, + {"matrix": [0, 7], "x": 105, "y": 5, "flags": 1}, + {"matrix": [0, 6], "x": 91, "y": 5, "flags": 1}, + {"matrix": [0, 5], "x": 70, "y": 5, "flags": 1}, + {"matrix": [0, 4], "x": 56, "y": 5, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 5, "flags": 1}, + {"matrix": [0, 2], "x": 28, "y": 5, "flags": 1}, + {"matrix": [0, 1], "x": 7, "y": 5, "flags": 1}, + {"matrix": [0, 0], "x": 14, "y": 14, "flags": 1}, + {"matrix": [6, 0], "x": 42, "y": 14, "flags": 1}, + {"matrix": [6, 1], "x": 98, "y": 14, "flags": 1}, + {"matrix": [6, 2], "x": 154, "y": 14, "flags": 1}, + {"matrix": [6, 3], "x": 182, "y": 14, "flags": 1}, + {"matrix": [6, 4], "x": 210, "y": 14, "flags": 1}, + {"matrix": [6, 5], "x": 210, "y": 25, "flags": 1}, + {"matrix": [6, 6], "x": 210, "y": 40, "flags": 1}, + {"matrix": [6, 7], "x": 210, "y": 55, "flags": 1}, + {"matrix": [6, 8], "x": 182, "y": 55, "flags": 1}, + {"matrix": [6, 9], "x": 126, "y": 55, "flags": 1}, + {"matrix": [6, 10], "x": 98, "y": 55, "flags": 1}, + {"matrix": [6, 11], "x": 42, "y": 55, "flags": 1}, + {"matrix": [6, 12], "x": 14, "y": 55, "flags": 1}, + {"matrix": [6, 13], "x": 14, "y": 40, "flags": 1}, + {"matrix": [6, 14], "x": 14, "y": 25, "flags": 1} + ], "max_brightness": 200 }, "features": { diff --git a/keyboards/mwstudio/mw75/mw75.c b/keyboards/mwstudio/mw75/mw75.c deleted file mode 100644 index dda51cb971..0000000000 --- a/keyboards/mwstudio/mw75/mw75.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2021 TW59420 - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67 }, - { 66, 65, 64, 63, 62, 61, 60, 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, NO_LED, 24, 23 }, - { 22, NO_LED, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9 }, - { 8, 7, 6, NO_LED, NO_LED, NO_LED, 5, NO_LED, NO_LED, NO_LED, 4, 3, 2, 1, 0 }, - { 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 } -}, { - { 217, 60 }, { 203, 60 }, { 189, 60 }, { 166, 60 }, { 150, 60 }, { 95, 60 }, { 40, 60 }, { 24, 60 }, { 8, 60 }, - { 217, 50 }, { 203, 50 }, { 184, 50 }, { 165, 50 }, { 151, 50 }, { 137, 50 }, { 123, 50 }, { 109, 50 }, { 95, 50 }, { 81, 50 }, { 67, 50 }, { 53, 50 }, { 39, 50 }, { 17, 50 }, - { 217, 40 }, { 195, 40 }, { 172, 40 }, { 158, 40 }, { 144, 40 }, { 130, 40 }, { 116, 40 }, { 102, 40 }, { 88, 40 }, { 74, 40 }, { 60, 40 }, { 46, 40 }, { 32, 40 }, { 13, 40 }, - { 217, 30 }, { 199, 30 }, { 181, 30 }, { 165, 30 }, { 151, 30 }, { 137, 30 }, { 123, 30 }, { 109, 30 }, { 95, 30 }, { 81, 30 }, { 67, 30 }, { 53, 30 }, { 39, 30 }, { 25, 30 }, { 9, 30 }, - { 217, 20 }, { 196, 20 }, { 175, 20 }, { 161, 20 }, { 147, 20 }, { 133, 20 }, { 119, 20 }, { 105, 20 }, { 91, 20 }, { 77, 20 }, { 63, 20 }, { 49, 20 }, { 35, 20 }, { 21, 20 }, { 7, 20 }, - { 217, 5 }, { 196, 5 }, { 182, 5 }, { 168, 5 }, { 154, 5 }, { 133, 5 }, { 119, 5 }, { 105, 5 }, { 91, 5 }, { 70, 5 }, { 56, 5 }, { 42, 5 }, { 28, 5 }, { 7, 5 }, - - { 14, 14 }, { 42, 14 }, { 98, 14 }, { 154, 14 }, { 182, 14 }, { 210, 14 }, { 210, 25 }, { 210, 40 }, - { 210, 55 },{ 182, 55 },{ 126, 55 },{ 98, 55 }, { 42, 55 }, { 14, 55 }, { 14, 40 }, { 14, 25 } -}, { - 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -} }; -#endif diff --git a/keyboards/mwstudio/mw75r2/keyboard.json b/keyboards/mwstudio/mw75r2/keyboard.json index 10c6a226ca..6cb4269400 100644 --- a/keyboards/mwstudio/mw75r2/keyboard.json +++ b/keyboards/mwstudio/mw75r2/keyboard.json @@ -39,7 +39,30 @@ "pixel_fractal": true, "pixel_rain": true }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"x": 105, "y": 60, "flags": 1}, + {"x": 70, "y": 60, "flags": 1}, + {"x": 35, "y": 60, "flags": 1}, + {"x": 0, "y": 60, "flags": 1}, + {"x": 0, "y": 40, "flags": 1}, + {"x": 0, "y": 20, "flags": 1}, + {"x": 0, "y": 0, "flags": 1}, + {"x": 42, "y": 0, "flags": 1}, + {"x": 84, "y": 0, "flags": 1}, + {"x": 126, "y": 0, "flags": 1}, + {"x": 168, "y": 0, "flags": 1}, + {"x": 210, "y": 0, "flags": 1}, + {"x": 210, "y": 20, "flags": 1}, + {"x": 210, "y": 40, "flags": 1}, + {"x": 40, "y": 20, "flags": 1}, + {"x": 120, "y": 20, "flags": 1}, + {"x": 40, "y": 40, "flags": 1}, + {"x": 120, "y": 40, "flags": 1}, + {"x": 210, "y": 60, "flags": 1}, + {"x": 175, "y": 60, "flags": 1}, + {"x": 140, "y": 60, "flags": 1} + ] }, "features": { "bootmagic": true, diff --git a/keyboards/mwstudio/mw75r2/mw75r2.c b/keyboards/mwstudio/mw75r2/mw75r2.c deleted file mode 100644 index ca058e9d8d..0000000000 --- a/keyboards/mwstudio/mw75r2/mw75r2.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2021 TW59420 - * - * 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 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 } -}, { - { 105, 60 }, { 70, 60 }, { 35, 60 }, { 0, 60 }, { 0, 40 }, { 0, 20 }, { 0, 0 }, { 42, 0 }, { 84, 0 }, { 126, 0 }, { 168, 0 }, { 210, 0 }, { 210, 20 }, { 210, 40 }, { 40, 20 }, { 120, 20 }, { 40, 40 }, { 120, 40 }, { 210, 60 }, { 175, 60 },{ 140, 60 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -} }; -#endif From 04978d490ab785e42c0dbb7c79954e6a1a5ce80b Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:09:38 -0600 Subject: [PATCH 24/95] Migrate `g_led_config` to DD (M2) (#25619) --- keyboards/melgeek/mach80/rev1/keyboard.json | 103 +++++++++++++++++- keyboards/melgeek/mach80/rev1/rev1.c | 25 ----- keyboards/melgeek/mach80/rev2/keyboard.json | 100 ++++++++++++++++- keyboards/melgeek/mach80/rev2/rev2.c | 26 ----- keyboards/melgeek/mj61/rev1/keyboard.json | 69 +++++++++++- keyboards/melgeek/mj61/rev1/rev1.c | 24 ---- keyboards/melgeek/mj61/rev2/keyboard.json | 77 ++++++++++++- keyboards/melgeek/mj61/rev2/rev2.c | 24 ---- keyboards/melgeek/mj63/rev1/keyboard.json | 71 +++++++++++- keyboards/melgeek/mj63/rev1/rev1.c | 24 ---- keyboards/melgeek/mj63/rev2/keyboard.json | 77 ++++++++++++- keyboards/melgeek/mj63/rev2/rev2.c | 24 ---- keyboards/melgeek/mj64/rev1/keyboard.json | 70 +++++++++++- keyboards/melgeek/mj64/rev1/rev1.c | 23 ---- keyboards/melgeek/mj64/rev2/keyboard.json | 72 +++++++++++- keyboards/melgeek/mj64/rev2/rev2.c | 24 ---- keyboards/melgeek/mj64/rev3/keyboard.json | 78 ++++++++++++- keyboards/melgeek/mj64/rev3/rev3.c | 24 ---- keyboards/melgeek/mj65/rev3/keyboard.json | 78 +++++++++++++ keyboards/melgeek/mj65/rev3/rev3.c | 26 +---- keyboards/melgeek/mojo68/rev1/keyboard.json | 70 ++++++++++++ keyboards/melgeek/mojo68/rev1/rev1.c | 23 ---- keyboards/melgeek/mojo75/rev1/keyboard.json | 94 ++++++++++++++++ keyboards/melgeek/mojo75/rev1/rev1.c | 27 ----- keyboards/melgeek/tegic/rev1/keyboard.json | 93 ++++++++++++++++ keyboards/melgeek/tegic/rev1/rev1.c | 25 ----- keyboards/melgeek/z70ultra/rev1/keyboard.json | 71 ++++++++++++ keyboards/melgeek/z70ultra/rev1/rev1.c | 25 ----- 28 files changed, 1115 insertions(+), 352 deletions(-) diff --git a/keyboards/melgeek/mach80/rev1/keyboard.json b/keyboards/melgeek/mach80/rev1/keyboard.json index 78a8dbf0f6..7faa507606 100644 --- a/keyboards/melgeek/mach80/rev1/keyboard.json +++ b/keyboards/melgeek/mach80/rev1/keyboard.json @@ -13,5 +13,106 @@ "cols": ["B0", "B1", "B2", "B3", "D2", "D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "D3"], "rows": ["F0", "F1", "F4", "F5", "F6", "E6"] }, - "diode_direction": "ROW2COL" + "diode_direction": "ROW2COL", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 12, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 24, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 36, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 72, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 108, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 156, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 168, "y": 0, "flags": 4}, + {"matrix": [3, 13], "x": 180, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 12, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 48, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 60, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 72, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 84, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 96, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 108, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 120, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 132, "y": 12, "flags": 4}, + {"matrix": [1, 12], "x": 144, "y": 12, "flags": 4}, + {"x": 156, "y": 12, "flags": 4}, + {"matrix": [1, 13], "x": 168, "y": 12, "flags": 4}, + {"x": 180, "y": 12, "flags": 4}, + {"matrix": [1, 14], "x": 192, "y": 12, "flags": 4}, + {"matrix": [1, 15], "x": 204, "y": 12, "flags": 4}, + {"matrix": [3, 14], "x": 216, "y": 12, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 24, "flags": 4}, + {"matrix": [2, 1], "x": 12, "y": 24, "flags": 4}, + {"matrix": [2, 2], "x": 24, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 24, "flags": 4}, + {"matrix": [2, 4], "x": 48, "y": 24, "flags": 4}, + {"matrix": [2, 5], "x": 60, "y": 24, "flags": 4}, + {"matrix": [2, 6], "x": 72, "y": 24, "flags": 4}, + {"matrix": [2, 7], "x": 84, "y": 24, "flags": 4}, + {"matrix": [2, 8], "x": 96, "y": 24, "flags": 4}, + {"matrix": [2, 9], "x": 108, "y": 24, "flags": 4}, + {"matrix": [2, 10], "x": 120, "y": 24, "flags": 4}, + {"matrix": [2, 11], "x": 132, "y": 24, "flags": 4}, + {"matrix": [2, 12], "x": 144, "y": 24, "flags": 4}, + {"matrix": [2, 13], "x": 156, "y": 24, "flags": 4}, + {"matrix": [2, 14], "x": 168, "y": 24, "flags": 4}, + {"matrix": [2, 15], "x": 180, "y": 24, "flags": 4}, + {"matrix": [3, 15], "x": 192, "y": 24, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 36, "flags": 4}, + {"matrix": [3, 1], "x": 12, "y": 36, "flags": 4}, + {"matrix": [3, 2], "x": 24, "y": 36, "flags": 4}, + {"matrix": [3, 3], "x": 36, "y": 36, "flags": 4}, + {"matrix": [3, 4], "x": 48, "y": 36, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 36, "flags": 4}, + {"matrix": [3, 6], "x": 72, "y": 36, "flags": 4}, + {"matrix": [3, 7], "x": 84, "y": 36, "flags": 4}, + {"matrix": [3, 8], "x": 96, "y": 36, "flags": 4}, + {"matrix": [3, 9], "x": 108, "y": 36, "flags": 4}, + {"matrix": [3, 10], "x": 120, "y": 36, "flags": 4}, + {"matrix": [3, 11], "x": 132, "y": 36, "flags": 4}, + {"x": 144, "y": 36, "flags": 4}, + {"matrix": [3, 12], "x": 156, "y": 36, "flags": 4}, + {"x": 168, "y": 36, "flags": 4}, + {"x": 0, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 12, "y": 48, "flags": 4}, + {"x": 24, "y": 48, "flags": 4}, + {"matrix": [4, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [4, 2], "x": 48, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 60, "y": 48, "flags": 4}, + {"matrix": [4, 4], "x": 72, "y": 48, "flags": 4}, + {"matrix": [4, 5], "x": 84, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [4, 7], "x": 108, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 120, "y": 48, "flags": 4}, + {"matrix": [4, 9], "x": 132, "y": 48, "flags": 4}, + {"matrix": [4, 10], "x": 144, "y": 48, "flags": 4}, + {"x": 156, "y": 48, "flags": 4}, + {"matrix": [4, 11], "x": 168, "y": 48, "flags": 4}, + {"x": 180, "y": 48, "flags": 4}, + {"matrix": [4, 14], "x": 192, "y": 48, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 60, "flags": 4}, + {"matrix": [5, 1], "x": 12, "y": 60, "flags": 4}, + {"matrix": [5, 2], "x": 24, "y": 60, "flags": 4}, + {"x": 36, "y": 60, "flags": 4}, + {"matrix": [5, 5], "x": 48, "y": 60, "flags": 4}, + {"x": 60, "y": 60, "flags": 4}, + {"matrix": [5, 9], "x": 72, "y": 60, "flags": 4}, + {"matrix": [5, 10], "x": 84, "y": 60, "flags": 4}, + {"matrix": [5, 11], "x": 96, "y": 60, "flags": 4}, + {"matrix": [5, 12], "x": 108, "y": 60, "flags": 4}, + {"matrix": [5, 13], "x": 120, "y": 60, "flags": 4}, + {"matrix": [5, 14], "x": 132, "y": 60, "flags": 4}, + {"matrix": [5, 15], "x": 144, "y": 60, "flags": 4} + ], + } } diff --git a/keyboards/melgeek/mach80/rev1/rev1.c b/keyboards/melgeek/mach80/rev1/rev1.c index a4b49610cc..aad1b71833 100755 --- a/keyboards/melgeek/mach80/rev1/rev1.c +++ b/keyboards/melgeek/mach80/rev1/rev1.c @@ -118,31 +118,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW6_CS39, SW6_CS38, SW6_CS37}, /* RGB111 */ {0, SW7_CS39, SW7_CS38, SW7_CS37}, /* RGB112 */ }; -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 */ - { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, /* R0 */ - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33 }, /* R1 */ - { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 }, /* R2 */ - { 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 15, 34, 51 }, /* R3 */ - { 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, NO_LED, NO_LED, 83, NO_LED }, /* R4 */ - { 84, 85, 86, NO_LED, NO_LED, 88, NO_LED, NO_LED, NO_LED, 90, 91, 92, 93, 94, 95, 96 } /* R5 */ - }, { - {0, 0}, {12, 0}, {24, 0}, {36, 0}, {48, 0}, {60, 0}, {72, 0}, {84, 0}, {96, 0}, {108, 0}, {120, 0}, {132, 0}, {144, 0}, {156, 0}, {168, 0}, {180, 0}, //16 - {0, 12}, {12, 12}, {24, 12}, {36, 12}, {48, 12}, {60, 12}, {72, 12}, {84, 12}, {96, 12}, {108, 12}, {120, 12}, {132, 12}, {144, 12}, {156, 12}, {168, 12}, {180, 12}, {192, 12}, {204, 12}, {216, 12}, //19 - {0, 24}, {12, 24}, {24, 24}, {36, 24}, {48, 24}, {60, 24}, {72, 24}, {84, 24}, {96, 24}, {108, 24}, {120, 24}, {132, 24}, {144, 24}, {156, 24}, {168, 24}, {180, 24}, {192, 24}, //17 - {0, 36}, {12, 36}, {24, 36}, {36, 36}, {48, 36}, {60, 36}, {72, 36}, {84, 36}, {96, 36}, {108, 36}, {120, 36}, {132, 36}, {144, 36}, {156, 36}, {168, 36}, //15 - {0, 48}, {12, 48}, {24, 48}, {36, 48}, {48, 48}, {60, 48}, {72, 48}, {84, 48}, {96, 48}, {108, 48}, {120, 48}, {132, 48}, {144, 48}, {156, 48}, {168, 48}, {180, 48}, {192, 48}, //17 - {0, 60}, {12, 60}, {24, 60}, {36, 60}, {48, 60}, {60, 60}, {72, 60}, {84, 60}, {96, 60}, {108, 60}, {120, 60}, {132, 60}, {144, 60} //13 - }, { - 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, 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, 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, - } -}; const is31fl3741_led_t g_is31_indicator_leds[3] = { {0, SW1_CS6, SW1_CS5, SW1_CS4}, /* RGB107 */ diff --git a/keyboards/melgeek/mach80/rev2/keyboard.json b/keyboards/melgeek/mach80/rev2/keyboard.json index 78a8dbf0f6..039e1711fd 100644 --- a/keyboards/melgeek/mach80/rev2/keyboard.json +++ b/keyboards/melgeek/mach80/rev2/keyboard.json @@ -13,5 +13,103 @@ "cols": ["B0", "B1", "B2", "B3", "D2", "D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "D3"], "rows": ["F0", "F1", "F4", "F5", "F6", "E6"] }, - "diode_direction": "ROW2COL" + "diode_direction": "ROW2COL", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 12, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 24, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 36, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 72, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 108, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 156, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 168, "y": 0, "flags": 4}, + {"matrix": [3, 13], "x": 180, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 12, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 48, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 60, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 72, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 84, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 96, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 108, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 120, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 132, "y": 12, "flags": 4}, + {"matrix": [1, 12], "x": 144, "y": 12, "flags": 4}, + {"x": 156, "y": 12, "flags": 4}, + {"matrix": [1, 13], "x": 168, "y": 12, "flags": 4}, + {"x": 180, "y": 12, "flags": 4}, + {"matrix": [1, 14], "x": 192, "y": 12, "flags": 4}, + {"matrix": [1, 15], "x": 204, "y": 12, "flags": 4}, + {"matrix": [3, 14], "x": 216, "y": 12, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 24, "flags": 4}, + {"matrix": [2, 1], "x": 12, "y": 24, "flags": 4}, + {"matrix": [2, 2], "x": 24, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 24, "flags": 4}, + {"matrix": [2, 4], "x": 48, "y": 24, "flags": 4}, + {"matrix": [2, 5], "x": 60, "y": 24, "flags": 4}, + {"matrix": [2, 6], "x": 72, "y": 24, "flags": 4}, + {"matrix": [2, 7], "x": 84, "y": 24, "flags": 4}, + {"matrix": [2, 8], "x": 96, "y": 24, "flags": 4}, + {"matrix": [2, 9], "x": 108, "y": 24, "flags": 4}, + {"matrix": [2, 10], "x": 120, "y": 24, "flags": 4}, + {"matrix": [2, 11], "x": 132, "y": 24, "flags": 4}, + {"matrix": [2, 12], "x": 144, "y": 24, "flags": 4}, + {"matrix": [2, 13], "x": 156, "y": 24, "flags": 4}, + {"matrix": [2, 14], "x": 168, "y": 24, "flags": 4}, + {"matrix": [2, 15], "x": 180, "y": 24, "flags": 4}, + {"matrix": [3, 15], "x": 192, "y": 24, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 36, "flags": 4}, + {"matrix": [3, 1], "x": 12, "y": 36, "flags": 4}, + {"matrix": [3, 2], "x": 24, "y": 36, "flags": 4}, + {"matrix": [3, 3], "x": 36, "y": 36, "flags": 4}, + {"matrix": [3, 4], "x": 48, "y": 36, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 36, "flags": 4}, + {"matrix": [3, 6], "x": 72, "y": 36, "flags": 4}, + {"matrix": [3, 7], "x": 84, "y": 36, "flags": 4}, + {"matrix": [3, 8], "x": 96, "y": 36, "flags": 4}, + {"matrix": [3, 9], "x": 108, "y": 36, "flags": 4}, + {"matrix": [3, 10], "x": 120, "y": 36, "flags": 4}, + {"matrix": [3, 11], "x": 132, "y": 36, "flags": 4}, + {"x": 144, "y": 36, "flags": 4}, + {"matrix": [3, 12], "x": 156, "y": 36, "flags": 4}, + {"x": 168, "y": 36, "flags": 4}, + {"x": 0, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 12, "y": 48, "flags": 4}, + {"x": 24, "y": 48, "flags": 4}, + {"matrix": [4, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [4, 2], "x": 48, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 60, "y": 48, "flags": 4}, + {"matrix": [4, 4], "x": 72, "y": 48, "flags": 4}, + {"matrix": [4, 5], "x": 84, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [4, 7], "x": 108, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 120, "y": 48, "flags": 4}, + {"matrix": [4, 9], "x": 132, "y": 48, "flags": 4}, + {"matrix": [4, 10], "x": 144, "y": 48, "flags": 4}, + {"x": 156, "y": 48, "flags": 4}, + {"matrix": [4, 11], "x": 168, "y": 48, "flags": 4}, + {"x": 180, "y": 48, "flags": 4}, + {"matrix": [4, 14], "x": 192, "y": 48, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 60, "flags": 4}, + {"matrix": [5, 2], "x": 12, "y": 60, "flags": 4}, + {"x": 24, "y": 60, "flags": 4}, + {"matrix": [5, 5], "x": 36, "y": 60, "flags": 4}, + {"x": 48, "y": 60, "flags": 4}, + {"matrix": [5, 9], "x": 60, "y": 60, "flags": 4}, + {"matrix": [5, 12], "x": 72, "y": 60, "flags": 4}, + {"matrix": [5, 13], "x": 84, "y": 60, "flags": 4}, + {"matrix": [5, 14], "x": 96, "y": 60, "flags": 4}, + {"matrix": [5, 15], "x": 108, "y": 60, "flags": 4} + ], + } } diff --git a/keyboards/melgeek/mach80/rev2/rev2.c b/keyboards/melgeek/mach80/rev2/rev2.c index 1a759f38c6..63fbbbedfc 100755 --- a/keyboards/melgeek/mach80/rev2/rev2.c +++ b/keyboards/melgeek/mach80/rev2/rev2.c @@ -115,32 +115,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW9_CS24, SW9_CS23, SW9_CS22}, /* RGB54 */ {0, SW4_CS39, SW4_CS38, SW4_CS37}, /* RGB101 */ }; -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 */ - { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, /* R0 */ - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33 }, /* R1 */ - { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 }, /* R2 */ - { 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 15, 34, 51 }, /* R3 */ - { 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, NO_LED, NO_LED, 83, NO_LED }, /* R4 */ - { 84, NO_LED, 85, NO_LED, NO_LED, 87, NO_LED, NO_LED, NO_LED, 89, NO_LED, NO_LED, 90, 91, 92, 93 } /* R5 */ - }, { - {0, 0}, {12, 0}, {24, 0}, {36, 0}, {48, 0}, {60, 0}, {72, 0}, {84, 0}, {96, 0}, {108, 0}, {120, 0}, {132, 0}, {144, 0}, {156, 0}, {168, 0}, {180, 0}, //16 - {0, 12}, {12, 12}, {24, 12}, {36, 12}, {48, 12}, {60, 12}, {72, 12}, {84, 12}, {96, 12}, {108, 12}, {120, 12}, {132, 12}, {144, 12}, {156, 12}, {168, 12}, {180, 12}, {192, 12}, {204, 12}, {216, 12}, //19 - {0, 24}, {12, 24}, {24, 24}, {36, 24}, {48, 24}, {60, 24}, {72, 24}, {84, 24}, {96, 24}, {108, 24}, {120, 24}, {132, 24}, {144, 24}, {156, 24}, {168, 24}, {180, 24}, {192, 24}, //17 - {0, 36}, {12, 36}, {24, 36}, {36, 36}, {48, 36}, {60, 36}, {72, 36}, {84, 36}, {96, 36}, {108, 36}, {120, 36}, {132, 36}, {144, 36}, {156, 36}, {168, 36}, //15 - {0, 48}, {12, 48}, {24, 48}, {36, 48}, {48, 48}, {60, 48}, {72, 48}, {84, 48}, {96, 48}, {108, 48}, {120, 48}, {132, 48}, {144, 48}, {156, 48}, {168, 48}, {180, 48}, {192, 48}, //17 - {0, 60}, {12, 60}, {24, 60}, {36, 60}, {48, 60}, {60, 60}, {72, 60}, {84, 60}, {96, 60}, {108, 60} - //10 - }, { - 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, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - } -}; const is31fl3741_led_t g_is31_indicator_leds[3] = { {0, SW1_CS6, SW1_CS5, SW1_CS4}, /* RGB107 */ diff --git a/keyboards/melgeek/mj61/rev1/keyboard.json b/keyboards/melgeek/mj61/rev1/keyboard.json index b388908579..e8dedb8ea5 100644 --- a/keyboards/melgeek/mj61/rev1/keyboard.json +++ b/keyboards/melgeek/mj61/rev1/keyboard.json @@ -10,5 +10,72 @@ "cols": ["B15", "A8", "A10", "A15", "B3", "B4", "B5", "B8", "B9", "C13", "C14", "C15", "A0", "A1"], "rows": ["B12", "B11", "B10", "B1", "A3"] }, - "diode_direction": "COL2ROW" + "diode_direction": "COL2ROW", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [1, 13], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 208, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4}, + {"matrix": [3, 12], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 176, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 144, "y": 64, "flags": 4} + ], + } } diff --git a/keyboards/melgeek/mj61/rev1/rev1.c b/keyboards/melgeek/mj61/rev1/rev1.c index 8e0be62127..d543ad60c0 100644 --- a/keyboards/melgeek/mj61/rev1/rev1.c +++ b/keyboards/melgeek/mj61/rev1/rev1.c @@ -82,28 +82,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW8_CS30, SW8_CS29, SW8_CS28}, /* RGB62 */ {0, SW9_CS30, SW9_CS29, SW9_CS28}, /* RGB63 */ }; - -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, /* R0 */ - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, /* R1 */ - { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED,}, /* R2 */ - { 52, NO_LED, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED }, /* R3 */ - { 53, 54, NO_LED, 55, 61, 56, 62, NO_LED, NO_LED, 57, 58, 59, 60, NO_LED }, /* R4 */ - }, { - {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}, {208, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 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, 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 diff --git a/keyboards/melgeek/mj61/rev2/keyboard.json b/keyboards/melgeek/mj61/rev2/keyboard.json index fcff9e10a5..da6c60d7ed 100644 --- a/keyboards/melgeek/mj61/rev2/keyboard.json +++ b/keyboards/melgeek/mj61/rev2/keyboard.json @@ -10,5 +10,80 @@ "cols": ["B15", "A8", "B13", "A15", "B3", "B4", "B5", "B8", "B9", "C13", "C14", "C15", "A0", "A1"], "rows": ["B12", "B11", "B10", "B1", "A3"] }, - "diode_direction": "COL2ROW" + "diode_direction": "COL2ROW", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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}, + {"x": 208, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 224, "y": 0, "flags": 4}, + {"x": 240, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 208, "y": 32, "flags": 4}, + {"x": 224, "y": 32, "flags": 4}, + {"x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 16, "y": 48, "flags": 4}, + {"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}, + {"x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 224, "y": 48, "flags": 4}, + {"x": 240, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 32, "y": 64, "flags": 4}, + {"x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 64, "y": 64, "flags": 4}, + {"x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 144, "y": 64, "flags": 4} + ] + } } diff --git a/keyboards/melgeek/mj61/rev2/rev2.c b/keyboards/melgeek/mj61/rev2/rev2.c index 7b27fa44c3..e936998ace 100644 --- a/keyboards/melgeek/mj61/rev2/rev2.c +++ b/keyboards/melgeek/mj61/rev2/rev2.c @@ -92,28 +92,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW9_CS21, SW9_CS20, SW9_CS19}, /* RGB42 */ {0, SW8_CS30, SW8_CS29, SW8_CS28}, /* RGB71 */ }; - -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14 }, /* R0 */ - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, /* R1 */ - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, NO_LED }, /* R2 */ - { 46, NO_LED, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, NO_LED }, /* R3 */ - { 61, 62, NO_LED, 63, NO_LED, 65, NO_LED, NO_LED, NO_LED, 67, 68, 69, NO_LED, 70 }, /* R4 */ - }, { - {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}, {208, 0}, {224, 0}, {240, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, {224, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, {224, 48}, {240, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 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, 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 diff --git a/keyboards/melgeek/mj63/rev1/keyboard.json b/keyboards/melgeek/mj63/rev1/keyboard.json index b388908579..0d0759910e 100644 --- a/keyboards/melgeek/mj63/rev1/keyboard.json +++ b/keyboards/melgeek/mj63/rev1/keyboard.json @@ -10,5 +10,74 @@ "cols": ["B15", "A8", "A10", "A15", "B3", "B4", "B5", "B8", "B9", "C13", "C14", "C15", "A0", "A1"], "rows": ["B12", "B11", "B10", "B1", "A3"] }, - "diode_direction": "COL2ROW" + "diode_direction": "COL2ROW", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [1, 13], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 208, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4}, + {"matrix": [3, 13], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 192, "y": 48, "flags": 4}, + {"matrix": [4, 13], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 144, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 160, "y": 64, "flags": 4} + ] + } } diff --git a/keyboards/melgeek/mj63/rev1/rev1.c b/keyboards/melgeek/mj63/rev1/rev1.c index d6caeac0c1..bdd7f34352 100644 --- a/keyboards/melgeek/mj63/rev1/rev1.c +++ b/keyboards/melgeek/mj63/rev1/rev1.c @@ -86,28 +86,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW1_CS27, SW1_CS26, SW1_CS25}, /* RGB65 */ {0, SW5_CS30, SW5_CS29, SW5_CS28}, /* RGB66 */ }; - -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, /* R0 */ - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, /* R1 */ - { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED }, /* R2 */ - { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, NO_LED, 43, 42, 41 }, /* R3 */ - { 61, 60, 59, NO_LED, 64, 62, 63, NO_LED, NO_LED, 58, 57, 56, 55, 54 }, /* R4 */ - }, { - {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}, {208, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, {160, 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, 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 diff --git a/keyboards/melgeek/mj63/rev2/keyboard.json b/keyboards/melgeek/mj63/rev2/keyboard.json index fcff9e10a5..8140afe4b8 100644 --- a/keyboards/melgeek/mj63/rev2/keyboard.json +++ b/keyboards/melgeek/mj63/rev2/keyboard.json @@ -10,5 +10,80 @@ "cols": ["B15", "A8", "B13", "A15", "B3", "B4", "B5", "B8", "B9", "C13", "C14", "C15", "A0", "A1"], "rows": ["B12", "B11", "B10", "B1", "A3"] }, - "diode_direction": "COL2ROW" + "diode_direction": "COL2ROW", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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}, + {"x": 208, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 224, "y": 0, "flags": 4}, + {"x": 240, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 208, "y": 32, "flags": 4}, + {"x": 224, "y": 32, "flags": 4}, + {"x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 16, "y": 48, "flags": 4}, + {"x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 9], "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": 0, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 32, "y": 64, "flags": 4}, + {"x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 64, "y": 64, "flags": 4}, + {"x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 144, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 160, "y": 64, "flags": 4} + ], + } } diff --git a/keyboards/melgeek/mj63/rev2/rev2.c b/keyboards/melgeek/mj63/rev2/rev2.c index 95f0b28f5d..20dfaaf684 100644 --- a/keyboards/melgeek/mj63/rev2/rev2.c +++ b/keyboards/melgeek/mj63/rev2/rev2.c @@ -92,28 +92,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW8_CS30, SW8_CS29, SW8_CS28}, /* RGB71 */ {0, SW9_CS30, SW9_CS29, SW9_CS28}, /* RGB72 */ }; - -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14 }, /* R0 */ - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, /* R1 */ - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, NO_LED }, /* R2 */ - { 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, NO_LED, 57, 58, 59 }, /* R3 */ - { 60, 61, 62, NO_LED, NO_LED, 64, NO_LED, NO_LED, NO_LED, 66, 67, 68, 69, 70 }, /* R4 */ - }, { - {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}, {208, 0}, {224, 0}, {240, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, {224, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, {224, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, {160, 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, 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 diff --git a/keyboards/melgeek/mj64/rev1/keyboard.json b/keyboards/melgeek/mj64/rev1/keyboard.json index b388908579..bddfc0bef5 100644 --- a/keyboards/melgeek/mj64/rev1/keyboard.json +++ b/keyboards/melgeek/mj64/rev1/keyboard.json @@ -10,5 +10,73 @@ "cols": ["B15", "A8", "A10", "A15", "B3", "B4", "B5", "B8", "B9", "C13", "C14", "C15", "A0", "A1"], "rows": ["B12", "B11", "B10", "B1", "A3"] }, - "diode_direction": "COL2ROW" + "diode_direction": "COL2ROW", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [1, 13], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 208, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4}, + {"matrix": [3, 13], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 208, "y": 48, "flags": 4}, + {"matrix": [4, 13], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 144, "y": 64, "flags": 4} + ] + } } diff --git a/keyboards/melgeek/mj64/rev1/rev1.c b/keyboards/melgeek/mj64/rev1/rev1.c index ea3376a8c7..d5859cf5e4 100644 --- a/keyboards/melgeek/mj64/rev1/rev1.c +++ b/keyboards/melgeek/mj64/rev1/rev1.c @@ -84,27 +84,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW9_CS27, SW9_CS26, SW9_CS25}, /* RGB63 */ {0, SW1_CS30, SW1_CS29, SW1_CS28}, /* RGB64 */ }; - -led_config_t g_led_config = { - { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, - { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED }, - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41 }, - { 62, 61, 60, NO_LED, NO_LED, 63, NO_LED, NO_LED, NO_LED, 59, 58, 57, 56, 55 } - }, { - { 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 }, { 208, 0 }, - { 0, 16 }, { 16, 16 }, { 32, 16 }, { 48, 16 }, { 64, 16 }, { 80, 16 }, { 96, 16 }, { 112, 16 }, { 128, 16 }, { 144, 16 }, { 160, 16 }, { 176, 16 }, { 192, 16 }, { 208, 16 }, - { 0, 32 }, { 16, 32 }, { 32, 32 }, { 48, 32 }, { 64, 32 }, { 80, 32 }, { 96, 32 }, { 112, 32 }, { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 192, 32 }, - { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, { 96, 48 }, { 112, 48 }, { 128, 48 }, { 144, 48 }, { 160, 48 }, { 176, 48 }, { 192, 48 }, { 208, 48 }, - { 0, 64 }, { 16, 64 }, { 32, 64 }, { 48, 64 }, { 64, 64 }, { 96, 64 }, { 112, 64 }, { 128, 64 }, { 144, 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, 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 diff --git a/keyboards/melgeek/mj64/rev2/keyboard.json b/keyboards/melgeek/mj64/rev2/keyboard.json index b388908579..0a48604710 100644 --- a/keyboards/melgeek/mj64/rev2/keyboard.json +++ b/keyboards/melgeek/mj64/rev2/keyboard.json @@ -10,5 +10,75 @@ "cols": ["B15", "A8", "A10", "A15", "B3", "B4", "B5", "B8", "B9", "C13", "C14", "C15", "A0", "A1"], "rows": ["B12", "B11", "B10", "B1", "A3"] }, - "diode_direction": "COL2ROW" + "diode_direction": "COL2ROW", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [1, 13], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 208, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4}, + {"matrix": [3, 13], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 208, "y": 48, "flags": 4}, + {"matrix": [4, 13], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 144, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 160, "y": 64, "flags": 4} + ] + } } diff --git a/keyboards/melgeek/mj64/rev2/rev2.c b/keyboards/melgeek/mj64/rev2/rev2.c index 17947282ce..0a236374c7 100644 --- a/keyboards/melgeek/mj64/rev2/rev2.c +++ b/keyboards/melgeek/mj64/rev2/rev2.c @@ -86,28 +86,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW1_CS27, SW1_CS26, SW1_CS25}, /* RGB65 */ {0, SW5_CS30, SW5_CS29, SW5_CS28}, /* RGB66 */ }; - -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, /* R0 */ - { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, /* R1 */ - { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED }, /* R2 */ - { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41 }, /* R3 */ - { 62, 61, 60, NO_LED, 64, 63, 65, NO_LED, NO_LED, 59, 58, 57, 56, 55 }, /* R4 */ - }, { - {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}, {208, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, {160, 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, 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 diff --git a/keyboards/melgeek/mj64/rev3/keyboard.json b/keyboards/melgeek/mj64/rev3/keyboard.json index fcff9e10a5..fdc0371c25 100644 --- a/keyboards/melgeek/mj64/rev3/keyboard.json +++ b/keyboards/melgeek/mj64/rev3/keyboard.json @@ -10,5 +10,81 @@ "cols": ["B15", "A8", "B13", "A15", "B3", "B4", "B5", "B8", "B9", "C13", "C14", "C15", "A0", "A1"], "rows": ["B12", "B11", "B10", "B1", "A3"] }, - "diode_direction": "COL2ROW" + "diode_direction": "COL2ROW", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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}, + {"x": 208, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 224, "y": 0, "flags": 4}, + {"x": 240, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 208, "y": 32, "flags": 4}, + {"x": 224, "y": 32, "flags": 4}, + {"x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 16, "y": 48, "flags": 4}, + {"x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 224, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 240, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 32, "y": 64, "flags": 4}, + {"x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 64, "y": 64, "flags": 4}, + {"x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 144, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 160, "y": 64, "flags": 4} + ] + } } diff --git a/keyboards/melgeek/mj64/rev3/rev3.c b/keyboards/melgeek/mj64/rev3/rev3.c index 8555082e7d..9bd58016b3 100644 --- a/keyboards/melgeek/mj64/rev3/rev3.c +++ b/keyboards/melgeek/mj64/rev3/rev3.c @@ -92,28 +92,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW8_CS30, SW8_CS29, SW8_CS28}, /* RGB71 */ {0, SW9_CS30, SW9_CS29, SW9_CS28}, /* RGB72 */ }; - -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14 }, /* R0 */ - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, /* R1 */ - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, NO_LED }, /* R2 */ - { 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 }, /* R3 */ - { 61, 62, 63, NO_LED, NO_LED, 65, NO_LED, NO_LED, NO_LED, 67, 68, 69, 70, 71 }, /* R4 */ - }, { - {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}, {208, 0}, {224, 0}, {240, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, {224, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, {224, 48}, {240, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, {160, 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, 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 diff --git a/keyboards/melgeek/mj65/rev3/keyboard.json b/keyboards/melgeek/mj65/rev3/keyboard.json index a4513b45e7..446e440d33 100644 --- a/keyboards/melgeek/mj65/rev3/keyboard.json +++ b/keyboards/melgeek/mj65/rev3/keyboard.json @@ -61,6 +61,84 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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}, + {"x": 208, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 224, "y": 0, "flags": 4}, + {"x": 240, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 255, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 240, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 255, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 144, "y": 32, "flags": 4}, + {"x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 32, "flags": 4}, + {"x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 208, "y": 32, "flags": 4}, + {"x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 16, "y": 48, "flags": 4}, + {"x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 0, "y": 64, "flags": 4}, + {"matrix": [3, 14], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 64, "y": 64, "flags": 4}, + {"x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 96, "y": 64, "flags": 4}, + {"x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 144, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 160, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 176, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/melgeek/mj65/rev3/rev3.c b/keyboards/melgeek/mj65/rev3/rev3.c index 0a020fad74..a6ef6359c0 100644 --- a/keyboards/melgeek/mj65/rev3/rev3.c +++ b/keyboards/melgeek/mj65/rev3/rev3.c @@ -96,28 +96,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW3_CS33, SW3_CS32, SW3_CS31}, /* RGB75 */ {0, SW4_CS33, SW4_CS32, SW4_CS31}, /* RGB76 */ }; - -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16 }, /* R0 */ - { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, /* R1 */ - { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, NO_LED, 47 }, /* R2 */ - { 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, NO_LED, 63 }, /* R3 */ - { 64, 65, 66, NO_LED, NO_LED, 68, NO_LED, NO_LED, NO_LED, 70, 71, 72, 73, 74, 75 }, /* R4 */ - }, { - {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}, {208, 0}, {224, 0}, {240, 0}, {255, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, {224, 16}, {240, 16}, {255, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {144, 64}, {160, 64}, {176, 64}, {192, 64}, {208, 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, 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, 4, 4, 4, 4, - } -}; - -#endif +#endif diff --git a/keyboards/melgeek/mojo68/rev1/keyboard.json b/keyboards/melgeek/mojo68/rev1/keyboard.json index 88f17665b4..db868c485a 100755 --- a/keyboards/melgeek/mojo68/rev1/keyboard.json +++ b/keyboards/melgeek/mojo68/rev1/keyboard.json @@ -56,6 +56,76 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 208, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 14], "x": 208, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 144, "y": 64, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/melgeek/mojo68/rev1/rev1.c b/keyboards/melgeek/mojo68/rev1/rev1.c index af17d96c6d..d30a5817a8 100755 --- a/keyboards/melgeek/mojo68/rev1/rev1.c +++ b/keyboards/melgeek/mojo68/rev1/rev1.c @@ -89,29 +89,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW5_CS30, SW5_CS29, SW5_CS28}, /* RGB68 */ }; -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14*/ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, /* R0 */ - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, /* R1 */ - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NO_LED, 43 }, /* R2 */ - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, NO_LED, 57 }, /* R3 */ - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 }, /* R4 */ - }, { - {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}, {208, 0}, {224, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, {224, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 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, 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, - } -}; - const is31fl3741_led_t g_is31_indicator_leds[3] = { {0, SW1_CS6, SW1_CS5, SW1_CS4}, /* RGB124 */ {0, SW2_CS6, SW2_CS5, SW2_CS4}, /* RGB125 */ diff --git a/keyboards/melgeek/mojo75/rev1/keyboard.json b/keyboards/melgeek/mojo75/rev1/keyboard.json index 0b0a722c90..339609c8f0 100644 --- a/keyboards/melgeek/mojo75/rev1/keyboard.json +++ b/keyboards/melgeek/mojo75/rev1/keyboard.json @@ -61,6 +61,100 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 240, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 224, "y": 16, "flags": 4}, + {"x": 240, "y": 16, "flags": 4}, + {"matrix": [1, 15], "x": 255, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 208, "y": 32, "flags": 4}, + {"matrix": [2, 15], "x": 224, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4}, + {"x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 208, "y": 48, "flags": 4}, + {"x": 224, "y": 48, "flags": 4}, + {"matrix": [3, 15], "x": 240, "y": 48, "flags": 4}, + {"x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 16, "y": 64, "flags": 4}, + {"x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 7], "x": 144, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 160, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 176, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4}, + {"matrix": [4, 15], "x": 240, "y": 64, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 80, "flags": 4}, + {"matrix": [5, 1], "x": 16, "y": 80, "flags": 4}, + {"matrix": [5, 2], "x": 32, "y": 80, "flags": 4}, + {"x": 48, "y": 80, "flags": 4}, + {"matrix": [5, 5], "x": 64, "y": 80, "flags": 4}, + {"x": 80, "y": 80, "flags": 4}, + {"matrix": [5, 9], "x": 96, "y": 80, "flags": 4}, + {"matrix": [5, 10], "x": 112, "y": 80, "flags": 4}, + {"matrix": [5, 12], "x": 128, "y": 80, "flags": 4}, + {"matrix": [5, 13], "x": 144, "y": 80, "flags": 4}, + {"matrix": [5, 14], "x": 160, "y": 80, "flags": 4}, + {"matrix": [5, 15], "x": 176, "y": 80, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/melgeek/mojo75/rev1/rev1.c b/keyboards/melgeek/mojo75/rev1/rev1.c index 60bb6eb850..93f8345604 100644 --- a/keyboards/melgeek/mojo75/rev1/rev1.c +++ b/keyboards/melgeek/mojo75/rev1/rev1.c @@ -112,31 +112,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW5_CS39, SW5_CS38, SW5_CS37}, /* RGB92 */ {0, SW6_CS39, SW6_CS38, SW6_CS37}, /* RGB90 */ }; - -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, /* R0 */ - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, NO_LED, 32 }, /* R1 */ - { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, NO_LED, 47 }, /* R2 */ - { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, NO_LED, 61, NO_LED, 63 }, /* R3 */ - { 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, NO_LED, 77, NO_LED, 78, 79 }, /* R4 */ - { 80, 81, 82, NO_LED, NO_LED, 84, NO_LED, NO_LED, NO_LED, 86, 87, NO_LED, 88, 89, 90, 91 }, /* R5 */ - }, { - {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}, {208, 0}, {224, 0}, {240, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, {224, 16}, {240, 16}, {255, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, {224, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, {224, 48}, {240, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, {160, 64}, {176, 64}, {192, 64}, {208, 64}, {224, 64}, {240, 64}, - {0, 80}, {16, 80}, {32, 80}, {48, 80}, {64, 80}, {80, 80}, {96, 80}, {112, 80}, {128, 80}, {144, 80}, {160, 80}, {176, 80}, - }, { - 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, 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, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - } -}; - #endif diff --git a/keyboards/melgeek/tegic/rev1/keyboard.json b/keyboards/melgeek/tegic/rev1/keyboard.json index 5a1ca4f350..532792d27e 100644 --- a/keyboards/melgeek/tegic/rev1/keyboard.json +++ b/keyboards/melgeek/tegic/rev1/keyboard.json @@ -67,6 +67,99 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 12, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 36, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 72, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 108, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 120, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 156, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 168, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 12, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 48, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 60, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 72, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 84, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 96, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 108, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 120, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 132, "y": 12, "flags": 4}, + {"matrix": [1, 12], "x": 144, "y": 12, "flags": 4}, + {"x": 156, "y": 12, "flags": 4}, + {"matrix": [1, 13], "x": 168, "y": 12, "flags": 4}, + {"x": 180, "y": 12, "flags": 4}, + {"matrix": [1, 14], "x": 192, "y": 12, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 24, "flags": 4}, + {"matrix": [2, 1], "x": 12, "y": 24, "flags": 4}, + {"matrix": [2, 2], "x": 24, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 36, "y": 24, "flags": 4}, + {"matrix": [2, 4], "x": 48, "y": 24, "flags": 4}, + {"matrix": [2, 5], "x": 60, "y": 24, "flags": 4}, + {"matrix": [2, 6], "x": 72, "y": 24, "flags": 4}, + {"matrix": [2, 7], "x": 84, "y": 24, "flags": 4}, + {"matrix": [2, 8], "x": 96, "y": 24, "flags": 4}, + {"matrix": [2, 9], "x": 108, "y": 24, "flags": 4}, + {"matrix": [2, 10], "x": 120, "y": 24, "flags": 4}, + {"matrix": [2, 11], "x": 132, "y": 24, "flags": 4}, + {"matrix": [2, 12], "x": 144, "y": 24, "flags": 4}, + {"matrix": [2, 13], "x": 156, "y": 24, "flags": 4}, + {"matrix": [2, 14], "x": 168, "y": 24, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 36, "flags": 4}, + {"matrix": [3, 1], "x": 12, "y": 36, "flags": 4}, + {"matrix": [3, 2], "x": 24, "y": 36, "flags": 4}, + {"matrix": [3, 3], "x": 36, "y": 36, "flags": 4}, + {"matrix": [3, 4], "x": 48, "y": 36, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 36, "flags": 4}, + {"matrix": [3, 6], "x": 72, "y": 36, "flags": 4}, + {"matrix": [3, 7], "x": 84, "y": 36, "flags": 4}, + {"matrix": [3, 8], "x": 96, "y": 36, "flags": 4}, + {"matrix": [3, 9], "x": 108, "y": 36, "flags": 4}, + {"matrix": [3, 10], "x": 120, "y": 36, "flags": 4}, + {"matrix": [3, 11], "x": 132, "y": 36, "flags": 4}, + {"x": 144, "y": 36, "flags": 4}, + {"matrix": [3, 12], "x": 156, "y": 36, "flags": 4}, + {"x": 168, "y": 36, "flags": 4}, + {"x": 0, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 12, "y": 48, "flags": 4}, + {"x": 24, "y": 48, "flags": 4}, + {"matrix": [4, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [4, 2], "x": 48, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 60, "y": 48, "flags": 4}, + {"matrix": [4, 4], "x": 72, "y": 48, "flags": 4}, + {"matrix": [4, 5], "x": 84, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [4, 7], "x": 108, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 120, "y": 48, "flags": 4}, + {"matrix": [4, 9], "x": 132, "y": 48, "flags": 4}, + {"matrix": [4, 10], "x": 144, "y": 48, "flags": 4}, + {"x": 156, "y": 48, "flags": 4}, + {"matrix": [4, 11], "x": 168, "y": 48, "flags": 4}, + {"x": 180, "y": 48, "flags": 4}, + {"matrix": [4, 13], "x": 192, "y": 48, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 60, "flags": 4}, + {"matrix": [5, 1], "x": 12, "y": 60, "flags": 4}, + {"matrix": [5, 2], "x": 24, "y": 60, "flags": 4}, + {"x": 36, "y": 60, "flags": 4}, + {"matrix": [5, 5], "x": 48, "y": 60, "flags": 4}, + {"x": 60, "y": 60, "flags": 4}, + {"matrix": [5, 9], "x": 72, "y": 60, "flags": 4}, + {"matrix": [5, 10], "x": 84, "y": 60, "flags": 4}, + {"matrix": [5, 11], "x": 96, "y": 60, "flags": 4}, + {"matrix": [5, 12], "x": 108, "y": 60, "flags": 4}, + {"matrix": [5, 13], "x": 120, "y": 60, "flags": 4}, + {"matrix": [5, 14], "x": 132, "y": 60, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/melgeek/tegic/rev1/rev1.c b/keyboards/melgeek/tegic/rev1/rev1.c index b087264919..3b4e335c05 100755 --- a/keyboards/melgeek/tegic/rev1/rev1.c +++ b/keyboards/melgeek/tegic/rev1/rev1.c @@ -117,29 +117,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW9_CS36, SW9_CS35, SW9_CS34}, /* RGB143 */ {0, SW1_CS39, SW1_CS38, SW1_CS37}, /* RGB149 */ }; -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, /* R0 */ - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 31 }, /* R1 */ - { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46 }, /* R2 */ - { 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, NO_LED, NO_LED }, /* R3 */ - { 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, NO_LED, 78, NO_LED }, /* R4 */ - { 79, 80, 81, NO_LED, NO_LED, 83, NO_LED, NO_LED, NO_LED, 85, 86, 87, 88, 89, 90 }, /* R5 */ - }, { - {0, 0}, {12, 0}, {24, 0}, {36, 0}, {48, 0}, {60, 0}, {72, 0}, {84, 0}, {96, 0}, {108, 0}, {120, 0}, {132, 0}, {144, 0}, {156, 0}, {168, 0}, //15 - {0, 12}, {12, 12}, {24, 12}, {36, 12}, {48, 12}, {60, 12}, {72, 12}, {84, 12}, {96, 12}, {108, 12}, {120, 12}, {132, 12}, {144, 12}, {156, 12}, {168, 12}, {180, 12}, {192, 12}, //17 - {0, 24}, {12, 24}, {24, 24}, {36, 24}, {48, 24}, {60, 24}, {72, 24}, {84, 24}, {96, 24}, {108, 24}, {120, 24}, {132, 24}, {144, 24}, {156, 24}, {168, 24}, //15 - {0, 36}, {12, 36}, {24, 36}, {36, 36}, {48, 36}, {60, 36}, {72, 36}, {84, 36}, {96, 36}, {108, 36}, {120, 36}, {132, 36}, {144, 36}, {156, 36}, {168, 36}, //15 - {0, 48}, {12, 48}, {24, 48}, {36, 48}, {48, 48}, {60, 48}, {72, 48}, {84, 48}, {96, 48}, {108, 48}, {120, 48}, {132, 48}, {144, 48}, {156, 48}, {168, 48}, {180, 48}, {192, 48}, //17 - {0, 60}, {12, 60}, {24, 60}, {36, 60}, {48, 60}, {60, 60}, {72, 60}, {84, 60}, {96, 60}, {108, 60}, {120, 60}, {132, 60}, //12 - }, { - 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, 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, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - } -}; #endif diff --git a/keyboards/melgeek/z70ultra/rev1/keyboard.json b/keyboards/melgeek/z70ultra/rev1/keyboard.json index 5a8868265b..145f5dffdf 100644 --- a/keyboards/melgeek/z70ultra/rev1/keyboard.json +++ b/keyboards/melgeek/z70ultra/rev1/keyboard.json @@ -61,6 +61,77 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [5, 6], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 0, "y": 32, "flags": 4}, + {"matrix": [5, 7], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 0, "y": 48, "flags": 4}, + {"matrix": [2, 13], "x": 16, "y": 48, "flags": 4}, + {"matrix": [5, 9], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 0, "y": 64, "flags": 4}, + {"matrix": [3, 11], "x": 16, "y": 64, "flags": 4}, + {"matrix": [3, 12], "x": 32, "y": 64, "flags": 4}, + {"matrix": [5, 8], "x": 48, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 0, "y": 80, "flags": 4}, + {"matrix": [4, 5], "x": 16, "y": 80, "flags": 4}, + {"matrix": [4, 6], "x": 32, "y": 80, "flags": 4}, + {"matrix": [4, 9], "x": 48, "y": 80, "flags": 4}, + {"matrix": [4, 10], "x": 64, "y": 80, "flags": 4}, + {"matrix": [5, 11], "x": 80, "y": 80, "flags": 4}, + {"matrix": [5, 12], "x": 96, "y": 80, "flags": 4}, + {"matrix": [5, 13], "x": 112, "y": 80, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 4, "sleep": true diff --git a/keyboards/melgeek/z70ultra/rev1/rev1.c b/keyboards/melgeek/z70ultra/rev1/rev1.c index 1cb46df643..7eaf839763 100644 --- a/keyboards/melgeek/z70ultra/rev1/rev1.c +++ b/keyboards/melgeek/z70ultra/rev1/rev1.c @@ -91,31 +91,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW4_CS37, SW4_CS39, SW4_CS38}, /* RGB22 */ {0, SW9_CS37, SW9_CS39, SW9_CS38}, /* RGB27 */ }; -led_config_t g_led_config = { - { - /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, }, /* R0 */ - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, }, /* R1 */ - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, }, /* R2 */ - { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, }, /* R3 */ - { 58, 59, 60, NO_LED, 61, 62, 63, NO_LED, NO_LED, 64, 65, NO_LED, NO_LED, NO_LED, }, /* R4 */ - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 14, 29, 56, 43, 57, 66, 67, 68, }, /* R5 */ - }, { - {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}, {208, 0}, - {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, - {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, - {0, 80}, {16, 80}, {32, 80}, {48, 80}, {64, 80}, {80, 80}, {96, 80}, {112, 80}, - }, { - 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, 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, - } -}; const is31fl3741_led_t g_is31_indicator_leds[6] = { {0, SW1_CS5, SW1_CS3, SW1_CS4}, /* RGB71 */ From ed2de216031af9335433465e478d1c349621288b Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:10:34 -0600 Subject: [PATCH 25/95] Migrate `g_led_config` to DD (M1) (#25618) --- keyboards/machkeyboards/mach3/mach3.c | 21 +---- keyboards/magic_force/mf34/keyboard.json | 36 +++++++ keyboards/magic_force/mf34/mf34.c | 48 ---------- .../marksard/rhymestone/rev1/keyboard.json | 42 +++++++++ keyboards/marksard/rhymestone/rev1/rev1.c | 60 ------------ .../adelais/rgb_led/rev1/keyboard.json | 93 +++++++++++++++++++ .../mechlovin/adelais/rgb_led/rev1/rev1.c | 42 --------- .../adelais/rgb_led/rev2/keyboard.json | 70 ++++++++++++++ .../mechlovin/adelais/rgb_led/rev2/rev2.c | 23 ----- .../adelais/rgb_led/rev3/keyboard.json | 68 ++++++++++++++ .../mechlovin/adelais/rgb_led/rev3/rev3.c | 24 ----- .../mechlovin/delphine/rgb_led/keyboard.json | 27 ++++++ .../mechlovin/delphine/rgb_led/rgb_led.c | 26 ------ .../mechlovin/hannah60rgb/rev1/keyboard.json | 74 +++++++++++++++ keyboards/mechlovin/hannah60rgb/rev1/rev1.c | 22 ----- .../mechlovin/hannah60rgb/rev2/keyboard.json | 80 ++++++++++++++++ keyboards/mechlovin/hannah60rgb/rev2/rev2.c | 48 ---------- .../infinity87/rgb_rev1/keyboard.json | 93 +++++++++++++++++++ .../mechlovin/infinity87/rgb_rev1/rgb_rev1.c | 25 ----- keyboards/mechlovin/infinity875/infinity875.c | 46 --------- keyboards/mechlovin/infinity875/keyboard.json | 44 +++++++++ 21 files changed, 628 insertions(+), 384 deletions(-) delete mode 100644 keyboards/magic_force/mf34/mf34.c delete mode 100644 keyboards/marksard/rhymestone/rev1/rev1.c delete mode 100644 keyboards/mechlovin/adelais/rgb_led/rev1/rev1.c delete mode 100644 keyboards/mechlovin/infinity875/infinity875.c diff --git a/keyboards/machkeyboards/mach3/mach3.c b/keyboards/machkeyboards/mach3/mach3.c index 948df5a066..881528d650 100644 --- a/keyboards/machkeyboards/mach3/mach3.c +++ b/keyboards/machkeyboards/mach3/mach3.c @@ -15,28 +15,9 @@ */ #include "quantum.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 1, 2 }, - { 5, 4, 3 }, - { 6, 7, 8 }, -}, { - // LED Index to Physical Position - { 0, 0 }, { 112, 0 }, { 224, 0 }, - { 0, 112 }, { 112, 112 }, { 224, 112 }, - { 0, 224 }, { 112, 224 }, { 224, 224 }, -}, { - // LED Index to Flag - 4, 4, 4, - 4, 4, 4, - 4, 4, 4 -} }; -#endif - void keyboard_pre_init_kb(void) { gpio_set_pin_output(F5); gpio_write_pin_high(F5); - + keyboard_pre_init_user(); } diff --git a/keyboards/magic_force/mf34/keyboard.json b/keyboards/magic_force/mf34/keyboard.json index 9acae04b27..35a652422d 100644 --- a/keyboards/magic_force/mf34/keyboard.json +++ b/keyboards/magic_force/mf34/keyboard.json @@ -65,6 +65,42 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 37, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 74, "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": 186, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 37, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 74, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 112, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 149, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 186, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 224, "y": 12, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 24, "flags": 4}, + {"matrix": [2, 1], "x": 37, "y": 24, "flags": 4}, + {"matrix": [2, 2], "x": 74, "y": 24, "flags": 4}, + {"matrix": [2, 3], "x": 112, "y": 17, "flags": 4}, + {"matrix": [2, 4], "x": 149, "y": 17, "flags": 4}, + {"matrix": [2, 5], "x": 186, "y": 17, "flags": 4}, + {"matrix": [3, 3], "x": 112, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 149, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 186, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 224, "y": 38, "flags": 4}, + {"matrix": [4, 1], "x": 37, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 112, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 149, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 186, "y": 51, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 37, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 74, "y": 64, "flags": 4}, + {"matrix": [5, 4], "x": 149, "y": 64, "flags": 4}, + {"matrix": [5, 5], "x": 186, "y": 64, "flags": 4}, + {"matrix": [5, 6], "x": 224, "y": 64, "flags": 4} + ], "max_brightness": 200 }, "features": { diff --git a/keyboards/magic_force/mf34/mf34.c b/keyboards/magic_force/mf34/mf34.c deleted file mode 100644 index 8cced36866..0000000000 --- a/keyboards/magic_force/mf34/mf34.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2015 Álvaro "Gondolindrim" Volpato - -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 RGB_MATRIX_ENABLE - -// RGB Matrix -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 }, - { NO_LED, NO_LED, NO_LED, 20, 21, 22, 23 }, - { NO_LED, 24, NO_LED, 25, 26, 27, NO_LED }, - { 28, 29, 30, NO_LED, 31, 32, 33 } - }, { - {0, 0}, {37, 0}, {74, 0}, {112, 0}, {149, 0}, {186, 0}, {224, 0}, - {0, 12}, {37, 12}, {74, 12}, {112, 12}, {149, 12}, {186, 12}, {224, 12}, - {0, 24}, {37, 24}, {74, 24}, {112, 17}, {149, 17}, {186, 17}, - {112, 38}, {149, 38}, {186, 38}, {224, 38}, - {37, 51}, {112, 51}, {149, 51}, {186, 51}, - {0, 64}, {37, 64}, {74, 64}, {149, 64}, {186, 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 - } -}; -#endif diff --git a/keyboards/marksard/rhymestone/rev1/keyboard.json b/keyboards/marksard/rhymestone/rev1/keyboard.json index aaff1515e0..2b9829e711 100644 --- a/keyboards/marksard/rhymestone/rev1/keyboard.json +++ b/keyboards/marksard/rhymestone/rev1/keyboard.json @@ -10,6 +10,48 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [0, 4], "x": 100, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 100, "y": 21, "flags": 4}, + {"matrix": [2, 4], "x": 100, "y": 43, "flags": 4}, + {"matrix": [3, 4], "x": 100, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 75, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 50, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 25, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 25, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 50, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 75, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 75, "y": 21, "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": [1, 1], "x": 25, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 50, "y": 21, "flags": 4}, + {"matrix": [4, 4], "x": 125, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 125, "y": 21, "flags": 4}, + {"matrix": [6, 4], "x": 125, "y": 43, "flags": 4}, + {"matrix": [7, 4], "x": 125, "y": 64, "flags": 1}, + {"matrix": [7, 3], "x": 150, "y": 64, "flags": 1}, + {"matrix": [7, 2], "x": 175, "y": 64, "flags": 1}, + {"matrix": [7, 1], "x": 200, "y": 64, "flags": 1}, + {"matrix": [7, 0], "x": 224, "y": 64, "flags": 1}, + {"matrix": [6, 0], "x": 224, "y": 43, "flags": 4}, + {"matrix": [5, 0], "x": 224, "y": 21, "flags": 4}, + {"matrix": [4, 0], "x": 224, "y": 0, "flags": 4}, + {"matrix": [4, 1], "x": 200, "y": 0, "flags": 4}, + {"matrix": [4, 2], "x": 175, "y": 0, "flags": 4}, + {"matrix": [4, 3], "x": 150, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 150, "y": 21, "flags": 4}, + {"matrix": [6, 3], "x": 150, "y": 43, "flags": 4}, + {"matrix": [6, 2], "x": 175, "y": 43, "flags": 4}, + {"matrix": [6, 1], "x": 200, "y": 43, "flags": 4}, + {"matrix": [5, 1], "x": 200, "y": 21, "flags": 4}, + {"matrix": [5, 2], "x": 175, "y": 21, "flags": 4} + ], "sat_steps": 8, "val_steps": 8, "speed_steps": 10, diff --git a/keyboards/marksard/rhymestone/rev1/rev1.c b/keyboards/marksard/rhymestone/rev1/rev1.c deleted file mode 100644 index 06ea367707..0000000000 --- a/keyboards/marksard/rhymestone/rev1/rev1.c +++ /dev/null @@ -1,60 +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. - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 10, 11, 12, 13, 0 }, - { 9, 18, 19, 14, 1 }, - { 8, 17, 16, 15, 2 }, - { 7, 6, 5, 4, 3 }, - { 30, 31, 32, 33, 20 }, - { 29, 38, 39, 34, 21 }, - { 28, 37, 36, 35, 22 }, - { 27, 26, 25, 24, 23 } -}, { - { 100, 0 }, { 100, 21 }, { 100, 43 }, { 100, 64 }, - { 75, 64 }, { 50, 64 }, { 25, 64 }, { 0, 64 }, - { 0, 43 }, { 0, 21 }, { 0, 0 }, - { 25, 0 }, { 50, 0 }, { 75, 0 }, - { 75, 21 }, { 75, 43 }, - { 50, 43 }, { 25, 43 }, - { 25, 21 }, { 50, 21 }, - { 125, 0 }, { 125, 21 }, { 125, 43 }, { 125, 64 }, - { 150, 64 }, { 175, 64 }, { 200, 64 }, { 225, 64 }, - { 225, 43 }, { 225, 21 }, { 225, 0 }, - { 200, 0 }, { 175, 0 }, { 150, 0 }, - { 150, 21 }, { 150, 43 }, - { 175, 43 }, { 200, 43 }, - { 200, 21 }, { 150, 21 } -}, { - 4, 4, 4, 1, - 1, 1, 1, 1, - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 1, - 1, 1, 1, 1, - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4 -} }; -#endif diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/keyboard.json b/keyboards/mechlovin/adelais/rgb_led/rev1/keyboard.json index 01232b07e8..1de0b83552 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/keyboard.json +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/keyboard.json @@ -62,6 +62,99 @@ "animation": "cycle_pinwheel" }, "driver": "ws2812", + "layout": [ + {"matrix": [1, 14], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 17, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 51, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 69, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 86, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 100, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 103, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 120, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 138, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 155, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 172, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 189, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 207, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 215, "y": 0, "flags": 1}, + {"x": 223, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [2, 14], "x": 0, "y": 16, "flags": 1}, + {"matrix": [1, 0], "x": 17, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 34, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 51, "y": 16, "flags": 1}, + {"matrix": [1, 3], "x": 69, "y": 16, "flags": 1}, + {"matrix": [1, 4], "x": 86, "y": 16, "flags": 1}, + {"matrix": [1, 5], "x": 103, "y": 16, "flags": 1}, + {"matrix": [1, 6], "x": 120, "y": 16, "flags": 1}, + {"matrix": [1, 7], "x": 138, "y": 16, "flags": 1}, + {"matrix": [1, 8], "x": 155, "y": 16, "flags": 1}, + {"matrix": [1, 9], "x": 172, "y": 16, "flags": 1}, + {"matrix": [1, 10], "x": 189, "y": 16, "flags": 1}, + {"matrix": [1, 11], "x": 207, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 215, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 224, "y": 16, "flags": 1}, + {"matrix": [3, 14], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 0], "x": 17, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 34, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 51, "y": 32, "flags": 1}, + {"matrix": [2, 3], "x": 69, "y": 32, "flags": 1}, + {"matrix": [2, 4], "x": 86, "y": 32, "flags": 1}, + {"matrix": [2, 5], "x": 103, "y": 32, "flags": 1}, + {"matrix": [2, 6], "x": 120, "y": 32, "flags": 1}, + {"matrix": [2, 7], "x": 138, "y": 32, "flags": 1}, + {"matrix": [2, 8], "x": 155, "y": 32, "flags": 1}, + {"matrix": [2, 9], "x": 172, "y": 32, "flags": 1}, + {"matrix": [2, 10], "x": 189, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 207, "y": 32, "flags": 1}, + {"matrix": [2, 13], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 17, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 1}, + {"matrix": [3, 3], "x": 51, "y": 48, "flags": 1}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 1}, + {"matrix": [3, 5], "x": 86, "y": 48, "flags": 1}, + {"matrix": [3, 6], "x": 103, "y": 48, "flags": 1}, + {"matrix": [3, 7], "x": 120, "y": 48, "flags": 1}, + {"matrix": [3, 8], "x": 138, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 155, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 172, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 1}, + {"matrix": [4, 13], "x": 207, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 215, "y": 48, "flags": 1}, + {"x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 17, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 51, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 86, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 103, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 138, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 172, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"x": 100, "y": 0, "flags": 1}, + {"x": 69, "y": 0, "flags": 1}, + {"x": 24, "y": 0, "flags": 1}, + {"x": 0, "y": 3, "flags": 1}, + {"x": 0, "y": 16, "flags": 1}, + {"x": 0, "y": 32, "flags": 1}, + {"x": 0, "y": 51, "flags": 1}, + {"x": 15, "y": 64, "flags": 1}, + {"x": 34, "y": 64, "flags": 1}, + {"x": 69, "y": 64, "flags": 1}, + {"x": 103, "y": 64, "flags": 1}, + {"x": 110, "y": 64, "flags": 1}, + {"x": 120, "y": 64, "flags": 1}, + {"x": 155, "y": 64, "flags": 1}, + {"x": 189, "y": 64, "flags": 1}, + {"x": 192, "y": 64, "flags": 1}, + {"x": 224, "y": 58, "flags": 1}, + {"x": 224, "y": 32, "flags": 1}, + {"x": 224, "y": 16, "flags": 1}, + {"x": 224, "y": 0, "flags": 1}, + {"x": 207, "y": 0, "flags": 1}, + {"x": 172, "y": 0, "flags": 1}, + {"x": 138, "y": 0, "flags": 1} + ], "max_brightness": 220, "react_on_keyup": true, "sleep": true diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.c b/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.c deleted file mode 100644 index 5f01f322df..0000000000 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright 2020 Team Mechlovin - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - //Key Matrix to LED Index - {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16}, - {18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0}, - {33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, 45, 17}, - {46, NO_LED, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 60, 32}, - {61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, 65, NO_LED, 66, NO_LED, NO_LED, 57, 67} -}, { - //LED Index to Physical Positon - {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {223, 0}, {224, 0}, - {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, - {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, - { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, {224,48}, - { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, - {100,0}, { 69,0}, { 24, 0}, { 0,3}, { 0,16}, { 0,32}, { 0,51}, { 15,64 }, { 34,64}, { 69,64}, { 103,64}, {110,64}, { 120,64}, { 155,64}, { 189,64}, { 192,64}, { 224,58}, { 224,32}, { 224,16}, { 224,0}, { 207,0}, { 172,0}, { 138,0}, -}, { - 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, 1, 1, 1, 1, -} }; -#endif diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/keyboard.json b/keyboards/mechlovin/adelais/rgb_led/rev2/keyboard.json index a8633af5da..e71f103635 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/keyboard.json +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/keyboard.json @@ -64,6 +64,76 @@ "animation": "cycle_pinwheel" }, "driver": "is31fl3731", + "layout": [ + {"matrix": [1, 14], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 17, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 51, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 69, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 86, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 100, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 103, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 120, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 138, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 155, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 172, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 189, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 207, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 215, "y": 0, "flags": 1}, + {"x": 223, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [2, 14], "x": 0, "y": 16, "flags": 1}, + {"matrix": [1, 0], "x": 17, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 34, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 51, "y": 16, "flags": 1}, + {"matrix": [1, 3], "x": 69, "y": 16, "flags": 1}, + {"matrix": [1, 4], "x": 86, "y": 16, "flags": 1}, + {"matrix": [1, 5], "x": 103, "y": 16, "flags": 1}, + {"matrix": [1, 6], "x": 120, "y": 16, "flags": 1}, + {"matrix": [1, 7], "x": 138, "y": 16, "flags": 1}, + {"matrix": [1, 8], "x": 155, "y": 16, "flags": 1}, + {"matrix": [1, 9], "x": 172, "y": 16, "flags": 1}, + {"matrix": [1, 10], "x": 189, "y": 16, "flags": 1}, + {"matrix": [1, 11], "x": 207, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 215, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 224, "y": 16, "flags": 1}, + {"matrix": [3, 14], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 0], "x": 17, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 34, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 51, "y": 32, "flags": 1}, + {"matrix": [2, 3], "x": 69, "y": 32, "flags": 1}, + {"matrix": [2, 4], "x": 86, "y": 32, "flags": 1}, + {"matrix": [2, 5], "x": 103, "y": 32, "flags": 1}, + {"matrix": [2, 6], "x": 120, "y": 32, "flags": 1}, + {"matrix": [2, 7], "x": 138, "y": 32, "flags": 1}, + {"matrix": [2, 8], "x": 155, "y": 32, "flags": 1}, + {"matrix": [2, 9], "x": 172, "y": 32, "flags": 1}, + {"matrix": [2, 10], "x": 189, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 207, "y": 32, "flags": 1}, + {"matrix": [2, 13], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 17, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 1}, + {"matrix": [3, 3], "x": 51, "y": 48, "flags": 1}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 1}, + {"matrix": [3, 5], "x": 86, "y": 48, "flags": 1}, + {"matrix": [3, 6], "x": 103, "y": 48, "flags": 1}, + {"matrix": [3, 7], "x": 120, "y": 48, "flags": 1}, + {"matrix": [3, 8], "x": 138, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 155, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 172, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 1}, + {"matrix": [4, 13], "x": 207, "y": 48, "flags": 1}, + {"x": 215, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 17, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 51, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 86, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 103, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 138, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 172, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "react_on_keyup": true, "sleep": true }, diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c index 2dffbc24f0..d0bd63cdb4 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c @@ -94,29 +94,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C4_7, C5_7, C6_7}, //D83-D13-67 }; -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16}, - {18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0}, - {33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, 45, 17}, - {46, NO_LED, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 32}, - {61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, 65, NO_LED, 66, NO_LED, NO_LED, 57, 67} - }, - { - //LED Index to Physical Positon - {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {223, 0}, {224, 0}, - {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, - {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, - { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, {224,48}, - { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,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, -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/keyboard.json b/keyboards/mechlovin/adelais/rgb_led/rev3/keyboard.json index a7cd8faa78..fd68b62baf 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/keyboard.json +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/keyboard.json @@ -61,6 +61,74 @@ "animation": "cycle_pinwheel" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [3, 1], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 17, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 34, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 51, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 69, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 86, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 100, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 103, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 120, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 138, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 155, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 172, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 189, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 207, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 215, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [4, 1], "x": 0, "y": 16, "flags": 1}, + {"matrix": [1, 0], "x": 17, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 34, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 51, "y": 16, "flags": 1}, + {"matrix": [1, 3], "x": 69, "y": 16, "flags": 1}, + {"matrix": [1, 4], "x": 86, "y": 16, "flags": 1}, + {"matrix": [1, 5], "x": 103, "y": 16, "flags": 1}, + {"matrix": [1, 6], "x": 120, "y": 16, "flags": 1}, + {"matrix": [1, 7], "x": 138, "y": 16, "flags": 1}, + {"matrix": [1, 8], "x": 155, "y": 16, "flags": 1}, + {"matrix": [1, 9], "x": 172, "y": 16, "flags": 1}, + {"matrix": [1, 10], "x": 189, "y": 16, "flags": 1}, + {"matrix": [1, 11], "x": 207, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 215, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 224, "y": 16, "flags": 1}, + {"matrix": [4, 3], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 0], "x": 17, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 34, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 51, "y": 32, "flags": 1}, + {"matrix": [2, 3], "x": 69, "y": 32, "flags": 1}, + {"matrix": [2, 4], "x": 86, "y": 32, "flags": 1}, + {"matrix": [2, 5], "x": 103, "y": 32, "flags": 1}, + {"matrix": [2, 6], "x": 120, "y": 32, "flags": 1}, + {"matrix": [2, 7], "x": 138, "y": 32, "flags": 1}, + {"matrix": [2, 8], "x": 155, "y": 32, "flags": 1}, + {"matrix": [2, 9], "x": 172, "y": 32, "flags": 1}, + {"matrix": [2, 10], "x": 189, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 207, "y": 32, "flags": 1}, + {"matrix": [2, 13], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 17, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 1}, + {"matrix": [3, 3], "x": 51, "y": 48, "flags": 1}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 1}, + {"matrix": [3, 5], "x": 86, "y": 48, "flags": 1}, + {"matrix": [3, 6], "x": 103, "y": 48, "flags": 1}, + {"matrix": [3, 7], "x": 120, "y": 48, "flags": 1}, + {"matrix": [3, 8], "x": 138, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 155, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 172, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 189, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 207, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 215, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 17, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 51, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 86, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 103, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 138, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 172, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "react_on_keyup": true, "sleep": true }, diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c index 33dd2157e4..d934e6df18 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c @@ -88,30 +88,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW1_CS24, SW1_CS23, SW1_CS22}, /* D103-K4E-65 */ }; -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, - {17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, NO_LED}, - {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NO_LED, 44, NO_LED}, - {45, 0, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58}, - {59, 16, 60, 31, 61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, NO_LED, NO_LED, 65}, - }, { - //LED Index to Physical Positon - {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {224, 0}, - {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, - {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, - { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, - { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,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, - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/mechlovin/delphine/rgb_led/keyboard.json b/keyboards/mechlovin/delphine/rgb_led/keyboard.json index d6e7a27f81..5cb2c13ac1 100644 --- a/keyboards/mechlovin/delphine/rgb_led/keyboard.json +++ b/keyboards/mechlovin/delphine/rgb_led/keyboard.json @@ -78,6 +78,33 @@ "animation": "cycle_pinwheel" }, "driver": "is31fl3731", + "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, 0], "x": 0, "y": 13, "flags": 4}, + {"matrix": [1, 1], "x": 75, "y": 13, "flags": 1}, + {"matrix": [1, 2], "x": 149, "y": 13, "flags": 1}, + {"matrix": [1, 3], "x": 224, "y": 13, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 25, "flags": 4}, + {"matrix": [2, 1], "x": 75, "y": 25, "flags": 1}, + {"matrix": [2, 2], "x": 149, "y": 25, "flags": 1}, + {"matrix": [2, 3], "x": 224, "y": 25, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 75, "y": 38, "flags": 1}, + {"matrix": [3, 2], "x": 149, "y": 38, "flags": 1}, + {"matrix": [3, 3], "x": 224, "y": 38, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 51, "flags": 4}, + {"matrix": [4, 1], "x": 75, "y": 51, "flags": 1}, + {"matrix": [4, 2], "x": 149, "y": 51, "flags": 1}, + {"matrix": [4, 3], "x": 224, "y": 51, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 4}, + {"x": 37, "y": 64, "flags": 0}, + {"matrix": [5, 1], "x": 75, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 149, "y": 64, "flags": 1}, + {"matrix": [5, 3], "x": 224, "y": 64, "flags": 4} + ], "react_on_keyup": true } } diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c index feda05a071..0f3f1c0889 100644 --- a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c @@ -49,32 +49,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C4_14, C5_14, C6_14}, //D51-24 }; -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, 22, 23, 24} - }, - { - //LED Index to Physical Positon - { 0, 0}, { 75, 0}, {149, 0}, {224, 0}, - { 0, 13}, { 75, 13}, {149, 13}, {224, 13}, - { 0, 25}, { 75, 25}, {149, 25}, {224, 25}, - { 0, 38}, { 75, 38}, {149, 38}, {224, 38}, - { 0, 51}, { 75, 51}, {149, 51}, {224, 51}, - { 0, 64}, { 37, 64}, { 75, 64}, {149, 64}, {224, 64}, -}, { - 4, 4, 4, 4, - 4, 1, 1, 4, - 4, 1, 1, 4, - 4, 1, 1, 4, - 4, 1, 1, 4, - 4, 0, 1, 1, 4, -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/mechlovin/hannah60rgb/rev1/keyboard.json b/keyboards/mechlovin/hannah60rgb/rev1/keyboard.json index e2b0ae715e..82911ddaf9 100644 --- a/keyboards/mechlovin/hannah60rgb/rev1/keyboard.json +++ b/keyboards/mechlovin/hannah60rgb/rev1/keyboard.json @@ -69,6 +69,80 @@ "animation": "cycle_pinwheel" }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 208, "y": 0, "flags": 1}, + {"x": 216, "y": 0, "flags": 1}, + {"matrix": [1, 13], "x": 220, "y": 0, "flags": 1}, + {"matrix": [2, 12], "x": 211, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 1}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 1}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 1}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 1}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 1}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 1}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 1}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 1}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 1}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 1}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 1}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 1}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 1}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 1}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 1}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 1}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 1}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 1}, + {"x": 192, "y": 32, "flags": 1}, + {"matrix": [2, 13], "x": 208, "y": 32, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"x": 208, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 192, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 160, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 144, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 128, "y": 48, "flags": 1}, + {"matrix": [3, 8], "x": 112, "y": 48, "flags": 1}, + {"matrix": [3, 7], "x": 96, "y": 48, "flags": 1}, + {"matrix": [3, 6], "x": 80, "y": 48, "flags": 1}, + {"matrix": [3, 5], "x": 64, "y": 48, "flags": 1}, + {"matrix": [3, 4], "x": 48, "y": 48, "flags": 1}, + {"matrix": [3, 3], "x": 32, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 16, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 8, "y": 48, "flags": 1}, + {"x": 0, "y": 48, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 32, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 48, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 64, "y": 64, "flags": 1}, + {"x": 80, "y": 64, "flags": 1}, + {"x": 96, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 112, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 144, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 192, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1} + ], "react_on_keyup": true }, "matrix_pins": { diff --git a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c index 139db81bbe..2918d82318 100644 --- a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c +++ b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c @@ -17,28 +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}, - {29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 15}, - {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 16, 43}, - {59, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 44}, - {60, 61, 62, NO_LED, 63, NO_LED, 64, NO_LED, 67, NO_LED, 68, 69, 70, 71} -}, { - //LED Index to Physical Positon - { 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}, {208, 0}, {216, 0}, - {220, 0}, {211, 16}, {200,16 }, {176,16 }, {160,16}, {144,16}, {128,16}, { 112,16}, { 96,16}, { 80,16}, { 64,16}, { 48,16}, {32, 16}, {16, 16}, {0,16}, - { 0, 32}, { 16, 32}, { 32,32 }, { 48,32 }, { 64,32}, { 80,32}, { 96,32}, { 112,32}, { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {208, 32}, {224,48}, - {208, 48}, {192, 48}, {160,48 }, {144,48 }, {128,48}, {112,48}, {96,48}, { 80,48}, { 64,48}, { 48,48}, { 32,48}, { 16,48}, {8, 48}, {0, 48}, {0,48}, - { 0, 64}, { 16, 64}, { 32,64 }, { 48,64 }, { 64,64}, { 80,64}, { 96,64}, { 112,64}, { 144,64}, { 160,64}, { 192,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, -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/mechlovin/hannah60rgb/rev2/keyboard.json b/keyboards/mechlovin/hannah60rgb/rev2/keyboard.json index 066422b3e3..158e6907b4 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/keyboard.json +++ b/keyboards/mechlovin/hannah60rgb/rev2/keyboard.json @@ -87,6 +87,86 @@ "animation": "cycle_pinwheel" }, "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 1}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 1}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 1}, + {"x": 0, "y": 48, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 12, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 16, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 1}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 1}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 1}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 1}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 1}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 1}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 1}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 1}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 1}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 1}, + {"matrix": [3, 3], "x": 32, "y": 48, "flags": 1}, + {"matrix": [3, 4], "x": 48, "y": 48, "flags": 1}, + {"matrix": [3, 5], "x": 64, "y": 48, "flags": 1}, + {"matrix": [3, 6], "x": 80, "y": 48, "flags": 1}, + {"matrix": [4, 2], "x": 32, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 80, "y": 64, "flags": 1}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 220, "y": 0, "flags": 1}, + {"x": 210, "y": 0, "flags": 1}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 1}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 1}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 1}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 1}, + {"x": 220, "y": 16, "flags": 1}, + {"x": 220, "y": 16, "flags": 1}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 1}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 1}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 1}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 1}, + {"matrix": [2, 13], "x": 220, "y": 32, "flags": 1}, + {"matrix": [3, 7], "x": 96, "y": 48, "flags": 1}, + {"matrix": [3, 8], "x": 112, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 128, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 144, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 160, "y": 48, "flags": 1}, + {"x": 200, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 220, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 220, "y": 48, "flags": 1}, + {"x": 96, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 144, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 176, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 220, "y": 64, "flags": 1}, + {"matrix": [1, 13], "x": 220, "y": 0, "flags": 1}, + {"x": 0, "y": 0, "flags": 9}, + {"x": 0, "y": 0, "flags": 9}, + {"x": 0, "y": 0, "flags": 9}, + {"x": 0, "y": 0, "flags": 9}, + {"x": 0, "y": 0, "flags": 9}, + {"x": 0, "y": 0, "flags": 9}, + {"x": 0, "y": 0, "flags": 9}, + {"x": 0, "y": 0, "flags": 9} + ], "react_on_keyup": true }, "matrix_pins": { diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c index 90a42a88a2..0667e8bc78 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c +++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c @@ -110,54 +110,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C9_16, C9_11, C7_12},//INDICATOR LED-77 }; -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 0, 1, 2, 3, 18, 19, 20, 21, 36, 37, 38, 39, 40, 41 }, - { 4, 5, 6, 7, 22, 23, 24, 25, 43, 44, 45, 46, 47, 69 }, - { 8, 9, 10, 11, 26, 27, 28, 29, 50, 51, 52, 53, 54, 55 }, - { 13, 14, 15, 30, 31, 32, 33, 56, 57, 58, 59, 60, 62, 63 }, - { 16, 17, 34, NO_LED, NO_LED, NO_LED, 35, NO_LED, NO_LED, NO_LED, 65, 66, 67, 68 } - }, { - //LED Index to Physical Positon - { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, //9-59-68-76 - { 0, 16 }, { 16, 16 }, { 32, 16 }, { 48, 16 }, //10-60-72-77 - { 0, 32 }, { 16, 32 }, { 32, 32 }, { 48, 32 }, //46-61-73-78 - { 0, 48 }, { 0, 48 }, { 12, 48 }, { 16, 48 }, //126-51-63-74 - { 0, 64 }, { 16, 64 }, //56-67 - { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, //80-84-89-94 - { 64, 16 }, { 80, 16 }, { 96, 16 }, { 112, 16 }, //81-85-90-95 - { 64, 32 }, { 80, 32 }, { 96, 32 }, { 112, 32 }, //82-86-91-96 - { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, //79-83-87-92 - { 32, 64 }, { 80, 64 }, //75-93 - { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 220, 0 }, { 210, 0 }, //98-102-106-111-116-121-130 - { 128, 16 }, { 144, 16 }, { 160, 16 }, { 176, 16 }, { 192, 16 }, { 220, 16 }, { 220, 16 }, //99-103-107-112-117-129-122 - { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 192, 32 }, { 220, 32 }, //100-104-108-113-118-123 - { 96, 48 }, { 112, 48 }, { 128, 48 }, { 144, 48 }, { 160, 48 }, { 200, 48 }, { 220, 48 }, { 220, 48 }, //97-101-105-109-114-119-128-124 - { 96, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 }, { 220, 64 }, //127-110-115-120-125 - { 220, 0 }, //140 - { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } - }, { - 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, - 9, 9, 9, 9, 9, 9, 9, 9 - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/keyboard.json b/keyboards/mechlovin/infinity87/rgb_rev1/keyboard.json index 2ca5e03b36..3709736be0 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/keyboard.json +++ b/keyboards/mechlovin/infinity87/rgb_rev1/keyboard.json @@ -66,6 +66,99 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 14, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 56, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 70, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 98, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 126, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 140, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 154, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 168, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 182, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 196, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 210, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 14, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 28, "y": 16, "flags": 1}, + {"matrix": [1, 3], "x": 42, "y": 16, "flags": 1}, + {"matrix": [1, 4], "x": 56, "y": 16, "flags": 1}, + {"matrix": [1, 5], "x": 70, "y": 16, "flags": 1}, + {"matrix": [1, 6], "x": 84, "y": 16, "flags": 1}, + {"matrix": [1, 7], "x": 98, "y": 16, "flags": 1}, + {"matrix": [1, 8], "x": 112, "y": 16, "flags": 1}, + {"matrix": [1, 9], "x": 126, "y": 16, "flags": 1}, + {"matrix": [1, 10], "x": 140, "y": 16, "flags": 1}, + {"matrix": [1, 11], "x": 154, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 168, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 182, "y": 16, "flags": 1}, + {"matrix": [1, 14], "x": 196, "y": 16, "flags": 1}, + {"matrix": [1, 15], "x": 210, "y": 16, "flags": 1}, + {"matrix": [1, 16], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 14, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 28, "y": 32, "flags": 1}, + {"matrix": [2, 3], "x": 42, "y": 32, "flags": 1}, + {"matrix": [2, 4], "x": 56, "y": 32, "flags": 1}, + {"matrix": [2, 5], "x": 70, "y": 32, "flags": 1}, + {"matrix": [2, 6], "x": 84, "y": 32, "flags": 1}, + {"matrix": [2, 7], "x": 98, "y": 32, "flags": 1}, + {"matrix": [2, 8], "x": 112, "y": 32, "flags": 1}, + {"matrix": [2, 9], "x": 126, "y": 32, "flags": 1}, + {"matrix": [2, 10], "x": 140, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 154, "y": 32, "flags": 1}, + {"matrix": [2, 12], "x": 168, "y": 32, "flags": 1}, + {"matrix": [2, 13], "x": 182, "y": 32, "flags": 1}, + {"matrix": [2, 14], "x": 196, "y": 32, "flags": 1}, + {"matrix": [2, 15], "x": 210, "y": 32, "flags": 1}, + {"matrix": [2, 16], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 14, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 28, "y": 48, "flags": 1}, + {"matrix": [3, 3], "x": 42, "y": 48, "flags": 1}, + {"matrix": [3, 4], "x": 56, "y": 48, "flags": 1}, + {"matrix": [3, 5], "x": 70, "y": 48, "flags": 1}, + {"matrix": [3, 6], "x": 84, "y": 48, "flags": 1}, + {"matrix": [3, 7], "x": 98, "y": 48, "flags": 1}, + {"matrix": [3, 8], "x": 112, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 126, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 140, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 154, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 168, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 182, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 28, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 56, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 70, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 84, "y": 64, "flags": 1}, + {"matrix": [4, 7], "x": 98, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 112, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 126, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 140, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 154, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 168, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 182, "y": 64, "flags": 1}, + {"matrix": [4, 15], "x": 210, "y": 64, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 80, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 80, "flags": 1}, + {"matrix": [5, 2], "x": 28, "y": 80, "flags": 1}, + {"matrix": [5, 6], "x": 84, "y": 80, "flags": 1}, + {"matrix": [5, 10], "x": 140, "y": 80, "flags": 1}, + {"matrix": [5, 11], "x": 154, "y": 80, "flags": 1}, + {"matrix": [5, 12], "x": 168, "y": 80, "flags": 1}, + {"matrix": [5, 13], "x": 182, "y": 80, "flags": 1}, + {"matrix": [5, 14], "x": 196, "y": 80, "flags": 1}, + {"matrix": [5, 15], "x": 210, "y": 80, "flags": 1}, + {"matrix": [5, 16], "x": 224, "y": 80, "flags": 1} + ], "sleep": true }, "matrix_pins": { diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c index 8df305bb1a..ae4dfef158 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c +++ b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c @@ -111,31 +111,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW9_CS19, SW9_CS20, SW9_CS21}, //D165-K2G-90 }; -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, NO_LED, NO_LED, NO_LED}, - {65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, NO_LED, 79, NO_LED}, - {80, 81, 82, NO_LED, NO_LED, NO_LED, 83, NO_LED, NO_LED, NO_LED, 84, 85, 86, 87, 88, 89, 90} - }, { - {0, 0}, {14, 0}, {28, 0}, {42, 0}, {56, 0}, {70, 0}, {84, 0}, {98, 0}, {112, 0}, {126, 0}, {140, 0}, {154, 0}, {168, 0}, {182, 0}, {196, 0}, {210, 0}, {224, 0}, - {0,16}, {14,16}, {28,16}, {42, 16}, {56, 16}, {70, 16}, {84, 16}, {98, 16}, {112, 16}, {126, 16}, {140, 16}, {154, 16}, {168, 16}, {182, 16}, {196, 16}, {210, 16}, {224, 16}, - {0,32}, {14,32}, {28,32}, {42, 32}, {56, 32}, {70, 32}, {84, 32}, {98, 32}, {112, 32}, {126, 32}, {140, 32}, {154, 32}, {168, 32}, {182, 32}, {196, 32}, {210, 32}, {224, 32}, - {0,48}, {14,48}, {28,48}, {42, 48}, {56, 48}, {70, 48}, {84, 48}, {98, 48}, {112, 48}, {126, 48}, {140, 48}, {154, 48}, {168, 48}, {182, 48}, - {0,64}, {14,64}, {28,64}, {42, 64}, {56, 64}, {70, 64}, {84, 64}, {98, 64}, {112, 64}, {126, 64}, {140, 64}, {154, 64}, {168, 64}, {182, 64}, {210, 64}, - {0,80}, {14,80}, {28,80}, {84, 80}, {140, 80}, {154, 80}, {168, 80}, {182, 80}, {196, 80}, {210, 80}, {224, 80} - }, { - 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, 1, 1, 1, 1 - } }; - - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/mechlovin/infinity875/infinity875.c b/keyboards/mechlovin/infinity875/infinity875.c deleted file mode 100644 index 09749bbc2b..0000000000 --- a/keyboards/mechlovin/infinity875/infinity875.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright 2021 Mechlovin' 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" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - //Key Matrix to LED Index - {0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}, - {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} -}, { - //LED Index to Physical Positon - {0,0}, {14,0}, {28,0}, {42,0}, {56,0}, {67,0}, {70,0}, {84,0}, {98,0}, {112,0}, {126,0}, {140,0}, {154,0}, {168,0}, {182,0}, {196,0}, {210,0}, {224,0}, - {224,13}, {196,13}, {182,13}, {154,13}, {112,13}, {84,13}, {56,13}, {28,13}, {0,13}, - {0,25}, {0,38}, - {0,51}, {0,64}, - {28,64}, {56,64}, - {84,64}, {112,64}, {154,64}, {182,64}, {196,64}, {224,64}, {224,51}, {224,38}, {224,25}, -//{244,64}, {196,64}, {182,64}, {154,64}, {112,64}, {84,64}, {56,64}, {28,64}, {0,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, -} }; -#endif - diff --git a/keyboards/mechlovin/infinity875/keyboard.json b/keyboards/mechlovin/infinity875/keyboard.json index 1016178caa..223fce2cac 100644 --- a/keyboards/mechlovin/infinity875/keyboard.json +++ b/keyboards/mechlovin/infinity875/keyboard.json @@ -15,6 +15,50 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 14, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 56, "y": 0, "flags": 1}, + {"x": 67, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 70, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 98, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 126, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 140, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 154, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 168, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 182, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 196, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 210, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 1}, + {"x": 224, "y": 13, "flags": 1}, + {"x": 196, "y": 13, "flags": 1}, + {"x": 182, "y": 13, "flags": 1}, + {"x": 154, "y": 13, "flags": 1}, + {"x": 112, "y": 13, "flags": 1}, + {"x": 84, "y": 13, "flags": 1}, + {"x": 56, "y": 13, "flags": 1}, + {"x": 28, "y": 13, "flags": 1}, + {"x": 0, "y": 13, "flags": 1}, + {"x": 0, "y": 25, "flags": 1}, + {"x": 0, "y": 38, "flags": 1}, + {"x": 0, "y": 51, "flags": 1}, + {"x": 0, "y": 64, "flags": 1}, + {"x": 28, "y": 64, "flags": 1}, + {"x": 56, "y": 64, "flags": 1}, + {"x": 84, "y": 64, "flags": 1}, + {"x": 112, "y": 64, "flags": 1}, + {"x": 154, "y": 64, "flags": 1}, + {"x": 182, "y": 64, "flags": 1}, + {"x": 196, "y": 64, "flags": 1}, + {"x": 224, "y": 64, "flags": 1}, + {"x": 224, "y": 51, "flags": 1}, + {"x": 224, "y": 38, "flags": 1}, + {"x": 224, "y": 25, "flags": 1} + ], "max_brightness": 200, "sleep": true }, From 3934a7f3c8e153d020d84fc5823379d3af21cfe9 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 03:18:16 -0600 Subject: [PATCH 26/95] Migrate `g_led_config` to DD (I) (#25600) --- keyboards/idobao/id42/id42.c | 45 ------- keyboards/idobao/id42/keyboard.json | 44 +++++++ keyboards/idobao/id61/id61.c | 68 ---------- keyboards/idobao/id61/keyboard.json | 73 +++++++++++ keyboards/idobao/id63/id63.c | 68 ---------- keyboards/idobao/id63/keyboard.json | 77 +++++++++++ keyboards/idobao/id67/id67.c | 68 ---------- keyboards/idobao/id67/keyboard.json | 79 +++++++++++ keyboards/idobao/id75/v2/keyboard.json | 89 ++++++++++++- keyboards/idobao/id75/v2/v2.c | 49 ------- keyboards/idobao/id80/v3/ansi/ansi.c | 76 ----------- keyboards/idobao/id80/v3/ansi/keyboard.json | 96 ++++++++++++++ keyboards/idobao/id87/v2/keyboard.json | 105 +++++++++++++++ keyboards/idobao/id87/v2/v2.c | 83 ------------ keyboards/idobao/montex/v1rgb/keyboard.json | 33 +++++ keyboards/idobao/montex/v1rgb/v1rgb.c | 58 --------- keyboards/idobao/montex/v2/keyboard.json | 33 +++++ keyboards/idobao/montex/v2/v2.c | 82 ------------ keyboards/idyllic/tinny50_rgb/keyboard.json | 34 ++++- keyboards/idyllic/tinny50_rgb/tinny50_rgb.c | 45 ------- keyboards/ilumkb/simpler61/keyboard.json | 63 +++++++++ keyboards/ilumkb/simpler61/simpler61.c | 23 ---- keyboards/ilumkb/simpler64/keyboard.json | 66 ++++++++++ keyboards/ilumkb/simpler64/simpler64.c | 23 ---- keyboards/inett_studio/sqx/hotswap/hotswap.c | 38 ------ .../inett_studio/sqx/hotswap/keyboard.json | 66 ++++++++++ .../inett_studio/sqx/universal/keyboard.json | 74 +++++++++++ .../inett_studio/sqx/universal/universal.c | 42 ------ keyboards/input_club/k_type/k_type.c | 51 -------- keyboards/input_club/k_type/keyboard.json | 123 +++++++++++++++++- 30 files changed, 1052 insertions(+), 822 deletions(-) delete mode 100755 keyboards/idobao/id42/id42.c delete mode 100644 keyboards/idobao/id61/id61.c delete mode 100644 keyboards/idobao/id63/id63.c delete mode 100644 keyboards/idobao/id67/id67.c delete mode 100644 keyboards/idobao/id75/v2/v2.c delete mode 100644 keyboards/idobao/id80/v3/ansi/ansi.c delete mode 100644 keyboards/idobao/id87/v2/v2.c delete mode 100755 keyboards/idobao/montex/v1rgb/v1rgb.c delete mode 100755 keyboards/idobao/montex/v2/v2.c delete mode 100644 keyboards/idyllic/tinny50_rgb/tinny50_rgb.c diff --git a/keyboards/idobao/id42/id42.c b/keyboards/idobao/id42/id42.c deleted file mode 100755 index 5e76e4c5be..0000000000 --- a/keyboards/idobao/id42/id42.c +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Vino Rodrigues (@vinorodrigues) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#define __ NO_LED - -#ifdef RGB_MATRIX_ENABLE - -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │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 │ - * └────┴───┴────┴─────────┴─────────┘ └───┴───┴───┘ - */ -led_config_t g_led_config = { { - // Key Matrix to LED Index - // WS2812 LED strings are addressed from 0 (1st) to RGB_MATRIX_LED_COUNT-1 (last) - { 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 } -}, { - // LED Index to Physical Position - // **NB**: Reversed order - // Generated from: https://xelus.netlify.app/guides/KLE_to_RGB_parser - {224,64 }, {204,64 }, {183,64 }, {135,64 }, { 84,64 }, { 48,64 }, { 25,64 }, { 3,64 }, - {224,43 }, {204,43 }, {181,43 }, {158,43 }, {137,43 }, {117,43 }, { 97,43 }, { 76,43 }, { 56,43 }, { 36,43 }, { 8,43 }, - {216,21 }, {188,21 }, {168,21 }, {148,21 }, {127,21 }, {107,21 }, { 87,21 }, { 66,21 }, { 46,21 }, { 25,21 }, { 3,21 }, - {224,0 }, {204,0 }, {183,0 }, {163,0 }, {143,0 }, {122,0 }, {102,0 }, { 81,0 }, { 61,0 }, { 41,0 }, { 20,0 }, { 0,0 } -}, { - // LED Index to Flag - // **NB**: Reversed order - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 4, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4 -} }; - -#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/id42/keyboard.json b/keyboards/idobao/id42/keyboard.json index 0f1cecd16a..d726f04e78 100644 --- a/keyboards/idobao/id42/keyboard.json +++ b/keyboards/idobao/id42/keyboard.json @@ -56,6 +56,50 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [3, 11], "x": 224, "y": 64, "flags": 4}, + {"matrix": [3, 10], "x": 204, "y": 64, "flags": 4}, + {"matrix": [3, 9], "x": 183, "y": 64, "flags": 4}, + {"matrix": [3, 6], "x": 135, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 84, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 48, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 25, "y": 64, "flags": 4}, + {"matrix": [3, 0], "x": 3, "y": 64, "flags": 4}, + {"matrix": [2, 11], "x": 224, "y": 43, "flags": 4}, + {"matrix": [2, 10], "x": 204, "y": 43, "flags": 4}, + {"matrix": [2, 8], "x": 181, "y": 43, "flags": 4}, + {"matrix": [2, 7], "x": 158, "y": 43, "flags": 1}, + {"matrix": [2, 6], "x": 137, "y": 43, "flags": 1}, + {"matrix": [2, 5], "x": 117, "y": 43, "flags": 1}, + {"matrix": [2, 4], "x": 97, "y": 43, "flags": 1}, + {"matrix": [2, 3], "x": 76, "y": 43, "flags": 1}, + {"matrix": [2, 2], "x": 56, "y": 43, "flags": 1}, + {"matrix": [2, 1], "x": 36, "y": 43, "flags": 1}, + {"matrix": [2, 0], "x": 8, "y": 43, "flags": 4}, + {"matrix": [1, 11], "x": 216, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 188, "y": 21, "flags": 1}, + {"matrix": [1, 8], "x": 168, "y": 21, "flags": 1}, + {"matrix": [1, 7], "x": 148, "y": 21, "flags": 1}, + {"matrix": [1, 6], "x": 127, "y": 21, "flags": 1}, + {"matrix": [1, 5], "x": 107, "y": 21, "flags": 1}, + {"matrix": [1, 4], "x": 87, "y": 21, "flags": 1}, + {"matrix": [1, 3], "x": 66, "y": 21, "flags": 1}, + {"matrix": [1, 2], "x": 46, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 25, "y": 21, "flags": 1}, + {"matrix": [1, 0], "x": 3, "y": 21, "flags": 4}, + {"matrix": [0, 11], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 204, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 183, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 163, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 143, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 122, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 102, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 81, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 41, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/idobao/id61/id61.c b/keyboards/idobao/id61/id61.c deleted file mode 100644 index bd2271049b..0000000000 --- a/keyboards/idobao/id61/id61.c +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Vino Rodrigues (@vinorodrigues) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#define __ NO_LED - -#if defined(RGB_MATRIX_ENABLE) - -/* Pre-key - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │60 │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 │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - * - * Underglow (from top / [Esc] = top left) - * ┌────┬────┬────┬────┬────┐ - * │ 61 │ 62 │ 63 │ 64 │ 65 │ - * ├────┴────┴────┴────┴────┤ - * ├────┬────┬────┬────┬────┤ - * │ 70 │ 69 │ 68 │ 67 │ 66 │ - * └────┴────┴────┴────┴────┘ - */ - -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 60, 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 }, -}, { - // LED Index to Physical Position - // generated from: https://xelus.netlify.app/guides/KLE_to_RGB_parser - /* NB: Reverse order! */ - {224,64 }, {204,64 }, {184,64 }, {163,64 }, {103,64 }, { 42,64 }, { 22,64 }, { 2,64 }, - {212,48 }, {182,48 }, {165,48 }, {149,48 }, {133,48 }, {117,48 }, {101,48 }, { 85,48 }, { 69,48 }, { 52,48 }, { 36,48 }, { 10,48 }, - {216,32 }, {190,32 }, {174,32 }, {157,32 }, {141,32 }, {125,32 }, {109,32 }, { 93,32 }, { 77,32 }, { 61,32 }, { 44,32 }, { 28,32 }, { 6,32 }, - {222,16 }, {202,16 }, {186,16 }, {170,16 }, {153,16 }, {137,16 }, {121,16 }, {105,16 }, { 89,16 }, { 73,16 }, { 57,16 }, { 40,16 }, { 24,16 }, { 4,16 }, - {218,0 }, {194,0 }, {178,0 }, {161,0 }, {145,0 }, {129,0 }, {113,0 }, { 97,0 }, { 81,0 }, { 65,0 }, { 48,0 }, { 32,0 }, { 16,0 }, { 0,0 } - // underglow LEDs (positions pushed to nearest edge to match edge key colors) - #ifndef ID61_DISABLE_UNDERGLOW - , { 0,0 }, { 56,0 }, { 112,0 }, {168,0 }, {224,0 }, - {224,64 }, {168,64 }, {112,64 }, { 56,64 }, { 0,64 } - #endif -}, { - // LED Index to Flag - /* NB: Reverse order! */ - 1, 1, 1, 1, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, - 1, 4, 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, 4 - // underglow LEDs - #ifndef ID61_DISABLE_UNDERGLOW - , 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2 - #endif -} }; - -#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/id61/keyboard.json b/keyboards/idobao/id61/keyboard.json index d3bf62c726..af0c29788d 100644 --- a/keyboards/idobao/id61/keyboard.json +++ b/keyboards/idobao/id61/keyboard.json @@ -56,6 +56,79 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 204, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 184, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 163, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 103, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [3, 12], "x": 212, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 182, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 149, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 133, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 117, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 101, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 85, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [2, 12], "x": 216, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 190, "y": 32, "flags": 1}, + {"matrix": [2, 10], "x": 174, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 157, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 141, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 125, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 109, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 93, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 77, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 9}, + {"matrix": [1, 13], "x": 222, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 202, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 186, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 170, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 153, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 137, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 121, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 105, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 89, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 73, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 57, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [0, 13], "x": 218, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 194, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 178, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 161, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 65, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 56, "y": 0, "flags": 2}, + {"x": 112, "y": 0, "flags": 2}, + {"x": 168, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 168, "y": 64, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 56, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2} + ], "max_brightness": 170, "sleep": true }, diff --git a/keyboards/idobao/id63/id63.c b/keyboards/idobao/id63/id63.c deleted file mode 100644 index f425eb4fe4..0000000000 --- a/keyboards/idobao/id63/id63.c +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Vino Rodrigues (@vinorodrigues) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#define __ NO_LED - -#ifdef RGB_MATRIX_ENABLE - -/* Pre-key LED addresses - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │62 │61 │60 │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 │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - * - * Underglow LED addresses (as seen from top / [Esc] = top left) - * ┌────┬────┬────┬────┬────┬────┐ - * │ 63 │ 64 │ 65 │ 66 │ 67 │ 68 │ - * ├────┴────┴────┴────┴────┴────┤ - * ├────┬────┬────┬────┬────┬────┤ - * │ 74 │ 73 │ 72 │ 71 │ 70 │ 69 │ - * └────┴────┴────┴────┴────┴────┘ - */ - -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 62, 61, 60, 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 }, -}, { - // LED Index to Physical Position - // generated from: https://xelus.netlify.app/guides/KLE_to_RGB_parser - /* NB: Reverse & upside-down order! */ - {224,64 }, {208,64 }, {192,64 }, {176,64 }, {160,64 }, {102,64 }, { 42,64 }, { 22,64 }, { 2,64 }, - {224,48 }, {208,48 }, {186,48 }, {164,48 }, {148,48 }, {132,48 }, {116,48 }, {100,48 }, { 84,48 }, { 68,48 }, { 52,48 }, { 36,48 }, { 10,48 }, - {214,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 }, - {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 }, - {216,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 }, { 0,0 } - // underglow LEDs (positions pushed to nearest edge to match edge key colors) - #ifndef ID63_DISABLE_UNDERGLOW - , { 0,0 }, { 45,0 }, { 90,0 }, {134,0 }, {179,0 }, {224,0 }, - {224,64 }, {179,64 }, {134,64 }, { 90,64 }, { 45,64 }, { 0,64 } - #endif -}, { - // LED Index to Flag - /* NB: Reverse & upside-down order! */ - 4, 4, 4, 1, 1, 4, 1, 1, 1, - 1, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, - 1, 4, 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, 4 - // underglow LEDs - #ifndef ID63_DISABLE_UNDERGLOW - , 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2 - #endif -} }; - -#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/id63/keyboard.json b/keyboards/idobao/id63/keyboard.json index 141c1263d1..bfe0ac7cbe 100644 --- a/keyboards/idobao/id63/keyboard.json +++ b/keyboards/idobao/id63/keyboard.json @@ -56,6 +56,83 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 176, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 186, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [2, 13], "x": 214, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 1}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 9}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 45, "y": 0, "flags": 2}, + {"x": 90, "y": 0, "flags": 2}, + {"x": 134, "y": 0, "flags": 2}, + {"x": 179, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 179, "y": 64, "flags": 2}, + {"x": 134, "y": 64, "flags": 2}, + {"x": 90, "y": 64, "flags": 2}, + {"x": 45, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/idobao/id67/id67.c b/keyboards/idobao/id67/id67.c deleted file mode 100644 index dab6347eb3..0000000000 --- a/keyboards/idobao/id67/id67.c +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2021 Tybera (@tybera) -// Copyright 2021 Werther (@thewerther) -// Copyright 2022 Vino Rodrigues (@vinorodrigues) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#define __ NO_LED - -#if defined(RGB_MATRIX_ENABLE) - -/* NB!!: Indices are reversed on the physical board, top left is bottom right. - * These "LED Index to *" arrays are in that reversed order! - * i.e., Space row on top, listed right to left */ -led_config_t g_led_config = { { - /* Under- / Per-Key - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ - * │66 │65 │64 │63 │62 │61 │60 │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 │ - * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ - * - * Bottom Side (as seen from top orientation) - * 67 68 69 70 71 - * 76 75 74 73 72 - */ - // Key Matrix to LED Index - {66, 65, 64, 63, 62, 61, 60, 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}, -}, { - // LED Index to Physical Position - // based on: https://gist.github.com/vinorodrigues/07fd735683856b2a06c7c52b9b3878cb - // **NB: In reverse order** - {224,64 }, {209,64 }, {194,64 }, {170,64 }, {151,64 }, { 95,64 }, { 39,64 }, { 21,64 }, { 2,64 }, - {224,48 }, {209,48 }, {189,48 }, {168,48 }, {153,48 }, {138,48 }, {123,48 }, {108,48 }, { 93,48 }, { 78,48 }, { 63,48 }, { 49,48 }, { 34,48 }, { 9,48 }, - {224,32 }, {200,32 }, {175,32 }, {161,32 }, {146,32 }, {131,32 }, {116,32 }, {101,32 }, { 86,32 }, { 71,32 }, { 56,32 }, { 41,32 }, { 26,32 }, { 6,32 }, - {224,16 }, {205,16 }, {187,16 }, {172,16 }, {157,16 }, {142,16 }, {127,16 }, {112,16 }, { 97,16 }, { 82,16 }, { 67,16 }, { 52,16 }, { 37,16 }, { 22,16 }, { 4,16 }, - {224,0 }, {202,0 }, {179,0 }, {164,0 }, {149,0 }, {134,0 }, {119,0 }, {105,0 }, { 90,0 }, { 75,0 }, { 60,0 }, { 45,0 }, { 30,0 }, { 15,0 }, { 0,0 } - // underglow LEDs - #ifndef ID67_DISABLE_UNDERGLOW - , {0, 0}, {56, 0}, {112, 0}, {168, 0}, {224, 0}, - {224, 64}, {168, 64}, {112, 64}, {56, 64}, {0, 64} - #endif -}, { - // LED Index to Flag - // **NB: In reverse order** - 1, 1, 1, 1, 1, 4, 1, 1, 1, // fifth/bottom row - 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // fourth row - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, // third row - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // second row - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1 // first/top row - // underglow LEDs - #ifndef ID67_DISABLE_UNDERGLOW - , 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2 - #endif -} }; - -#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/id67/keyboard.json b/keyboards/idobao/id67/keyboard.json index 786ed39be0..025b965050 100644 --- a/keyboards/idobao/id67/keyboard.json +++ b/keyboards/idobao/id67/keyboard.json @@ -56,6 +56,85 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 194, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 170, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 151, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 95, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 39, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 209, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 168, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 153, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 138, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 123, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 108, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 93, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 78, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 63, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [2, 13], "x": 200, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 175, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 9}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 205, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 187, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 172, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 157, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 142, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 127, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 97, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 82, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 67, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 22, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 179, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 164, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 134, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 56, "y": 0, "flags": 2}, + {"x": 112, "y": 0, "flags": 2}, + {"x": 168, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 168, "y": 64, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 56, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/idobao/id75/v2/keyboard.json b/keyboards/idobao/id75/v2/keyboard.json index 743c7cf404..068c01a785 100644 --- a/keyboards/idobao/id75/v2/keyboard.json +++ b/keyboards/idobao/id75/v2/keyboard.json @@ -44,7 +44,94 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"x": 8, "y": 12, "flags": 2}, + {"x": 60, "y": 12, "flags": 2}, + {"x": 112, "y": 12, "flags": 2}, + {"x": 164, "y": 12, "flags": 2}, + {"x": 216, "y": 12, "flags": 2}, + {"x": 216, "y": 60, "flags": 2}, + {"x": 164, "y": 60, "flags": 2}, + {"x": 112, "y": 60, "flags": 2}, + {"x": 60, "y": 60, "flags": 2}, + {"x": 8, "y": 60, "flags": 2}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 176, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 160, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 144, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 7], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 208, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 208, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4} + ] }, "build": { "lto": true diff --git a/keyboards/idobao/id75/v2/v2.c b/keyboards/idobao/id75/v2/v2.c deleted file mode 100644 index 55d58d92e1..0000000000 --- a/keyboards/idobao/id75/v2/v2.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2022 peepeetee - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index -{ 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70 }, -{ 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 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 } -}, { - // LED Index to Physical Position -{8, 12},{60, 12},{112, 12},{164, 12},{216, 12}, -{216, 60},{164, 60},{112, 60},{60, 60},{8, 60}, - - -{224, 64}, {208, 64}, {192, 64}, {176, 64}, {160, 64}, {144, 64}, {128, 64}, {112, 64}, {96, 64}, {80, 64}, {64, 64}, {48, 64}, {32, 64}, {16, 64}, {0, 64}, -{224, 48}, {208, 48}, {192, 48}, {176, 48}, {160, 48}, {144, 48}, {128, 48}, {112, 48}, {96, 48}, {80, 48}, {64, 48}, {48, 48}, {32, 48}, {16, 48}, {0, 48}, -{224, 32}, {208, 32}, {192, 32}, {176, 32}, {160, 32}, {144, 32}, {128, 32}, {112, 32}, {96, 32}, {80, 32}, {64, 32}, {48, 32}, {32, 32}, {16, 32}, {0, 32}, -{224, 16}, {208, 16}, {192, 16}, {176, 16}, {160, 16}, {144, 16}, {128, 16}, {112, 16}, {96, 16}, {80, 16}, {64, 16}, {48, 16}, {32, 16}, {16, 16}, {0, 16}, -{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}, {0, 0}, - -}, { - // LED Index to Flag -2,2,2,2,2,2,2,2,2,2, -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,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,4,4,4, - -} }; - -#endif diff --git a/keyboards/idobao/id80/v3/ansi/ansi.c b/keyboards/idobao/id80/v3/ansi/ansi.c deleted file mode 100644 index 75f995fbbe..0000000000 --- a/keyboards/idobao/id80/v3/ansi/ansi.c +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2022 Vino Rodrigues (@vinorodrigues) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#define __ NO_LED - -#ifdef RGB_MATRIX_ENABLE - -/* Per-key LED's - * ┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐┌───┐ - * │79 ││78 │77 │76 │75 ││74 │73 │72 │71 ││70 │69 │68 │67 ││66 ││65 │ - * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ - * │64 │63 │62 │61 │60 │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 │ - * └───┴───┴───┘ - * Underglow (as seen from top) - * ┌────┬────┬────┬────┬────┬────┐ - * │ 80 │ 81 │ 82 │ 83 │ 84 │ 85 │ - * ├────┼────┴────┴────┴────┼────┤ - * │ 93 │ │ 86 │ - * ├────┼────┬────┬────┬────┼────┤ - * │ 92 │ 91 │ 90 │ 89 │ 88 │ 87 │ - * └────┴────┴────┴────┴────┴────┘ - */ - -led_config_t g_led_config = { { - // Key Matrix to LED Index - /* Generated with: https://xelus.netlify.app/guides/KLE_to_RGB_parser */ - { 8, 21, 34, 49, 64, 79, __, __, __, __, __ }, - { 7, __, 33, 48, 63, 78, __, __, __, __, __ }, - { 6, 20, 32, 47, 62, 77, __, __, 35, 50, 65 }, - { 0, 19, 31, 46, 61, 76, 9, __, 36, __, 67 }, - { 1, 18, 30, 45, 60, 75, 10, 22, 37, 52, 68 }, - { 2, 17, 29, 44, 59, 74, 11, 23, 38, 53, 69 }, - { 5, 16, 28, 43, 58, 73, __, __, __, 51, 66 }, - { 3, 15, 27, 42, 57, 72, 12, 24, 39, 54, 70 }, - { 4, 14, 26, 41, 56, 71, 13, 25, 40, 55, __ }, -}, { - /* NB: Reversed order */ - // per-key - {224,64 }, {209,64 }, {195,64 }, {173,61 }, {151,61 }, { 94,61 }, { 39,61 }, { 20,61 }, { 2,61 }, - {209,52 }, {185,49 }, {165,49 }, {151,49 }, {136,49 }, {121,49 }, {106,49 }, { 92,49 }, { 77,49 }, { 62,49 }, { 48,49 }, { 33,49 }, { 9,49 }, - {196,38 }, {173,38 }, {158,38 }, {143,38 }, {129,38 }, {114,38 }, { 99,38 }, { 84,38 }, { 70,38 }, { 55,38 }, { 40,38 }, { 26,38 }, { 6,38 }, - {224,26 }, {202,26 }, {184,26 }, {169,26 }, {154,26 }, {140,26 }, {125,26 }, {110,26 }, { 95,26 }, { 81,26 }, { 66,26 }, { 51,26 }, { 37,26 }, { 22,26 }, { 4,26 }, - {224,15 }, {198,15 }, {176,15 }, {162,15 }, {147,15 }, {132,15 }, {118,15 }, {103,15 }, { 88,15 }, { 73,15 }, { 59,15 }, { 44,15 }, { 29,15 }, { 15,15 }, { 0,15 }, - {224,0 }, {206,0 }, {187,0 }, {173,0 }, {158,0 }, {143,0 }, {125,0 }, {110,0 }, { 95,0 }, { 81,0 }, { 62,0 }, { 48,0 }, { 33,0 }, { 18,0 }, { 0,0 }, - // underglow - { 0,0 }, { 45,0 }, { 90,0 }, {134,0 }, {179,0 }, {224,0 }, - {224,32 }, - {224,64 }, {179,64 }, {134,64 }, { 90,64 }, { 45,64 }, { 0,64 }, - { 0,32 } -}, { - /* NB: Reversed order */ - 4, 4, 4, 4, 4, 1, 4, 4, 4, - 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 4, 4, 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, 4, 4, - // - 2, 2, 2, 2, 2, 2, - 2, - 2, 2, 2, 2, 2, 2, - 2 -} }; - -#endif diff --git a/keyboards/idobao/id80/v3/ansi/keyboard.json b/keyboards/idobao/id80/v3/ansi/keyboard.json index 0ab369fb5d..a366289a1f 100644 --- a/keyboards/idobao/id80/v3/ansi/keyboard.json +++ b/keyboards/idobao/id80/v3/ansi/keyboard.json @@ -53,6 +53,102 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [3, 0], "x": 224, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 209, "y": 64, "flags": 4}, + {"matrix": [5, 0], "x": 195, "y": 64, "flags": 4}, + {"matrix": [7, 0], "x": 173, "y": 61, "flags": 4}, + {"matrix": [8, 0], "x": 151, "y": 61, "flags": 4}, + {"matrix": [6, 0], "x": 94, "y": 61, "flags": 1}, + {"matrix": [2, 0], "x": 39, "y": 61, "flags": 4}, + {"matrix": [1, 0], "x": 20, "y": 61, "flags": 4}, + {"matrix": [0, 0], "x": 2, "y": 61, "flags": 4}, + {"matrix": [3, 6], "x": 209, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 185, "y": 49, "flags": 4}, + {"matrix": [5, 6], "x": 165, "y": 49, "flags": 1}, + {"matrix": [7, 6], "x": 151, "y": 49, "flags": 1}, + {"matrix": [8, 6], "x": 136, "y": 49, "flags": 1}, + {"matrix": [8, 1], "x": 121, "y": 49, "flags": 1}, + {"matrix": [7, 1], "x": 106, "y": 49, "flags": 1}, + {"matrix": [6, 1], "x": 92, "y": 49, "flags": 1}, + {"matrix": [5, 1], "x": 77, "y": 49, "flags": 1}, + {"matrix": [4, 1], "x": 62, "y": 49, "flags": 1}, + {"matrix": [3, 1], "x": 48, "y": 49, "flags": 1}, + {"matrix": [2, 1], "x": 33, "y": 49, "flags": 1}, + {"matrix": [0, 1], "x": 9, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 196, "y": 38, "flags": 4}, + {"matrix": [5, 7], "x": 173, "y": 38, "flags": 1}, + {"matrix": [7, 7], "x": 158, "y": 38, "flags": 1}, + {"matrix": [8, 7], "x": 143, "y": 38, "flags": 1}, + {"matrix": [8, 2], "x": 129, "y": 38, "flags": 1}, + {"matrix": [7, 2], "x": 114, "y": 38, "flags": 1}, + {"matrix": [6, 2], "x": 99, "y": 38, "flags": 1}, + {"matrix": [5, 2], "x": 84, "y": 38, "flags": 1}, + {"matrix": [4, 2], "x": 70, "y": 38, "flags": 1}, + {"matrix": [3, 2], "x": 55, "y": 38, "flags": 1}, + {"matrix": [2, 2], "x": 40, "y": 38, "flags": 1}, + {"matrix": [1, 2], "x": 26, "y": 38, "flags": 1}, + {"matrix": [0, 2], "x": 6, "y": 38, "flags": 4}, + {"matrix": [2, 8], "x": 224, "y": 26, "flags": 4}, + {"matrix": [3, 8], "x": 202, "y": 26, "flags": 1}, + {"matrix": [4, 8], "x": 184, "y": 26, "flags": 1}, + {"matrix": [5, 8], "x": 169, "y": 26, "flags": 1}, + {"matrix": [7, 8], "x": 154, "y": 26, "flags": 1}, + {"matrix": [8, 8], "x": 140, "y": 26, "flags": 1}, + {"matrix": [8, 3], "x": 125, "y": 26, "flags": 1}, + {"matrix": [7, 3], "x": 110, "y": 26, "flags": 1}, + {"matrix": [6, 3], "x": 95, "y": 26, "flags": 1}, + {"matrix": [5, 3], "x": 81, "y": 26, "flags": 1}, + {"matrix": [4, 3], "x": 66, "y": 26, "flags": 1}, + {"matrix": [3, 3], "x": 51, "y": 26, "flags": 1}, + {"matrix": [2, 3], "x": 37, "y": 26, "flags": 1}, + {"matrix": [1, 3], "x": 22, "y": 26, "flags": 1}, + {"matrix": [0, 3], "x": 4, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 224, "y": 15, "flags": 4}, + {"matrix": [6, 9], "x": 198, "y": 15, "flags": 4}, + {"matrix": [4, 9], "x": 176, "y": 15, "flags": 1}, + {"matrix": [5, 9], "x": 162, "y": 15, "flags": 1}, + {"matrix": [7, 9], "x": 147, "y": 15, "flags": 1}, + {"matrix": [8, 9], "x": 132, "y": 15, "flags": 1}, + {"matrix": [8, 4], "x": 118, "y": 15, "flags": 1}, + {"matrix": [7, 4], "x": 103, "y": 15, "flags": 1}, + {"matrix": [6, 4], "x": 88, "y": 15, "flags": 1}, + {"matrix": [5, 4], "x": 73, "y": 15, "flags": 1}, + {"matrix": [4, 4], "x": 59, "y": 15, "flags": 1}, + {"matrix": [3, 4], "x": 44, "y": 15, "flags": 1}, + {"matrix": [2, 4], "x": 29, "y": 15, "flags": 1}, + {"matrix": [1, 4], "x": 15, "y": 15, "flags": 1}, + {"matrix": [0, 4], "x": 0, "y": 15, "flags": 1}, + {"matrix": [2, 10], "x": 224, "y": 0, "flags": 4}, + {"matrix": [6, 10], "x": 206, "y": 0, "flags": 4}, + {"matrix": [3, 10], "x": 187, "y": 0, "flags": 4}, + {"matrix": [4, 10], "x": 173, "y": 0, "flags": 4}, + {"matrix": [5, 10], "x": 158, "y": 0, "flags": 4}, + {"matrix": [7, 10], "x": 143, "y": 0, "flags": 4}, + {"matrix": [8, 5], "x": 125, "y": 0, "flags": 4}, + {"matrix": [7, 5], "x": 110, "y": 0, "flags": 4}, + {"matrix": [6, 5], "x": 95, "y": 0, "flags": 4}, + {"matrix": [5, 5], "x": 81, "y": 0, "flags": 4}, + {"matrix": [4, 5], "x": 62, "y": 0, "flags": 4}, + {"matrix": [3, 5], "x": 48, "y": 0, "flags": 4}, + {"matrix": [2, 5], "x": 33, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 18, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 0, "y": 0, "flags": 4}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 45, "y": 0, "flags": 2}, + {"x": 90, "y": 0, "flags": 2}, + {"x": 134, "y": 0, "flags": 2}, + {"x": 179, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 32, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 179, "y": 64, "flags": 2}, + {"x": 134, "y": 64, "flags": 2}, + {"x": 90, "y": 64, "flags": 2}, + {"x": 45, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 0, "y": 32, "flags": 2} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/idobao/id87/v2/keyboard.json b/keyboards/idobao/id87/v2/keyboard.json index ad6641f954..1b7d428dda 100644 --- a/keyboards/idobao/id87/v2/keyboard.json +++ b/keyboards/idobao/id87/v2/keyboard.json @@ -56,6 +56,111 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"x": 0, "y": 64, "flags": 2}, + {"x": 37, "y": 64, "flags": 2}, + {"x": 75, "y": 64, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 149, "y": 64, "flags": 2}, + {"x": 187, "y": 64, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 224, "y": 32, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 187, "y": 0, "flags": 2}, + {"x": 149, "y": 0, "flags": 2}, + {"x": 112, "y": 0, "flags": 2}, + {"x": 75, "y": 0, "flags": 2}, + {"x": 37, "y": 0, "flags": 2}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 0, "y": 32, "flags": 2}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4}, + {"matrix": [5, 8], "x": 131, "y": 64, "flags": 1}, + {"matrix": [5, 7], "x": 148, "y": 64, "flags": 1}, + {"matrix": [5, 4], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 3], "x": 180, "y": 64, "flags": 1}, + {"matrix": [10, 6], "x": 198, "y": 64, "flags": 1}, + {"matrix": [10, 2], "x": 211, "y": 64, "flags": 1}, + {"matrix": [10, 1], "x": 224, "y": 64, "flags": 1}, + {"matrix": [9, 2], "x": 211, "y": 52, "flags": 1}, + {"matrix": [10, 4], "x": 170, "y": 52, "flags": 1}, + {"matrix": [10, 5], "x": 146, "y": 52, "flags": 4}, + {"matrix": [10, 7], "x": 133, "y": 52, "flags": 4}, + {"matrix": [10, 8], "x": 120, "y": 52, "flags": 4}, + {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1}, + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 1}, + {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4}, + {"matrix": [9, 8], "x": 127, "y": 40, "flags": 4}, + {"matrix": [9, 7], "x": 140, "y": 40, "flags": 4}, + {"matrix": [9, 5], "x": 153, "y": 40, "flags": 4}, + {"matrix": [9, 3], "x": 174, "y": 40, "flags": 1}, + {"matrix": [8, 1], "x": 224, "y": 27, "flags": 1}, + {"matrix": [8, 2], "x": 211, "y": 27, "flags": 1}, + {"matrix": [8, 6], "x": 198, "y": 27, "flags": 1}, + {"matrix": [8, 3], "x": 179, "y": 27, "flags": 4}, + {"matrix": [8, 4], "x": 162, "y": 27, "flags": 4}, + {"matrix": [8, 5], "x": 149, "y": 27, "flags": 4}, + {"matrix": [8, 7], "x": 136, "y": 27, "flags": 4}, + {"matrix": [8, 8], "x": 123, "y": 27, "flags": 4}, + {"matrix": [2, 8], "x": 110, "y": 27, "flags": 4}, + {"matrix": [2, 7], "x": 97, "y": 27, "flags": 4}, + {"matrix": [2, 6], "x": 84, "y": 27, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 27, "flags": 4}, + {"matrix": [2, 4], "x": 58, "y": 27, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 27, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 27, "flags": 4}, + {"matrix": [2, 1], "x": 19, "y": 27, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 27, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4}, + {"matrix": [7, 8], "x": 117, "y": 15, "flags": 4}, + {"matrix": [7, 0], "x": 130, "y": 15, "flags": 4}, + {"matrix": [7, 7], "x": 143, "y": 15, "flags": 4}, + {"matrix": [7, 5], "x": 156, "y": 15, "flags": 4}, + {"matrix": [7, 3], "x": 175, "y": 15, "flags": 1}, + {"matrix": [7, 6], "x": 198, "y": 15, "flags": 1}, + {"matrix": [7, 2], "x": 211, "y": 15, "flags": 1}, + {"matrix": [7, 1], "x": 224, "y": 15, "flags": 1}, + {"matrix": [6, 1], "x": 224, "y": 0, "flags": 1}, + {"matrix": [6, 2], "x": 211, "y": 0, "flags": 1}, + {"matrix": [6, 6], "x": 198, "y": 0, "flags": 1}, + {"matrix": [6, 3], "x": 182, "y": 0, "flags": 1}, + {"matrix": [6, 4], "x": 169, "y": 0, "flags": 1}, + {"matrix": [6, 5], "x": 156, "y": 0, "flags": 1}, + {"matrix": [6, 7], "x": 143, "y": 0, "flags": 1}, + {"matrix": [6, 8], "x": 123, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 97, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 65, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 52, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 39, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 26, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/idobao/id87/v2/v2.c b/keyboards/idobao/id87/v2/v2.c deleted file mode 100644 index 7992fb6295..0000000000 --- a/keyboards/idobao/id87/v2/v2.c +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2022 vinorodrigues (@vinorodrigues) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#define __ NO_LED - -#if defined(RGB_MATRIX_ENABLE) - -/* Under-, Per-Key - * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │102│ │101│100│99 │98 │ │97 │96 │95 │94 │ │93 │92 │91 │90 │ │89 │88 │87 │ - * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ - * │70 │71 │72 │73 │74 │75 │76 │77 │78 │79 │80 │81 │82 │ 83 │ │84 │85 │86 │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ - * │ 69 │68 │67 │66 │65 │64 │63 │62 │61 │60 │59 │58 │57 │ 56 │ │55 │54 │53 │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ - * │ 40 │41 │42 │43 │44 │45 │46 │47 │48 │49 │50 │51 │ 52 │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ - * │ 39 │38 │37 │36 │35 │34 │33 │32 │31 │30 │29 │ 28 │ │27 │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ - * │ 16 │ 17 │ 18 │ 19 │ 20 │ 21 │ 22 │ 23 │ │24 │25 │26 │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ - * - * Underglow (as seen from top) - * ┌───┬───┬───┬───┬───┬───┬───┐ - * │14 │13 │12 │11 │10 │ 9 │ 8 │ - * ├───┼───┴───┴───┴───┴───┼───┤ - * │15 │ │ 7 │ - * ├───┼───┬───┬───┬───┬───┼───┤ - * │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ - * └───┴───┴───┴───┴───┴───┴───┘ -*/ -led_config_t g_led_config = { { - // Key Matrix to LED Index - // partially generated from: https://xelus.netlify.app/guides/KLE_to_RGB_parser & CSV Excel formula - - { 102, __, 101, 100, 99, 98, 97, 96, 95 }, - { 70, 71, 72, 73, 74, 75, 76, 77, 78 }, - { 69, 68, 67, 66, 65, 64, 63, 62, 61 }, - { 40, 41, 42, 43, 44, 45, 46, 47, 48 }, - { 39, __, 38, 37, 36, 35, 34, 33, 32 }, - { 16, 17, 18, 23, 22, __, 19, 21, 20 }, - { __, 87, 88, 90, 91, 92, 89, 93, 94 }, - { 80, 86, 85, 83, __, 82, 84, 81, 79 }, - { __, 53, 54, 56, 57, 58, 55, 59, 60 }, - { __, __, 27, 52, __, 51, __, 50, 49 }, - { __, 26, 25, __, 28, 29, 24, 30, 31 } -}, { - // LED Index to Physical Position - // generated from: https://xelus.netlify.app/guides/KLE_to_RGB_parser - // underglow - /* colors are pushed to the edge as only the edges can be seen */ - { 0,64 }, { 37,64 }, { 75,64 }, {112,64 }, {149,64 }, {187,64 }, {224,64 }, - {224,32 }, - {224,0 }, {187,0 }, {149,0 }, {112,0 }, { 75,0 }, { 37,0 }, { 0,0 }, - { 0,32 }, - // under-, per-key - /* pattern is complex; starts at btm-lft, zig-zags up, and ends top-lft */ - { 2,64 }, { 18,64 }, { 34,64 }, { 83,64 }, {131,64 }, {148,64 }, {164,64 }, {180,64 }, {198,64 }, {211,64 }, {224,64 }, // lf-2-rt, btm - {211,52 }, {170,52 }, {146,52 }, {133,52 }, {120,52 }, {107,52 }, { 94,52 }, { 81,52 }, { 68,52 }, { 55,52 }, { 42,52 }, { 29,52 }, { 8,52 }, // rt-2-lf** - { 5,40 }, { 23,40 }, { 36,40 }, { 49,40 }, { 62,40 }, { 75,40 }, { 88,40 }, {101,40 }, {114,40 }, {127,40 }, {140,40 }, {153,40 }, {174,40 }, // lf-2-rt - {224,27 }, {211,27 }, {198,27 }, {179,27 }, {162,27 }, {149,27 }, {136,27 }, {123,27 }, {110,27 }, { 97,27 }, { 84,27 }, { 71,27 }, { 58,27 }, { 45,27 }, { 32,27 }, { 19,27 }, { 3,27 }, // rt-2-lf** - { 0,15 }, { 13,15 }, { 26,15 }, { 39,15 }, { 52,15 }, { 65,15 }, { 78,15 }, { 91,15 }, {104,15 }, {117,15 }, {130,15 }, {143,15 }, {156,15 }, {175,15 }, {198,15 }, {211,15 }, {224,15 }, // lf-2-rt - {224,0 }, {211,0 }, {198,0 }, {182,0 }, {169,0 }, {156,0 }, {143,0 }, {123,0 }, {110,0 }, { 97,0 }, { 84,0 }, { 65,0 }, { 52,0 }, { 39,0 }, { 26,0 }, { 0,0 }, // rt-2-lf**, top -}, { - // LED Index to Flag - // underglow - 2, 2, 2, 2, 2, 2, 2, - 2, - 2, 2, 2, 2, 2, 2, 2, - 2, - // under-, per-key - 1, 1, 1, 4, 1, 1, 1, 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, 4, 1, - 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -} }; - -#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/montex/v1rgb/keyboard.json b/keyboards/idobao/montex/v1rgb/keyboard.json index 1c5252bbea..affe87fd1f 100755 --- a/keyboards/idobao/montex/v1rgb/keyboard.json +++ b/keyboards/idobao/montex/v1rgb/keyboard.json @@ -33,6 +33,39 @@ "solid_splash": true }, "driver": "ws2812", + "layout": [ + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 0, "y": 0, "flags": 2}, + {"matrix": [0, 2], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 56, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 84, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 168, "y": 64, "flags": 4}, + {"matrix": [5, 3], "x": 224, "y": 58, "flags": 4}, + {"matrix": [4, 3], "x": 168, "y": 41, "flags": 4}, + {"matrix": [4, 2], "x": 112, "y": 41, "flags": 4}, + {"matrix": [4, 1], "x": 56, "y": 41, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 41, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 29, "flags": 4}, + {"matrix": [3, 1], "x": 56, "y": 29, "flags": 4}, + {"matrix": [3, 2], "x": 112, "y": 29, "flags": 4}, + {"matrix": [3, 3], "x": 168, "y": 29, "flags": 4}, + {"matrix": [2, 4], "x": 224, "y": 35, "flags": 4}, + {"matrix": [2, 3], "x": 168, "y": 29, "flags": 4}, + {"matrix": [2, 2], "x": 112, "y": 29, "flags": 4}, + {"matrix": [2, 1], "x": 56, "y": 29, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 29, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 17, "flags": 4}, + {"matrix": [1, 1], "x": 56, "y": 17, "flags": 4}, + {"matrix": [1, 2], "x": 112, "y": 17, "flags": 4}, + {"matrix": [1, 3], "x": 168, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 224, "y": 17, "flags": 4}, + {"matrix": [0, 4], "x": 224, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 168, "y": 0, "flags": 1} + ], "max_brightness": 170 }, "features": { diff --git a/keyboards/idobao/montex/v1rgb/v1rgb.c b/keyboards/idobao/montex/v1rgb/v1rgb.c deleted file mode 100755 index b70067cfcf..0000000000 --- a/keyboards/idobao/montex/v1rgb/v1rgb.c +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 peepeetee (@peepeetee) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE - -/* WS2812 indices always start at 0 - * underglow = 0-3 - * note: starting point of 4 and jump from 6 to 7 - * ┌───┌───┐───┬───┬───┐ - * │ 6 │ 5 │ 4 │30 │29 │ - * ├───┼───┘───┼───┼───┤ - * │24 │25 │26 │27 │28 │ - * ├───┼───┼───┼───┼───┤ - * │23 │22 │21 │20 │19 │ - * ├───┼───┼───┼───┤ │ - * │15 │16 │17 │18 │ │ - * ├───┼───┼───┼───┤───┤ - * │14 │13 │12 │11 │10 │ - * ├───┼───┴───┼───┤ │ - * │ 7 │ 8 │ 9 │ │ - * └───┴───────┴───┘───┘ - */ - -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 6, 5, 4, 30, 29}, - { 24, 25, 26, 27, 28}, - { 23, 22, 21, 20, 19}, - { 15, 16, 17, 18, NO_LED}, - { 14, 13, 12, 11, NO_LED}, - { 7, 8, 9, 10, NO_LED} -}, { - // LED Index to Physical Position - /* underglow: because this is under the kb, you want the colors on the edge (corners) of the acrylic plate */ - { 224,0 }, { 224,64}, { 0,64 }, { 0,0 }, // 0-3 (underglow) - /* per-key: origins generated from https://xelus.netlify.app/guides/KLE_to_RGB_parser */ - { 112,0 }, { 56,0 }, { 0,0 }, /* ---- */ /* ---- */ // 4-6 (top row middle to left) - { 0,64 }, { 84,64 }, { 168,64 }, // 7-9 (jump to bottom left) - { 224,58 }, { 168,41 }, { 112,41 }, { 56,41 }, { 0,41 }, // 10-14 (flow Z pattern upwards...) - { 0,29 }, { 56,29 }, { 112,29 }, { 168,29 }, // 15-18 - { 224,35 }, { 168,29 }, { 112,29 }, { 56,29 }, { 0,29 }, // 19-23 - { 0,17 }, { 56,17 }, { 112,17 }, { 168,17 }, { 224,17 }, // 24-28 - /* ---- */ /* ---- */ /* ---- */ { 224,0 }, { 168,0 } // 29-30 (end at top) -}, { - // LED Index to Flag - 2, 2, 2, 2, // 0 1 2 3 (underglow) - 1, 1, 1, // 4 5 6 - 4, 4, 4, 4, // 7 - 10 - 4, 4, 4, 4, //11 - 14 - 4, 4, 4, 4, //15 - 18 - 4, 4, 4, 4, 4, //19 - 23 - 4, 4, 4, 4, 4, //24 - 28 - 1, 1 //29 30 -} }; - -#endif diff --git a/keyboards/idobao/montex/v2/keyboard.json b/keyboards/idobao/montex/v2/keyboard.json index 319f46a459..0832ed8729 100755 --- a/keyboards/idobao/montex/v2/keyboard.json +++ b/keyboards/idobao/montex/v2/keyboard.json @@ -41,6 +41,39 @@ "solid_splash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 4], "x": 224, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 168, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 112, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 56, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 17, "flags": 4}, + {"matrix": [1, 1], "x": 56, "y": 17, "flags": 4}, + {"matrix": [1, 2], "x": 112, "y": 17, "flags": 4}, + {"matrix": [1, 3], "x": 168, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 224, "y": 17, "flags": 4}, + {"matrix": [2, 4], "x": 224, "y": 35, "flags": 4}, + {"matrix": [2, 3], "x": 168, "y": 29, "flags": 4}, + {"matrix": [2, 2], "x": 112, "y": 29, "flags": 4}, + {"matrix": [2, 1], "x": 56, "y": 29, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 29, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 41, "flags": 4}, + {"matrix": [3, 1], "x": 56, "y": 41, "flags": 4}, + {"matrix": [3, 2], "x": 112, "y": 41, "flags": 4}, + {"matrix": [3, 3], "x": 168, "y": 41, "flags": 4}, + {"matrix": [5, 3], "x": 224, "y": 58, "flags": 4}, + {"matrix": [4, 3], "x": 168, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 112, "y": 52, "flags": 4}, + {"matrix": [4, 1], "x": 56, "y": 52, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 52, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 84, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 168, "y": 64, "flags": 4}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/idobao/montex/v2/v2.c b/keyboards/idobao/montex/v2/v2.c deleted file mode 100755 index ad6e32a692..0000000000 --- a/keyboards/idobao/montex/v2/v2.c +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2022 IBNobody (@IBNobody) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#define __ NO_LED - -#ifdef RGB_MATRIX_ENABLE - -/* Under-, Per-key - * ┌───┬───┬───┬───┬───┐ - * │ 4 │ 3 │ 2 │ 1 │ 0 │ - * ├───┼───┼───┼───┼───┤ - * │ 5 │ 6 │ 7 │ 8 │ 9 │ - * ├───┼───┼───┼───┼───┤ - * │14 │13 │12 │11 │ │ - * ├───┼───┼───┼───┤10 │ - * │15 │16 │17 │18 │ │ - * ├───┼───┼───┼───┼───┤ - * │23 │22 │21 │20 │ │ - * ├───┼───┴───┼───┤19 │ - * │24 │ 25 │26 │ │ - * └───┴───────┴───┴───┘ - * - * Underglow (from top / [Esc] = top left) - * ┌─────────┬─────────┐ - * │ │ │ - * │ │ │ - * │ 29 │ 30 │ - * │ │ │ - * │ │ │ - * ├─────────┼─────────┤ - * │ │ │ - * │ │ │ - * │ 28 │ 27 │ - * │ │ │ - * │ │ │ - * └─────────┴─────────┘ - */ - -led_config_t g_led_config = { { - // Key Matrix to LED Index - // Montex v2 WS2812 are laid in a Z-shape with index 0 = top-right - // Based on: https://xelus.netlify.app/guides/KLE_to_RGB_parser - { 4, 3, 2, 1, 0}, - { 5, 6, 7, 8, 9}, - { 14, 13, 12, 11, 10}, - { 15, 16, 17, 18, __}, - { 23, 22, 21, 20, __}, - { 24, 25, 26, 19, __} -}, { - // LED Index to Physical Position - // per-key - // Based on: https://xelus.netlify.app/guides/KLE_to_RGB_parser - {224,0 }, {168,0 }, {112,0 }, { 56,0 }, { 0,0 }, // top row - { 0,17 }, { 56,17 }, {112,17 }, {168,17 }, {224,17 }, // num-lk & /*- (reversed) - {224,35 }, {168,29 }, {112,29 }, { 56,29 }, { 0,29 }, // 789+ - { 0,41 }, { 56,41 }, {112,41 }, {168,41 }, // 456 (reversed) - {224,58 }, {168,52 }, {112,52 }, { 56,52 }, // 123 - { 0,52 }, { 0,64 }, { 84,64 }, {168,64 } // 0. & enter (reversed) - // underglow LEDs (positions pushed to nearest edge to match edge key colors) - #ifndef ID27_DISABLE_UNDERGLOW - , {224,64 }, { 0,64 }, - { 0,0 }, { 224,0 } - #endif -}, { - // LED Index to Flag - // LED_FLAG_MODIFIER 0x01, LED_FLAG_UNDERGLOW 0x02, LED_FLAG_KEYLIGHT 0x04, LED_FLAG_INDICATOR 0x08 - // per-key - 1, 1, 1, 1, 1, - 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4 - // underglow - #ifndef ID27_DISABLE_UNDERGLOW - , 2, 2, 2, 2 - #endif -} }; - -#endif diff --git a/keyboards/idyllic/tinny50_rgb/keyboard.json b/keyboards/idyllic/tinny50_rgb/keyboard.json index 4d3cd320dd..e3d44714ab 100644 --- a/keyboards/idyllic/tinny50_rgb/keyboard.json +++ b/keyboards/idyllic/tinny50_rgb/keyboard.json @@ -59,7 +59,39 @@ "default": { "val": 223 }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"x": 126, "y": 64, "flags": 2}, + {"x": 108, "y": 64, "flags": 2}, + {"x": 90, "y": 64, "flags": 2}, + {"x": 72, "y": 64, "flags": 2}, + {"x": 54, "y": 64, "flags": 2}, + {"x": 36, "y": 64, "flags": 2}, + {"x": 18, "y": 64, "flags": 2}, + {"x": 0, "y": 52, "flags": 2}, + {"x": 0, "y": 39, "flags": 2}, + {"x": 0, "y": 26, "flags": 2}, + {"x": 0, "y": 13, "flags": 2}, + {"x": 18, "y": 0, "flags": 2}, + {"x": 36, "y": 0, "flags": 2}, + {"x": 54, "y": 0, "flags": 2}, + {"x": 72, "y": 0, "flags": 2}, + {"x": 90, "y": 0, "flags": 2}, + {"x": 108, "y": 0, "flags": 2}, + {"x": 126, "y": 0, "flags": 2}, + {"x": 144, "y": 0, "flags": 2}, + {"x": 162, "y": 0, "flags": 2}, + {"x": 180, "y": 0, "flags": 2}, + {"x": 198, "y": 0, "flags": 2}, + {"x": 224, "y": 13, "flags": 2}, + {"x": 224, "y": 26, "flags": 2}, + {"x": 224, "y": 39, "flags": 2}, + {"x": 224, "y": 52, "flags": 2}, + {"x": 198, "y": 64, "flags": 2}, + {"x": 180, "y": 64, "flags": 2}, + {"x": 162, "y": 64, "flags": 2}, + {"x": 144, "y": 64, "flags": 2} + ] }, "ws2812": { "pin": "GP10", diff --git a/keyboards/idyllic/tinny50_rgb/tinny50_rgb.c b/keyboards/idyllic/tinny50_rgb/tinny50_rgb.c deleted file mode 100644 index d8b06b8fb6..0000000000 --- a/keyboards/idyllic/tinny50_rgb/tinny50_rgb.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2022 Zykrah - -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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - // Key Matrix to LED Index - {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} - }, { - // LED Index to Physical Position - {150, 64}, {130, 64}, {110, 64}, { 90, 64}, { 70, 64}, { 50, 64}, { 30, 64}, - { 0, 52}, { 0, 39}, { 0, 26}, { 0, 13}, - { 30, 0}, { 50, 0}, { 70, 0}, { 90, 0}, {110, 0}, {130, 0}, {150, 0}, {170, 0}, {190, 0}, {210, 0}, {230, 0}, - {255, 13}, {255, 26}, {255, 39}, {255, 52}, - {230, 64}, {210, 64}, {190, 64}, {170, 64} - }, { - // LED Index to Flag - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // UNDERGLOW - 2, 2, 2, 2, // UNDERGLOW - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // UNDERGLOW - 2, 2, 2, 2, // UNDERGLOW - } -}; -#endif - diff --git a/keyboards/ilumkb/simpler61/keyboard.json b/keyboards/ilumkb/simpler61/keyboard.json index 10e182dac8..eb98400603 100644 --- a/keyboards/ilumkb/simpler61/keyboard.json +++ b/keyboards/ilumkb/simpler61/keyboard.json @@ -43,6 +43,69 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 4}, + {"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": 4}, + {"matrix": [2, 0], "x": 2, "y": 32, "flags": 4}, + {"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": 114, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 130, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 162, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 178, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 204, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 202, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 4, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 24, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 44, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 180, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 200, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 220, "y": 64, "flags": 4} + ], "led_process_limit": 4, "led_flush_limit": 26, "sleep": true diff --git a/keyboards/ilumkb/simpler61/simpler61.c b/keyboards/ilumkb/simpler61/simpler61.c index 99cefc7844..afff4dbc36 100644 --- a/keyboards/ilumkb/simpler61/simpler61.c +++ b/keyboards/ilumkb/simpler61/simpler61.c @@ -84,27 +84,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW7_CS30, SW7_CS29, SW7_CS28}, {0, SW5_CS30, SW5_CS29, SW5_CS28}, }; - -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, NO_LED, 40}, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, NO_LED, 53}, - { 54, 55, 56, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, NO_LED, 58, 59, NO_LED, 60}, - }, { - {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}, {24, 16}, {40, 16}, {56, 16}, {72, 16}, {88, 16}, {104, 16}, {120, 16}, {136, 16}, {152, 16}, {168, 16}, {184, 16}, {200, 16}, {220, 16}, - {2, 32}, {28, 32}, {44, 32}, {60, 32}, {76, 32}, {92, 32}, {108, 32}, {114, 32}, {130, 32}, {146, 32}, {162, 32}, {178, 32}, {204, 32}, - {9, 48}, {36, 48}, {52, 48}, {68, 48}, {84, 48}, {100, 48}, {116, 48}, {132, 48}, {148, 48}, {164, 48}, {180, 48}, {202, 48}, {224, 48}, - {4, 64}, {24, 64}, {44, 64}, {112, 64}, {180, 64}, {200, 64}, {220, 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, 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 diff --git a/keyboards/ilumkb/simpler64/keyboard.json b/keyboards/ilumkb/simpler64/keyboard.json index 240d0d67c2..b49c986d86 100644 --- a/keyboards/ilumkb/simpler64/keyboard.json +++ b/keyboards/ilumkb/simpler64/keyboard.json @@ -43,6 +43,72 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 4}, + {"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": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 4}, + {"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": 114, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 130, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 162, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 178, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 204, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 8, "y": 48, "flags": 4}, + {"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": 138, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 154, "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": 2, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 160, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 176, "y": 64, "flags": 4}, + {"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_process_limit": 4, "led_flush_limit": 26, "sleep": true diff --git a/keyboards/ilumkb/simpler64/simpler64.c b/keyboards/ilumkb/simpler64/simpler64.c index 21892a55f4..aa0a97fe54 100644 --- a/keyboards/ilumkb/simpler64/simpler64.c +++ b/keyboards/ilumkb/simpler64/simpler64.c @@ -87,27 +87,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW6_CS30, SW6_CS29, SW6_CS28}, {0, SW5_CS30, SW5_CS29, SW5_CS28}, }; - -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, NO_LED, 40}, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54}, - { 55, 56, 57, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, 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}, {24, 16}, {40, 16}, {56, 16}, {72, 16}, {88, 16}, {104, 16}, {120, 16}, {136, 16}, {152, 16}, {168, 16}, {184, 16}, {200, 16}, {220, 16}, - {6, 32}, {28, 32}, {44, 32}, {60, 32}, {76, 32}, {92, 32}, {108, 32}, {114, 32}, {130, 32}, {146, 32}, {162, 32}, {178, 32}, {204, 32}, - {8, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {138, 48}, {154, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, {224, 48}, - {2, 64}, {22, 64}, {42, 64}, {102, 64}, {160, 64}, {176, 64}, {192, 64}, {208, 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, 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 diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c index dc12ec4f30..da9f0fd617 100644 --- a/keyboards/inett_studio/sqx/hotswap/hotswap.c +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c @@ -114,44 +114,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C9_16, C7_15, C6_15}, }; -led_config_t g_led_config = { - { - { 18, 19, 20, 21, 22, 23, 24, 16, 17, 36, 37, 38, 39, 40}, - { 26, 27, 28, 29, 30, 31, 25, 48, 41, 42, 43, 44, 45, 46}, - { 8, 7, 0, 32, 33, 34, 35, 49, 50, 51, 52, 53, NO_LED, 47}, - { 9, NO_LED, 10, 1, 2, 3, 4, 5, 56, 55, 57, 58, 59, 54}, - { 14, 13, 12, 11, NO_LED, NO_LED, 6, 15, NO_LED, NO_LED, 60, 61, 62, 63}, - }, - { - { 48, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{112, 64},{ 32, 32}, - { 16, 32},{ 16, 48}, { 32, 48},{ 64, 64},{ 40, 64},{ 20, 64},{ 0, 64}, - - { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, - { 0, 16},{ 16, 16}, - { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 64, 32},{ 80, 32},{ 96, 32},{112, 32}, - - {112, 0},{128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{224, 0}, - {128, 16},{144, 16},{160, 16},{176, 16},{192, 16},{216, 16},{216, 32},{112, 16}, - - {128, 32},{144, 32},{160, 32},{176, 32},{192, 32}, {224, 48},{144, 48}, - {128, 48},{160, 48},{176, 48},{192, 48},{160, 64},{180, 64},{200, 64},{224, 64} - }, - { - 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 4, 1, 1, 1, 1, - - 1, 4, 4, 4, 4, 4, 4, 4, - 1, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - - 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 1, 1, 4, - - 4, 4, 4, 4, 4, 1, 4, - 4, 4, 4, 1, 1, 1, 1, 1, - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/inett_studio/sqx/hotswap/keyboard.json b/keyboards/inett_studio/sqx/hotswap/keyboard.json index 0c28be4582..a7dd508f3f 100644 --- a/keyboards/inett_studio/sqx/hotswap/keyboard.json +++ b/keyboards/inett_studio/sqx/hotswap/keyboard.json @@ -40,6 +40,72 @@ "pixel_fractal": true }, "driver": "is31fl3731", + "layout": [ + {"matrix": [2, 2], "x": 48, "y": 32, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [4, 6], "x": 112, "y": 64, "flags": 4}, + {"matrix": [2, 1], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 16, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 16, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 64, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 40, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [4, 7], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 96, "y": 16, "flags": 4}, + {"matrix": [0, 5], "x": 0, "y": 16, "flags": 1}, + {"matrix": [0, 6], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 64, "y": 32, "flags": 4}, + {"matrix": [1, 4], "x": 80, "y": 32, "flags": 4}, + {"matrix": [1, 5], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 112, "y": 0, "flags": 4}, + {"matrix": [2, 5], "x": 128, "y": 0, "flags": 4}, + {"matrix": [2, 6], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 208, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 216, "y": 16, "flags": 1}, + {"matrix": [2, 13], "x": 216, "y": 32, "flags": 1}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [2, 7], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 192, "y": 32, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 192, "y": 48, "flags": 1}, + {"matrix": [4, 10], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 180, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 200, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1} + ], "max_brightness": 170 }, "rgblight": { diff --git a/keyboards/inett_studio/sqx/universal/keyboard.json b/keyboards/inett_studio/sqx/universal/keyboard.json index 2c2b03bd0d..7e207f0eb1 100644 --- a/keyboards/inett_studio/sqx/universal/keyboard.json +++ b/keyboards/inett_studio/sqx/universal/keyboard.json @@ -40,6 +40,80 @@ "pixel_fractal": true }, "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 32, "y": 32, "flags": 4}, + {"matrix": [0, 1], "x": 48, "y": 48, "flags": 4}, + {"matrix": [0, 2], "x": 64, "y": 48, "flags": 4}, + {"matrix": [0, 3], "x": 80, "y": 48, "flags": 4}, + {"matrix": [0, 4], "x": 96, "y": 48, "flags": 4}, + {"matrix": [0, 5], "x": 112, "y": 48, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [1, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [1, 2], "x": 0, "y": 48, "flags": 4}, + {"matrix": [1, 3], "x": 0, "y": 48, "flags": 4}, + {"matrix": [1, 4], "x": 16, "y": 48, "flags": 1}, + {"matrix": [1, 5], "x": 32, "y": 48, "flags": 1}, + {"matrix": [2, 3], "x": 64, "y": 64, "flags": 1}, + {"matrix": [2, 4], "x": 32, "y": 64, "flags": 4}, + {"matrix": [2, 5], "x": 16, "y": 64, "flags": 4}, + {"matrix": [2, 6], "x": 0, "y": 64, "flags": 4}, + {"matrix": [2, 2], "x": 0, "y": 0, "flags": 1}, + {"matrix": [3, 3], "x": 16, "y": 0, "flags": 4}, + {"matrix": [3, 4], "x": 32, "y": 0, "flags": 4}, + {"matrix": [3, 5], "x": 48, "y": 0, "flags": 4}, + {"matrix": [3, 6], "x": 64, "y": 0, "flags": 4}, + {"matrix": [3, 7], "x": 80, "y": 0, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 0, "flags": 4}, + {"x": 96, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [2, 1], "x": 16, "y": 16, "flags": 4}, + {"x": 32, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 48, "y": 16, "flags": 4}, + {"matrix": [3, 1], "x": 64, "y": 16, "flags": 4}, + {"matrix": [3, 2], "x": 80, "y": 16, "flags": 4}, + {"x": 48, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 64, "y": 32, "flags": 4}, + {"matrix": [4, 1], "x": 80, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 96, "y": 32, "flags": 4}, + {"matrix": [0, 7], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 208, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + {"x": 224, "y": 0, "flags": 1}, + {"matrix": [4, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [1, 7], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 224, "y": 16, "flags": 1}, + {"x": 224, "y": 32, "flags": 1}, + {"matrix": [2, 13], "x": 216, "y": 32, "flags": 1}, + {"matrix": [2, 7], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 208, "y": 32, "flags": 4}, + {"x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 192, "y": 48, "flags": 4}, + {"x": 142, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 176, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 208, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1} + ], "max_brightness": 170 }, "rgblight": { diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c index 105e89ecc5..0f92fa3807 100644 --- a/keyboards/inett_studio/sqx/universal/universal.c +++ b/keyboards/inett_studio/sqx/universal/universal.c @@ -114,48 +114,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C9_16, C7_15, C6_15}, }; -led_config_t g_led_config = { - { - { 0, 1, 2, 3, 4, 5, 6, 36, 37, 38, 39, 40, 41, 42}, - { 8, 9, 10, 11, 12, 13, 7, 45, 46, 47, 48, 49, 50, 51}, - { 26,27, 18, 14, 15, 16, 17, 54, 55, 56, 57, 58, 59, 53}, - { 29,30, 31, 19, 20, 21, 22, 23, 62, 63, 64, 65, 66, 61}, - { 35,34, 33, NO_LED, NO_LED, NO_LED, 24, 44, NO_LED, NO_LED, 68, 69, 70, 71}, - }, - { - { 32, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{ 96, 64},{ 96, 64}, - { 0, 32},{ 16, 32}, - { 0, 48},{ 0, 48},{ 16, 48},{ 32, 48},{ 64, 64},{ 32, 64},{ 16, 64},{ 0, 64}, - { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, - { 0, 16},{ 16, 16}, - { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 48, 32},{ 64, 32},{ 80, 32},{ 96, 32}, - - {128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{216, 0},{224, 0}, - {112, 0},{128, 16}, - {144, 16},{160, 16},{176, 16},{192, 16},{208, 16},{224, 16},{224, 32},{216, 32}, - {128, 32},{144, 32},{160, 32},{176, 32},{192, 32},{208, 32},{208, 48},{224, 48}, - {128, 48},{144, 48}, - {160, 48},{176, 48},{192, 48},{142, 64},{160, 64},{176, 64},{208, 64},{224, 64} - }, - { - 4, 4, 4, 4, 4, 4, 4, 4, - 1, 4, - 4, 4, 1, 1, 1, 4, 4, 4, - - 1, 4, 4, 4, 4, 4, 4, 4, - 1, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - - 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, - 4, 4, 4, 4, 4, 1, 1, 1, - - 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, - 4, 4, 4, 4, 1, 1, 1, 1, - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/input_club/k_type/k_type.c b/keyboards/input_club/k_type/k_type.c index c719208af1..2fd1bd0612 100644 --- a/keyboards/input_club/k_type/k_type.c +++ b/keyboards/input_club/k_type/k_type.c @@ -150,57 +150,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 1, SW11_CS7, SW10_CS7, SW12_CS7 } }; -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, NO_LED }, - { 29, NO_LED, 30, 31, 32, 33, 34, 35, 36, 37 }, - { 38, 39, 40, 41, 42, 43, 44, 45, 46, NO_LED }, - { 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 }, - { 57, 58, 59, 60, 61, NO_LED, 62, NO_LED, 63, NO_LED }, - { 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 }, - { NO_LED, 74, NO_LED, 75, 76, 77, 78, 79, 80, 81 }, - { 82, 83, 84, 85, 86, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } - }, { - // LED Index to Physical Position - // Key LED - { 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 }, { 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, 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 - 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, - - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - - // Underglow LED - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, - - 2, 2, - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - } -}; - void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up diff --git a/keyboards/input_club/k_type/keyboard.json b/keyboards/input_club/k_type/keyboard.json index ed004335c0..99ff1fe5b6 100644 --- a/keyboards/input_club/k_type/keyboard.json +++ b/keyboards/input_club/k_type/keyboard.json @@ -53,7 +53,128 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "custom" + "driver": "custom", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 26, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 39, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 65, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 79, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 92, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 118, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 131, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 144, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 158, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 171, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 197, "y": 0, "flags": 1}, + {"matrix": [1, 4], "x": 210, "y": 0, "flags": 1}, + {"matrix": [1, 5], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 6], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 7], "x": 13, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 26, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 39, "y": 21, "flags": 4}, + {"matrix": [2, 0], "x": 52, "y": 21, "flags": 4}, + {"matrix": [2, 1], "x": 65, "y": 21, "flags": 4}, + {"matrix": [2, 2], "x": 79, "y": 21, "flags": 4}, + {"matrix": [2, 3], "x": 92, "y": 21, "flags": 4}, + {"matrix": [2, 4], "x": 105, "y": 21, "flags": 4}, + {"matrix": [2, 5], "x": 118, "y": 21, "flags": 4}, + {"matrix": [2, 6], "x": 131, "y": 21, "flags": 4}, + {"matrix": [2, 7], "x": 144, "y": 21, "flags": 4}, + {"matrix": [2, 8], "x": 158, "y": 21, "flags": 4}, + {"matrix": [3, 0], "x": 171, "y": 21, "flags": 1}, + {"matrix": [3, 2], "x": 197, "y": 21, "flags": 4}, + {"matrix": [3, 3], "x": 210, "y": 21, "flags": 4}, + {"matrix": [3, 4], "x": 224, "y": 21, "flags": 4}, + {"matrix": [3, 5], "x": 0, "y": 32, "flags": 1}, + {"matrix": [3, 6], "x": 13, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 26, "y": 32, "flags": 4}, + {"matrix": [3, 8], "x": 39, "y": 32, "flags": 4}, + {"matrix": [3, 9], "x": 52, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 65, "y": 32, "flags": 4}, + {"matrix": [4, 1], "x": 79, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 92, "y": 32, "flags": 4}, + {"matrix": [4, 3], "x": 105, "y": 32, "flags": 4}, + {"matrix": [4, 4], "x": 118, "y": 32, "flags": 4}, + {"matrix": [4, 5], "x": 131, "y": 32, "flags": 4}, + {"matrix": [4, 6], "x": 144, "y": 32, "flags": 4}, + {"matrix": [4, 7], "x": 158, "y": 32, "flags": 4}, + {"matrix": [4, 8], "x": 171, "y": 32, "flags": 4}, + {"matrix": [5, 0], "x": 197, "y": 32, "flags": 4}, + {"matrix": [5, 1], "x": 210, "y": 32, "flags": 4}, + {"matrix": [5, 2], "x": 224, "y": 32, "flags": 4}, + {"matrix": [5, 3], "x": 0, "y": 42, "flags": 1}, + {"matrix": [5, 4], "x": 13, "y": 42, "flags": 4}, + {"matrix": [5, 5], "x": 26, "y": 42, "flags": 4}, + {"matrix": [5, 6], "x": 39, "y": 42, "flags": 4}, + {"matrix": [5, 7], "x": 52, "y": 42, "flags": 4}, + {"matrix": [5, 8], "x": 65, "y": 42, "flags": 4}, + {"matrix": [5, 9], "x": 79, "y": 42, "flags": 4}, + {"matrix": [6, 0], "x": 92, "y": 42, "flags": 4}, + {"matrix": [6, 1], "x": 105, "y": 42, "flags": 4}, + {"matrix": [6, 2], "x": 118, "y": 42, "flags": 4}, + {"matrix": [6, 3], "x": 131, "y": 42, "flags": 4}, + {"matrix": [6, 4], "x": 144, "y": 42, "flags": 4}, + {"matrix": [6, 6], "x": 171, "y": 42, "flags": 1}, + {"matrix": [6, 8], "x": 0, "y": 53, "flags": 1}, + {"matrix": [7, 0], "x": 26, "y": 53, "flags": 4}, + {"matrix": [7, 1], "x": 39, "y": 53, "flags": 4}, + {"matrix": [7, 2], "x": 52, "y": 53, "flags": 4}, + {"matrix": [7, 3], "x": 65, "y": 53, "flags": 4}, + {"matrix": [7, 4], "x": 79, "y": 53, "flags": 4}, + {"matrix": [7, 5], "x": 92, "y": 53, "flags": 4}, + {"matrix": [7, 6], "x": 105, "y": 53, "flags": 4}, + {"matrix": [7, 7], "x": 118, "y": 53, "flags": 4}, + {"matrix": [7, 8], "x": 131, "y": 53, "flags": 4}, + {"matrix": [7, 9], "x": 144, "y": 53, "flags": 4}, + {"matrix": [8, 1], "x": 171, "y": 53, "flags": 1}, + {"matrix": [8, 3], "x": 210, "y": 53, "flags": 1}, + {"matrix": [8, 4], "x": 0, "y": 64, "flags": 1}, + {"matrix": [8, 5], "x": 13, "y": 64, "flags": 1}, + {"matrix": [8, 6], "x": 26, "y": 64, "flags": 1}, + {"matrix": [8, 7], "x": 79, "y": 64, "flags": 4}, + {"matrix": [8, 8], "x": 131, "y": 64, "flags": 1}, + {"matrix": [8, 9], "x": 144, "y": 64, "flags": 1}, + {"matrix": [9, 0], "x": 158, "y": 64, "flags": 1}, + {"matrix": [9, 1], "x": 171, "y": 64, "flags": 1}, + {"matrix": [9, 2], "x": 197, "y": 64, "flags": 1}, + {"matrix": [9, 3], "x": 210, "y": 64, "flags": 1}, + {"matrix": [9, 4], "x": 224, "y": 64, "flags": 1}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 206, "y": 64, "flags": 2}, + {"x": 189, "y": 64, "flags": 2}, + {"x": 172, "y": 64, "flags": 2}, + {"x": 155, "y": 64, "flags": 2}, + {"x": 137, "y": 64, "flags": 2}, + {"x": 120, "y": 64, "flags": 2}, + {"x": 103, "y": 64, "flags": 2}, + {"x": 86, "y": 64, "flags": 2}, + {"x": 68, "y": 64, "flags": 2}, + {"x": 51, "y": 64, "flags": 2}, + {"x": 34, "y": 64, "flags": 2}, + {"x": 17, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 0, "y": 42, "flags": 2}, + {"x": 0, "y": 21, "flags": 2}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 17, "y": 0, "flags": 2}, + {"x": 34, "y": 0, "flags": 2}, + {"x": 51, "y": 0, "flags": 2}, + {"x": 68, "y": 0, "flags": 2}, + {"x": 86, "y": 0, "flags": 2}, + {"x": 103, "y": 0, "flags": 2}, + {"x": 120, "y": 0, "flags": 2}, + {"x": 137, "y": 0, "flags": 2}, + {"x": 155, "y": 0, "flags": 2}, + {"x": 172, "y": 0, "flags": 2}, + {"x": 189, "y": 0, "flags": 2}, + {"x": 206, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 224, "y": 21, "flags": 2}, + {"x": 224, "y": 42, "flags": 2} + ] }, "features": { "bootmagic": false, From db9b295aa720721ea3e3f94617a90dfc7dcbad58 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 9 Sep 2025 04:50:36 -0600 Subject: [PATCH 27/95] Migrate `g_led_config` to DD (L) (#25617) --- keyboards/labbe/labbeminiv1/keyboard.json | 9 ++ keyboards/labbe/labbeminiv1/labbeminiv1.c | 36 -------- .../latincompass/latin17rgb/keyboard.json | 19 ++++ .../latincompass/latin17rgb/latin17rgb.c | 54 ++++------- .../latincompass/latin6rgb/keyboard.json | 8 ++ keyboards/latincompass/latin6rgb/latin6rgb.c | 43 +++------ keyboards/latincompass/latinpad/keyboard.json | 22 ++++- keyboards/latincompass/latinpad/latinpad.c | 38 -------- keyboards/linworks/fave65h/fave65h.c | 44 --------- keyboards/linworks/fave65h/keyboard.json | 69 ++++++++++++++ keyboards/linworks/fave87h/fave87h.c | 48 ---------- keyboards/linworks/fave87h/keyboard.json | 89 +++++++++++++++++++ 12 files changed, 244 insertions(+), 235 deletions(-) delete mode 100644 keyboards/labbe/labbeminiv1/labbeminiv1.c delete mode 100644 keyboards/latincompass/latinpad/latinpad.c delete mode 100644 keyboards/linworks/fave65h/fave65h.c delete mode 100644 keyboards/linworks/fave87h/fave87h.c diff --git a/keyboards/labbe/labbeminiv1/keyboard.json b/keyboards/labbe/labbeminiv1/keyboard.json index e1b94dfa4e..905a180d22 100644 --- a/keyboards/labbe/labbeminiv1/keyboard.json +++ b/keyboards/labbe/labbeminiv1/keyboard.json @@ -26,6 +26,15 @@ "diode_direction": "COL2ROW", "processor": "atmega32u4", "bootloader": "atmel-dfu", + "rgb_matrix": { + "driver": "ws2812", + "layout": [ + {"matrix": [0, 1], "x": 112, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [1, 1], "x": 112, "y": 64, "flags": 4}, + {"matrix": [1, 2], "x": 224, "y": 64, "flags": 4} + ] + }, "layouts": { "LAYOUT_wasd": { "layout": [ diff --git a/keyboards/labbe/labbeminiv1/labbeminiv1.c b/keyboards/labbe/labbeminiv1/labbeminiv1.c deleted file mode 100644 index a2ce367c5b..0000000000 --- a/keyboards/labbe/labbeminiv1/labbeminiv1.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - // Key Matrix to LED Index - {NO_LED, 0, NO_LED}, - {1, 2, 3} - }, - { - // LED Index to Physical Position - {112, 0}, - {0, 64}, {112, 64}, {224, 64}, - }, - { - // LED Index to Flag - 4, - 4, 4, 4 - } -}; -#endif \ No newline at end of file diff --git a/keyboards/latincompass/latin17rgb/keyboard.json b/keyboards/latincompass/latin17rgb/keyboard.json index 6dab2faf68..d6689f203a 100644 --- a/keyboards/latincompass/latin17rgb/keyboard.json +++ b/keyboards/latincompass/latin17rgb/keyboard.json @@ -61,6 +61,25 @@ "solid_reactive": true }, "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 48, "y": 32, "flags": 4}, + {"matrix": [0, 1], "x": 48, "y": 48, "flags": 4}, + {"matrix": [0, 2], "x": 64, "y": 48, "flags": 4}, + {"matrix": [0, 3], "x": 80, "y": 48, "flags": 1}, + {"matrix": [1, 0], "x": 16, "y": 32, "flags": 1}, + {"matrix": [1, 1], "x": 16, "y": 48, "flags": 1}, + {"matrix": [1, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [1, 3], "x": 64, "y": 64, "flags": 1}, + {"matrix": [2, 0], "x": 80, "y": 16, "flags": 1}, + {"matrix": [2, 1], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 80, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 112, "y": 0, "flags": 1}, + {"matrix": [3, 1], "x": 128, "y": 0, "flags": 4}, + {"matrix": [3, 2], "x": 144, "y": 0, "flags": 4}, + {"matrix": [3, 3], "x": 160, "y": 0, "flags": 4}, + {"matrix": [4, 0], "x": 128, "y": 16, "flags": 4}, + {"matrix": [4, 1], "x": 144, "y": 16, "flags": 4} + ], "sleep": true }, "features": { diff --git a/keyboards/latincompass/latin17rgb/latin17rgb.c b/keyboards/latincompass/latin17rgb/latin17rgb.c index 54705bf4f7..c9120920eb 100644 --- a/keyboards/latincompass/latin17rgb/latin17rgb.c +++ b/keyboards/latincompass/latin17rgb/latin17rgb.c @@ -1,18 +1,18 @@ /* Copyright 2021 18438880 - * - * 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 . - */ + * + * 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 RGB_MATRIX_ENABLE @@ -31,7 +31,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C1_12, C2_12, C3_12},// BL5 {0, C1_13, C2_13, C3_13},// BL6 {0, C1_6, C2_6, C3_6},// BL7 - {0, C1_7, C2_7, C3_7},//BL8 + {0, C1_7, C2_7, C3_7},//BL8 {0, C1_8, C2_8, C3_8},// BL9 {0, C1_14, C2_14, C3_14},// BL10 {0, C1_15, C2_15, C3_15},// BL11 @@ -41,30 +41,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C9_3, C8_3, C7_3},//BL15 {0, C9_5, C8_5, C7_5},// BL16 {0, C9_6, C8_6, C7_6},// BL17 - -}; -led_config_t g_led_config = { - { - { 0, 1, 2, 3}, - { 4, 5, 6, 7}, - { 8, 9, 10, NO_LED}, - { 11, 12, 13, 14}, - { 15, 16, NO_LED, NO_LED}, - }, - { - { 48, 32},{ 48, 48},{ 64, 48},{ 80, 48}, - { 16, 32},{ 16, 48}, { 32, 48},{ 64, 64}, - { 80, 16},{ 64, 32},{ 80, 32}, - {112, 0},{128, 0},{144, 0},{160, 0}, - {128, 16},{144, 16} - }, - { - 4, 4, 4, 1, - 1, 1, 4, 1, - 1, 4, 4, - 1, 4, 4, 4, - 4, 4 - } }; #endif diff --git a/keyboards/latincompass/latin6rgb/keyboard.json b/keyboards/latincompass/latin6rgb/keyboard.json index d2708df399..6674b58205 100644 --- a/keyboards/latincompass/latin6rgb/keyboard.json +++ b/keyboards/latincompass/latin6rgb/keyboard.json @@ -39,6 +39,14 @@ "solid_reactive": true }, "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [0, 1], "x": 0, "y": 64, "flags": 4}, + {"matrix": [0, 2], "x": 112, "y": 64, "flags": 4}, + {"matrix": [1, 0], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 1], "x": 112, "y": 32, "flags": 1}, + {"matrix": [1, 2], "x": 224, "y": 32, "flags": 4} + ], "sleep": true }, "matrix_pins": { diff --git a/keyboards/latincompass/latin6rgb/latin6rgb.c b/keyboards/latincompass/latin6rgb/latin6rgb.c index 779373ae8f..1176063c37 100644 --- a/keyboards/latincompass/latin6rgb/latin6rgb.c +++ b/keyboards/latincompass/latin6rgb/latin6rgb.c @@ -1,18 +1,18 @@ /* Copyright 2021 18438880 - * - * 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 . - */ + * + * 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 RGB_MATRIX_ENABLE @@ -31,19 +31,4 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C1_12, C2_12, C3_12},// BL5 {0, C1_13, C2_13, C3_13},// BL6 }; - -led_config_t g_led_config = { - { - { 0, 1, 2}, - { 3, 4, 5}, - }, - { - { 48, 32},{ 48, 48},{ 64, 48}, - { 80, 16},{ 64, 32},{ 80, 32} - }, - { - 4, 4, 4, - 1, 1, 4 - } -}; #endif diff --git a/keyboards/latincompass/latinpad/keyboard.json b/keyboards/latincompass/latinpad/keyboard.json index 3b4563b1ca..930cdadad8 100644 --- a/keyboards/latincompass/latinpad/keyboard.json +++ b/keyboards/latincompass/latinpad/keyboard.json @@ -40,7 +40,27 @@ "pixel_flow": true, "pixel_fractal": true }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [0, 1], "x": 74, "y": 16, "flags": 1}, + {"matrix": [0, 2], "x": 148, "y": 16, "flags": 1}, + {"matrix": [0, 3], "x": 224, "y": 16, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [1, 1], "x": 74, "y": 32, "flags": 1}, + {"matrix": [1, 2], "x": 148, "y": 32, "flags": 1}, + {"matrix": [1, 3], "x": 224, "y": 32, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 48, "flags": 1}, + {"matrix": [2, 1], "x": 74, "y": 48, "flags": 1}, + {"matrix": [2, 2], "x": 148, "y": 48, "flags": 1}, + {"matrix": [2, 3], "x": 224, "y": 48, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 74, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 148, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 224, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [4, 1], "x": 74, "y": 0, "flags": 1} + ] }, "features": { "bootmagic": true, diff --git a/keyboards/latincompass/latinpad/latinpad.c b/keyboards/latincompass/latinpad/latinpad.c deleted file mode 100644 index b476b4c238..0000000000 --- a/keyboards/latincompass/latinpad/latinpad.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2020 latincompass - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 0, 1, 2, 3 }, - { 4, 5, 6, 7 }, - { 8, 9, 10, 11 }, - { 12, 13, 14, 15 }, - { 16, 17, NO_LED, NO_LED } -},{ - { 74, 21 }, { 37, 21 }, { 24, 21 }, { 18, 21 }, - { 74, 10 }, { 37, 10 }, { 28, 10 }, { 18, 10 }, - { 74, 7 }, { 37, 7 }, { 20, 7 }, { 18, 7 }, - { 74, 5 }, { 37, 5 }, { 22, 5 }, { 18, 5 }, - { 74, 5 }, { 37, 5 }, -},{ - 1, 1, 1, 1, - 1, 1, 1, 1, - 1, 1, 1, 1, - 1, 1, 1, 1, - 1, 1 -} }; -#endif diff --git a/keyboards/linworks/fave65h/fave65h.c b/keyboards/linworks/fave65h/fave65h.c deleted file mode 100644 index 01cf705e2a..0000000000 --- a/keyboards/linworks/fave65h/fave65h.c +++ /dev/null @@ -1,44 +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" - - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52 }, - { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, - { 0, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, NO_LED, 17, 16 }, - { 51, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, NO_LED, 39, 40, 41 }, - { 50, 49, 48, NO_LED, NO_LED, NO_LED, 47, NO_LED, 46, NO_LED, 45, NO_LED, 44, 43, 42 } - }, { - // LED Index to Physical Position - {3, 32}, {8, 16}, {28, 16}, {44, 16}, {60, 16}, {76, 16}, {92, 16}, {108, 16}, {124, 16}, {140, 16}, - {156, 16}, {172, 16}, {188, 16}, {204, 16}, {224, 16}, {244, 16}, {244, 32}, {218, 32}, {192, 32}, {176, 32}, - {160, 32}, {144, 32}, {128, 32}, {112, 32}, {96, 32}, {80, 32}, {64, 32}, {48, 32}, {32, 32}, {40, 48}, - {56, 48}, {72, 48}, {88, 48}, {104, 48}, {120, 48}, {136, 48}, {152, 48}, {168, 48}, {184, 48}, {206, 48}, - {228, 48}, {244, 48}, {244, 64}, {228, 64}, {212, 64}, {186, 64}, {166, 64}, {96, 64}, {46, 64}, {22, 64}, - {0, 64}, {14, 48}, {244, 0}, {220, 3}, {196, 0}, {180, 0}, {164, 0}, {148, 0}, {132, 0}, {116, 0}, - {100, 0}, {84, 0}, {68, 0}, {52, 0}, {36, 0}, {20, 0}, {4, 0} - }, { - // LED Index to Flag - 1, 4, 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, 4, 4, 1, - 9, 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, 1, 1, 4, 1, 1, 1, 1, 1 - } -}; -#endif diff --git a/keyboards/linworks/fave65h/keyboard.json b/keyboards/linworks/fave65h/keyboard.json index 212bd0a37b..e92bb4abca 100644 --- a/keyboards/linworks/fave65h/keyboard.json +++ b/keyboards/linworks/fave65h/keyboard.json @@ -53,6 +53,75 @@ "animation": "cycle_all" }, "driver": "ws2812", + "layout": [ + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 1}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 26, "y": 32, "flags": 4}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 9}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 171, "y": 64, "flags": 4}, + {"matrix": [4, 8], "x": 152, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 39, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 135, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 120, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1} + ], "max_brightness": 120, "sleep": true }, diff --git a/keyboards/linworks/fave87h/fave87h.c b/keyboards/linworks/fave87h/fave87h.c deleted file mode 100644 index c529e439b9..0000000000 --- a/keyboards/linworks/fave87h/fave87h.c +++ /dev/null @@ -1,48 +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" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 47, NO_LED, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62 }, - { 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30 }, - { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, - { 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, NO_LED, 0, NO_LED, NO_LED, NO_LED }, - { 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, NO_LED, 85, NO_LED, NO_LED, 86, NO_LED }, - { 73, 72, 71, NO_LED, NO_LED, 70, NO_LED, NO_LED, NO_LED, 69, 68, NO_LED, 67, 66, 65, 64, 63 } - }, { - // LED Index to Physical Position - { 190, 40 }, { 167, 40 }, { 153, 40 }, { 139, 40 }, { 125, 40 }, { 111, 40 }, { 97, 40 }, { 83, 40 }, { 69, 40 }, { 55, 40 }, - { 40, 40 }, { 26, 40 }, { 0, 41 }, { 5, 27 }, { 23, 27 }, { 37, 27 }, { 51, 27 }, { 65, 27 }, { 79, 27 }, { 93, 27 }, - { 107, 27 }, { 121, 27 }, { 135, 27 }, { 149, 27 }, { 163, 27 }, { 177, 27 }, { 195, 27 }, { 216, 27 }, { 230, 27 }, { 244, 27 }, - { 244, 15 }, { 230, 15 }, { 216, 15 }, { 191, 17 }, { 170, 15 }, { 156, 15 }, { 142, 15 }, { 128, 15 }, { 114, 15 }, { 100, 15 }, - { 86, 15 }, { 72, 15 }, { 58, 15 }, { 44, 15 }, { 30, 15 }, { 16, 15 }, { 2, 15 }, { 2, 0 }, { 30, 0 }, { 44, 0 }, - { 58, 0 }, { 72, 0 }, { 93, 0 }, { 107, 0 }, { 121, 0 }, { 135, 0 }, { 156, 0 }, { 170, 0 }, { 184, 0 }, { 198, 0 }, - { 216, 0 }, { 230, 0 }, { 244, 0 }, { 244, 64 }, { 230, 64 }, { 216, 64 }, { 197, 64 }, { 179, 64 }, { 162, 64 }, { 144, 64 }, - { 91, 64 }, { 39, 64 }, { 21, 64 }, { 4, 64 }, { 11, 52 }, { 33, 52 }, { 47, 52 }, { 62, 52 }, { 76, 52 }, { 90, 52 }, - { 104, 52 }, { 118, 52 }, { 132, 52 }, { 146, 52 }, { 160, 52 }, { 186, 52 }, { 230, 52 } - }, { - // LED Index to Flag - 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 - } -}; -#endif diff --git a/keyboards/linworks/fave87h/keyboard.json b/keyboards/linworks/fave87h/keyboard.json index 4bb6e42de4..b3d125c770 100644 --- a/keyboards/linworks/fave87h/keyboard.json +++ b/keyboards/linworks/fave87h/keyboard.json @@ -56,6 +56,95 @@ "animation": "cycle_all" }, "driver": "ws2812", + "layout": [ + {"matrix": [3, 13], "x": 174, "y": 40, "flags": 1}, + {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 40, "flags": 1}, + {"matrix": [3, 6], "x": 88, "y": 40, "flags": 1}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 1}, + {"matrix": [3, 4], "x": 62, "y": 40, "flags": 1}, + {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4}, + {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 40, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 28, "flags": 1}, + {"matrix": [2, 2], "x": 33, "y": 28, "flags": 1}, + {"matrix": [2, 3], "x": 46, "y": 28, "flags": 1}, + {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4}, + {"matrix": [2, 13], "x": 179, "y": 28, "flags": 4}, + {"matrix": [2, 14], "x": 198, "y": 28, "flags": 4}, + {"matrix": [2, 15], "x": 211, "y": 28, "flags": 4}, + {"matrix": [2, 16], "x": 224, "y": 28, "flags": 1}, + {"matrix": [1, 16], "x": 224, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1}, + {"matrix": [1, 13], "x": 176, "y": 15, "flags": 1}, + {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4}, + {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 26, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 39, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 52, "y": 0, "flags": 9}, + {"matrix": [0, 5], "x": 65, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 85, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 98, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 111, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 124, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 143, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 156, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 169, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 182, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 198, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 211, "y": 0, "flags": 4}, + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 1}, + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 211, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 198, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 180, "y": 64, "flags": 4}, + {"matrix": [5, 12], "x": 164, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 148, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 131, "y": 64, "flags": 4}, + {"matrix": [5, 5], "x": 83, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 34, "y": 64, "flags": 4}, + {"matrix": [5, 1], "x": 18, "y": 64, "flags": 4}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1}, + {"matrix": [4, 1], "x": 29, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 42, "y": 52, "flags": 1}, + {"matrix": [4, 3], "x": 55, "y": 52, "flags": 1}, + {"matrix": [4, 4], "x": 68, "y": 52, "flags": 1}, + {"matrix": [4, 5], "x": 81, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 94, "y": 52, "flags": 1}, + {"matrix": [4, 7], "x": 107, "y": 52, "flags": 1}, + {"matrix": [4, 8], "x": 120, "y": 52, "flags": 1}, + {"matrix": [4, 9], "x": 133, "y": 52, "flags": 1}, + {"matrix": [4, 10], "x": 146, "y": 52, "flags": 1}, + {"matrix": [4, 12], "x": 171, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1} + ], "max_brightness": 120, "sleep": true }, From eda39f435698e41a043a4a21f48a75253f2fb879 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 10 Sep 2025 02:34:33 +1000 Subject: [PATCH 28/95] Update default OLED font (#25565) --- drivers/oled/glcdfont.c | 264 +++++++++++++++++++++++++++++-- platforms/avr/drivers/glcdfont.c | 23 --- 2 files changed, 252 insertions(+), 35 deletions(-) delete mode 100644 platforms/avr/drivers/glcdfont.c diff --git a/drivers/oled/glcdfont.c b/drivers/oled/glcdfont.c index 0e201d71ee..4099389691 100644 --- a/drivers/oled/glcdfont.c +++ b/drivers/oled/glcdfont.c @@ -1,16 +1,256 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later WITH BSD-2-Clause + #include "progmem.h" -// Helidox 8x6 font with QMK Firmware Logo -// Online editor: http://teripom.x0.com/ - +/** + * QMK 6x8 Font for LCD and OLED displays + * + * Derived from the first half of the Adafruit GFX Library font: + * https://github.com/adafruit/Adafruit-GFX-Library + * + * The first 128 characters match that of code page 437, the character set used by the original IBM PC, which includes all printable ASCII characters. + * Each byte represents a column of 8 pixels, with the least significant bit being the top of the glyph. + * + * A large 21x3 character QMK Firmware logo is encoded from 0x80-0x94, 0xA0-0xB4, and 0xC0-0xD4. + * 2x2 character OS logos for Apple, Windows, Linux and Android are encoded from 0x95-0x9C and 0xB5-0xBC. + */ static const unsigned char font[] PROGMEM = { - 0x07, 0x08, 0x7F, 0x08, 0x07, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, - 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, - 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, - 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 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, 0xC0, 0xF0, 0xF8, 0xFC, 0x3E, - 0x1E, 0x06, 0x01, 0x00, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, 0xDE, 0xD7, 0xDC, 0x00, 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, 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00, 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E, 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E, 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F, - 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70, 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69, 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C, 0x78, 0x70, 0x60, 0x00, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, 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, 0x07, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x08, 0x7F, 0x08, 0x07, 0x00, // 0x00 NUL / Ψ + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, // 0x01 SOH / ☺︎ + 0xC1, 0x94, 0xB0, 0x94, 0xC1, 0x00, // 0x02 STX / ☻ + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, // 0x03 ETX / ♥︎ + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, // 0x04 EOT / ♦︎ + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, // 0x05 ENQ / ♣︎ + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, // 0x06 ACK / ♠︎ + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, // 0x07 BEL / • + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, // 0x08 BS / ◘ + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, // 0x09 HT / ○ + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, // 0x0A LF / ◙ + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, // 0x0B VT / ♂︎ + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, // 0x0C FF / ♀︎ + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, // 0x0D CR / ♪ + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, // 0x0E SO / ♫ + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, // 0x0F SI / ☼ + + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, // 0x10 DLE / ► + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, // 0x11 DC1 / ◄ + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, // 0x12 DC2 / ↕︎ + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, // 0x13 DC3 / ‼︎ + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, // 0x14 DC4 / ¶ + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, // 0x15 NAK / § + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, // 0x16 SYN / ▬ + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, // 0x17 ETB / ↨ + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, // 0x18 CAN / ↑ + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, // 0x19 EM / ↓ + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, // 0x1A SUB / → + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, // 0x1B ESC / ← + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, // 0x1C FS / ∟ + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, // 0x1D GS / ↔︎ + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, // 0x1E RS / ▲ + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, // 0x1F US / ▼ + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 Space + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, // 0x21 ! + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 " + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, // 0x23 # + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, // 0x24 $ + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, // 0x25 % + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, // 0x26 & + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, // 0x27 ' + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, // 0x28 ( + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, // 0x29 ) + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, // 0x2A * + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, // 0x2B + + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, // 0x2C , + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, // 0x2D - + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, // 0x2E . + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, // 0x2F / + + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, // 0x30 0 + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, // 0x31 1 + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, // 0x32 2 + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, // 0x33 3 + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, // 0x34 4 + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, // 0x35 5 + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, // 0x36 6 + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, // 0x37 7 + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, // 0x38 8 + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, // 0x39 9 + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, // 0x3A : + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, // 0x3B ; + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, // 0x3C < + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, // 0x3D = + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, // 0x3E > + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, // 0x3F ? + + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, // 0x40 @ + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, // 0x41 A + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, // 0x42 B + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, // 0x43 C + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, // 0x44 D + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, // 0x45 E + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, // 0x46 F + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, // 0x47 G + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, // 0x48 H + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, // 0x49 I + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, // 0x4A J + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, // 0x4B K + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, // 0x4C L + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, // 0x4D M + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, // 0x4E N + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, // 0x4F O + + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, // 0x50 P + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, // 0x51 Q + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, // 0x52 R + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, // 0x53 S + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, // 0x54 T + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, // 0x55 U + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, // 0x56 V + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, // 0x57 W + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, // 0x58 X + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, // 0x59 Y + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, // 0x5A Z + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, // 0x5B [ + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, // 0x5C Backslash + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0x5D ] + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, // 0x5E ^ + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, // 0x5F _ + + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, // 0x60 ` + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, // 0x61 a + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, // 0x62 b + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, // 0x63 c + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, // 0x64 d + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, // 0x65 e + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, // 0x66 f + 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, // 0x67 g + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, // 0x68 h + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, // 0x69 i + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, // 0x6A j + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, // 0x6B k + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, // 0x6C l + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, // 0x6D m + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, // 0x6E n + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, // 0x6F o + + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, // 0x70 p + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, // 0x71 q + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, // 0x72 r + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, // 0x73 s + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, // 0x74 t + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, // 0x75 u + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, // 0x76 v + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, // 0x77 w + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, // 0x78 x + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, // 0x79 y + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, // 0x7A z + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, // 0x7B { + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, // 0x7C | + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, // 0x7D } + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, // 0x7E ~ + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, // 0x7F DEL / ⌂ + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 QMK Logo Top 1 + 0x00, 0x00, 0x80, 0x80, 0xE0, 0xF0, // 0x81 QMK Logo Top 2 + 0xF0, 0xFC, 0x70, 0xFC, 0xF0, 0x7C, // 0x82 QMK Logo Top 3 + 0xF0, 0xFC, 0x70, 0xFC, 0xF0, 0xF0, // 0x83 QMK Logo Top 4 + 0xE0, 0x80, 0x80, 0x00, 0x00, 0x00, // 0x84 QMK Logo Top 5 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x85 QMK Logo Top 6 + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, // 0x86 QMK Logo Top 7 + 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, // 0x87 QMK Logo Top 8 + 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, // 0x88 QMK Logo Top 9 + 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, // 0x89 QMK Logo Top 10 + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, // 0x8A QMK Logo Top 11 + 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, // 0x8B QMK Logo Top 12 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x8C QMK Logo Top 13 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x8D QMK Logo Top 14 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x8E QMK Logo Top 15 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x8F QMK Logo Top 16 + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x90 QMK Logo Top 17 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x91 QMK Logo Top 18 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x92 QMK Logo Top 19 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x93 QMK Logo Top 20 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x94 QMK Logo Top 21 + 0x00, 0xC0, 0xF0, 0xF8, 0xFC, 0x3E, // 0x95 Apple Logo TL + 0x1E, 0x06, 0x01, 0x00, 0x00, 0x00, // 0x96 Apple Logo TR + 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0x97 Windows Logo TL + 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0x98 Windows Logo TR + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, // 0x99 Linux Logo TL + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, // 0x9A Linux Logo TR + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, // 0x9B Android Logo TL + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, // 0x9C Android Logo TR + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x9D + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x9E + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x9F + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xA0 QMK Logo Middle 1 + 0x00, 0x00, 0xAA, 0xAA, 0xFF, 0xFF, // 0xA1 QMK Logo Middle 2 + 0xFF, 0xFF, 0xE0, 0xDF, 0xDF, 0x00, // 0xA2 QMK Logo Middle 3 + 0xDF, 0xDF, 0xE0, 0xFF, 0xFF, 0xFF, // 0xA3 QMK Logo Middle 4 + 0xFF, 0xAA, 0xAA, 0x00, 0x00, 0x00, // 0xA4 QMK Logo Middle 5 + 0x00, 0x00, 0x00, 0x00, 0x3E, 0x7F, // 0xA5 QMK Logo Middle 6 + 0xC1, 0xC1, 0xC1, 0x7F, 0x3E, 0x00, // 0xA6 QMK Logo Middle 7 + 0xFF, 0xFF, 0x0F, 0x3C, 0x78, 0x3C, // 0xA7 QMK Logo Middle 8 + 0x0F, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, // 0xA8 QMK Logo Middle 9 + 0x1C, 0x3E, 0x77, 0xE3, 0xC1, 0x00, // 0xA9 QMK Logo Middle 10 + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, // 0xAA QMK Logo Middle 11 + 0x19, 0x19, 0x19, 0x00, 0xFD, 0xFD, // 0xAB QMK Logo Middle 12 + 0x00, 0xFE, 0xFC, 0x06, 0x06, 0x00, // 0xAC QMK Logo Middle 13 + 0xFE, 0xFC, 0x06, 0x06, 0xFC, 0xFC, // 0xAD QMK Logo Middle 14 + 0x06, 0x06, 0xFE, 0xFC, 0x00, 0x1E, // 0xAE QMK Logo Middle 15 + 0x7C, 0xE0, 0x78, 0x0C, 0x78, 0xE0, // 0xAF QMK Logo Middle 16 + + 0x7C, 0x1E, 0x00, 0x64, 0xF6, 0x92, // 0xB0 QMK Logo Middle 17 + 0x92, 0x7E, 0xFC, 0x00, 0xFE, 0xFC, // 0xB1 QMK Logo Middle 18 + 0x06, 0x06, 0x00, 0x3C, 0x7E, 0xD2, // 0xB2 QMK Logo Middle 19 + 0xD2, 0xDE, 0x4C, 0x00, 0x00, 0x00, // 0xB3 QMK Logo Middle 20 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xB4 QMK Logo Middle 21 + 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C, // 0xB5 Apple Logo BL + 0x78, 0x70, 0x60, 0x00, 0x00, 0x00, // 0xB6 Apple Logo BR + 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0xB7 Windows Logo BL + 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, // 0xB8 Windows Logo BR + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, // 0xB9 Linux Logo BL + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, // 0xBA Linux Logo BR + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, // 0xBB Android Logo BL + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, // 0xBC Android Logo BR + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xBD + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xBE + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xBF + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC0 QMK Logo Bottom 1 + 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, // 0xC1 QMK Logo Bottom 2 + 0x07, 0x1F, 0x07, 0x1F, 0x07, 0x1F, // 0xC2 QMK Logo Bottom 3 + 0x07, 0x1F, 0x07, 0x1F, 0x07, 0x07, // 0xC3 QMK Logo Bottom 4 + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC4 QMK Logo Bottom 5 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC5 QMK Logo Bottom 6 + 0x00, 0x00, 0x01, 0x03, 0x02, 0x00, // 0xC6 QMK Logo Bottom 7 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC7 QMK Logo Bottom 8 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC8 QMK Logo Bottom 9 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xC9 QMK Logo Bottom 10 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCA QMK Logo Bottom 11 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCB QMK Logo Bottom 12 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCC QMK Logo Bottom 13 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCD QMK Logo Bottom 14 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCE QMK Logo Bottom 15 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xCF QMK Logo Bottom 16 + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD0 QMK Logo Bottom 17 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD1 QMK Logo Bottom 18 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD2 QMK Logo Bottom 19 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD3 QMK Logo Bottom 10 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD4 QMK Logo Bottom 21 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD5 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD6 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD7 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD8 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xD9 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDA + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDB + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDC + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDD + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xDE + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // 0xDF }; diff --git a/platforms/avr/drivers/glcdfont.c b/platforms/avr/drivers/glcdfont.c deleted file mode 100644 index 57a21965de..0000000000 --- a/platforms/avr/drivers/glcdfont.c +++ /dev/null @@ -1,23 +0,0 @@ -// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. -// See gfxfont.h for newer custom bitmap font info. - -#include "progmem.h" - -// Standard ASCII 5x7 font - -static const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x18, 0x3C, 0x18, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x18, 0x24, 0x18, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x26, 0x29, 0x79, 0x29, 0x26, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x60, 0x60, 0x60, 0x60, 0x60, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x20, 0x10, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, - 0x30, 0x38, 0x3E, 0x38, 0x30, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x80, 0x70, 0x30, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x72, 0x49, 0x49, 0x49, 0x46, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x41, 0x21, 0x11, 0x09, 0x07, 0x36, 0x49, 0x49, 0x49, 0x36, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x41, 0x22, 0x14, 0x08, 0x02, 0x01, 0x59, 0x09, 0x06, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x26, 0x49, 0x49, 0x49, 0x32, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14, 0x63, 0x03, 0x04, 0x78, 0x04, 0x03, - 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x03, 0x07, 0x08, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x28, 0x7F, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x48, 0x54, 0x54, 0x54, 0x24, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C, - 0x44, 0x28, 0x10, 0x28, 0x44, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x1E, 0xA1, 0xA1, 0x61, 0x12, 0x3A, 0x40, 0x40, 0x20, 0x7A, 0x38, 0x54, 0x54, 0x55, 0x59, 0x21, 0x55, 0x55, 0x79, 0x41, 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut - 0x21, 0x55, 0x54, 0x78, 0x40, 0x20, 0x54, 0x55, 0x79, 0x40, 0x0C, 0x1E, 0x52, 0x72, 0x12, 0x39, 0x55, 0x55, 0x55, 0x59, 0x39, 0x54, 0x54, 0x54, 0x59, 0x39, 0x55, 0x54, 0x54, 0x58, 0x00, 0x00, 0x45, 0x7C, 0x41, 0x00, 0x02, 0x45, 0x7D, 0x42, 0x00, 0x01, 0x45, 0x7C, 0x40, 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut - 0xF0, 0x28, 0x25, 0x28, 0xF0, 0x7C, 0x54, 0x55, 0x45, 0x00, 0x20, 0x54, 0x54, 0x7C, 0x54, 0x7C, 0x0A, 0x09, 0x7F, 0x49, 0x32, 0x49, 0x49, 0x49, 0x32, 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut - 0x32, 0x4A, 0x48, 0x48, 0x30, 0x3A, 0x41, 0x41, 0x21, 0x7A, 0x3A, 0x42, 0x40, 0x20, 0x78, 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut - 0x3D, 0x40, 0x40, 0x40, 0x3D, 0x3C, 0x24, 0xFF, 0x24, 0x24, 0x48, 0x7E, 0x49, 0x43, 0x66, 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 0xFF, 0x09, 0x29, 0xF6, 0x20, 0xC0, 0x88, 0x7E, 0x09, 0x03, 0x20, 0x54, 0x54, 0x79, 0x41, 0x00, 0x00, 0x44, 0x7D, 0x41, 0x30, 0x48, 0x48, 0x4A, 0x32, 0x38, 0x40, 0x40, 0x22, 0x7A, 0x00, 0x7A, 0x0A, 0x0A, 0x72, 0x7D, 0x0D, 0x19, 0x31, 0x7D, 0x26, 0x29, 0x29, 0x2F, 0x28, 0x26, 0x29, 0x29, 0x29, 0x26, 0x30, 0x48, 0x4D, 0x40, 0x20, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 0x2F, 0x10, 0x28, 0x34, 0xFA, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x08, 0x14, 0x2A, 0x14, 0x22, 0x22, 0x14, 0x2A, 0x14, 0x08, 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code - 0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block - 0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block - 0x00, 0x00, 0x00, 0xFF, 0x00, 0x10, 0x10, 0x10, 0xFF, 0x00, 0x14, 0x14, 0x14, 0xFF, 0x00, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x14, 0x14, 0x14, 0xFC, 0x00, 0x14, 0x14, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x14, 0x14, 0x17, 0x10, 0x1F, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0x1F, 0x00, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x1F, 0x10, 0x17, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x17, 0x10, 0x17, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x17, 0x14, 0x10, 0x10, 0x1F, 0x10, 0x1F, - 0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta - 0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP -}; From a91de722467afc2a080c8c1a7a6f904f1f361c07 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Wed, 10 Sep 2025 02:14:04 -0600 Subject: [PATCH 29/95] Migrate `g_led_config` to DD (K7) (#25616) --- .../kprepublic/bm40hsrgb/rev1/keyboard.json | 55 +++++++ keyboards/kprepublic/bm40hsrgb/rev1/rev1.c | 43 ------ .../kprepublic/bm60hsrgb/rev1/keyboard.json | 71 +++++++++ keyboards/kprepublic/bm60hsrgb/rev1/rev1.c | 50 ------ .../bm60hsrgb_ec/rev1/keyboard.json | 71 +++++++++ keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c | 33 ---- .../bm60hsrgb_ec/rev2/keyboard.json | 67 ++++++++- keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c | 32 ---- .../bm60hsrgb_iso/rev1/keyboard.json | 72 +++++++++ .../kprepublic/bm60hsrgb_iso/rev1/rev1.c | 52 ------- .../bm60hsrgb_poker/rev1/keyboard.json | 69 +++++++++ .../kprepublic/bm60hsrgb_poker/rev1/rev1.c | 52 ------- .../kprepublic/bm65hsrgb/rev1/keyboard.json | 77 +++++++++- keyboards/kprepublic/bm65hsrgb/rev1/rev1.c | 44 ------ .../bm65hsrgb_iso/rev1/keyboard.json | 76 ++++++++++ .../kprepublic/bm65hsrgb_iso/rev1/rev1.c | 38 ----- .../kprepublic/bm68hsrgb/rev1/keyboard.json | 76 ++++++++++ keyboards/kprepublic/bm68hsrgb/rev1/rev1.c | 25 --- .../kprepublic/bm68hsrgb/rev2/keyboard.json | 70 +++++++++ keyboards/kprepublic/bm68hsrgb/rev2/rev2.c | 20 --- keyboards/kprepublic/bm80hsrgb/bm80hsrgb.c | 142 ------------------ keyboards/kprepublic/bm80hsrgb/keyboard.json | 91 ++++++++++- keyboards/kprepublic/bm80v2/bm80v2.c | 24 --- keyboards/kprepublic/bm80v2/keyboard.json | 89 +++++++++++ keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c | 24 --- keyboards/kprepublic/bm80v2_iso/keyboard.json | 90 +++++++++++ keyboards/kprepublic/bm980hsrgb/bm980hsrgb.c | 51 ------- keyboards/kprepublic/bm980hsrgb/keyboard.json | 102 ++++++++++++- 28 files changed, 1072 insertions(+), 634 deletions(-) delete mode 100755 keyboards/kprepublic/bm40hsrgb/rev1/rev1.c delete mode 100644 keyboards/kprepublic/bm60hsrgb/rev1/rev1.c delete mode 100644 keyboards/kprepublic/bm60hsrgb_iso/rev1/rev1.c delete mode 100644 keyboards/kprepublic/bm60hsrgb_poker/rev1/rev1.c delete mode 100644 keyboards/kprepublic/bm65hsrgb/rev1/rev1.c delete mode 100644 keyboards/kprepublic/bm80hsrgb/bm80hsrgb.c delete mode 100644 keyboards/kprepublic/bm980hsrgb/bm980hsrgb.c diff --git a/keyboards/kprepublic/bm40hsrgb/rev1/keyboard.json b/keyboards/kprepublic/bm40hsrgb/rev1/keyboard.json index 5cad0a013a..9dc347da6e 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev1/keyboard.json +++ b/keyboards/kprepublic/bm40hsrgb/rev1/keyboard.json @@ -57,6 +57,61 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"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": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4}, + {"matrix": [1, 11], "x": 224, "y": 21, "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": 224, "y": 42, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 81, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 111, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 142, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 162, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 203, "y": 64, "flags": 1}, + {"matrix": [3, 11], "x": 224, "y": 64, "flags": 1}, + {"x": 220, "y": 32, "flags": 2}, + {"x": 176, "y": 32, "flags": 2}, + {"x": 132, "y": 32, "flags": 2}, + {"x": 88, "y": 32, "flags": 2}, + {"x": 44, "y": 32, "flags": 2}, + {"x": 0, "y": 32, "flags": 2} + ] "max_brightness": 180, "sleep": true }, diff --git a/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c b/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c deleted file mode 100755 index f6df97ebf1..0000000000 --- a/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2020 tominabox1, Richard Goulter - * - * 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" - -#if defined(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, 31, 32, 33, 34, 35}, - {36, 37, 38, 39, 40, 41, NO_LED, 42, 43, 44, 45, 46} - }, { - // LED Index to Physical Position - { 0, 0}, { 20, 0}, { 40, 0}, {61, 0}, {81, 0}, {101, 0}, {122, 0}, {142, 0}, {162, 0}, {183, 0}, {203, 0}, {224, 0}, - { 0, 21}, { 20, 21}, { 40, 21}, {61, 21}, {81, 21}, {101, 21}, {122, 21}, {142, 21}, {162, 21}, {183, 21}, {203, 21}, {224, 21}, - { 0, 42}, { 20, 42}, { 40, 42}, {61, 42}, {81, 42}, {101, 42}, {122, 42}, {142, 42}, {162, 42}, {183, 42}, {203, 42}, {224, 42}, - { 0, 64}, { 20, 64}, { 40, 64}, {61, 64}, {81, 64}, {111, 64}, {142, 64}, {162, 64}, {183, 64}, {203, 64}, {224, 64}, - {220, 32}, {176, 32}, {132, 32}, {88, 32}, {44, 32}, {0, 32} - }, { - // LED Index to Flag - 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, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2 - } -}; - -#endif diff --git a/keyboards/kprepublic/bm60hsrgb/rev1/keyboard.json b/keyboards/kprepublic/bm60hsrgb/rev1/keyboard.json index 55ec5589d1..4dcf26964f 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev1/keyboard.json +++ b/keyboards/kprepublic/bm60hsrgb/rev1/keyboard.json @@ -57,6 +57,77 @@ "solid_multisplash": true }, "driver": "ws2812", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 11, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 198, "y": 32, "flags": 1}, + {"matrix": [3, 1], "x": 18, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 30, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 60, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 105, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 120, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 135, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 150, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 191, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"x": 216, "y": 32, "flags": 2}, + {"x": 180, "y": 32, "flags": 2}, + {"x": 144, "y": 32, "flags": 2}, + {"x": 108, "y": 32, "flags": 2}, + {"x": 72, "y": 32, "flags": 2}, + {"x": 36, "y": 32, "flags": 2} + ] "max_brightness": 180 }, "rgblight": { diff --git a/keyboards/kprepublic/bm60hsrgb/rev1/rev1.c b/keyboards/kprepublic/bm60hsrgb/rev1/rev1.c deleted file mode 100644 index bec465b2e6..0000000000 --- a/keyboards/kprepublic/bm60hsrgb/rev1/rev1.c +++ /dev/null @@ -1,50 +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" - -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, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, - { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }, - { 54, 55, 56, NO_LED, NO_LED, NO_LED, 57, NO_LED, NO_LED, 58, 59, 60, 61, 62 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 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 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 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 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, - // UNDERGLOW - { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 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, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1, - // UNDERGLOW - 2, 2, 2, 2, 2, 2 -} }; diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/keyboard.json b/keyboards/kprepublic/bm60hsrgb_ec/rev1/keyboard.json index 75e8333f7a..84e962e90c 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/keyboard.json +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/keyboard.json @@ -51,6 +51,77 @@ "solid_multisplash": true }, "driver": "ws2812", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 195, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 11, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 198, "y": 32, "flags": 1}, + {"matrix": [3, 1], "x": 18, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 30, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 60, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 105, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 120, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 135, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 150, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 191, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"x": 216, "y": 32, "flags": 2}, + {"x": 180, "y": 32, "flags": 2}, + {"x": 144, "y": 32, "flags": 2}, + {"x": 108, "y": 32, "flags": 2}, + {"x": 72, "y": 32, "flags": 2}, + {"x": 36, "y": 32, "flags": 2} + ] "max_brightness": 140 }, "build": { diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c b/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c index 26afae87ae..55b6df9233 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev1/rev1.c @@ -14,39 +14,6 @@ * along with this program. If not, see . */ #include "quantum.h" -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, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, - { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }, - { 54, 55, 56, NO_LED, NO_LED, NO_LED, 57, NO_LED, NO_LED, 58, 59, 60, 61, 62 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 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 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 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 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, - // UNDERGLOW - { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 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, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1, - // UNDERGLOW - 2, 2, 2, 2, 2, 2 -} }; bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/keyboard.json b/keyboards/kprepublic/bm60hsrgb_ec/rev2/keyboard.json index dd43d36d71..bdff11563b 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/keyboard.json +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/keyboard.json @@ -36,6 +36,71 @@ "solid_multisplash": true }, "driver": "is31fl3733", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 195, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 11, "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 198, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 18, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 30, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 60, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 105, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 120, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 135, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 150, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 191, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1} + ] "max_brightness": 180, "sleep": true }, @@ -58,7 +123,7 @@ }, "default": { "animation": "rainbow_mood" - } + } }, "build": { "lto": true diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c index eca53e9893..e8d7f69435 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c @@ -85,38 +85,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW5_CS16, SW4_CS16, SW6_CS16 } }; -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, NO_LED, 40 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, NO_LED, 51, 52, 53 }, - { 54, 55, 56, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 58, 59, 60, 61, 62 } - }, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 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 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 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 }, - // Capslock, A, S, D, F, G, H, A, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 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, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, A, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1 - } -}; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev1/keyboard.json b/keyboards/kprepublic/bm60hsrgb_iso/rev1/keyboard.json index b3bf6e44b2..9468251899 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev1/keyboard.json +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev1/keyboard.json @@ -57,6 +57,78 @@ "solid_multisplash": true }, "driver": "ws2812", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 11, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 198, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 3, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 22, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "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": 194, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 213, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"x": 216, "y": 32, "flags": 2}, + {"x": 180, "y": 32, "flags": 2}, + {"x": 144, "y": 32, "flags": 2}, + {"x": 108, "y": 32, "flags": 2}, + {"x": 72, "y": 32, "flags": 2}, + {"x": 36, "y": 32, "flags": 2} + ] "max_brightness": 180 }, "build": { diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev1/rev1.c b/keyboards/kprepublic/bm60hsrgb_iso/rev1/rev1.c deleted file mode 100644 index 80bc2e2283..0000000000 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev1/rev1.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2020 markva - * - * 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" - -#if defined(RGB_MATRIX_ENABLE) -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, NO_LED, 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, NO_LED, NO_LED, NO_LED, 58, NO_LED, NO_LED, 59, 60, 61, 62, 63} -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 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 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 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 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, <, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 3, 48 }, { 22, 48 }, { 33, 48 }, { 48, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 194, 48 }, { 213, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, - // UNDERGLOW - { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 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, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift,<, Z, X, C, V, B, N, M, ,, ., Shift, Up, / - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1, - // UNDERGLOW - 2, 2, 2, 2, 2, 2 -} }; -#endif diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keyboard.json b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keyboard.json index 9619665e6d..00cf89b973 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keyboard.json +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keyboard.json @@ -56,6 +56,75 @@ "solid_multisplash": true }, "driver": "ws2812", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 11, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 198, "y": 32, "flags": 1}, + {"matrix": [3, 1], "x": 18, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 30, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 60, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 105, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 120, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 135, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 150, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 191, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"x": 216, "y": 32, "flags": 2}, + {"x": 180, "y": 32, "flags": 2}, + {"x": 144, "y": 32, "flags": 2}, + {"x": 108, "y": 32, "flags": 2}, + {"x": 72, "y": 32, "flags": 2}, + {"x": 36, "y": 32, "flags": 2} + ] "max_brightness": 180 }, "rgblight": { diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/rev1.c b/keyboards/kprepublic/bm60hsrgb_poker/rev1/rev1.c deleted file mode 100644 index d5dd1f2f97..0000000000 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/rev1.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2020 ipetepete - * - * 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 RGB_MATRIX_ENABLE -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, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, - { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52 }, - { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, NO_LED, 59, 60 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 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 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 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 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 }, - // UNDERGLOW - { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 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, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, - // UNDERGLOW - 2, 2, 2, 2, 2, 2 -} }; -#endif diff --git a/keyboards/kprepublic/bm65hsrgb/rev1/keyboard.json b/keyboards/kprepublic/bm65hsrgb/rev1/keyboard.json index d761606a5a..ae88446469 100644 --- a/keyboards/kprepublic/bm65hsrgb/rev1/keyboard.json +++ b/keyboards/kprepublic/bm65hsrgb/rev1/keyboard.json @@ -11,7 +11,82 @@ "pin": "E2" }, "rgb_matrix": { - "driver": "ws2812" + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [0, 14], "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": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 1], "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": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 208, "y": 48, "flags": 1}, + {"matrix": [3, 14], "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": 94, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 148, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 163, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 193, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 208, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"x": 185, "y": 45, "flags": 2}, + {"x": 160, "y": 45, "flags": 2}, + {"x": 125, "y": 45, "flags": 2}, + {"x": 95, "y": 45, "flags": 2}, + {"x": 60, "y": 45, "flags": 2}, + {"x": 25, "y": 45, "flags": 2} + ] }, "build": { "lto": true diff --git a/keyboards/kprepublic/bm65hsrgb/rev1/rev1.c b/keyboards/kprepublic/bm65hsrgb/rev1/rev1.c deleted file mode 100644 index 7f416bc9ae..0000000000 --- a/keyboards/kprepublic/bm65hsrgb/rev1/rev1.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2021 bytesapart - * - * 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 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, NO_LED, 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, Left, Down, Right - {185, 45}, {160, 45}, {125, 45}, { 95, 45}, { 60, 45}, { 25, 45} // UNDERGLOW -}, { - // 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, RAlt, FN, Left, Down, Right - 2, 2, 2, 2, 2, 2 // UNDERGLOW -} }; -#endif diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev1/keyboard.json b/keyboards/kprepublic/bm65hsrgb_iso/rev1/keyboard.json index 187816b660..d8fb49fb5f 100644 --- a/keyboards/kprepublic/bm65hsrgb_iso/rev1/keyboard.json +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev1/keyboard.json @@ -82,6 +82,82 @@ "animation": "band_sat" }, "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 11, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 198, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 3, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 18, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "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": 190, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 209, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 194, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"x": 216, "y": 32, "flags": 2}, + {"x": 180, "y": 32, "flags": 2}, + {"x": 144, "y": 32, "flags": 2}, + {"x": 108, "y": 32, "flags": 2}, + {"x": 72, "y": 32, "flags": 2}, + {"x": 36, "y": 32, "flags": 2} + ] "max_brightness": 140 }, "build": { diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev1/rev1.c b/keyboards/kprepublic/bm65hsrgb_iso/rev1/rev1.c index 52c661d3f4..acf2aed98b 100644 --- a/keyboards/kprepublic/bm65hsrgb_iso/rev1/rev1.c +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev1/rev1.c @@ -16,44 +16,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, 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}, - { 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, NO_LED, 64, 65, 66, 67} - -}, { - // LED Index to Physical Position - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete - { 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 }, { 224, 0 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], Enter, Pos1 - { 7, 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 }, { 224, 16 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', , PageUp - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, { 224, 32 }, - // LShift, <, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, PageDown - { 3, 48 }, { 18, 48 }, { 33, 48 }, { 48, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 190, 48 }, { 209, 48 }, { 224, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 194, 64 }, { 209, 64 },{ 224, 64 }, - // UNDERGLOW - { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } -}, { - // LED Index to Flag - // 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, [, ], Enter, Pos1 - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', , PageUp - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, <, Z, X, C, V, B, N, M, ,, ., /, RShift, Up, PageDown - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1, - // UNDERGLOW - 2, 2, 2, 2, 2, 2 -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/keyboard.json b/keyboards/kprepublic/bm68hsrgb/rev1/keyboard.json index b5ca4d696d..3b379437c4 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/keyboard.json +++ b/keyboards/kprepublic/bm68hsrgb/rev1/keyboard.json @@ -57,6 +57,82 @@ "solid_multisplash": true }, "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [0, 14], "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": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 116, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 131, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 146, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 161, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 1], "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": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 208, "y": 48, "flags": 1}, + {"matrix": [3, 14], "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": 94, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 148, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 163, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 178, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 193, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 208, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"x": 185, "y": 45, "flags": 2}, + {"x": 160, "y": 45, "flags": 2}, + {"x": 125, "y": 45, "flags": 2}, + {"x": 95, "y": 45, "flags": 2}, + {"x": 60, "y": 45, "flags": 2}, + {"x": 25, "y": 45, "flags": 2} + ] "max_brightness": 180 }, "build": { diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/rev1.c b/keyboards/kprepublic/bm68hsrgb/rev1/rev1.c index abe2b98c20..5484b15353 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/rev1.c +++ b/keyboards/kprepublic/bm68hsrgb/rev1/rev1.c @@ -17,31 +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, 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, 67 } -}, { - // 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}, {178, 64}, {193, 64}, {208, 64}, {225, 64}, // Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right - {185, 45}, {160, 45}, {125, 45}, { 95, 45}, { 60, 45}, { 25, 45} // UNDERGLOW -}, { - // 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, 1, // Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right - 2, 2, 2, 2, 2, 2 // UNDERGLOW -} }; - //CAPS backlight bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { diff --git a/keyboards/kprepublic/bm68hsrgb/rev2/keyboard.json b/keyboards/kprepublic/bm68hsrgb/rev2/keyboard.json index 28ad31304e..56f4df55fb 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev2/keyboard.json +++ b/keyboards/kprepublic/bm68hsrgb/rev2/keyboard.json @@ -42,6 +42,76 @@ "solid_multisplash": true }, "driver": "is31fl3741", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 23, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 53, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 83, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 98, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 113, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 143, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 158, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 173, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 188, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 206, "y": 16, "flags": 4}, + {"matrix": [1, 14], "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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 201, "y": 32, "flags": 4}, + {"matrix": [2, 14], "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": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 79, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 94, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 109, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 124, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 139, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 154, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 169, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [3, 14], "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": 96, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 150, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 165, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 180, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c index 68068d7fb9..43f1eb56c0 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c @@ -92,26 +92,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW7_CS30, SW7_CS29, SW7_CS28} }; -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, NO_LED, 42, 43 }, - { 44,NO_LED, 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, 67 } -}, { - {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},{203,0},{224,0}, - {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, - {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},{224,32}, - {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, - { 2, 64 }, { 21, 64 }, { 39, 64 }, { 96, 64 }, { 150, 64 }, { 165, 64 }, { 180, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 } -}, { - 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, 1, 1, 1 -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { diff --git a/keyboards/kprepublic/bm80hsrgb/bm80hsrgb.c b/keyboards/kprepublic/bm80hsrgb/bm80hsrgb.c deleted file mode 100644 index 2ec020739a..0000000000 --- a/keyboards/kprepublic/bm80hsrgb/bm80hsrgb.c +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright 2021 peepeetee - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, NO_LED, 1, 2, 3, 4, NO_LED, 5, 6, 7, 8, 9, 10, 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, 11, 62, NO_LED, NO_LED, NO_LED }, - /* ^ this one is f11*/ - { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, NO_LED, 74, NO_LED, NO_LED, 75, NO_LED }, - { 76, 77, 78, NO_LED, NO_LED, 79, NO_LED, NO_LED, NO_LED, 80, 81, 82, 83, 84, NO_LED, 85, 86 } - -// K0_0, K0_2, K0_3, K0_4, K0_5, K0_7, K0_8, K0_9, K0_A, K0_B, K0_C, K3_C, K0_D, K0_E, K0_F, K0_10, -// K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9, K1_A, K1_B, K1_C, K1_D, K1_E, K1_F, K1_10, -// K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9, K2_A, K2_B, K2_C, K2_D, K2_E, K2_F, K2_10, -// K3_0, K3_1, K3_2, K3_3, K3_4, K3_5, K3_6, K3_7, K3_8, K3_9, K3_A, K3_B, K3_D, -// K4_0, K4_1, K4_2, K4_3, K4_4, K4_5, K4_6, K4_7, K4_8, K4_9, K4_A, K4_C, K4_F, -// K5_0, K5_1, K5_2, K5_5, K5_9, K5_A, K5_B, K5_C, K5_D, K5_F, K5_10 - - -// K0_0, KC_NO, K0_2, K0_3, K0_4, K0_5, KC_NO, K0_7, K0_8, K0_9, K0_A, K0_B, K0_C, K0_D, K0_E, K0_F, K0_10 -// K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9, K1_A, K1_B, K1_C, K1_D, K1_E, K1_F, K1_10 -// K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9, K2_A, K2_B, K2_C, K2_D, K2_E, K2_F, K2_10 -// K3_0, K3_1, K3_2, K3_3, K3_4, K3_5, K3_6, K3_7, K3_8, K3_9, K3_A, K3_B, K3_C, K3_D, KC_NO, KC_NO, KC_NO -// K4_0, K4_1, K4_2, K4_3, K4_4, K4_5, K4_6, K4_7, K4_8, K4_9, K4_A, KC_NO, K4_C, KC_NO, KC_NO, K4_F, KC_NO -// K5_0, K5_1, K5_2, KC_NO, KC_NO, K5_5, KC_NO, KC_NO, KC_NO, K5_9, K5_A, K5_B, K5_C, K5_D, KC_NO, K5_F, K5_10 - - /* - * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │ 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 Position - { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, - /* - * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │ 0 │   │ 1 │ 2 │ 3 │ 4 │ │ 5 │ 6 │ 7 │ 8 │ │ 9 │ 10│ 11│ 12│ │ 13│ 14│ 15│ - * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - */ - { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, { 217, 20 }, - /* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ - * │ 16│ 17│ 18│ 19│ 20│ 21│ 22│ 23│ 24│ 25│ 26│ 27│ 28│  29 │ │ 30│ 31│ 32│ - * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───────┘ └───┴───┴───┘ - */ - { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 }, { 217, 30 }, - /* - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ ┌───┬───┬───┐ - * │  33 │ 34│ 35│ 36│ 37│ 38│ 39│ 40│ 41│ 42│ 43│ 44│ 45│  46 │ │ 47│ 48│ 49│ - * └─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ └───┴───┴───┘ - */ - { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, - /* - * ┌──────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────────┐ - * │ 50  │ 51│ 52│ 53│ 54│ 55│ 56│ 57│ 58│ 59│ 60│ 61│   62  │ - * └──────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────────┘ - */ - { 14, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, - /* - * ┌────────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────────┐     ┌───┐ - * │ 63   │ 64│ 65│ 66│ 67│ 68│ 69│ 70│ 71│ 72│ 73│    74  │     │ 75│ - * └────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴──────────┘  └───┘ - */ - { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 } - /* - * ┌────┬────┬────┬────────────────────────┬────┬────┬────┬────┐ ┌───┬───┬───┐ - * │ 76 │ 77 │ 78 │           79           │ 80 │ 81 │ 82 │ 83 │ │ 84│ 85│ 86│ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ - */ -}, { - // LED Index to Flag - 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 9/*scroll lock*/, 1, - /* - * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │ 0 │   │ 1 │ 2 │ 3 │ 4 │ │ 5 │ 6 │ 7 │ 8 │ │ 9 │ 10│ 11│ 12│ │ 13│ 14│ 15│ - * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - */ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - /* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ - * │ 16│ 17│ 18│ 19│ 20│ 21│ 22│ 23│ 24│ 25│ 26│ 27│ 28│  29 │ │ 30│ 31│ 32│ - * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───────┘ └───┴───┴───┘ - */ - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - /* - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ ┌───┬───┬───┐ - * │  33 │ 34│ 35│ 36│ 37│ 38│ 39│ 40│ 41│ 42│ 43│ 44│ 45│  46 │ │ 47│ 48│ 49│ - * └─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ └───┴───┴───┘ - */ - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - //caps lock is 1 instead of 1+8, this board has a dedicated led - /* - * ┌──────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────────┐ - * │ 50  │ 51│ 52│ 53│ 54│ 55│ 56│ 57│ 58│ 59│ 60│ 61│   62  │ - * └──────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────────┘ - */ - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - /* - * ┌────────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────────┐     ┌───┐ - * │ 63   │ 64│ 65│ 66│ 67│ 68│ 69│ 70│ 71│ 72│ 73│    74  │     │ 75│ - * └────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴──────────┘  └───┘ - */ - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 - /* - * ┌────┬────┬────┬────────────────────────┬────┬────┬────┬────┐ ┌───┬───┬───┐ - * │ 76 │ 77 │ 78 │           79           │ 80 │ 81 │ 82 │ 83 │ │ 84│ 85│ 86│ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ - */ -} }; - - -#endif diff --git a/keyboards/kprepublic/bm80hsrgb/keyboard.json b/keyboards/kprepublic/bm80hsrgb/keyboard.json index 1a1b1a6ed3..4acf4be5e8 100644 --- a/keyboards/kprepublic/bm80hsrgb/keyboard.json +++ b/keyboards/kprepublic/bm80hsrgb/keyboard.json @@ -55,7 +55,96 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 7, "y": 5, "flags": 1}, + {"matrix": [0, 2], "x": 31, "y": 5, "flags": 4}, + {"matrix": [0, 3], "x": 43, "y": 5, "flags": 4}, + {"matrix": [0, 4], "x": 55, "y": 5, "flags": 4}, + {"matrix": [0, 5], "x": 67, "y": 5, "flags": 4}, + {"matrix": [0, 7], "x": 85, "y": 5, "flags": 1}, + {"matrix": [0, 8], "x": 97, "y": 5, "flags": 1}, + {"matrix": [0, 9], "x": 109, "y": 5, "flags": 1}, + {"matrix": [0, 10], "x": 121, "y": 5, "flags": 1}, + {"matrix": [0, 11], "x": 139, "y": 5, "flags": 4}, + {"matrix": [0, 12], "x": 151, "y": 5, "flags": 4}, + {"matrix": [3, 12], "x": 163, "y": 5, "flags": 4}, + {"matrix": [0, 13], "x": 175, "y": 5, "flags": 4}, + {"matrix": [0, 14], "x": 193, "y": 5, "flags": 1}, + {"matrix": [0, 15], "x": 205, "y": 5, "flags": 9}, + {"matrix": [0, 16], "x": 217, "y": 5, "flags": 1}, + {"matrix": [1, 0], "x": 7, "y": 20, "flags": 4}, + {"matrix": [1, 1], "x": 19, "y": 20, "flags": 4}, + {"matrix": [1, 2], "x": 31, "y": 20, "flags": 4}, + {"matrix": [1, 3], "x": 43, "y": 20, "flags": 4}, + {"matrix": [1, 4], "x": 55, "y": 20, "flags": 4}, + {"matrix": [1, 5], "x": 67, "y": 20, "flags": 4}, + {"matrix": [1, 6], "x": 79, "y": 20, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 20, "flags": 4}, + {"matrix": [1, 8], "x": 103, "y": 20, "flags": 4}, + {"matrix": [1, 9], "x": 115, "y": 20, "flags": 4}, + {"matrix": [1, 10], "x": 127, "y": 20, "flags": 4}, + {"matrix": [1, 11], "x": 139, "y": 20, "flags": 4}, + {"matrix": [1, 12], "x": 151, "y": 20, "flags": 4}, + {"matrix": [1, 13], "x": 169, "y": 20, "flags": 1}, + {"matrix": [1, 14], "x": 193, "y": 20, "flags": 1}, + {"matrix": [1, 15], "x": 205, "y": 20, "flags": 1}, + {"matrix": [1, 16], "x": 217, "y": 20, "flags": 1}, + {"matrix": [2, 0], "x": 10, "y": 30, "flags": 1}, + {"matrix": [2, 1], "x": 25, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 49, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 61, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 73, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 97, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 109, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 121, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 133, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 145, "y": 30, "flags": 4}, + {"matrix": [2, 12], "x": 157, "y": 30, "flags": 4}, + {"matrix": [2, 13], "x": 172, "y": 30, "flags": 4}, + {"matrix": [2, 14], "x": 193, "y": 30, "flags": 1}, + {"matrix": [2, 15], "x": 205, "y": 30, "flags": 1}, + {"matrix": [2, 16], "x": 217, "y": 30, "flags": 1}, + {"matrix": [3, 0], "x": 11, "y": 39, "flags": 1}, + {"matrix": [3, 1], "x": 28, "y": 39, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 39, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 39, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 39, "flags": 4}, + {"matrix": [3, 5], "x": 76, "y": 39, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 39, "flags": 4}, + {"matrix": [3, 7], "x": 100, "y": 39, "flags": 4}, + {"matrix": [3, 8], "x": 112, "y": 39, "flags": 4}, + {"matrix": [3, 9], "x": 124, "y": 39, "flags": 4}, + {"matrix": [3, 10], "x": 136, "y": 39, "flags": 4}, + {"matrix": [3, 11], "x": 148, "y": 39, "flags": 4}, + {"matrix": [3, 13], "x": 168, "y": 39, "flags": 1}, + {"matrix": [4, 0], "x": 14, "y": 49, "flags": 1}, + {"matrix": [4, 1], "x": 34, "y": 49, "flags": 4}, + {"matrix": [4, 2], "x": 46, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 58, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 70, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 82, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 94, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 106, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 118, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 130, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 142, "y": 49, "flags": 4}, + {"matrix": [4, 12], "x": 165, "y": 49, "flags": 1}, + {"matrix": [4, 15], "x": 205, "y": 49, "flags": 1}, + {"matrix": [5, 0], "x": 8, "y": 59, "flags": 1}, + {"matrix": [5, 1], "x": 23, "y": 59, "flags": 1}, + {"matrix": [5, 2], "x": 38, "y": 59, "flags": 1}, + {"matrix": [5, 5], "x": 83, "y": 59, "flags": 4}, + {"matrix": [5, 9], "x": 129, "y": 59, "flags": 1}, + {"matrix": [5, 10], "x": 144, "y": 59, "flags": 1}, + {"matrix": [5, 11], "x": 159, "y": 59, "flags": 1}, + {"matrix": [5, 12], "x": 174, "y": 59, "flags": 1}, + {"matrix": [5, 13], "x": 193, "y": 59, "flags": 1}, + {"matrix": [5, 15], "x": 205, "y": 59, "flags": 1}, + {"matrix": [5, 16], "x": 217, "y": 59, "flags": 1} + ] }, "build": { "lto": true diff --git a/keyboards/kprepublic/bm80v2/bm80v2.c b/keyboards/kprepublic/bm80v2/bm80v2.c index 9c1b71d057..94a8032a17 100644 --- a/keyboards/kprepublic/bm80v2/bm80v2.c +++ b/keyboards/kprepublic/bm80v2/bm80v2.c @@ -112,30 +112,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW8_CS36, SW8_CS35, SW8_CS34} }; -led_config_t g_led_config = { { - { 0, NO_LED, 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, NO_LED, NO_LED, NO_LED, NO_LED }, - { 63, NO_LED, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, NO_LED, NO_LED, 75, NO_LED }, - { 76, 77, 78, NO_LED,NO_LED, 79, NO_LED, NO_LED, NO_LED, NO_LED, 80, 81, 82, 83, 84, 85, 86 } -}, -{ - { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, - { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, { 217, 20 }, - { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 }, { 217, 30 }, - { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, - { 17, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, - { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 } -}, -{ 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 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, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { diff --git a/keyboards/kprepublic/bm80v2/keyboard.json b/keyboards/kprepublic/bm80v2/keyboard.json index 43de1e4933..a5da2324a9 100644 --- a/keyboards/kprepublic/bm80v2/keyboard.json +++ b/keyboards/kprepublic/bm80v2/keyboard.json @@ -45,6 +45,95 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 7, "y": 5, "flags": 1}, + {"matrix": [0, 2], "x": 31, "y": 5, "flags": 4}, + {"matrix": [0, 3], "x": 43, "y": 5, "flags": 4}, + {"matrix": [0, 4], "x": 55, "y": 5, "flags": 4}, + {"matrix": [0, 5], "x": 67, "y": 5, "flags": 4}, + {"matrix": [0, 6], "x": 85, "y": 5, "flags": 1}, + {"matrix": [0, 7], "x": 97, "y": 5, "flags": 1}, + {"matrix": [0, 8], "x": 109, "y": 5, "flags": 1}, + {"matrix": [0, 9], "x": 121, "y": 5, "flags": 1}, + {"matrix": [0, 10], "x": 139, "y": 5, "flags": 4}, + {"matrix": [0, 11], "x": 151, "y": 5, "flags": 4}, + {"matrix": [0, 12], "x": 163, "y": 5, "flags": 4}, + {"matrix": [0, 13], "x": 175, "y": 5, "flags": 4}, + {"matrix": [0, 14], "x": 193, "y": 5, "flags": 1}, + {"matrix": [0, 15], "x": 205, "y": 5, "flags": 1}, + {"matrix": [0, 16], "x": 217, "y": 5, "flags": 1}, + {"matrix": [1, 0], "x": 7, "y": 20, "flags": 4}, + {"matrix": [1, 1], "x": 19, "y": 20, "flags": 4}, + {"matrix": [1, 2], "x": 31, "y": 20, "flags": 4}, + {"matrix": [1, 3], "x": 43, "y": 20, "flags": 4}, + {"matrix": [1, 4], "x": 55, "y": 20, "flags": 4}, + {"matrix": [1, 5], "x": 67, "y": 20, "flags": 4}, + {"matrix": [1, 6], "x": 79, "y": 20, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 20, "flags": 4}, + {"matrix": [1, 8], "x": 103, "y": 20, "flags": 4}, + {"matrix": [1, 9], "x": 115, "y": 20, "flags": 4}, + {"matrix": [1, 10], "x": 127, "y": 20, "flags": 4}, + {"matrix": [1, 11], "x": 139, "y": 20, "flags": 4}, + {"matrix": [1, 12], "x": 151, "y": 20, "flags": 4}, + {"matrix": [1, 13], "x": 169, "y": 20, "flags": 1}, + {"matrix": [1, 14], "x": 193, "y": 20, "flags": 1}, + {"matrix": [1, 15], "x": 205, "y": 20, "flags": 1}, + {"matrix": [1, 16], "x": 217, "y": 20, "flags": 1}, + {"matrix": [2, 0], "x": 10, "y": 30, "flags": 1}, + {"matrix": [2, 1], "x": 25, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 49, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 61, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 73, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 97, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 109, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 121, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 133, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 145, "y": 30, "flags": 4}, + {"matrix": [2, 12], "x": 157, "y": 30, "flags": 4}, + {"matrix": [2, 13], "x": 172, "y": 30, "flags": 4}, + {"matrix": [2, 14], "x": 193, "y": 30, "flags": 1}, + {"matrix": [2, 15], "x": 205, "y": 30, "flags": 1}, + {"matrix": [2, 16], "x": 217, "y": 30, "flags": 1}, + {"matrix": [3, 0], "x": 11, "y": 39, "flags": 1}, + {"matrix": [3, 1], "x": 28, "y": 39, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 39, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 39, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 39, "flags": 4}, + {"matrix": [3, 5], "x": 76, "y": 39, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 39, "flags": 4}, + {"matrix": [3, 7], "x": 100, "y": 39, "flags": 4}, + {"matrix": [3, 8], "x": 112, "y": 39, "flags": 4}, + {"matrix": [3, 9], "x": 124, "y": 39, "flags": 4}, + {"matrix": [3, 10], "x": 136, "y": 39, "flags": 4}, + {"matrix": [3, 11], "x": 148, "y": 39, "flags": 4}, + {"matrix": [3, 12], "x": 168, "y": 39, "flags": 1}, + {"matrix": [4, 0], "x": 17, "y": 49, "flags": 1}, + {"matrix": [4, 2], "x": 34, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 46, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 58, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 70, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 82, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 106, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 118, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 130, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 142, "y": 49, "flags": 4}, + {"matrix": [4, 12], "x": 165, "y": 49, "flags": 1}, + {"matrix": [4, 15], "x": 205, "y": 49, "flags": 1}, + {"matrix": [5, 0], "x": 8, "y": 59, "flags": 1}, + {"matrix": [5, 1], "x": 23, "y": 59, "flags": 1}, + {"matrix": [5, 2], "x": 38, "y": 59, "flags": 1}, + {"matrix": [5, 5], "x": 83, "y": 59, "flags": 4}, + {"matrix": [5, 10], "x": 129, "y": 59, "flags": 1}, + {"matrix": [5, 11], "x": 144, "y": 59, "flags": 1}, + {"matrix": [5, 12], "x": 159, "y": 59, "flags": 1}, + {"matrix": [5, 13], "x": 174, "y": 59, "flags": 1}, + {"matrix": [5, 14], "x": 193, "y": 59, "flags": 1}, + {"matrix": [5, 15], "x": 205, "y": 59, "flags": 1}, + {"matrix": [5, 16], "x": 217, "y": 59, "flags": 1} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c index 3009359c65..fbaf9e0bcf 100644 --- a/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c +++ b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c @@ -113,30 +113,6 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW8_CS36, SW8_CS35, SW8_CS34} }; -led_config_t g_led_config = { { - { 0, NO_LED, 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, NO_LED, NO_LED, NO_LED, NO_LED }, - { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, NO_LED, NO_LED, 76, NO_LED }, - { 77, 78, 79, NO_LED,NO_LED, 80, NO_LED, NO_LED, NO_LED, NO_LED, 81, 82, 83, 84, 85, 86, 87 } -}, -{ - { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, - { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, { 217, 20 }, - { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 175, 35 }, { 193, 30 }, { 205, 30 }, { 217, 30 }, - { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, - { 8, 49 }, { 22, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, - { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 } -}, -{ 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 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, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 -} }; - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { diff --git a/keyboards/kprepublic/bm80v2_iso/keyboard.json b/keyboards/kprepublic/bm80v2_iso/keyboard.json index beb90a3738..5cf4c9c1bc 100644 --- a/keyboards/kprepublic/bm80v2_iso/keyboard.json +++ b/keyboards/kprepublic/bm80v2_iso/keyboard.json @@ -45,6 +45,96 @@ "animation": "cycle_all" }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 7, "y": 5, "flags": 1}, + {"matrix": [0, 2], "x": 31, "y": 5, "flags": 4}, + {"matrix": [0, 3], "x": 43, "y": 5, "flags": 4}, + {"matrix": [0, 4], "x": 55, "y": 5, "flags": 4}, + {"matrix": [0, 5], "x": 67, "y": 5, "flags": 4}, + {"matrix": [0, 6], "x": 85, "y": 5, "flags": 1}, + {"matrix": [0, 7], "x": 97, "y": 5, "flags": 1}, + {"matrix": [0, 8], "x": 109, "y": 5, "flags": 1}, + {"matrix": [0, 9], "x": 121, "y": 5, "flags": 1}, + {"matrix": [0, 10], "x": 139, "y": 5, "flags": 4}, + {"matrix": [0, 11], "x": 151, "y": 5, "flags": 4}, + {"matrix": [0, 12], "x": 163, "y": 5, "flags": 4}, + {"matrix": [0, 13], "x": 175, "y": 5, "flags": 4}, + {"matrix": [0, 14], "x": 193, "y": 5, "flags": 1}, + {"matrix": [0, 15], "x": 205, "y": 5, "flags": 1}, + {"matrix": [0, 16], "x": 217, "y": 5, "flags": 1}, + {"matrix": [1, 0], "x": 7, "y": 20, "flags": 4}, + {"matrix": [1, 1], "x": 19, "y": 20, "flags": 4}, + {"matrix": [1, 2], "x": 31, "y": 20, "flags": 4}, + {"matrix": [1, 3], "x": 43, "y": 20, "flags": 4}, + {"matrix": [1, 4], "x": 55, "y": 20, "flags": 4}, + {"matrix": [1, 5], "x": 67, "y": 20, "flags": 4}, + {"matrix": [1, 6], "x": 79, "y": 20, "flags": 4}, + {"matrix": [1, 7], "x": 91, "y": 20, "flags": 4}, + {"matrix": [1, 8], "x": 103, "y": 20, "flags": 4}, + {"matrix": [1, 9], "x": 115, "y": 20, "flags": 4}, + {"matrix": [1, 10], "x": 127, "y": 20, "flags": 4}, + {"matrix": [1, 11], "x": 139, "y": 20, "flags": 4}, + {"matrix": [1, 12], "x": 151, "y": 20, "flags": 4}, + {"matrix": [1, 13], "x": 169, "y": 20, "flags": 1}, + {"matrix": [1, 14], "x": 193, "y": 20, "flags": 1}, + {"matrix": [1, 15], "x": 205, "y": 20, "flags": 1}, + {"matrix": [1, 16], "x": 217, "y": 20, "flags": 1}, + {"matrix": [2, 0], "x": 10, "y": 30, "flags": 1}, + {"matrix": [2, 1], "x": 25, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 49, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 61, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 73, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 85, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 97, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 109, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 121, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 133, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 145, "y": 30, "flags": 4}, + {"matrix": [2, 12], "x": 157, "y": 30, "flags": 4}, + {"matrix": [2, 13], "x": 175, "y": 35, "flags": 4}, + {"matrix": [2, 14], "x": 193, "y": 30, "flags": 1}, + {"matrix": [2, 15], "x": 205, "y": 30, "flags": 1}, + {"matrix": [2, 16], "x": 217, "y": 30, "flags": 1}, + {"matrix": [3, 0], "x": 11, "y": 39, "flags": 1}, + {"matrix": [3, 1], "x": 28, "y": 39, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 39, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 39, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 39, "flags": 4}, + {"matrix": [3, 5], "x": 76, "y": 39, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 39, "flags": 4}, + {"matrix": [3, 7], "x": 100, "y": 39, "flags": 4}, + {"matrix": [3, 8], "x": 112, "y": 39, "flags": 4}, + {"matrix": [3, 9], "x": 124, "y": 39, "flags": 4}, + {"matrix": [3, 10], "x": 136, "y": 39, "flags": 4}, + {"matrix": [3, 11], "x": 148, "y": 39, "flags": 4}, + {"matrix": [3, 12], "x": 168, "y": 39, "flags": 1}, + {"matrix": [4, 0], "x": 8, "y": 49, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 49, "flags": 1}, + {"matrix": [4, 2], "x": 34, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 46, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 58, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 70, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 82, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 94, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 106, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 118, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 130, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 142, "y": 49, "flags": 4}, + {"matrix": [4, 12], "x": 165, "y": 49, "flags": 1}, + {"matrix": [4, 15], "x": 205, "y": 49, "flags": 1}, + {"matrix": [5, 0], "x": 8, "y": 59, "flags": 1}, + {"matrix": [5, 1], "x": 23, "y": 59, "flags": 1}, + {"matrix": [5, 2], "x": 38, "y": 59, "flags": 1}, + {"matrix": [5, 5], "x": 83, "y": 59, "flags": 4}, + {"matrix": [5, 10], "x": 129, "y": 59, "flags": 1}, + {"matrix": [5, 11], "x": 144, "y": 59, "flags": 1}, + {"matrix": [5, 12], "x": 159, "y": 59, "flags": 1}, + {"matrix": [5, 13], "x": 174, "y": 59, "flags": 1}, + {"matrix": [5, 14], "x": 193, "y": 59, "flags": 1}, + {"matrix": [5, 15], "x": 205, "y": 59, "flags": 1}, + {"matrix": [5, 16], "x": 217, "y": 59, "flags": 1} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/kprepublic/bm980hsrgb/bm980hsrgb.c b/keyboards/kprepublic/bm980hsrgb/bm980hsrgb.c deleted file mode 100644 index 12475ac36b..0000000000 --- a/keyboards/kprepublic/bm980hsrgb/bm980hsrgb.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2021 peepeetee - * Copyright 2021 bdtc123 - * - * 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 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, NO_LED, 13 }, - { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, - { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 }, - { 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, NO_LED, 65, 66 }, - { 69, NO_LED, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82 }, - { 86, 87, 88, 96, 97, 85, 89, 84, 83, 90, 91, 92, 93, 94, 95 }, - { NO_LED, NO_LED, 34, 50, 51, 52, 16, 68, 67, 33, 15, 32, NO_LED, 14, NO_LED } - - -}, { - // 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 }, { 195, 0 }, { 202, 0 }, { 212, 0 }, { 224, 0 }, - { 0, 20 }, { 15, 20 }, { 30, 20 }, { 45, 20 }, { 60, 20 }, { 75, 20 }, { 90, 20 }, { 105, 20 }, { 120, 20 }, { 135, 20 }, { 150, 20 }, { 165, 20 }, { 180, 20 },{ 195, 20 }, { 202, 20 }, { 212, 20 },{ 220, 20 },{ 224, 20 }, - { 8, 30 }, { 15, 30 }, { 30, 30 }, { 45, 30 }, { 60, 30 }, { 75, 30 }, { 90, 30 }, { 105, 30 }, { 120, 30 }, { 135, 30 }, { 150, 30 }, { 165, 30 }, { 180, 30 },{ 195, 30 }, { 202, 30 }, { 212, 30 },{ 220, 30 },{ 224, 30 }, - { 9, 40 }, { 15, 40 }, { 30, 40 }, { 45, 40 }, { 60, 40 }, { 75, 40 }, { 90, 40 }, { 105, 40 }, { 120, 40 }, { 135, 40 }, { 150, 40 }, { 165, 40 }, { 180, 40 },{ 195, 40 }, { 202, 40 }, { 212, 40 }, - { 12, 50 }, { 15, 50 }, { 30, 50 }, { 45, 50 }, { 60, 50 }, { 75, 50 }, { 90, 50 }, { 105, 50 }, { 120, 50 }, { 135, 50 }, { 150, 50 }, { 165, 50 }, { 180, 50 },{ 195, 50 }, { 202, 50 }, { 212, 50 },{ 224, 50 }, - { 2, 60 }, { 17, 60 }, { 34, 60 }, { 77, 60 }, { 120, 60 }, { 135, 60 }, { 150, 60 }, { 165, 60 }, { 177, 60 }, { 182, 60 }, { 197, 60 }, { 212, 60 }, - -}, { - // LED Index to Flag - 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 9/*scroll lock*/, 1,1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 9/*caps lock*/, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 4, 4 -} }; - - -#endif diff --git a/keyboards/kprepublic/bm980hsrgb/keyboard.json b/keyboards/kprepublic/bm980hsrgb/keyboard.json index 85f8b006ae..c4ffb1746a 100644 --- a/keyboards/kprepublic/bm980hsrgb/keyboard.json +++ b/keyboards/kprepublic/bm980hsrgb/keyboard.json @@ -8,7 +8,107 @@ "device_version": "0.0.1" }, "rgb_matrix": { - "driver": "ws2812" + "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": 1}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 120, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 195, "y": 0, "flags": 1}, + {"matrix": [6, 13], "x": 202, "y": 0, "flags": 9}, + {"matrix": [6, 10], "x": 212, "y": 0, "flags": 1}, + {"matrix": [6, 6], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 20, "flags": 4}, + {"matrix": [1, 1], "x": 15, "y": 20, "flags": 4}, + {"matrix": [1, 2], "x": 30, "y": 20, "flags": 4}, + {"matrix": [1, 3], "x": 45, "y": 20, "flags": 4}, + {"matrix": [1, 4], "x": 60, "y": 20, "flags": 4}, + {"matrix": [1, 5], "x": 75, "y": 20, "flags": 4}, + {"matrix": [1, 6], "x": 90, "y": 20, "flags": 4}, + {"matrix": [1, 7], "x": 105, "y": 20, "flags": 4}, + {"matrix": [1, 8], "x": 120, "y": 20, "flags": 4}, + {"matrix": [1, 9], "x": 135, "y": 20, "flags": 4}, + {"matrix": [1, 10], "x": 150, "y": 20, "flags": 4}, + {"matrix": [1, 11], "x": 165, "y": 20, "flags": 4}, + {"matrix": [1, 12], "x": 180, "y": 20, "flags": 4}, + {"matrix": [1, 13], "x": 195, "y": 20, "flags": 1}, + {"matrix": [1, 14], "x": 202, "y": 20, "flags": 1}, + {"matrix": [6, 11], "x": 212, "y": 20, "flags": 1}, + {"matrix": [6, 9], "x": 220, "y": 20, "flags": 1}, + {"matrix": [6, 2], "x": 224, "y": 20, "flags": 1}, + {"matrix": [2, 0], "x": 8, "y": 30, "flags": 1}, + {"matrix": [2, 1], "x": 15, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 30, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 45, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 60, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 75, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 90, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 105, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 120, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 135, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 150, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 165, "y": 30, "flags": 4}, + {"matrix": [2, 12], "x": 180, "y": 30, "flags": 4}, + {"matrix": [2, 13], "x": 195, "y": 30, "flags": 4}, + {"matrix": [2, 14], "x": 202, "y": 30, "flags": 4}, + {"matrix": [6, 3], "x": 212, "y": 30, "flags": 4}, + {"matrix": [6, 4], "x": 220, "y": 30, "flags": 4}, + {"matrix": [6, 5], "x": 224, "y": 30, "flags": 1}, + {"matrix": [3, 0], "x": 9, "y": 40, "flags": 9}, + {"matrix": [3, 1], "x": 15, "y": 40, "flags": 4}, + {"matrix": [3, 2], "x": 30, "y": 40, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 40, "flags": 4}, + {"matrix": [3, 4], "x": 60, "y": 40, "flags": 4}, + {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 40, "flags": 4}, + {"matrix": [3, 7], "x": 105, "y": 40, "flags": 4}, + {"matrix": [3, 8], "x": 120, "y": 40, "flags": 4}, + {"matrix": [3, 9], "x": 135, "y": 40, "flags": 4}, + {"matrix": [3, 10], "x": 150, "y": 40, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 40, "flags": 4}, + {"matrix": [3, 13], "x": 180, "y": 40, "flags": 1}, + {"matrix": [3, 14], "x": 195, "y": 40, "flags": 4}, + {"matrix": [6, 8], "x": 202, "y": 40, "flags": 4}, + {"matrix": [6, 7], "x": 212, "y": 40, "flags": 4}, + {"matrix": [4, 0], "x": 12, "y": 50, "flags": 1}, + {"matrix": [4, 2], "x": 15, "y": 50, "flags": 4}, + {"matrix": [4, 3], "x": 30, "y": 50, "flags": 4}, + {"matrix": [4, 4], "x": 45, "y": 50, "flags": 4}, + {"matrix": [4, 5], "x": 60, "y": 50, "flags": 4}, + {"matrix": [4, 6], "x": 75, "y": 50, "flags": 4}, + {"matrix": [4, 7], "x": 90, "y": 50, "flags": 4}, + {"matrix": [4, 8], "x": 105, "y": 50, "flags": 4}, + {"matrix": [4, 9], "x": 120, "y": 50, "flags": 4}, + {"matrix": [4, 10], "x": 135, "y": 50, "flags": 4}, + {"matrix": [4, 11], "x": 150, "y": 50, "flags": 4}, + {"matrix": [4, 12], "x": 165, "y": 50, "flags": 1}, + {"matrix": [4, 13], "x": 180, "y": 50, "flags": 1}, + {"matrix": [4, 14], "x": 195, "y": 50, "flags": 4}, + {"matrix": [5, 8], "x": 202, "y": 50, "flags": 4}, + {"matrix": [5, 7], "x": 212, "y": 50, "flags": 4}, + {"matrix": [5, 5], "x": 224, "y": 50, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 60, "flags": 1}, + {"matrix": [5, 1], "x": 17, "y": 60, "flags": 1}, + {"matrix": [5, 2], "x": 34, "y": 60, "flags": 1}, + {"matrix": [5, 6], "x": 77, "y": 60, "flags": 4}, + {"matrix": [5, 9], "x": 120, "y": 60, "flags": 1}, + {"matrix": [5, 10], "x": 135, "y": 60, "flags": 1}, + {"matrix": [5, 11], "x": 150, "y": 60, "flags": 1}, + {"matrix": [5, 12], "x": 165, "y": 60, "flags": 1}, + {"matrix": [5, 13], "x": 177, "y": 60, "flags": 1}, + {"matrix": [5, 14], "x": 182, "y": 60, "flags": 1}, + {"matrix": [5, 3], "x": 197, "y": 60, "flags": 4}, + {"matrix": [5, 4], "x": 212, "y": 60, "flags": 4} + ] }, "build": { "lto": true From 633479ced5a70076cf6906f3ecf7d199928bdb55 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, 10 Sep 2025 16:41:29 +0800 Subject: [PATCH 30/95] Restructure Pixel Rain interval code (#25516) Co-authored-by: Joel Challis --- .../rgb_matrix/animations/pixel_rain_anim.h | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/quantum/rgb_matrix/animations/pixel_rain_anim.h b/quantum/rgb_matrix/animations/pixel_rain_anim.h index c0370831d8..f92a285b67 100644 --- a/quantum/rgb_matrix/animations/pixel_rain_anim.h +++ b/quantum/rgb_matrix/animations/pixel_rain_anim.h @@ -6,20 +6,27 @@ RGB_MATRIX_EFFECT(PIXEL_RAIN) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static bool PIXEL_RAIN(effect_params_t* params) { - static fast_timer_t timer = 0; - static uint16_t index = RGB_MATRIX_LED_COUNT + 1; + static uint8_t index = 0; + static uint32_t timer = 0; - if ((params->iter == 0) && (timer_elapsed_fast(timer) > (320 - rgb_matrix_config.speed))) { + if (params->iter == 0 && params->init) { index = random8_max(RGB_MATRIX_LED_COUNT); - timer = timer_read_fast(); } RGB_MATRIX_USE_LIMITS(led_min, led_max); - if (led_min <= index && index < led_max && HAS_ANY_FLAGS(g_led_config.flags[index], params->flags)) { - hsv_t hsv = (random8() & 2) ? (hsv_t){0, 0, 0} : (hsv_t){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v}; - rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv); - rgb_matrix_set_color(index, rgb.r, rgb.g, rgb.b); - index = RGB_MATRIX_LED_COUNT + 1; + if (timer < g_rgb_timer) { // Execute when the delay period has elapsed + if (led_min <= index && index < led_max && HAS_ANY_FLAGS(g_led_config.flags[index], params->flags)) { + // Assign a random HSV color to hsv with 50% probability, otherwise assign zeroed hsv + hsv_t hsv = (random8() & 2) ? (hsv_t){0, 0, 0} : (hsv_t){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v}; + rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv); + rgb_matrix_set_color(index, rgb.r, rgb.g, rgb.b); + } + if (!rgb_matrix_check_finished_leds(led_max)) { + // In the final LED range, update the LED index and advance the timer for + // the next cycle, scaling the delay between 256–2048 ms based on speed. + index = random8_max(RGB_MATRIX_LED_COUNT); + timer = g_rgb_timer + (2048 - scale16by8(1792, rgb_matrix_config.speed)); + } } return rgb_matrix_check_finished_leds(led_max); } From f12902eb1689d6c8269ac7bb1421d4cf4e888d70 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Wed, 10 Sep 2025 17:32:48 -0600 Subject: [PATCH 31/95] Refactor `1upkeyboards/sweet16v2` (#25610) --- data/mappings/keyboard_aliases.hjson | 6 + .../sweet16v2/kb2040/keyboard.json | 143 ------------------ .../sweet16v2/{pro_micro => }/keyboard.json | 5 +- .../sweet16v2/keymaps/default/keymap.c | 41 ----- .../sweet16v2/keymaps/default/keymap.json | 28 ++++ keyboards/1upkeyboards/sweet16v2/readme.md | 22 +-- 6 files changed, 42 insertions(+), 203 deletions(-) delete mode 100644 keyboards/1upkeyboards/sweet16v2/kb2040/keyboard.json rename keyboards/1upkeyboards/sweet16v2/{pro_micro => }/keyboard.json (97%) delete mode 100644 keyboards/1upkeyboards/sweet16v2/keymaps/default/keymap.c create mode 100644 keyboards/1upkeyboards/sweet16v2/keymaps/default/keymap.json diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index 3978235e20..babbf38940 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -1632,6 +1632,12 @@ "1upkeyboards/sweet16": { "target": "1upkeyboards/sweet16/v1" }, + "1upkeyboards/sweet16v2/kb2040": { + "target": "1upkeyboards/sweet16v2" + }, + "1upkeyboards/sweet16v2/pro_micro": { + "target": "1upkeyboards/sweet16v2" + }, "25keys/aleth42": { "target": "25keys/aleth42/rev1" }, diff --git a/keyboards/1upkeyboards/sweet16v2/kb2040/keyboard.json b/keyboards/1upkeyboards/sweet16v2/kb2040/keyboard.json deleted file mode 100644 index 40a0ec4039..0000000000 --- a/keyboards/1upkeyboards/sweet16v2/kb2040/keyboard.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "manufacturer": "1upkeyboards", - "keyboard_name": "sweet16v2", - "url": "1upkeyboards.com/shop/keyboard-kits/macro-pads/sweet-16-v2-macropad-kit/", - "maintainer": "ziptyze", - "processor": "RP2040", - "bootloader": "rp2040", - "board": "GENERIC_RP_RP2040", - "usb": { - "device_version": "1.0.0", - "pid": "0x5518", - "vid": "0x6F75" - }, - "features": { - "bootmagic": true, - "encoder": true, - "extrakey": true, - "mousekey": true, - "nkro": false, - "rgb_matrix": true - }, - "qmk": { - "locking": { - "enabled": true, - "resync": true - } - }, - "ws2812": { - "pin": "GP6", - "driver": "vendor" - }, - "matrix_pins": { - "cols": ["GP2", "GP9", "GP8", "GP7"], - "rows": ["GP26", "GP1", "GP18", "GP5"] - }, - "diode_direction": "COL2ROW", - "dynamic_keymap": { - "layer_count": 10 - }, - "encoder": { - "enabled": true, - "rotary": [ - {"pin_a": "GP27", "pin_b": "GP28"}, - {"pin_a": "GP4", "pin_b": "GP3"} - ] - }, - "rgb_matrix": { - "animmations": { - "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, - "rainbow_moving_chevron": true, - "cycle_out_in": true, - "cycle_out_in_dual": 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_rain": true, - "pixel_flow": true, - "pixel_fractal": 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 - }, - "driver": "ws2812", - "layout": [ - {"flags": 4, "matrix": [0, 0], "x": 28, "y": 12}, - {"flags": 4, "matrix": [0, 1], "x": 84, "y": 12}, - {"flags": 4, "matrix": [0, 2], "x": 140, "y": 12}, - {"flags": 4, "matrix": [0, 3], "x": 196, "y": 12}, - {"flags": 2, "x": 196, "y": 17}, - {"flags": 4, "matrix": [1, 3], "x": 196, "y": 28}, - {"flags": 4, "matrix": [1, 2], "x": 140, "y": 28}, - {"flags": 4, "matrix": [1, 1], "x": 84, "y": 28}, - {"flags": 2, "x": 28, "y": 17}, - {"flags": 4, "matrix": [1, 0], "x": 28, "y": 28}, - {"flags": 4, "matrix": [2, 0], "x": 28, "y": 44}, - {"flags": 4, "matrix": [2, 1], "x": 84, "y": 44}, - {"flags": 4, "matrix": [2, 2], "x": 140, "y": 44}, - {"flags": 4, "matrix": [2, 3], "x": 196, "y": 44}, - {"flags": 2, "x": 196, "y": 47}, - {"flags": 4, "matrix": [3, 3], "x": 196, "y": 60}, - {"flags": 4, "matrix": [3, 2], "x": 140, "y": 60}, - {"flags": 4, "matrix": [3, 1], "x": 84, "y": 60}, - {"flags": 2, "x": 28, "y": 47}, - {"flags": 4, "matrix": [3, 0], "x": 28, "y": 60} - ], - "sleep": true - }, - "community_layouts": [ - "ortho_4x4" - ], - "layouts": { - "LAYOUT_ortho_4x4": { - "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/1upkeyboards/sweet16v2/pro_micro/keyboard.json b/keyboards/1upkeyboards/sweet16v2/keyboard.json similarity index 97% rename from keyboards/1upkeyboards/sweet16v2/pro_micro/keyboard.json rename to keyboards/1upkeyboards/sweet16v2/keyboard.json index d8ff291e69..b84a43ff40 100644 --- a/keyboards/1upkeyboards/sweet16v2/pro_micro/keyboard.json +++ b/keyboards/1upkeyboards/sweet16v2/keyboard.json @@ -3,8 +3,7 @@ "keyboard_name": "sweet16v2", "url": "1upkeyboards.com/shop/keyboard-kits/macro-pads/sweet-16-v2-macropad-kit/", "maintainer": "ziptyze", - "bootloader": "atmel-dfu", - "processor": "atmega32u4", + "development_board": "elite_c", "usb": { "device_version": "1.0.0", "pid": "0x5518", @@ -15,7 +14,6 @@ "encoder": true, "extrakey": true, "mousekey": true, - "nkro": false, "rgb_matrix": true }, "qmk": { @@ -36,7 +34,6 @@ "layer_count": 10 }, "encoder": { - "enabled": true, "rotary": [ {"pin_a": "F6", "pin_b": "F5"}, {"pin_a": "D4", "pin_b": "D0"} diff --git a/keyboards/1upkeyboards/sweet16v2/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16v2/keymaps/default/keymap.c deleted file mode 100644 index 6ccf21e18f..0000000000 --- a/keyboards/1upkeyboards/sweet16v2/keymaps/default/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2022 ziptyze - * - * 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_ortho_4x4( - KC_P7, KC_P8, KC_P9, KC_PMNS, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, KC_PSLS, - MO(1), KC_P0, KC_PDOT, KC_PENT - ), - - [1] = LAYOUT_ortho_4x4( - RM_TOGG, RM_HUEU, RM_SATU, RM_VALU, - RM_NEXT, RM_HUED, RM_SATD, RM_VALD, - RM_SPDD, RM_SPDU, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT - ) -}; - - -#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(RM_VALD, RM_VALU) }, - [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } -}; -#endif \ No newline at end of file diff --git a/keyboards/1upkeyboards/sweet16v2/keymaps/default/keymap.json b/keyboards/1upkeyboards/sweet16v2/keymaps/default/keymap.json new file mode 100644 index 0000000000..fd2a0dc766 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16v2/keymaps/default/keymap.json @@ -0,0 +1,28 @@ +{ + "keyboard": "1upkeyboards/sweet16v2", + "keymap": "default", + "coonfig": { + "features": { + "encoder_map": true + } + }, + "layout": "LAYOUT_ortho_4x4", + "layers": [ + [ + "KC_P7", "KC_P8", "KC_P8", "KC_PMNS", + "KC_P4", "KC_P5", "KC_P6", "KC_PPLS", + "KC_P1", "KC_P2", "KC_P3", "KC_PSLS", + "MO(1)", "KC_P0", "KC_PDOT", "KC_PENT" + ], + [ + "RM_TOGG", "RM_HUEU", "RM_SATU", "RM_VALU", + "RM_NEXT", "RM_HUED", "RM_SATD", "RM_VALD", + "RM_SPDD", "RM_SPDU", "_______", "_______", + "_______", "_______", "_______", "QK_BOOT" + ] + ], + "encoders": [ + [{"ccw": "KC_VOLD", "cw": "KC_VOLU"}, {"ccw": "RM_VALD", "cw": "RM_VALU"}], + [{"ccw": "_______", "cw": "_______"}, {"ccw": "_______", "cw": "_______"}] + ] +} diff --git a/keyboards/1upkeyboards/sweet16v2/readme.md b/keyboards/1upkeyboards/sweet16v2/readme.md index e3f5859f96..eacaf0d0ce 100644 --- a/keyboards/1upkeyboards/sweet16v2/readme.md +++ b/keyboards/1upkeyboards/sweet16v2/readme.md @@ -1,26 +1,18 @@ # sweet16v2 -A 4x4 macropad with RGB inswitch lighting and underglow. +A 4x4 macropad with per-key RGB lighting and underglow. * Keyboard Maintainer: [ziptyze](https://github.com/ziptyze) * Hardware Supported: 1upkeyboards Sweet 16 v2 * Hardware Availability: [1upkeyboards](https://1upkeyboards.com/) -Make example for this keyboard using an atmel-based controller (after setting up your build environment): +Make example for this keyboard (after setting up your build environment): - make 1upkeyboards/sweet16v2/promicro:default + make 1upkeyboards/sweet16v2:default -Flashing example for this keyboard using an atmel-based controller: +Flashing example for this keyboard: - make 1upkeyboards/sweet16v2/promicro:default:flash - -Make example for this keyboard using an rp2040-based controller (after setting up your build environment): - - make 1upkeyboards/sweet16v2/kb2040:default - -Flashing example for this keyboard using an rp2040-based controller: - - make 1upkeyboards/sweet16v2/kb2040:default:flash + make 1upkeyboards/sweet16v2: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). @@ -30,10 +22,10 @@ Enter the bootloader in 3 ways for atmel-based controllers: * **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 `RESET` if it is available +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available Enter the bootloader in 2 ways for rp2040-based controllers: * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Bootsel button**: Hold the bootsel button on controller and plug in the keyboard \ No newline at end of file +* **Bootsel button**: Hold the bootsel button on controller and plug in the keyboard From 286947b6faa3b3afd7862c52e52542c8a6ab3f20 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Wed, 10 Sep 2025 17:33:12 -0600 Subject: [PATCH 32/95] Refactor `0xcb/splaytoraid` (#25609) --- data/mappings/keyboard_aliases.hjson | 7 +- keyboards/0xcb/splaytoraid/32u4/keyboard.json | 27 ----- .../splaytoraid/{info.json => keyboard.json} | 105 ++++++++++++------ .../0xcb/splaytoraid/keymaps/default/keymap.c | 49 -------- .../splaytoraid/keymaps/default/keymap.json | 21 ++++ .../0xcb/splaytoraid/keymaps/default/rules.mk | 1 - keyboards/0xcb/splaytoraid/readme.md | 9 +- .../0xcb/splaytoraid/rp2040_ce/keyboard.json | 44 -------- .../0xcb/splaytoraid/rp2040_ce/readme.md | 3 - 9 files changed, 99 insertions(+), 167 deletions(-) delete mode 100644 keyboards/0xcb/splaytoraid/32u4/keyboard.json rename keyboards/0xcb/splaytoraid/{info.json => keyboard.json} (72%) delete mode 100644 keyboards/0xcb/splaytoraid/keymaps/default/keymap.c create mode 100644 keyboards/0xcb/splaytoraid/keymaps/default/keymap.json delete mode 100644 keyboards/0xcb/splaytoraid/keymaps/default/rules.mk delete mode 100644 keyboards/0xcb/splaytoraid/rp2040_ce/keyboard.json delete mode 100644 keyboards/0xcb/splaytoraid/rp2040_ce/readme.md diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index babbf38940..4f63c5f15f 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -1620,8 +1620,11 @@ "0_sixty": { "target": "0_sixty/base" }, - "0xcb/splaytoraid": { - "target": "0xcb/splaytoraid/rp2040_ce" + "0xcb/splaytoraid/32u4": { + "target": "0xcb/splaytoraid" + }, + "0xcb/splaytoraid/rp2040_ce": { + "target": "0xcb/splaytoraid" }, "1upkeyboards/pi40": { "target": "1upkeyboards/pi40/mit_v1_0" diff --git a/keyboards/0xcb/splaytoraid/32u4/keyboard.json b/keyboards/0xcb/splaytoraid/32u4/keyboard.json deleted file mode 100644 index 7c3f0590a6..0000000000 --- a/keyboards/0xcb/splaytoraid/32u4/keyboard.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "development_board": "promicro", - "bootloader": "qmk-dfu", - "matrix_pins": { - "cols": ["F5", "F6", "F7", "F4", "B3", "B1", "B2"], - "rows": ["D3", "D2", "D1", "D4", "D7", "E6", "B4", "C6"] - }, - "diode_direction": "COL2ROW", - "rgb_matrix": { - "animations": { - "band_sat": true, - "band_spiral_val": true, - "breathing": true, - "cycle_all": true, - "cycle_left_right": true, - "raindrops": true - } - }, - "encoder": { - "rotary": [ - {"pin_a": "B5", "pin_b": "B6"} - ] - }, - "ws2812": { - "pin": "D0" - } -} diff --git a/keyboards/0xcb/splaytoraid/info.json b/keyboards/0xcb/splaytoraid/keyboard.json similarity index 72% rename from keyboards/0xcb/splaytoraid/info.json rename to keyboards/0xcb/splaytoraid/keyboard.json index 8c32b0dc11..457cc7a23a 100644 --- a/keyboards/0xcb/splaytoraid/info.json +++ b/keyboards/0xcb/splaytoraid/keyboard.json @@ -2,28 +2,58 @@ "manufacturer": "Freya", "keyboard_name": "splaytoraid", "maintainer": "freya-irl", - "url": "https://github.com/freya-irl/splaytoraid40", - "usb": { - "device_version": "1.0.0", - "pid": "0xCB00", - "vid": "0x2004" - }, - "features": { - "extrakey": true, - "rgb_matrix": true, - "bootmagic": true, - "console": true, - "mousekey": true, - "nkro": true, - "encoder": true - }, + "bootloader": "qmk-dfu", "bootmagic": { "matrix": [1, 0] }, "build": { "lto": true }, + "development_board": "promicro", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B6"} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["F5", "F6", "F7", "F4", "B3", "B1", "B2"], + "rows": ["D3", "D2", "D1", "D4", "D7", "E6", "B4", "C6"] + }, "rgb_matrix": { + "animations": { + "band_sat": true, + "band_spiral_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "hue_breathing": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_moving_chevron": true, + "raindrops": true, + "solid_reactive": true, + "solid_reactive_simple": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true + }, "default": { "animation": "breathing", "hue": 152, @@ -32,27 +62,36 @@ }, "driver": "ws2812", "layout": [ - {"flags": 4, "matrix": [0, 2], "x": 0, "y": 0}, - {"flags": 4, "matrix": [1, 0], "x": 20, "y": 0}, - {"flags": 4, "matrix": [7, 0], "x": 61, "y": 0}, - {"flags": 4, "matrix": [7, 1], "x": 163, "y": 0}, - {"flags": 4, "matrix": [5, 0], "x": 203, "y": 0}, - {"flags": 4, "matrix": [4, 2], "x": 224, "y": 0}, - {"flags": 4, "matrix": [6, 2], "x": 0, "y": 21}, - {"flags": 4, "matrix": [6, 1], "x": 224, "y": 21}, - {"flags": 4, "matrix": [3, 3], "x": 20, "y": 43}, - {"flags": 4, "matrix": [7, 3], "x": 61, "y": 43}, - {"flags": 4, "matrix": [6, 4], "x": 163, "y": 43}, - {"flags": 4, "matrix": [6, 3], "x": 203, "y": 43}, - {"flags": 4, "matrix": [4, 3], "x": 61, "y": 64}, - {"flags": 4, "matrix": [5, 5], "x": 81, "y": 64}, - {"flags": 4, "matrix": [7, 4], "x": 101, "y": 64}, - {"flags": 4, "matrix": [7, 5], "x": 122, "y": 64}, - {"flags": 4, "matrix": [1, 5], "x": 142, "y": 64}, - {"flags": 4, "matrix": [0, 3], "x": 163, "y": 64} + {"matrix": [0, 2], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 20, "y": 0, "flags": 4}, + {"matrix": [7, 0], "x": 61, "y": 0, "flags": 4}, + {"matrix": [7, 1], "x": 163, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 203, "y": 0, "flags": 4}, + {"matrix": [4, 2], "x": 224, "y": 0, "flags": 4}, + {"matrix": [6, 2], "x": 0, "y": 21, "flags": 4}, + {"matrix": [6, 1], "x": 224, "y": 21, "flags": 4}, + {"matrix": [3, 3], "x": 20, "y": 43, "flags": 4}, + {"matrix": [7, 3], "x": 61, "y": 43, "flags": 4}, + {"matrix": [6, 4], "x": 163, "y": 43, "flags": 4}, + {"matrix": [6, 3], "x": 203, "y": 43, "flags": 4}, + {"matrix": [4, 3], "x": 61, "y": 64, "flags": 4}, + {"matrix": [5, 5], "x": 81, "y": 64, "flags": 4}, + {"matrix": [7, 4], "x": 101, "y": 64, "flags": 4}, + {"matrix": [7, 5], "x": 122, "y": 64, "flags": 4}, + {"matrix": [1, 5], "x": 142, "y": 64, "flags": 4}, + {"matrix": [0, 3], "x": 163, "y": 64, "flags": 4} ], "max_brightness": 200 }, + "url": "https://github.com/freya-irl/splaytoraid40", + "usb": { + "device_version": "1.0.0", + "pid": "0xCB00", + "vid": "0x2004" + }, + "ws2812": { + "pin": "D0" + }, "layouts": { "LAYOUT_36": { "layout": [ diff --git a/keyboards/0xcb/splaytoraid/keymaps/default/keymap.c b/keyboards/0xcb/splaytoraid/keymaps/default/keymap.c deleted file mode 100644 index 6a82f2ca74..0000000000 --- a/keyboards/0xcb/splaytoraid/keymaps/default/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2023 Conor Burns (@Conor-Burns) -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include QMK_KEYBOARD_H - -enum layer_names { - _BASE, - _LOWER, - _RAISE, - _ADJUST -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_40( - 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - KC_LSFT, KC_ESC, KC_ENT, KC_MPLY, KC_SPC, KC_DEL, KC_RSFT - ), - - [_LOWER] = LAYOUT_40( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______ - ), - - [_RAISE] = LAYOUT_40( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______ - ), - - [_ADJUST] = LAYOUT_40( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______ - ) -}; - - -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_LOWER] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT) }, - [_RAISE] = { ENCODER_CCW_CW(UG_VALD, UG_VALU) }, - [_ADJUST] = { ENCODER_CCW_CW(KC_RGHT, KC_LEFT) } -}; diff --git a/keyboards/0xcb/splaytoraid/keymaps/default/keymap.json b/keyboards/0xcb/splaytoraid/keymaps/default/keymap.json new file mode 100644 index 0000000000..42bcaf28a1 --- /dev/null +++ b/keyboards/0xcb/splaytoraid/keymaps/default/keymap.json @@ -0,0 +1,21 @@ +{ + "keyboard": "0xcb/splaytoraid", + "keymap": "default", + "config": { + "features": { + "encoder_map": true + } + }, + "layout": "LAYOUT_40", + "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_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", + "KC_LSFT", "KC_ESC", "KC_ENT", "KC_MPLY", "KC_SPC", "KC_DEL", "KC_RSFT" + ] + ], + "encoders": [ + [{"ccw": "KC_VOLD", "cw": "KC_VOLU"}] + ] +} diff --git a/keyboards/0xcb/splaytoraid/keymaps/default/rules.mk b/keyboards/0xcb/splaytoraid/keymaps/default/rules.mk deleted file mode 100644 index ee32568148..0000000000 --- a/keyboards/0xcb/splaytoraid/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -ENCODER_MAP_ENABLE = yes diff --git a/keyboards/0xcb/splaytoraid/readme.md b/keyboards/0xcb/splaytoraid/readme.md index ab53696c95..4fe04c8abd 100644 --- a/keyboards/0xcb/splaytoraid/readme.md +++ b/keyboards/0xcb/splaytoraid/readme.md @@ -11,13 +11,10 @@ A 40% ergonomic keyboard with a stacked acrylic case and RGB underglow. Make example for this keyboard (after setting up your build environment): make 0xcb/splaytoraid:default - make 0xcb/splaytoraid/32u4:default Flashing example for this keyboard: make 0xcb/splaytoraid:default:flash - make 0xcb/splaytoraid/32u4: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). @@ -29,8 +26,4 @@ Enter the bootloader in 3 ways: * **Physical reset button**: Press the button on the controller (Helios) for more than 500ms or just press it (Pluto) * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available -Please note that the default bootloader for the `32u4` version is QMK DFU, for compatibility with [0xCB Pluto](https://github.com/0xCB-dev/0xCB-Pluto). Generic Pro Micros often use a different bootloader, such as `caterina`. - -If the incorrect bootloader is specified, bootmagic reset and the `QK_BOOT` keycode will not work. - -To avoid this problem, set the correct bootloader in your custom keymap's `rules.mk` file before compiling, or flash using an appropriate target (ex: `make 0xcb/splaytoraid/32u4:default:avrdude`). See [flashing instructions and bootloader information](https://docs.qmk.fm/#/flashing) for more details. +When using an AVR microcontroller with this keyboard, the bootloader is configured to be QMK DFU for compatibility with [0xCB Pluto](https://github.com/0xCB-dev/0xCB-Pluto). If your microcontroller does not use this bootloader, ensure to set this parameter appropriately in your keymap's `rules.mk` file. diff --git a/keyboards/0xcb/splaytoraid/rp2040_ce/keyboard.json b/keyboards/0xcb/splaytoraid/rp2040_ce/keyboard.json deleted file mode 100644 index b5a4f95c69..0000000000 --- a/keyboards/0xcb/splaytoraid/rp2040_ce/keyboard.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "development_board": "promicro_rp2040", - "matrix_pins": { - "cols": ["GP28", "GP27", "GP26", "GP29", "GP20", "GP22", "GP23"], - "rows": ["GP0", "GP1", "GP2", "GP4", "GP6", "GP7", "GP8", "GP5"] - }, - "diode_direction": "COL2ROW", - "rgb_matrix": { - "animations": { - "band_sat": true, - "band_spiral_val": true, - "breathing": true, - "cycle_all": true, - "cycle_left_right": true, - "cycle_out_in": true, - "cycle_out_in_dual": true, - "cycle_pinwheel": true, - "cycle_up_down": true, - "digital_rain": true, - "dual_beacon": true, - "hue_breathing": true, - "jellybean_raindrops": true, - "multisplash": true, - "pixel_fractal": true, - "pixel_rain": true, - "rainbow_moving_chevron": true, - "raindrops": true, - "solid_reactive": true, - "solid_reactive_simple": true, - "solid_splash": true, - "splash": true, - "typing_heatmap": true - } - }, - "encoder": { - "rotary": [ - {"pin_a": "GP9", "pin_b": "GP21"} - ] - }, - "ws2812": { - "pin": "GP3", - "driver": "vendor" - } -} diff --git a/keyboards/0xcb/splaytoraid/rp2040_ce/readme.md b/keyboards/0xcb/splaytoraid/rp2040_ce/readme.md deleted file mode 100644 index f6ff200ac3..0000000000 --- a/keyboards/0xcb/splaytoraid/rp2040_ce/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# rp2040_ce - -This folder is set as default in the parent rules.mk - it will build firmware compatible with the RP2040 Community Edition. See [here](https://docs.qmk.fm/#/platformdev_rp2040?id=rp2040_ce) for a list. From a4d10e9f64da253ffea326ce4dc9fe2c06298f71 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Wed, 10 Sep 2025 17:33:38 -0600 Subject: [PATCH 33/95] Refactor `40percentclub/gherkin` (#25608) --- data/mappings/keyboard_aliases.hjson | 6 ++ keyboards/40percentclub/gherkin/info.json | 62 ---------------- .../gherkin/kb2040/keyboard.json | 12 --- .../40percentclub/gherkin/kb2040/readme.md | 22 ------ keyboards/40percentclub/gherkin/keyboard.json | 74 +++++++++++++++++++ .../gherkin/keymaps/default/keymap.c | 52 ------------- .../gherkin/keymaps/default/keymap.json | 37 ++++++++++ .../gherkin/pro_micro/keyboard.json | 16 ---- keyboards/40percentclub/gherkin/readme.md | 22 ++++-- 9 files changed, 131 insertions(+), 172 deletions(-) delete mode 100644 keyboards/40percentclub/gherkin/info.json delete mode 100644 keyboards/40percentclub/gherkin/kb2040/keyboard.json delete mode 100644 keyboards/40percentclub/gherkin/kb2040/readme.md create mode 100644 keyboards/40percentclub/gherkin/keyboard.json delete mode 100644 keyboards/40percentclub/gherkin/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/default/keymap.json delete mode 100644 keyboards/40percentclub/gherkin/pro_micro/keyboard.json diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index 4f63c5f15f..c958cecbc9 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -1647,6 +1647,12 @@ "25keys/zinc": { "target": "25keys/zinc/rev1" }, + "40percentclub/gherkin/kb2040": { + "target": "40percentclub/gherkin" + }, + "40percentclub/gherkin/pro_micro": { + "target": "40percentclub/gherkin" + }, "40percentclub/i75": { "target": "40percentclub/i75/promicro" }, diff --git a/keyboards/40percentclub/gherkin/info.json b/keyboards/40percentclub/gherkin/info.json deleted file mode 100644 index 644001bc05..0000000000 --- a/keyboards/40percentclub/gherkin/info.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "keyboard_name": "Gherkin", - "manufacturer": "40 Percent Club", - "maintainer": "qmk", - "usb": { - "vid": "0x4025", - "pid": "0x6060", - "device_version": "0.0.1" - }, - "features": { - "bootmagic": true, - "mousekey": true, - "extrakey": true, - "nkro": true, - "backlight": true - }, - "qmk": { - "locking": { - "enabled": true, - "resync": true - } - }, - "community_layouts": ["ortho_3x10"], - "layouts": { - "LAYOUT_ortho_3x10": { - "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": [1, 0], "x": 6, "y": 0}, - {"matrix": [1, 1], "x": 7, "y": 0}, - {"matrix": [1, 2], "x": 8, "y": 0}, - {"matrix": [1, 3], "x": 9, "y": 0}, - - {"matrix": [1, 4], "x": 0, "y": 1}, - {"matrix": [1, 5], "x": 1, "y": 1}, - {"matrix": [2, 0], "x": 2, "y": 1}, - {"matrix": [2, 1], "x": 3, "y": 1}, - {"matrix": [2, 2], "x": 4, "y": 1}, - {"matrix": [2, 3], "x": 5, "y": 1}, - {"matrix": [2, 4], "x": 6, "y": 1}, - {"matrix": [2, 5], "x": 7, "y": 1}, - {"matrix": [3, 0], "x": 8, "y": 1}, - {"matrix": [3, 1], "x": 9, "y": 1}, - - {"matrix": [3, 2], "x": 0, "y": 2}, - {"matrix": [3, 3], "x": 1, "y": 2}, - {"matrix": [3, 4], "x": 2, "y": 2}, - {"matrix": [3, 5], "x": 3, "y": 2}, - {"matrix": [4, 0], "x": 4, "y": 2}, - {"matrix": [4, 1], "x": 5, "y": 2}, - {"matrix": [4, 2], "x": 6, "y": 2}, - {"matrix": [4, 3], "x": 7, "y": 2}, - {"matrix": [4, 4], "x": 8, "y": 2}, - {"matrix": [4, 5], "x": 9, "y": 2} - ] - } - } -} diff --git a/keyboards/40percentclub/gherkin/kb2040/keyboard.json b/keyboards/40percentclub/gherkin/kb2040/keyboard.json deleted file mode 100644 index 431ac371ee..0000000000 --- a/keyboards/40percentclub/gherkin/kb2040/keyboard.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "development_board": "kb2040", - "matrix_pins": { - "cols": ["GP8", "GP7", "GP6", "GP5", "GP4", "GP3"], - "rows": ["GP26", "GP18", "GP20", "GP19", "GP10"] - }, - "diode_direction": "COL2ROW", - "backlight": { - "pin": "GP9", - "driver": "software" - } -} diff --git a/keyboards/40percentclub/gherkin/kb2040/readme.md b/keyboards/40percentclub/gherkin/kb2040/readme.md deleted file mode 100644 index 1fc9e8b18e..0000000000 --- a/keyboards/40percentclub/gherkin/kb2040/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# Gherkin - -![Gherkin](https://i.imgur.com/XrqqtTq.jpg) -![KB2040](https://cdn-shop.adafruit.com/640x480/5302-12.jpg) - -=== - -A 30 key keyboard with Adafruit's KB2040 as microcontroller. - -* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin) - -Keyboard Maintainer: QMK Community -Hardware Supported: Gherkin PCB & Adafruit KB2040 -Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) and [Adafruit KB2040](https://www.adafruit.com/product/5302) - -Make example for this keyboard (after setting up your build environment): - - make 40percentclub/gherkin/kb2040: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). - -Use the KB2040 microcontroller as a drop-in replacement for the Pro Micro in this cute 30% keyboard. diff --git a/keyboards/40percentclub/gherkin/keyboard.json b/keyboards/40percentclub/gherkin/keyboard.json new file mode 100644 index 0000000000..1416997b47 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keyboard.json @@ -0,0 +1,74 @@ +{ + "manufacturer": "40 Percent Club", + "keyboard_name": "Gherkin", + "maintainer": "qmk", + "backlight": { + "pin": "B5" + }, + "development_board": "promicro", + "diode_direction": "COL2ROW", + "features": { + "backlight": true, + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "indicators": { + "caps_lock": "B0", + "num_lock": "D5", + "on_state": 0 + }, + "matrix_pins": { + "cols": ["B4", "E6", "D7", "C6", "D4", "D0"], + "rows": ["F7", "B1", "B3", "B2", "B6"] + }, + "qmk": { + "locking": { + "enabled": true, + "resync": true + } + }, + "usb": { + "device_version": "0.0.1", + "pid": "0x6060", + "vid": "0x4025" + }, + "community_layouts": ["ortho_3x10"], + "layouts": { + "LAYOUT_ortho_3x10": { + "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": [1, 0], "x": 6, "y": 0}, + {"matrix": [1, 1], "x": 7, "y": 0}, + {"matrix": [1, 2], "x": 8, "y": 0}, + {"matrix": [1, 3], "x": 9, "y": 0}, + {"matrix": [1, 4], "x": 0, "y": 1}, + {"matrix": [1, 5], "x": 1, "y": 1}, + {"matrix": [2, 0], "x": 2, "y": 1}, + {"matrix": [2, 1], "x": 3, "y": 1}, + {"matrix": [2, 2], "x": 4, "y": 1}, + {"matrix": [2, 3], "x": 5, "y": 1}, + {"matrix": [2, 4], "x": 6, "y": 1}, + {"matrix": [2, 5], "x": 7, "y": 1}, + {"matrix": [3, 0], "x": 8, "y": 1}, + {"matrix": [3, 1], "x": 9, "y": 1}, + {"matrix": [3, 2], "x": 0, "y": 2}, + {"matrix": [3, 3], "x": 1, "y": 2}, + {"matrix": [3, 4], "x": 2, "y": 2}, + {"matrix": [3, 5], "x": 3, "y": 2}, + {"matrix": [4, 0], "x": 4, "y": 2}, + {"matrix": [4, 1], "x": 5, "y": 2}, + {"matrix": [4, 2], "x": 6, "y": 2}, + {"matrix": [4, 3], "x": 7, "y": 2}, + {"matrix": [4, 4], "x": 8, "y": 2}, + {"matrix": [4, 5], "x": 9, "y": 2} + ] + } + } +} diff --git a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c deleted file mode 100644 index 8c28b68afa..0000000000 --- a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c +++ /dev/null @@ -1,52 +0,0 @@ -#include QMK_KEYBOARD_H - -#define FN1_SPC LT(1, KC_SPC) -#define FN2_BSPC LT(2, KC_BSPC) -#define FN3_C LT(3, KC_C) -#define FN4_V LT(4, KC_V) -#define FN5_B LT(5, KC_B) -#define CTL_Z CTL_T(KC_Z) -#define ALT_X ALT_T(KC_X) -#define ALT_N ALGR_T(KC_N) -#define CTL_M RCTL_T(KC_M) -#define SFT_ENT RSFT_T(KC_ENT) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_ortho_3x10( - 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_ESC, - CTL_Z, ALT_X, FN3_C, FN4_V, FN2_BSPC,FN1_SPC, FN5_B, ALT_N, CTL_M, SFT_ENT - ), - - [1] = LAYOUT_ortho_3x10( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, - _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ - ), - - [2] = LAYOUT_ortho_3x10( - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, - KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_GRV, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [3] = LAYOUT_ortho_3x10( - _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - KC_TAB, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_SCLN, KC_QUOT, - _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - ), - - [4] = LAYOUT_ortho_3x10( - _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - KC_TAB, _______, _______, _______, _______, KC_LABK, KC_RABK, KC_QUES, KC_COLN, KC_DQUO, - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END - ), - - [5] = LAYOUT_ortho_3x10( - KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, - _______, _______, _______, _______, _______, _______, _______, _______, BL_DOWN, BL_UP, - _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______ - ) - -}; diff --git a/keyboards/40percentclub/gherkin/keymaps/default/keymap.json b/keyboards/40percentclub/gherkin/keymaps/default/keymap.json new file mode 100644 index 0000000000..e81a6fd8f5 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/default/keymap.json @@ -0,0 +1,37 @@ +{ + "keyboard": "40percentclub/gherkin", + "keymap": "default", + "layout": "LAYOUT_ortho_3x10", + "layers": [ + [ + "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_ESC", + "CTL_T(KC_Z)", "ALT_T(KC_X)", "LT(3, KC_C)", "LT(4, KC_V)", "LT(2, KC_BSPC)", "LT(1, KC_SPC)", "LT(5, KC_B)", "ALGR_T(KC_N)", "RCTL_T(KC_M)", "RSFT_T(KC_ENT)" + ], + [ + "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", + "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", + "_______", "_______", "_______", "_______", "KC_DEL", "_______", "_______", "_______", "_______", "_______" + ], + [ + "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", + "KC_F11", "KC_F12", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "KC_GRV", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "_______", "_______", "_______", "_______", "_______", "KC_MINS", "KC_EQL", "KC_LBRC", "KC_RBRC", "KC_BSLS", + "KC_TAB", "_______", "_______", "_______", "_______", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_SCLN", "KC_QUOT", + "_______", "_______", "_______", "_______", "_______", "_______", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT" + ], + [ + "_______", "_______", "_______", "_______", "_______", "KC_UNDS", "KC_PLUS", "KC_LCBR", "KC_RCBR", "KC_PIPE", + "KC_TAB", "_______", "_______", "_______", "_______", "KC_LABK", "KC_RABK", "KC_QUES", "KC_COLN", "KC_DQUO", + "_______", "_______", "_______", "_______", "_______", "_______", "KC_HOME", "KC_PGDN", "KC_PGUP", "KC_END" + ], + [ + "KC_CALC", "KC_WHOM", "KC_MAIL", "KC_MYCM", "_______", "_______", "_______", "_______", "_______", "KC_PSCR", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "BL_DOWN", "BL_UP", + "_______", "_______", "_______", "_______", "QK_BOOT", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/40percentclub/gherkin/pro_micro/keyboard.json b/keyboards/40percentclub/gherkin/pro_micro/keyboard.json deleted file mode 100644 index 882ea8f72b..0000000000 --- a/keyboards/40percentclub/gherkin/pro_micro/keyboard.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "development_board": "promicro", - "matrix_pins": { - "cols": ["B4", "E6", "D7", "C6", "D4", "D0"], - "rows": ["F7", "B1", "B3", "B2", "B6"] - }, - "diode_direction": "COL2ROW", - "indicators": { - "num_lock": "D5", - "caps_lock": "B0", - "on_state": 0 - }, - "backlight": { - "pin": "B5" - } -} diff --git a/keyboards/40percentclub/gherkin/readme.md b/keyboards/40percentclub/gherkin/readme.md index 7404f19819..5ce4d173ca 100644 --- a/keyboards/40percentclub/gherkin/readme.md +++ b/keyboards/40percentclub/gherkin/readme.md @@ -1,21 +1,27 @@ # Gherkin ![Gherkin](https://i.imgur.com/XrqqtTq.jpg) -=== A 30 key keyboard. -* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin) - -Keyboard Maintainer: QMK Community -Hardware Supported: Gherkin PCB -Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) +* Keyboard Maintainer: QMK Community +* Hardware Supported: Gherkin PCB w/ Pro Micro compatible development board +* Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) Make example for this keyboard (after setting up your build environment): make 40percentclub/gherkin:default +Flashing example for this keyboard: + + make 40percentclub/gherkin: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). -First pass at adding support for the gherkin keyboard. Compiles but completely -untested. Intended to kick-start development. +## 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**: Short the Ground and Reset pins on the microcontroller +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available From f8d677af88eb5bcfc061ef1c3ec1d4cf0d8c3d57 Mon Sep 17 00:00:00 2001 From: "Christian C. Berclaz" Date: Thu, 11 Sep 2025 10:19:10 +0200 Subject: [PATCH 34/95] Add D60B tsangan pcb (#25245) Co-authored-by: Joel Challis Co-authored-by: Drashna Jaelre --- keyboards/kbdfans/d60b/keyboard.json | 215 ++++++++++++++++++ .../kbdfans/d60b/keymaps/default/keymap.c | 37 +++ keyboards/kbdfans/d60b/readme.md | 26 +++ 3 files changed, 278 insertions(+) create mode 100644 keyboards/kbdfans/d60b/keyboard.json create mode 100644 keyboards/kbdfans/d60b/keymaps/default/keymap.c create mode 100644 keyboards/kbdfans/d60b/readme.md diff --git a/keyboards/kbdfans/d60b/keyboard.json b/keyboards/kbdfans/d60b/keyboard.json new file mode 100644 index 0000000000..817cc6f504 --- /dev/null +++ b/keyboards/kbdfans/d60b/keyboard.json @@ -0,0 +1,215 @@ +{ + "manufacturer": "KBDfans", + "keyboard_name": "D60B", + "maintainer": "chrisgve", + "bootloader": "atmel-dfu", + "community_layouts": ["60_ansi_tsangan_split_bs_rshift"], + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["F0", "F1", "F5", "F4", "E6", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"], + "rows": ["C7", "C6", "B6", "B5", "F6"] + }, + "processor": "atmega32u4", + "qmk": { + "locking": { + "enabled": true + } + }, + "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 + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 7], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 176, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4} + ], + "max_brightness": 200, + "sleep": true + }, + "usb": { + "device_version": "0.0.1", + "pid": "0x1600", + "vid": "0xCA04" + }, + "ws2812": { + "pin": "F7" + }, + "layouts": { + "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, 2], "x": 1.5, "y": 1}, + {"matrix": [1, 3], "x": 2.5, "y": 1}, + {"matrix": [1, 4], "x": 3.5, "y": 1}, + {"matrix": [1, 5], "x": 4.5, "y": 1}, + {"matrix": [1, 6], "x": 5.5, "y": 1}, + {"matrix": [1, 7], "x": 6.5, "y": 1}, + {"matrix": [1, 8], "x": 7.5, "y": 1}, + {"matrix": [1, 9], "x": 8.5, "y": 1}, + {"matrix": [1, 10], "x": 9.5, "y": 1}, + {"matrix": [1, 11], "x": 10.5, "y": 1}, + {"matrix": [1, 12], "x": 11.5, "y": 1}, + {"matrix": [1, 13], "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, 2], "x": 1.75, "y": 2}, + {"matrix": [2, 3], "x": 2.75, "y": 2}, + {"matrix": [2, 4], "x": 3.75, "y": 2}, + {"matrix": [2, 5], "x": 4.75, "y": 2}, + {"matrix": [2, 6], "x": 5.75, "y": 2}, + {"matrix": [2, 7], "x": 6.75, "y": 2}, + {"matrix": [2, 8], "x": 7.75, "y": 2}, + {"matrix": [2, 9], "x": 8.75, "y": 2}, + {"matrix": [2, 10], "x": 9.75, "y": 2}, + {"matrix": [2, 11], "x": 10.75, "y": 2}, + {"matrix": [2, 12], "x": 11.75, "y": 2}, + {"matrix": [2, 14], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [3, 1], "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, 2], "x": 1.5, "y": 4}, + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.5}, + {"matrix": [4, 7], "x": 4, "y": 4, "w": 7}, + {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5}, + {"matrix": [4, 13], "x": 12.5, "y": 4}, + {"matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5} + ] + } + } +} diff --git a/keyboards/kbdfans/d60b/keymaps/default/keymap.c b/keyboards/kbdfans/d60b/keymaps/default/keymap.c new file mode 100644 index 0000000000..d0a47b0d2f --- /dev/null +++ b/keyboards/kbdfans/d60b/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2025 chrisgve + * + * 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0]=LAYOUT_60_ansi_tsangan_split_bs_rshift( + 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_GRAVE, 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_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [1]=LAYOUT_60_ansi_tsangan_split_bs_rshift( + 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, + RM_TOGG, RM_NEXT, RM_PREV, RM_HUEU, RM_HUED, RM_SATU, RM_SATD, RM_VALU, RM_VALD, RM_SPDU, RM_SPDD, _______, QK_BOOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; +//clang-format on diff --git a/keyboards/kbdfans/d60b/readme.md b/keyboards/kbdfans/d60b/readme.md new file mode 100644 index 0000000000..903a52019f --- /dev/null +++ b/keyboards/kbdfans/d60b/readme.md @@ -0,0 +1,26 @@ +# KBDfans D60B + +Customizable 60% Tsangan Hotswap by PCB by [KBDfans](https://kbdfans.com). +This board has also, at times, been referred to as the Sun60, but the name on the PCB is D60 B. + +- Keyboard Maintainer: [chrisgve](https://github.com/chrisgve) +- Hardware Supported: KBDfans D60B +- Hardware Availability: no longer available for sale + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/d60b:default + +The keyboard uses a DFU bootloader. To make a keymap and use dfu to flash it: + + make kbdfans/d60b: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**: Short the two pads close to the position of the caps lock key +- **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available From 74b0f054c1850baab3a4a66b6296ebe240a6b7ae Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Thu, 11 Sep 2025 11:34:10 -0600 Subject: [PATCH 35/95] Migrate `g_led_config` to DD (YZ) (#25650) --- keyboards/yandrstudio/nz64/keyboard.json | 84 +++++++++++++++++++++ keyboards/yandrstudio/nz64/nz64.c | 34 --------- keyboards/yandrstudio/nz67v2/keyboard.json | 88 ++++++++++++++++++++++ keyboards/yandrstudio/nz67v2/nz67v2.c | 30 -------- keyboards/yandrstudio/tg67/keyboard.json | 71 +++++++++++++++++ keyboards/yandrstudio/tg67/tg67.c | 46 ----------- keyboards/yanghu/unicorne/info.json | 12 ++- keyboards/yanghu/unicorne/unicorne.c | 31 -------- keyboards/ymdk/ymd40/air40/air40.c | 43 ----------- keyboards/ymdk/ymd40/air40/keyboard.json | 53 +++++++++++++ keyboards/yncognito/batpad/batpad.c | 35 --------- keyboards/yncognito/batpad/keyboard.json | 10 +++ keyboards/yushakobo/quick17/keyboard.json | 20 +++++ keyboards/yushakobo/quick17/quick17.c | 37 --------- keyboards/zykrah/fuyu/fuyu.c | 46 ----------- keyboards/zykrah/fuyu/keyboard.json | 43 +++++++++++ 16 files changed, 380 insertions(+), 303 deletions(-) delete mode 100644 keyboards/yandrstudio/tg67/tg67.c delete mode 100644 keyboards/ymdk/ymd40/air40/air40.c delete mode 100644 keyboards/yncognito/batpad/batpad.c delete mode 100644 keyboards/yushakobo/quick17/quick17.c delete mode 100644 keyboards/zykrah/fuyu/fuyu.c diff --git a/keyboards/yandrstudio/nz64/keyboard.json b/keyboards/yandrstudio/nz64/keyboard.json index 8c36b73c1e..e7c879ca36 100644 --- a/keyboards/yandrstudio/nz64/keyboard.json +++ b/keyboards/yandrstudio/nz64/keyboard.json @@ -59,6 +59,90 @@ }, "center_point": [96, 32], "driver": "ws2812", + "layout": [ + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 207, "y": 64, "flags": 4}, + {"matrix": [4, 11], "x": 190, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 172, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 155, "y": 64, "flags": 4}, + {"x": 121, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 86, "y": 64, "flags": 4}, + {"x": 52, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 34, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 17, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 207, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 190, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 172, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 155, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 138, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 121, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 103, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 86, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 17, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [2, 13], "x": 224, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 190, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 155, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 138, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 121, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 103, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 17, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [1, 13], "x": 224, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 207, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 190, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 172, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 155, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 138, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 121, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 103, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 86, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 69, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [0, 13], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 207, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 190, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 172, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 155, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 138, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 121, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 103, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 86, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 69, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 37, "y": 0, "flags": 2}, + {"x": 75, "y": 0, "flags": 2}, + {"x": 112, "y": 0, "flags": 2}, + {"x": 149, "y": 0, "flags": 2}, + {"x": 187, "y": 0, "flags": 2}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 0, "y": 32, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 187, "y": 64, "flags": 2}, + {"x": 149, "y": 64, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 75, "y": 64, "flags": 2}, + {"x": 37, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 224, "y": 32, "flags": 2} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/yandrstudio/nz64/nz64.c b/keyboards/yandrstudio/nz64/nz64.c index 928b0b5114..6bd3e08fbf 100644 --- a/keyboards/yandrstudio/nz64/nz64.c +++ b/keyboards/yandrstudio/nz64/nz64.c @@ -23,40 +23,6 @@ typedef union { } kb_cums_t; kb_cums_t kb_cums; -led_config_t g_led_config = { - { - { 65, 64, 63, 62, 61, 60, 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, NO_LED, 25 }, - { 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11 }, - { 10, 9, 8, NO_LED, NO_LED, 6, NO_LED, NO_LED, NO_LED, 4, 3, 2, 1, 0 } - }, - { - /* LED Index to Physical Position */ - {224,64},{207,64},{190,64},{172,64},{155,64}, {121,64}, {86,64}, {52,64}, {34,64},{17,64},{0,64}, - {224,48},{207,48},{190,48},{172,48},{155,48},{138,48},{121,48},{103,48},{86,48},{69,48},{52,48},{34,48},{17,48},{0,48}, - {224,32},{190,32},{172,32},{155,32},{138,32},{121,32},{103,32},{86,32},{69,32},{52,32},{34,32},{17,32},{0,32}, - {224,16},{207,16},{190,16},{172,16},{155,16},{138,16},{121,16},{103,16},{86,16},{69,16},{52,16},{34,16},{17,16},{0,16}, - {224,0},{207,0},{190,0},{172,0},{155,0},{138,0},{121,0},{103,0},{86,0},{69,0},{52,0},{34,0},{17,0},{0,0}, - {0,0},{37,0},{75,0},{112,0},{149,0},{187,0},{224,0}, - {0,32}, - {224,64},{187,64},{149,64},{112,64},{75,64},{37,64},{0,64}, - {224,32} - }, - { - /* 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,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,4,4,4, - 4,4,4,4,4, 4, - 2,2,2,2,2, 2,2,2,2,2, - 2,2,2,2,2, 2 - } -}; - bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { return false; diff --git a/keyboards/yandrstudio/nz67v2/keyboard.json b/keyboards/yandrstudio/nz67v2/keyboard.json index fc931f3427..56de8d8b87 100644 --- a/keyboards/yandrstudio/nz67v2/keyboard.json +++ b/keyboards/yandrstudio/nz67v2/keyboard.json @@ -65,6 +65,94 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 32, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 7], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 144, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 160, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 208, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"x": 224, "y": 0, "flags": 2}, + {"x": 196, "y": 0, "flags": 2}, + {"x": 168, "y": 0, "flags": 2}, + {"x": 140, "y": 0, "flags": 2}, + {"x": 112, "y": 0, "flags": 2}, + {"x": 84, "y": 0, "flags": 2}, + {"x": 56, "y": 0, "flags": 2}, + {"x": 28, "y": 0, "flags": 2}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 224, "y": 64, "flags": 2}, + {"x": 196, "y": 64, "flags": 2}, + {"x": 168, "y": 64, "flags": 2}, + {"x": 140, "y": 64, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 84, "y": 64, "flags": 2}, + {"x": 56, "y": 64, "flags": 2}, + {"x": 28, "y": 64, "flags": 2} + ], "max_brightness": 180, "sleep": true }, diff --git a/keyboards/yandrstudio/nz67v2/nz67v2.c b/keyboards/yandrstudio/nz67v2/nz67v2.c index c3162dd961..22f3570607 100644 --- a/keyboards/yandrstudio/nz67v2/nz67v2.c +++ b/keyboards/yandrstudio/nz67v2/nz67v2.c @@ -24,36 +24,6 @@ typedef union { } kb_cums_t; kb_cums_t kb_cums; -led_config_t g_led_config = { - { - {54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68}, - {53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39}, - {25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, NO_LED, 37, 38}, - {24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, NO_LED, 13, 12, 11}, - {0, 1, 2, 3, NO_LED, 4, NO_LED, 5, NO_LED, 6, 7, NO_LED, 8, 9, 10} - }, - { - {0,64},{16,64},{32,64},{48,64}, {80,64}, {112,64}, {144,64},{160,64}, {192,64},{208,64},{224,64}, - {224,48},{208,48},{192,48}, {160,48},{144,48},{128,48},{112,48},{96,48},{80,48},{64,48},{48,48},{32,48},{16,48},{0,48}, - {0,32},{16,32},{32,32},{48,32},{64,32},{80,32},{96,32},{112,32},{128,32},{144,32},{160,32},{176,32}, {208,32},{224,32}, - {224,16},{208,16},{192,16},{176,16},{160,16},{144,16},{128,16},{112,16},{96,16},{80,16},{64,16},{48,16},{32,16},{16,16},{0,16}, - {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},{208,0},{224,0}, - {224,0},{196,0},{168,0},{140,0},{112,0},{84,0},{56,0},{28,0},{0,0}, - {224,64},{196,64},{168,64},{140,64},{112,64},{84,64},{56,64},{28,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, 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, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2 - } -}; - bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { return false; diff --git a/keyboards/yandrstudio/tg67/keyboard.json b/keyboards/yandrstudio/tg67/keyboard.json index 8a1df37805..924b1ec689 100644 --- a/keyboards/yandrstudio/tg67/keyboard.json +++ b/keyboards/yandrstudio/tg67/keyboard.json @@ -64,6 +64,77 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 32, "y": 64, "flags": 4}, + {"x": 48, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 80, "y": 64, "flags": 4}, + {"x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 144, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 160, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 48, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 208, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4} + ], "max_brightness": 250, "sleep": true }, diff --git a/keyboards/yandrstudio/tg67/tg67.c b/keyboards/yandrstudio/tg67/tg67.c deleted file mode 100644 index 5384778a68..0000000000 --- a/keyboards/yandrstudio/tg67/tg67.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright 2022 JasonRen(biu) - * - * 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 RGB_MATRIX_ENABLE - -led_config_t g_led_config = { - { - {54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68}, - {53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39}, - {25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, NO_LED, 37, 38}, - {24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, NO_LED, 13, 12, 11}, - {0, 1, 2, NO_LED, NO_LED, 4, NO_LED, NO_LED, NO_LED, 6, 7, NO_LED, 8, 9, 10} - }, - { - {0,64},{16,64},{32,64},{48,64}, {80,64}, {112,64}, {144,64},{160,64}, {192,64},{208,64},{224,64}, - {224,48},{208,48},{192,48}, {160,48},{144,48},{128,48},{112,48},{96,48},{80,48},{64,48},{48,48},{32,48},{16,48},{0,48}, - {0,32},{16,32},{32,32},{48,32},{64,32},{80,32},{96,32},{112,32},{128,32},{144,32},{160,32},{176,32}, {208,32},{224,32}, - {224,16},{208,16},{192,16},{176,16},{160,16},{144,16},{128,16},{112,16},{96,16},{80,16},{64,16},{48,16},{32,16},{16,16},{0,16}, - {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},{208,0},{224,0} - }, - { - 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, 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 diff --git a/keyboards/yanghu/unicorne/info.json b/keyboards/yanghu/unicorne/info.json index 1b890dcaba..838f9d330e 100644 --- a/keyboards/yanghu/unicorne/info.json +++ b/keyboards/yanghu/unicorne/info.json @@ -41,7 +41,17 @@ "driver": "pwm" }, "rgb_matrix": { - "driver": "ws2812" + "driver": "ws2812", + "layout": [ + {"matrix": [3, 5], "x": 94, "y": 60, "flags": 255}, + {"matrix": [2, 2], "x": 18, "y": 44, "flags": 255}, + {"matrix": [1, 2], "x": 8, "y": 10, "flags": 255}, + {"matrix": [1, 5], "x": 94, "y": 10, "flags": 255}, + {"matrix": [1, 8], "x": 130, "y": 10, "flags": 255}, + {"matrix": [1, 11], "x": 216, "y": 10, "flags": 255}, + {"matrix": [2, 11], "x": 208, "y": 44, "flags": 255}, + {"matrix": [3, 8], "x": 130, "y": 60, "flags": 255} + ] }, "matrix_pins": { "cols": ["A14", "A15", "B13", "B14", "B15", "A13", "A0", "A1", "A2", "A3", "A6", "A7"], diff --git a/keyboards/yanghu/unicorne/unicorne.c b/keyboards/yanghu/unicorne/unicorne.c index bce8f52075..e1d173d8c5 100644 --- a/keyboards/yanghu/unicorne/unicorne.c +++ b/keyboards/yanghu/unicorne/unicorne.c @@ -33,37 +33,6 @@ void i2c_init(void) { } } -// LED matrix -// physical location -// 2 3 4 5 -// -// 1 6 -// 0 7 -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = {{ - // Key Matrix to LED Index - // Since we only have 8 LEDs, map the keys near them to the same LED. - {2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5}, - {2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5}, - {1, 1, 1, 0, 0, 0, 7, 7, 7, 6, 6, 6}, - {NO_LED, NO_LED, NO_LED, 0, 0, 0, 7, 7, 7, NO_LED, NO_LED, NO_LED}, -}, {// LED Index to Physical Position - {94, 60}, - {18, 44}, - {8, 10}, - {94, 10}, - {130,10}, - {216, 10}, - {208, 44}, - {130, 60} -}, {// LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL -}}; -// clang-format on -#endif - #ifdef OLED_ENABLE // OLED shared code // The oled is vertical. Need to rotate 270 degrees. diff --git a/keyboards/ymdk/ymd40/air40/air40.c b/keyboards/ymdk/ymd40/air40/air40.c deleted file mode 100644 index 633b4943ff..0000000000 --- a/keyboards/ymdk/ymd40/air40/air40.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2022 Dennis Kruyt (dennis@kruyt.org) - * - * 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" - -#if defined(RGB_MATRIX_ENABLE) -led_config_t g_led_config = { - { - // Key Matrix to LED Index for center 2u - {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, - {23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12}, - {35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24}, - {50, 49, 48, 47, 46, 43, 41, 40, 39, 38, 37, 36} - }, { - // LED Index to Physical Position, more positions due to extra leds for other layout options - { 0, 0}, { 20, 0}, { 40, 0}, {61, 0}, {81, 0}, {101, 0}, {122, 0}, {142, 0}, {162, 0}, {183, 0}, {203, 0}, {224, 0}, - { 0, 21}, { 20, 21}, { 40, 21}, {61, 21}, {81, 21}, {101, 21}, {122, 21}, {142, 21}, {162, 21}, {183, 21}, {203, 21}, {224, 21}, - { 0, 42}, { 20, 42}, { 40, 42}, {61, 42}, {81, 42}, {101, 42}, {122, 42}, {142, 42}, {162, 42}, {183, 42}, {203, 42}, {224, 42}, - { 0, 64}, { 20, 64}, { 40, 64}, {61, 64}, {81, 64}, {85, 64}, {94, 64}, {103, 64}, {112, 64}, {122, 64}, {142, 64}, {162, 64}, {183, 64}, {203, 64}, {224, 64} - - }, { - // LED Index to Flag - 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, - 1, 1, 1, 1, 1, 1 ,1 ,1, 1, 1, 1, 1, 1, 1, 1 - - } -}; -#endif diff --git a/keyboards/ymdk/ymd40/air40/keyboard.json b/keyboards/ymdk/ymd40/air40/keyboard.json index 0adc965cc7..ea21557423 100644 --- a/keyboards/ymdk/ymd40/air40/keyboard.json +++ b/keyboards/ymdk/ymd40/air40/keyboard.json @@ -60,6 +60,59 @@ "solid_multisplash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 11], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 101, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 122, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 142, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 183, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 11], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 10], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 101, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 162, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 203, "y": 21, "flags": 4}, + {"matrix": [1, 0], "x": 224, "y": 21, "flags": 1}, + {"matrix": [2, 11], "x": 0, "y": 42, "flags": 1}, + {"matrix": [2, 10], "x": 20, "y": 42, "flags": 4}, + {"matrix": [2, 9], "x": 40, "y": 42, "flags": 4}, + {"matrix": [2, 8], "x": 61, "y": 42, "flags": 4}, + {"matrix": [2, 7], "x": 81, "y": 42, "flags": 4}, + {"matrix": [2, 6], "x": 101, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 122, "y": 42, "flags": 4}, + {"matrix": [2, 4], "x": 142, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 162, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 183, "y": 42, "flags": 4}, + {"matrix": [2, 1], "x": 203, "y": 42, "flags": 4}, + {"matrix": [2, 0], "x": 224, "y": 42, "flags": 1}, + {"matrix": [3, 11], "x": 0, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 20, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 40, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 61, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 81, "y": 64, "flags": 1}, + {"matrix": [3, 6], "x": 85, "y": 64, "flags": 1}, + {"x": 94, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 103, "y": 64, "flags": 1}, + {"x": 112, "y": 64, "flags": 1}, + {"x": 122, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 142, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 162, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 183, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 203, "y": 64, "flags": 1}, + {"matrix": [3, 0], "x": 224, "y": 64, "flags": 1} + ], "max_brightness": 130, "sleep": true }, diff --git a/keyboards/yncognito/batpad/batpad.c b/keyboards/yncognito/batpad/batpad.c deleted file mode 100644 index d5eef4246d..0000000000 --- a/keyboards/yncognito/batpad/batpad.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Yncognito - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config ={ - { - {4 ,5 ,6 ,7 }, - {0 ,1 ,2 ,3 } - }, - { - {0,0},{75,0},{145,0},{224,0}, - {0,64},{75,64},{145,64},{224,64} - }, - { - 0x04,0x04,0x04,0x04, - 0x04,0x04,0x04,0x04 - } -}; - -#endif diff --git a/keyboards/yncognito/batpad/keyboard.json b/keyboards/yncognito/batpad/keyboard.json index 3e62042a4e..02e480ca22 100644 --- a/keyboards/yncognito/batpad/keyboard.json +++ b/keyboards/yncognito/batpad/keyboard.json @@ -60,6 +60,16 @@ "animation": "cycle_all" }, "driver": "ws2812", + "layout": [ + {"matrix": [1, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 75, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 145, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 224, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [0, 1], "x": 75, "y": 64, "flags": 4}, + {"matrix": [0, 2], "x": 145, "y": 64, "flags": 4}, + {"matrix": [0, 3], "x": 224, "y": 64, "flags": 4} + ], "react_on_keyup": true }, "features": { diff --git a/keyboards/yushakobo/quick17/keyboard.json b/keyboards/yushakobo/quick17/keyboard.json index 627642a179..621bbf810a 100644 --- a/keyboards/yushakobo/quick17/keyboard.json +++ b/keyboards/yushakobo/quick17/keyboard.json @@ -18,6 +18,26 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [1, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [1, 1], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [2, 1], "x": 44, "y": 64, "flags": 4}, + {"matrix": [2, 2], "x": 89, "y": 64, "flags": 4}, + {"matrix": [2, 3], "x": 134, "y": 64, "flags": 4}, + {"matrix": [2, 4], "x": 179, "y": 64, "flags": 4}, + {"matrix": [2, 5], "x": 224, "y": 64, "flags": 4}, + {"matrix": [1, 5], "x": 224, "y": 32, "flags": 4}, + {"matrix": [1, 4], "x": 179, "y": 32, "flags": 4}, + {"matrix": [1, 3], "x": 134, "y": 32, "flags": 4}, + {"matrix": [1, 2], "x": 89, "y": 32, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 44, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 89, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 134, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 179, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 224, "y": 0, "flags": 4} + ], "max_brightness": 150, "sat_steps": 8, "sleep": true, diff --git a/keyboards/yushakobo/quick17/quick17.c b/keyboards/yushakobo/quick17/quick17.c deleted file mode 100644 index d6fe84199b..0000000000 --- a/keyboards/yushakobo/quick17/quick17.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2021 yushakobo - * - * 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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - {12, 13, 14, 15, 16, 17}, - {0, 1, 11, 10, 9, 8}, - {2, 3, 4, 5, 6, 7} - }, - { - {0,32}, {44,32}, {0,64}, {44,64}, {89,64}, {134,64}, - {179,64},{224,64},{224,32},{179,32},{134,32},{89,32}, - {0,0}, {44,0}, {89,0}, {134,0}, {179,0}, {224,0} - }, - { - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4 - } -}; -#endif diff --git a/keyboards/zykrah/fuyu/fuyu.c b/keyboards/zykrah/fuyu/fuyu.c deleted file mode 100644 index ea1e048a64..0000000000 --- a/keyboards/zykrah/fuyu/fuyu.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2022 Zykrah - -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 RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - // Key Matrix to LED Index - {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, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED} - }, { - // LED Index to Physical Position - {112, 32}, {138, 17}, {112, 2}, { 86, 17}, { 86, 47}, {112, 62}, {138, 47}, // SNOWFLAKE - { 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}, {208, 0}, // UNDERGLOW - {208, 16}, {208, 32}, {208, 48}, // UNDERGLOW - {208, 64}, {192, 64}, {176, 64}, {160, 64}, {144, 64}, {128, 64}, {112, 64}, { 96, 64}, { 80, 64}, { 64, 64}, { 48, 64}, { 32, 64}, { 16, 64}, { 0, 64}, // UNDERGLOW - { 0, 48}, { 0, 32}, { 0, 16} // UNDERGLOW - }, { - // LED Index to Flag - 8, 8, 8, 8, 8, 8, 8, // SNOWFLAKE - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // UNDERGLOW - 2, 2, 2, // UNDERGLOW - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // UNDERGLOW - 2, 2, 2 // UNDERGLOW - } -}; -#endif diff --git a/keyboards/zykrah/fuyu/keyboard.json b/keyboards/zykrah/fuyu/keyboard.json index db4236b698..eafc92c1d2 100644 --- a/keyboards/zykrah/fuyu/keyboard.json +++ b/keyboards/zykrah/fuyu/keyboard.json @@ -60,6 +60,49 @@ "val": 150 }, "driver": "ws2812", + "layout": [ + {"x": 112, "y": 32, "flags": 8}, + {"x": 138, "y": 17, "flags": 8}, + {"x": 112, "y": 2, "flags": 8}, + {"x": 86, "y": 17, "flags": 8}, + {"x": 86, "y": 47, "flags": 8}, + {"x": 112, "y": 62, "flags": 8}, + {"x": 138, "y": 47, "flags": 8}, + {"x": 0, "y": 0, "flags": 2}, + {"x": 16, "y": 0, "flags": 2}, + {"x": 32, "y": 0, "flags": 2}, + {"x": 48, "y": 0, "flags": 2}, + {"x": 64, "y": 0, "flags": 2}, + {"x": 80, "y": 0, "flags": 2}, + {"x": 96, "y": 0, "flags": 2}, + {"x": 112, "y": 0, "flags": 2}, + {"x": 128, "y": 0, "flags": 2}, + {"x": 144, "y": 0, "flags": 2}, + {"x": 160, "y": 0, "flags": 2}, + {"x": 176, "y": 0, "flags": 2}, + {"x": 192, "y": 0, "flags": 2}, + {"x": 208, "y": 0, "flags": 2}, + {"x": 208, "y": 16, "flags": 2}, + {"x": 208, "y": 32, "flags": 2}, + {"x": 208, "y": 48, "flags": 2}, + {"x": 208, "y": 64, "flags": 2}, + {"x": 192, "y": 64, "flags": 2}, + {"x": 176, "y": 64, "flags": 2}, + {"x": 160, "y": 64, "flags": 2}, + {"x": 144, "y": 64, "flags": 2}, + {"x": 128, "y": 64, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 96, "y": 64, "flags": 2}, + {"x": 80, "y": 64, "flags": 2}, + {"x": 64, "y": 64, "flags": 2}, + {"x": 48, "y": 64, "flags": 2}, + {"x": 32, "y": 64, "flags": 2}, + {"x": 16, "y": 64, "flags": 2}, + {"x": 0, "y": 64, "flags": 2}, + {"x": 0, "y": 48, "flags": 2}, + {"x": 0, "y": 32, "flags": 2}, + {"x": 0, "y": 16, "flags": 2} + ], "max_brightness": 200 }, "ws2812": { From 4a4e4aa083db1752400ab84eade2a5b884cdc136 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 12 Sep 2025 08:12:48 +0100 Subject: [PATCH 36/95] Remove idobao *_DISABLE_UNDERGLOW behaviour (#25638) --- keyboards/idobao/id61/config.h | 28 ---------------------- keyboards/idobao/id61/post_rules.mk | 8 ------- keyboards/idobao/id63/config.h | 28 ---------------------- keyboards/idobao/id63/post_rules.mk | 8 ------- keyboards/idobao/id67/config.h | 30 ------------------------ keyboards/idobao/id67/post_rules.mk | 8 ------- keyboards/idobao/montex/v2/config.h | 28 ---------------------- keyboards/idobao/montex/v2/post_rules.mk | 8 ------- 8 files changed, 146 deletions(-) delete mode 100644 keyboards/idobao/id61/config.h delete mode 100644 keyboards/idobao/id61/post_rules.mk delete mode 100644 keyboards/idobao/id63/config.h delete mode 100644 keyboards/idobao/id63/post_rules.mk delete mode 100644 keyboards/idobao/id67/config.h delete mode 100644 keyboards/idobao/id67/post_rules.mk delete mode 100755 keyboards/idobao/montex/v2/config.h delete mode 100644 keyboards/idobao/montex/v2/post_rules.mk diff --git a/keyboards/idobao/id61/config.h b/keyboards/idobao/id61/config.h deleted file mode 100644 index 3766a8ef1d..0000000000 --- a/keyboards/idobao/id61/config.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2022 Vino Rodrigues (@vinorodrigues) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#if defined(RGB_MATRIX_ENABLE) - #ifndef ID61_DISABLE_UNDERGLOW - #define RGB_MATRIX_LED_COUNT 71 - #else - #define RGB_MATRIX_LED_COUNT 61 // = 71 - 10 - #endif -#endif // RGB_MATRIX_ENABLE - -/* ----------------------- - * 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/idobao/id61/post_rules.mk b/keyboards/idobao/id61/post_rules.mk deleted file mode 100644 index 673b260396..0000000000 --- a/keyboards/idobao/id61/post_rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -# The Denwir D60 case has a sealed/solid undercase, -# this enables switching off thoes LEDs -# Usage: `make idobao/id61:default UNDERGLOW=off` - -UNDERGLOW ?= yes -ifneq ($(strip $(UNDERGLOW)), yes) - OPT_DEFS += -DID61_DISABLE_UNDERGLOW -endif diff --git a/keyboards/idobao/id63/config.h b/keyboards/idobao/id63/config.h deleted file mode 100644 index 5a7df9028e..0000000000 --- a/keyboards/idobao/id63/config.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2022 Vino Rodrigues (@vinorodrigues) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#if defined(RGB_MATRIX_ENABLE) - #ifndef ID63_DISABLE_UNDERGLOW - #define RGB_MATRIX_LED_COUNT 75 - #else - #define RGB_MATRIX_LED_COUNT (75 - 12) - #endif -#endif // RGB_MATRIX_ENABLE - -/* ----------------------- - * 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/idobao/id63/post_rules.mk b/keyboards/idobao/id63/post_rules.mk deleted file mode 100644 index 1a465397fd..0000000000 --- a/keyboards/idobao/id63/post_rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -# The Denwir D60 case has a sealed/solid undercase, -# this enables switching off thoes LEDs -# Usage: `make idobao/id63:default UNDERGLOW=off` - -UNDERGLOW ?= yes -ifneq ($(strip $(UNDERGLOW)), yes) - OPT_DEFS += -DID63_DISABLE_UNDERGLOW -endif diff --git a/keyboards/idobao/id67/config.h b/keyboards/idobao/id67/config.h deleted file mode 100644 index 8f454d1ff4..0000000000 --- a/keyboards/idobao/id67/config.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2021 Tybera (@tybera) -// Copyright 2021 Werther (@thewerther) -// Copyright 2022 Vino Rodrigues (@vinorodrigues) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#if defined(RGB_MATRIX_ENABLE) - #ifndef ID67_DISABLE_UNDERGLOW - #define RGB_MATRIX_LED_COUNT 77 - #else - #define RGB_MATRIX_LED_COUNT (77 - 10) - #endif -#endif // RGB_MATRIX_ENABLE - -/* ----------------------- - * 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/idobao/id67/post_rules.mk b/keyboards/idobao/id67/post_rules.mk deleted file mode 100644 index 32832a65b2..0000000000 --- a/keyboards/idobao/id67/post_rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -# Some ID67 variants (v1 base build & "Bestype") have a solid back plate, -# this enables switching off thoes LEDs -# Usage: `make idobao/id67:default UNDERGLOW=off` - -UNDERGLOW ?= yes -ifneq ($(strip $(UNDERGLOW)), yes) - OPT_DEFS += -DID67_DISABLE_UNDERGLOW -endif diff --git a/keyboards/idobao/montex/v2/config.h b/keyboards/idobao/montex/v2/config.h deleted file mode 100755 index 548f3f62e7..0000000000 --- a/keyboards/idobao/montex/v2/config.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2022 IBNobody (@IBNobody) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#if defined(RGB_MATRIX_ENABLE) - #ifndef ID27_DISABLE_UNDERGLOW - #define RGB_MATRIX_LED_COUNT 31 // The number of LEDs connected - #else - #define RGB_MATRIX_LED_COUNT 27 // -4 disabled underglow LEDs - #endif -#endif // RGB_MATRIX_ENABLE - -/* ----------------------- - * 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/idobao/montex/v2/post_rules.mk b/keyboards/idobao/montex/v2/post_rules.mk deleted file mode 100644 index f2d43fa6ac..0000000000 --- a/keyboards/idobao/montex/v2/post_rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -# some (if not most) Montex have a solid back plate, -# this enables switching off the bottom facing LEDs -# Usage: `make idobao/montex/v2:default UNDERGLOW=off` - -UNDERGLOW ?= yes -ifneq ($(strip $(UNDERGLOW)), yes) - OPT_DEFS += -DID27_DISABLE_UNDERGLOW -endif From 319da7bfdb7d6d923baff139f2f5ee58c9d53182 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 12 Sep 2025 08:13:12 +0100 Subject: [PATCH 37/95] Refactor 40percentclub/ut47 (#25571) --- keyboards/40percentclub/ut47/config.h | 32 --- keyboards/40percentclub/ut47/keyboard.json | 9 + .../ut47/keymaps/default/keymap.c | 54 +---- .../40percentclub/ut47/keymaps/rgb/config.h | 20 +- .../40percentclub/ut47/keymaps/rgb/keymap.c | 54 +---- keyboards/40percentclub/ut47/led.c | 39 ---- keyboards/40percentclub/ut47/led_controls.c | 44 ++++ .../{LED_controls.ino => led_controls.ino} | 0 keyboards/40percentclub/ut47/matrix.c | 194 ------------------ keyboards/40percentclub/ut47/post_rules.mk | 5 +- keyboards/40percentclub/ut47/readme.md | 9 +- keyboards/40percentclub/ut47/rules.mk | 3 - keyboards/40percentclub/ut47/ut47.c | 36 ---- 13 files changed, 66 insertions(+), 433 deletions(-) delete mode 100644 keyboards/40percentclub/ut47/config.h delete mode 100644 keyboards/40percentclub/ut47/led.c create mode 100644 keyboards/40percentclub/ut47/led_controls.c rename keyboards/40percentclub/ut47/{LED_controls.ino => led_controls.ino} (100%) delete mode 100644 keyboards/40percentclub/ut47/matrix.c delete mode 100644 keyboards/40percentclub/ut47/rules.mk delete mode 100644 keyboards/40percentclub/ut47/ut47.c diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h deleted file mode 100644 index f0182a59f8..0000000000 --- a/keyboards/40percentclub/ut47/config.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2018 Carlos Filoteo - -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 - - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -#define MATRIX_ROW_PINS { D1, D0, D4, C6 } -#define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -/* Enable GNAP matrix serial output */ -#define GNAP_ENABLE diff --git a/keyboards/40percentclub/ut47/keyboard.json b/keyboards/40percentclub/ut47/keyboard.json index 00c8edef69..176d2a6b2d 100644 --- a/keyboards/40percentclub/ut47/keyboard.json +++ b/keyboards/40percentclub/ut47/keyboard.json @@ -22,6 +22,15 @@ "resync": true } }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["D7", "E6", "B4", "B5", "B6", "B2", "B3", "B1", "F7", "F6", "F5", "F4"], + "rows": ["D1", "D0", "D4", "C6"] + }, + "keycodes": [ + {"key": "LED_TOG"}, + {"key": "LED_CHG"} + ], "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/40percentclub/ut47/keymaps/default/keymap.c b/keyboards/40percentclub/ut47/keymaps/default/keymap.c index 4a9de82492..050cb6d4b3 100644 --- a/keyboards/40percentclub/ut47/keymaps/default/keymap.c +++ b/keyboards/40percentclub/ut47/keymaps/default/keymap.c @@ -1,31 +1,10 @@ -/* Copyright 2018 Carlos Filoteo - * - * 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 2018 Carlos Filoteo +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H -#ifdef LED_ENABLE - #include "uart.h" -#endif #define LT3_TAB LT(3, KC_TAB) #define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) -enum custom_keycodes { - LED_TOG = SAFE_RANGE, - LED_CHG -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base Layer @@ -104,32 +83,3 @@ LAYOUT( /* Tab */ _______, _______, _______, _______, _______, _______, _______, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT ), }; - -//LED keymap functions - #ifdef LED_ENABLE -void led_chmode(void) { - uart_write(0x65); -} - -void led_toggle(void) { - uart_write(0x64); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - case LED_TOG: - #ifdef LED_ENABLE - led_toggle(); - #endif - return false; - case LED_CHG: - #ifdef LED_ENABLE - led_chmode(); - #endif - return false; - } - } - return true; -}; -#endif diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/config.h b/keyboards/40percentclub/ut47/keymaps/rgb/config.h index d48ee2bf3f..7a66d80f0e 100644 --- a/keyboards/40percentclub/ut47/keymaps/rgb/config.h +++ b/keyboards/40percentclub/ut47/keymaps/rgb/config.h @@ -1,23 +1,7 @@ -/* Copyright 2018 Carlos Filoteo - * - * 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 2018 Carlos Filoteo +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once - -// place overrides here #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c index 17c0be7772..1250c72f2a 100644 --- a/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c +++ b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c @@ -1,31 +1,10 @@ -/* Copyright 2018 Carlos Filoteo - * - * 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 2018 Carlos Filoteo +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H -#ifdef LED_ENABLE - #include "uart.h" -#endif #define LT3_TAB LT(3, KC_TAB) #define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) -enum custom_keycodes { - LED_TOG = SAFE_RANGE, - LED_CHG -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( @@ -56,32 +35,3 @@ LAYOUT( /* Tab */ _______, _______, _______, _______, _______, _______, _______, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT ), }; - -//LED keymap functions - #ifdef LED_ENABLE -void led_chmode(void) { - uart_write(0x65); -} - -void led_toggle(void) { - uart_write(0x64); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - case LED_TOG: - #ifdef LED_ENABLE - led_toggle(); - #endif - return false; - case LED_CHG: - #ifdef LED_ENABLE - led_chmode(); - #endif - return false; - } - } - return true; -}; -#endif diff --git a/keyboards/40percentclub/ut47/led.c b/keyboards/40percentclub/ut47/led.c deleted file mode 100644 index fa431de760..0000000000 --- a/keyboards/40percentclub/ut47/led.c +++ /dev/null @@ -1,39 +0,0 @@ -/* -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 . -*/ - -#include -#include -#include "led.h" - -bool led_update_kb(led_t led_state) -{ - bool res = led_update_user(led_state); - if (res) { - if (led_state.caps_lock) { - // output low - gpio_set_pin_output(B0); - gpio_write_pin_low(B0); - gpio_set_pin_output(D5); - gpio_write_pin_low(D5); - } else { - // Hi-Z - gpio_set_pin_input(B0); - gpio_set_pin_input(D5); - } - } - return false; -} diff --git a/keyboards/40percentclub/ut47/led_controls.c b/keyboards/40percentclub/ut47/led_controls.c new file mode 100644 index 0000000000..34a0ceb5b7 --- /dev/null +++ b/keyboards/40percentclub/ut47/led_controls.c @@ -0,0 +1,44 @@ +// Copyright 2018 Carlos Filoteo +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H +#include "uart.h" + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + if (led_state.caps_lock) { + // output low + gpio_set_pin_output(B0); + gpio_write_pin_low(B0); + gpio_set_pin_output(D5); + gpio_write_pin_low(D5); + } else { + // Hi-Z + gpio_set_pin_input(B0); + gpio_set_pin_input(D5); + } + } + return false; +} + +void keyboard_post_init_kb(void) { + uart_init(9600); + + keyboard_post_init_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + uart_write((record->event.key.row * 16) + record->event.key.col); + + switch (keycode) { + case LED_TOG: + uart_write(0x64); + return false; + case LED_CHG: + uart_write(0x65); + return false; + } + } + return process_record_user(keycode, record); +} diff --git a/keyboards/40percentclub/ut47/LED_controls.ino b/keyboards/40percentclub/ut47/led_controls.ino similarity index 100% rename from keyboards/40percentclub/ut47/LED_controls.ino rename to keyboards/40percentclub/ut47/led_controls.ino diff --git a/keyboards/40percentclub/ut47/matrix.c b/keyboards/40percentclub/ut47/matrix.c deleted file mode 100644 index d803f11c5e..0000000000 --- a/keyboards/40percentclub/ut47/matrix.c +++ /dev/null @@ -1,194 +0,0 @@ -/* -Copyright 2018 Carlos Filoteo - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // initialize row and col - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - dprintf("bounce!: %02X\n", debouncing); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<The reason this is an "opt-in" feature is to prevent sending serial communication over the pin, in case it ends up being used for something else (like RGB underglow). diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk deleted file mode 100644 index 5480f61b9b..0000000000 --- a/keyboards/40percentclub/ut47/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -CUSTOM_MATRIX = yes -SRC += matrix.c -UART_DRIVER_REQUIRED = yes diff --git a/keyboards/40percentclub/ut47/ut47.c b/keyboards/40percentclub/ut47/ut47.c deleted file mode 100644 index 867d8c0202..0000000000 --- a/keyboards/40percentclub/ut47/ut47.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2018 Carlos Filoteo - * - * 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 LED_ENABLE - #include "uart.h" - -void matrix_init_kb(void) { - uart_init(9600); - - matrix_init_user(); -} -#endif - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - if (record->event.pressed) { - #ifdef LED_ENABLE - uart_write((record->event.key.row*16)+record->event.key.col); - #endif - } - return process_record_user(keycode, record); -} From 3320e98ccf6d1fccfada9d6f1d97759e80a340e8 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 12 Sep 2025 10:23:16 +0100 Subject: [PATCH 38/95] Migrate `eeconfig_init_kb` implementations to config (#25422) --- keyboards/keebio/bdn9/rev1/config.h | 6 ++++ keyboards/keebio/bdn9/rev1/keyboard.json | 3 ++ keyboards/keebio/bdn9/rev1/rev1.c | 20 ++----------- keyboards/keebio/bdn9/rev2/config.h | 6 ++++ keyboards/keebio/bdn9/rev2/rev2.c | 20 ++----------- keyboards/keebio/chocopad/rev1/config.h | 6 ++++ keyboards/keebio/chocopad/rev1/keyboard.json | 3 ++ keyboards/keebio/chocopad/rev1/rev1.c | 21 -------------- keyboards/keebio/dilly/config.h | 6 ++++ keyboards/keebio/dilly/dilly.c | 18 ------------ keyboards/keebio/dsp40/rev1/keyboard.json | 3 ++ keyboards/keebio/dsp40/rev1/rev1.c | 26 ----------------- keyboards/keebio/ergodicity/config.h | 6 ++++ keyboards/keebio/ergodicity/ergodicity.c | 18 ------------ keyboards/keebio/ergodicity/keyboard.json | 3 ++ keyboards/keebio/foldkb/rev1/rev1.c | 9 ------ keyboards/keebio/iris/rev2/config.h | 6 ++++ keyboards/keebio/iris/rev2/keyboard.json | 3 ++ keyboards/keebio/iris/rev2/rev2.c | 20 ++----------- keyboards/keebio/iris/rev3/config.h | 6 ++++ keyboards/keebio/iris/rev3/keyboard.json | 3 ++ keyboards/keebio/iris/rev3/rev3.c | 20 ++----------- keyboards/keebio/iris/rev4/config.h | 6 ++++ keyboards/keebio/iris/rev4/keyboard.json | 3 ++ keyboards/keebio/iris/rev4/rev4.c | 20 ++----------- keyboards/keebio/kbo5000/rev1/config.h | 2 ++ keyboards/keebio/kbo5000/rev1/rev1.c | 20 ++----------- keyboards/keebio/levinson/rev2/config.h | 6 ++++ keyboards/keebio/levinson/rev2/keyboard.json | 17 ++++++++++- keyboards/keebio/levinson/rev2/rev2.c | 18 ------------ keyboards/keebio/levinson/rev3/config.h | 6 ++++ keyboards/keebio/levinson/rev3/keyboard.json | 3 ++ keyboards/keebio/levinson/rev3/rev3.c | 18 ------------ keyboards/keebio/nyquist/rev2/config.h | 6 ++++ keyboards/keebio/nyquist/rev2/keyboard.json | 17 ++++++++++- keyboards/keebio/nyquist/rev2/rev2.c | 18 ------------ keyboards/keebio/nyquist/rev3/config.h | 6 ++++ keyboards/keebio/nyquist/rev3/keyboard.json | 3 ++ keyboards/keebio/nyquist/rev3/rev3.c | 18 ------------ keyboards/keebio/quefrency/rev1/config.h | 6 ++++ keyboards/keebio/quefrency/rev1/rev1.c | 14 --------- keyboards/keebio/quefrency/rev2/config.h | 2 ++ keyboards/keebio/quefrency/rev2/rev2.c | 20 ++----------- keyboards/keebio/quefrency/rev3/config.h | 2 ++ keyboards/keebio/quefrency/rev3/rev3.c | 17 ----------- keyboards/keebio/stick/config.h | 6 ++++ keyboards/keebio/stick/stick.c | 17 ----------- keyboards/keebio/viterbi/rev2/config.h | 6 ++++ keyboards/keebio/viterbi/rev2/keyboard.json | 3 ++ keyboards/keebio/viterbi/rev2/rev2.c | 18 ------------ keyboards/sendyyeah/pix/config.h | 2 ++ keyboards/sendyyeah/pix/pix.c | 30 -------------------- 52 files changed, 181 insertions(+), 381 deletions(-) create mode 100644 keyboards/keebio/bdn9/rev1/config.h create mode 100644 keyboards/keebio/bdn9/rev2/config.h create mode 100644 keyboards/keebio/chocopad/rev1/config.h delete mode 100644 keyboards/keebio/chocopad/rev1/rev1.c create mode 100644 keyboards/keebio/dilly/config.h delete mode 100644 keyboards/keebio/dilly/dilly.c delete mode 100644 keyboards/keebio/dsp40/rev1/rev1.c create mode 100644 keyboards/keebio/ergodicity/config.h delete mode 100644 keyboards/keebio/ergodicity/ergodicity.c create mode 100644 keyboards/keebio/iris/rev2/config.h create mode 100644 keyboards/keebio/iris/rev3/config.h create mode 100644 keyboards/keebio/iris/rev4/config.h create mode 100644 keyboards/keebio/levinson/rev2/config.h delete mode 100644 keyboards/keebio/levinson/rev2/rev2.c create mode 100644 keyboards/keebio/levinson/rev3/config.h delete mode 100644 keyboards/keebio/levinson/rev3/rev3.c create mode 100644 keyboards/keebio/nyquist/rev2/config.h delete mode 100644 keyboards/keebio/nyquist/rev2/rev2.c create mode 100644 keyboards/keebio/nyquist/rev3/config.h delete mode 100644 keyboards/keebio/nyquist/rev3/rev3.c create mode 100644 keyboards/keebio/quefrency/rev1/config.h delete mode 100644 keyboards/keebio/quefrency/rev1/rev1.c create mode 100644 keyboards/keebio/stick/config.h create mode 100644 keyboards/keebio/viterbi/rev2/config.h delete mode 100644 keyboards/keebio/viterbi/rev2/rev2.c delete mode 100644 keyboards/sendyyeah/pix/pix.c diff --git a/keyboards/keebio/bdn9/rev1/config.h b/keyboards/keebio/bdn9/rev1/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/bdn9/rev1/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/bdn9/rev1/keyboard.json b/keyboards/keebio/bdn9/rev1/keyboard.json index 5c677db78d..8130b115f9 100644 --- a/keyboards/keebio/bdn9/rev1/keyboard.json +++ b/keyboards/keebio/bdn9/rev1/keyboard.json @@ -12,6 +12,9 @@ ] }, "backlight": { + "default": { + "brightness": 5 + }, "pin": "B5", "levels": 7 }, diff --git a/keyboards/keebio/bdn9/rev1/rev1.c b/keyboards/keebio/bdn9/rev1/rev1.c index 567de03af4..fe3defa156 100644 --- a/keyboards/keebio/bdn9/rev1/rev1.c +++ b/keyboards/keebio/bdn9/rev1/rev1.c @@ -1,22 +1,8 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } if (index == 0) { diff --git a/keyboards/keebio/bdn9/rev2/config.h b/keyboards/keebio/bdn9/rev2/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/bdn9/rev2/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/bdn9/rev2/rev2.c b/keyboards/keebio/bdn9/rev2/rev2.c index 70b0b0c4fd..fe3defa156 100644 --- a/keyboards/keebio/bdn9/rev2/rev2.c +++ b/keyboards/keebio/bdn9/rev2/rev2.c @@ -1,22 +1,8 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" -void eeconfig_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -# endif -#endif - -#ifdef RGB_MATRIX_ENABLE - rgb_matrix_enable(); // Enable RGB by default -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } if (index == 0) { diff --git a/keyboards/keebio/chocopad/rev1/config.h b/keyboards/keebio/chocopad/rev1/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/chocopad/rev1/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/chocopad/rev1/keyboard.json b/keyboards/keebio/chocopad/rev1/keyboard.json index fafea9dce0..06dbbf0bc6 100644 --- a/keyboards/keebio/chocopad/rev1/keyboard.json +++ b/keyboards/keebio/chocopad/rev1/keyboard.json @@ -17,6 +17,9 @@ "rgblight": true }, "backlight": { + "default": { + "brightness": 5 + }, "pin": "B5", "levels": 6 }, diff --git a/keyboards/keebio/chocopad/rev1/rev1.c b/keyboards/keebio/chocopad/rev1/rev1.c deleted file mode 100644 index e362bb3483..0000000000 --- a/keyboards/keebio/chocopad/rev1/rev1.c +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2023 Danny Nguyen (danny@keeb.io) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_MODE_EFFECT_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/dilly/config.h b/keyboards/keebio/dilly/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/dilly/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/dilly/dilly.c b/keyboards/keebio/dilly/dilly.c deleted file mode 100644 index 231a828f07..0000000000 --- a/keyboards/keebio/dilly/dilly.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(3); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/dsp40/rev1/keyboard.json b/keyboards/keebio/dsp40/rev1/keyboard.json index 776f67837c..2553e12c2b 100644 --- a/keyboards/keebio/dsp40/rev1/keyboard.json +++ b/keyboards/keebio/dsp40/rev1/keyboard.json @@ -26,6 +26,9 @@ } }, "backlight": { + "default": { + "brightness": 5 + }, "pin": "A6", "levels": 7 }, diff --git a/keyboards/keebio/dsp40/rev1/rev1.c b/keyboards/keebio/dsp40/rev1/rev1.c deleted file mode 100644 index 091cfc1523..0000000000 --- a/keyboards/keebio/dsp40/rev1/rev1.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2021 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 . -*/ - -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/ergodicity/config.h b/keyboards/keebio/ergodicity/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/ergodicity/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/ergodicity/ergodicity.c b/keyboards/keebio/ergodicity/ergodicity.c deleted file mode 100644 index 76fb136c03..0000000000 --- a/keyboards/keebio/ergodicity/ergodicity.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/ergodicity/keyboard.json b/keyboards/keebio/ergodicity/keyboard.json index 6f755ba45c..504edf3b56 100644 --- a/keyboards/keebio/ergodicity/keyboard.json +++ b/keyboards/keebio/ergodicity/keyboard.json @@ -29,6 +29,9 @@ }, "diode_direction": "COL2ROW", "backlight": { + "default": { + "brightness": 5 + }, "pin": "B5", "levels": 7, "breathing": true diff --git a/keyboards/keebio/foldkb/rev1/rev1.c b/keyboards/keebio/foldkb/rev1/rev1.c index c2ba942a30..33915a0efe 100644 --- a/keyboards/keebio/foldkb/rev1/rev1.c +++ b/keyboards/keebio/foldkb/rev1/rev1.c @@ -16,15 +16,6 @@ along with this program. If not, see . #include "quantum.h" -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(3); -#endif - eeconfig_update_kb(0); - eeconfig_init_user(); -} - bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } if (index == 0) { diff --git a/keyboards/keebio/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/iris/rev2/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/iris/rev2/keyboard.json b/keyboards/keebio/iris/rev2/keyboard.json index 9ea21851ee..23023fa3db 100644 --- a/keyboards/keebio/iris/rev2/keyboard.json +++ b/keyboards/keebio/iris/rev2/keyboard.json @@ -10,6 +10,9 @@ }, "diode_direction": "COL2ROW", "backlight": { + "default": { + "brightness": 3 + }, "pin": "B5", "levels": 5 }, diff --git a/keyboards/keebio/iris/rev2/rev2.c b/keyboards/keebio/iris/rev2/rev2.c index 87d4b4029d..45c8d90361 100644 --- a/keyboards/keebio/iris/rev2/rev2.c +++ b/keyboards/keebio/iris/rev2/rev2.c @@ -1,3 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" #ifdef SWAP_HANDS_ENABLE @@ -18,20 +21,3 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, }; #endif - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(3); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/iris/rev3/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/iris/rev3/keyboard.json b/keyboards/keebio/iris/rev3/keyboard.json index f7b3f894fe..68805c27f8 100644 --- a/keyboards/keebio/iris/rev3/keyboard.json +++ b/keyboards/keebio/iris/rev3/keyboard.json @@ -15,6 +15,9 @@ ] }, "backlight": { + "default": { + "brightness": 3 + }, "pin": "B6", "levels": 5 }, diff --git a/keyboards/keebio/iris/rev3/rev3.c b/keyboards/keebio/iris/rev3/rev3.c index 8b12388cac..0f7f5a7f75 100644 --- a/keyboards/keebio/iris/rev3/rev3.c +++ b/keyboards/keebio/iris/rev3/rev3.c @@ -1,3 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" #ifdef SWAP_HANDS_ENABLE @@ -22,23 +25,6 @@ const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0}; # endif #endif -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(3); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } diff --git a/keyboards/keebio/iris/rev4/config.h b/keyboards/keebio/iris/rev4/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/iris/rev4/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/iris/rev4/keyboard.json b/keyboards/keebio/iris/rev4/keyboard.json index 3acd3d0a14..dc5392d91f 100644 --- a/keyboards/keebio/iris/rev4/keyboard.json +++ b/keyboards/keebio/iris/rev4/keyboard.json @@ -15,6 +15,9 @@ ] }, "backlight": { + "default": { + "brightness": 3 + }, "pin": "B5", "levels": 5 }, diff --git a/keyboards/keebio/iris/rev4/rev4.c b/keyboards/keebio/iris/rev4/rev4.c index 04a2241966..03a25c3395 100644 --- a/keyboards/keebio/iris/rev4/rev4.c +++ b/keyboards/keebio/iris/rev4/rev4.c @@ -1,22 +1,8 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(3); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } diff --git a/keyboards/keebio/kbo5000/rev1/config.h b/keyboards/keebio/kbo5000/rev1/config.h index 12f7f76c87..365d756870 100644 --- a/keyboards/keebio/kbo5000/rev1/config.h +++ b/keyboards/keebio/kbo5000/rev1/config.h @@ -18,4 +18,6 @@ along with this program. If not, see . #pragma once +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) + #define CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/kbo5000/rev1/rev1.c b/keyboards/keebio/kbo5000/rev1/rev1.c index 8aa227deba..1fd1b9b905 100644 --- a/keyboards/keebio/kbo5000/rev1/rev1.c +++ b/keyboards/keebio/kbo5000/rev1/rev1.c @@ -1,3 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" #include "split_util.h" @@ -14,23 +17,6 @@ bool led_update_kb(led_t led_state) { return true; } -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(3); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } if (index == 0) { diff --git a/keyboards/keebio/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/levinson/rev2/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/levinson/rev2/keyboard.json b/keyboards/keebio/levinson/rev2/keyboard.json index dd71186837..b6b1fcfa33 100644 --- a/keyboards/keebio/levinson/rev2/keyboard.json +++ b/keyboards/keebio/levinson/rev2/keyboard.json @@ -15,12 +15,27 @@ }, "diode_direction": "COL2ROW", "backlight": { + "default": { + "brightness": 5 + }, "pin": "B5", "levels": 7 }, "rgblight": { "led_count": 12, - "split_count": [6, 6] + "split_count": [6, 6], + "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": "D3" diff --git a/keyboards/keebio/levinson/rev2/rev2.c b/keyboards/keebio/levinson/rev2/rev2.c deleted file mode 100644 index 76fb136c03..0000000000 --- a/keyboards/keebio/levinson/rev2/rev2.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/levinson/rev3/config.h b/keyboards/keebio/levinson/rev3/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/levinson/rev3/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/levinson/rev3/keyboard.json b/keyboards/keebio/levinson/rev3/keyboard.json index 7930727755..0c619bb627 100644 --- a/keyboards/keebio/levinson/rev3/keyboard.json +++ b/keyboards/keebio/levinson/rev3/keyboard.json @@ -24,6 +24,9 @@ }, "diode_direction": "COL2ROW", "backlight": { + "default": { + "brightness": 5 + }, "pin": "B6", "levels": 7 }, diff --git a/keyboards/keebio/levinson/rev3/rev3.c b/keyboards/keebio/levinson/rev3/rev3.c deleted file mode 100644 index 76fb136c03..0000000000 --- a/keyboards/keebio/levinson/rev3/rev3.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/nyquist/rev2/config.h b/keyboards/keebio/nyquist/rev2/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/nyquist/rev2/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/nyquist/rev2/keyboard.json b/keyboards/keebio/nyquist/rev2/keyboard.json index 69639db6bf..a66dff3904 100644 --- a/keyboards/keebio/nyquist/rev2/keyboard.json +++ b/keyboards/keebio/nyquist/rev2/keyboard.json @@ -24,12 +24,27 @@ }, "diode_direction": "COL2ROW", "backlight": { + "default": { + "brightness": 5 + }, "pin": "B6", "levels": 7 }, "rgblight": { "led_count": 12, - "split_count": [6, 6] + "split_count": [6, 6], + "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": "D3" diff --git a/keyboards/keebio/nyquist/rev2/rev2.c b/keyboards/keebio/nyquist/rev2/rev2.c deleted file mode 100644 index 76fb136c03..0000000000 --- a/keyboards/keebio/nyquist/rev2/rev2.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/nyquist/rev3/config.h b/keyboards/keebio/nyquist/rev3/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/nyquist/rev3/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/nyquist/rev3/keyboard.json b/keyboards/keebio/nyquist/rev3/keyboard.json index bdc7be0e4e..a4db4dcd8e 100644 --- a/keyboards/keebio/nyquist/rev3/keyboard.json +++ b/keyboards/keebio/nyquist/rev3/keyboard.json @@ -24,6 +24,9 @@ }, "diode_direction": "COL2ROW", "backlight": { + "default": { + "brightness": 5 + }, "pin": "B5", "levels": 7 }, diff --git a/keyboards/keebio/nyquist/rev3/rev3.c b/keyboards/keebio/nyquist/rev3/rev3.c deleted file mode 100644 index 76fb136c03..0000000000 --- a/keyboards/keebio/nyquist/rev3/rev3.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/quefrency/rev1/rev1.c b/keyboards/keebio/quefrency/rev1/rev1.c deleted file mode 100644 index 51adb74d31..0000000000 --- a/keyboards/keebio/quefrency/rev1/rev1.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/quefrency/rev2/config.h b/keyboards/keebio/quefrency/rev2/config.h index 12f7f76c87..365d756870 100644 --- a/keyboards/keebio/quefrency/rev2/config.h +++ b/keyboards/keebio/quefrency/rev2/config.h @@ -18,4 +18,6 @@ along with this program. If not, see . #pragma once +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) + #define CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/quefrency/rev2/rev2.c b/keyboards/keebio/quefrency/rev2/rev2.c index f0320597f7..63a02ee20b 100644 --- a/keyboards/keebio/quefrency/rev2/rev2.c +++ b/keyboards/keebio/quefrency/rev2/rev2.c @@ -1,3 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" #include "split_util.h" @@ -14,23 +17,6 @@ bool led_update_kb(led_t led_state) { return true; } -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(3); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } diff --git a/keyboards/keebio/quefrency/rev3/config.h b/keyboards/keebio/quefrency/rev3/config.h index 12f7f76c87..365d756870 100644 --- a/keyboards/keebio/quefrency/rev3/config.h +++ b/keyboards/keebio/quefrency/rev3/config.h @@ -18,4 +18,6 @@ along with this program. If not, see . #pragma once +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) + #define CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/quefrency/rev3/rev3.c b/keyboards/keebio/quefrency/rev3/rev3.c index 74d68723f5..3e61e07928 100644 --- a/keyboards/keebio/quefrency/rev3/rev3.c +++ b/keyboards/keebio/quefrency/rev3/rev3.c @@ -30,23 +30,6 @@ bool led_update_kb(led_t led_state) { return true; } -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(3); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } diff --git a/keyboards/keebio/stick/config.h b/keyboards/keebio/stick/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/stick/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/stick/stick.c b/keyboards/keebio/stick/stick.c index e54a0aa09f..9c5e67d93d 100644 --- a/keyboards/keebio/stick/stick.c +++ b/keyboards/keebio/stick/stick.c @@ -17,23 +17,6 @@ along with this program. If not, see . #include "quantum.h" -void eeconfig_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -# ifdef RGBLIGHT_EFFECT_RAINDOWN_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -# endif -#endif - -#ifdef RGB_MATRIX_ENABLE - rgb_matrix_enable(); // Enable RGB by default -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } if (index == 0) { diff --git a/keyboards/keebio/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h new file mode 100644 index 0000000000..4ffb768771 --- /dev/null +++ b/keyboards/keebio/viterbi/rev2/config.h @@ -0,0 +1,6 @@ +// Copyright 2025 Danny Nguyen (danny@keeb.io) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/viterbi/rev2/keyboard.json b/keyboards/keebio/viterbi/rev2/keyboard.json index a3e2d055b2..4d427df6ef 100644 --- a/keyboards/keebio/viterbi/rev2/keyboard.json +++ b/keyboards/keebio/viterbi/rev2/keyboard.json @@ -18,6 +18,9 @@ }, "diode_direction": "COL2ROW", "backlight": { + "default": { + "brightness": 5 + }, "pin": "B6", "levels": 7 }, diff --git a/keyboards/keebio/viterbi/rev2/rev2.c b/keyboards/keebio/viterbi/rev2/rev2.c deleted file mode 100644 index f00bb726e9..0000000000 --- a/keyboards/keebio/viterbi/rev2/rev2.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_MODE_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/sendyyeah/pix/config.h b/keyboards/sendyyeah/pix/config.h index 3a6cb6297f..7557991a58 100644 --- a/keyboards/sendyyeah/pix/config.h +++ b/keyboards/sendyyeah/pix/config.h @@ -19,5 +19,7 @@ #define OLED_FONT_H "keymaps/default/glcdfont.c" #define OLED_TIMEOUT 600000 // Turn of after 10 minutes +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 5) + #define RGBLIGHT_LAYERS #define RGBLIGHT_LAYER_BLINK diff --git a/keyboards/sendyyeah/pix/pix.c b/keyboards/sendyyeah/pix/pix.c deleted file mode 100644 index 1bd8627e16..0000000000 --- a/keyboards/sendyyeah/pix/pix.c +++ /dev/null @@ -1,30 +0,0 @@ - /* Copyright 2020 sendyyeah - * - * 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 eeconfig_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB underglow by default - rgblight_sethsv(0, 255, 255); -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 5); // Set to RGB_RAINBOW_SWIRL animation by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} From cf58a8733d35bbfea2f54bd0175747ee63d9b2e3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 12 Sep 2025 10:23:23 +0100 Subject: [PATCH 39/95] Add DIP Switch map support to keymap.json (#25431) --- data/schemas/keymap.jsonschema | 11 +++++++++++ lib/python/qmk/keymap.py | 20 ++++++++++++++++++++ lib/python/qmk/tests/test_cli_commands.py | 2 ++ lib/python/qmk/tests/test_qmk_keymap.py | 1 + 4 files changed, 34 insertions(+) diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema index 99aeaa6b6c..71b39fc7c4 100644 --- a/data/schemas/keymap.jsonschema +++ b/data/schemas/keymap.jsonschema @@ -35,6 +35,17 @@ } } }, + "dip_switches": { + "type": "array", + "items": { + "type": "object", + "required": ["on", "off"], + "properties": { + "on": {"type": "string"}, + "off": {"type": "string"} + } + } + }, "macros": { "type": "array", "items": { diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 4cf07f59d6..0ac04f6f73 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -32,6 +32,7 @@ __INCLUDES__ __KEYMAP_GOES_HERE__ __ENCODER_MAP_GOES_HERE__ +__DIP_SWITCH_MAP_GOES_HERE__ __MACRO_OUTPUT_GOES_HERE__ #ifdef OTHER_KEYMAP_C @@ -66,6 +67,19 @@ def _generate_encodermap_table(keymap_json): return lines +def _generate_dipswitchmap_table(keymap_json): + lines = [ + '#if defined(DIP_SWITCH_ENABLE) && defined(DIP_SWITCH_MAP_ENABLE)', + 'const uint16_t PROGMEM dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES] = {', + ] + for index, switch in enumerate(keymap_json['dip_switches']): + if index != 0: + lines[-1] = lines[-1] + ',' + lines.append(f' DIP_SWITCH_OFF_ON({_strip_any(switch["off"])}, {_strip_any(switch["on"])})') + lines.extend(['};', '#endif // defined(DIP_SWITCH_ENABLE) && defined(DIP_SWITCH_MAP_ENABLE)']) + return lines + + def _generate_macros_function(keymap_json): macro_txt = [ 'bool process_record_user(uint16_t keycode, keyrecord_t *record) {', @@ -286,6 +300,12 @@ def generate_c(keymap_json): encodermap = '\n'.join(encoder_txt) new_keymap = new_keymap.replace('__ENCODER_MAP_GOES_HERE__', encodermap) + dipswitchmap = '' + if 'dip_switches' in keymap_json and keymap_json['dip_switches'] is not None: + dip_txt = _generate_dipswitchmap_table(keymap_json) + dipswitchmap = '\n'.join(dip_txt) + new_keymap = new_keymap.replace('__DIP_SWITCH_MAP_GOES_HERE__', dipswitchmap) + macros = '' if 'macros' in keymap_json and keymap_json['macros'] is not None: macro_txt = _generate_macros_function(keymap_json) diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index dd659fe0f2..2716459989 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -159,6 +159,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + #ifdef OTHER_KEYMAP_C # include OTHER_KEYMAP_C #endif // OTHER_KEYMAP_C @@ -196,6 +197,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + #ifdef OTHER_KEYMAP_C # include OTHER_KEYMAP_C #endif // OTHER_KEYMAP_C diff --git a/lib/python/qmk/tests/test_qmk_keymap.py b/lib/python/qmk/tests/test_qmk_keymap.py index 80cc679b00..34360d3b6d 100644 --- a/lib/python/qmk/tests/test_qmk_keymap.py +++ b/lib/python/qmk/tests/test_qmk_keymap.py @@ -27,6 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + #ifdef OTHER_KEYMAP_C # include OTHER_KEYMAP_C #endif // OTHER_KEYMAP_C From d34cade5abe11da93a6f3d204b00278127299f8b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 12 Sep 2025 13:21:49 +0100 Subject: [PATCH 40/95] Generate default encoder resolution for sparse config (#25247) --- lib/python/qmk/cli/generate/config_h.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index d6d0299291..1ade452f95 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -125,11 +125,12 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''): 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") - elif len(resolutions) == 0: + if len(resolutions) == 0 or all(r is None for r in resolutions): cli.log.debug(f"Skipping ENCODER_RESOLUTION{postfix} configuration") - elif len(set(resolutions)) == 1: + return + + resolutions = [4 if r is None else r for r in resolutions] + if len(set(resolutions)) == 1: config_h_lines.append(generate_define(f'ENCODER_RESOLUTION{postfix}', resolutions[0])) else: config_h_lines.append(generate_define(f'ENCODER_RESOLUTIONS{postfix}', f'{{ {", ".join(map(str,resolutions))} }}')) From b6310b5a1507aa085a732f1105b7f022c837f443 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 12 Sep 2025 16:56:06 +0100 Subject: [PATCH 41/95] Remove encoder resolution where duplicating defaults (#25654) --- keyboards/cxt_studio/12e3/keyboard.json | 4 ++-- keyboards/doio/kb03/keyboard.json | 2 +- keyboards/draculad/keyboard.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/cxt_studio/12e3/keyboard.json b/keyboards/cxt_studio/12e3/keyboard.json index a85126aab6..0b8949cda7 100644 --- a/keyboards/cxt_studio/12e3/keyboard.json +++ b/keyboards/cxt_studio/12e3/keyboard.json @@ -21,8 +21,8 @@ }, "encoder": { "rotary": [ - {"pin_a": "F5", "pin_b": "F6", "resolution": 4}, - {"pin_a": "E6", "pin_b": "F0", "resolution": 4}, + {"pin_a": "F5", "pin_b": "F6"}, + {"pin_a": "E6", "pin_b": "F0"}, {"pin_a": "B3", "pin_b": "B2", "resolution": 2} ] }, diff --git a/keyboards/doio/kb03/keyboard.json b/keyboards/doio/kb03/keyboard.json index d2a214c92f..a3e77369fc 100644 --- a/keyboards/doio/kb03/keyboard.json +++ b/keyboards/doio/kb03/keyboard.json @@ -6,7 +6,7 @@ "diode_direction": "COL2ROW", "encoder": { "rotary": [ - {"pin_a": "B5", "pin_b": "B6", "resolution": 4}, + {"pin_a": "B5", "pin_b": "B6"}, {"pin_a": "A2", "pin_b": "A1", "resolution": 2} ] }, diff --git a/keyboards/draculad/keyboard.json b/keyboards/draculad/keyboard.json index 9c21b2a97d..f4464da35f 100644 --- a/keyboards/draculad/keyboard.json +++ b/keyboards/draculad/keyboard.json @@ -39,7 +39,7 @@ "encoder": { "right": { "rotary": [ - {"pin_a": "B2", "pin_b": "B6", "resolution": 4}, + {"pin_a": "B2", "pin_b": "B6"}, {"pin_a": "B4", "pin_b": "B5", "resolution": 1} ] } From 46231df62d1914bb7d25f26a7ece41b7805cc807 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 12 Sep 2025 20:00:03 +0100 Subject: [PATCH 42/95] Tidy Keebio keyboards (#25653) --- keyboards/keebio/bamfk4/config.h | 16 ----------- keyboards/keebio/bdn9/keymaps/test/config.h | 5 ---- keyboards/keebio/bdn9/rev3/config.h | 14 ++++------ .../keebio/bfo9000/keymaps/default/config.h | 27 ------------------ .../keebio/bfo9000/keymaps/default/keymap.c | 3 ++ keyboards/keebio/bfo9000/readme.md | 13 ++++----- .../bigswitchseat/keymaps/default/keymap.c | 14 +--------- keyboards/keebio/chiri_ce/rev1/config.h | 4 ++- keyboards/keebio/chiri_ce/rev1/keyboard.json | 3 ++ keyboards/keebio/chocopad/readme.md | 15 ++++++---- keyboards/keebio/convolution/readme.md | 2 +- .../keebio/dilly/keymaps/default/keymap.c | 4 ++- keyboards/keebio/dilly/readme.md | 15 ++++++---- .../keebio/dsp40/keymaps/default/keymap.c | 3 +- keyboards/keebio/dsp40/readme.md | 4 +++ keyboards/keebio/dsp40/rev1/readme.md | 4 +++ keyboards/keebio/ergodicity/readme.md | 12 +++++--- .../keebio/fourier/keymaps/default/config.h | 23 --------------- .../keebio/fourier/keymaps/default/keymap.c | 7 ++--- keyboards/keebio/fourier/readme.md | 13 ++++----- keyboards/keebio/iris/readme.md | 9 +++--- keyboards/keebio/iris/rev1/rev1.c | 3 ++ keyboards/keebio/iris/rev1_led/rev1_led.c | 3 ++ keyboards/keebio/iris_lm/g1/config.h | 15 ++++------ keyboards/keebio/iris_lm/g1/keyboard.json | 3 ++ keyboards/keebio/iris_lm/k1/config.h | 15 ++++------ keyboards/keebio/iris_lm/k1/keyboard.json | 3 ++ .../keebio/kbo5000/keymaps/default/keymap.c | 3 ++ keyboards/keebio/kbo5000/keymaps/iso/keymap.c | 3 ++ keyboards/keebio/kbo5000/readme.md | 2 +- .../keebio/laplace/keymaps/default/keymap.c | 3 ++ keyboards/keebio/laplace/readme.md | 13 ++++----- .../keebio/levinson/keymaps/default/config.h | 28 ------------------- .../keebio/levinson/keymaps/default/keymap.c | 4 ++- keyboards/keebio/levinson/levinson.c | 3 ++ keyboards/keebio/levinson/readme.md | 11 ++++---- keyboards/keebio/nyquist/readme.md | 11 ++++---- keyboards/keebio/nyquist/rev5/config.h | 2 -- keyboards/keebio/nyquist/rev5/keyboard.json | 3 ++ .../keebio/quefrency/keymaps/default/config.h | 24 ---------------- .../keebio/quefrency/keymaps/default/keymap.c | 4 --- .../quefrency/keymaps/default60/keymap.c | 4 --- .../quefrency/keymaps/default65/keymap.c | 6 ---- keyboards/keebio/quefrency/readme.md | 11 ++++---- keyboards/keebio/quefrency/rev6/config.h | 15 ++++------ keyboards/keebio/quefrency/rev6/keyboard.json | 6 ++++ keyboards/keebio/quefrency/rev6/rules.mk | 1 - .../keebio/rorschach/keymaps/default/config.h | 24 ---------------- .../keebio/rorschach/keymaps/default/keymap.c | 4 ++- keyboards/keebio/rorschach/readme.md | 13 ++++----- keyboards/keebio/sinc/readme.md | 2 +- .../tragicforce68/keymaps/default/keymap.c | 3 ++ keyboards/keebio/tragicforce68/readme.md | 13 ++++----- keyboards/keebio/tukey/readme.md | 10 +++++-- .../keebio/viterbi/keymaps/default/config.h | 7 ----- .../keebio/viterbi/keymaps/default/keymap.c | 4 ++- keyboards/keebio/viterbi/readme.md | 14 ++++------ .../keebio/wavelet/keymaps/default/keymap.c | 4 ++- keyboards/keebio/wavelet/readme.md | 13 ++++----- keyboards/keebio/wavelet/wavelet.c | 3 ++ 60 files changed, 197 insertions(+), 326 deletions(-) delete mode 100644 keyboards/keebio/bdn9/keymaps/test/config.h delete mode 100644 keyboards/keebio/bfo9000/keymaps/default/config.h delete mode 100644 keyboards/keebio/fourier/keymaps/default/config.h delete mode 100644 keyboards/keebio/levinson/keymaps/default/config.h delete mode 100644 keyboards/keebio/quefrency/keymaps/default/config.h delete mode 100644 keyboards/keebio/quefrency/rev6/rules.mk delete mode 100644 keyboards/keebio/rorschach/keymaps/default/config.h diff --git a/keyboards/keebio/bamfk4/config.h b/keyboards/keebio/bamfk4/config.h index e97e28f5a9..832d0afd67 100644 --- a/keyboards/keebio/bamfk4/config.h +++ b/keyboards/keebio/bamfk4/config.h @@ -4,19 +4,3 @@ #pragma once #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) - -/* - * 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/keebio/bdn9/keymaps/test/config.h b/keyboards/keebio/bdn9/keymaps/test/config.h deleted file mode 100644 index e09fba9232..0000000000 --- a/keyboards/keebio/bdn9/keymaps/test/config.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES -#endif diff --git a/keyboards/keebio/bdn9/rev3/config.h b/keyboards/keebio/bdn9/rev3/config.h index 3afa37bce1..98f261b801 100644 --- a/keyboards/keebio/bdn9/rev3/config.h +++ b/keyboards/keebio/bdn9/rev3/config.h @@ -4,11 +4,9 @@ #pragma once /* Defines for the RGB matrix */ -#ifdef RGB_MATRIX_ENABLE -# define WS2812_PWM_DRIVER PWMD15 -# define WS2812_PWM_CHANNEL 2 -# define WS2812_PWM_PAL_MODE 1 -# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -# define WS2812_DMA_CHANNEL 2 -# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM15_UP -#endif +#define WS2812_PWM_DRIVER PWMD15 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_DMA_CHANNEL 2 +#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM15_UP diff --git a/keyboards/keebio/bfo9000/keymaps/default/config.h b/keyboards/keebio/bfo9000/keymaps/default/config.h deleted file mode 100644 index a9ae679110..0000000000 --- a/keyboards/keebio/bfo9000/keymaps/default/config.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert - -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 - -/* Select hand configuration */ -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/keebio/bfo9000/keymaps/default/keymap.c b/keyboards/keebio/bfo9000/keymaps/default/keymap.c index f37ea79c40..0d28c3c5c2 100644 --- a/keyboards/keebio/bfo9000/keymaps/default/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/default/keymap.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include QMK_KEYBOARD_H #define _BASE 0 diff --git a/keyboards/keebio/bfo9000/readme.md b/keyboards/keebio/bfo9000/readme.md index 059f2800a2..3fa6239680 100644 --- a/keyboards/keebio/bfo9000/readme.md +++ b/keyboards/keebio/bfo9000/readme.md @@ -1,11 +1,10 @@ -BFO-9000 -======== +# BFO-9000 A split full-size ortholinear keyboard made and sold by Keebio. Each half is a 6x9 arrangement, with breakable pieces to allow the number of rows to be customized between 4 to 6, and the number of columns to be between 7 to 9. [More info at Keebio](https://keeb.io). -Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Pro Micro +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): @@ -13,6 +12,6 @@ Make example for this keyboard (after setting up your build environment): Example of flashing this keyboard: - make keebio/bfo9000:default:avrdude + make keebio/bfo9000:default:flash -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. +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/keebio/bigswitchseat/keymaps/default/keymap.c b/keyboards/keebio/bigswitchseat/keymaps/default/keymap.c index 6d4378b995..a48f4f9165 100644 --- a/keyboards/keebio/bigswitchseat/keymaps/default/keymap.c +++ b/keyboards/keebio/bigswitchseat/keymaps/default/keymap.c @@ -5,23 +5,11 @@ // Defines names for use in layer keycodes and the keymap enum layer_names { - _MAIN, - _FN1, - _FN2, - _FN3 + _MAIN }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MAIN] = LAYOUT( KC_A - ), - [_FN1] = LAYOUT( - _______ - ), - [_FN2] = LAYOUT( - _______ - ), - [_FN3] = LAYOUT( - _______ ) }; diff --git a/keyboards/keebio/chiri_ce/rev1/config.h b/keyboards/keebio/chiri_ce/rev1/config.h index b1eb9da4e9..e9d9934301 100644 --- a/keyboards/keebio/chiri_ce/rev1/config.h +++ b/keyboards/keebio/chiri_ce/rev1/config.h @@ -3,14 +3,16 @@ #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 index 9cf7f51654..aea1fb1d6f 100644 --- a/keyboards/keebio/chiri_ce/rev1/keyboard.json +++ b/keyboards/keebio/chiri_ce/rev1/keyboard.json @@ -118,6 +118,9 @@ "matrix": [4, 0] }, "enabled": true, + "handedness": { + "pin": "GP4" + }, "matrix_pins": { "right": { "cols": ["GP29", "GP28", "GP2", "GP27", "GP18", "GP7"], diff --git a/keyboards/keebio/chocopad/readme.md b/keyboards/keebio/chocopad/readme.md index 67c875d923..9a6e62178f 100644 --- a/keyboards/keebio/chocopad/readme.md +++ b/keyboards/keebio/chocopad/readme.md @@ -1,14 +1,17 @@ -Chocopad -======== +# Chocopad A 4x4 macropad keyboard using Kailh PG1350 Lower Profile Choc switches. -Keyboard Maintainer: Keebio -Hardware Supported: Chocopad PCB, Arduino Pro Micro -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: Keebio +* Hardware Supported: Chocopad PCB, Arduino Pro Micro +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): make keebio/chocopad/rev1: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. +Example of flashing this keyboard: + + make keebio/chocopad/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). diff --git a/keyboards/keebio/convolution/readme.md b/keyboards/keebio/convolution/readme.md index c1bc8ae3d8..cb7d7c35db 100644 --- a/keyboards/keebio/convolution/readme.md +++ b/keyboards/keebio/convolution/readme.md @@ -13,6 +13,6 @@ Example of flashing this keyboard: make keebio/convolution/rev1:default:flash -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. +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). A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/keebio/dilly/keymaps/default/keymap.c b/keyboards/keebio/dilly/keymaps/default/keymap.c index 71a92037b6..9cef52ae4e 100644 --- a/keyboards/keebio/dilly/keymaps/default/keymap.c +++ b/keyboards/keebio/dilly/keymaps/default/keymap.c @@ -1,5 +1,7 @@ -#include QMK_KEYBOARD_H +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H #define _BASE 0 #define _FN1 1 diff --git a/keyboards/keebio/dilly/readme.md b/keyboards/keebio/dilly/readme.md index 74139eaeae..e4b6e418a3 100644 --- a/keyboards/keebio/dilly/readme.md +++ b/keyboards/keebio/dilly/readme.md @@ -1,14 +1,17 @@ -Dilly -===== +# Dilly A 3x10 ortholinear keyboard using Kailh PG1350 Lower Profile Choc switches. -Keyboard Maintainer: Keebio -Hardware Supported: Dilly PCB, Arduino Pro Micro -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: Keebio +* Hardware Supported: Dilly PCB, Arduino Pro Micro +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): make keebio/dilly: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. +Example of flashing this keyboard: + + make keebio/dilly: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/keebio/dsp40/keymaps/default/keymap.c b/keyboards/keebio/dsp40/keymaps/default/keymap.c index e8d3627ff2..c1496844bb 100755 --- a/keyboards/keebio/dsp40/keymaps/default/keymap.c +++ b/keyboards/keebio/dsp40/keymaps/default/keymap.c @@ -24,8 +24,7 @@ enum custom_layer { }; enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, + LOWER = SAFE_RANGE, RAISE, ADJUST, }; diff --git a/keyboards/keebio/dsp40/readme.md b/keyboards/keebio/dsp40/readme.md index c6b195c404..1a37587313 100644 --- a/keyboards/keebio/dsp40/readme.md +++ b/keyboards/keebio/dsp40/readme.md @@ -10,4 +10,8 @@ Make example for this keyboard (after setting up your build environment): make keebio/dsp40/rev1:default +Example of flashing this keyboard: + + make keebio/dsp40/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). diff --git a/keyboards/keebio/dsp40/rev1/readme.md b/keyboards/keebio/dsp40/rev1/readme.md index ee62ba7886..8852ef5501 100644 --- a/keyboards/keebio/dsp40/rev1/readme.md +++ b/keyboards/keebio/dsp40/rev1/readme.md @@ -10,4 +10,8 @@ Make example for this keyboard (after setting up your build environment): make keebio/dsp40/rev1:default +Example of flashing this keyboard: + + make keebio/dsp40/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). diff --git a/keyboards/keebio/ergodicity/readme.md b/keyboards/keebio/ergodicity/readme.md index 61f4ee658c..3fe77848e3 100644 --- a/keyboards/keebio/ergodicity/readme.md +++ b/keyboards/keebio/ergodicity/readme.md @@ -1,11 +1,15 @@ # Ergodicity -Keyboard Maintainer: [nooges/bakingpy](https://github.com/nooges) -Hardware Supported: Ergodicity PCB w/ATmega32u4 -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [nooges/bakingpy](https://github.com/nooges) +* Hardware Supported: Ergodicity PCB w/ATmega32u4 +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make keebio/ergodicity:default:dfu + make keebio/ergodicity:default + +Example of flashing this keyboard: + + make keebio/ergodicity: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/keebio/fourier/keymaps/default/config.h b/keyboards/keebio/fourier/keymaps/default/config.h deleted file mode 100644 index fa952ef4c3..0000000000 --- a/keyboards/keebio/fourier/keymaps/default/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert - -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/fourier/keymaps/default/keymap.c b/keyboards/keebio/fourier/keymaps/default/keymap.c index 6fa9ab5799..0c8e1168af 100644 --- a/keyboards/keebio/fourier/keymaps/default/keymap.c +++ b/keyboards/keebio/fourier/keymaps/default/keymap.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -8,10 +11,6 @@ #define _FN1 1 #define _FN2 2 -enum custom_keycodes { - QWERTY = SAFE_RANGE, -}; - #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define SPFN1 LT(_FN1, KC_SPACE) diff --git a/keyboards/keebio/fourier/readme.md b/keyboards/keebio/fourier/readme.md index c18d1a7484..d3d0f81f1e 100644 --- a/keyboards/keebio/fourier/readme.md +++ b/keyboards/keebio/fourier/readme.md @@ -1,11 +1,10 @@ -Fourier -======== +# Fourier A split 40% staggered keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). -Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro -Hardware Availability: [Keebio](https://keeb.io/collections/frontpage/products/fourier-40-split-staggered-keyboard) +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Pro Micro +* Hardware Availability: [Keebio](https://keeb.io/collections/frontpage/products/fourier-40-split-staggered-keyboard) Make example for this keyboard (after setting up your build environment): @@ -13,8 +12,8 @@ Make example for this keyboard (after setting up your build environment): Example of flashing this keyboard: - make keebio/fourier:default:avrdude + make keebio/fourier:default:flash -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. +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). A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/keebio/iris/readme.md b/keyboards/keebio/iris/readme.md index e98f985394..d1d498c67e 100644 --- a/keyboards/keebio/iris/readme.md +++ b/keyboards/keebio/iris/readme.md @@ -1,11 +1,10 @@ -Iris -==== +# Iris A split ergo 4x6 keyboard with 3 or 4 thumb keys made and sold by Keebio. [More info at Keebio](https://keeb.io). -Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro, ATmega32u4 -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Pro Micro, ATmega32u4 +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/keebio/iris/rev1/rev1.c b/keyboards/keebio/iris/rev1/rev1.c index e05b758a44..ea8029f47c 100644 --- a/keyboards/keebio/iris/rev1/rev1.c +++ b/keyboards/keebio/iris/rev1/rev1.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" #ifdef SWAP_HANDS_ENABLE diff --git a/keyboards/keebio/iris/rev1_led/rev1_led.c b/keyboards/keebio/iris/rev1_led/rev1_led.c index e05b758a44..ea8029f47c 100644 --- a/keyboards/keebio/iris/rev1_led/rev1_led.c +++ b/keyboards/keebio/iris/rev1_led/rev1_led.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" #ifdef SWAP_HANDS_ENABLE diff --git a/keyboards/keebio/iris_lm/g1/config.h b/keyboards/keebio/iris_lm/g1/config.h index 952033edf1..ca19ea6402 100644 --- a/keyboards/keebio/iris_lm/g1/config.h +++ b/keyboards/keebio/iris_lm/g1/config.h @@ -13,14 +13,11 @@ #define SERIAL_USART_PIN_SWAP #define USB_VBUS_PIN C6 -#define SPLIT_HAND_PIN A0 /* Defines for the RGB matrix */ -#ifdef RGB_MATRIX_ENABLE -# define WS2812_PWM_DRIVER PWMD3 -# define WS2812_PWM_CHANNEL 4 -# define WS2812_PWM_PAL_MODE 10 -# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -# define WS2812_DMA_CHANNEL 2 -# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP -#endif +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 10 +#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/iris_lm/g1/keyboard.json b/keyboards/keebio/iris_lm/g1/keyboard.json index 6aca0c9bac..20cd78d937 100644 --- a/keyboards/keebio/iris_lm/g1/keyboard.json +++ b/keyboards/keebio/iris_lm/g1/keyboard.json @@ -33,6 +33,9 @@ ] } }, + "handedness": { + "pin": "A0" + }, "matrix_pins": { "right": { "cols": ["C11", "C13", "B6", "B9", "B12", "B2"], diff --git a/keyboards/keebio/iris_lm/k1/config.h b/keyboards/keebio/iris_lm/k1/config.h index 952033edf1..ca19ea6402 100644 --- a/keyboards/keebio/iris_lm/k1/config.h +++ b/keyboards/keebio/iris_lm/k1/config.h @@ -13,14 +13,11 @@ #define SERIAL_USART_PIN_SWAP #define USB_VBUS_PIN C6 -#define SPLIT_HAND_PIN A0 /* Defines for the RGB matrix */ -#ifdef RGB_MATRIX_ENABLE -# define WS2812_PWM_DRIVER PWMD3 -# define WS2812_PWM_CHANNEL 4 -# define WS2812_PWM_PAL_MODE 10 -# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -# define WS2812_DMA_CHANNEL 2 -# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP -#endif +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 10 +#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/iris_lm/k1/keyboard.json b/keyboards/keebio/iris_lm/k1/keyboard.json index e5b0d5c655..3a86f6253b 100644 --- a/keyboards/keebio/iris_lm/k1/keyboard.json +++ b/keyboards/keebio/iris_lm/k1/keyboard.json @@ -18,6 +18,9 @@ }, "split": { "enabled": true, + "handedness": { + "pin": "A0" + }, "matrix_pins": { "right": { "cols": ["C11", "C13", "B6", "B9", "B12", "B2"], diff --git a/keyboards/keebio/kbo5000/keymaps/default/keymap.c b/keyboards/keebio/kbo5000/keymaps/default/keymap.c index e164711fc9..e3ad5fe6fa 100644 --- a/keyboards/keebio/kbo5000/keymaps/default/keymap.c +++ b/keyboards/keebio/kbo5000/keymaps/default/keymap.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include QMK_KEYBOARD_H enum encoder_names { diff --git a/keyboards/keebio/kbo5000/keymaps/iso/keymap.c b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c index b08c92d7e1..78b3023267 100644 --- a/keyboards/keebio/kbo5000/keymaps/iso/keymap.c +++ b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include QMK_KEYBOARD_H enum encoder_names { diff --git a/keyboards/keebio/kbo5000/readme.md b/keyboards/keebio/kbo5000/readme.md index 1f1f63889e..2208542122 100644 --- a/keyboards/keebio/kbo5000/readme.md +++ b/keyboards/keebio/kbo5000/readme.md @@ -15,6 +15,6 @@ Example of flashing this keyboard: Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. -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. +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). A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/keebio/laplace/keymaps/default/keymap.c b/keyboards/keebio/laplace/keymaps/default/keymap.c index fbd88c72af..c45a7956e5 100644 --- a/keyboards/keebio/laplace/keymaps/default/keymap.c +++ b/keyboards/keebio/laplace/keymaps/default/keymap.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include QMK_KEYBOARD_H #define _BASE 0 diff --git a/keyboards/keebio/laplace/readme.md b/keyboards/keebio/laplace/readme.md index 4292483bc8..f71efb0c37 100644 --- a/keyboards/keebio/laplace/readme.md +++ b/keyboards/keebio/laplace/readme.md @@ -1,11 +1,10 @@ -Laplace -======= +# Laplace A 40% staggered keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). -Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Pro Micro +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): @@ -13,8 +12,8 @@ Make example for this keyboard (after setting up your build environment): Example of flashing this keyboard: - make keebio/laplace:default:avrdude + make keebio/laplace:default:flash -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. +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). A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/keebio/levinson/keymaps/default/config.h b/keyboards/keebio/levinson/keymaps/default/config.h deleted file mode 100644 index be2d71e8f0..0000000000 --- a/keyboards/keebio/levinson/keymaps/default/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2018 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 - -/* Select hand configuration */ -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/keebio/levinson/keymaps/default/keymap.c b/keyboards/keebio/levinson/keymaps/default/keymap.c index 20be1edd39..b3f4e17124 100644 --- a/keyboards/keebio/levinson/keymaps/default/keymap.c +++ b/keyboards/keebio/levinson/keymaps/default/keymap.c @@ -1,5 +1,7 @@ -#include QMK_KEYBOARD_H +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H // 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. diff --git a/keyboards/keebio/levinson/levinson.c b/keyboards/keebio/levinson/levinson.c index 6f1a050e80..e78585b731 100644 --- a/keyboards/keebio/levinson/levinson.c +++ b/keyboards/keebio/levinson/levinson.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" #ifdef SWAP_HANDS_ENABLE diff --git a/keyboards/keebio/levinson/readme.md b/keyboards/keebio/levinson/readme.md index f328aa4205..2c63b7d8f5 100644 --- a/keyboards/keebio/levinson/readme.md +++ b/keyboards/keebio/levinson/readme.md @@ -1,11 +1,10 @@ -Levinson -======== +# Levinson A split 40% split 4x12 ortholinear keyboard made and sold by Keebio. It's essentially a Let's Split with LED backlight support and 2u thumb key support. [More info at Keebio](https://keeb.io). -Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro, Elite-C -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Pro Micro, Elite-C +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): @@ -13,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): Example of flashing this keyboard with Pro micro: - make keebio/levinson/rev3:default:avrdude + make keebio/levinson/rev3:default:flash Example of flashing this keyboard with Elite-C: diff --git a/keyboards/keebio/nyquist/readme.md b/keyboards/keebio/nyquist/readme.md index 40e7ebf3d2..1bfcd59bfa 100644 --- a/keyboards/keebio/nyquist/readme.md +++ b/keyboards/keebio/nyquist/readme.md @@ -1,11 +1,10 @@ -Nyquist -======= +# Nyquist A split 60% split 5x12 ortholinear keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). -Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro, ATmega32u4 -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Pro Micro, ATmega32u4 +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): @@ -15,6 +14,6 @@ Example of flashing this keyboard: make keebio/nyquist/rev3:default:flash -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. +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). A build guide for this keyboard can be found here: [Nyquist Build Guide](https://docs.keeb.io) diff --git a/keyboards/keebio/nyquist/rev5/config.h b/keyboards/keebio/nyquist/rev5/config.h index c4bbd6c5b2..f05cd8695f 100644 --- a/keyboards/keebio/nyquist/rev5/config.h +++ b/keyboards/keebio/nyquist/rev5/config.h @@ -3,8 +3,6 @@ #pragma once -#define SPLIT_HAND_PIN GP23 - #define USB_VBUS_PIN GP18 #define SERIAL_USART_FULL_DUPLEX diff --git a/keyboards/keebio/nyquist/rev5/keyboard.json b/keyboards/keebio/nyquist/rev5/keyboard.json index fc03c00e29..6ff3dd3821 100644 --- a/keyboards/keebio/nyquist/rev5/keyboard.json +++ b/keyboards/keebio/nyquist/rev5/keyboard.json @@ -25,6 +25,9 @@ ] } }, + "handedness": { + "pin": "GP23" + }, "matrix_pins": { "right":{ "cols": ["GP25", "GP29", "GP20", "GP11", "GP3", "GP2"], diff --git a/keyboards/keebio/quefrency/keymaps/default/config.h b/keyboards/keebio/quefrency/keymaps/default/config.h deleted file mode 100644 index 53bf8fb933..0000000000 --- a/keyboards/keebio/quefrency/keymaps/default/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2018 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/quefrency/keymaps/default/keymap.c b/keyboards/keebio/quefrency/keymaps/default/keymap.c index 48dcd73eff..35fb3eec1b 100644 --- a/keyboards/keebio/quefrency/keymaps/default/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default/keymap.c @@ -12,10 +12,6 @@ enum custom_layer { _FN1, }; -enum custom_keycodes { - QWERTY = SAFE_RANGE, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_65_with_macro( KC_F1, KC_F2, 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_DEL, KC_BSPC, KC_HOME, diff --git a/keyboards/keebio/quefrency/keymaps/default60/keymap.c b/keyboards/keebio/quefrency/keymaps/default60/keymap.c index f3545dfbdc..2f06f69309 100644 --- a/keyboards/keebio/quefrency/keymaps/default60/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default60/keymap.c @@ -12,10 +12,6 @@ enum custom_layer { _FN1, }; -enum custom_keycodes { - QWERTY = SAFE_RANGE, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_60( 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_DEL, KC_BSPC, diff --git a/keyboards/keebio/quefrency/keymaps/default65/keymap.c b/keyboards/keebio/quefrency/keymaps/default65/keymap.c index 980dd95eed..0cdc7dbcdc 100644 --- a/keyboards/keebio/quefrency/keymaps/default65/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65/keymap.c @@ -3,8 +3,6 @@ #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 @@ -12,10 +10,6 @@ extern keymap_config_t keymap_config; #define _BASE 0 #define _FN1 1 -enum custom_keycodes { - QWERTY = SAFE_RANGE, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_65( 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_DEL, KC_BSPC, KC_HOME, diff --git a/keyboards/keebio/quefrency/readme.md b/keyboards/keebio/quefrency/readme.md index dd2bde88f4..2138a5d14b 100644 --- a/keyboards/keebio/quefrency/readme.md +++ b/keyboards/keebio/quefrency/readme.md @@ -1,11 +1,10 @@ -Quefrency -========= +# Quefrency A split 60/65% staggered keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). -Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro (Rev. 1), ATmega32u4 (Rev. 2 & 3) -Hardware Availability: [Keebio](https://keeb.io/) +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Pro Micro (Rev. 1), ATmega32u4 (Rev. 2 & 3) +* Hardware Availability: [Keebio](https://keeb.io/) Make example for this keyboard (after setting up your build environment): @@ -17,6 +16,6 @@ Example of flashing this keyboard: Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. -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. +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). A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/keebio/quefrency/rev6/config.h b/keyboards/keebio/quefrency/rev6/config.h index 952033edf1..ca19ea6402 100644 --- a/keyboards/keebio/quefrency/rev6/config.h +++ b/keyboards/keebio/quefrency/rev6/config.h @@ -13,14 +13,11 @@ #define SERIAL_USART_PIN_SWAP #define USB_VBUS_PIN C6 -#define SPLIT_HAND_PIN A0 /* Defines for the RGB matrix */ -#ifdef RGB_MATRIX_ENABLE -# define WS2812_PWM_DRIVER PWMD3 -# define WS2812_PWM_CHANNEL 4 -# define WS2812_PWM_PAL_MODE 10 -# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 -# define WS2812_DMA_CHANNEL 2 -# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP -#endif +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 10 +#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/quefrency/rev6/keyboard.json b/keyboards/keebio/quefrency/rev6/keyboard.json index 84629eb4cf..ac488daa08 100644 --- a/keyboards/keebio/quefrency/rev6/keyboard.json +++ b/keyboards/keebio/quefrency/rev6/keyboard.json @@ -200,12 +200,18 @@ ] } }, + "handedness": { + "pin": "A0" + }, "matrix_pins": { "right": { "cols": ["B2", "B1", "B0", "B12", "B13", "A7", "B6", "C13", "C14"], "rows": ["A5", "A4", "A3", "B5", "F1"] } }, + "serial": { + "driver": "usart" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/keebio/quefrency/rev6/rules.mk b/keyboards/keebio/quefrency/rev6/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/keebio/quefrency/rev6/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/keebio/rorschach/keymaps/default/config.h b/keyboards/keebio/rorschach/keymaps/default/config.h deleted file mode 100644 index da32daebb3..0000000000 --- a/keyboards/keebio/rorschach/keymaps/default/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2018 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 - -/* Select hand configuration */ -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/keebio/rorschach/keymaps/default/keymap.c b/keyboards/keebio/rorschach/keymaps/default/keymap.c index 2949164c34..df03718193 100644 --- a/keyboards/keebio/rorschach/keymaps/default/keymap.c +++ b/keyboards/keebio/rorschach/keymaps/default/keymap.c @@ -1,5 +1,7 @@ -#include QMK_KEYBOARD_H +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H enum layer_names { _QWERTY, diff --git a/keyboards/keebio/rorschach/readme.md b/keyboards/keebio/rorschach/readme.md index 1a623a5353..f048cd307a 100644 --- a/keyboards/keebio/rorschach/readme.md +++ b/keyboards/keebio/rorschach/readme.md @@ -1,11 +1,10 @@ -Rorschach -========= +# Rorschach A split ortholinear 4x6 keyboard with 2 additional thumb keys and sold by Keebio. [More info at Keebio](https://keeb.io). -Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Pro Micro +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): @@ -13,8 +12,8 @@ Make example for this keyboard (after setting up your build environment): Example of flashing this keyboard: - make keebio/rorschach/rev1:default:avrdude + make keebio/rorschach/rev1:default:flash -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. +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). A build guide for this keyboard can be found here: [Iris Build Guide](https://docs.keeb.io/iris-build-guide.html) diff --git a/keyboards/keebio/sinc/readme.md b/keyboards/keebio/sinc/readme.md index 29d9ed0415..9ffdf29c42 100644 --- a/keyboards/keebio/sinc/readme.md +++ b/keyboards/keebio/sinc/readme.md @@ -15,6 +15,6 @@ Example of flashing this keyboard: Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. -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. +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). A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/keebio/tragicforce68/keymaps/default/keymap.c b/keyboards/keebio/tragicforce68/keymaps/default/keymap.c index 59076d4ecf..ee1c567c1b 100644 --- a/keyboards/keebio/tragicforce68/keymaps/default/keymap.c +++ b/keyboards/keebio/tragicforce68/keymaps/default/keymap.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include QMK_KEYBOARD_H #define _QWERTY 0 diff --git a/keyboards/keebio/tragicforce68/readme.md b/keyboards/keebio/tragicforce68/readme.md index c3ea92d7ad..07a673e848 100644 --- a/keyboards/keebio/tragicforce68/readme.md +++ b/keyboards/keebio/tragicforce68/readme.md @@ -1,11 +1,10 @@ -Tragicforce 68 -=============== +# Tragicforce 68 Magicforce 68 with [Tragicforce 68 replacement PCB](https://keeb.io/products/mf68-magicforce-68-pcb-replacement-kit) from Keebio. -Keyboard Maintainer: [Keebio](https://keeb.io) -Hardware Supported: Pro Micro -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [Keebio](https://keeb.io) +* Hardware Supported: Pro Micro +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): @@ -13,6 +12,6 @@ Make example for this keyboard (after setting up your build environment): Example of flashing this keyboard: - make keebio/tragicforce68:default:avrdude + make keebio/tragicforce68:default:flash -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. +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/keebio/tukey/readme.md b/keyboards/keebio/tukey/readme.md index 21527b6bf4..7e0334084c 100644 --- a/keyboards/keebio/tukey/readme.md +++ b/keyboards/keebio/tukey/readme.md @@ -2,12 +2,16 @@ 2-key keyboard for Big Switches -Keyboard Maintainer: [nooges/Keebio](https://github.com/nooges) -Hardware Supported: Pro Micro, Elite-C -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [nooges/Keebio](https://github.com/nooges) +* Hardware Supported: Pro Micro, Elite-C +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): make keebio/tukey:default +Example of flashing this keyboard: + + make keebio/tukey: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/keebio/viterbi/keymaps/default/config.h b/keyboards/keebio/viterbi/keymaps/default/config.h index acc5970dcb..ffe91d3bee 100644 --- a/keyboards/keebio/viterbi/keymaps/default/config.h +++ b/keyboards/keebio/viterbi/keymaps/default/config.h @@ -17,13 +17,6 @@ along with this program. If not, see . #pragma once -// #define USE_I2C - -/* Select hand configuration */ - -// #define MASTER_RIGHT -// #define EE_HANDS - #undef RGBLIGHT_LED_COUNT #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/keebio/viterbi/keymaps/default/keymap.c b/keyboards/keebio/viterbi/keymaps/default/keymap.c index e37fc8f790..4a658ac6ec 100644 --- a/keyboards/keebio/viterbi/keymaps/default/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/default/keymap.c @@ -1,5 +1,7 @@ -#include QMK_KEYBOARD_H +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H // 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. diff --git a/keyboards/keebio/viterbi/readme.md b/keyboards/keebio/viterbi/readme.md index 2e475100b6..393fd6bbfb 100644 --- a/keyboards/keebio/viterbi/readme.md +++ b/keyboards/keebio/viterbi/readme.md @@ -1,21 +1,19 @@ -Viterbi -======= +# Viterbi A split 5x14 ortholinear keyboard kit made and sold by Keebio. [More info at Keebio](https://keeb.io) -Keyboard Maintainer: [Bakingpy](https://github.com/nooges) -Hardware Supported: Pro Micro -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [Bakingpy](https://github.com/nooges) +* Hardware Supported: Pro Micro +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): make keebio/viterbi/rev1:default - Example of flashing this keyboard: - make keebio/viterbi/rev1:default:avrdude + make keebio/viterbi/rev1:default:flash -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. +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). A build guide for this keyboard can be found here: [Viterbi Build Guide](https://docs.keeb.io) diff --git a/keyboards/keebio/wavelet/keymaps/default/keymap.c b/keyboards/keebio/wavelet/keymaps/default/keymap.c index 20be1edd39..b3f4e17124 100644 --- a/keyboards/keebio/wavelet/keymaps/default/keymap.c +++ b/keyboards/keebio/wavelet/keymaps/default/keymap.c @@ -1,5 +1,7 @@ -#include QMK_KEYBOARD_H +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H // 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. diff --git a/keyboards/keebio/wavelet/readme.md b/keyboards/keebio/wavelet/readme.md index a107289bb4..e77344bfb6 100644 --- a/keyboards/keebio/wavelet/readme.md +++ b/keyboards/keebio/wavelet/readme.md @@ -1,11 +1,10 @@ -Wavelet -======= +# Wavelet A 4x12 ortholinear keyboard using Kailh Choc Low-Profile switches made and sold by [Keebio](https://keeb.io). -Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) -Hardware Supported: Pro Micro -Hardware Availability: [Keebio](https://keeb.io) +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Supported: Pro Micro +* Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): @@ -13,8 +12,8 @@ Make example for this keyboard (after setting up your build environment): Example of flashing this keyboard: - make keebio/wavelet:default:avrdude + make keebio/wavelet:default:flash -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. +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). A build guide for this keyboard can be found here: [Levinson Build Guide](https://docs.keeb.io) diff --git a/keyboards/keebio/wavelet/wavelet.c b/keyboards/keebio/wavelet/wavelet.c index 6f1a050e80..e78585b731 100644 --- a/keyboards/keebio/wavelet/wavelet.c +++ b/keyboards/keebio/wavelet/wavelet.c @@ -1,3 +1,6 @@ +// Copyright 2025 Keebio (@keebio) +// SPDX-License-Identifier: GPL-2.0-or-later + #include "quantum.h" #ifdef SWAP_HANDS_ENABLE From a4b112b1efa1e47bf0cd7da7ffd2120e9dfb6ce0 Mon Sep 17 00:00:00 2001 From: silvinor <366673+silvinor@users.noreply.github.com> Date: Sat, 20 Sep 2025 13:37:18 +1000 Subject: [PATCH 43/95] [keyboard] Binepad KnobX1 - refactor `x1_layer_led` function as weak (#25668) refactor `x1_layer_led` function as weak --- keyboards/binepad/knobx1/knobx1.c | 7 +++++++ keyboards/binepad/knobx1/knobx1.h | 8 +------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/keyboards/binepad/knobx1/knobx1.c b/keyboards/binepad/knobx1/knobx1.c index 7f299b67e3..37602ca78c 100644 --- a/keyboards/binepad/knobx1/knobx1.c +++ b/keyboards/binepad/knobx1/knobx1.c @@ -9,6 +9,13 @@ # define X1_KEYMAP_LAYER_COUNT 4 #endif +__attribute__((weak)) void x1_layer_led(uint8_t lyr) { + gpio_write_pin(IND1_LED, lyr >= 0); + gpio_write_pin(IND2_LED, lyr >= 1); + gpio_write_pin(IND3_LED, lyr >= 2); + gpio_write_pin(IND4_LED, lyr >= 3); +} + void keyboard_pre_init_kb(void) { const pin_t indicator_leds[4] = {IND1_LED, IND2_LED, IND3_LED, IND4_LED}; for (int i = 0; i < 4; i++) { diff --git a/keyboards/binepad/knobx1/knobx1.h b/keyboards/binepad/knobx1/knobx1.h index 7645124057..3932fbd448 100644 --- a/keyboards/binepad/knobx1/knobx1.h +++ b/keyboards/binepad/knobx1/knobx1.h @@ -38,12 +38,6 @@ static inline void x1_led_3_off(void) { gpio_write_pin_low(IND3_LED); } static inline void x1_led_4_off(void) { gpio_write_pin_low(IND4_LED); } // clang-format on -static inline void x1_layer_led(uint8_t lyr) { - gpio_write_pin(IND1_LED, lyr >= 0); - gpio_write_pin(IND2_LED, lyr >= 1); - gpio_write_pin(IND3_LED, lyr >= 2); - gpio_write_pin(IND4_LED, lyr >= 3); -} - +void x1_layer_led(uint8_t lyr); bool process_x1_layer_up(keyrecord_t *record); bool process_x1_layer_down(keyrecord_t *record); From 115bf771a8b07bd571ccac52f091e081794d40fd Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 21 Sep 2025 21:40:30 +1000 Subject: [PATCH 44/95] Custom oled fonts cleanup (#25665) --- keyboards/anavi/macropad8/config.h | 7 +- keyboards/anavi/macropad8/glcdfont.c | 232 --------------- keyboards/gkeyboard/greatpad/config.h | 8 +- keyboards/gkeyboard/greatpad/lib/glcdfont.c | 236 ---------------- .../kimiko/keymaps/default/glcdfont.c | 237 ---------------- .../{ => rev1}/keymaps/default/config.h | 4 - .../{ => rev1}/keymaps/default/keymap.c | 0 .../{ => rev1}/keymaps/default/rules.mk | 1 - .../kimiko/{post_config.h => rev2/config.h} | 6 +- .../keycapsss/kimiko/{ => rev2}/glcdfont.c | 0 .../{ => rev3}/keymaps/oled/config.h | 2 +- .../{ => rev3}/keymaps/oled/keymap.c | 0 .../{ => rev3}/keymaps/oled/readme.md | 0 .../{ => rev3}/keymaps/oled/rules.mk | 0 .../{keymaps/oled => rev3/lib}/glcdfont.c | 0 .../marksard/treadstone48/common/glcdfont.c | 233 --------------- .../treadstone48/keymaps/default/config.h | 2 - .../rev1/keymaps/like_jis_rs/config.h | 2 - keyboards/orthodox/common/glcdfont.c | 265 ------------------ keyboards/rate/pistachio_pro/config.h | 1 - keyboards/rate/pistachio_pro/lib/glcdfont.c | 232 --------------- keyboards/rgbkb/zygomorph/common/glcdfont.c | 233 --------------- 22 files changed, 8 insertions(+), 1693 deletions(-) delete mode 100644 keyboards/anavi/macropad8/glcdfont.c delete mode 100644 keyboards/gkeyboard/greatpad/lib/glcdfont.c delete mode 100644 keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c rename keyboards/keycapsss/kimiko/{ => rev1}/keymaps/default/config.h (91%) rename keyboards/keycapsss/kimiko/{ => rev1}/keymaps/default/keymap.c (100%) rename keyboards/keycapsss/kimiko/{ => rev1}/keymaps/default/rules.mk (95%) rename keyboards/keycapsss/kimiko/{post_config.h => rev2/config.h} (87%) rename keyboards/keycapsss/kimiko/{ => rev2}/glcdfont.c (100%) rename keyboards/keycapsss/plaid_pad/{ => rev3}/keymaps/oled/config.h (90%) rename keyboards/keycapsss/plaid_pad/{ => rev3}/keymaps/oled/keymap.c (100%) rename keyboards/keycapsss/plaid_pad/{ => rev3}/keymaps/oled/readme.md (100%) rename keyboards/keycapsss/plaid_pad/{ => rev3}/keymaps/oled/rules.mk (100%) rename keyboards/keycapsss/plaid_pad/{keymaps/oled => rev3/lib}/glcdfont.c (100%) delete mode 100644 keyboards/marksard/treadstone48/common/glcdfont.c delete mode 100644 keyboards/orthodox/common/glcdfont.c delete mode 100644 keyboards/rate/pistachio_pro/lib/glcdfont.c delete mode 100644 keyboards/rgbkb/zygomorph/common/glcdfont.c diff --git a/keyboards/anavi/macropad8/config.h b/keyboards/anavi/macropad8/config.h index f7c7b4b44c..edcc85f722 100644 --- a/keyboards/anavi/macropad8/config.h +++ b/keyboards/anavi/macropad8/config.h @@ -17,8 +17,5 @@ along with this program. If not, see . #pragma once -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define OLED_TIMEOUT 60000 -# define OLED_FONT_H "keyboards/anavi/macropad8/glcdfont.c" -#endif +#define OLED_DISPLAY_128X64 +#define OLED_TIMEOUT 60000 diff --git a/keyboards/anavi/macropad8/glcdfont.c b/keyboards/anavi/macropad8/glcdfont.c deleted file mode 100644 index 10ce3b3457..0000000000 --- a/keyboards/anavi/macropad8/glcdfont.c +++ /dev/null @@ -1,232 +0,0 @@ -#include "progmem.h" - -// Corne 8x6 font with QMK Firmware Logo -// Online editor: https://helixfonteditor.netlify.com/ - -// clang-format off -const unsigned char font[] PROGMEM = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, -0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, -0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, -0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, -0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, -0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, -0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, -0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, -0x00, 0x18, 0x24, 0x18, 0x00, 0x00, -0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, -0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, -0x26, 0x29, 0x79, 0x29, 0x26, 0x00, -0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, -0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, -0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, -0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, -0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, -0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, -0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, -0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, -0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, -0x60, 0x60, 0x60, 0x60, 0x60, 0x00, -0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, -0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, -0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, -0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, -0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, -0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, -0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, -0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, -0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, -0x00, 0x07, 0x00, 0x07, 0x00, 0x00, -0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, -0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, -0x23, 0x13, 0x08, 0x64, 0x62, 0x00, -0x36, 0x49, 0x56, 0x20, 0x50, 0x00, -0x00, 0x08, 0x07, 0x03, 0x00, 0x00, -0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, -0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, -0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, -0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, -0x00, 0x80, 0x70, 0x30, 0x00, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x00, -0x00, 0x00, 0x60, 0x60, 0x00, 0x00, -0x20, 0x10, 0x08, 0x04, 0x02, 0x00, -0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, -0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, -0x72, 0x49, 0x49, 0x49, 0x46, 0x00, -0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, -0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, -0x27, 0x45, 0x45, 0x45, 0x39, 0x00, -0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, -0x41, 0x21, 0x11, 0x09, 0x07, 0x00, -0x36, 0x49, 0x49, 0x49, 0x36, 0x00, -0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, -0x00, 0x00, 0x14, 0x00, 0x00, 0x00, -0x00, 0x40, 0x34, 0x00, 0x00, 0x00, -0x00, 0x08, 0x14, 0x22, 0x41, 0x00, -0x14, 0x14, 0x14, 0x14, 0x14, 0x00, -0x00, 0x41, 0x22, 0x14, 0x08, 0x00, -0x02, 0x01, 0x59, 0x09, 0x06, 0x00, -0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, -0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, -0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, -0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, -0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, -0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, -0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, -0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, -0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, -0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, -0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, -0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, -0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, -0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, -0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, -0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, -0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, -0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, -0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, -0x26, 0x49, 0x49, 0x49, 0x32, 0x00, -0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, -0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, -0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, -0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, -0x63, 0x14, 0x08, 0x14, 0x63, 0x00, -0x03, 0x04, 0x78, 0x04, 0x03, 0x00, -0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, -0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, -0x02, 0x04, 0x08, 0x10, 0x20, 0x00, -0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, -0x04, 0x02, 0x01, 0x02, 0x04, 0x00, -0x40, 0x40, 0x40, 0x40, 0x40, 0x00, -0x00, 0x03, 0x07, 0x08, 0x00, 0x00, -0x20, 0x54, 0x54, 0x78, 0x40, 0x00, -0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, -0x38, 0x44, 0x44, 0x44, 0x28, 0x00, -0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, -0x38, 0x54, 0x54, 0x54, 0x18, 0x00, -0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, -0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, -0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, -0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, -0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, -0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, -0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, -0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, -0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, -0x38, 0x44, 0x44, 0x44, 0x38, 0x00, -0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, -0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, -0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, -0x48, 0x54, 0x54, 0x54, 0x24, 0x00, -0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, -0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, -0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, -0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, -0x44, 0x28, 0x10, 0x28, 0x44, 0x00, -0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, -0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, -0x00, 0x08, 0x36, 0x41, 0x00, 0x00, -0x00, 0x00, 0x77, 0x00, 0x00, 0x00, -0x00, 0x41, 0x36, 0x08, 0x00, 0x00, -0x02, 0x01, 0x02, 0x04, 0x02, 0x00, -0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, -0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0, -0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, -0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, -0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, -0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, -0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, -0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, -0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, -0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0, -0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, -0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, -0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, -0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, -0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, -0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, -0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, -0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, -0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, -0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, -0xDE, 0xD7, 0xDC, 0x00, 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, 0xF8, 0xFC, 0xFE, -0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x81, -0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF, -0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, -0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, -0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, -0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, -0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, -0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, -0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, -0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, -0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, -0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, -0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, -0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, -0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, -0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F, -0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F, -0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, -0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C, -0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x03, 0x07, 0x07, -0x07, 0x07, 0x07, 0x07, 0x07, 0x07, -0x03, 0x01, 0x00, 0x00, 0x00, 0x00, -0x01, 0x03, 0x07, 0x07, 0x07, 0x07, -0x07, 0x07, 0x07, 0x07, 0x03, 0x01, -0x00, 0x00, 0x00, 0x07, 0x07, 0x07, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x07, 0x07, 0x07, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x07, 0x07, -0x07, 0x00, 0x00, 0x00, 0x01, 0x03, -0x07, 0x07, 0x07, 0x07, 0x07, 0x07, -0x07, 0x07, 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, -}; diff --git a/keyboards/gkeyboard/greatpad/config.h b/keyboards/gkeyboard/greatpad/config.h index 4c745779b4..3ea0c44f9b 100644 --- a/keyboards/gkeyboard/greatpad/config.h +++ b/keyboards/gkeyboard/greatpad/config.h @@ -3,9 +3,9 @@ #pragma once -#define OLED_DISPLAY_128X64 -#define I2C1_SCL_PIN GP21 -#define I2C1_SDA_PIN GP20 #define I2C_DRIVER I2CD0 +#define I2C1_SCL_PIN GP21 +#define I2C1_SDA_PIN GP20 + +#define OLED_DISPLAY_128X64 #define OLED_BRIGHTNESS 128 -#define OLED_FONT_H "lib/glcdfont.c" diff --git a/keyboards/gkeyboard/greatpad/lib/glcdfont.c b/keyboards/gkeyboard/greatpad/lib/glcdfont.c deleted file mode 100644 index 10ced2bb2b..0000000000 --- a/keyboards/gkeyboard/greatpad/lib/glcdfont.c +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright 2023 gkeyboard (@gkeyboard) -// SPDX-License-Identifier: GPL-2.0-or-later - -// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. -// See gfxfont.h for newer custom bitmap font info. - -#pragma once - -#include "progmem.h" - -static const unsigned char PROGMEM font[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, - 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, - 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, - 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, - 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, - 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, - 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, - 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, - 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, - 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, - 0x94, 0xB6, 0xFF, 0xB6, 0x94, 0x00, - 0x08, 0x0C, 0x7E, 0x0C, 0x08, 0x00, - 0x10, 0x30, 0x7E, 0x30, 0x10, 0x00, - 0x08, 0x08, 0x3E, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x3E, 0x08, 0x08, 0x00, - 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, - 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, - 0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00, - 0x2E, 0x2A, 0x7F, 0x2A, 0x3A, 0x00, - 0x20, 0x12, 0x08, 0x24, 0x02, 0x00, - 0x37, 0x49, 0x49, 0x37, 0x50, 0x00, - 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, - 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, - 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, - 0x7F, 0x51, 0x49, 0x45, 0x7F, 0x00, - 0x08, 0x04, 0x02, 0x7F, 0x00, 0x00, - 0x71, 0x49, 0x49, 0x49, 0x4F, 0x00, - 0x41, 0x41, 0x49, 0x49, 0x77, 0x00, - 0x0F, 0x10, 0x10, 0x10, 0x7F, 0x00, - 0x4F, 0x49, 0x49, 0x49, 0x71, 0x00, - 0x7E, 0x49, 0x49, 0x49, 0x70, 0x00, - 0x01, 0x01, 0x71, 0x09, 0x07, 0x00, - 0x77, 0x49, 0x49, 0x49, 0x77, 0x00, - 0x07, 0x49, 0x49, 0x49, 0x3F, 0x00, - 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, - 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, - 0x01, 0x01, 0x59, 0x09, 0x0F, 0x00, - 0x7F, 0x41, 0x5D, 0x59, 0x4F, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x7F, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x76, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x41, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x7E, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x49, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x09, 0x00, - 0x7F, 0x41, 0x41, 0x49, 0x7B, 0x00, - 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, - 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, - 0x70, 0x40, 0x40, 0x40, 0x7F, 0x00, - 0x7F, 0x08, 0x08, 0x08, 0x77, 0x00, - 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x7F, 0x01, 0x1F, 0x01, 0x7F, 0x00, - 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x0F, 0x00, - 0x7F, 0x41, 0x71, 0x41, 0x7F, 0x00, - 0x7F, 0x09, 0x09, 0x19, 0x6F, 0x00, - 0x47, 0x49, 0x49, 0x49, 0x79, 0x00, - 0x01, 0x01, 0x7F, 0x01, 0x01, 0x00, - 0x7F, 0x40, 0x40, 0x40, 0x7F, 0x00, - 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, - 0x7F, 0x40, 0x7F, 0x40, 0x7F, 0x00, - 0x77, 0x08, 0x08, 0x08, 0x77, 0x00, - 0x4F, 0x48, 0x48, 0x48, 0x7F, 0x00, - 0x61, 0x51, 0x49, 0x45, 0x43, 0x00, - 0x00, 0x7F, 0x41, 0x41, 0x00, 0x00, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, - 0x00, 0x41, 0x41, 0x7F, 0x00, 0x00, - 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, - 0x60, 0x54, 0x54, 0x54, 0x7C, 0x00, - 0x7F, 0x44, 0x44, 0x44, 0x78, 0x00, - 0x7C, 0x44, 0x44, 0x44, 0x44, 0x00, - 0x78, 0x44, 0x44, 0x44, 0x7F, 0x00, - 0x7C, 0x54, 0x54, 0x54, 0x5C, 0x00, - 0x08, 0x7F, 0x09, 0x09, 0x09, 0x00, - 0x38, 0xA4, 0xA4, 0xA4, 0xFC, 0x00, - 0x7F, 0x04, 0x04, 0x04, 0x78, 0x00, - 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, - 0x70, 0x40, 0x40, 0x7D, 0x00, 0x00, - 0x7F, 0x08, 0x08, 0x08, 0x76, 0x00, - 0x00, 0x00, 0x7F, 0x40, 0x00, 0x00, - 0x7C, 0x04, 0x7C, 0x04, 0x7C, 0x00, - 0x7C, 0x04, 0x04, 0x04, 0x78, 0x00, - 0x7C, 0x44, 0x44, 0x44, 0x7C, 0x00, - 0xFC, 0x24, 0x24, 0x24, 0x38, 0x00, - 0x38, 0x24, 0x24, 0x24, 0xFC, 0x00, - 0x7C, 0x04, 0x04, 0x04, 0x04, 0x00, - 0x5C, 0x54, 0x54, 0x54, 0x74, 0x00, - 0x04, 0x04, 0x7F, 0x04, 0x04, 0x00, - 0x7C, 0x40, 0x40, 0x40, 0x7C, 0x00, - 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, - 0x7C, 0x40, 0x7C, 0x40, 0x7C, 0x00, - 0x6C, 0x10, 0x10, 0x10, 0x6C, 0x00, - 0xBC, 0xA0, 0xA0, 0xA0, 0xFC, 0x00, - 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, - 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, - 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, - 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0, - 0xF0, 0xFE, 0xFF, 0x9F, 0x0F, 0x0F, - 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, - 0x0F, 0x0F, 0x9F, 0xFF, 0xFE, 0xF0, - 0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00, - 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, - 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x10, 0x08, 0x04, 0x02, 0x02, - 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x02, 0x02, 0x02, 0x04, 0x08, - 0x10, 0xE0, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0xFF, - 0x7F, 0x51, 0x55, 0x55, 0x45, 0x7F, - 0x41, 0x5F, 0x5F, 0x5F, 0x7F, 0x00, - 0x7F, 0x41, 0x7B, 0x77, 0x41, 0x7F, - 0x41, 0x5F, 0x5F, 0x5F, 0x7F, 0x00, - 0x7F, 0x41, 0x5D, 0x5D, 0x5D, 0x7F, - 0x41, 0x5F, 0x5F, 0x5F, 0x7F, 0x00, - 0xC0, 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, - 0xE6, 0xF7, 0xF3, 0xF0, 0x60, 0x00, - 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, - 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, - 0xF8, 0x1C, 0xDE, 0x1F, 0xFF, 0xFF, - 0xFF, 0x1F, 0xDE, 0x1C, 0xF8, 0x00, - 0xC0, 0xE2, 0xB4, 0xF8, 0xF8, 0xF8, - 0xF8, 0xF8, 0xB4, 0xE2, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x0F, 0x0F, 0x0F, - 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, - 0x87, 0xE1, 0xF9, 0xF9, 0xE1, 0x87, - 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, - 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, - 0xFF, 0x00, 0x00, 0xC0, 0x30, 0x0C, - 0x33, 0xC0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, - 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, - 0xFF, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x38, 0xC8, 0x08, 0x08, 0x0F, - 0x7E, 0x00, 0x00, 0x7F, 0x00, 0x00, - 0x78, 0x00, 0x00, 0x7E, 0x00, 0x00, - 0x24, 0x24, 0x12, 0x12, 0x24, 0x24, - 0x48, 0x48, 0x24, 0x24, 0x12, 0x12, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x3F, - 0x3F, 0x7F, 0x7F, 0x38, 0x10, 0x00, - 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, - 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, - 0x0F, 0x14, 0x21, 0x40, 0x45, 0x41, - 0x45, 0x40, 0x21, 0x14, 0x0F, 0x00, - 0x7D, 0x7D, 0x7D, 0x7D, 0x7D, 0x7D, - 0x7D, 0x7D, 0x7D, 0x7D, 0x7D, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3F, 0x0C, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x0C, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x3F, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x10, - 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x10, 0x10, 0x10, 0x08, 0x04, - 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x0C, 0x30, - 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, - 0x1C, 0x3E, 0x3E, 0x3E, 0x1C, 0x00, - 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x00, - 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; diff --git a/keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c b/keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c deleted file mode 100644 index c3c79d76ee..0000000000 --- a/keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright 2019 MechMerlin -// Copyright 2020 @ben_roe (keycapsss.com) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "progmem.h" - -// Corne 8x6 font -// Online editor: https://helixfonteditor.netlify.com -// or https://joric.github.io/qle/ -// See also: https://github.com/soundmonster/glcdfont_converter - -const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, - 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, - 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, - 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, - 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, - 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, - 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, - 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, - 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, - 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, - 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, - 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, - 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, - 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, - 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, - 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, - 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, - 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, - 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, - 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, - 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, - 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, - 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, - 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, - 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, - 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, - 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, - 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, - 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, - 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, - 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, - 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, - 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, - 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, - 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, - 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, - 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, - 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, - 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, - 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, - 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, - 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, - 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, - 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, - 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, - 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, - 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, - 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, - 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, - 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, - 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, - 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x13, 0x07, 0x08, 0x00, 0x00, - 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, - 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, - 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, - 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, - 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, - 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, - 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, - 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, - 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, - 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, - 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, - 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, - 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, - 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, - 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, - 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, - 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, - 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, - 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, - 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, - 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, - 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 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, 0x04, 0x22, 0x52, 0xE2, - 0x42, 0x42, 0x42, 0xE2, 0x52, 0x22, - 0x22, 0x22, 0x42, 0x82, 0x02, 0x02, - 0x22, 0x22, 0x02, 0x04, 0xF8, 0x00, - 0x00, 0xF8, 0x04, 0x02, 0x02, 0x82, - 0x42, 0x22, 0x42, 0x82, 0x02, 0x02, - 0x02, 0x82, 0x42, 0x22, 0x12, 0x22, - 0x42, 0x82, 0x02, 0x04, 0xF8, 0x00, - 0x00, 0xF8, 0xFC, 0xDE, 0xAE, 0x1E, - 0xBE, 0xBE, 0xBE, 0x1E, 0xAE, 0xDE, - 0xDE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, - 0xDE, 0xDE, 0xFE, 0xFC, 0xF8, 0x00, - 0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x7E, - 0xBE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, - 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, - 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, - 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, - 0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0, - 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, - 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, - 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, - 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, - 0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0, - 0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0, - 0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80, - 0x1F, 0x1F, 0x0E, 0x1B, 0x11, 0xC0, - 0x1F, 0x1F, 0x00, 0x1F, 0x1F, 0x06, - 0x0C, 0xC6, 0x1F, 0x1F, 0x80, 0x5F, - 0x1F, 0x00, 0x1F, 0x1F, 0x8E, 0x9B, - 0x91, 0x80, 0x9F, 0x9F, 0x91, 0x1F, - 0x00, 0x1F, 0x20, 0x44, 0x4A, 0x47, - 0x42, 0x42, 0x42, 0x47, 0x4A, 0x44, - 0x40, 0x40, 0x40, 0x40, 0x41, 0x42, - 0x44, 0x44, 0x40, 0x20, 0x1F, 0x00, - 0x00, 0x1F, 0x20, 0x40, 0x41, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x41, 0x40, - 0x41, 0x41, 0x4F, 0x48, 0x48, 0x48, - 0x4F, 0x41, 0x41, 0x20, 0x1F, 0x00, - 0x00, 0x1F, 0x3F, 0x7B, 0x75, 0x78, - 0x7D, 0x7D, 0x7D, 0x78, 0x75, 0x7B, - 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7D, - 0x7B, 0x7B, 0x7F, 0x3F, 0x1F, 0x00, - 0x00, 0x1F, 0x3F, 0x7F, 0x7E, 0x7F, - 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E, - 0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C, - 0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88, - 0x88, 0x88, 0x55, 0x55, 0x23, 0x23, - 0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47, - 0x23, 0x23, 0x55, 0x55, 0x88, 0x88, - 0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2, - 0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4, - 0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88, - 0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6, - 0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6, - 0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88, - 0x00, 0x84, 0x87, 0x7D, 0x55, 0x57, - 0x55, 0x7D, 0x87, 0x84, 0x00, 0x91, - 0x95, 0x55, 0x55, 0x3F, 0x55, 0x55, - 0x95, 0x91, 0x00, 0x08, 0x08, 0x08, - 0x88, 0xFC, 0x0A, 0x09, 0x08, 0x08, - 0x04, 0xF8, 0x00, 0x00, 0xF8, 0x04, - 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x20, - 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0x04, - 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x20, - 0x04, 0xF8, 0x00, 0x00, 0xF8, 0xFC, - 0x20, 0x1F, 0x00, 0x00, 0x1F, 0x3F, - 0xFC, 0xF8, 0x00, 0x00, 0xF8, 0xFC, - 0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x3F, - 0xFE, 0x7E, 0xBE, 0xDE, 0xEE, 0xDE, - 0xBE, 0x7E, 0xFE, 0xFC, 0xF8, 0x00, - 0x7E, 0x7E, 0x70, 0x77, 0x77, 0x77, - 0x70, 0x7E, 0x7E, 0x3F, 0x1F, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, - 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, - 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, - 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, - 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, - 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07, - 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, - 0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06, - 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, -}; diff --git a/keyboards/keycapsss/kimiko/keymaps/default/config.h b/keyboards/keycapsss/kimiko/rev1/keymaps/default/config.h similarity index 91% rename from keyboards/keycapsss/kimiko/keymaps/default/config.h rename to keyboards/keycapsss/kimiko/rev1/keymaps/default/config.h index 8be15d964a..fc6f93bec0 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/config.h +++ b/keyboards/keycapsss/kimiko/rev1/keymaps/default/config.h @@ -17,10 +17,6 @@ #pragma once -#define OLED_FONT_H "keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c" -// #define OLED_FONT_WIDTH 5 -// #define OLED_FONT_HEIGHT 7 - #ifdef RGBLIGHT_ENABLE # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 8 diff --git a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c b/keyboards/keycapsss/kimiko/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/keycapsss/kimiko/keymaps/default/keymap.c rename to keyboards/keycapsss/kimiko/rev1/keymaps/default/keymap.c diff --git a/keyboards/keycapsss/kimiko/keymaps/default/rules.mk b/keyboards/keycapsss/kimiko/rev1/keymaps/default/rules.mk similarity index 95% rename from keyboards/keycapsss/kimiko/keymaps/default/rules.mk rename to keyboards/keycapsss/kimiko/rev1/keymaps/default/rules.mk index ef4f0c0b43..16cecbdbc6 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/rules.mk +++ b/keyboards/keycapsss/kimiko/rev1/keymaps/default/rules.mk @@ -1,4 +1,3 @@ -OLED_ENABLE = yes ENCODER_ENABLE = yes # ENables the use of one or more encoders RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/keycapsss/kimiko/post_config.h b/keyboards/keycapsss/kimiko/rev2/config.h similarity index 87% rename from keyboards/keycapsss/kimiko/post_config.h rename to keyboards/keycapsss/kimiko/rev2/config.h index 31be5898cf..c728510c30 100644 --- a/keyboards/keycapsss/kimiko/post_config.h +++ b/keyboards/keycapsss/kimiko/rev2/config.h @@ -18,8 +18,4 @@ #pragma once -// OLED definitions -#ifndef OLED_FONT_H -# define OLED_FONT_H "keyboards/keycapsss/kimiko/glcdfont.c" -#endif - +#define OLED_FONT_H "keyboards/keycapsss/kimiko/rev2/glcdfont.c" diff --git a/keyboards/keycapsss/kimiko/glcdfont.c b/keyboards/keycapsss/kimiko/rev2/glcdfont.c similarity index 100% rename from keyboards/keycapsss/kimiko/glcdfont.c rename to keyboards/keycapsss/kimiko/rev2/glcdfont.c diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/config.h b/keyboards/keycapsss/plaid_pad/rev3/keymaps/oled/config.h similarity index 90% rename from keyboards/keycapsss/plaid_pad/keymaps/oled/config.h rename to keyboards/keycapsss/plaid_pad/rev3/keymaps/oled/config.h index ddb539fb09..74597b4253 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/oled/config.h +++ b/keyboards/keycapsss/plaid_pad/rev3/keymaps/oled/config.h @@ -17,4 +17,4 @@ #pragma once // place overrides here -#define OLED_FONT_H "keyboards/keycapsss/plaid_pad/keymaps/oled/glcdfont.c" +#define OLED_FONT_H "keyboards/keycapsss/plaid_pad/rev3/lib/glcdfont.c" diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c b/keyboards/keycapsss/plaid_pad/rev3/keymaps/oled/keymap.c similarity index 100% rename from keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c rename to keyboards/keycapsss/plaid_pad/rev3/keymaps/oled/keymap.c diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/readme.md b/keyboards/keycapsss/plaid_pad/rev3/keymaps/oled/readme.md similarity index 100% rename from keyboards/keycapsss/plaid_pad/keymaps/oled/readme.md rename to keyboards/keycapsss/plaid_pad/rev3/keymaps/oled/readme.md diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk b/keyboards/keycapsss/plaid_pad/rev3/keymaps/oled/rules.mk similarity index 100% rename from keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk rename to keyboards/keycapsss/plaid_pad/rev3/keymaps/oled/rules.mk diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/glcdfont.c b/keyboards/keycapsss/plaid_pad/rev3/lib/glcdfont.c similarity index 100% rename from keyboards/keycapsss/plaid_pad/keymaps/oled/glcdfont.c rename to keyboards/keycapsss/plaid_pad/rev3/lib/glcdfont.c diff --git a/keyboards/marksard/treadstone48/common/glcdfont.c b/keyboards/marksard/treadstone48/common/glcdfont.c deleted file mode 100644 index 003ce1a87b..0000000000 --- a/keyboards/marksard/treadstone48/common/glcdfont.c +++ /dev/null @@ -1,233 +0,0 @@ -// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. -// See gfxfont.h for newer custom bitmap font info. - -#include "progmem.h" - -// Standard ASCII 5x7 font - -static const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, - 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, - 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, - 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, - 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, - 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, - 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, - 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, - 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, - 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, - 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, - 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, - 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, - 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, - 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, - 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, - 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, - 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, - 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, - 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, - 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, - 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, - 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, - 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, - 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, - 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, - 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, - 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, - 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, - 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, - 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, - 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, - 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, - 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, - 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, - 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, - 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, - 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, - 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, - 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, - 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, - 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, - 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, - 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, - 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, - 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, - 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, - 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, - 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, - 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, - 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, - 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, - 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, - 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, - 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, - 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, - 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, - 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, - 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, - 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, - 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, - 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, - 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, - 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, - 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, - 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, - 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, - 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, - 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, - 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, - 0x4C, 0x10, 0x10, 0x10, 0x7C, 0x00, - 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, - 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, - 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; diff --git a/keyboards/marksard/treadstone48/keymaps/default/config.h b/keyboards/marksard/treadstone48/keymaps/default/config.h index a5f68e7a2b..ec84fb39f1 100644 --- a/keyboards/marksard/treadstone48/keymaps/default/config.h +++ b/keyboards/marksard/treadstone48/keymaps/default/config.h @@ -45,5 +45,3 @@ // If you plug in the USB on the right side, please enable MASTER_RIGHT // #define RHYMESTONE_RIGHTHAND - -#define OLED_FONT_H "keyboards/marksard/treadstone48/common/glcdfont.c" diff --git a/keyboards/marksard/treadstone48/rev1/keymaps/like_jis_rs/config.h b/keyboards/marksard/treadstone48/rev1/keymaps/like_jis_rs/config.h index f18bcf44e7..d5973a16d8 100644 --- a/keyboards/marksard/treadstone48/rev1/keymaps/like_jis_rs/config.h +++ b/keyboards/marksard/treadstone48/rev1/keymaps/like_jis_rs/config.h @@ -46,5 +46,3 @@ // If you plug in the USB on the right side, please enable MASTER_RIGHT // #define RHYMESTONE_RIGHTHAND - -#define OLED_FONT_H "keyboards/marksard/treadstone48/common/glcdfont.c" diff --git a/keyboards/orthodox/common/glcdfont.c b/keyboards/orthodox/common/glcdfont.c deleted file mode 100644 index d607d34b77..0000000000 --- a/keyboards/orthodox/common/glcdfont.c +++ /dev/null @@ -1,265 +0,0 @@ -// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. -// See gfxfont.h for newer custom bitmap font info. - -#include "progmem.h" - -// Standard ASCII 5x7 font - -static const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, - 0x00, 0x18, 0x3C, 0x18, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, - 0x00, 0x18, 0x24, 0x18, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, - 0x30, 0x48, 0x3A, 0x06, 0x0E, - 0x26, 0x29, 0x79, 0x29, 0x26, - 0x40, 0x7F, 0x05, 0x05, 0x07, - 0x40, 0x7F, 0x05, 0x25, 0x3F, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, - 0x14, 0x22, 0x7F, 0x22, 0x14, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, - 0x06, 0x09, 0x7F, 0x01, 0x7F, - 0x00, 0x66, 0x89, 0x95, 0x6A, - 0x60, 0x60, 0x60, 0x60, 0x60, - 0x94, 0xA2, 0xFF, 0xA2, 0x94, - 0x08, 0x04, 0x7E, 0x04, 0x08, - 0x10, 0x20, 0x7E, 0x20, 0x10, - 0x08, 0x08, 0x2A, 0x1C, 0x08, - 0x08, 0x1C, 0x2A, 0x08, 0x08, - 0x1E, 0x10, 0x10, 0x10, 0x10, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, - 0x30, 0x38, 0x3E, 0x38, 0x30, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, - 0x14, 0x7F, 0x14, 0x7F, 0x14, - 0x24, 0x2A, 0x7F, 0x2A, 0x12, - 0x23, 0x13, 0x08, 0x64, 0x62, - 0x36, 0x49, 0x56, 0x20, 0x50, - 0x00, 0x08, 0x07, 0x03, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, - 0x08, 0x08, 0x3E, 0x08, 0x08, - 0x00, 0x80, 0x70, 0x30, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, - 0x00, 0x00, 0x60, 0x60, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, - 0x3E, 0x51, 0x49, 0x45, 0x3E, - 0x00, 0x42, 0x7F, 0x40, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, - 0x21, 0x41, 0x49, 0x4D, 0x33, - 0x18, 0x14, 0x12, 0x7F, 0x10, - 0x27, 0x45, 0x45, 0x45, 0x39, - 0x3C, 0x4A, 0x49, 0x49, 0x31, - 0x41, 0x21, 0x11, 0x09, 0x07, - 0x36, 0x49, 0x49, 0x49, 0x36, - 0x46, 0x49, 0x49, 0x29, 0x1E, - 0x00, 0x00, 0x14, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, - 0x14, 0x14, 0x14, 0x14, 0x14, - 0x00, 0x41, 0x22, 0x14, 0x08, - 0x02, 0x01, 0x59, 0x09, 0x06, - 0x3E, 0x41, 0x5D, 0x59, 0x4E, - 0x7C, 0x12, 0x11, 0x12, 0x7C, - 0x7F, 0x49, 0x49, 0x49, 0x36, - 0x3E, 0x41, 0x41, 0x41, 0x22, - 0x7F, 0x41, 0x41, 0x41, 0x3E, - 0x7F, 0x49, 0x49, 0x49, 0x41, - 0x7F, 0x09, 0x09, 0x09, 0x01, - 0x3E, 0x41, 0x41, 0x51, 0x73, - 0x7F, 0x08, 0x08, 0x08, 0x7F, - 0x00, 0x41, 0x7F, 0x41, 0x00, - 0x20, 0x40, 0x41, 0x3F, 0x01, - 0x7F, 0x08, 0x14, 0x22, 0x41, - 0x7F, 0x40, 0x40, 0x40, 0x40, - 0x7F, 0x02, 0x1C, 0x02, 0x7F, - 0x7F, 0x04, 0x08, 0x10, 0x7F, - 0x3E, 0x41, 0x41, 0x41, 0x3E, - 0x7F, 0x09, 0x09, 0x09, 0x06, - 0x3E, 0x41, 0x51, 0x21, 0x5E, - 0x7F, 0x09, 0x19, 0x29, 0x46, - 0x26, 0x49, 0x49, 0x49, 0x32, - 0x03, 0x01, 0x7F, 0x01, 0x03, - 0x3F, 0x40, 0x40, 0x40, 0x3F, - 0x1F, 0x20, 0x40, 0x20, 0x1F, - 0x3F, 0x40, 0x38, 0x40, 0x3F, - 0x63, 0x14, 0x08, 0x14, 0x63, - 0x03, 0x04, 0x78, 0x04, 0x03, - 0x61, 0x59, 0x49, 0x4D, 0x43, - 0x00, 0x7F, 0x41, 0x41, 0x41, - 0x02, 0x04, 0x08, 0x10, 0x20, - 0x00, 0x41, 0x41, 0x41, 0x7F, - 0x04, 0x02, 0x01, 0x02, 0x04, - 0x40, 0x40, 0x40, 0x40, 0x40, - 0x00, 0x03, 0x07, 0x08, 0x00, - 0x20, 0x54, 0x54, 0x78, 0x40, - 0x7F, 0x28, 0x44, 0x44, 0x38, - 0x38, 0x44, 0x44, 0x44, 0x28, - 0x38, 0x44, 0x44, 0x28, 0x7F, - 0x38, 0x54, 0x54, 0x54, 0x18, - 0x00, 0x08, 0x7E, 0x09, 0x02, - 0x18, 0xA4, 0xA4, 0x9C, 0x78, - 0x7F, 0x08, 0x04, 0x04, 0x78, - 0x00, 0x44, 0x7D, 0x40, 0x00, - 0x20, 0x40, 0x40, 0x3D, 0x00, - 0x7F, 0x10, 0x28, 0x44, 0x00, - 0x00, 0x41, 0x7F, 0x40, 0x00, - 0x7C, 0x04, 0x78, 0x04, 0x78, - 0x7C, 0x08, 0x04, 0x04, 0x78, - 0x38, 0x44, 0x44, 0x44, 0x38, - 0xFC, 0x18, 0x24, 0x24, 0x18, - 0x18, 0x24, 0x24, 0x18, 0xFC, - 0x7C, 0x08, 0x04, 0x04, 0x08, - 0x48, 0x54, 0x54, 0x54, 0x24, - 0x04, 0x04, 0x3F, 0x44, 0x24, - 0x3C, 0x40, 0x40, 0x20, 0x7C, - 0x1C, 0x20, 0x40, 0x20, 0x1C, - 0x3C, 0x40, 0x30, 0x40, 0x3C, - 0x44, 0x28, 0x10, 0x28, 0x44, - 0x4C, 0x90, 0x90, 0x90, 0x7C, - 0x44, 0x64, 0x54, 0x4C, 0x44, - 0x00, 0x08, 0x36, 0x41, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, - 0x3C, 0x26, 0x23, 0x26, 0x3C, - 0x1E, 0xA1, 0xA1, 0x61, 0x12, - 0x3A, 0x40, 0x40, 0x20, 0x7A, - 0x38, 0x54, 0x54, 0x55, 0x59, - 0x21, 0x55, 0x55, 0x79, 0x41, - 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut - 0x21, 0x55, 0x54, 0x78, 0x40, - 0x20, 0x54, 0x55, 0x79, 0x40, - 0x0C, 0x1E, 0x52, 0x72, 0x12, - 0x39, 0x55, 0x55, 0x55, 0x59, - 0x39, 0x54, 0x54, 0x54, 0x59, - 0x39, 0x55, 0x54, 0x54, 0x58, - 0x00, 0x00, 0x45, 0x7C, 0x41, - 0x00, 0x02, 0x45, 0x7D, 0x42, - 0x00, 0x01, 0x45, 0x7C, 0x40, - 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut - 0xF0, 0x28, 0x25, 0x28, 0xF0, - 0x7C, 0x54, 0x55, 0x45, 0x00, - 0x20, 0x54, 0x54, 0x7C, 0x54, - 0x7C, 0x0A, 0x09, 0x7F, 0x49, - 0x32, 0x49, 0x49, 0x49, 0x32, - 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut - 0x32, 0x4A, 0x48, 0x48, 0x30, - 0x3A, 0x41, 0x41, 0x21, 0x7A, - 0x3A, 0x42, 0x40, 0x20, 0x78, - 0x00, 0x9D, 0xA0, 0xA0, 0x7D, - 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut - 0x3D, 0x40, 0x40, 0x40, 0x3D, - 0x3C, 0x24, 0xFF, 0x24, 0x24, - 0x48, 0x7E, 0x49, 0x43, 0x66, - 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, - 0xFF, 0x09, 0x29, 0xF6, 0x20, - 0xC0, 0x88, 0x7E, 0x09, 0x03, - 0x20, 0x54, 0x54, 0x79, 0x41, - 0x00, 0x00, 0x44, 0x7D, 0x41, - 0x30, 0x48, 0x48, 0x4A, 0x32, - 0x38, 0x40, 0x40, 0x22, 0x7A, - 0x00, 0x7A, 0x0A, 0x0A, 0x72, - 0x7D, 0x0D, 0x19, 0x31, 0x7D, - 0x26, 0x29, 0x29, 0x2F, 0x28, - 0x26, 0x29, 0x29, 0x29, 0x26, - 0x30, 0x48, 0x4D, 0x40, 0x20, - 0x38, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x38, - 0x2F, 0x10, 0xC8, 0xAC, 0xBA, - 0x2F, 0x10, 0x28, 0x34, 0xFA, - 0x00, 0x00, 0x7B, 0x00, 0x00, - 0x08, 0x14, 0x2A, 0x14, 0x22, - 0x22, 0x14, 0x2A, 0x14, 0x08, - 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code - 0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block - 0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block - 0x00, 0x00, 0x00, 0xFF, 0x00, - 0x10, 0x10, 0x10, 0xFF, 0x00, - 0x14, 0x14, 0x14, 0xFF, 0x00, - 0x10, 0x10, 0xFF, 0x00, 0xFF, - 0x10, 0x10, 0xF0, 0x10, 0xF0, - 0x14, 0x14, 0x14, 0xFC, 0x00, - 0x14, 0x14, 0xF7, 0x00, 0xFF, - 0x00, 0x00, 0xFF, 0x00, 0xFF, - 0x14, 0x14, 0xF4, 0x04, 0xFC, - 0x14, 0x14, 0x17, 0x10, 0x1F, - 0x10, 0x10, 0x1F, 0x10, 0x1F, - 0x14, 0x14, 0x14, 0x1F, 0x00, - 0x10, 0x10, 0x10, 0xF0, 0x00, - 0x00, 0x00, 0x00, 0x1F, 0x10, - 0x10, 0x10, 0x10, 0x1F, 0x10, - 0x10, 0x10, 0x10, 0xF0, 0x10, - 0x00, 0x00, 0x00, 0xFF, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0xFF, 0x10, - 0x00, 0x00, 0x00, 0xFF, 0x14, - 0x00, 0x00, 0xFF, 0x00, 0xFF, - 0x00, 0x00, 0x1F, 0x10, 0x17, - 0x00, 0x00, 0xFC, 0x04, 0xF4, - 0x14, 0x14, 0x17, 0x10, 0x17, - 0x14, 0x14, 0xF4, 0x04, 0xF4, - 0x00, 0x00, 0xFF, 0x00, 0xF7, - 0x14, 0x14, 0x14, 0x14, 0x14, - 0x14, 0x14, 0xF7, 0x00, 0xF7, - 0x14, 0x14, 0x14, 0x17, 0x14, - 0x10, 0x10, 0x1F, 0x10, 0x1F, - 0x14, 0x14, 0x14, 0xF4, 0x14, - 0x10, 0x10, 0xF0, 0x10, 0xF0, - 0x00, 0x00, 0x1F, 0x10, 0x1F, - 0x00, 0x00, 0x00, 0x1F, 0x14, - 0x00, 0x00, 0x00, 0xFC, 0x14, - 0x00, 0x00, 0xF0, 0x10, 0xF0, - 0x10, 0x10, 0xFF, 0x10, 0xFF, - 0x14, 0x14, 0x14, 0xFF, 0x14, - 0x10, 0x10, 0x10, 0x1F, 0x00, - 0x00, 0x00, 0x00, 0xF0, 0x10, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, - 0xFF, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, - 0x38, 0x44, 0x44, 0x38, 0x44, - 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta - 0x7E, 0x02, 0x02, 0x06, 0x06, - 0x02, 0x7E, 0x02, 0x7E, 0x02, - 0x63, 0x55, 0x49, 0x41, 0x63, - 0x38, 0x44, 0x44, 0x3C, 0x04, - 0x40, 0x7E, 0x20, 0x1E, 0x20, - 0x06, 0x02, 0x7E, 0x02, 0x02, - 0x99, 0xA5, 0xE7, 0xA5, 0x99, - 0x1C, 0x2A, 0x49, 0x2A, 0x1C, - 0x4C, 0x72, 0x01, 0x72, 0x4C, - 0x30, 0x4A, 0x4D, 0x4D, 0x30, - 0x30, 0x48, 0x78, 0x48, 0x30, - 0xBC, 0x62, 0x5A, 0x46, 0x3D, - 0x3E, 0x49, 0x49, 0x49, 0x00, - 0x7E, 0x01, 0x01, 0x01, 0x7E, - 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, - 0x44, 0x44, 0x5F, 0x44, 0x44, - 0x40, 0x51, 0x4A, 0x44, 0x40, - 0x40, 0x44, 0x4A, 0x51, 0x40, - 0x00, 0x00, 0xFF, 0x01, 0x03, - 0xE0, 0x80, 0xFF, 0x00, 0x00, - 0x08, 0x08, 0x6B, 0x6B, 0x08, - 0x36, 0x12, 0x36, 0x24, 0x36, - 0x06, 0x0F, 0x09, 0x0F, 0x06, - 0x00, 0x00, 0x18, 0x18, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x00, - 0x30, 0x40, 0xFF, 0x01, 0x01, - 0x00, 0x1F, 0x01, 0x01, 0x1E, - 0x00, 0x19, 0x1D, 0x17, 0x12, - 0x00, 0x3C, 0x3C, 0x3C, 0x3C, - 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP -}; diff --git a/keyboards/rate/pistachio_pro/config.h b/keyboards/rate/pistachio_pro/config.h index 309d51f79c..d0b1ddcae8 100644 --- a/keyboards/rate/pistachio_pro/config.h +++ b/keyboards/rate/pistachio_pro/config.h @@ -42,7 +42,6 @@ along with this program. If not, see . /* OLED */ #define OLED_DISPLAY_128X64 -#define OLED_FONT_H "keyboards/rate/pistachio_pro/lib/glcdfont.c" #define OLED_FONT_WIDTH 6 #define OLED_FONT_HEIGHT 6 diff --git a/keyboards/rate/pistachio_pro/lib/glcdfont.c b/keyboards/rate/pistachio_pro/lib/glcdfont.c deleted file mode 100644 index 41041f12bb..0000000000 --- a/keyboards/rate/pistachio_pro/lib/glcdfont.c +++ /dev/null @@ -1,232 +0,0 @@ -// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. -// See gfxfont.h for newer custom bitmap font info. - -#include "progmem.h" - -// Standard ASCII 5x7 font -const unsigned char font[] PROGMEM = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, -0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, -0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, -0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, -0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, -0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, -0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, -0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, -0x00, 0x18, 0x24, 0x18, 0x00, 0x00, -0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, -0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, -0x26, 0x29, 0x79, 0x29, 0x26, 0x00, -0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, -0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, -0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, -0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, -0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, -0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, -0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, -0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, -0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, -0x60, 0x60, 0x60, 0x60, 0x60, 0x00, -0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, -0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, -0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, -0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, -0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, -0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, -0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, -0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, -0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, -0x00, 0x07, 0x00, 0x07, 0x00, 0x00, -0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, -0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, -0x23, 0x13, 0x08, 0x64, 0x62, 0x00, -0x36, 0x49, 0x56, 0x20, 0x50, 0x00, -0x00, 0x08, 0x07, 0x03, 0x00, 0x00, -0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, -0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, -0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, -0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, -0x00, 0x80, 0x70, 0x30, 0x00, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x00, -0x00, 0x00, 0x60, 0x60, 0x00, 0x00, -0x20, 0x10, 0x08, 0x04, 0x02, 0x00, -0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, -0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, -0x72, 0x49, 0x49, 0x49, 0x46, 0x00, -0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, -0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, -0x27, 0x45, 0x45, 0x45, 0x39, 0x00, -0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, -0x41, 0x21, 0x11, 0x09, 0x07, 0x00, -0x36, 0x49, 0x49, 0x49, 0x36, 0x00, -0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, -0x00, 0x00, 0x14, 0x00, 0x00, 0x00, -0x00, 0x40, 0x34, 0x00, 0x00, 0x00, -0x00, 0x08, 0x14, 0x22, 0x41, 0x00, -0x14, 0x14, 0x14, 0x14, 0x14, 0x00, -0x00, 0x41, 0x22, 0x14, 0x08, 0x00, -0x02, 0x01, 0x59, 0x09, 0x06, 0x00, -0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, -0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, -0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, -0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, -0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, -0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, -0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, -0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, -0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, -0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, -0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, -0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, -0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, -0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, -0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, -0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, -0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, -0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, -0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, -0x26, 0x49, 0x49, 0x49, 0x32, 0x00, -0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, -0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, -0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, -0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, -0x63, 0x14, 0x08, 0x14, 0x63, 0x00, -0x03, 0x04, 0x78, 0x04, 0x03, 0x00, -0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, -0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, -0x02, 0x04, 0x08, 0x10, 0x20, 0x00, -0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, -0x04, 0x02, 0x01, 0x02, 0x04, 0x00, -0x40, 0x40, 0x40, 0x40, 0x40, 0x00, -0x00, 0x03, 0x07, 0x08, 0x00, 0x00, -0x20, 0x54, 0x54, 0x78, 0x40, 0x00, -0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, -0x38, 0x44, 0x44, 0x44, 0x28, 0x00, -0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, -0x38, 0x54, 0x54, 0x54, 0x18, 0x00, -0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, -0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, -0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, -0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, -0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, -0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, -0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, -0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, -0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, -0x38, 0x44, 0x44, 0x44, 0x38, 0x00, -0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, -0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, -0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, -0x48, 0x54, 0x54, 0x54, 0x24, 0x00, -0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, -0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, -0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, -0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, -0x44, 0x28, 0x10, 0x28, 0x44, 0x00, -0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, -0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, -0x00, 0x08, 0x36, 0x41, 0x00, 0x00, -0x00, 0x00, 0x77, 0x00, 0x00, 0x00, -0x00, 0x41, 0x36, 0x08, 0x00, 0x00, -0x02, 0x01, 0x02, 0x04, 0x02, 0x00, -0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, -0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0, -0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, -0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, -0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, -0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, -0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, -0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, -0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, -0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0, -0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, -0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, -0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, -0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, -0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, -0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, -0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, -0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, -0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, -0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, -0xDE, 0xD7, 0xDC, 0x00, 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, 0xF8, 0xFC, 0xFE, -0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, -0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x81, -0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF, -0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, -0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, -0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, -0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, -0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, -0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, -0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, -0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, -0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, -0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, -0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, -0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, -0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, -0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F, -0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F, -0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, -0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C, -0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x03, 0x07, 0x07, -0x07, 0x07, 0x07, 0x07, 0x07, 0x07, -0x03, 0x01, 0x00, 0x00, 0x00, 0x00, -0x01, 0x03, 0x07, 0x07, 0x07, 0x07, -0x07, 0x07, 0x07, 0x07, 0x03, 0x01, -0x00, 0x00, 0x00, 0x07, 0x07, 0x07, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x07, 0x07, 0x07, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x07, 0x07, -0x07, 0x00, 0x00, 0x00, 0x01, 0x03, -0x07, 0x07, 0x07, 0x07, 0x07, 0x07, -0x07, 0x07, 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, -}; diff --git a/keyboards/rgbkb/zygomorph/common/glcdfont.c b/keyboards/rgbkb/zygomorph/common/glcdfont.c deleted file mode 100644 index 697d58886e..0000000000 --- a/keyboards/rgbkb/zygomorph/common/glcdfont.c +++ /dev/null @@ -1,233 +0,0 @@ -// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. -// See gfxfont.h for newer custom bitmap font info. - -#include "progmem.h" - -// Standard ASCII 5x7 font - -static const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, - 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, - 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, - 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, - 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, - 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, - 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, - 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, - 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, - 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, - 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, - 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, - 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, - 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, - 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, - 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, - 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, - 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, - 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, - 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, - 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, - 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, - 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, - 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, - 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, - 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, - 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, - 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, - 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, - 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, - 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, - 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, - 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, - 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, - 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, - 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, - 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, - 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, - 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, - 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, - 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, - 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, - 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, - 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, - 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, - 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, - 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, - 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, - 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, - 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, - 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, - 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, - 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, - 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, - 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, - 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, - 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, - 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, - 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, - 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, - 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, - 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, - 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, - 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, - 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, - 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, - 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, - 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, - 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, - 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, - 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, - 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, - 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, - 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, - 0x03, 0x07, 0x1F, 0x7F, 0xFF, 0xFF, - 0xFE, 0xF8, 0xF0, 0xC0, 0x20, 0xF8, - 0xFE, 0xFF, 0xFE, 0x79, 0x27, 0x1F, - 0x7F, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, - 0xC0, 0x20, 0xF8, 0xFE, 0xFF, 0xFF, - 0x7F, 0x3F, 0x3F, 0x7F, 0xFF, 0xFE, - 0xF8, 0xF0, 0xC0, 0x00, 0x00, 0x00, - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xFF, 0x7F, 0x7F, 0x7F, - 0xBF, 0xBF, 0xC0, 0xC0, 0xC0, 0xE0, - 0xE0, 0xE0, 0xE0, 0xF0, 0xF0, 0xF0, - 0xF8, 0x78, 0x78, 0x7C, 0x3C, 0x3C, - 0xFE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, - 0xBF, 0xBF, 0xDF, 0xDF, 0xEF, 0xEF, - 0x00, 0x03, 0x07, 0x1F, 0x7F, 0xFF, - 0xFF, 0xFF, 0xFE, 0xF8, 0xE0, 0xC0, - 0xE0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, - 0x7F, 0x1F, 0x07, 0x03, 0x00, 0x00, - 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, - 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, - 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, - 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, - 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, - 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, - 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, - 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xC1, 0xF3, - 0xCF, 0xBF, 0x7F, 0xFF, 0xFF, 0xFC, - 0xFB, 0xE7, 0x81, 0x00, 0x00, 0x00, - 0x00, 0x80, 0xE3, 0xCF, 0x3F, 0xFF, - 0xFF, 0xFF, 0xFC, 0xFB, 0xE7, 0x81, - 0x00, 0x00, 0x00, 0x00, 0x81, 0xE7, - 0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0x00, - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xF8, 0xF8, 0xFC, 0x7C, 0x7E, - 0x7E, 0x3E, 0xFE, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xF7, 0xF7, 0xF7, 0xFB, - 0xFB, 0x7D, 0x7D, 0x7D, 0xBE, 0xBE, - 0xBE, 0xDF, 0xDF, 0xE0, 0xE0, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0xFC, 0xFC, 0x7C, 0x7E, 0x7E, - 0x3E, 0x3E, 0x1F, 0x1F, 0x1F, 0x0F, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, - 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x81, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, - 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, - 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, - 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, - 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, - 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, - 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, - 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x60, 0x70, 0x7C, 0x7F, 0x7F, 0x7F, - 0x7F, 0x1F, 0x06, 0x01, 0x03, 0x0F, - 0x3F, 0x7F, 0x7F, 0x7E, 0x7C, 0x7C, - 0x7E, 0x7F, 0x7F, 0x7F, 0x1F, 0x06, - 0x01, 0x07, 0x0F, 0x3F, 0x7F, 0x7F, - 0x7E, 0x7C, 0x7C, 0x7E, 0x7F, 0x7F, - 0x3F, 0x0F, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, - 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, - 0x7F, 0x7F, 0x7D, 0x7D, 0x3D, 0x3E, - 0x1E, 0x1F, 0x1F, 0x1F, 0x0F, 0x0F, - 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, - 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, - 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, - 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, - 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, - 0x00, 0x40, 0x70, 0x78, 0x7E, 0x7F, - 0x7F, 0x7F, 0x3F, 0x0F, 0x03, 0x01, - 0x03, 0x0F, 0x3F, 0x7F, 0x7F, 0x7F, - 0x7E, 0x78, 0x70, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; From 883465d9fb29cd793684ee0ac688ff3517cf8bc0 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 22 Sep 2025 00:01:23 +0100 Subject: [PATCH 45/95] Add generic handling to cycle LED/RGB Matrix flags (#24649) --- data/constants/keycodes/keycodes_0.0.8.hjson | 0 .../keycodes/keycodes_0.0.8_lighting.hjson | 37 ++++++++++++++ data/mappings/info_config.hjson | 2 + data/schemas/keyboard.jsonschema | 10 ++++ docs/reference_info_json.md | 6 +++ lib/python/qmk/info.py | 8 +++ quantum/keycodes.h | 22 +++++--- quantum/led_matrix/led_matrix.c | 51 +++++++++++++++++++ quantum/led_matrix/led_matrix.h | 4 ++ quantum/process_keycode/process_led_matrix.c | 6 +++ quantum/process_keycode/process_rgb_matrix.c | 14 +++++ quantum/rgb_matrix/rgb_matrix.c | 51 +++++++++++++++++++ quantum/rgb_matrix/rgb_matrix.h | 4 ++ 13 files changed, 208 insertions(+), 7 deletions(-) create mode 100644 data/constants/keycodes/keycodes_0.0.8.hjson create mode 100644 data/constants/keycodes/keycodes_0.0.8_lighting.hjson diff --git a/data/constants/keycodes/keycodes_0.0.8.hjson b/data/constants/keycodes/keycodes_0.0.8.hjson new file mode 100644 index 0000000000..e69de29bb2 diff --git a/data/constants/keycodes/keycodes_0.0.8_lighting.hjson b/data/constants/keycodes/keycodes_0.0.8_lighting.hjson new file mode 100644 index 0000000000..fa7227235e --- /dev/null +++ b/data/constants/keycodes/keycodes_0.0.8_lighting.hjson @@ -0,0 +1,37 @@ +{ + "keycodes": { + "0x7819": { + "group": "led_matrix", + "key": "QK_LED_MATRIX_FLAG_NEXT", + "label": "LED Matrix Flag Next", + "aliases": [ + "LM_FLGN" + ] + }, + "0x781A": { + "group": "led_matrix", + "key": "QK_LED_MATRIX_FLAG_PREVIOUS", + "label": "LED Matrix Flag Previous", + "aliases": [ + "LM_FLGP" + ] + }, + + "0x784D": { + "group": "rgb_matrix", + "key": "QK_RGB_MATRIX_FLAG_NEXT", + "label": "RGB Matrix Flag Next", + "aliases": [ + "RM_FLGN" + ] + }, + "0x784E": { + "group": "rgb_matrix", + "key": "QK_RGB_MATRIX_FLAG_PREVIOUS", + "label": "RGB Matrix Flag Previous", + "aliases": [ + "RM_FLGP" + ] + } + } +} diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index 4c53aa4339..c4052c64f6 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -98,6 +98,7 @@ // LED Matrix "LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"}, + "LED_MATRIX_FLAG_STEPS": {"info_key": "led_matrix.flag_steps", "value_type": "array.int"}, "LED_MATRIX_KEYRELEASES": {"info_key": "led_matrix.react_on_keyup", "value_type": "flag"}, "LED_MATRIX_LED_FLUSH_LIMIT": {"info_key": "led_matrix.led_flush_limit", "value_type": "int"}, "LED_MATRIX_LED_PROCESS_LIMIT": {"info_key": "led_matrix.led_process_limit", "value_type": "int", "to_json": false}, @@ -147,6 +148,7 @@ // RGB Matrix "RGB_MATRIX_CENTER": {"info_key": "rgb_matrix.center_point", "value_type": "array.int"}, + "RGB_MATRIX_FLAG_STEPS": {"info_key": "rgb_matrix.flag_steps", "value_type": "array.int"}, "RGB_MATRIX_HUE_STEP": {"info_key": "rgb_matrix.hue_steps", "value_type": "int"}, "RGB_MATRIX_KEYRELEASES": {"info_key": "rgb_matrix.react_on_keyup", "value_type": "flag"}, "RGB_MATRIX_LED_FLUSH_LIMIT": {"info_key": "rgb_matrix.led_flush_limit", "value_type": "int"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 93b1c82b1c..93fc4ed8a2 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -571,6 +571,11 @@ "maxItems": 2, "items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"} }, + "flag_steps": { + "type": "array", + "minItems": 1, + "items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"} + }, "max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}, "timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"}, "val_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"}, @@ -656,6 +661,11 @@ "maxItems": 2, "items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"} }, + "flag_steps": { + "type": "array", + "minItems": 1, + "items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"} + }, "max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}, "timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"}, "hue_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"}, diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 84377ef36c..e7cb8c31e8 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -415,6 +415,9 @@ Configures the [LED Matrix](features/led_matrix) feature. * `center_point` Array: Number * The centroid (geometric center) of the LEDs. Used for certain effects. * Default: `[112, 32]` + * `flag_steps` Array: Number + * A list of flag bitfields that can be cycled through. + * Default: `[255, 5, 0]` * `default` * `animation` String * The default effect. Must be one of `led_matrix.animations` @@ -660,6 +663,9 @@ Configures the [RGB Matrix](features/rgb_matrix) feature. * `center_point` Array: Number * The centroid (geometric center) of the LEDs. Used for certain effects. * Default: `[112, 32]` + * `flag_steps` Array: Number + * A list of flag bitfields that can be cycled through. + * Default: `[255, 5, 2, 0]` * `default` * `animation` String * The default effect. Must be one of `rgb_matrix.animations` diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index f63228b2bc..59a64095e7 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -800,6 +800,14 @@ def _extract_led_config(info_data, keyboard): if info_data[feature].get('layout', None) and not info_data[feature].get('led_count', None): 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} + # 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) + return info_data diff --git a/quantum/keycodes.h b/quantum/keycodes.h index 6a59aa376d..e5a64d9a71 100644 --- a/quantum/keycodes.h +++ b/quantum/keycodes.h @@ -26,11 +26,11 @@ #pragma once // clang-format off -#define QMK_KEYCODES_VERSION "0.0.7" -#define QMK_KEYCODES_VERSION_BCD 0x00000007 +#define QMK_KEYCODES_VERSION "0.0.8" +#define QMK_KEYCODES_VERSION_BCD 0x00000008 #define QMK_KEYCODES_VERSION_MAJOR 0 #define QMK_KEYCODES_VERSION_MINOR 0 -#define QMK_KEYCODES_VERSION_PATCH 7 +#define QMK_KEYCODES_VERSION_PATCH 8 enum qk_keycode_ranges { // Ranges @@ -663,6 +663,8 @@ enum qk_keycode_defines { QK_LED_MATRIX_BRIGHTNESS_DOWN = 0x7816, QK_LED_MATRIX_SPEED_UP = 0x7817, QK_LED_MATRIX_SPEED_DOWN = 0x7818, + QK_LED_MATRIX_FLAG_NEXT = 0x7819, + QK_LED_MATRIX_FLAG_PREVIOUS = 0x781A, QK_UNDERGLOW_TOGGLE = 0x7820, QK_UNDERGLOW_MODE_NEXT = 0x7821, QK_UNDERGLOW_MODE_PREVIOUS = 0x7822, @@ -697,6 +699,8 @@ enum qk_keycode_defines { QK_RGB_MATRIX_VALUE_DOWN = 0x784A, QK_RGB_MATRIX_SPEED_UP = 0x784B, QK_RGB_MATRIX_SPEED_DOWN = 0x784C, + QK_RGB_MATRIX_FLAG_NEXT = 0x784D, + QK_RGB_MATRIX_FLAG_PREVIOUS = 0x784E, QK_BOOTLOADER = 0x7C00, QK_REBOOT = 0x7C01, QK_DEBUG_TOGGLE = 0x7C02, @@ -1352,6 +1356,8 @@ enum qk_keycode_defines { LM_BRID = QK_LED_MATRIX_BRIGHTNESS_DOWN, LM_SPDU = QK_LED_MATRIX_SPEED_UP, LM_SPDD = QK_LED_MATRIX_SPEED_DOWN, + LM_FLGN = QK_LED_MATRIX_FLAG_NEXT, + LM_FLGP = QK_LED_MATRIX_FLAG_PREVIOUS, UG_TOGG = QK_UNDERGLOW_TOGGLE, UG_NEXT = QK_UNDERGLOW_MODE_NEXT, UG_PREV = QK_UNDERGLOW_MODE_PREVIOUS, @@ -1386,6 +1392,8 @@ enum qk_keycode_defines { RM_VALD = QK_RGB_MATRIX_VALUE_DOWN, RM_SPDU = QK_RGB_MATRIX_SPEED_UP, RM_SPDD = QK_RGB_MATRIX_SPEED_DOWN, + RM_FLGN = QK_RGB_MATRIX_FLAG_NEXT, + RM_FLGP = QK_RGB_MATRIX_FLAG_PREVIOUS, QK_BOOT = QK_BOOTLOADER, QK_RBT = QK_REBOOT, DB_TOGG = QK_DEBUG_TOGGLE, @@ -1511,10 +1519,10 @@ enum qk_keycode_defines { #define IS_MACRO_KEYCODE(code) ((code) >= QK_MACRO_0 && (code) <= QK_MACRO_31) #define IS_CONNECTION_KEYCODE(code) ((code) >= QK_OUTPUT_AUTO && (code) <= QK_BLUETOOTH_PROFILE5) #define IS_BACKLIGHT_KEYCODE(code) ((code) >= QK_BACKLIGHT_ON && (code) <= QK_BACKLIGHT_TOGGLE_BREATHING) -#define IS_LED_MATRIX_KEYCODE(code) ((code) >= QK_LED_MATRIX_ON && (code) <= QK_LED_MATRIX_SPEED_DOWN) +#define IS_LED_MATRIX_KEYCODE(code) ((code) >= QK_LED_MATRIX_ON && (code) <= QK_LED_MATRIX_FLAG_PREVIOUS) #define IS_UNDERGLOW_KEYCODE(code) ((code) >= QK_UNDERGLOW_TOGGLE && (code) <= QK_UNDERGLOW_SPEED_DOWN) #define IS_RGB_KEYCODE(code) ((code) >= RGB_MODE_PLAIN && (code) <= RGB_MODE_TWINKLE) -#define IS_RGB_MATRIX_KEYCODE(code) ((code) >= QK_RGB_MATRIX_ON && (code) <= QK_RGB_MATRIX_SPEED_DOWN) +#define IS_RGB_MATRIX_KEYCODE(code) ((code) >= QK_RGB_MATRIX_ON && (code) <= QK_RGB_MATRIX_FLAG_PREVIOUS) #define IS_QUANTUM_KEYCODE(code) ((code) >= QK_BOOTLOADER && (code) <= QK_LAYER_LOCK) #define IS_KB_KEYCODE(code) ((code) >= QK_KB_0 && (code) <= QK_KB_31) #define IS_USER_KEYCODE(code) ((code) >= QK_USER_0 && (code) <= QK_USER_31) @@ -1537,10 +1545,10 @@ enum qk_keycode_defines { #define MACRO_KEYCODE_RANGE QK_MACRO_0 ... QK_MACRO_31 #define CONNECTION_KEYCODE_RANGE QK_OUTPUT_AUTO ... QK_BLUETOOTH_PROFILE5 #define BACKLIGHT_KEYCODE_RANGE QK_BACKLIGHT_ON ... QK_BACKLIGHT_TOGGLE_BREATHING -#define LED_MATRIX_KEYCODE_RANGE QK_LED_MATRIX_ON ... QK_LED_MATRIX_SPEED_DOWN +#define LED_MATRIX_KEYCODE_RANGE QK_LED_MATRIX_ON ... QK_LED_MATRIX_FLAG_PREVIOUS #define UNDERGLOW_KEYCODE_RANGE QK_UNDERGLOW_TOGGLE ... QK_UNDERGLOW_SPEED_DOWN #define RGB_KEYCODE_RANGE RGB_MODE_PLAIN ... RGB_MODE_TWINKLE -#define RGB_MATRIX_KEYCODE_RANGE QK_RGB_MATRIX_ON ... QK_RGB_MATRIX_SPEED_DOWN +#define RGB_MATRIX_KEYCODE_RANGE QK_RGB_MATRIX_ON ... QK_RGB_MATRIX_FLAG_PREVIOUS #define QUANTUM_KEYCODE_RANGE QK_BOOTLOADER ... QK_LAYER_LOCK #define KB_KEYCODE_RANGE QK_KB_0 ... QK_KB_31 #define USER_KEYCODE_RANGE QK_USER_0 ... QK_USER_31 diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 9c8004cc17..b2665597df 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -70,6 +70,13 @@ uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; 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 } +#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) + // internals static bool suspend_state = false; static uint8_t led_last_enable = UINT8_MAX; @@ -661,6 +668,50 @@ void led_matrix_set_flags_noeeprom(led_flags_t flags) { led_matrix_set_flags_eeprom_helper(flags, false); } +void led_matrix_flags_step_helper(bool write_to_eeprom) { + led_flags_t flags = led_matrix_get_flags(); + + uint8_t next = 0; + for (uint8_t i = 0; i < LED_MATRIX_FLAG_STEPS_COUNT; i++) { + if (led_matrix_flag_steps[i] == flags) { + next = i == LED_MATRIX_FLAG_STEPS_COUNT - 1 ? 0 : i + 1; + break; + } + } + + led_matrix_set_flags_eeprom_helper(led_matrix_flag_steps[next], write_to_eeprom); +} + +void led_matrix_flags_step_noeeprom(void) { + led_matrix_flags_step_helper(false); +} + +void led_matrix_flags_step(void) { + led_matrix_flags_step_helper(true); +} + +void led_matrix_flags_step_reverse_helper(bool write_to_eeprom) { + led_flags_t flags = led_matrix_get_flags(); + + uint8_t next = 0; + for (uint8_t i = 0; i < LED_MATRIX_FLAG_STEPS_COUNT; i++) { + if (led_matrix_flag_steps[i] == flags) { + next = i == 0 ? LED_MATRIX_FLAG_STEPS_COUNT - 1 : i - 1; + break; + } + } + + led_matrix_set_flags_eeprom_helper(led_matrix_flag_steps[next], write_to_eeprom); +} + +void led_matrix_flags_step_reverse_noeeprom(void) { + led_matrix_flags_step_reverse_helper(false); +} + +void led_matrix_flags_step_reverse(void) { + led_matrix_flags_step_reverse_helper(true); +} + // LED Matrix naming #undef LED_MATRIX_EFFECT #ifdef LED_MATRIX_MODE_NAME_ENABLE diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index 9a49515ab2..f484c700f4 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h @@ -183,6 +183,10 @@ void led_matrix_decrease_speed_noeeprom(void); led_flags_t led_matrix_get_flags(void); void led_matrix_set_flags(led_flags_t flags); void led_matrix_set_flags_noeeprom(led_flags_t flags); +void led_matrix_flags_step_noeeprom(void); +void led_matrix_flags_step(void); +void led_matrix_flags_step_reverse_noeeprom(void); +void led_matrix_flags_step_reverse(void); #ifdef LED_MATRIX_MODE_NAME_ENABLE const char *led_matrix_get_mode_name(uint8_t mode); diff --git a/quantum/process_keycode/process_led_matrix.c b/quantum/process_keycode/process_led_matrix.c index 7f95bf1011..3342b33b92 100644 --- a/quantum/process_keycode/process_led_matrix.c +++ b/quantum/process_keycode/process_led_matrix.c @@ -40,6 +40,12 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record) { case QK_LED_MATRIX_SPEED_DOWN: led_matrix_decrease_speed(); return false; + case QK_LED_MATRIX_FLAG_NEXT: + led_matrix_flags_step(); + return false; + case QK_LED_MATRIX_FLAG_PREVIOUS: + led_matrix_flags_step_reverse(); + return false; } } diff --git a/quantum/process_keycode/process_rgb_matrix.c b/quantum/process_keycode/process_rgb_matrix.c index fd2aa1a0c7..c18212294d 100644 --- a/quantum/process_keycode/process_rgb_matrix.c +++ b/quantum/process_keycode/process_rgb_matrix.c @@ -94,6 +94,20 @@ bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { rgb_matrix_decrease_speed(); } return false; + case QK_RGB_MATRIX_FLAG_NEXT: + if (shifted) { + rgb_matrix_flags_step_reverse(); + } else { + rgb_matrix_flags_step(); + } + return false; + case QK_RGB_MATRIX_FLAG_PREVIOUS: + if (shifted) { + rgb_matrix_flags_step(); + } else { + rgb_matrix_flags_step_reverse(); + } + return false; } } diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index ab0aa17512..19edfb52b0 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -72,6 +72,13 @@ uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; 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 } +#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) + // internals static bool suspend_state = false; static uint8_t rgb_last_enable = UINT8_MAX; @@ -747,6 +754,50 @@ void rgb_matrix_set_flags_noeeprom(led_flags_t flags) { rgb_matrix_set_flags_eeprom_helper(flags, false); } +void rgb_matrix_flags_step_helper(bool write_to_eeprom) { + led_flags_t flags = rgb_matrix_get_flags(); + + uint8_t next = 0; + for (uint8_t i = 0; i < RGB_MATRIX_FLAG_STEPS_COUNT; i++) { + if (rgb_matrix_flag_steps[i] == flags) { + next = i == RGB_MATRIX_FLAG_STEPS_COUNT - 1 ? 0 : i + 1; + break; + } + } + + rgb_matrix_set_flags_eeprom_helper(rgb_matrix_flag_steps[next], write_to_eeprom); +} + +void rgb_matrix_flags_step_noeeprom(void) { + rgb_matrix_flags_step_helper(false); +} + +void rgb_matrix_flags_step(void) { + rgb_matrix_flags_step_helper(true); +} + +void rgb_matrix_flags_step_reverse_helper(bool write_to_eeprom) { + led_flags_t flags = rgb_matrix_get_flags(); + + uint8_t next = 0; + for (uint8_t i = 0; i < RGB_MATRIX_FLAG_STEPS_COUNT; i++) { + if (rgb_matrix_flag_steps[i] == flags) { + next = i == 0 ? RGB_MATRIX_FLAG_STEPS_COUNT - 1 : i - 1; + break; + } + } + + rgb_matrix_set_flags_eeprom_helper(rgb_matrix_flag_steps[next], write_to_eeprom); +} + +void rgb_matrix_flags_step_reverse_noeeprom(void) { + rgb_matrix_flags_step_reverse_helper(false); +} + +void rgb_matrix_flags_step_reverse(void) { + rgb_matrix_flags_step_reverse_helper(true); +} + //---------------------------------------------------------- // RGB Matrix naming #undef RGB_MATRIX_EFFECT diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index a91dded4a8..f800679b46 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -218,6 +218,10 @@ void rgb_matrix_decrease_speed_noeeprom(void); led_flags_t rgb_matrix_get_flags(void); void rgb_matrix_set_flags(led_flags_t flags); void rgb_matrix_set_flags_noeeprom(led_flags_t flags); +void rgb_matrix_flags_step_noeeprom(void); +void rgb_matrix_flags_step(void); +void rgb_matrix_flags_step_reverse_noeeprom(void); +void rgb_matrix_flags_step_reverse(void); void rgb_matrix_update_pwm_buffers(void); #ifdef RGB_MATRIX_MODE_NAME_ENABLE From 0a4c1caf204bd9750ef8af8296b2e225682b6029 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 29 Sep 2025 20:26:47 +0100 Subject: [PATCH 46/95] Add DD {LED,RGB}_MATRIX_DEFAULT_FLAGS support (#25671) --- data/mappings/info_config.hjson | 2 ++ data/mappings/info_defaults.hjson | 6 ++++-- data/schemas/keyboard.jsonschema | 6 ++++-- docs/reference_info_json.md | 6 ++++++ keyboards/xelus/valor/rev2/keyboard.json | 3 +++ keyboards/xelus/valor/rev2/rev2.c | 5 ----- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index c4052c64f6..1c6e86d876 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -112,6 +112,7 @@ "LED_MATRIX_DEFAULT_ON": {"info_key": "led_matrix.default.on", "value_type": "bool"}, "LED_MATRIX_DEFAULT_VAL": {"info_key": "led_matrix.default.val", "value_type": "int"}, "LED_MATRIX_DEFAULT_SPD": {"info_key": "led_matrix.default.speed", "value_type": "int"}, + "LED_MATRIX_DEFAULT_FLAGS": {"info_key": "led_matrix.default.flags", "value_type": "int"}, // Locking Switch "LOCKING_SUPPORT_ENABLE": {"info_key": "qmk.locking.enabled", "value_type": "flag"}, @@ -166,6 +167,7 @@ "RGB_MATRIX_DEFAULT_SAT": {"info_key": "rgb_matrix.default.sat", "value_type": "int"}, "RGB_MATRIX_DEFAULT_VAL": {"info_key": "rgb_matrix.default.val", "value_type": "int"}, "RGB_MATRIX_DEFAULT_SPD": {"info_key": "rgb_matrix.default.speed", "value_type": "int"}, + "RGB_MATRIX_DEFAULT_FLAGS": {"info_key": "rgb_matrix.default.flags", "value_type": "int"}, // RGBLight "RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"}, diff --git a/data/mappings/info_defaults.hjson b/data/mappings/info_defaults.hjson index b33cb4fa1f..d1f1579c55 100644 --- a/data/mappings/info_defaults.hjson +++ b/data/mappings/info_defaults.hjson @@ -23,7 +23,8 @@ "animation": "solid", "on": true, "val": 255, - "speed": 128 + "speed": 128, + "flags": 255 }, "led_flush_limit": 16, "max_brightness": 255, @@ -53,7 +54,8 @@ "hue": 0, "sat": 255, "val": 255, - "speed": 128 + "speed": 128, + "flags": 255 }, "hue_steps": 8, "led_flush_limit": 16, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 93fc4ed8a2..57aeb3de22 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -543,7 +543,8 @@ "on": {"type": "boolean"}, "animation": {"type": "string"}, "val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}, - "speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"} + "speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}, + "flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"} } }, "driver": { @@ -631,7 +632,8 @@ "hue": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}, "sat": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}, "val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}, - "speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"} + "speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}, + "flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"} } }, "driver": { diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index e7cb8c31e8..91ab7f4577 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -431,6 +431,9 @@ Configures the [LED Matrix](features/led_matrix) feature. * `speed` Number * The default animation speed. * Default: `128` + * `flags` Number + * The default LED flags. + * Default: `255` * `driver` String Required * The driver to use. Must be one of `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`. * `layout` Array: Object Required @@ -685,6 +688,9 @@ Configures the [RGB Matrix](features/rgb_matrix) feature. * `speed` Number * The default animation speed. * Default: `128` + * `flags` Number + * The default LED flags. + * Default: `255` * `driver` String Required * The driver to use. Must be one of `aw20216s`, `custom`, `is31fl3218`, `is31fl3236`, `is31fl3729`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`, `ws2812`. * `hue_steps` Number diff --git a/keyboards/xelus/valor/rev2/keyboard.json b/keyboards/xelus/valor/rev2/keyboard.json index 451eeb99ff..6356f69646 100644 --- a/keyboards/xelus/valor/rev2/keyboard.json +++ b/keyboards/xelus/valor/rev2/keyboard.json @@ -67,6 +67,9 @@ "solid_splash": true, "solid_multisplash": true }, + "default": { + "flags": 7 + }, "driver": "ws2812", "max_brightness": 200, "sleep": true diff --git a/keyboards/xelus/valor/rev2/rev2.c b/keyboards/xelus/valor/rev2/rev2.c index 34a32cfc61..99db45e08d 100644 --- a/keyboards/xelus/valor/rev2/rev2.c +++ b/keyboards/xelus/valor/rev2/rev2.c @@ -64,9 +64,4 @@ led_config_t g_led_config = { { 8, 8, 8, 8 } }; - -void keyboard_pre_init_kb(void) { - rgb_matrix_set_flags(LED_FLAG_MODIFIER|LED_FLAG_UNDERGLOW|LED_FLAG_KEYLIGHT); - keyboard_pre_init_user(); -} #endif From 6f93a86e6e12ddc999da3cf940f5c327d5f9b91a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 29 Sep 2025 20:27:07 +0100 Subject: [PATCH 47/95] Add LED/RGB Matrix flags API docs (#25673) --- docs/features/led_matrix.md | 59 +++++++++++++++++++++++++++++++++++++ docs/features/rgb_matrix.md | 59 +++++++++++++++++++++++++++++++++++++ docs/keycodes.md | 4 +++ 3 files changed, 122 insertions(+) diff --git a/docs/features/led_matrix.md b/docs/features/led_matrix.md index 28d24bc400..f14fb47d62 100644 --- a/docs/features/led_matrix.md +++ b/docs/features/led_matrix.md @@ -88,6 +88,8 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{ |`QK_LED_MATRIX_BRIGHTNESS_DOWN`|`LM_BRID`|Decrease the brightness level | |`QK_LED_MATRIX_SPEED_UP` |`LM_SPDU`|Increase the animation speed | |`QK_LED_MATRIX_SPEED_DOWN` |`LM_SPDD`|Decrease the animation speed | +|`QK_LED_MATRIX_FLAG_NEXT` |`LM_FLGN`|Cycle through flags | +|`QK_LED_MATRIX_FLAG_PREVIOUS` |`LM_FLGP`|Cycle through flags in reverse | ## LED Matrix Effects {#led-matrix-effects} @@ -253,6 +255,7 @@ const char* effect_name = led_matrix_get_mode_name(led_matrix_get_mode()); #define LED_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL // Sets the default LED flags, if none has been set #define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right. // If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR +#define LED_MATRIX_FLAG_STEPS { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_NONE } // Sets the flags which can be cycled through. ``` ## EEPROM storage {#eeprom-storage} @@ -505,6 +508,62 @@ The current effect speed, from 0 to 255. --- +### `void led_matrix_set_flags(led_flags_t flags)` {#api-led-matrix-set-flags} + +Set the global effect flags. + +#### Arguments {#api-led-matrix-set-flags-arguments} + + - `led_flags_t flags` + The [flags](#flags) value to set. + +--- + +### `void led_matrix_set_flags_noeeprom(led_flags_t flags)` {#api-led-matrix-set-flags-noeeprom} + +Set the global effect flags. New state is not written to EEPROM. + +#### Arguments {#api-led-matrix-set-flags-noeeprom-arguments} + + - `led_flags_t flags` + The [flags](#flags) value to set. + +--- + +### `void led_matrix_flags_step(void)` {#api-led-matrix-flags-step} + +Move to the next flag combination. + +--- + +### `void led_matrix_flags_step_noeeprom(void)` {#api-led-matrix-flags-step-noeeprom} + +Move to the next flag combination. New state is not written to EEPROM. + +--- + +### `void led_matrix_flags_step_reverse(void)` {#api-led-matrix-flags-step-reverse} + +Move to the previous flag combination. + +--- + +### `void led_matrix_flags_step_reverse_noeeprom(void)` {#api-led-matrix-flags-step-reverse-noeeprom} + +Move to the previous flag combination. New state is not written to EEPROM. + +--- + +### `uint8_t led_matrix_get_flags(void)` {#api-led-matrix-get-flags} + +Get the current global effect flags. + +#### Return Value {#api-led-matrix-get-flags-return} + +The current effect [flags](#flags). + +--- + ### `void led_matrix_reload_from_eeprom(void)` {#api-led-matrix-reload-from-eeprom} Reload the effect configuration (enabled, mode and brightness) from EEPROM. diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md index 95ee4c4896..36680f24a2 100644 --- a/docs/features/rgb_matrix.md +++ b/docs/features/rgb_matrix.md @@ -96,6 +96,8 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{ |`QK_RGB_MATRIX_VALUE_DOWN` |`RM_VALD`|Decrease the brightness level | |`QK_RGB_MATRIX_SPEED_UP` |`RM_SPDU`|Increase the animation speed | |`QK_RGB_MATRIX_SPEED_DOWN` |`RM_SPDD`|Decrease the animation speed | +|`QK_RGB_MATRIX_FLAG_NEXT` |`RM_FLGN`|Cycle through flags | +|`QK_RGB_MATRIX_FLAG_PREVIOUS` |`RM_FLGP`|Cycle through flags in reverse | ## RGB Matrix Effects {#rgb-matrix-effects} @@ -409,6 +411,7 @@ const char* effect_name = rgb_matrix_get_mode_name(rgb_matrix_get_mode()); #define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right. // If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR #define RGB_TRIGGER_ON_KEYDOWN // Triggers RGB keypress events on key down. This makes RGB control feel more responsive. This may cause RGB to not function properly on some boards +#define RGB_MATRIX_FLAG_STEPS { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_UNDERGLOW, LED_FLAG_NONE } // Sets the flags which can be cycled through. ``` ## EEPROM storage {#eeprom-storage} @@ -852,6 +855,62 @@ The current effect speed, from 0 to 255. --- +### `void rgb_matrix_set_flags(led_flags_t flags)` {#api-rgb-matrix-set-flags} + +Set the global effect flags. + +#### Arguments {#api-rgb-matrix-set-flags-arguments} + + - `led_flags_t flags` + The [flags](#flags) value to set. + +--- + +### `void rgb_matrix_set_flags_noeeprom(led_flags_t flags)` {#api-rgb-matrix-set-flags-noeeprom} + +Set the global effect flags. New state is not written to EEPROM. + +#### Arguments {#api-rgb-matrix-set-flags-noeeprom-arguments} + + - `led_flags_t flags` + The [flags](#flags) value to set. + +--- + +### `void rgb_matrix_flags_step(void)` {#api-rgb-matrix-flags-step} + +Move to the next flag combination. + +--- + +### `void rgb_matrix_flags_step_noeeprom(void)` {#api-rgb-matrix-flags-step-noeeprom} + +Move to the next flag combination. New state is not written to EEPROM. + +--- + +### `void rgb_matrix_flags_step_reverse(void)` {#api-rgb-matrix-flags-step-reverse} + +Move to the previous flag combination. + +--- + +### `void rgb_matrix_flags_step_reverse_noeeprom(void)` {#api-rgb-matrix-flags-step-reverse-noeeprom} + +Move to the previous flag combination. New state is not written to EEPROM. + +--- + +### `uint8_t rgb_matrix_get_flags(void)` {#api-rgb-matrix-get-flags} + +Get the current global effect flags. + +#### Return Value {#api-rgb-matrix-get-flags-return} + +The current effect [flags](#flags). + +--- + ### `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). diff --git a/docs/keycodes.md b/docs/keycodes.md index e569e87431..9a4ca7ea0c 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -433,6 +433,8 @@ See also: [LED Matrix](features/led_matrix) |`QK_LED_MATRIX_BRIGHTNESS_DOWN`|`LM_BRID`|Decrease the brightness level | |`QK_LED_MATRIX_SPEED_UP` |`LM_SPDU`|Increase the animation speed | |`QK_LED_MATRIX_SPEED_DOWN` |`LM_SPDD`|Decrease the animation speed | +|`QK_LED_MATRIX_FLAG_NEXT` |`LM_FLGN`|Cycle through flags | +|`QK_LED_MATRIX_FLAG_PREVIOUS` |`LM_FLGP`|Cycle through flags in reverse | ## Magic Keycodes {#magic-keycodes} @@ -783,6 +785,8 @@ See also: [RGB Matrix](features/rgb_matrix) |`QK_RGB_MATRIX_VALUE_DOWN` |`RM_VALD`|Decrease the brightness level | |`QK_RGB_MATRIX_SPEED_UP` |`RM_SPDU`|Increase the animation speed | |`QK_RGB_MATRIX_SPEED_DOWN` |`RM_SPDD`|Decrease the animation speed | +|`QK_RGB_MATRIX_FLAG_NEXT` |`RM_FLGN`|Cycle through flags | +|`QK_RGB_MATRIX_FLAG_PREVIOUS` |`RM_FLGP`|Cycle through flags in reverse | ## US ANSI Shifted Symbols {#us-ansi-shifted-symbols} From bbd6e8ab340bb4b3f25671fea59fd608397e8a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Mart=C3=ADnez?= <58857054+elpekenin@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:52:43 +0200 Subject: [PATCH 48/95] [Feature] Implement `mod_t` packed struct (#25168) --- quantum/action_util.c | 47 ++++++++++++++++++++++++++++++++++++------- quantum/action_util.h | 21 +++++++++++++++++++ 2 files changed, 61 insertions(+), 7 deletions(-) diff --git a/quantum/action_util.c b/quantum/action_util.c index e821e113ef..0996ff908e 100644 --- a/quantum/action_util.c +++ b/quantum/action_util.c @@ -46,9 +46,20 @@ extern inline void clear_keys(void); #ifndef NO_ACTION_ONESHOT static uint8_t oneshot_mods = 0; static uint8_t oneshot_locked_mods = 0; -uint8_t get_oneshot_locked_mods(void) { +/** + * @brief Retrieve current state of locked oneshot modifiers. + * + * @return Current state of the locked oneshot modifier keys as a bitmask. + */ +uint8_t get_oneshot_locked_mods(void) { return oneshot_locked_mods; } +/** + * Same as \ref get_oneshot_locked_mods but returns \ref mod_t for convenience. + */ +mod_t get_oneshot_locked_mod_state(void) { + return (mod_t)get_oneshot_locked_mods(); +} void add_oneshot_locked_mods(uint8_t mods) { if ((oneshot_locked_mods & mods) != mods) { oneshot_locked_mods |= mods; @@ -326,13 +337,20 @@ void send_keyboard_report(void) { send_6kro_report(); } -/** \brief Get mods +/** + * @brief Retrieve current state of modifiers. * - * FIXME: needs doc + * @return Current state of the modifier keys as a bitmask. */ uint8_t get_mods(void) { return real_mods; } +/** + * Same as \ref get_mods but returns \ref mod_t for convenience. + */ +mod_t get_mod_state(void) { + return (mod_t)get_mods(); +} /** \brief add mods * * FIXME: needs doc @@ -362,13 +380,20 @@ void clear_mods(void) { real_mods = 0; } -/** \brief get weak mods +/** + * @brief Retrieve current state of weak modifiers. * - * FIXME: needs doc + * @return Current state of the weak modifier keys as a bitmask. */ uint8_t get_weak_mods(void) { return weak_mods; } +/** + * Same as \ref get_weak_mods but returns \ref mod_t for convenience. + */ +mod_t get_weak_mod_state(void) { + return (mod_t)get_weak_mods(); +} /** \brief add weak mods * * FIXME: needs doc @@ -423,14 +448,22 @@ void clear_suppressed_override_mods(void) { #endif #ifndef NO_ACTION_ONESHOT -/** \brief get oneshot mods +/** + * @brief Retrieve current state of oneshot modifiers. * - * FIXME: needs doc + * @return Current state of the oneshot modifier keys as a bitmask. */ uint8_t get_oneshot_mods(void) { return oneshot_mods; } +/** + * Same as \ref get_oneshot_mods but returns \ref mod_t for convenience. + */ +mod_t get_oneshot_mod_state(void) { + return (mod_t)get_oneshot_mods(); +} + void add_oneshot_mods(uint8_t mods) { if ((oneshot_mods & mods) != mods) { # if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) diff --git a/quantum/action_util.h b/quantum/action_util.h index d2ecb145be..8b1974cd32 100644 --- a/quantum/action_util.h +++ b/quantum/action_util.h @@ -18,6 +18,8 @@ along with this program. If not, see . #pragma once #include + +#include "compiler_support.h" #include "report.h" #include "modifiers.h" @@ -25,6 +27,21 @@ along with this program. If not, see . extern "C" { #endif +typedef union { + uint8_t raw; + struct { + bool left_ctrl : 1; + bool left_shift : 1; + bool left_alt : 1; + bool left_gui : 1; + bool right_ctrl : 1; + bool right_shift : 1; + bool right_alt : 1; + bool right_gui : 1; + }; +} PACKED mod_t; +STATIC_ASSERT(sizeof(mod_t) == sizeof(uint8_t), "Invalid size for 'mod_t'"); + extern report_keyboard_t *keyboard_report; #ifdef NKRO_ENABLE extern report_nkro_t *nkro_report; @@ -47,6 +64,7 @@ inline void clear_keys(void) { /* modifier */ uint8_t get_mods(void); +mod_t get_mod_state(void); void add_mods(uint8_t mods); void del_mods(uint8_t mods); void set_mods(uint8_t mods); @@ -54,6 +72,7 @@ void clear_mods(void); /* weak modifier */ uint8_t get_weak_mods(void); +mod_t get_weak_mod_state(void); void add_weak_mods(uint8_t mods); void del_weak_mods(uint8_t mods); void set_weak_mods(uint8_t mods); @@ -61,6 +80,7 @@ void clear_weak_mods(void); /* oneshot modifier */ uint8_t get_oneshot_mods(void); +mod_t get_oneshot_mod_state(void); void add_oneshot_mods(uint8_t mods); void del_oneshot_mods(uint8_t mods); void set_oneshot_mods(uint8_t mods); @@ -68,6 +88,7 @@ void clear_oneshot_mods(void); bool has_oneshot_mods_timed_out(void); uint8_t get_oneshot_locked_mods(void); +mod_t get_oneshot_locked_mod_state(void); void add_oneshot_locked_mods(uint8_t mods); void set_oneshot_locked_mods(uint8_t mods); void clear_oneshot_locked_mods(void); From 36fd2437b07e5326722fc1f20b44cbb7bbdba6ea Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Tue, 30 Sep 2025 10:09:31 -0600 Subject: [PATCH 49/95] Migrate `g_led_config` to DD (0-9, A) (#25558) --- keyboards/1upkeyboards/super16/keyboard.json | 20 ++- keyboards/1upkeyboards/super16/super16.c | 39 ----- .../1upkeyboards/super16v2/keyboard.json | 22 +++ keyboards/1upkeyboards/super16v2/super16v2.c | 41 ----- .../4pplet/perk60_iso/rev_a/keyboard.json | 66 +++++++- keyboards/4pplet/perk60_iso/rev_a/rev_a.c | 155 +++++++----------- keyboards/acheron/apollo/87h/delta/delta.c | 38 ----- .../acheron/apollo/87h/delta/keyboard.json | 89 ++++++++++ keyboards/acheron/apollo/87h/gamma/gamma.c | 23 --- .../acheron/apollo/87h/gamma/keyboard.json | 89 ++++++++++ keyboards/acheron/apollo/87htsc/87htsc.c | 24 --- keyboards/acheron/apollo/87htsc/keyboard.json | 88 ++++++++++ keyboards/acheron/apollo/88htsc/88htsc.c | 42 ----- keyboards/acheron/apollo/88htsc/keyboard.json | 89 ++++++++++ keyboards/adpenrose/akemipad/akemipad.c | 27 --- keyboards/adpenrose/akemipad/keyboard.json | 30 +++- .../aeboards/satellite/rev1/keyboard.json | 74 +++++++++ keyboards/aeboards/satellite/rev1/rev1.c | 40 ----- keyboards/aleblazer/zodiark/keyboard.json | 70 ++++++++ keyboards/aleblazer/zodiark/zodiark.c | 54 ------ keyboards/axolstudio/yeti/hotswap/hotswap.c | 22 --- .../axolstudio/yeti/hotswap/keyboard.json | 66 ++++++++ 22 files changed, 762 insertions(+), 446 deletions(-) delete mode 100644 keyboards/1upkeyboards/super16/super16.c delete mode 100644 keyboards/1upkeyboards/super16v2/super16v2.c delete mode 100644 keyboards/acheron/apollo/88htsc/88htsc.c delete mode 100644 keyboards/adpenrose/akemipad/akemipad.c delete mode 100644 keyboards/aleblazer/zodiark/zodiark.c diff --git a/keyboards/1upkeyboards/super16/keyboard.json b/keyboards/1upkeyboards/super16/keyboard.json index 3b5859474a..bd8c8fe00d 100644 --- a/keyboards/1upkeyboards/super16/keyboard.json +++ b/keyboards/1upkeyboards/super16/keyboard.json @@ -74,7 +74,25 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "ws2812" + "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": 150, "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": 150, "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": 150, "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": 150, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 75, "y": 64, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 4} + ] }, "features": { "bootmagic": true, diff --git a/keyboards/1upkeyboards/super16/super16.c b/keyboards/1upkeyboards/super16/super16.c deleted file mode 100644 index a9946c7525..0000000000 --- a/keyboards/1upkeyboards/super16/super16.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" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 1, 2, 3 }, - { 7, 6, 5, 4 }, - { 8, 9, 10, 11 }, - { 15, 14, 13, 12 } -}, { - // LED Index to Physical Position - { 0, 0 }, { 75, 0 }, { 150, 0 }, { 224, 0 }, - { 224, 21 }, { 150, 21 }, { 75, 21 }, { 0, 21 }, - { 0, 43 }, { 75, 43 }, { 150, 43 }, { 224, 43 }, - { 224, 64 }, { 150, 64 }, { 75, 64 }, { 0, 64 }, - -}, { - // LED Index to Flag - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4 -} }; -#endif diff --git a/keyboards/1upkeyboards/super16v2/keyboard.json b/keyboards/1upkeyboards/super16v2/keyboard.json index 5c5123453c..1fb14d86da 100644 --- a/keyboards/1upkeyboards/super16v2/keyboard.json +++ b/keyboards/1upkeyboards/super16v2/keyboard.json @@ -46,6 +46,28 @@ "splash": true }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 3], "x": 28, "y": 12, "flags": 4}, + {"matrix": [0, 2], "x": 84, "y": 12, "flags": 4}, + {"matrix": [0, 1], "x": 140, "y": 12, "flags": 4}, + {"matrix": [0, 0], "x": 196, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 28, "y": 28, "flags": 4}, + {"matrix": [1, 2], "x": 84, "y": 28, "flags": 4}, + {"matrix": [1, 1], "x": 140, "y": 28, "flags": 4}, + {"matrix": [1, 0], "x": 196, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 28, "y": 44, "flags": 4}, + {"matrix": [2, 2], "x": 84, "y": 44, "flags": 4}, + {"matrix": [2, 1], "x": 140, "y": 44, "flags": 4}, + {"matrix": [2, 0], "x": 196, "y": 44, "flags": 4}, + {"matrix": [3, 3], "x": 28, "y": 60, "flags": 4}, + {"matrix": [3, 2], "x": 84, "y": 60, "flags": 4}, + {"matrix": [3, 1], "x": 140, "y": 60, "flags": 4}, + {"matrix": [3, 0], "x": 196, "y": 60, "flags": 4}, + {"x": 168, "y": 48, "flags": 2}, + {"x": 168, "y": 16, "flags": 2}, + {"x": 58, "y": 16, "flags": 2}, + {"x": 56, "y": 48, "flags": 2} + ], "sleep": true }, "features": { diff --git a/keyboards/1upkeyboards/super16v2/super16v2.c b/keyboards/1upkeyboards/super16v2/super16v2.c deleted file mode 100644 index 56e5fe7e7f..0000000000 --- a/keyboards/1upkeyboards/super16v2/super16v2.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2022 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" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 3, 2, 1, 0 }, - { 7, 6, 5, 4 }, - { 11, 10, 9, 8 }, - { 15, 14, 13, 12 } -}, { - // LED Index to Physical Position - { 28, 12 }, { 84, 12 }, { 140, 12 }, { 196, 12 }, - { 28, 28 }, { 84, 28 }, { 140, 28 }, { 196, 28 }, - { 28, 44 }, { 84, 44 }, { 140, 44 }, { 196, 44 }, - { 28, 60 }, { 84, 60 }, { 140, 60 }, { 196, 60 }, - { 168, 48 }, { 168, 16 }, { 58, 16 }, { 56, 48 } -}, { - // LED Index to Flag - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4, - 4, 4, 4, 4, - 2, 2, 2, 2, -} }; -#endif diff --git a/keyboards/4pplet/perk60_iso/rev_a/keyboard.json b/keyboards/4pplet/perk60_iso/rev_a/keyboard.json index 8d3a519a87..2e50d02a52 100644 --- a/keyboards/4pplet/perk60_iso/rev_a/keyboard.json +++ b/keyboards/4pplet/perk60_iso/rev_a/keyboard.json @@ -37,7 +37,71 @@ "default": { "val": 80 }, - "driver": "is31fl3733" + "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 32, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 65, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 97, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 113, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 129, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 145, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 161, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 178, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 194, "y": 0, "flags": 4}, + {"matrix": [3, 6], "x": 218, "y": 0, "flags": 1}, + {"matrix": [2, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [3, 0], "x": 24, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 40, "y": 16, "flags": 4}, + {"matrix": [3, 1], "x": 57, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 73, "y": 16, "flags": 4}, + {"matrix": [3, 2], "x": 89, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 105, "y": 16, "flags": 4}, + {"matrix": [3, 3], "x": 121, "y": 16, "flags": 4}, + {"matrix": [2, 4], "x": 137, "y": 16, "flags": 4}, + {"matrix": [3, 4], "x": 153, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 170, "y": 16, "flags": 4}, + {"matrix": [3, 5], "x": 186, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 202, "y": 16, "flags": 4}, + {"matrix": [7, 6], "x": 224, "y": 24, "flags": 1}, + {"matrix": [4, 0], "x": 6, "y": 32, "flags": 8}, + {"matrix": [5, 0], "x": 28, "y": 32, "flags": 4}, + {"matrix": [4, 1], "x": 44, "y": 32, "flags": 4}, + {"matrix": [5, 1], "x": 61, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 77, "y": 32, "flags": 4}, + {"matrix": [5, 2], "x": 93, "y": 32, "flags": 4}, + {"matrix": [4, 3], "x": 109, "y": 32, "flags": 4}, + {"matrix": [5, 3], "x": 125, "y": 32, "flags": 4}, + {"matrix": [4, 4], "x": 141, "y": 32, "flags": 4}, + {"matrix": [5, 4], "x": 157, "y": 32, "flags": 4}, + {"matrix": [4, 5], "x": 174, "y": 32, "flags": 4}, + {"matrix": [5, 5], "x": 190, "y": 32, "flags": 4}, + {"matrix": [4, 6], "x": 206, "y": 32, "flags": 1}, + {"matrix": [6, 0], "x": 2, "y": 48, "flags": 1}, + {"matrix": [7, 0], "x": 20, "y": 48, "flags": 4}, + {"matrix": [6, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [7, 1], "x": 52, "y": 48, "flags": 4}, + {"matrix": [6, 2], "x": 69, "y": 48, "flags": 4}, + {"matrix": [7, 2], "x": 85, "y": 48, "flags": 4}, + {"matrix": [6, 3], "x": 101, "y": 48, "flags": 4}, + {"matrix": [7, 3], "x": 117, "y": 48, "flags": 4}, + {"matrix": [6, 4], "x": 133, "y": 48, "flags": 4}, + {"matrix": [7, 4], "x": 149, "y": 48, "flags": 4}, + {"matrix": [6, 5], "x": 165, "y": 48, "flags": 4}, + {"matrix": [7, 5], "x": 182, "y": 48, "flags": 4}, + {"matrix": [8, 6], "x": 212, "y": 48, "flags": 1}, + {"matrix": [8, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [8, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [9, 0], "x": 42, "y": 64, "flags": 1}, + {"matrix": [8, 3], "x": 103, "y": 64, "flags": 4}, + {"matrix": [9, 3], "x": 163, "y": 64, "flags": 1}, + {"matrix": [9, 4], "x": 184, "y": 64, "flags": 1}, + {"matrix": [8, 5], "x": 204, "y": 64, "flags": 1}, + {"matrix": [9, 5], "x": 224, "y": 64, "flags": 1} + ] }, "features": { "bootmagic": true, diff --git a/keyboards/4pplet/perk60_iso/rev_a/rev_a.c b/keyboards/4pplet/perk60_iso/rev_a/rev_a.c index c4ab064cb2..431400a6b8 100644 --- a/keyboards/4pplet/perk60_iso/rev_a/rev_a.c +++ b/keyboards/4pplet/perk60_iso/rev_a/rev_a.c @@ -31,99 +31,68 @@ along with this program. If not, see . #ifdef RGB_MATRIX_ENABLE const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { - { 0, SW11_CS2, SW10_CS2, SW12_CS2 }, //D402 - { 0, SW11_CS3, SW10_CS3, SW12_CS3 }, //D403 - { 0, SW11_CS4, SW10_CS4, SW12_CS4 }, //D404 - { 0, SW11_CS5, SW10_CS5, SW12_CS5 }, //D405 - { 0, SW11_CS6, SW10_CS6, SW12_CS6 }, //D406 - { 0, SW11_CS7, SW10_CS7, SW12_CS7 }, //D407 - { 0, SW11_CS8, SW10_CS8, SW12_CS8 }, //D408 - { 0, SW11_CS9, SW10_CS9, SW12_CS9 }, //D409 - { 0, SW11_CS10, SW10_CS10, SW12_CS10 }, //D410 - { 0, SW11_CS11, SW10_CS11, SW12_CS11 }, //D411 - { 0, SW11_CS12, SW10_CS12, SW12_CS12 }, //D412 - { 0, SW11_CS13, SW10_CS13, SW12_CS13 }, //D413 - { 0, SW11_CS14, SW10_CS14, SW12_CS14 }, //D414 - { 0, SW11_CS15, SW10_CS15, SW12_CS15 }, //D415 - { 0, SW11_CS1, SW10_CS1, SW12_CS1 }, //D401 - { 0, SW8_CS4, SW7_CS4, SW9_CS4 }, //D420 - { 0, SW8_CS5, SW7_CS5, SW9_CS5 }, //D421 - { 0, SW8_CS6, SW7_CS6, SW9_CS6 }, //D422 - { 0, SW8_CS7, SW7_CS7, SW9_CS7 }, //D423 - { 0, SW8_CS8, SW7_CS8, SW9_CS8 }, //D424 - { 0, SW8_CS9, SW7_CS9, SW9_CS9 }, //D425 - { 0, SW8_CS10, SW7_CS10, SW9_CS10 }, //D426 - { 0, SW8_CS11, SW7_CS11, SW9_CS11 }, //D427 - { 0, SW8_CS12, SW7_CS12, SW9_CS12 }, //D428 - { 0, SW8_CS13, SW7_CS13, SW9_CS13 }, //D429 - { 0, SW8_CS14, SW7_CS14, SW9_CS14 }, //D430 - { 0, SW8_CS15, SW7_CS15, SW9_CS15 }, //D431 - { 0, SW11_CS16, SW10_CS16, SW12_CS16 }, //D416 - { 0, SW8_CS2, SW7_CS2, SW9_CS2 }, //D418 - { 0, SW8_CS3, SW7_CS3, SW9_CS3 }, //D419 - { 0, SW5_CS5, SW4_CS5, SW6_CS5 }, //D437 - { 0, SW5_CS6, SW4_CS6, SW6_CS6 }, //D438 - { 0, SW5_CS7, SW4_CS7, SW6_CS7 }, //D439 - { 0, SW5_CS8, SW4_CS8, SW6_CS8 }, //D440 - { 0, SW5_CS9, SW4_CS9, SW6_CS9 }, //D441 - { 0, SW5_CS10, SW4_CS10, SW6_CS10 }, //D442 - { 0, SW5_CS11, SW4_CS11, SW6_CS11 }, //D443 - { 0, SW5_CS12, SW4_CS12, SW6_CS12 }, //D444 - { 0, SW5_CS13, SW4_CS13, SW6_CS13 }, //D445 - { 0, SW5_CS14, SW4_CS14, SW6_CS14 }, //D446 - { 0, SW8_CS16, SW7_CS16, SW9_CS16 }, //D432 - { 0, SW8_CS1, SW7_CS1, SW9_CS1 }, //D417 - { 0, SW5_CS3, SW4_CS3, SW6_CS3 }, //D435 - { 0, SW5_CS4, SW4_CS4, SW6_CS4 }, //D436 - { 0, SW2_CS2, SW1_CS2, SW3_CS2 }, //D450 - { 0, SW2_CS3, SW1_CS3, SW3_CS3 }, //D451 - { 0, SW2_CS4, SW1_CS4, SW3_CS4 }, //D452 - { 0, SW2_CS6, SW1_CS6, SW3_CS6 }, //D454 - { 0, SW2_CS8, SW1_CS8, SW3_CS8 }, //D456 - { 0, SW2_CS9, SW1_CS9, SW3_CS9 }, //D457 - { 0, SW2_CS10, SW1_CS10, SW3_CS10 }, //D458 - { 0, SW2_CS12, SW1_CS12, SW3_CS12 }, //D460 - { 0, SW2_CS13, SW1_CS13, SW3_CS13 }, //D461 - { 0, SW5_CS15, SW4_CS15, SW6_CS15 }, //D447 - { 0, SW5_CS1, SW4_CS1, SW6_CS1 }, //D433 - { 0, SW5_CS2, SW4_CS2, SW6_CS2 }, //D434 - { 0, SW2_CS1, SW1_CS1, SW3_CS1 }, //D449 - { 0, SW2_CS7, SW1_CS7, SW3_CS7 }, //D455 - { 0, SW2_CS11, SW1_CS11, SW3_CS11 }, //D459 - { 0, SW2_CS14, SW1_CS14, SW3_CS14 }, //D462 - { 0, SW2_CS15, SW1_CS15, SW3_CS15 }, //D463 - { 0, SW2_CS16, SW1_CS16, SW3_CS16 } //D464 -}; - -#define XXX NO_LED -led_config_t g_led_config = { - { - { 0, 2, 4, 6, 8, 10, 12 }, - { 1, 3, 5, 7, 9, 11, XXX }, - { 14, 16, 18, 20, 22, 24, 26 }, - { 15, 17, 19, 21, 23, 25, 13 }, - { 28, 30, 32, 34, 36, 38, 40 }, - { 29, 31, 33, 35, 37, 39, XXX }, - { 41, 43, 45, 47, 49, 51, XXX }, - { 42, 44, 46, 48, 50, 52, 27 }, - { 54, 55, XXX, 57, XXX, 60, 53 }, - { 56, XXX, XXX, 58, 59, 61, XXX }, - - }, { - { 0,0 }, { 16,0 }, { 32,0 }, { 48,0 }, { 65,0 }, { 81,0 }, { 97,0 }, {113,0 }, {129,0 }, {145,0 }, - {161,0 }, {178,0 }, {194,0 }, {218,0 }, { 4,16 }, { 24,16 }, { 40,16 }, { 57,16 }, { 73,16 }, { 89,16 }, - {105,16 }, {121,16 }, {137,16 }, {153,16 }, {170,16 }, {186,16 }, {202,16 }, {224,24 }, { 6,32 }, { 28,32 }, - { 44,32 }, { 61,32 }, { 77,32 }, { 93,32 }, {109,32 }, {125,32 }, {141,32 }, {157,32 }, {174,32 }, {190,32 }, - {206,32 }, { 2,48 }, { 20,48 }, { 36,48 }, { 52,48 }, { 69,48 }, { 85,48 }, {101,48 }, {117,48 }, {133,48 }, - {149,48 }, {165,48 }, {182,48 }, {212,48 }, { 2,64 }, { 22,64 }, { 42,64 }, {103,64 }, {163,64 }, {184,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, - 8, 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, 1, 4, 1, 1, 1, 1 - } + {0, SW11_CS2, SW10_CS2, SW12_CS2}, // D402 + {0, SW11_CS3, SW10_CS3, SW12_CS3}, // D403 + {0, SW11_CS4, SW10_CS4, SW12_CS4}, // D404 + {0, SW11_CS5, SW10_CS5, SW12_CS5}, // D405 + {0, SW11_CS6, SW10_CS6, SW12_CS6}, // D406 + {0, SW11_CS7, SW10_CS7, SW12_CS7}, // D407 + {0, SW11_CS8, SW10_CS8, SW12_CS8}, // D408 + {0, SW11_CS9, SW10_CS9, SW12_CS9}, // D409 + {0, SW11_CS10, SW10_CS10, SW12_CS10}, // D410 + {0, SW11_CS11, SW10_CS11, SW12_CS11}, // D411 + {0, SW11_CS12, SW10_CS12, SW12_CS12}, // D412 + {0, SW11_CS13, SW10_CS13, SW12_CS13}, // D413 + {0, SW11_CS14, SW10_CS14, SW12_CS14}, // D414 + {0, SW11_CS15, SW10_CS15, SW12_CS15}, // D415 + {0, SW11_CS1, SW10_CS1, SW12_CS1}, // D401 + {0, SW8_CS4, SW7_CS4, SW9_CS4}, // D420 + {0, SW8_CS5, SW7_CS5, SW9_CS5}, // D421 + {0, SW8_CS6, SW7_CS6, SW9_CS6}, // D422 + {0, SW8_CS7, SW7_CS7, SW9_CS7}, // D423 + {0, SW8_CS8, SW7_CS8, SW9_CS8}, // D424 + {0, SW8_CS9, SW7_CS9, SW9_CS9}, // D425 + {0, SW8_CS10, SW7_CS10, SW9_CS10}, // D426 + {0, SW8_CS11, SW7_CS11, SW9_CS11}, // D427 + {0, SW8_CS12, SW7_CS12, SW9_CS12}, // D428 + {0, SW8_CS13, SW7_CS13, SW9_CS13}, // D429 + {0, SW8_CS14, SW7_CS14, SW9_CS14}, // D430 + {0, SW8_CS15, SW7_CS15, SW9_CS15}, // D431 + {0, SW11_CS16, SW10_CS16, SW12_CS16}, // D416 + {0, SW8_CS2, SW7_CS2, SW9_CS2}, // D418 + {0, SW8_CS3, SW7_CS3, SW9_CS3}, // D419 + {0, SW5_CS5, SW4_CS5, SW6_CS5}, // D437 + {0, SW5_CS6, SW4_CS6, SW6_CS6}, // D438 + {0, SW5_CS7, SW4_CS7, SW6_CS7}, // D439 + {0, SW5_CS8, SW4_CS8, SW6_CS8}, // D440 + {0, SW5_CS9, SW4_CS9, SW6_CS9}, // D441 + {0, SW5_CS10, SW4_CS10, SW6_CS10}, // D442 + {0, SW5_CS11, SW4_CS11, SW6_CS11}, // D443 + {0, SW5_CS12, SW4_CS12, SW6_CS12}, // D444 + {0, SW5_CS13, SW4_CS13, SW6_CS13}, // D445 + {0, SW5_CS14, SW4_CS14, SW6_CS14}, // D446 + {0, SW8_CS16, SW7_CS16, SW9_CS16}, // D432 + {0, SW8_CS1, SW7_CS1, SW9_CS1}, // D417 + {0, SW5_CS3, SW4_CS3, SW6_CS3}, // D435 + {0, SW5_CS4, SW4_CS4, SW6_CS4}, // D436 + {0, SW2_CS2, SW1_CS2, SW3_CS2}, // D450 + {0, SW2_CS3, SW1_CS3, SW3_CS3}, // D451 + {0, SW2_CS4, SW1_CS4, SW3_CS4}, // D452 + {0, SW2_CS6, SW1_CS6, SW3_CS6}, // D454 + {0, SW2_CS8, SW1_CS8, SW3_CS8}, // D456 + {0, SW2_CS9, SW1_CS9, SW3_CS9}, // D457 + {0, SW2_CS10, SW1_CS10, SW3_CS10}, // D458 + {0, SW2_CS12, SW1_CS12, SW3_CS12}, // D460 + {0, SW2_CS13, SW1_CS13, SW3_CS13}, // D461 + {0, SW5_CS15, SW4_CS15, SW6_CS15}, // D447 + {0, SW5_CS1, SW4_CS1, SW6_CS1}, // D433 + {0, SW5_CS2, SW4_CS2, SW6_CS2}, // D434 + {0, SW2_CS1, SW1_CS1, SW3_CS1}, // D449 + {0, SW2_CS7, SW1_CS7, SW3_CS7}, // D455 + {0, SW2_CS11, SW1_CS11, SW3_CS11}, // D459 + {0, SW2_CS14, SW1_CS14, SW3_CS14}, // D462 + {0, SW2_CS15, SW1_CS15, SW3_CS15}, // D463 + {0, SW2_CS16, SW1_CS16, SW3_CS16} // D464 }; bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { diff --git a/keyboards/acheron/apollo/87h/delta/delta.c b/keyboards/acheron/apollo/87h/delta/delta.c index b17fce5c3a..a03bd01ec7 100644 --- a/keyboards/acheron/apollo/87h/delta/delta.c +++ b/keyboards/acheron/apollo/87h/delta/delta.c @@ -21,41 +21,3 @@ void board_init(void) { gpio_set_pin_input(B9); gpio_set_pin_input(B10); } - -led_config_t g_led_config = { { -// { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , NO_LED , 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 , NO_LED , NO_LED , NO_LED , NO_LED }, -// { 63 , NO_LED , 64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , NO_LED , NO_LED , 75 , NO_LED }, -// { 76 , 77 , 78 , NO_LED , NO_LED , NO_LED , 79 , NO_LED , NO_LED , 80 , 81 , 82 , 83 , NO_LED , 84 , 85 , 86 } -// - { 15 , 14 , 13 , 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , NO_LED , 2 , 1 , 0 }, - { 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 }, - { 49 , 48 , 47 , 46 , 45 , 44 , 43 , 42 , 41 , 40 , 39 , 38 , 37 , 36 , 35 , 34 , 33 }, - { 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , NO_LED , NO_LED , NO_LED , NO_LED }, - { 75 , NO_LED , 74 , 73 , 72 , 71 , 70 , 69 , 68 , 67 , 66 , 65 , 64 , NO_LED , NO_LED , 63 , NO_LED }, - { 76 , 77 , 78 , NO_LED , NO_LED , NO_LED , 79 , NO_LED , NO_LED , 80 , 81 , 82 , 83 , NO_LED , 84 , 85 , 86 } -},{ -// "Fine-tuned" complex configuration - { 210, 0}, { 196, 0}, { 182, 0}, { 168, 0}, { 154, 0}, { 140, 0}, { 140, 0}, { 126, 0}, { 112, 0}, { 98, 0}, { 84, 0}, { 70, 0}, { 56, 0}, { 28, 0}, { 14, 0}, { 0, 0}, - { 0, 45}, { 14, 45}, { 28, 45}, { 42, 45}, { 56, 45}, { 70, 45}, { 84, 45}, { 98, 45}, { 112, 45}, { 126, 45}, { 140, 45}, { 154, 45}, { 168, 45}, { 182, 45}, { 196, 45}, { 210, 45}, { 224, 45}, - { 224, 90}, { 210, 90}, { 196, 90}, { 182, 90}, { 168, 90}, { 154, 90}, { 140, 90}, { 126, 90}, { 112, 90}, { 98, 90}, { 84, 90}, { 70, 90}, { 56, 90}, { 42, 90}, { 28, 90}, { 14, 90}, { 0, 90}, - { 0, 135}, { 14, 135}, { 28, 135}, { 42, 135}, { 56, 135}, { 70, 135}, { 84, 135}, { 98, 135}, { 112, 135}, { 126, 135}, { 140, 135}, { 154, 135}, { 168, 135}, - { 192, 180}, { 168, 180}, { 154, 180}, { 140, 180}, { 126, 180}, { 112, 180}, { 98, 180}, { 84, 180}, { 70, 180}, { 56, 180}, { 42, 180}, { 28, 180}, { 14, 180}, - { 0, 225}, { 14, 225}, { 28, 225}, { 84, 225}, { 126, 225}, { 140, 225}, { 154, 225}, { 168, 225}, { 196, 45}, { 210, 45}, { 224, 90} -// "Stock" simple configuration -// { 224, 0}, { 210, 0}, { 196, 0}, { 182, 0}, { 168, 0}, { 154, 0}, { 140, 0}, { 126, 0}, { 112, 0}, { 98, 0}, { 84, 0}, { 70, 0}, { 56, 0}, { 28, 0}, { 14, 0}, { 0, 0}, -// { 0, 45}, { 14, 45}, { 28, 45}, { 42, 45}, { 56, 45}, { 70, 45}, { 84, 45}, { 98, 45}, { 112, 45}, { 126, 45}, { 140, 45}, { 154, 45}, { 168, 45}, { 182, 45}, { 196, 45}, { 210, 45}, { 224, 45}, -// { 224, 90}, { 210, 90}, { 196, 90}, { 182, 90}, { 168, 90}, { 154, 90}, { 140, 90}, { 126, 90}, { 112, 90}, { 98, 90}, { 84, 90}, { 70, 90}, { 56, 90}, { 42, 90}, { 28, 90}, { 14, 90}, { 0, 90}, -// { 0, 135}, { 14, 135}, { 28, 135}, { 42, 135}, { 56, 135}, { 70, 135}, { 84, 135}, { 98, 135}, { 112, 135}, { 126, 135}, { 140, 135}, { 154, 135}, { 168, 135}, -// { 224, 180}, { 196, 180}, { 182, 180}, { 168, 180}, { 154, 180}, { 140, 180}, { 126, 180}, { 112, 180}, { 98, 180}, { 84, 180}, { 70, 180}, { 56, 180}, { 14, 180}, -// { 0, 225}, { 14, 225}, { 28, 225}, { 84, 225}, { 126, 225}, { 140, 225}, { 154, 225}, { 168, 225}, { 196, 45}, { 210, 45}, { 224, 90} -}, { - 1 , 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 , 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 , 1 , - 1 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 1 , 1 , - 1 , 1 , 1 , 4 , 1 , 1 , 1 , 1 , 1 , 1 , 1 -} }; diff --git a/keyboards/acheron/apollo/87h/delta/keyboard.json b/keyboards/acheron/apollo/87h/delta/keyboard.json index f5bdf28d96..d9f6de197a 100644 --- a/keyboards/acheron/apollo/87h/delta/keyboard.json +++ b/keyboards/acheron/apollo/87h/delta/keyboard.json @@ -57,6 +57,95 @@ "val": 60 }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 16], "x": 224, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 210, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 196, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 182, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 168, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 154, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 126, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 98, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 70, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 14, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 14, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 28, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 42, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 56, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 70, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 84, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 112, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 126, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 140, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 154, "y": 12, "flags": 4}, + {"matrix": [1, 12], "x": 168, "y": 12, "flags": 4}, + {"matrix": [1, 13], "x": 182, "y": 12, "flags": 4}, + {"matrix": [1, 14], "x": 196, "y": 12, "flags": 4}, + {"matrix": [1, 15], "x": 210, "y": 12, "flags": 4}, + {"matrix": [1, 16], "x": 224, "y": 12, "flags": 4}, + {"matrix": [2, 16], "x": 224, "y": 25, "flags": 4}, + {"matrix": [2, 15], "x": 210, "y": 25, "flags": 4}, + {"matrix": [2, 14], "x": 196, "y": 25, "flags": 4}, + {"matrix": [2, 13], "x": 182, "y": 25, "flags": 4}, + {"matrix": [2, 12], "x": 168, "y": 25, "flags": 4}, + {"matrix": [2, 11], "x": 154, "y": 25, "flags": 4}, + {"matrix": [2, 10], "x": 140, "y": 25, "flags": 4}, + {"matrix": [2, 9], "x": 126, "y": 25, "flags": 4}, + {"matrix": [2, 8], "x": 112, "y": 25, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 25, "flags": 4}, + {"matrix": [2, 6], "x": 84, "y": 25, "flags": 4}, + {"matrix": [2, 5], "x": 70, "y": 25, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 25, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 25, "flags": 4}, + {"matrix": [2, 2], "x": 28, "y": 25, "flags": 4}, + {"matrix": [2, 1], "x": 14, "y": 25, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 25, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 14, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 28, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 42, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 70, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 84, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 98, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 112, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 126, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 38, "flags": 4}, + {"matrix": [3, 12], "x": 168, "y": 38, "flags": 1}, + {"matrix": [4, 15], "x": 210, "y": 51, "flags": 1}, + {"matrix": [4, 12], "x": 168, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 154, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 140, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 126, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 112, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 98, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 84, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 70, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 56, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 28, "y": 51, "flags": 1}, + {"matrix": [4, 0], "x": 14, "y": 51, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 28, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 84, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 126, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 140, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 154, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 168, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 196, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 210, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 1} + ], "sleep": true }, "features": { diff --git a/keyboards/acheron/apollo/87h/gamma/gamma.c b/keyboards/acheron/apollo/87h/gamma/gamma.c index f047db0fea..92c6697a1c 100644 --- a/keyboards/acheron/apollo/87h/gamma/gamma.c +++ b/keyboards/acheron/apollo/87h/gamma/gamma.c @@ -120,27 +120,4 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { {0, SW3_CS24, SW3_CS23, SW3_CS22 }, //RIGHT 86 }; - -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 }, - { 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 41 , 43 , 44 , 45 , 46 , 47 , 48 }, - { 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , NO_LED , NO_LED , NO_LED }, - { 63 , NO_LED , 64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 49 , 32 }, - { 76 , 77 , 78 , NO_LED , NO_LED , NO_LED , 79 , NO_LED , NO_LED , 80 , 81 , 82 , 83 , 84 , 85 , 86 } -},{ - { 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}, { 210, 0}, { 210, 0}, { 225, 0}, - { 0, 45}, { 15, 45}, { 30, 45}, { 45, 45}, { 60, 45}, { 75, 45}, { 90, 45}, { 105, 45}, { 120, 45}, { 135, 45}, { 150, 45}, { 165, 45}, { 180, 45}, { 210, 45}, { 210, 45}, { 215, 45}, - { 0, 90}, { 15, 90}, { 30, 90}, { 45, 90}, { 60, 90}, { 75, 90}, { 90, 90}, { 105, 90}, { 120, 90}, { 135, 90}, { 150, 90}, { 165, 90}, { 180, 90}, { 195, 90}, { 210, 90}, { 215, 90}, - { 0, 135}, { 15, 135}, { 30, 135}, { 45, 135}, { 60, 135}, { 75, 135}, { 90, 135}, { 105, 135}, { 120, 135}, { 135, 135}, { 150, 135}, { 165, 135}, { 180, 135}, - { 0, 180}, { 30, 180}, { 45, 180}, { 60, 180}, { 75, 180}, { 90, 180}, { 105, 180}, { 120, 180}, { 135, 180}, { 150, 180}, { 165, 180}, { 180, 180}, { 210, 180}, { 225, 45}, { 225, 0}, - { 0, 225}, { 15, 225}, { 30, 225}, { 90, 225}, { 135, 225}, { 150, 225}, { 165, 225}, { 180, 225}, { 195, 225}, { 210, 225}, { 225, 225} -}, { - 1 , 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 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 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 , 1 , 1 , 1 , 1 , - 1 , 1 , 1 , 4 , 1 , 1 , 1 , 1 , 1 , 1 , 1 -} }; #endif diff --git a/keyboards/acheron/apollo/87h/gamma/keyboard.json b/keyboards/acheron/apollo/87h/gamma/keyboard.json index 5c2087c968..03ba206526 100644 --- a/keyboards/acheron/apollo/87h/gamma/keyboard.json +++ b/keyboards/acheron/apollo/87h/gamma/keyboard.json @@ -58,6 +58,95 @@ "val": 80 }, "driver": "is31fl3741", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 14, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 70, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 98, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 126, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 154, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 168, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 182, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 196, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 210, "y": 0, "flags": 4}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 14, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 28, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 42, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 56, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 70, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 84, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 112, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 126, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 140, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 154, "y": 12, "flags": 4}, + {"matrix": [1, 12], "x": 168, "y": 12, "flags": 4}, + {"matrix": [1, 13], "x": 182, "y": 12, "flags": 4}, + {"matrix": [1, 14], "x": 196, "y": 12, "flags": 4}, + {"matrix": [1, 15], "x": 210, "y": 12, "flags": 4}, + {"matrix": [4, 15], "x": 224, "y": 12, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 25, "flags": 4}, + {"matrix": [2, 1], "x": 14, "y": 25, "flags": 4}, + {"matrix": [2, 2], "x": 28, "y": 25, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 25, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 25, "flags": 4}, + {"matrix": [2, 5], "x": 70, "y": 25, "flags": 4}, + {"matrix": [2, 6], "x": 84, "y": 25, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 25, "flags": 4}, + {"matrix": [2, 8], "x": 112, "y": 25, "flags": 4}, + {"matrix": [2, 9], "x": 126, "y": 25, "flags": 4}, + {"matrix": [2, 10], "x": 140, "y": 25, "flags": 4}, + {"matrix": [2, 11], "x": 154, "y": 25, "flags": 4}, + {"matrix": [2, 12], "x": 168, "y": 25, "flags": 4}, + {"matrix": [2, 13], "x": 182, "y": 25, "flags": 4}, + {"matrix": [2, 14], "x": 196, "y": 25, "flags": 4}, + {"matrix": [2, 15], "x": 210, "y": 25, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 25, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 14, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 28, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 42, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 70, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 84, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 98, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 112, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 126, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 38, "flags": 1}, + {"matrix": [3, 11], "x": 156, "y": 38, "flags": 1}, + {"matrix": [3, 12], "x": 168, "y": 38, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 14, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 28, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 42, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 56, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 70, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 84, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 98, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 112, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 126, "y": 51, "flags": 1}, + {"matrix": [4, 11], "x": 140, "y": 51, "flags": 1}, + {"matrix": [4, 12], "x": 156, "y": 51, "flags": 1}, + {"matrix": [4, 13], "x": 210, "y": 51, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 28, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 84, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 140, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 154, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 168, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 182, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 196, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 210, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 224, "y": 64, "flags": 1} + ], "sleep": true }, "features": { diff --git a/keyboards/acheron/apollo/87htsc/87htsc.c b/keyboards/acheron/apollo/87htsc/87htsc.c index 4225c34971..a03bd01ec7 100644 --- a/keyboards/acheron/apollo/87htsc/87htsc.c +++ b/keyboards/acheron/apollo/87htsc/87htsc.c @@ -21,27 +21,3 @@ void board_init(void) { gpio_set_pin_input(B9); gpio_set_pin_input(B10); } - -led_config_t g_led_config = { { - { 15 , 14 , 13 , 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , NO_LED , 2 , 1 , 0 }, - { 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 }, - { 49 , 48 , 47 , 46 , 45 , 44 , 43 , 42 , 41 , 40 , 39 , 38 , 37 , 36 , 35 , 34 , 33 }, - { 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , NO_LED , NO_LED , NO_LED , NO_LED }, - { 75 , NO_LED , 74 , 73 , 72 , 71 , 70 , 69 , 68 , 67 , 66 , 65 , 64 , NO_LED , NO_LED , 63 , NO_LED }, - { 76 , 77 , 78 , NO_LED , NO_LED , NO_LED , 79 , NO_LED , NO_LED , NO_LED , 80 , 81 , 82 , NO_LED , 83 , 84 , 85 } -},{ -// "Fine-tuned" complex configuration - { 210, 0}, { 196, 0}, { 182, 0}, { 168, 0}, { 154, 0}, { 140, 0}, { 140, 0}, { 126, 0}, { 112, 0}, { 98, 0}, { 84, 0}, { 70, 0}, { 56, 0}, { 28, 0}, { 14, 0}, { 0, 0}, - { 0, 45}, { 14, 45}, { 28, 45}, { 42, 45}, { 56, 45}, { 70, 45}, { 84, 45}, { 98, 45}, { 112, 45}, { 126, 45}, { 140, 45}, { 154, 45}, { 168, 45}, { 182, 45}, { 196, 45}, { 210, 45}, { 224, 45}, - { 224, 90}, { 210, 90}, { 196, 90}, { 182, 90}, { 168, 90}, { 154, 90}, { 140, 90}, { 126, 90}, { 112, 90}, { 98, 90}, { 84, 90}, { 70, 90}, { 56, 90}, { 42, 90}, { 28, 90}, { 14, 90}, { 0, 90}, - { 0, 135}, { 14, 135}, { 28, 135}, { 42, 135}, { 56, 135}, { 70, 135}, { 84, 135}, { 98, 135}, { 112, 135}, { 126, 135}, { 140, 135}, { 154, 135}, { 168, 135}, - { 192, 180}, { 168, 180}, { 154, 180}, { 140, 180}, { 126, 180}, { 112, 180}, { 98, 180}, { 84, 180}, { 70, 180}, { 56, 180}, { 42, 180}, { 28, 180}, { 14, 180}, - { 0, 225}, { 14, 225}, { 28, 225}, { 84, 225}, { 140, 225}, { 154, 225}, { 168, 225}, { 196, 225}, { 210, 225}, { 224, 225} -}, { - 1 , 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 , 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 , 1 , - 1 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 1 , 1 , - 1 , 1 , 1 , 4 , 1 , 1 , 1 , 1 , 1 , 1 -} }; diff --git a/keyboards/acheron/apollo/87htsc/keyboard.json b/keyboards/acheron/apollo/87htsc/keyboard.json index 4b2ff1ad66..957c02c1b6 100644 --- a/keyboards/acheron/apollo/87htsc/keyboard.json +++ b/keyboards/acheron/apollo/87htsc/keyboard.json @@ -60,6 +60,94 @@ "val": 60 }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 16], "x": 210, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 196, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 182, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 168, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 154, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 126, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 98, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 70, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 14, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 14, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 28, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 42, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 56, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 70, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 84, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 112, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 126, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 140, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 154, "y": 12, "flags": 4}, + {"matrix": [1, 12], "x": 168, "y": 12, "flags": 4}, + {"matrix": [1, 13], "x": 182, "y": 12, "flags": 4}, + {"matrix": [1, 14], "x": 196, "y": 12, "flags": 4}, + {"matrix": [1, 15], "x": 210, "y": 12, "flags": 4}, + {"matrix": [1, 16], "x": 224, "y": 12, "flags": 4}, + {"matrix": [2, 16], "x": 224, "y": 25, "flags": 4}, + {"matrix": [2, 15], "x": 210, "y": 25, "flags": 4}, + {"matrix": [2, 14], "x": 196, "y": 25, "flags": 4}, + {"matrix": [2, 13], "x": 182, "y": 25, "flags": 4}, + {"matrix": [2, 12], "x": 168, "y": 25, "flags": 4}, + {"matrix": [2, 11], "x": 154, "y": 25, "flags": 4}, + {"matrix": [2, 10], "x": 140, "y": 25, "flags": 4}, + {"matrix": [2, 9], "x": 126, "y": 25, "flags": 4}, + {"matrix": [2, 8], "x": 112, "y": 25, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 25, "flags": 4}, + {"matrix": [2, 6], "x": 84, "y": 25, "flags": 4}, + {"matrix": [2, 5], "x": 70, "y": 25, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 25, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 25, "flags": 4}, + {"matrix": [2, 2], "x": 28, "y": 25, "flags": 4}, + {"matrix": [2, 1], "x": 14, "y": 25, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 25, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 14, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 28, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 42, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 70, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 84, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 98, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 112, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 126, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 38, "flags": 4}, + {"matrix": [3, 12], "x": 168, "y": 38, "flags": 1}, + {"matrix": [4, 15], "x": 192, "y": 51, "flags": 1}, + {"matrix": [4, 12], "x": 168, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 154, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 140, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 126, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 112, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 98, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 84, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 70, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 56, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 28, "y": 51, "flags": 1}, + {"matrix": [4, 0], "x": 14, "y": 51, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 28, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 84, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 140, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 154, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 168, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 196, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 210, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 1} + ], "sleep": true }, "features": { diff --git a/keyboards/acheron/apollo/88htsc/88htsc.c b/keyboards/acheron/apollo/88htsc/88htsc.c deleted file mode 100644 index 8144fc57bc..0000000000 --- a/keyboards/acheron/apollo/88htsc/88htsc.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright 2022 Álvaro "Gondolindrim" Volpato - -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" - -led_config_t g_led_config = { { - { 16 , 15 , 14 , 13 , 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 }, - { 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 }, - { 50 , 49 , 48 , 47 , 46 , 45 , 44 , 43 , 42 , 41 , 40 , 39 , 38 , 37 , 36 , 35 , 34 }, - { 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , NO_LED , NO_LED , NO_LED , NO_LED }, - { 76 , NO_LED , 75 , 74 , 73 , 72 , 71 , 70 , 69 , 68 , 67 , 66 , 65 , NO_LED , NO_LED , 64 , NO_LED }, - { 77 , 78 , 79 , NO_LED , NO_LED , NO_LED , 80 , NO_LED , NO_LED , NO_LED , 81 , 82 , 83 , NO_LED , 84 , 85 , 86 } -},{ -// "Fine-tuned" complex configuration - { 210, 0}, { 196, 0}, { 182, 0}, { 168, 0}, { 154, 0}, { 140, 0}, { 140, 0}, { 126, 0}, { 112, 0}, { 98, 0}, { 84, 0}, { 70, 0}, { 56, 0}, { 45, 0}, { 28, 0}, { 14, 0}, { 0, 0}, - { 0, 45}, { 14, 45}, { 28, 45}, { 42, 45}, { 56, 45}, { 70, 45}, { 84, 45}, { 98, 45}, { 112, 45}, { 126, 45}, { 140, 45}, { 154, 45}, { 168, 45}, { 182, 45}, { 196, 45}, { 210, 45}, { 224, 45}, - { 224, 90}, { 210, 90}, { 196, 90}, { 182, 90}, { 168, 90}, { 154, 90}, { 140, 90}, { 126, 90}, { 112, 90}, { 98, 90}, { 84, 90}, { 70, 90}, { 56, 90}, { 42, 90}, { 28, 90}, { 14, 90}, { 0, 90}, - { 0, 135}, { 14, 135}, { 28, 135}, { 42, 135}, { 56, 135}, { 70, 135}, { 84, 135}, { 98, 135}, { 112, 135}, { 126, 135}, { 140, 135}, { 154, 135}, { 168, 135}, - { 192, 180}, { 168, 180}, { 154, 180}, { 140, 180}, { 126, 180}, { 112, 180}, { 98, 180}, { 84, 180}, { 70, 180}, { 56, 180}, { 42, 180}, { 28, 180}, { 14, 180}, - { 0, 225}, { 14, 225}, { 28, 225}, { 84, 225}, { 140, 225}, { 154, 225}, { 168, 225}, { 196, 45}, { 210, 45}, { 224, 90} -}, { - 1 , 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 , 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 , 1 , - 1 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 1 , 1 , - 1 , 1 , 1 , 4 , 1 , 1 , 1 , 1 , 1 , 1 -} }; diff --git a/keyboards/acheron/apollo/88htsc/keyboard.json b/keyboards/acheron/apollo/88htsc/keyboard.json index 165c8d76eb..182339b4fd 100644 --- a/keyboards/acheron/apollo/88htsc/keyboard.json +++ b/keyboards/acheron/apollo/88htsc/keyboard.json @@ -60,6 +60,95 @@ "val": 60 }, "driver": "ws2812", + "layout": [ + {"matrix": [0, 16], "x": 210, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 196, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 182, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 168, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 154, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 140, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 126, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 98, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 84, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 70, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 28, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 14, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 12, "flags": 4}, + {"matrix": [1, 1], "x": 14, "y": 12, "flags": 4}, + {"matrix": [1, 2], "x": 28, "y": 12, "flags": 4}, + {"matrix": [1, 3], "x": 42, "y": 12, "flags": 4}, + {"matrix": [1, 4], "x": 56, "y": 12, "flags": 4}, + {"matrix": [1, 5], "x": 70, "y": 12, "flags": 4}, + {"matrix": [1, 6], "x": 84, "y": 12, "flags": 4}, + {"matrix": [1, 7], "x": 98, "y": 12, "flags": 4}, + {"matrix": [1, 8], "x": 112, "y": 12, "flags": 4}, + {"matrix": [1, 9], "x": 126, "y": 12, "flags": 4}, + {"matrix": [1, 10], "x": 140, "y": 12, "flags": 4}, + {"matrix": [1, 11], "x": 154, "y": 12, "flags": 4}, + {"matrix": [1, 12], "x": 168, "y": 12, "flags": 4}, + {"matrix": [1, 13], "x": 182, "y": 12, "flags": 4}, + {"matrix": [1, 14], "x": 196, "y": 12, "flags": 4}, + {"matrix": [1, 15], "x": 210, "y": 12, "flags": 4}, + {"matrix": [1, 16], "x": 224, "y": 12, "flags": 4}, + {"matrix": [2, 16], "x": 224, "y": 25, "flags": 4}, + {"matrix": [2, 15], "x": 210, "y": 25, "flags": 4}, + {"matrix": [2, 14], "x": 196, "y": 25, "flags": 4}, + {"matrix": [2, 13], "x": 182, "y": 25, "flags": 4}, + {"matrix": [2, 12], "x": 168, "y": 25, "flags": 4}, + {"matrix": [2, 11], "x": 154, "y": 25, "flags": 4}, + {"matrix": [2, 10], "x": 140, "y": 25, "flags": 4}, + {"matrix": [2, 9], "x": 126, "y": 25, "flags": 4}, + {"matrix": [2, 8], "x": 112, "y": 25, "flags": 4}, + {"matrix": [2, 7], "x": 98, "y": 25, "flags": 4}, + {"matrix": [2, 6], "x": 84, "y": 25, "flags": 4}, + {"matrix": [2, 5], "x": 70, "y": 25, "flags": 4}, + {"matrix": [2, 4], "x": 56, "y": 25, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 25, "flags": 4}, + {"matrix": [2, 2], "x": 28, "y": 25, "flags": 4}, + {"matrix": [2, 1], "x": 14, "y": 25, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 25, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 14, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 28, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 42, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 70, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 84, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 98, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 112, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 126, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 140, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 154, "y": 38, "flags": 4}, + {"matrix": [3, 12], "x": 168, "y": 38, "flags": 1}, + {"matrix": [4, 15], "x": 192, "y": 51, "flags": 1}, + {"matrix": [4, 12], "x": 168, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 154, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 140, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 126, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 112, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 98, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 84, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 70, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 56, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 42, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 28, "y": 51, "flags": 1}, + {"matrix": [4, 0], "x": 14, "y": 51, "flags": 1}, + {"matrix": [5, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 14, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 28, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 84, "y": 64, "flags": 4}, + {"matrix": [5, 10], "x": 140, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 154, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 168, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 196, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 210, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 224, "y": 64, "flags": 1} + ], "sleep": true }, "features": { diff --git a/keyboards/adpenrose/akemipad/akemipad.c b/keyboards/adpenrose/akemipad/akemipad.c deleted file mode 100644 index 993396dca0..0000000000 --- a/keyboards/adpenrose/akemipad/akemipad.c +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2022 Arturo Avila (@ADPenrose) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE - -/* Setting up the LED matrix */ -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 1, 2, 3, NO_LED }, - { 4, 5, 6, 7, NO_LED }, - { 8, 9, 10, 11, 12 }, - { 13, 14, 15, 16, NO_LED }, - { 17, 18, 19, 20, 21 }, - { 22, 23, 24, 25, 26 }, -}, { - // LED Index to Physical Position - { 0,0 }, { 37,0 }, { 74,0 }, {111,0 }, { 0,34 }, { 37,34 }, { 74,34 }, {111,34 }, { 0,62 }, { 37,62 }, - { 74,62 }, {111,62 }, {120,75 }, { 0,89 }, { 37,89 }, { 74,89 }, {111,89 }, { 0,117}, { 37,117}, { 74,117}, - {111,117}, {120,130}, { 0,137}, { 18,144}, { 37,137}, { 74,144}, {111,144} -}, { - // 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, 4, 4, 4, 4, 4, 4 -} }; - -#endif diff --git a/keyboards/adpenrose/akemipad/keyboard.json b/keyboards/adpenrose/akemipad/keyboard.json index 085ca5e406..a7981d13ef 100644 --- a/keyboards/adpenrose/akemipad/keyboard.json +++ b/keyboards/adpenrose/akemipad/keyboard.json @@ -15,8 +15,36 @@ "cycle_left_right": true, "cycle_up_down": true }, - "center_point": [60, 77], "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 69, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 138, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 207, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 13, "flags": 4}, + {"matrix": [1, 1], "x": 69, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 138, "y": 13, "flags": 4}, + {"matrix": [1, 3], "x": 207, "y": 13, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 26, "flags": 4}, + {"matrix": [2, 1], "x": 69, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 138, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 207, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 224, "y": 30, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 38, "flags": 4}, + {"matrix": [3, 1], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 138, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 207, "y": 38, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 52, "flags": 4}, + {"matrix": [4, 1], "x": 69, "y": 52, "flags": 4}, + {"matrix": [4, 2], "x": 138, "y": 52, "flags": 4}, + {"matrix": [4, 3], "x": 207, "y": 52, "flags": 4}, + {"matrix": [4, 4], "x": 224, "y": 56, "flags": 4}, + {"matrix": [5, 0], "x": 0, "y": 62, "flags": 4}, + {"matrix": [5, 1], "x": 33, "y": 64, "flags": 4}, + {"matrix": [5, 2], "x": 69, "y": 62, "flags": 4}, + {"matrix": [5, 3], "x": 138, "y": 64, "flags": 4}, + {"matrix": [5, 4], "x": 207, "y": 64, "flags": 4} + ], "max_brightness": 175, "sleep": true }, diff --git a/keyboards/aeboards/satellite/rev1/keyboard.json b/keyboards/aeboards/satellite/rev1/keyboard.json index f9355171fb..a6752565bd 100644 --- a/keyboards/aeboards/satellite/rev1/keyboard.json +++ b/keyboards/aeboards/satellite/rev1/keyboard.json @@ -68,6 +68,80 @@ "val": 80 }, "driver": "custom", + "layout": [ + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 97, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 82, "y": 16, "flags": 4}, + {"x": 67, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 52, "y": 16, "flags": 4}, + {"x": 37, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 22, "y": 16, "flags": 4}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [2, 11], "x": 6, "y": 32, "flags": 1}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 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": 202, "y": 0, "flags": 4}, + {"x": 212, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [1, 8], "x": 127, "y": 16, "flags": 4}, + {"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": [3, 14], "x": 224, "y": 48, "flags": 4}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 95, "y": 64, "flags": 4}, + {"matrix": [3, 5], "x": 93, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 78, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 63, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 49, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4}, + {"x": 67, "y": 56, "flags": 4}, + {"matrix": [4, 2], "x": 39, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [2, 6], "x": 101, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 71, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 26, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"x": 0, "y": 64, "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}, + {"x": 175, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 200, "y": 32, "flags": 4}, + {"matrix": [3, 10], "x": 168, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 209, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 108, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 123, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 138, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 153, "y": 48, "flags": 4}, + {"x": 120, "y": 48, "flags": 4}, + {"x": 120, "y": 56, "flags": 4}, + {"matrix": [4, 9], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 175, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 194, "y": 64, "flags": 1} + ], "sleep": true }, "processor": "atmega32u4", diff --git a/keyboards/aeboards/satellite/rev1/rev1.c b/keyboards/aeboards/satellite/rev1/rev1.c index 28ac5ef302..6e468d713d 100644 --- a/keyboards/aeboards/satellite/rev1/rev1.c +++ b/keyboards/aeboards/satellite/rev1/rev1.c @@ -102,46 +102,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C8_16, C7_16, C6_16} //D17 }; -led_config_t g_led_config = { { - { 17, 16, 15, 14, 13, 12, 11, 10, 9, 18, 19, 20, 21, 22, 24 }, - { 7, 6, 6, 4, 4, 2, 1, 0, 27, 18, 29, 30, 31, 32, 25 }, - { 8, 50, 49, 48, 47, 46, 45, 54, 55, 56, 57, 8, 59, NO_LED, 26 }, - { 51, 41, 40, 39, 38, 37, 63, 64, 65, 66, 60, NO_LED, 61, 62, 33 }, - { 52, 44, 43, NO_LED, NO_LED, 36, NO_LED, NO_LED, NO_LED, 69, 70, NO_LED, 71, 35, 34 }, -}, { - //A0 .. A17 - {112,16 }, { 97,16 }, { 82,16 }, { 67,16 }, { 52,16 }, { 37,16 }, { 22,16 }, { 4,16 }, { 6,32 }, - {119,0 }, {105,0 }, { 90,0 }, { 75,0 }, { 60,0 }, { 45,0 }, { 30,0 }, { 15,0 }, { 0,0 }, - - //B0 .. B17 - {134,0 }, {149,0 }, {164,0 }, {179,0 }, {202,0 }, {255,255}, {224,0 }, {224,16 }, {224,32 }, - {127,16 }, {142,16 }, {157,16 }, {172,16 }, {187,16 }, {205,16 }, {224,48 }, {224,64 }, {209,64 }, - - //C0 .. C17 - { 95,64 }, { 93,48 }, { 78,48 }, { 63,48 }, { 49,48 }, { 34,48 }, { 67,56 }, { 39,64 }, { 21,64 }, - {101,32 }, { 86,32 }, { 71,32 }, { 56,32 }, { 41,32 }, { 26,32 }, { 9,48 }, { 2,64 }, {255,255}, - - //D0 .. D17 - {116,32 }, {131,32 }, {146,32 }, {161,32 }, {175,32 }, {200,32 }, {168,48 }, {189,48 }, {209,48 }, - {108,48 }, {123,48 }, {138,48 }, {153,48 }, {255,255}, {120,56 }, {153,64 }, {175,64 }, {194,64 } -}, { - //A0 .. A17 - 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, - - //B0 .. B17 - 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 1, 1, - - //C0 .. C17 - 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 1, 1, 4, - - //D0 .. D17 - 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 1, 1, 1 -} }; - // Custom Driver static void init(void) { i2c_init(); diff --git a/keyboards/aleblazer/zodiark/keyboard.json b/keyboards/aleblazer/zodiark/keyboard.json index 6818797809..396e3ca460 100644 --- a/keyboards/aleblazer/zodiark/keyboard.json +++ b/keyboards/aleblazer/zodiark/keyboard.json @@ -42,6 +42,76 @@ }, "rgb_matrix": { "driver": "ws2812", + "layout": [ + {"matrix": [0, 5], "x": 93, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 74, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 56, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 37, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 19, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 19, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 74, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 93, "y": 16, "flags": 4}, + {"matrix": [0, 6], "x": 112, "y": 24, "flags": 4}, + {"matrix": [1, 6], "x": 112, "y": 40, "flags": 4}, + {"matrix": [2, 5], "x": 93, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 74, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 56, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 19, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 19, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 37, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 56, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 74, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 93, "y": 48, "flags": 4}, + {"matrix": [2, 6], "x": 112, "y": 52, "flags": 4}, + {"matrix": [4, 6], "x": 112, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 93, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 74, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 56, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 37, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 19, "y": 64, "flags": 4}, + {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [5, 5], "x": 132, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 150, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 169, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 187, "y": 0, "flags": 4}, + {"matrix": [5, 1], "x": 206, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 224, "y": 0, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 206, "y": 16, "flags": 4}, + {"matrix": [6, 2], "x": 187, "y": 16, "flags": 4}, + {"matrix": [6, 3], "x": 169, "y": 16, "flags": 4}, + {"matrix": [6, 4], "x": 150, "y": 16, "flags": 4}, + {"matrix": [6, 5], "x": 132, "y": 16, "flags": 4}, + {"matrix": [5, 6], "x": 113, "y": 24, "flags": 4}, + {"matrix": [6, 6], "x": 113, "y": 40, "flags": 4}, + {"matrix": [7, 5], "x": 132, "y": 32, "flags": 4}, + {"matrix": [7, 4], "x": 150, "y": 32, "flags": 4}, + {"matrix": [7, 3], "x": 169, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 187, "y": 32, "flags": 4}, + {"matrix": [7, 1], "x": 206, "y": 32, "flags": 4}, + {"matrix": [7, 0], "x": 224, "y": 32, "flags": 4}, + {"matrix": [8, 0], "x": 224, "y": 48, "flags": 4}, + {"matrix": [8, 1], "x": 206, "y": 48, "flags": 4}, + {"matrix": [8, 2], "x": 187, "y": 48, "flags": 4}, + {"matrix": [8, 3], "x": 169, "y": 48, "flags": 4}, + {"matrix": [8, 4], "x": 150, "y": 48, "flags": 4}, + {"matrix": [8, 5], "x": 132, "y": 48, "flags": 4}, + {"matrix": [7, 6], "x": 113, "y": 52, "flags": 4}, + {"matrix": [9, 6], "x": 113, "y": 64, "flags": 4}, + {"matrix": [9, 5], "x": 132, "y": 64, "flags": 4}, + {"matrix": [9, 4], "x": 150, "y": 64, "flags": 4}, + {"matrix": [9, 3], "x": 169, "y": 64, "flags": 4}, + {"matrix": [9, 2], "x": 187, "y": 64, "flags": 4}, + {"matrix": [9, 1], "x": 206, "y": 64, "flags": 4}, + {"matrix": [9, 0], "x": 224, "y": 64, "flags": 4} + ], "max_brightness": 150, "sat_steps": 8, "speed_steps": 10, diff --git a/keyboards/aleblazer/zodiark/zodiark.c b/keyboards/aleblazer/zodiark/zodiark.c deleted file mode 100644 index 8829ac8f3c..0000000000 --- a/keyboards/aleblazer/zodiark/zodiark.c +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2021 Spencer Deven - -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 "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { -// Key Matrix to LED Index - // Left Hand - { 5, 4, 3, 2, 1, 0, 12 }, - { 6, 7, 8, 9, 10, 11, 13 }, - { 19, 18, 17, 16, 15, 14, 26 }, - { 20, 21, 22, 23, 24, 25, NO_LED }, - { 33, 32, 31, 30, 29, 28, 27}, - // Right Hand - { 39, 38, 37, 36, 35, 34, 46 }, - { 40, 41, 42, 43, 44, 45, 47 }, - { 53, 52, 51, 50, 49, 48, 60 }, - { 54, 55, 56, 57, 58, 59, NO_LED }, - { 67, 66, 65, 64, 63, 62, 61 }, - - -}, { - // LED Index to Physical Position - // Left Hand - { 93, 0 }, { 74, 0 }, { 56, 0 }, { 37, 0 }, { 19, 0 }, { 0, 0 }, { 0, 16 }, - { 19, 16 }, { 37, 16 }, { 56, 16 }, { 74, 16 }, { 93, 16 }, { 112, 24 }, { 112, 40 }, - { 93, 32 }, { 74, 32 }, { 56, 32 }, { 37, 32 }, { 19, 32 }, { 0, 32 }, { 0, 48 }, - { 19, 48 }, { 37, 48 }, { 56, 48 }, { 74, 48 }, { 93, 48 }, { 112, 52 }, - { 112, 64 }, { 93, 64 }, { 74, 64 }, { 56, 64 }, { 37, 64 }, { 19, 64 }, { 0, 64 }, - // Right Hand - { 132, 0 }, { 150, 0 }, { 169, 0 }, { 187, 0 }, { 206, 0 }, { 224, 0 }, { 224, 16 }, - { 206, 16 }, { 187, 16 }, { 169, 16 }, { 150, 16 }, { 132, 16 }, { 113, 24 }, { 113, 40 }, - { 132, 32 }, { 150, 32 }, { 169, 32 }, { 187, 32 }, { 206, 32 }, { 224, 32 }, { 224, 48 }, - { 206, 48 }, { 187, 48 }, { 169, 48 }, { 150, 48 }, { 132, 48 }, { 113, 52 }, - { 113, 64 }, { 132, 64 }, { 150, 64 }, { 169, 64 }, { 187, 64 }, { 206, 64 }, { 224, 64 }, -}, { - // 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, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 -} }; -#endif diff --git a/keyboards/axolstudio/yeti/hotswap/hotswap.c b/keyboards/axolstudio/yeti/hotswap/hotswap.c index df64c80953..8cf9d0f0b2 100644 --- a/keyboards/axolstudio/yeti/hotswap/hotswap.c +++ b/keyboards/axolstudio/yeti/hotswap/hotswap.c @@ -87,28 +87,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW8_CS15, SW7_CS15, SW9_CS15 }, { 0, SW11_CS15, SW10_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, NO_LED, 43 }, - { NO_LED, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56 }, - { NO_LED, 57, NO_LED, 58, NO_LED, 59, 60, NO_LED, 61, NO_LED, 62, NO_LED, NO_LED, NO_LED, 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},{208, 0},{224, 0}, - {0, 16},{16,16},{32,16},{48,16},{64,16},{80,16},{96,16},{112,16},{128,16},{144,16},{160,16},{176,16},{192,16},{208,16},{224,16}, - {0,32},{16,32},{32,32},{48,32},{64,32},{80,32},{96,32},{112,32},{128,32},{144,32},{160,32},{176,32},{192,32},{224, 32}, - {16,48},{32,48},{48,48},{64,48},{80,48},{96,48},{112,48},{128,48},{144,48},{160,48},{176,48},{192,48},{224,48}, - {16,64},{48,64},{80,64},{96,64},{128,64},{160,64},{224,64} - }, { - 1, 1, 4, 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, 4, 1, - 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, 1, - 1, 1, 4, 1, 4, 1, 1 - } -}; #endif bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { diff --git a/keyboards/axolstudio/yeti/hotswap/keyboard.json b/keyboards/axolstudio/yeti/hotswap/keyboard.json index 5607001287..fb3582e0f1 100644 --- a/keyboards/axolstudio/yeti/hotswap/keyboard.json +++ b/keyboards/axolstudio/yeti/hotswap/keyboard.json @@ -44,6 +44,72 @@ "solid_multisplash": true }, "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1}, + {"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": 208, "y": 0, "flags": 4}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 16, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 16, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 1], "x": 16, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 48, "flags": 1}, + {"matrix": [4, 1], "x": 16, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 48, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 80, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 96, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 128, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + ], "sleep": true }, "build": { From fecfc0f7da46dbf6f9d231098bdc51794509cad6 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 4 Oct 2025 17:47:45 -0700 Subject: [PATCH 50/95] `atreus`: restore intended matrix implementations (#24082) * `atreus`: restore intended matrix implementations PR 24010 inadvertently changed the switch matrix for the `atreus/astar_mirrored` keyboard in removing the `PCBDOWN` configuration option, and also made PCB up and down implementations available for all Atreus variants, which is not intended usage. This commit restores the intended behaviour, and makes all the keymaps which are currently present agnostic to hardware variant. --- keyboards/atreus/astar/keyboard.json | 61 +++++++++- keyboards/atreus/astar_mirrored/keyboard.json | 61 +++++++++- keyboards/atreus/f103/keyboard.json | 59 ++++++++++ keyboards/atreus/feather/keyboard.json | 59 ++++++++++ keyboards/atreus/info.json | 111 ------------------ keyboards/atreus/keymaps/default/keymap.c | 6 +- keyboards/atreus/keymaps/workman/keymap.c | 6 +- keyboards/atreus/promicro/keyboard.json | 61 +++++++++- keyboards/atreus/teensy2/keyboard.json | 61 +++++++++- 9 files changed, 364 insertions(+), 121 deletions(-) diff --git a/keyboards/atreus/astar/keyboard.json b/keyboards/atreus/astar/keyboard.json index e201078ffe..b730442a55 100644 --- a/keyboards/atreus/astar/keyboard.json +++ b/keyboards/atreus/astar/keyboard.json @@ -5,5 +5,64 @@ }, "diode_direction": "COL2ROW", "processor": "atmega32u4", - "bootloader": "caterina" + "bootloader": "caterina", + "layout_aliases": { + "LAYOUT_pcb_up": "LAYOUT", + "LAYOUT_pcb_down": "LAYOUT" + }, + "layouts": { + "LAYOUT": { + "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} + ] + } + } } diff --git a/keyboards/atreus/astar_mirrored/keyboard.json b/keyboards/atreus/astar_mirrored/keyboard.json index b83be5d29d..ae687c9d2b 100644 --- a/keyboards/atreus/astar_mirrored/keyboard.json +++ b/keyboards/atreus/astar_mirrored/keyboard.json @@ -5,5 +5,64 @@ }, "diode_direction": "COL2ROW", "processor": "atmega32u4", - "bootloader": "caterina" + "bootloader": "caterina", + "layout_aliases": { + "LAYOUT_pcb_up": "LAYOUT", + "LAYOUT_pcb_down": "LAYOUT" + }, + "layouts": { + "LAYOUT": { + "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": [3, 5], "x": 5, "y": 2.95, "h": 1.5}, + + {"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/f103/keyboard.json b/keyboards/atreus/f103/keyboard.json index 813ef97e37..fb49c0c1ca 100644 --- a/keyboards/atreus/f103/keyboard.json +++ b/keyboards/atreus/f103/keyboard.json @@ -8,5 +8,64 @@ "bootloader": "stm32duino", "features": { "bootmagic": true + }, + "layout_aliases": { + "LAYOUT_pcb_up": "LAYOUT", + "LAYOUT_pcb_down": "LAYOUT" + }, + "layouts": { + "LAYOUT": { + "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} + ] + } } } diff --git a/keyboards/atreus/feather/keyboard.json b/keyboards/atreus/feather/keyboard.json index 1392849fd4..12468218ec 100644 --- a/keyboards/atreus/feather/keyboard.json +++ b/keyboards/atreus/feather/keyboard.json @@ -14,5 +14,64 @@ }, "bluetooth": { "driver": "bluefruit_le" + }, + "layout_aliases": { + "LAYOUT_pcb_up": "LAYOUT", + "LAYOUT_pcb_down": "LAYOUT" + }, + "layouts": { + "LAYOUT": { + "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} + ] + } } } diff --git a/keyboards/atreus/info.json b/keyboards/atreus/info.json index cf53b506a0..b479c96542 100644 --- a/keyboards/atreus/info.json +++ b/keyboards/atreus/info.json @@ -21,116 +21,5 @@ "enabled": true, "resync": true } - }, - "layout_aliases": { - "LAYOUT": "LAYOUT_pcb_up" - }, - "layouts": { - "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": [ - {"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": [3, 5], "x": 5, "y": 2.95, "h": 1.5}, - - {"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 e458810537..ca1333230c 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_pcb_up( /* Qwerty */ + [_QW] = LAYOUT( /* 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_pcb_up( /* [> RAISE <] */ + [_RS] = LAYOUT( /* [> 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_pcb_up( /* [> LOWER <] */ + [_LW] = LAYOUT( /* [> 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/workman/keymap.c b/keyboards/atreus/keymaps/workman/keymap.c index e8b5b6b4e3..c0633f6362 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_pcb_down( /* Workman */ + [_QW] = LAYOUT( /* 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_pcb_down( /* [> RAISE <] */ + [_RS] = LAYOUT( /* [> 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_pcb_down( /* [> LOWER <] */ + [_LW] = LAYOUT( /* [> 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 10c0ca1b22..9f7e50526c 100644 --- a/keyboards/atreus/promicro/keyboard.json +++ b/keyboards/atreus/promicro/keyboard.json @@ -4,5 +4,64 @@ "rows": ["F4", "B2", "B4", "B5"] }, "diode_direction": "COL2ROW", - "development_board": "promicro" + "development_board": "promicro", + "layout_aliases": { + "LAYOUT_pcb_up": "LAYOUT", + "LAYOUT_pcb_down": "LAYOUT" + }, + "layouts": { + "LAYOUT": { + "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} + ] + } + } } diff --git a/keyboards/atreus/teensy2/keyboard.json b/keyboards/atreus/teensy2/keyboard.json index 067ea9a01d..bdcc8f394d 100644 --- a/keyboards/atreus/teensy2/keyboard.json +++ b/keyboards/atreus/teensy2/keyboard.json @@ -5,5 +5,64 @@ }, "diode_direction": "COL2ROW", "processor": "atmega32u4", - "bootloader": "halfkay" + "bootloader": "halfkay", + "layout_aliases": { + "LAYOUT_pcb_up": "LAYOUT", + "LAYOUT_pcb_down": "LAYOUT" + }, + "layouts": { + "LAYOUT": { + "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} + ] + } + } } From 05355bc49d9e5ff764cb3d2c9272bb941651ddd1 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Sun, 5 Oct 2025 21:06:55 -0600 Subject: [PATCH 51/95] Fixup `rgbkb/pan` (#25678) Tidy up rgbkb/pan - Migrate g_led_config to DD and fix coordinates - Remove RGBLight configuration - Migrate keymaps to JSON - Move keymap OLED code to keyboard level - Remove cutom layout selection logic (post_rules.mk) - Use short SPDX license headers --- keyboards/rgbkb/pan/config.h | 19 +-- keyboards/rgbkb/pan/info.json | 82 ++++++++--- keyboards/rgbkb/pan/keymaps/default/keymap.c | 116 --------------- .../rgbkb/pan/keymaps/default/keymap.json | 35 +++++ keyboards/rgbkb/pan/keymaps/default/rules.mk | 3 - .../rgbkb/pan/keymaps/default_eee/keymap.c | 116 --------------- .../rgbkb/pan/keymaps/default_eee/keymap.json | 35 +++++ .../rgbkb/pan/keymaps/default_eee/rules.mk | 3 - .../rgbkb/pan/keymaps/default_sss/keymap.c | 116 --------------- .../rgbkb/pan/keymaps/default_sss/keymap.json | 35 +++++ .../rgbkb/pan/keymaps/default_sss/rules.mk | 3 - keyboards/rgbkb/pan/pan.c | 132 +++++------------- keyboards/rgbkb/pan/post_rules.mk | 28 ---- 13 files changed, 209 insertions(+), 514 deletions(-) delete mode 100644 keyboards/rgbkb/pan/keymaps/default/keymap.c create mode 100644 keyboards/rgbkb/pan/keymaps/default/keymap.json delete mode 100644 keyboards/rgbkb/pan/keymaps/default/rules.mk delete mode 100644 keyboards/rgbkb/pan/keymaps/default_eee/keymap.c create mode 100644 keyboards/rgbkb/pan/keymaps/default_eee/keymap.json delete mode 100644 keyboards/rgbkb/pan/keymaps/default_eee/rules.mk delete mode 100644 keyboards/rgbkb/pan/keymaps/default_sss/keymap.c create mode 100644 keyboards/rgbkb/pan/keymaps/default_sss/keymap.json delete mode 100644 keyboards/rgbkb/pan/keymaps/default_sss/rules.mk delete mode 100644 keyboards/rgbkb/pan/post_rules.mk diff --git a/keyboards/rgbkb/pan/config.h b/keyboards/rgbkb/pan/config.h index be719c1437..29b60e739c 100644 --- a/keyboards/rgbkb/pan/config.h +++ b/keyboards/rgbkb/pan/config.h @@ -1,20 +1,5 @@ -/*Copyright 2020 RGBKB - -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 RGBKB +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define RGB_MATRIX_LED_COUNT 64 #define WS2812_LED_COUNT 64 diff --git a/keyboards/rgbkb/pan/info.json b/keyboards/rgbkb/pan/info.json index ad56ba5e4b..4358881075 100644 --- a/keyboards/rgbkb/pan/info.json +++ b/keyboards/rgbkb/pan/info.json @@ -66,23 +66,71 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "custom" - }, - "rgblight": { - "led_count": 64, - "max_brightness": 120, - "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 - } + "driver": "custom", + "layout": [ + {"x": 0, "y": 0, "flags": 1}, + {"x": 224, "y": 0, "flags": 1}, + {"matrix": [0, 0], "x": 9, "y": 13, "flags": 1}, + {"matrix": [0, 1], "x": 28, "y": 13, "flags": 4}, + {"matrix": [0, 2], "x": 47, "y": 13, "flags": 4}, + {"matrix": [0, 3], "x": 66, "y": 13, "flags": 4}, + {"matrix": [0, 4], "x": 84, "y": 13, "flags": 4}, + {"matrix": [0, 5], "x": 104, "y": 13, "flags": 4}, + {"matrix": [0, 6], "x": 123, "y": 13, "flags": 4}, + {"matrix": [0, 7], "x": 142, "y": 13, "flags": 4}, + {"matrix": [0, 8], "x": 161, "y": 13, "flags": 4}, + {"matrix": [0, 9], "x": 180, "y": 13, "flags": 4}, + {"matrix": [0, 10], "x": 199, "y": 13, "flags": 4}, + {"matrix": [0, 12], "x": 215, "y": 13, "flags": 1}, + {"matrix": [1, 11], "x": 215, "y": 26, "flags": 1}, + {"matrix": [1, 10], "x": 199, "y": 26, "flags": 4}, + {"matrix": [1, 9], "x": 180, "y": 26, "flags": 4}, + {"matrix": [1, 8], "x": 161, "y": 26, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 26, "flags": 4}, + {"matrix": [1, 6], "x": 123, "y": 26, "flags": 4}, + {"matrix": [1, 5], "x": 104, "y": 26, "flags": 4}, + {"matrix": [1, 4], "x": 84, "y": 26, "flags": 4}, + {"matrix": [1, 3], "x": 66, "y": 26, "flags": 4}, + {"matrix": [1, 2], "x": 47, "y": 26, "flags": 4}, + {"matrix": [1, 1], "x": 28, "y": 26, "flags": 4}, + {"matrix": [1, 0], "x": 9, "y": 26, "flags": 1}, + {"matrix": [2, 0], "x": 9, "y": 38, "flags": 1}, + {"matrix": [2, 1], "x": 28, "y": 38, "flags": 4}, + {"matrix": [2, 2], "x": 47, "y": 38, "flags": 4}, + {"matrix": [2, 3], "x": 66, "y": 38, "flags": 4}, + {"matrix": [2, 4], "x": 84, "y": 38, "flags": 4}, + {"matrix": [2, 5], "x": 104, "y": 38, "flags": 4}, + {"matrix": [2, 6], "x": 123, "y": 38, "flags": 4}, + {"matrix": [2, 7], "x": 142, "y": 38, "flags": 4}, + {"matrix": [2, 8], "x": 161, "y": 38, "flags": 4}, + {"matrix": [2, 9], "x": 180, "y": 38, "flags": 4}, + {"matrix": [2, 10], "x": 199, "y": 38, "flags": 4}, + {"matrix": [2, 11], "x": 215, "y": 38, "flags": 1}, + {"matrix": [3, 12], "x": 215, "y": 51, "flags": 1}, + {"matrix": [3, 10], "x": 199, "y": 51, "flags": 4}, + {"matrix": [3, 9], "x": 180, "y": 51, "flags": 4}, + {"matrix": [3, 8], "x": 161, "y": 51, "flags": 4}, + {"matrix": [3, 7], "x": 142, "y": 51, "flags": 4}, + {"matrix": [3, 6], "x": 123, "y": 51, "flags": 4}, + {"matrix": [3, 5], "x": 104, "y": 51, "flags": 4}, + {"matrix": [3, 4], "x": 84, "y": 51, "flags": 4}, + {"matrix": [3, 3], "x": 66, "y": 51, "flags": 4}, + {"matrix": [3, 2], "x": 47, "y": 51, "flags": 4}, + {"matrix": [3, 1], "x": 28, "y": 51, "flags": 4}, + {"matrix": [3, 0], "x": 9, "y": 51, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 28, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 47, "y": 64, "flags": 1}, + {"matrix": [4, 3], "x": 66, "y": 64, "flags": 1}, + {"matrix": [4, 4], "x": 84, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 104, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 123, "y": 64, "flags": 1}, + {"matrix": [4, 7], "x": 142, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 161, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 180, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 199, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 215, "y": 64, "flags": 1} + ] }, "layouts": { "LAYOUT_all": { diff --git a/keyboards/rgbkb/pan/keymaps/default/keymap.c b/keyboards/rgbkb/pan/keymaps/default/keymap.c deleted file mode 100644 index 3647ae2ad6..0000000000 --- a/keyboards/rgbkb/pan/keymaps/default/keymap.c +++ /dev/null @@ -1,116 +0,0 @@ - /* Copyright 2020 RGBKB - * - * 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 . - */ -// 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. -#include QMK_KEYBOARD_H - -enum layer_number { - _QWERTY, - _COLEMAK, - _FN, - _ADJ -}; - -#define FN_ESC LT(_FN, KC_ESC) -#define FN_CAPS LT(_FN, KC_CAPS) -#define QWERTY DF(_QWERTY) -#define COLEMAK DF(_COLEMAK) - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = 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_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_BSLS, - FN_CAPS, 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_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC, - KC_LCTL, KC_LGUI, KC_LALT, RM_TOGG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT - ), - - [_COLEMAK] = 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_BSPC, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC, KC_ENT, - KC_LCTL, KC_LGUI, KC_LALT, RM_TOGG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT - ), - - [_FN] = 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_PSCR, - _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, - _______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, KC_RBRC, _______, _______, _______, - _______, _______, _______, RM_NEXT, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [_ADJ] = 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_PSCR, - _______, RM_SATD, RM_VALU, RM_SATU, QK_BOOT, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, - _______, RM_HUED, RM_VALD, RM_HUEU, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, - _______, RM_SPDD, _______, RM_SPDU, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, - _______, _______, _______, RM_NEXT, _______, _______, _______, KC_P0, KC_PDOT, KC_NUM, _QWERTY, _COLEMAK - ) -}; - -#ifdef OLED_ENABLE -bool oled_task_user(void) { - // Host Keyboard Layer Status - oled_write_P(PSTR("RGBKB Pan\n"), false); - oled_write_P(PSTR("Layer: "), false); - uint8_t layer = get_highest_layer(layer_state|default_layer_state); - switch (layer) { - case _QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case _COLEMAK: - oled_write_P(PSTR("Colemak\n"), false); - break; - case _FN: - oled_write_P(PSTR("Function\n"), false); - break; - case _ADJ: - oled_write_P(PSTR("Adjust\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - // Or use the write_ln shortcut over adding '\n' to the end of your string - //oled_write_ln_P(PSTR("Undefined"), false); - } - led_t led_state = host_keyboard_led_state(); - oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false); - oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false); - - return false; -} -#endif - -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { // First encoder - right - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } else if (index == 1) { // Second encoder - left - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } - return true; -} diff --git a/keyboards/rgbkb/pan/keymaps/default/keymap.json b/keyboards/rgbkb/pan/keymaps/default/keymap.json new file mode 100644 index 0000000000..e2f50556f0 --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default/keymap.json @@ -0,0 +1,35 @@ +{ + "keyboard": "rgbkb/pan/rev1/32a", + "keymap": "default", + "layout": "LAYOUT_all", + "layers": [ + [ + "QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "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_BSLS", + "LT(2, KC_CAPS)", "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_BSLS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "SC_RSPC", + "KC_LCTL", "KC_LGUI", "KC_LALT", "RM_TOGG", "MO(3)", "KC_SPC", "KC_SPC", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RIGHT" + ], + [ + "QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_BSPC", "KC_DEL", + "KC_TAB", "KC_Q", "KC_W", "KC_F", "KC_P", "KC_G", "KC_J", "KC_L", "KC_U", "KC_Y", "KC_SCLN", "KC_BSLS", + "LT(2, KC_CAPS)", "KC_A", "KC_R", "KC_S", "KC_T", "KC_D", "KC_H", "KC_N", "KC_E", "KC_I", "KC_O", "KC_ENT", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "SC_RSPC", "KC_ENT", + "KC_LCTL", "KC_LGUI", "KC_LALT", "RM_TOGG", "MO(3)", "KC_SPC", "KC_SPC", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RIGHT" + ], + [ + "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_PGDN", "KC_UP", "KC_PGUP", "_______", "_______", "_______", "KC_PGDN", "KC_UP", "KC_PGUP", "KC_PSCR", "KC_HOME", + "_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "_______", "_______", "_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_INS", "KC_END", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "KC_LBRC", "_______", "KC_RBRC", "_______", "_______", "_______", + "_______", "_______", "_______", "RM_NEXT", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "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", + "_______", "RM_SATD", "RM_VALU", "RM_SATU", "QK_BOOT", "_______", "_______", "KC_P7", "KC_P8", "KC_P9", "_______", "_______", + "_______", "RM_HUED", "RM_VALD", "RM_HUEU", "_______", "_______", "_______", "KC_P4", "KC_P5", "KC_P6", "_______", "_______", + "_______", "RM_SPDD", "_______", "RM_SPDU", "_______", "_______", "_______", "KC_P1", "KC_P2", "KC_P3", "_______", "_______", "_______", + "_______", "_______", "_______", "RM_NEXT", "_______", "_______", "_______", "KC_P0", "KC_PDOT", "KC_NUM", "DF(0)", "DF(1)" + ] + ] +} diff --git a/keyboards/rgbkb/pan/keymaps/default/rules.mk b/keyboards/rgbkb/pan/keymaps/default/rules.mk deleted file mode 100644 index c4f4ee04da..0000000000 --- a/keyboards/rgbkb/pan/keymaps/default/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -# RGB layout selection -RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips -STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this. diff --git a/keyboards/rgbkb/pan/keymaps/default_eee/keymap.c b/keyboards/rgbkb/pan/keymaps/default_eee/keymap.c deleted file mode 100644 index 2de45d88e6..0000000000 --- a/keyboards/rgbkb/pan/keymaps/default_eee/keymap.c +++ /dev/null @@ -1,116 +0,0 @@ - /* Copyright 2020 RGBKB - * - * 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 . - */ -// 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. -#include QMK_KEYBOARD_H - -enum layer_number { - _QWERTY, - _COLEMAK, - _FN, - _ADJ -}; - -#define FN_ESC LT(_FN, KC_ESC) -#define FN_CAPS LT(_FN, KC_CAPS) -#define QWERTY DF(_QWERTY) -#define COLEMAK DF(_COLEMAK) - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_eee( - QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSLS, - FN_CAPS, 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_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SC_RSPC, - KC_LCTL, KC_LGUI, KC_LALT, RM_TOGG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - ), - - [_COLEMAK] = LAYOUT_eee( - QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, 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_ENT, - KC_LCTL, KC_LGUI, KC_LALT, RM_TOGG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - ), - - [_FN] = LAYOUT_eee( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_PSCR, - _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, - _______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, KC_RBRC, _______, _______, - _______, _______, _______, RM_NEXT, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [_ADJ] = LAYOUT_eee( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_PSCR, - _______, RM_SATD, RM_VALU, RM_SATU, QK_BOOT, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, - _______, RM_HUED, RM_VALD, RM_HUEU, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, - _______, RM_SPDD, _______, RM_SPDU, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, - _______, _______, _______, RM_NEXT, _______, _______, _______, KC_P0, KC_PDOT, KC_NUM, QWERTY, COLEMAK - ) -}; - -#ifdef OLED_ENABLE -bool oled_task_user(void) { - // Host Keyboard Layer Status - oled_write_P(PSTR("RGBKB Pan\n"), false); - oled_write_P(PSTR("Layer: "), false); - uint8_t layer = get_highest_layer(layer_state|default_layer_state); - switch (layer) { - case _QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case _COLEMAK: - oled_write_P(PSTR("Colemak\n"), false); - break; - case _FN: - oled_write_P(PSTR("Function\n"), false); - break; - case _ADJ: - oled_write_P(PSTR("Adjust\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - // Or use the write_ln shortcut over adding '\n' to the end of your string - //oled_write_ln_P(PSTR("Undefined"), false); - } - led_t led_state = host_keyboard_led_state(); - oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false); - oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false); - - return false; -} -#endif - -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { // First encoder - right - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } else if (index == 1) { // Second encoder - left - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } - return true; -} diff --git a/keyboards/rgbkb/pan/keymaps/default_eee/keymap.json b/keyboards/rgbkb/pan/keymaps/default_eee/keymap.json new file mode 100644 index 0000000000..c46fc40a3d --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default_eee/keymap.json @@ -0,0 +1,35 @@ +{ + "keyboard": "rgbkb/pan/rev1/32a", + "keymap": "default_eee", + "layout": "LAYOUT_eee", + "layers": [ + [ + "QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "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_BSLS", + "LT(2, KC_CAPS)", "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_BSLS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "SC_RSPC", + "KC_LCTL", "KC_LGUI", "KC_LALT", "RM_TOGG", "MO(3)", "KC_SPC", "KC_SPC", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT" + ], + [ + "QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_DEL", + "KC_TAB", "KC_Q", "KC_W", "KC_F", "KC_P", "KC_G", "KC_J", "KC_L", "KC_U", "KC_Y", "KC_SCLN", "KC_BSLS", + "LT(2, KC_CAPS)", "KC_A", "KC_R", "KC_S", "KC_T", "KC_D", "KC_H", "KC_N", "KC_E", "KC_I", "KC_O", "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_ENT", + "KC_LCTL", "KC_LGUI", "KC_LALT", "RM_TOGG", "MO(3)", "KC_SPC", "KC_SPC", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_UP", "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_PSCR", + "_______", "KC_PGDN", "KC_UP", "KC_PGUP", "_______", "_______", "_______", "KC_PGDN", "KC_UP", "KC_PGUP", "KC_PSCR", "KC_HOME", + "_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "_______", "_______", "_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_INS", "KC_END", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "KC_LBRC", "_______", "KC_RBRC", "_______", "_______", + "_______", "_______", "_______", "RM_NEXT", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_PSCR", + "_______", "RM_SATD", "RM_VALU", "RM_SATU", "QK_BOOT", "_______", "_______", "KC_P7", "KC_P8", "KC_P9", "_______", "_______", + "_______", "RM_HUED", "RM_VALD", "RM_HUEU", "_______", "_______", "_______", "KC_P4", "KC_P5", "KC_P6", "_______", "_______", + "_______", "RM_SPDD", "_______", "RM_SPDU", "_______", "_______", "_______", "KC_P1", "KC_P2", "KC_P3", "_______", "_______", + "_______", "_______", "_______", "RM_NEXT", "_______", "_______", "_______", "KC_P0", "KC_PDOT", "KC_NUM", "DF(0)", "DF(1)" + ] + ] +} diff --git a/keyboards/rgbkb/pan/keymaps/default_eee/rules.mk b/keyboards/rgbkb/pan/keymaps/default_eee/rules.mk deleted file mode 100644 index c4f4ee04da..0000000000 --- a/keyboards/rgbkb/pan/keymaps/default_eee/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -# RGB layout selection -RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips -STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this. diff --git a/keyboards/rgbkb/pan/keymaps/default_sss/keymap.c b/keyboards/rgbkb/pan/keymaps/default_sss/keymap.c deleted file mode 100644 index b0b8bd1898..0000000000 --- a/keyboards/rgbkb/pan/keymaps/default_sss/keymap.c +++ /dev/null @@ -1,116 +0,0 @@ - /* Copyright 2020 RGBKB - * - * 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 . - */ -// 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. -#include QMK_KEYBOARD_H - -enum layer_number { - _QWERTY, - _COLEMAK, - _FN, - _ADJ -}; - -#define FN_ESC LT(_FN, KC_ESC) -#define FN_CAPS LT(_FN, KC_CAPS) -#define QWERTY DF(_QWERTY) -#define COLEMAK DF(_COLEMAK) - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_sss( - QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSLS, - FN_CAPS, 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_BSLS, 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(_ADJ),KC_RCTL - ), - - [_COLEMAK] = LAYOUT_sss( - QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, - 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, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_ADJ),KC_RCTL - ), - - [_FN] = LAYOUT_sss( - 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_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, - _______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, KC_RBRC, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______ - ), - - [_ADJ] = LAYOUT_sss( - 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, - _______, RM_SATD, RM_VALU, RM_SATU, QK_BOOT, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, - _______, RM_HUED, RM_VALD, RM_HUEU, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, - _______, RM_SPDD, _______, RM_SPDU, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, - _______, _______, _______, _______, QWERTY, _______, COLEMAK - ) -}; - -#ifdef OLED_ENABLE -bool oled_task_user(void) { - // Host Keyboard Layer Status - oled_write_P(PSTR("RGBKB Pan\n"), false); - oled_write_P(PSTR("Layer: "), false); - uint8_t layer = get_highest_layer(layer_state|default_layer_state); - switch (layer) { - case _QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case _COLEMAK: - oled_write_P(PSTR("Colemak\n"), false); - break; - case _FN: - oled_write_P(PSTR("Function\n"), false); - break; - case _ADJ: - oled_write_P(PSTR("Adjust\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - // Or use the write_ln shortcut over adding '\n' to the end of your string - //oled_write_ln_P(PSTR("Undefined"), false); - } - led_t led_state = host_keyboard_led_state(); - oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false); - oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false); - - return false; -} -#endif - -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { // First encoder - right - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } else if (index == 1) { // Second encoder - left - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } - return true; -} diff --git a/keyboards/rgbkb/pan/keymaps/default_sss/keymap.json b/keyboards/rgbkb/pan/keymaps/default_sss/keymap.json new file mode 100644 index 0000000000..ab216429f0 --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default_sss/keymap.json @@ -0,0 +1,35 @@ +{ + "keyboard": "rgbkb/pan/rev1/32a", + "keymap": "default_sss", + "layout": "LAYOUT_sss", + "layers": [ + [ + "QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "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_BSLS", + "LT(2, KC_CAPS)", "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_BSLS", "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(3)", "KC_RCTL" + ], + [ + "QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_BSPC", "KC_DEL", + "KC_TAB", "KC_Q", "KC_W", "KC_F", "KC_P", "KC_G", "KC_J", "KC_L", "KC_U", "KC_Y", "KC_SCLN", "KC_BSLS", + "LT(2, KC_CAPS)", "KC_A", "KC_R", "KC_S", "KC_T", "KC_D", "KC_H", "KC_N", "KC_E", "KC_I", "KC_O", "KC_ENT", + "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", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(3)", "KC_RCTL" + ], + [ + "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_PGDN", "KC_UP", "KC_PGUP", "_______", "_______", "_______", "KC_PGDN", "KC_UP", "KC_PGUP", "KC_PSCR", "KC_HOME", + "_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "_______", "_______", "_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_INS", "KC_END", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "KC_LBRC", "_______", "KC_RBRC", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "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", + "_______", "RM_SATD", "RM_VALU", "RM_SATU", "QK_BOOT", "_______", "_______", "KC_P7", "KC_P8", "KC_P9", "_______", "_______", + "_______", "RM_HUED", "RM_VALD", "RM_HUEU", "_______", "_______", "_______", "KC_P4", "KC_P5", "KC_P6", "_______", "_______", + "_______", "RM_SPDD", "_______", "RM_SPDU", "_______", "_______", "_______", "KC_P1", "KC_P2", "KC_P3", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "DF(0)", "_______", "DF(1)" + ] + ] +} diff --git a/keyboards/rgbkb/pan/keymaps/default_sss/rules.mk b/keyboards/rgbkb/pan/keymaps/default_sss/rules.mk deleted file mode 100644 index c4f4ee04da..0000000000 --- a/keyboards/rgbkb/pan/keymaps/default_sss/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -# RGB layout selection -RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips -STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this. diff --git a/keyboards/rgbkb/pan/pan.c b/keyboards/rgbkb/pan/pan.c index 20cc4dd248..ce5c2ae249 100644 --- a/keyboards/rgbkb/pan/pan.c +++ b/keyboards/rgbkb/pan/pan.c @@ -1,34 +1,15 @@ -/* Copyright 2020 RGBKB - * - * 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 RGBKB +// SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" -#include "rgb_matrix_types.h" -#if defined RGB_MATRIX_ENABLE -# if defined(KEYBOARD_rgbkb_pan_rev1) -# include "ws2812.h" +#ifdef RGB_MATRIX_ENABLE +# include "ws2812.h" -// Set an led in the buffer to a color static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { -# if defined(RGB_ENCODERS) || defined(STAGGERED_RGB_ENCODERS) - if (i == 0 || i == 1) { // if encoder LEDs, change LEDs + if (i == 0 || i == 1) { // Encoder LEDs require GBR sequence ws2812_set_color(i, g, b, r); - } else -# endif - { + } else { ws2812_set_color(i, r, g, b); } } @@ -39,74 +20,35 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color = setled, .set_color_all = ws2812_set_color_all, }; -# endif - -// clang-format off - led_config_t g_led_config = { { - { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 0, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, - { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1 }, - { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40 }, - { 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, NO_LED } - }, { -# ifdef STAGGERED_RGB_ENCODERS - {0, -19},{228, -19}, - {0, 0}, {14, 0}, {33, 0}, {52, 0}, {71, 0}, {90, 0}, {109, 0}, {128, 0}, {147, 0}, {166, 0}, {185, 0}, {204, 0}, {223, 0}, - {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, - {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, - {223, 57}, {204, 57}, {185, 57}, {171, 57}, {147, 57}, {128, 57}, {109, 57}, {90, 57}, {71, 57}, {52, 57}, {33, 57}, {14, 57}, {0, 57}, - {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, -# elif defined RGB_ENCODERS - {0, -19},{228, -19}, - {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, - {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, - {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, - {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, - {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, - {0, 95},{19, 95}, //not used -# elif defined STAGGERED_LAYOUT - {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, {0, 0}, - {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, - {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, - {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, {0, 0}, - {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, - {0, 95},{19, 95},//not used -# else - {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, - {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, - {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, - {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, - {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, - {0, 0},{0, 0}, {0, 0},{0, 0},//not used -# endif - }, { -# ifdef STAGGERED_RGB_ENCODERS - 1, 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, 1, - 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -# elif defined RGB_ENCODERS - 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, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -# elif defined STAGGERED_LAYOUT - 1, 4, 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, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -# else - 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, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -# endif - } }; -// clang-format on +#endif + +#ifdef OLED_ENABLE +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + oled_write_P(PSTR("RGBKB Pan\n"), false); + oled_write_P(PSTR("Layer: "), false); + uint8_t layer = get_highest_layer(layer_state | default_layer_state); + switch (layer) { + case 0: + oled_write_P(PSTR("Default\n"), false); + break; + case 1: + oled_write_P(PSTR("Colemak\n"), false); + break; + case 2: + oled_write_P(PSTR("Function\n"), false); + break; + case 3: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false); + oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false); + return false; +} #endif diff --git a/keyboards/rgbkb/pan/post_rules.mk b/keyboards/rgbkb/pan/post_rules.mk deleted file mode 100644 index afa3b555b2..0000000000 --- a/keyboards/rgbkb/pan/post_rules.mk +++ /dev/null @@ -1,28 +0,0 @@ -RGB_MATRIX_KEYPRESSES ?= no # Enable reactive per-key effects. -RGB_MATRIX_FRAMEBUFFER_EFFECTS ?= no # Enable frame buffer effects like the typing heatmap. - -# RGB layout selection -STAGGERED_LAYOUT ?= no # If you soldered R1-A12 and R4-A12, enable this. -RGB_ENCODERS ?= yes # For RGB encoders, solder on both WS2811 chips - -ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) - OPT_DEFS += -DRGB_MATRIX_KEYPRESSES -endif - -ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) - OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS -endif - -ifeq ($(strip $(STAGGERED_LAYOUT)), yes) - OPT_DEFS += -DSTAGGERED_LAYOUT -endif - -ifeq ($(strip $(RGB_ENCODERS)), yes) - OPT_DEFS += -DRGB_ENCODERS -endif - -ifeq ($(strip $(RGB_ENCODERS)), yes) - ifeq ($(strip $(STAGGERED_LAYOUT)), yes) - OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) - endif -endif From 466e0856f553d5fd1e50d990f97b8bb5de899145 Mon Sep 17 00:00:00 2001 From: Pascal Hansjosten <33342805+pascalhansjosten@users.noreply.github.com> Date: Mon, 6 Oct 2025 18:26:16 +0200 Subject: [PATCH 52/95] add durgod venus iso support (#25526) --- data/mappings/keyboard_aliases.hjson | 2 +- keyboards/durgod/dgk6x/readme.md | 3 +- .../dgk6x/{venus => venus_ansi}/config.h | 0 .../dgk6x/{venus => venus_ansi}/keyboard.json | 0 .../keymaps/default/keymap.json | 2 +- .../keymaps/default/readme.md | 0 .../dgk6x/{venus => venus_ansi}/readme.md | 4 +- .../venus.c => venus_ansi/venus_ansi.c} | 0 keyboards/durgod/dgk6x/venus_iso/config.h | 19 +++ .../durgod/dgk6x/venus_iso/keyboard.json | 151 ++++++++++++++++++ .../venus_iso/keymaps/default/keymap.json | 37 +++++ keyboards/durgod/dgk6x/venus_iso/readme.md | 26 +++ keyboards/durgod/dgk6x/venus_iso/venus_iso.c | 97 +++++++++++ keyboards/durgod/venus/readme.md | 2 +- 14 files changed, 337 insertions(+), 6 deletions(-) rename keyboards/durgod/dgk6x/{venus => venus_ansi}/config.h (100%) rename keyboards/durgod/dgk6x/{venus => venus_ansi}/keyboard.json (100%) rename keyboards/durgod/dgk6x/{venus => venus_ansi}/keymaps/default/keymap.json (98%) rename keyboards/durgod/dgk6x/{venus => venus_ansi}/keymaps/default/readme.md (100%) rename keyboards/durgod/dgk6x/{venus => venus_ansi}/readme.md (90%) rename keyboards/durgod/dgk6x/{venus/venus.c => venus_ansi/venus_ansi.c} (100%) create mode 100644 keyboards/durgod/dgk6x/venus_iso/config.h create mode 100644 keyboards/durgod/dgk6x/venus_iso/keyboard.json create mode 100644 keyboards/durgod/dgk6x/venus_iso/keymaps/default/keymap.json create mode 100644 keyboards/durgod/dgk6x/venus_iso/readme.md create mode 100644 keyboards/durgod/dgk6x/venus_iso/venus_iso.c diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index c958cecbc9..71a7e880a3 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -1750,7 +1750,7 @@ "target": "durgod/dgk6x/galaxy" }, "durgod/venus": { - "target": "durgod/dgk6x/venus" + "target": "durgod/dgk6x/venus_ansi" }, "dztech/tofu/ii": { "target": "dztech/tofu/ii/v1" diff --git a/keyboards/durgod/dgk6x/readme.md b/keyboards/durgod/dgk6x/readme.md index a14dfcb9f4..58ba599069 100644 --- a/keyboards/durgod/dgk6x/readme.md +++ b/keyboards/durgod/dgk6x/readme.md @@ -11,7 +11,8 @@ This DGK6X code is shared between the ANSI variants of Venus, Hades and Galaxy k ### Build Instructions for building the Venus, Hades and Galaxy firmware can be found here: -* [Venus](venus/readme.md) +* [Venus ANSI](venus_ansi/readme.md) +* [Venus ISO](venus_iso/readme.md) * [Hades ANSI](hades_ansi/readme.md) * [Hades ISO](hades_iso/readme.md) * [Galaxy](galaxy/readme.md) diff --git a/keyboards/durgod/dgk6x/venus/config.h b/keyboards/durgod/dgk6x/venus_ansi/config.h similarity index 100% rename from keyboards/durgod/dgk6x/venus/config.h rename to keyboards/durgod/dgk6x/venus_ansi/config.h diff --git a/keyboards/durgod/dgk6x/venus/keyboard.json b/keyboards/durgod/dgk6x/venus_ansi/keyboard.json similarity index 100% rename from keyboards/durgod/dgk6x/venus/keyboard.json rename to keyboards/durgod/dgk6x/venus_ansi/keyboard.json diff --git a/keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json b/keyboards/durgod/dgk6x/venus_ansi/keymaps/default/keymap.json similarity index 98% rename from keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json rename to keyboards/durgod/dgk6x/venus_ansi/keymaps/default/keymap.json index 8acd302a05..be4d435839 100644 --- a/keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json +++ b/keyboards/durgod/dgk6x/venus_ansi/keymaps/default/keymap.json @@ -1,5 +1,5 @@ { - "keyboard": "durgod/dgk6x/venus", + "keyboard": "durgod/dgk6x/venus_ansi", "keymap": "default", "layout": "LAYOUT_60_ansi", "layers": [ diff --git a/keyboards/durgod/dgk6x/venus/keymaps/default/readme.md b/keyboards/durgod/dgk6x/venus_ansi/keymaps/default/readme.md similarity index 100% rename from keyboards/durgod/dgk6x/venus/keymaps/default/readme.md rename to keyboards/durgod/dgk6x/venus_ansi/keymaps/default/readme.md diff --git a/keyboards/durgod/dgk6x/venus/readme.md b/keyboards/durgod/dgk6x/venus_ansi/readme.md similarity index 90% rename from keyboards/durgod/dgk6x/venus/readme.md rename to keyboards/durgod/dgk6x/venus_ansi/readme.md index 9e37d49633..d8009dcb22 100644 --- a/keyboards/durgod/dgk6x/venus/readme.md +++ b/keyboards/durgod/dgk6x/venus_ansi/readme.md @@ -12,11 +12,11 @@ This is a standard off-the-shelf Durgod Venus 60% ANSI Layout keyboard with RGB Make command example for this keyboard (after setting up your build environment): - make durgod/venus:default + make durgod/dgk6x/venus_ansi:default Flashing example for this keyboard: - make durgod/venus:default:flash + make durgod/dgk6x/venus_ansi: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/durgod/dgk6x/venus/venus.c b/keyboards/durgod/dgk6x/venus_ansi/venus_ansi.c similarity index 100% rename from keyboards/durgod/dgk6x/venus/venus.c rename to keyboards/durgod/dgk6x/venus_ansi/venus_ansi.c diff --git a/keyboards/durgod/dgk6x/venus_iso/config.h b/keyboards/durgod/dgk6x/venus_iso/config.h new file mode 100644 index 0000000000..f23b355905 --- /dev/null +++ b/keyboards/durgod/dgk6x/venus_iso/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * 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_LED 29 diff --git a/keyboards/durgod/dgk6x/venus_iso/keyboard.json b/keyboards/durgod/dgk6x/venus_iso/keyboard.json new file mode 100644 index 0000000000..46b88427eb --- /dev/null +++ b/keyboards/durgod/dgk6x/venus_iso/keyboard.json @@ -0,0 +1,151 @@ +{ + "manufacturer": "Hoksi Technology", + "keyboard_name": "DURGOD Venus (QMK)", + "maintainer": "pascalhansjosten", + "diode_direction": "ROW2COL", + "matrix_pins": { + "cols": ["B0", "B1", "B2", "B10", "B11", "B12", "B13", "B14", "B15", "C6", "C7", "C8", "C9", "C10"], + "rows": ["A0", "A1", "A2", "A3", "A4"] + }, + "rgb_matrix": { + "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": 4}, + {"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": [2, 0], "x": 6, "y": 32, "flags": 4}, + {"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": 204, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 220, "y": 24, "flags": 1}, + {"matrix": [3, 0], "x": 2, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 19, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 202, "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": 162, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 182, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 202, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 222, "y": 64, "flags": 4} + ] + }, + "url": "https://www.amazon.com/dp/B07XFP5MMZ", + "usb": { + "device_version": "0.0.1", + "pid": "0x7EC6", + "vid": "0xD60D" + }, + "community_layouts": ["60_iso"], + "layouts": { + "LAYOUT_60_iso": { + "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": "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": "CapsLock", "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": "#", "matrix": [2, 12], "x": 12.75, "y": 2}, + {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"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": "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}, + {"label": "K45", "matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "Alt", "matrix": [4, 9], "x": 10, "y": 4, "w": 1.25}, + {"label": "Fn1", "matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "Fn2", "matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [4, 12], "x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/durgod/dgk6x/venus_iso/keymaps/default/keymap.json b/keyboards/durgod/dgk6x/venus_iso/keymaps/default/keymap.json new file mode 100644 index 0000000000..da53f1d9b5 --- /dev/null +++ b/keyboards/durgod/dgk6x/venus_iso/keymaps/default/keymap.json @@ -0,0 +1,37 @@ +{ + "keyboard": "durgod/dgk6x/venus_iso", + "keymap": "default", + "layout": "LAYOUT_60_iso", + "layers": [ + [ + "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_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", "RSFT_T(KC_UP)", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT","LT(1,KC_LEFT)","LT(2,KC_DOWN)","RCTL_T(KC_RIGHT)" + ], + [ + "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_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_INS", "KC_HOME", "KC_END", "KC_DEL", + "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT","KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "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", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "GU_TOGG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RM_TOGG", "RM_NEXT", "RM_PREV", + "KC_TRNS", "KC_TRNS", "RM_VALU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "RM_SPDD", "RM_VALD", "RM_SPDU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "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(3)", "KC_TRNS", "KC_TRNS" + ], + [ + "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", + "XXXXXXX", "XXXXXXX", "RM_SATU", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", + "XXXXXXX", "RM_HUED", "RM_SATD", "RM_HUEU", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", + "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", + "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "KC_TRNS", "KC_TRNS", "XXXXXXX" + ] + ], + "author":"pascalhansjosten", + "version":1 +} diff --git a/keyboards/durgod/dgk6x/venus_iso/readme.md b/keyboards/durgod/dgk6x/venus_iso/readme.md new file mode 100644 index 0000000000..2f40fedd96 --- /dev/null +++ b/keyboards/durgod/dgk6x/venus_iso/readme.md @@ -0,0 +1,26 @@ +# Venus + +This is a standard off-the-shelf Durgod Venus 60% ISO Layout keyboard with RGB matrix. + +* Keyboard Maintainer: [pascalhansjosten](https://github.com/pascalhansjosten), based on the work of [J-Sully](https://github.com/J-Sully) and [dkjer](https://github.com/dkjer) +* Hardware Supported: Durgod Venus ISO board with STM32F070RBT6 +* Hardware Availability: https://www.amazon.de/dp/B08H28DNQV/ + +## Instructions + +### Build + +Make command example for this keyboard (after setting up your build environment): + + make durgod/dgk6x/venus_iso:default + +Flashing example for this keyboard: + + make durgod/dgk6x/venus_iso: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). + +### Initial Flash + +Instructions for Flashing from initial Stock Firmware: +* [Initial Flashing](../readme.md#initial-flash) diff --git a/keyboards/durgod/dgk6x/venus_iso/venus_iso.c b/keyboards/durgod/dgk6x/venus_iso/venus_iso.c new file mode 100644 index 0000000000..4cc9bf3364 --- /dev/null +++ b/keyboards/durgod/dgk6x/venus_iso/venus_iso.c @@ -0,0 +1,97 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * 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 "dgk6x.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + + {0, SW3_CS1, SW2_CS1, SW1_CS1}, // Esc + {0, SW3_CS2, SW2_CS2, SW1_CS2}, // 1 + {0, SW3_CS3, SW2_CS3, SW1_CS3}, // 2 + {0, SW3_CS4, SW2_CS4, SW1_CS4}, // 3 + {0, SW3_CS5, SW2_CS5, SW1_CS5}, // 4 + {0, SW3_CS6, SW2_CS6, SW1_CS6}, // 5 + {0, SW3_CS7, SW2_CS7, SW1_CS7}, // 6 + {0, SW3_CS8, SW2_CS8, SW1_CS8}, // 7 + {0, SW3_CS9, SW2_CS9, SW1_CS9}, // 8 + {0, SW3_CS10, SW2_CS10, SW1_CS10}, // 9 + {0, SW3_CS11, SW2_CS11, SW1_CS11}, // 0 + {0, SW3_CS12, SW2_CS12, SW1_CS12}, // - + {0, SW3_CS13, SW2_CS13, SW1_CS13}, // = + {0, SW3_CS14, SW2_CS14, SW1_CS14}, // Bksp + + {0, SW6_CS1, SW5_CS1, SW4_CS1}, // Tab + {0, SW6_CS2, SW5_CS2, SW4_CS2}, // Q + {0, SW6_CS3, SW5_CS3, SW4_CS3}, // W + {0, SW6_CS4, SW5_CS4, SW4_CS4}, // E + {0, SW6_CS5, SW5_CS5, SW4_CS5}, // R + {0, SW6_CS6, SW5_CS6, SW4_CS6}, // T + {0, SW6_CS7, SW5_CS7, SW4_CS7}, // Y + {0, SW6_CS8, SW5_CS8, SW4_CS8}, // U + {0, SW6_CS9, SW5_CS9, SW4_CS9}, // I + {0, SW6_CS10, SW5_CS10, SW4_CS10}, // O + {0, SW6_CS11, SW5_CS11, SW4_CS11}, // P + {0, SW6_CS12, SW5_CS12, SW4_CS12}, // [ + {0, SW6_CS13, SW5_CS13, SW4_CS13}, // ] + + {0, SW9_CS1, SW8_CS1, SW7_CS1}, // Caps + {0, SW9_CS2, SW8_CS2, SW7_CS2}, // A + {0, SW9_CS3, SW8_CS3, SW7_CS3}, // S + {0, SW9_CS4, SW8_CS4, SW7_CS4}, // D + {0, SW9_CS5, SW8_CS5, SW7_CS5}, // F + {0, SW9_CS6, SW8_CS6, SW7_CS6}, // G + {0, SW9_CS7, SW8_CS7, SW7_CS7}, // H + {0, SW9_CS8, SW8_CS8, SW7_CS8}, // J + {0, SW9_CS9, SW8_CS9, SW7_CS9}, // K + {0, SW9_CS10, SW8_CS10, SW7_CS10}, // L + {0, SW9_CS11, SW8_CS11, SW7_CS11}, // : + {0, SW9_CS12, SW8_CS12, SW7_CS12}, // ' + {0, SW9_CS13, SW8_CS13, SW7_CS13}, // NUHS + {0, SW9_CS14, SW8_CS14, SW7_CS14}, // Enter + + {0, SW12_CS1, SW11_CS1, SW10_CS1}, // LShift + {0, SW12_CS2, SW11_CS2, SW10_CS2}, // NUBS + {0, SW12_CS3, SW11_CS3, SW10_CS3}, // Z + {0, SW12_CS4, SW11_CS4, SW10_CS4}, // X + {0, SW12_CS5, SW11_CS5, SW10_CS5}, // C + {0, SW12_CS6, SW11_CS6, SW10_CS6}, // V + {0, SW12_CS7, SW11_CS7, SW10_CS7}, // B + {0, SW12_CS8, SW11_CS8, SW10_CS8}, // N + {0, SW12_CS9, SW11_CS9, SW10_CS9}, // M + {0, SW12_CS10, SW11_CS10, SW10_CS10}, // < + {0, SW12_CS11, SW11_CS11, SW10_CS11}, // > + {0, SW12_CS12, SW11_CS12, SW10_CS12}, // ? + {0, SW12_CS13, SW11_CS13, SW10_CS13}, // RShift + + {1, SW3_CS1, SW2_CS1, SW1_CS1}, // LCtrl + {1, SW3_CS2, SW2_CS2, SW1_CS2}, // LAlt + {1, SW3_CS3, SW2_CS3, SW1_CS3}, // Windows + {1, SW3_CS6, SW2_CS6, SW1_CS6}, // Space + {1, SW3_CS10, SW2_CS10, SW1_CS10}, // Fn1/RAlt hades/venus + {1, SW3_CS11, SW2_CS11, SW1_CS11}, // Fn2/Fn1 + {1, SW3_CS12, SW2_CS12, SW1_CS12}, // RCtrl/Fn2 + {1, SW3_CS13, SW2_CS13, SW1_CS13}, // LEFT/RCtrl +}; + +#endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/durgod/venus/readme.md b/keyboards/durgod/venus/readme.md index c2228583a9..685a9d2bc0 100644 --- a/keyboards/durgod/venus/readme.md +++ b/keyboards/durgod/venus/readme.md @@ -1,3 +1,3 @@ # Venus -See: [Venus](../dgk6x/venus/readme.md) +See: [Venus ANSI](../dgk6x/venus_ansi/readme.md) and [Venus ISO](../dgk6x/venus_iso/readme.md) From c7ed9038d71275a98b490c3fc1df8217164666fe Mon Sep 17 00:00:00 2001 From: Aidan Smith Date: Mon, 6 Oct 2025 12:38:27 -0400 Subject: [PATCH 53/95] E7-V2 Implementation (#25594) --- keyboards/exclusive/e7v2/keyboard.json | 392 ++++++++++++++++++ .../exclusive/e7v2/keymaps/default/keymap.c | 30 ++ .../e7v2/keymaps/default_iso/keymap.c | 30 ++ keyboards/exclusive/e7v2/readme.md | 27 ++ keyboards/exclusive/readme.md | 1 + 5 files changed, 480 insertions(+) create mode 100644 keyboards/exclusive/e7v2/keyboard.json create mode 100644 keyboards/exclusive/e7v2/keymaps/default/keymap.c create mode 100644 keyboards/exclusive/e7v2/keymaps/default_iso/keymap.c create mode 100644 keyboards/exclusive/e7v2/readme.md diff --git a/keyboards/exclusive/e7v2/keyboard.json b/keyboards/exclusive/e7v2/keyboard.json new file mode 100644 index 0000000000..542237e1bf --- /dev/null +++ b/keyboards/exclusive/e7v2/keyboard.json @@ -0,0 +1,392 @@ +{ + "manufacturer": "Exclusive / E-Team", + "keyboard_name": "E7V2", + "maintainer": "Aidan Smith", + "bootloader": "atmel-dfu", + "diode_direction": "ROW2COL", + "features": { + "backlight": true, + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "ws2812": { + "pin": "E2" + }, + "rgblight": { + "driver": "ws2812", + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 54, + "animations": { + "breathing": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "knight": true, + "christmas": true, + "static_gradient": true, + "alternating": true, + "twinkle": true + } + }, + "backlight": { + "pin": "B6", + "levels": 6 + }, + "matrix_pins": { + "cols": ["D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "F7", "F6", "F5", "F4", "F1", "F0"], + "rows": ["C6", "B0", "B1", "B2", "B3", "B7"] + }, + "processor": "atmega32u4", + "url": "https://exclusive.run/collections/e7-v2", + "usb": { + "device_version": "1.0.0", + "pid": "0xE702", + "vid": "0x4558" + }, + "layouts": { + "LAYOUT_75_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": [0, 4], "x": 4.25, "y": 0}, + {"matrix": [0, 5], "x": 5.50, "y": 0}, + {"matrix": [0, 6], "x": 6.50, "y": 0}, + {"matrix": [0, 7], "x": 7.50, "y": 0}, + {"matrix": [0, 8], "x": 8.50, "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": 14, "y": 0}, + {"matrix": [0, 14], "x": 15.25, "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": [1, 4], "x": 4, "y": 1.25}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [1, 6], "x": 6, "y": 1.25}, + {"matrix": [1, 7], "x": 7, "y": 1.25}, + {"matrix": [1, 8], "x": 8, "y": 1.25}, + {"matrix": [1, 9], "x": 9, "y": 1.25}, + {"matrix": [1, 10], "x": 10, "y": 1.25}, + {"matrix": [1, 11], "x": 11, "y": 1.25}, + {"matrix": [1, 12], "x": 12, "y": 1.25}, + {"matrix": [1, 14], "x": 13, "y": 1.25, "w": 2}, + {"matrix": [5, 14], "x": 15.25, "y": 1.25}, + {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.25}, + {"matrix": [2, 2], "x": 2.5, "y": 2.25}, + {"matrix": [2, 3], "x": 3.5, "y": 2.25}, + {"matrix": [2, 4], "x": 4.5, "y": 2.25}, + {"matrix": [2, 5], "x": 5.5, "y": 2.25}, + {"matrix": [2, 6], "x": 6.5, "y": 2.25}, + {"matrix": [2, 7], "x": 7.5, "y": 2.25}, + {"matrix": [2, 8], "x": 8.5, "y": 2.25}, + {"matrix": [2, 9], "x": 9.5, "y": 2.25}, + {"matrix": [2, 10], "x": 10.5, "y": 2.25}, + {"matrix": [2, 11], "x": 11.5, "y": 2.25}, + {"matrix": [2, 12], "x": 12.5, "y": 2.25}, + {"matrix": [3, 12], "x": 13.5, "y": 2.25, "w": 1.5}, + {"matrix": [2, 14], "x": 15.25, "y": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.25}, + {"matrix": [3, 2], "x": 2.75, "y": 3.25}, + {"matrix": [3, 3], "x": 3.75, "y": 3.25}, + {"matrix": [3, 4], "x": 4.75, "y": 3.25}, + {"matrix": [3, 5], "x": 5.75, "y": 3.25}, + {"matrix": [3, 6], "x": 6.75, "y": 3.25}, + {"matrix": [3, 7], "x": 7.75, "y": 3.25}, + {"matrix": [3, 8], "x": 8.75, "y": 3.25}, + {"matrix": [3, 9], "x": 9.75, "y": 3.25}, + {"matrix": [3, 10], "x": 10.75, "y": 3.25}, + {"matrix": [3, 11], "x": 11.75, "y": 3.25}, + {"matrix": [2, 13], "x": 12.75, "y": 3.25, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.25}, + {"matrix": [4, 3], "x": 3.25, "y": 4.25}, + {"matrix": [4, 4], "x": 4.25, "y": 4.25}, + {"matrix": [4, 5], "x": 5.25, "y": 4.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4.25}, + {"matrix": [4, 7], "x": 7.25, "y": 4.25}, + {"matrix": [4, 8], "x": 8.25, "y": 4.25}, + {"matrix": [4, 9], "x": 9.25, "y": 4.25}, + {"matrix": [4, 10], "x": 10.25, "y": 4.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4.25}, + {"matrix": [4, 12], "x": 12.25, "y": 4.25, "w": 1.75}, + {"matrix": [4, 13], "x": 14.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25}, + {"matrix": [5, 8], "x": 10, "y": 5.25, "w": 1.50}, + {"matrix": [5, 10], "x": 11.5, "y": 5.25, "w": 1.50}, + {"matrix": [5, 11], "x": 13.25, "y": 5.5}, + {"matrix": [5, 12], "x": 14.25, "y": 5.5}, + {"matrix": [5, 13], "x": 15.25, "y": 5.5} + ] + }, + "LAYOUT_75_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": [0, 4], "x": 4.25, "y": 0}, + {"matrix": [0, 5], "x": 5.50, "y": 0}, + {"matrix": [0, 6], "x": 6.50, "y": 0}, + {"matrix": [0, 7], "x": 7.50, "y": 0}, + {"matrix": [0, 8], "x": 8.50, "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": 14, "y": 0}, + {"matrix": [0, 14], "x": 15.25, "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": [1, 4], "x": 4, "y": 1.25}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [1, 6], "x": 6, "y": 1.25}, + {"matrix": [1, 7], "x": 7, "y": 1.25}, + {"matrix": [1, 8], "x": 8, "y": 1.25}, + {"matrix": [1, 9], "x": 9, "y": 1.25}, + {"matrix": [1, 10], "x": 10, "y": 1.25}, + {"matrix": [1, 11], "x": 11, "y": 1.25}, + {"matrix": [1, 12], "x": 12, "y": 1.25}, + {"matrix": [1, 14], "x": 13, "y": 1.25, "w": 2}, + {"matrix": [5, 14], "x": 15.25, "y": 1.25}, + {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.25}, + {"matrix": [2, 2], "x": 2.5, "y": 2.25}, + {"matrix": [2, 3], "x": 3.5, "y": 2.25}, + {"matrix": [2, 4], "x": 4.5, "y": 2.25}, + {"matrix": [2, 5], "x": 5.5, "y": 2.25}, + {"matrix": [2, 6], "x": 6.5, "y": 2.25}, + {"matrix": [2, 7], "x": 7.5, "y": 2.25}, + {"matrix": [2, 8], "x": 8.5, "y": 2.25}, + {"matrix": [2, 9], "x": 9.5, "y": 2.25}, + {"matrix": [2, 10], "x": 10.5, "y": 2.25}, + {"matrix": [2, 11], "x": 11.5, "y": 2.25}, + {"matrix": [2, 12], "x": 12.5, "y": 2.25}, + {"matrix": [2, 14], "x": 15.25, "y": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.25}, + {"matrix": [3, 2], "x": 2.75, "y": 3.25}, + {"matrix": [3, 3], "x": 3.75, "y": 3.25}, + {"matrix": [3, 4], "x": 4.75, "y": 3.25}, + {"matrix": [3, 5], "x": 5.75, "y": 3.25}, + {"matrix": [3, 6], "x": 6.75, "y": 3.25}, + {"matrix": [3, 7], "x": 7.75, "y": 3.25}, + {"matrix": [3, 8], "x": 8.75, "y": 3.25}, + {"matrix": [3, 9], "x": 9.75, "y": 3.25}, + {"matrix": [3, 10], "x": 10.75, "y": 3.25}, + {"matrix": [3, 11], "x": 11.75, "y": 3.25}, + {"matrix": [3, 12], "x": 12.75, "y": 3.25}, + {"matrix": [2, 13], "x": 13.75, "y": 2.25, "w": 1.25, "h": 2}, + {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.25}, + {"matrix": [4, 3], "x": 3.25, "y": 4.25}, + {"matrix": [4, 4], "x": 4.25, "y": 4.25}, + {"matrix": [4, 5], "x": 5.25, "y": 4.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4.25}, + {"matrix": [4, 7], "x": 7.25, "y": 4.25}, + {"matrix": [4, 8], "x": 8.25, "y": 4.25}, + {"matrix": [4, 9], "x": 9.25, "y": 4.25}, + {"matrix": [4, 10], "x": 10.25, "y": 4.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4.25}, + {"matrix": [4, 12], "x": 12.25, "y": 4.25, "w": 1.75}, + {"matrix": [4, 13], "x": 14.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25}, + {"matrix": [5, 8], "x": 10, "y": 5.25, "w": 1.50}, + {"matrix": [5, 10], "x": 11.5, "y": 5.25, "w": 1.50}, + {"matrix": [5, 11], "x": 13.25, "y": 5.5}, + {"matrix": [5, 12], "x": 14.25, "y": 5.5}, + {"matrix": [5, 13], "x": 15.25, "y": 5.5} + ] + }, + "LAYOUT_75_ansi_split_bs": { + "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.50, "y": 0}, + {"matrix": [0, 6], "x": 6.50, "y": 0}, + {"matrix": [0, 7], "x": 7.50, "y": 0}, + {"matrix": [0, 8], "x": 8.50, "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": 14, "y": 0}, + {"matrix": [0, 14], "x": 15.25, "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": [1, 4], "x": 4, "y": 1.25}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [1, 6], "x": 6, "y": 1.25}, + {"matrix": [1, 7], "x": 7, "y": 1.25}, + {"matrix": [1, 8], "x": 8, "y": 1.25}, + {"matrix": [1, 9], "x": 9, "y": 1.25}, + {"matrix": [1, 10], "x": 10, "y": 1.25}, + {"matrix": [1, 11], "x": 11, "y": 1.25}, + {"matrix": [1, 12], "x": 12, "y": 1.25}, + {"matrix": [1, 13], "x": 13, "y": 1.25}, + {"matrix": [1, 14], "x": 14, "y": 1.25}, + {"matrix": [5, 14], "x": 15.25, "y": 1.25}, + {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.25}, + {"matrix": [2, 2], "x": 2.5, "y": 2.25}, + {"matrix": [2, 3], "x": 3.5, "y": 2.25}, + {"matrix": [2, 4], "x": 4.5, "y": 2.25}, + {"matrix": [2, 5], "x": 5.5, "y": 2.25}, + {"matrix": [2, 6], "x": 6.5, "y": 2.25}, + {"matrix": [2, 7], "x": 7.5, "y": 2.25}, + {"matrix": [2, 8], "x": 8.5, "y": 2.25}, + {"matrix": [2, 9], "x": 9.5, "y": 2.25}, + {"matrix": [2, 10], "x": 10.5, "y": 2.25}, + {"matrix": [2, 11], "x": 11.5, "y": 2.25}, + {"matrix": [2, 12], "x": 12.5, "y": 2.25}, + {"matrix": [3, 12], "x": 13.5, "y": 2.25, "w": 1.5}, + {"matrix": [2, 14], "x": 15.25, "y": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.25}, + {"matrix": [3, 2], "x": 2.75, "y": 3.25}, + {"matrix": [3, 3], "x": 3.75, "y": 3.25}, + {"matrix": [3, 4], "x": 4.75, "y": 3.25}, + {"matrix": [3, 5], "x": 5.75, "y": 3.25}, + {"matrix": [3, 6], "x": 6.75, "y": 3.25}, + {"matrix": [3, 7], "x": 7.75, "y": 3.25}, + {"matrix": [3, 8], "x": 8.75, "y": 3.25}, + {"matrix": [3, 9], "x": 9.75, "y": 3.25}, + {"matrix": [3, 10], "x": 10.75, "y": 3.25}, + {"matrix": [3, 11], "x": 11.75, "y": 3.25}, + {"matrix": [2, 13], "x": 12.75, "y": 3.25, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.25}, + {"matrix": [4, 3], "x": 3.25, "y": 4.25}, + {"matrix": [4, 4], "x": 4.25, "y": 4.25}, + {"matrix": [4, 5], "x": 5.25, "y": 4.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4.25}, + {"matrix": [4, 7], "x": 7.25, "y": 4.25}, + {"matrix": [4, 8], "x": 8.25, "y": 4.25}, + {"matrix": [4, 9], "x": 9.25, "y": 4.25}, + {"matrix": [4, 10], "x": 10.25, "y": 4.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4.25}, + {"matrix": [4, 12], "x": 12.25, "y": 4.25, "w": 1.75}, + {"matrix": [4, 13], "x": 14.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25}, + {"matrix": [5, 8], "x": 10, "y": 5.25, "w": 1.50}, + {"matrix": [5, 10], "x": 11.5, "y": 5.25, "w": 1.50}, + {"matrix": [5, 11], "x": 13.25, "y": 5.5}, + {"matrix": [5, 12], "x": 14.25, "y": 5.5}, + {"matrix": [5, 13], "x": 15.25, "y": 5.5} + ] + }, + "LAYOUT_75_iso_split_bs": { + "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.50, "y": 0}, + {"matrix": [0, 6], "x": 6.50, "y": 0}, + {"matrix": [0, 7], "x": 7.50, "y": 0}, + {"matrix": [0, 8], "x": 8.50, "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": 14, "y": 0}, + {"matrix": [0, 14], "x": 15.25, "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": [1, 4], "x": 4, "y": 1.25}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [1, 6], "x": 6, "y": 1.25}, + {"matrix": [1, 7], "x": 7, "y": 1.25}, + {"matrix": [1, 8], "x": 8, "y": 1.25}, + {"matrix": [1, 9], "x": 9, "y": 1.25}, + {"matrix": [1, 10], "x": 10, "y": 1.25}, + {"matrix": [1, 11], "x": 11, "y": 1.25}, + {"matrix": [1, 12], "x": 12, "y": 1.25}, + {"matrix": [1, 13], "x": 13, "y": 1.25}, + {"matrix": [1, 14], "x": 14, "y": 1.25}, + {"matrix": [5, 14], "x": 15.25, "y": 1.25}, + {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.25}, + {"matrix": [2, 2], "x": 2.5, "y": 2.25}, + {"matrix": [2, 3], "x": 3.5, "y": 2.25}, + {"matrix": [2, 4], "x": 4.5, "y": 2.25}, + {"matrix": [2, 5], "x": 5.5, "y": 2.25}, + {"matrix": [2, 6], "x": 6.5, "y": 2.25}, + {"matrix": [2, 7], "x": 7.5, "y": 2.25}, + {"matrix": [2, 8], "x": 8.5, "y": 2.25}, + {"matrix": [2, 9], "x": 9.5, "y": 2.25}, + {"matrix": [2, 10], "x": 10.5, "y": 2.25}, + {"matrix": [2, 11], "x": 11.5, "y": 2.25}, + {"matrix": [2, 12], "x": 12.5, "y": 2.25}, + {"matrix": [2, 14], "x": 15.25, "y": 2.25}, + {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.25}, + {"matrix": [3, 2], "x": 2.75, "y": 3.25}, + {"matrix": [3, 3], "x": 3.75, "y": 3.25}, + {"matrix": [3, 4], "x": 4.75, "y": 3.25}, + {"matrix": [3, 5], "x": 5.75, "y": 3.25}, + {"matrix": [3, 6], "x": 6.75, "y": 3.25}, + {"matrix": [3, 7], "x": 7.75, "y": 3.25}, + {"matrix": [3, 8], "x": 8.75, "y": 3.25}, + {"matrix": [3, 9], "x": 9.75, "y": 3.25}, + {"matrix": [3, 10], "x": 10.75, "y": 3.25}, + {"matrix": [3, 11], "x": 11.75, "y": 3.25}, + {"matrix": [3, 12], "x": 12.75, "y": 3.25}, + {"matrix": [2, 13], "x": 13.75, "y": 2.25, "w": 1.25, "h": 2}, + {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.25}, + {"matrix": [4, 3], "x": 3.25, "y": 4.25}, + {"matrix": [4, 4], "x": 4.25, "y": 4.25}, + {"matrix": [4, 5], "x": 5.25, "y": 4.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4.25}, + {"matrix": [4, 7], "x": 7.25, "y": 4.25}, + {"matrix": [4, 8], "x": 8.25, "y": 4.25}, + {"matrix": [4, 9], "x": 9.25, "y": 4.25}, + {"matrix": [4, 10], "x": 10.25, "y": 4.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4.25}, + {"matrix": [4, 12], "x": 12.25, "y": 4.25, "w": 1.75}, + {"matrix": [4, 13], "x": 14.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25}, + {"matrix": [5, 8], "x": 10, "y": 5.25, "w": 1.50}, + {"matrix": [5, 10], "x": 11.5, "y": 5.25, "w": 1.50}, + {"matrix": [5, 11], "x": 13.25, "y": 5.5}, + {"matrix": [5, 12], "x": 14.25, "y": 5.5}, + {"matrix": [5, 13], "x": 15.25, "y": 5.5} + ] + } + } +} diff --git a/keyboards/exclusive/e7v2/keymaps/default/keymap.c b/keyboards/exclusive/e7v2/keymaps/default/keymap.c new file mode 100644 index 0000000000..f41b387732 --- /dev/null +++ b/keyboards/exclusive/e7v2/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +// 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│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│ │Del│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┐ + * │Ctrl│GUI │Alt │ │ Alt │ GUI │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ + [0] = LAYOUT_75_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_DEL, KC_PSCR, + 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_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_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_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/keyboards/exclusive/e7v2/keymaps/default_iso/keymap.c b/keyboards/exclusive/e7v2/keymaps/default_iso/keymap.c new file mode 100644 index 0000000000..e6cff42f3f --- /dev/null +++ b/keyboards/exclusive/e7v2/keymaps/default_iso/keymap.c @@ -0,0 +1,30 @@ +// 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│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Del│ │PSC│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ ENT │PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┐ + * │Ctrl│GUI │Alt │ │ Alt │ GUI │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ + [0] = LAYOUT_75_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_DEL, KC_PSCR, + 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_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_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_NUHS, KC_ENT, + 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, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/keyboards/exclusive/e7v2/readme.md b/keyboards/exclusive/e7v2/readme.md new file mode 100644 index 0000000000..77345ede70 --- /dev/null +++ b/keyboards/exclusive/e7v2/readme.md @@ -0,0 +1,27 @@ +# E7-V2 + +![E7-V2](https://i.imgur.com/p7Gi1fZ.jpeg) + +The second revision of a 75% keyboard made by Exclusive and run in a Geekhack group buy. + +* Keyboard Maintainer: [AidanSmith.dev](https://github.com/Aidan-OS) +* Hardware Supported: E7-V2 QMK Solder PCB +* Hardware Availability: [Exclusive's Website](https://exclusive.run/collections/e7-v2) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e7v2:default + +Flashing example for this keyboard: + + make exclusive/e7v2: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/exclusive/readme.md b/keyboards/exclusive/readme.md index bee613bf45..7bfc559d79 100644 --- a/keyboards/exclusive/readme.md +++ b/keyboards/exclusive/readme.md @@ -7,5 +7,6 @@ All files related to firmware of keyboards designed by Exclusive. * [e6_rgb](./e6_rgb/): maintainer [astro](https://github.com/yulei) * [e6-v2](./e6v2/): maintainers [MechMerlin](https://github.com/mechmerlin), [amnesia0287](https://github.com/amnesia0287) * [e7-v1](./e7v1): maintainer [masterzen](https://github.com/masterzen) +* [e7-v2](./e7v2): [AidanSmith.dev](https://github.com/Aidan-OS) * [e6.5](./e65): maintainer [masterzen](https://github.com/masterzen) * [e8.5](./e85): maintainer [MechMerlin](https://github.com/mechmerlin) From 02cf2b56fdb7ce80de7c4f3e6e5708076f38aee1 Mon Sep 17 00:00:00 2001 From: "Martin W." Date: Mon, 6 Oct 2025 18:46:41 +0200 Subject: [PATCH 54/95] Add Royal Kludge RK61 (#25694) --- keyboards/royal_kludge/rk61/config.h | 11 + keyboards/royal_kludge/rk61/halconf.h | 9 + keyboards/royal_kludge/rk61/keyboard.json | 223 ++++++++++++++++++ .../rk61/keymaps/default/keymap.c | 111 +++++++++ keyboards/royal_kludge/rk61/mcuconf.h | 9 + keyboards/royal_kludge/rk61/readme.md | 25 ++ keyboards/royal_kludge/rk61/rules.mk | 1 + 7 files changed, 389 insertions(+) create mode 100644 keyboards/royal_kludge/rk61/config.h create mode 100644 keyboards/royal_kludge/rk61/halconf.h create mode 100644 keyboards/royal_kludge/rk61/keyboard.json create mode 100644 keyboards/royal_kludge/rk61/keymaps/default/keymap.c create mode 100644 keyboards/royal_kludge/rk61/mcuconf.h create mode 100644 keyboards/royal_kludge/rk61/readme.md create mode 100644 keyboards/royal_kludge/rk61/rules.mk diff --git a/keyboards/royal_kludge/rk61/config.h b/keyboards/royal_kludge/rk61/config.h new file mode 100644 index 0000000000..22c9d1d3e9 --- /dev/null +++ b/keyboards/royal_kludge/rk61/config.h @@ -0,0 +1,11 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define WS2812_SPI_DRIVER SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 +#define WS2812_SPI_SCK_PAL_MODE 0 +#define WS2812_SPI_SCK_PIN B13 + +#define CAPS_LOCK_LED_INDEX 40 diff --git a/keyboards/royal_kludge/rk61/halconf.h b/keyboards/royal_kludge/rk61/halconf.h new file mode 100644 index 0000000000..b7fd8398a2 --- /dev/null +++ b/keyboards/royal_kludge/rk61/halconf.h @@ -0,0 +1,9 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_SPI TRUE + +#include_next + diff --git a/keyboards/royal_kludge/rk61/keyboard.json b/keyboards/royal_kludge/rk61/keyboard.json new file mode 100644 index 0000000000..d98ce4765b --- /dev/null +++ b/keyboards/royal_kludge/rk61/keyboard.json @@ -0,0 +1,223 @@ +{ + "manufacturer": "Royal Kludge", + "keyboard_name": "RK61", + "maintainer": "DEREFERENC3D", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "dynamic_keymap": { + "layer_count": 16 + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": false, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["A10", "A9", "B2", "A15", "B3", "B4", "B5", "B8", "B9", "C13", "C14", "C15", "A0", "A1"], + "rows": ["A6", "A5", "A4", "A3", "A2"] + }, + "processor": "STM32F072", + "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 + }, + "default": { + "hue": 170, + "val": 150 + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 13], "x": 218, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 193, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 177, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 161, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "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": 73, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 89, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 105, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 121, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 137, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 153, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 169, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 185, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 202, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 222, "y": 16, "flags": 1}, + {"matrix": [2, 12], "x": 216, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 189, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 173, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 157, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 141, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 125, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 109, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 93, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 77, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 85, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 101, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 117, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 133, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 149, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 181, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 212, "y": 48, "flags": 1}, + {"matrix": [4, 12], "x": 224, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 204, "y": 64, "flags": 1}, + {"matrix": [4, 9], "x": 184, "y": 64, "flags": 1}, + {"matrix": [4, 8], "x": 164, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 103, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1} + ], + "max_brightness": 200, + "sleep": true + }, + "url": "http://en.rkgaming.com/", + "usb": { + "device_version": "1.0.1", + "pid": "0x6461", + "vid": "0x1480" + }, + "ws2812": { + "pin": "B15", + "driver": "spi" + }, + "community_layouts": ["60_ansi"], + "layouts": { + "LAYOUT_60_ansi": { + "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": "\u00a3", "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": "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": [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": [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, 1], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 2], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 3], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 4], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 5], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 6], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 7], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [3, 8], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [3, 9], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [3, 10], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 11], "x": 12.25, "y": 3, "w": 2.75}, + {"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, 5], "x": 3.75, "y": 4, "w": 6.25}, + {"label": "AltGr", "matrix": [4, 8], "x": 10, "y": 4, "w": 1.25}, + {"label": "Menu", "matrix": [4, 9], "x": 11.25, "y": 4, "w": 1.25}, + {"label": "Ctrl", "matrix": [4, 10], "x": 12.5, "y": 4, "w": 1.25}, + {"label": "Fn", "matrix": [4, 12], "x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/royal_kludge/rk61/keymaps/default/keymap.c b/keyboards/royal_kludge/rk61/keymaps/default/keymap.c new file mode 100644 index 0000000000..2efc47913b --- /dev/null +++ b/keyboards/royal_kludge/rk61/keymaps/default/keymap.c @@ -0,0 +1,111 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +enum layers { + WIN_BASE, + WIN_T, + WIN_ALT, + ARROW_FN, + LWIN_DIS, + WIN_FN, + WIN_T_FN, + WIN_ALT_FN, + MAC_BASE, + MAC_FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [WIN_BASE] = 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_UP, KC_RSFT, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT, MO(WIN_FN) + ), + [WIN_FN] = 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, _______, _______, RM_VALD, RM_VALU, RM_NEXT, + _______, _______, DF(MAC_BASE), _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, RM_SPDD, RM_SPDU, TG(ARROW_FN), + _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, RM_HUEU, _______, _______, + DF(WIN_ALT), TG(LWIN_DIS), _______, _______, _______, _______, _______, _______ + ), + [WIN_T] = 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(WIN_T_FN) + ), + [WIN_T_FN] = LAYOUT_60_ansi( + KC_ESC, KC_MYCM, KC_WHOM, KC_MAIL, KC_CALC, KC_MSEL, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, DF(MAC_BASE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(ARROW_FN), + DF(WIN_BASE), TG(LWIN_DIS), _______, _______, _______, _______, _______, _______ + ), + [WIN_ALT] = 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_INS, KC_HOME, KC_PGUP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(WIN_ALT_FN) + ), + [WIN_ALT_FN] = LAYOUT_60_ansi( + KC_ESC, KC_MYCM, KC_WHOM, KC_MAIL, KC_CALC, KC_MSEL, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_Y, KC_U, KC_I, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_H, KC_J, KC_K, _______, _______, _______, TG(ARROW_FN), + _______, _______, _______, _______, _______, _______, KC_N, KC_M, KC_COMM, _______, _______, _______, + DF(WIN_T), TG(LWIN_DIS), _______, _______, _______, _______, _______, _______ + ), + [MAC_BASE] = 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_LOPT, KC_LCMD, KC_SPC, KC_RCMD, KC_APP, KC_RCTL, MO(MAC_FN) + ), + [MAC_FN] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, DF(WIN_BASE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, _______, + _______, _______, _______, _______, _______, KC_F1, KC_RCTL, KC_F2 + ), + [ARROW_FN] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, _______, + _______, _______, _______, _______, KC_RALT, KC_APP, KC_RCTL, _______ + ), + [LWIN_DIS] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______ + ), +}; + +#ifdef CAPS_LOCK_LED_INDEX +bool rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(CAPS_LOCK_LED_INDEX, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + rgb_matrix_set_color(CAPS_LOCK_LED_INDEX, 0, 0, 0); + } + } + + if (layer_state_is(LWIN_DIS)) { + rgb_matrix_set_color(59, 255, 255, 255); + } else { + if (!rgb_matrix_get_flags()) { + rgb_matrix_set_color(59, 0, 0, 0); + } + } + + return false; +} +#endif diff --git a/keyboards/royal_kludge/rk61/mcuconf.h b/keyboards/royal_kludge/rk61/mcuconf.h new file mode 100644 index 0000000000..f459d17ee9 --- /dev/null +++ b/keyboards/royal_kludge/rk61/mcuconf.h @@ -0,0 +1,9 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_SPI_USE_SPI2 +#define STM32_SPI_USE_SPI2 TRUE diff --git a/keyboards/royal_kludge/rk61/readme.md b/keyboards/royal_kludge/rk61/readme.md new file mode 100644 index 0000000000..d8ba3a3a4f --- /dev/null +++ b/keyboards/royal_kludge/rk61/readme.md @@ -0,0 +1,25 @@ +# Royal Kludge RK61 + +![Royal Kludge RK61](https://imgur.com/9YoEEkH.jpg) + +* Keyboard Maintainer: [DEREFERENC3D](https://github.com/DEREFERENC3D) +* Hardware Supported: Royal Kludge RK61 - wired-only QMK version +* Hardware Availability: [RKGaming.com](https://en.rkgaming.com/product/43/), [Amazon.com](https://www.amazon.com/RK-ROYAL-KLUDGE-Mechanical-Ultra-Compact/dp/B0832LSV8N) + +Make example for this keyboard (after setting up your build environment): + + make royal_kludge/rk61:default + +Flashing example for this keyboard: + + make royal_kludge/rk61: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 (this one might be disabled on the stock firmware) +* **Physical reset button**: Briefly press the button on the PCB, located under the space bar keycap, to the right of the space bar's switch +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. On the stock firmware, VIA should allow it to be mapped. diff --git a/keyboards/royal_kludge/rk61/rules.mk b/keyboards/royal_kludge/rk61/rules.mk new file mode 100644 index 0000000000..fb3dcdbf7a --- /dev/null +++ b/keyboards/royal_kludge/rk61/rules.mk @@ -0,0 +1 @@ +DFU_SUFFIX_ARGS = -p FFFF -v FFFF From 0550830909e854d2ac0203905c861a868e82b289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Mart=C3=ADnez?= <58857054+elpekenin@users.noreply.github.com> Date: Wed, 8 Oct 2025 04:10:38 +0200 Subject: [PATCH 55/95] [QP] Minor cleanup and support for RGB888 surface (#25706) Co-authored-by: Drashna Jaelre --- docs/quantum_painter.md | 2 + drivers/painter/comms/qp_comms_spi.c | 2 +- drivers/painter/generic/qp_surface.h | 10 ++ drivers/painter/generic/qp_surface_internal.h | 1 + drivers/painter/generic/qp_surface_rgb565.c | 2 +- drivers/painter/generic/qp_surface_rgb888.c | 143 ++++++++++++++++++ drivers/painter/ili9xxx/qp_ili9486.c | 2 +- drivers/painter/tft_panel/qp_tft_panel.c | 7 +- quantum/painter/qff.h | 10 +- quantum/painter/qgf.c | 2 +- quantum/painter/qgf.h | 16 +- quantum/painter/qp_draw_core.c | 22 +-- quantum/painter/qp_draw_ellipse.c | 2 +- quantum/painter/qp_internal.h | 8 +- quantum/painter/qp_internal_formats.h | 15 +- quantum/painter/rules.mk | 3 +- 16 files changed, 194 insertions(+), 53 deletions(-) create mode 100644 drivers/painter/generic/qp_surface_rgb888.c diff --git a/docs/quantum_painter.md b/docs/quantum_painter.md index bbe8944516..fbc72cb053 100644 --- a/docs/quantum_painter.md +++ b/docs/quantum_painter.md @@ -534,6 +534,8 @@ QUANTUM_PAINTER_DRIVERS += surface Creating a surface in firmware can then be done with the following APIs: ```c +// 24bpp RGB888 surface: +painter_device_t qp_make_rgb888_surface(uint16_t panel_width, uint16_t panel_height, void *buffer); // 16bpp RGB565 surface: painter_device_t qp_make_rgb565_surface(uint16_t panel_width, uint16_t panel_height, void *buffer); // 1bpp monochrome surface: diff --git a/drivers/painter/comms/qp_comms_spi.c b/drivers/painter/comms/qp_comms_spi.c index 4e6067394b..8f4fc12a3c 100644 --- a/drivers/painter/comms/qp_comms_spi.c +++ b/drivers/painter/comms/qp_comms_spi.c @@ -36,7 +36,7 @@ uint32_t qp_comms_spi_send_data(painter_device_t device, const void *data, uint3 const uint32_t max_msg_length = 1024; while (bytes_remaining > 0) { - uint32_t bytes_this_loop = QP_MIN(bytes_remaining, max_msg_length); + uint32_t bytes_this_loop = MIN(bytes_remaining, max_msg_length); spi_transmit(p, bytes_this_loop); p += bytes_this_loop; bytes_remaining -= bytes_this_loop; diff --git a/drivers/painter/generic/qp_surface.h b/drivers/painter/generic/qp_surface.h index a291793649..f602a8770b 100644 --- a/drivers/painter/generic/qp_surface.h +++ b/drivers/painter/generic/qp_surface.h @@ -50,6 +50,16 @@ painter_device_t qp_make_rgb565_surface(uint16_t panel_width, uint16_t panel_hei */ painter_device_t qp_make_mono1bpp_surface(uint16_t panel_width, uint16_t panel_height, void *buffer); +/** + * Factory method for an RGB888 surface (aka framebuffer). + * + * @param panel_width[in] the width of the display panel + * @param panel_height[in] the height of the display panel + * @param buffer[in] pointer to a preallocated uint8_t buffer of size `SURFACE_REQUIRED_BUFFER_BYTE_SIZE(panel_width, panel_height, 16)` + * @return the device handle used with all drawing routines in Quantum Painter + */ +painter_device_t qp_make_rgb888_surface(uint16_t panel_width, uint16_t panel_height, void *buffer); + /** * Helper method to draw the contents of the framebuffer to the target device. * diff --git a/drivers/painter/generic/qp_surface_internal.h b/drivers/painter/generic/qp_surface_internal.h index 71f82e924d..e05a58594b 100644 --- a/drivers/painter/generic/qp_surface_internal.h +++ b/drivers/painter/generic/qp_surface_internal.h @@ -45,6 +45,7 @@ typedef struct surface_painter_device_t { void * buffer; uint8_t * u8buffer; uint16_t *u16buffer; + rgb_t * rgbbuffer; }; // Manually manage the viewport for streaming pixel data to the display diff --git a/drivers/painter/generic/qp_surface_rgb565.c b/drivers/painter/generic/qp_surface_rgb565.c index c5b351311a..2426d53c0c 100644 --- a/drivers/painter/generic/qp_surface_rgb565.c +++ b/drivers/painter/generic/qp_surface_rgb565.c @@ -52,7 +52,7 @@ static bool qp_surface_pixdata_rgb565(painter_device_t device, const void *pixel // Pixel colour conversion static bool qp_surface_palette_convert_rgb565_swapped(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) { for (int16_t i = 0; i < palette_size; ++i) { - rgb_t rgb = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v}); + rgb_t rgb = hsv_to_rgb_nocie(palette[i].hsv888); uint16_t rgb565 = (((uint16_t)rgb.r) >> 3) << 11 | (((uint16_t)rgb.g) >> 2) << 5 | (((uint16_t)rgb.b) >> 3); palette[i].rgb565 = __builtin_bswap16(rgb565); } diff --git a/drivers/painter/generic/qp_surface_rgb888.c b/drivers/painter/generic/qp_surface_rgb888.c new file mode 100644 index 0000000000..68c824b0e4 --- /dev/null +++ b/drivers/painter/generic/qp_surface_rgb888.c @@ -0,0 +1,143 @@ +// Copyright 2022 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later + +#ifdef QUANTUM_PAINTER_SURFACE_ENABLE + +# include "color.h" +# include "qp_draw.h" +# include "qp_surface_internal.h" +# include "qp_comms_dummy.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Surface driver impl: rgb888 + +static inline void setpixel_rgb888(surface_painter_device_t *surface, uint16_t x, uint16_t y, rgb_t rgb888) { + uint16_t w = surface->base.panel_width; + uint16_t h = surface->base.panel_height; + + // Drop out if it's off-screen + if (x >= w || y >= h) { + return; + } + + // Skip messing with the dirty info if the original value already matches + if (memcmp(&surface->rgbbuffer[y * w + x], &rgb888, sizeof(rgb_t)) != 0) { + // Update the dirty region + qp_surface_update_dirty(&surface->dirty, x, y); + + // Update the pixel data in the buffer + surface->rgbbuffer[y * w + x] = rgb888; + } +} + +static inline void append_pixel_rgb888(surface_painter_device_t *surface, rgb_t rgb888) { + setpixel_rgb888(surface, surface->viewport.pixdata_x, surface->viewport.pixdata_y, rgb888); + qp_surface_increment_pixdata_location(&surface->viewport); +} + +static inline void stream_pixdata_rgb888(surface_painter_device_t *surface, const rgb_t *data, uint32_t native_pixel_count) { + for (uint32_t pixel_counter = 0; pixel_counter < native_pixel_count; ++pixel_counter) { + append_pixel_rgb888(surface, data[pixel_counter]); + } +} + +// 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; + surface_painter_device_t *surface = (surface_painter_device_t *)driver; + stream_pixdata_rgb888(surface, (const rgb_t *)pixel_data, native_pixel_count); + return true; +} + +// Pixel colour conversion +static bool qp_surface_palette_convert_rgb888(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) { + for (int16_t i = 0; i < palette_size; ++i) { + palette[i].rgb888 = hsv_to_rgb_nocie(palette[i].hsv888); + } + return true; +} + +// Append pixels to the target location, keyed by the pixel index +static bool qp_surface_append_pixels_rgb888(painter_device_t device, uint8_t *target_buffer, qp_pixel_t *palette, uint32_t pixel_offset, uint32_t pixel_count, uint8_t *palette_indices) { + rgb_t *buf = (rgb_t *)target_buffer; + for (uint32_t i = 0; i < pixel_count; ++i) { + buf[pixel_offset + i] = palette[palette_indices[i]].rgb888; + } + return true; +} + +static bool rgb888_target_pixdata_transfer(painter_driver_t *surface_driver, painter_driver_t *target_driver, uint16_t x, uint16_t y, bool entire_surface) { + surface_painter_device_t *surface_handle = (surface_painter_device_t *)surface_driver; + + uint16_t l = entire_surface ? 0 : surface_handle->dirty.l; + uint16_t t = entire_surface ? 0 : surface_handle->dirty.t; + uint16_t r = entire_surface ? (surface_handle->base.panel_width - 1) : surface_handle->dirty.r; + uint16_t b = entire_surface ? (surface_handle->base.panel_height - 1) : surface_handle->dirty.b; + + // Set the target drawing area + bool ok = qp_viewport((painter_device_t)target_driver, x + l, y + t, x + r, y + b); + if (!ok) { + qp_dprintf("rgb888_target_pixdata_transfer: fail (could not set target viewport)\n"); + return false; + } + + // 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; + + // Fill the global pixdata area so that we can start transferring to the panel + for (uint16_t y = t; y <= b; ++y) { + for (uint16_t x = l; x <= r; ++x) { + // Update the target buffer + target_buffer[pixel_counter++] = surface_handle->rgbbuffer[y * surface_handle->base.panel_width + x]; + + // If we've accumulated enough data, send it + if (pixel_counter == total_pixel_count) { + ok = qp_pixdata((painter_device_t)target_driver, qp_internal_global_pixdata_buffer, pixel_counter); + if (!ok) { + qp_dprintf("rgb888_target_pixdata_transfer: fail (could not stream pixdata to target)\n"); + return false; + } + // Reset the counter + pixel_counter = 0; + } + } + } + + // If there's any leftover data, send it + if (pixel_counter > 0) { + ok = qp_pixdata((painter_device_t)target_driver, qp_internal_global_pixdata_buffer, pixel_counter); + if (!ok) { + qp_dprintf("rgb888_target_pixdata_transfer: fail (could not stream pixdata to target)\n"); + return false; + } + } + + return true; +} + +static bool qp_surface_append_pixdata_rgb888(painter_device_t device, uint8_t *target_buffer, uint32_t pixdata_offset, uint8_t pixdata_byte) { + target_buffer[pixdata_offset] = pixdata_byte; + return true; +} + +const surface_painter_driver_vtable_t rgb888_surface_driver_vtable = { + .base = + { + .init = qp_surface_init, + .power = qp_surface_power, + .clear = qp_surface_clear, + .flush = qp_surface_flush, + .pixdata = qp_surface_pixdata_rgb888, + .viewport = qp_surface_viewport, + .palette_convert = qp_surface_palette_convert_rgb888, + .append_pixels = qp_surface_append_pixels_rgb888, + .append_pixdata = qp_surface_append_pixdata_rgb888, + }, + .target_pixdata_transfer = rgb888_target_pixdata_transfer, +}; + +SURFACE_FACTORY_FUNCTION_IMPL(qp_make_rgb888_surface, rgb888_surface_driver_vtable, 24); + +#endif // QUANTUM_PAINTER_SURFACE_ENABLE diff --git a/drivers/painter/ili9xxx/qp_ili9486.c b/drivers/painter/ili9xxx/qp_ili9486.c index 48db779c04..5a2e226668 100644 --- a/drivers/painter/ili9xxx/qp_ili9486.c +++ b/drivers/painter/ili9xxx/qp_ili9486.c @@ -90,7 +90,7 @@ static uint32_t qp_comms_spi_send_data_odd_cs_pulse(painter_device_t device, con gpio_write_pin_high(comms_config->dc_pin); while (bytes_remaining > 0) { - uint32_t bytes_this_loop = QP_MIN(bytes_remaining, max_msg_length); + uint32_t bytes_this_loop = MIN(bytes_remaining, max_msg_length); bool odd_bytes = bytes_this_loop & 1; // send data diff --git a/drivers/painter/tft_panel/qp_tft_panel.c b/drivers/painter/tft_panel/qp_tft_panel.c index c8e33343d4..a6c72b4f6f 100644 --- a/drivers/painter/tft_panel/qp_tft_panel.c +++ b/drivers/painter/tft_panel/qp_tft_panel.c @@ -90,7 +90,7 @@ bool qp_tft_panel_pixdata(painter_device_t device, const void *pixel_data, uint3 bool qp_tft_panel_palette_convert_rgb565_swapped(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) { for (int16_t i = 0; i < palette_size; ++i) { - rgb_t rgb = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v}); + rgb_t rgb = hsv_to_rgb_nocie(palette[i].hsv888); uint16_t rgb565 = (((uint16_t)rgb.r) >> 3) << 11 | (((uint16_t)rgb.g) >> 2) << 5 | (((uint16_t)rgb.b) >> 3); palette[i].rgb565 = __builtin_bswap16(rgb565); } @@ -99,10 +99,7 @@ bool qp_tft_panel_palette_convert_rgb565_swapped(painter_device_t device, int16_ bool qp_tft_panel_palette_convert_rgb888(painter_device_t device, int16_t palette_size, qp_pixel_t *palette) { for (int16_t i = 0; i < palette_size; ++i) { - rgb_t rgb = hsv_to_rgb_nocie((hsv_t){palette[i].hsv888.h, palette[i].hsv888.s, palette[i].hsv888.v}); - palette[i].rgb888.r = rgb.r; - palette[i].rgb888.g = rgb.g; - palette[i].rgb888.b = rgb.b; + palette[i].rgb888 = hsv_to_rgb_nocie(palette[i].hsv888); } return true; } diff --git a/quantum/painter/qff.h b/quantum/painter/qff.h index ed88508d73..f5c59b315b 100644 --- a/quantum/painter/qff.h +++ b/quantum/painter/qff.h @@ -22,7 +22,7 @@ #define QFF_FONT_DESCRIPTOR_TYPEID 0x00 -typedef struct QP_PACKED qff_font_descriptor_v1_t { +typedef struct PACKED qff_font_descriptor_v1_t { qgf_block_header_v1_t header; // = { .type_id = 0x00, .neg_type_id = (~0x00), .length = 20 } uint32_t magic : 24; // constant, equal to 0x464651 ("QFF") uint8_t qff_version; // constant, equal to 0x01 @@ -51,13 +51,13 @@ STATIC_ASSERT(sizeof(qff_font_descriptor_v1_t) == (sizeof(qgf_block_header_v1_t) #define QFF_GLYPH_OFFSET_BITS 18 #define QFF_GLYPH_OFFSET_MASK (((1 << QFF_GLYPH_OFFSET_BITS) - 1) << QFF_GLYPH_WIDTH_BITS) -typedef struct QP_PACKED qff_ascii_glyph_v1_t { +typedef struct PACKED qff_ascii_glyph_v1_t { uint32_t value : 24; // Uses QFF_GLYPH_*_(BITS|MASK) as bitfield ordering is compiler-defined } qff_ascii_glyph_v1_t; STATIC_ASSERT(sizeof(qff_ascii_glyph_v1_t) == 3, "qff_ascii_glyph_v1_t must be 3 bytes in v1 of QFF"); -typedef struct QP_PACKED qff_ascii_glyph_table_v1_t { +typedef struct PACKED qff_ascii_glyph_table_v1_t { qgf_block_header_v1_t header; // = { .type_id = 0x01, .neg_type_id = (~0x01), .length = 285 } qff_ascii_glyph_v1_t glyph[95]; // 95 glyphs, 0x20..0x7E } qff_ascii_glyph_table_v1_t; @@ -69,14 +69,14 @@ STATIC_ASSERT(sizeof(qff_ascii_glyph_table_v1_t) == (sizeof(qgf_block_header_v1_ #define QFF_UNICODE_GLYPH_DESCRIPTOR_TYPEID 0x02 -typedef struct QP_PACKED qff_unicode_glyph_v1_t { +typedef struct PACKED qff_unicode_glyph_v1_t { uint32_t code_point : 24; uint32_t value : 24; // Uses QFF_GLYPH_*_(BITS|MASK) as bitfield ordering is compiler-defined } qff_unicode_glyph_v1_t; STATIC_ASSERT(sizeof(qff_unicode_glyph_v1_t) == 6, "qff_unicode_glyph_v1_t must be 6 bytes in v1 of QFF"); -typedef struct QP_PACKED qff_unicode_glyph_table_v1_t { +typedef struct PACKED qff_unicode_glyph_table_v1_t { qgf_block_header_v1_t header; // = { .type_id = 0x02, .neg_type_id = (~0x02), .length = (N * 6) } qff_unicode_glyph_v1_t glyph[0]; // Extent of '0' signifies that this struct is immediately followed by the glyph data } qff_unicode_glyph_table_v1_t; diff --git a/quantum/painter/qgf.c b/quantum/painter/qgf.c index 07c3f80314..e5a1895b74 100644 --- a/quantum/painter/qgf.c +++ b/quantum/painter/qgf.c @@ -26,7 +26,7 @@ bool qgf_validate_block_header(qgf_block_header_v1_t *desc, uint8_t expected_typ bool qgf_parse_format(qp_image_format_t format, uint8_t *bpp, bool *has_palette, bool *is_panel_native) { // clang-format off - static const struct QP_PACKED { + static const struct PACKED { uint8_t bpp; bool has_palette; bool is_panel_native; diff --git a/quantum/painter/qgf.h b/quantum/painter/qgf.h index a1e245f15d..87a9124f27 100644 --- a/quantum/painter/qgf.h +++ b/quantum/painter/qgf.h @@ -19,7 +19,7 @@ ///////////////////////////////////////// // Common block header -typedef struct QP_PACKED qgf_block_header_v1_t { +typedef struct PACKED qgf_block_header_v1_t { uint8_t type_id; // See each respective block type below. uint8_t neg_type_id; // Negated type ID, used for detecting parsing errors. uint32_t length : 24; // 24-bit blob length, allowing for block sizes of a maximum of 16MB. @@ -32,7 +32,7 @@ STATIC_ASSERT(sizeof(qgf_block_header_v1_t) == 5, "qgf_block_header_v1_t must be #define QGF_GRAPHICS_DESCRIPTOR_TYPEID 0x00 -typedef struct QP_PACKED qgf_graphics_descriptor_v1_t { +typedef struct PACKED qgf_graphics_descriptor_v1_t { qgf_block_header_v1_t header; // = { .type_id = 0x00, .neg_type_id = (~0x00), .length = 18 } uint32_t magic : 24; // constant, equal to 0x464751 ("QGF") uint8_t qgf_version; // constant, equal to 0x01 @@ -52,7 +52,7 @@ STATIC_ASSERT(sizeof(qgf_graphics_descriptor_v1_t) == (sizeof(qgf_block_header_v #define QGF_FRAME_OFFSET_DESCRIPTOR_TYPEID 0x01 -typedef struct QP_PACKED qgf_frame_offsets_v1_t { +typedef struct PACKED qgf_frame_offsets_v1_t { qgf_block_header_v1_t header; // = { .type_id = 0x01, .neg_type_id = (~0x01), .length = (N * sizeof(uint32_t)) } uint32_t offset[0]; // '0' signifies that this struct is immediately followed by the frame offsets } qgf_frame_offsets_v1_t; @@ -64,7 +64,7 @@ STATIC_ASSERT(sizeof(qgf_frame_offsets_v1_t) == sizeof(qgf_block_header_v1_t), " #define QGF_FRAME_DESCRIPTOR_TYPEID 0x02 -typedef struct QP_PACKED qgf_frame_v1_t { +typedef struct PACKED qgf_frame_v1_t { qgf_block_header_v1_t header; // = { .type_id = 0x02, .neg_type_id = (~0x02), .length = 6 } qp_image_format_t format : 8; // Frame format, see qp_internal_formats.h. uint8_t flags; // Frame flags, see below. @@ -83,7 +83,7 @@ STATIC_ASSERT(sizeof(qgf_frame_v1_t) == (sizeof(qgf_block_header_v1_t) + 6), "qg #define QGF_FRAME_PALETTE_DESCRIPTOR_TYPEID 0x03 -typedef struct QP_PACKED qgf_palette_entry_v1_t { +typedef struct PACKED qgf_palette_entry_v1_t { uint8_t h; // hue component: `[0,360)` degrees is mapped to `[0,255]` uint8_t. uint8_t s; // saturation component: `[0,1]` is mapped to `[0,255]` uint8_t. uint8_t v; // value component: `[0,1]` is mapped to `[0,255]` uint8_t. @@ -91,7 +91,7 @@ typedef struct QP_PACKED qgf_palette_entry_v1_t { STATIC_ASSERT(sizeof(qgf_palette_entry_v1_t) == 3, "Palette entry is not 3 bytes in size"); -typedef struct QP_PACKED qgf_palette_v1_t { +typedef struct PACKED qgf_palette_v1_t { qgf_block_header_v1_t header; // = { .type_id = 0x03, .neg_type_id = (~0x03), .length = (N * 3 * sizeof(uint8_t)) } qgf_palette_entry_v1_t hsv[0]; // N * hsv, where N is the number of palette entries depending on the frame format in the descriptor } qgf_palette_v1_t; @@ -103,7 +103,7 @@ STATIC_ASSERT(sizeof(qgf_palette_v1_t) == sizeof(qgf_block_header_v1_t), "qgf_pa #define QGF_FRAME_DELTA_DESCRIPTOR_TYPEID 0x04 -typedef struct QP_PACKED qgf_delta_v1_t { +typedef struct PACKED qgf_delta_v1_t { qgf_block_header_v1_t header; // = { .type_id = 0x04, .neg_type_id = (~0x04), .length = 8 } uint16_t left; // The left pixel location to draw the delta image uint16_t top; // The top pixel location to draw the delta image @@ -118,7 +118,7 @@ STATIC_ASSERT(sizeof(qgf_delta_v1_t) == (sizeof(qgf_block_header_v1_t) + 8), "qg #define QGF_FRAME_DATA_DESCRIPTOR_TYPEID 0x05 -typedef struct QP_PACKED qgf_data_v1_t { +typedef struct PACKED qgf_data_v1_t { qgf_block_header_v1_t header; // = { .type_id = 0x05, .neg_type_id = (~0x05), .length = N } uint8_t data[0]; // 0 signifies that this struct is immediately followed by the length of data specified in the header } qgf_data_v1_t; diff --git a/quantum/painter/qp_draw_core.c b/quantum/painter/qp_draw_core.c index 852abb19e8..3958045943 100644 --- a/quantum/painter/qp_draw_core.c +++ b/quantum/painter/qp_draw_core.c @@ -52,7 +52,7 @@ bool qp_internal_setpixel_impl(painter_device_t device, uint16_t x, uint16_t y) void qp_internal_fill_pixdata(painter_device_t device, uint32_t num_pixels, uint8_t hue, uint8_t sat, uint8_t val) { painter_driver_t *driver = (painter_driver_t *)device; uint32_t pixels_in_pixdata = qp_internal_num_pixels_in_buffer(device); - num_pixels = QP_MIN(pixels_in_pixdata, num_pixels); + num_pixels = MIN(pixels_in_pixdata, num_pixels); // Convert the color to native pixel format qp_pixel_t color = {.hsv888 = {.h = hue, .s = sat, .v = val}}; @@ -232,17 +232,17 @@ bool qp_internal_fillrect_helper_impl(painter_device_t device, uint16_t left, ui uint32_t pixels_in_pixdata = qp_internal_num_pixels_in_buffer(device); painter_driver_t *driver = (painter_driver_t *)device; - uint16_t l = QP_MIN(left, right); - uint16_t r = QP_MAX(left, right); - uint16_t t = QP_MIN(top, bottom); - uint16_t b = QP_MAX(top, bottom); + uint16_t l = MIN(left, right); + uint16_t r = MAX(left, right); + uint16_t t = MIN(top, bottom); + uint16_t b = MAX(top, bottom); uint16_t w = r - l + 1; uint16_t h = b - t + 1; uint32_t remaining = w * h; driver->driver_vtable->viewport(device, l, t, r, b); while (remaining > 0) { - uint32_t transmit = QP_MIN(remaining, pixels_in_pixdata); + uint32_t transmit = MIN(remaining, pixels_in_pixdata); if (!driver->driver_vtable->pixdata(device, qp_internal_global_pixdata_buffer, transmit)) { return false; } @@ -260,10 +260,10 @@ bool qp_rect(painter_device_t device, uint16_t left, uint16_t top, uint16_t righ } // Cater for cases where people have submitted the coordinates backwards - uint16_t l = QP_MIN(left, right); - uint16_t r = QP_MAX(left, right); - uint16_t t = QP_MIN(top, bottom); - uint16_t b = QP_MAX(top, bottom); + uint16_t l = MIN(left, right); + uint16_t r = MAX(left, right); + uint16_t t = MIN(top, bottom); + uint16_t b = MAX(top, bottom); uint16_t w = r - l + 1; uint16_t h = b - t + 1; @@ -281,7 +281,7 @@ bool qp_rect(painter_device_t device, uint16_t left, uint16_t top, uint16_t righ ret = qp_internal_fillrect_helper_impl(device, l, t, r, b); } else { // Fill up the pixdata buffer with the required number of native pixels - qp_internal_fill_pixdata(device, QP_MAX(w, h), hue, sat, val); + qp_internal_fill_pixdata(device, MAX(w, h), hue, sat, val); // Draw 4x filled single-width rects to create an outline if (!qp_internal_fillrect_helper_impl(device, l, t, r, t) || !qp_internal_fillrect_helper_impl(device, l, b, r, b) || !qp_internal_fillrect_helper_impl(device, l, t + 1, l, b - 1) || !qp_internal_fillrect_helper_impl(device, r, t + 1, r, b - 1)) { diff --git a/quantum/painter/qp_draw_ellipse.c b/quantum/painter/qp_draw_ellipse.c index 9e77bca8b0..22f019d179 100644 --- a/quantum/painter/qp_draw_ellipse.c +++ b/quantum/painter/qp_draw_ellipse.c @@ -75,7 +75,7 @@ bool qp_ellipse(painter_device_t device, uint16_t x, uint16_t y, uint16_t sizex, int16_t dx = 0; int16_t dy = ((int16_t)sizey); - qp_internal_fill_pixdata(device, QP_MAX(sizex, sizey), hue, sat, val); + qp_internal_fill_pixdata(device, MAX(sizex, sizey), hue, sat, val); if (!qp_comms_start(device)) { qp_dprintf("qp_ellipse: fail (could not start comms)\n"); diff --git a/quantum/painter/qp_internal.h b/quantum/painter/qp_internal.h index e7a6d113c5..52b1b5c69d 100644 --- a/quantum/painter/qp_internal.h +++ b/quantum/painter/qp_internal.h @@ -5,17 +5,11 @@ #include "quantum.h" #include "qp.h" +#include "util.h" // PACKED/MIN/MAX //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Helpers -// Mark certain types that there should be no padding bytes between members. -#define QP_PACKED __attribute__((packed)) - -// Min/max defines -#define QP_MIN(X, Y) (((X) < (Y)) ? (X) : (Y)) -#define QP_MAX(X, Y) (((X) > (Y)) ? (X) : (Y)) - #ifdef QUANTUM_PAINTER_DEBUG # include # include diff --git a/quantum/painter/qp_internal_formats.h b/quantum/painter/qp_internal_formats.h index bd7105cab2..28cff0cd61 100644 --- a/quantum/painter/qp_internal_formats.h +++ b/quantum/painter/qp_internal_formats.h @@ -3,6 +3,7 @@ #pragma once +#include "color.h" #include "compiler_support.h" #include "qp_internal.h" @@ -10,21 +11,13 @@ // Quantum Painter pixel formats // Datatype containing a pixel's color. The internal member used is dependent on the external context. -typedef union QP_PACKED qp_pixel_t { +typedef union PACKED qp_pixel_t { uint8_t mono; uint8_t palette_idx; - struct QP_PACKED { - uint8_t h; - uint8_t s; - uint8_t v; - } hsv888; + hsv_t hsv888; - struct QP_PACKED { - uint8_t r; - uint8_t g; - uint8_t b; - } rgb888; + rgb_t rgb888; uint16_t rgb565; diff --git a/quantum/painter/rules.mk b/quantum/painter/rules.mk index 10c2698092..2c5bc17eed 100644 --- a/quantum/painter/rules.mk +++ b/quantum/painter/rules.mk @@ -247,7 +247,8 @@ ifeq ($(strip $(QUANTUM_PAINTER_NEEDS_SURFACE)), yes) SRC += \ $(DRIVER_PATH)/painter/generic/qp_surface_common.c \ $(DRIVER_PATH)/painter/generic/qp_surface_mono1bpp.c \ - $(DRIVER_PATH)/painter/generic/qp_surface_rgb565.c + $(DRIVER_PATH)/painter/generic/qp_surface_rgb565.c \ + $(DRIVER_PATH)/painter/generic/qp_surface_rgb888.c endif # If dummy comms is needed, set up the required files From 0aae222ab6fd15355e5bc3b113b05484373cc8b1 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Wed, 8 Oct 2025 08:00:50 -0600 Subject: [PATCH 56/95] Fixup `kprepublic/bm60hsrgb_poker/rev2` (#25649) Fixup kprepublic/bm60hsrgb/rev2 - Remove RGBLight configuration and throw error if RGBLight & RGB Matrix are enabled together - the WS2812 driver cannot be used for RGBLight as it is being used by this keyboard's custom RGB Matrix driver - Migrate RGB Matrix configuration to DD - Migrate default keymap to JSON - Use short SPDX license headers --- .../kprepublic/bm60hsrgb_poker/rev2/config.h | 28 +----- .../bm60hsrgb_poker/rev2/keyboard.json | 93 ++++++++++++++----- .../rev2/keymaps/default/keymap.c | 35 ------- .../rev2/keymaps/default/keymap.json | 21 +++++ .../kprepublic/bm60hsrgb_poker/rev2/rev2.c | 69 ++------------ .../kprepublic/bm60hsrgb_poker/rev2/rules.mk | 6 +- 6 files changed, 103 insertions(+), 149 deletions(-) delete mode 100644 keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/default/keymap.c create mode 100644 keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/default/keymap.json diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h index 843c5b2625..52d273230f 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h @@ -1,29 +1,7 @@ -/* Copyright 2021 bdtc123 - * - * 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 bdtc123 +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND #define IS31FL3733_LED_COUNT 61 - -// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them; -// don't use those LEDs in RGB Matrix in that case. -#ifdef RGBLIGHT_ENABLE -# define WS2812_LED_COUNT 0 -#else -# define WS2812_LED_COUNT 6 -#endif - -#define RGB_MATRIX_LED_COUNT (IS31FL3733_LED_COUNT + WS2812_LED_COUNT) +#define WS2812_LED_COUNT 6 diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/keyboard.json b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keyboard.json index f3edf59fec..e5bb84c8ff 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/keyboard.json +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keyboard.json @@ -56,29 +56,78 @@ "solid_multisplash": true }, "driver": "custom", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 11, "y": 32, "flags": 9}, + {"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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 198, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 18, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 30, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 60, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 105, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 120, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 135, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 150, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 165, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 191, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"x": 28, "y": 40, "flags": 2}, + {"x": 62, "y": 40, "flags": 2}, + {"x": 96, "y": 40, "flags": 2}, + {"x": 130, "y": 40, "flags": 2}, + {"x": 164, "y": 40, "flags": 2}, + {"x": 198, "y": 40, "flags": 2} + ], "max_brightness": 120, "sleep": true }, - "rgblight": { - "saturation_steps": 8, - "brightness_steps": 8, - "led_count": 6, - "max_brightness": 150, - "animations": { - "breathing": true, - "rainbow_mood": true, - "rainbow_swirl": true, - "snake": true, - "knight": true, - "christmas": true, - "static_gradient": true, - "rgb_test": true, - "alternating": true - }, - "default": { - "animation": "rainbow_mood" - } - }, "matrix_pins": { "cols": ["B2", "B3", "B7", "B0", "B1", "F7", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7"], "rows": ["E6", "D2", "D3", "D5", "F6"] @@ -114,7 +163,6 @@ {"matrix": [0, 11], "x": 11, "y": 0}, {"matrix": [0, 12], "x": 12, "y": 0}, {"matrix": [0, 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}, @@ -129,7 +177,6 @@ {"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}, @@ -143,7 +190,6 @@ {"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, 1], "x": 2.25, "y": 3}, {"matrix": [3, 2], "x": 3.25, "y": 3}, @@ -156,7 +202,6 @@ {"matrix": [3, 9], "x": 10.25, "y": 3}, {"matrix": [3, 10], "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.25}, {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/default/keymap.c deleted file mode 100644 index 637d49d467..0000000000 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/default/keymap.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2021 bdtc123 - * - * 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_60_ansi( - 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_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, MO(1), KC_RGUI, KC_RCTL - ), - [1] = LAYOUT_60_ansi( - _______, 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, - _______, RM_TOGG, RM_NEXT, RM_HUEU, RM_HUED, RM_SATU, RM_SATD, RM_VALU, RM_VALD, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ - ), - -}; diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/default/keymap.json b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/default/keymap.json new file mode 100644 index 0000000000..98e6b5a609 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/keymaps/default/keymap.json @@ -0,0 +1,21 @@ +{ + "keyboard": "kprepublic/bm60hsrgb_poker/rev2", + "keymap": "default", + "layout": "LAYOUT_60_ansi", + "layers": [ + [ + "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_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", "MO(1)", "KC_RGUI", "KC_RCTL" + ], + [ + "_______", "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", + "_______", "RM_TOGG", "RM_NEXT", "RM_HUEU", "RM_HUED", "RM_SATU", "RM_SATD", "RM_VALU", "RM_VALD", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "NK_TOGG", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c index 5766942b34..865754b423 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c @@ -1,26 +1,18 @@ -/* Copyright 2021 bdtc123 - * - * 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 bdtc123 +// SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" +#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) +# error "RGBLight must not be enabled due to this keyboard's custom RGB Matrix driver" +#endif + #ifdef RGB_MATRIX_ENABLE # include "i2c_master.h" # include "is31fl3733.h" # include "ws2812.h" +// clang-format off const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW2_CS1, SW1_CS1, SW3_CS1 }, { 0, SW2_CS2, SW1_CS2, SW3_CS2 }, @@ -88,44 +80,7 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW11_CS12, SW10_CS12, SW12_CS12 }, { 0, SW5_CS16, SW4_CS16, SW6_CS16 } }; - -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, NO_LED, 40 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, NO_LED, 52 }, - { 53, 54, 55, NO_LED, NO_LED, 56, NO_LED, NO_LED, NO_LED, 57, 58, 59, NO_LED, 60 } - }, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 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 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 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 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 } -# if WS2812_LED_COUNT > 0 - ,{ 28, 40}, { 62, 40}, { 96, 40}, {130, 40}, {164, 40}, {198, 40} -# endif -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 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 - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1 -# if WS2812_LED_COUNT > 0 - ,2, 2, 2, 2, 2, 2 -# endif - } -}; +// clang-format on bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { @@ -137,8 +92,6 @@ bool rgb_matrix_indicators_kb(void) { return true; } -// clang-format on - // ========================================================================== // Custom RGB Matrix driver that combines IS31FL3733 and WS2812 // ========================================================================== @@ -156,26 +109,20 @@ static void rgb_matrix_driver_init(void) { static void rgb_matrix_driver_flush(void) { is31fl3733_update_pwm_buffers(0); -# if WS2812_LED_COUNT > 0 ws2812_flush(); -# endif } static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { if (index < IS31FL3733_LED_COUNT) { is31fl3733_set_color(index, red, green, blue); -# if WS2812_LED_COUNT > 0 } else { ws2812_set_color(index - IS31FL3733_LED_COUNT, red, green, blue); -# endif } } static void rgb_matrix_driver_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { is31fl3733_set_color_all(red, green, blue); -# if WS2812_LED_COUNT > 0 ws2812_set_color_all(red, green, blue); -# endif } // clang-format off diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rules.mk b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rules.mk index 7012deda8c..bb6c11ea53 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rules.mk +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rules.mk @@ -1,7 +1,5 @@ -# The custom RGB Matrix driver combines IS31FL3733 and WS2812; things that are -# normally done by common_features.mk for both of these drivers need to be done -# here manually. +WS2812_DRIVER_REQUIRED = yes + COMMON_VPATH += $(DRIVER_PATH)/led/issi SRC += is31fl3733.c I2C_DRIVER_REQUIRED = yes -WS2812_DRIVER_REQUIRED = yes From 7dca4e8bda2031c7fa2c85fc9c7a5557e24256df Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Wed, 8 Oct 2025 08:01:08 -0600 Subject: [PATCH 57/95] Fixup `kprepublic/bm60hsrgb_iso/rev2` (#25648) Fixup kprepublic/bm60hsrgb_iso/rev2 - Remove RGBLight configuration and throw error if RGBLight & RGB Matrix are enabled together - the WS2812 driver cannot be used for RGBLight as it is being used by this keyboard's custom RGB Matrix driver - Migrate RGB Matrix configuration to DD - Migrate default keymap to JSON - Use short SPDX license headers --- .../kprepublic/bm60hsrgb_iso/rev2/config.h | 32 +----- .../bm60hsrgb_iso/rev2/keyboard.json | 97 ++++++++++++++----- .../rev2/keymaps/default/keymap.c | 34 ------- .../rev2/keymaps/default/keymap.json | 21 ++++ .../kprepublic/bm60hsrgb_iso/rev2/rev2.c | 72 ++------------ .../kprepublic/bm60hsrgb_iso/rev2/rules.mk | 6 +- 6 files changed, 110 insertions(+), 152 deletions(-) delete mode 100644 keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.c create mode 100644 keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.json diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h index 710e240aa4..1567ce3eb1 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h @@ -1,31 +1,9 @@ -/* Copyright 2021 bdtc123 - * Copyright 2021 sigprof - * Copyright 2021 peepeetee - * - * 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 bdtc123 +// Copyright 2021 sigprof +// Copyright 2021 peepeetee +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND #define IS31FL3733_LED_COUNT 64 - -// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them; -// don't use those LEDs in RGB Matrix in that case. -#ifdef RGBLIGHT_ENABLE -# define WS2812_LED_COUNT 0 -#else -# define WS2812_LED_COUNT 6 -#endif - -#define RGB_MATRIX_LED_COUNT (IS31FL3733_LED_COUNT + WS2812_LED_COUNT) +#define WS2812_LED_COUNT 6 diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/keyboard.json b/keyboards/kprepublic/bm60hsrgb_iso/rev2/keyboard.json index 3a0df3e414..fec641b886 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/keyboard.json +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/keyboard.json @@ -59,30 +59,81 @@ "animation": "cycle_all" }, "driver": "custom", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 11, "y": 32, "flags": 9}, + {"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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 198, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 3, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 22, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 33, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 63, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 78, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 93, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 108, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 123, "y": 48, "flags": 4}, + {"x": 138, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 153, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 168, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 194, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 213, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"x": 28, "y": 40, "flags": 2}, + {"x": 62, "y": 40, "flags": 2}, + {"x": 96, "y": 40, "flags": 2}, + {"x": 130, "y": 40, "flags": 2}, + {"x": 164, "y": 40, "flags": 2}, + {"x": 198, "y": 40, "flags": 2} + ], "max_brightness": 180, "sleep": true }, - "rgblight": { - "saturation_steps": 8, - "brightness_steps": 8, - "led_count": 6, - "max_brightness": 150, - "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 - }, - "default": { - "animation": "rainbow_mood" - } - }, "matrix_pins": { "cols": ["B2", "B3", "B7", "B0", "B1", "F7", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7"], "rows": ["E6", "D2", "D3", "D5", "F6"] @@ -118,7 +169,6 @@ {"matrix": [0, 11], "x": 11, "y": 0}, {"matrix": [0, 12], "x": 12, "y": 0}, {"matrix": [0, 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}, @@ -132,7 +182,6 @@ {"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": [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}, @@ -147,7 +196,6 @@ {"matrix": [2, 11], "x": 11.75, "y": 2}, {"matrix": [2, 12], "x": 12.75, "y": 2}, {"matrix": [1, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, - {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, {"matrix": [4, 3], "x": 1.25, "y": 3}, {"matrix": [3, 1], "x": 2.25, "y": 3}, @@ -162,7 +210,6 @@ {"matrix": [3, 11], "x": 11.25, "y": 3, "w": 1.75}, {"matrix": [3, 12], "x": 13, "y": 3}, {"matrix": [3, 13], "x": 14, "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}, diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.c deleted file mode 100644 index f3aa8083f1..0000000000 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 markva - * Copyright 2021 bdtc123 - * - * 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_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_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( - _______, 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, - _______, RM_TOGG, RM_NEXT, RM_HUEU, RM_HUED, RM_SATU, RM_SATD, RM_VALU, RM_VALD, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END - ) -}; diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.json b/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.json new file mode 100644 index 0000000000..ea074ba006 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/keymaps/default/keymap.json @@ -0,0 +1,21 @@ +{ + "keyboard": "kprepublic/bm60hsrgb_iso/rev2", + "keymap": "default", + "layout": "LAYOUT_60_iso_arrow", + "layers": [ + [ + "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_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" + ], + [ + "_______", "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", + "_______", "RM_TOGG", "RM_NEXT", "RM_HUEU", "RM_HUED", "RM_SATU", "RM_SATD", "RM_VALU", "RM_VALD", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "NK_TOGG", "_______", "_______", "_______", "_______", "KC_PGUP", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "KC_HOME", "KC_PGDN", "KC_END" + ] + ] +} diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c index 0d52d1bacb..9e617bb8ef 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c @@ -1,29 +1,20 @@ -/* Copyright 2021 bdtc123 - * Copyright 2021 sigprof - * Copyright 2021 peepeetee - * - * 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 bdtc123 +// Copyright 2021 sigprof +// Copyright 2021 peepeetee +// SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" +#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) +# error "RGBLight must not be enabled due to this keyboard's custom RGB Matrix driver" +#endif + #ifdef RGB_MATRIX_ENABLE # include "i2c_master.h" # include "is31fl3733.h" # include "ws2812.h" - +// clang-format off const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW2_CS1, SW1_CS1, SW3_CS1 }, { 0, SW2_CS2, SW1_CS2, SW3_CS2 }, @@ -94,42 +85,7 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW2_CS15, SW1_CS15, SW3_CS15 }, { 0, SW5_CS16, SW4_CS16, SW6_CS16 } }; - -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,NO_LED}, - { 41, 58, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54 }, - { 55, 56, 57,NO_LED,NO_LED, 58,NO_LED,NO_LED,NO_LED, 59, 60, 61, 62, 63 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 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 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 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 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, <, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 3, 48 }, { 22, 48 }, { 33, 48 }, { 48, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 194, 48 }, { 213, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 } -# if WS2812_LED_COUNT > 0 - ,{ 28, 40}, { 62, 40}, { 96, 40}, {130, 40}, {164, 40}, {198, 40} -# endif -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 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, [, ], Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ',# - 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - // LShift,backslash, Z, X, C, V, B, N, M, ,, ., Shift, Up, / - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1 -# if WS2812_LED_COUNT > 0 - ,2, 2, 2, 2, 2, 2 -# endif -} }; +// clang-format on bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { @@ -141,8 +97,6 @@ bool rgb_matrix_indicators_kb(void) { return true; } -// clang-format on - // ========================================================================== // Custom RGB Matrix driver that combines IS31FL3733 and WS2812 // ========================================================================== @@ -160,26 +114,20 @@ static void rgb_matrix_driver_init(void) { static void rgb_matrix_driver_flush(void) { is31fl3733_update_pwm_buffers(0); -# if WS2812_LED_COUNT > 0 ws2812_flush(); -# endif } static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { if (index < IS31FL3733_LED_COUNT) { is31fl3733_set_color(index, red, green, blue); -# if WS2812_LED_COUNT > 0 } else { ws2812_set_color(index - IS31FL3733_LED_COUNT, red, green, blue); -# endif } } static void rgb_matrix_driver_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { is31fl3733_set_color_all(red, green, blue); -# if WS2812_LED_COUNT > 0 ws2812_set_color_all(red, green, blue); -# endif } // clang-format off diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk index 7012deda8c..bb6c11ea53 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk @@ -1,7 +1,5 @@ -# The custom RGB Matrix driver combines IS31FL3733 and WS2812; things that are -# normally done by common_features.mk for both of these drivers need to be done -# here manually. +WS2812_DRIVER_REQUIRED = yes + COMMON_VPATH += $(DRIVER_PATH)/led/issi SRC += is31fl3733.c I2C_DRIVER_REQUIRED = yes -WS2812_DRIVER_REQUIRED = yes From 9f1a7380ab37d7887e33d726eb6f6f678cba3c6f Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Wed, 8 Oct 2025 08:01:26 -0600 Subject: [PATCH 58/95] Fixup `kprepublic/bm60hsrgb/rev2` (#25644) * Fixup kprepublic/bm60hsrgb/rev2 - Remove RGBLight configuration and throw error if RGBLight & RGB Matrix are enabled together - the WS2812 driver cannot be used for RGBLight as it is being used by this keyboard's custom RGB Matrix driver - Migrate RGB Matrix configuration to DD - Migrate default keymap to JSON - Use short SPDX license headers * Fix OOB coordinate --- keyboards/kprepublic/bm60hsrgb/rev2/config.h | 28 +----- .../kprepublic/bm60hsrgb/rev2/keyboard.json | 96 ++++++++++++++----- .../bm60hsrgb/rev2/keymaps/default/keymap.c | 35 ------- .../rev2/keymaps/default/keymap.json | 21 ++++ keyboards/kprepublic/bm60hsrgb/rev2/rev2.c | 74 ++------------ 5 files changed, 105 insertions(+), 149 deletions(-) delete mode 100644 keyboards/kprepublic/bm60hsrgb/rev2/keymaps/default/keymap.c create mode 100644 keyboards/kprepublic/bm60hsrgb/rev2/keymaps/default/keymap.json diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/config.h b/keyboards/kprepublic/bm60hsrgb/rev2/config.h index 98858cd164..c3fca3563e 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb/rev2/config.h @@ -1,29 +1,7 @@ -/* Copyright 2021 bdtc123 - * - * 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 bdtc123 +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND #define IS31FL3733_LED_COUNT 63 - -// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them; -// don't use those LEDs in RGB Matrix in that case. -#ifdef RGBLIGHT_ENABLE -# define WS2812_LED_COUNT 0 -#else -# define WS2812_LED_COUNT 6 -#endif - -#define RGB_MATRIX_LED_COUNT (IS31FL3733_LED_COUNT + WS2812_LED_COUNT) +#define WS2812_LED_COUNT 6 diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/keyboard.json b/keyboards/kprepublic/bm60hsrgb/rev2/keyboard.json index 3783ebb8b2..88d4c5d9ce 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev2/keyboard.json +++ b/keyboards/kprepublic/bm60hsrgb/rev2/keyboard.json @@ -51,30 +51,80 @@ "solid_multisplash": true }, "driver": "custom", + "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": 135, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 150, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 165, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 180, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 202, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 7, "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": 206, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 11, "y": 32, "flags": 9}, + {"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": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 198, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 18, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 30, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 45, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 60, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 105, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 120, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 135, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 150, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 191, "y": 48, "flags": 1}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 3, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 33, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 101, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 135, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 153, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 195, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 210, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}, + {"x": 28, "y": 40, "flags": 2}, + {"x": 62, "y": 40, "flags": 2}, + {"x": 96, "y": 40, "flags": 2}, + {"x": 130, "y": 40, "flags": 2}, + {"x": 164, "y": 40, "flags": 2}, + {"x": 198, "y": 40, "flags": 2} + ], "max_brightness": 120, "sleep": true }, - "rgblight": { - "saturation_steps": 8, - "brightness_steps": 8, - "led_count": 6, - "max_brightness": 150, - "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 - }, - "default": { - "animation": "rainbow_mood" - } - }, "matrix_pins": { "cols": ["B2", "B3", "B7", "B0", "B1", "F7", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7"], "rows": ["E6", "D2", "D3", "D5", "F6"] @@ -110,7 +160,6 @@ {"matrix": [0, 11], "x": 11, "y": 0}, {"matrix": [0, 12], "x": 12, "y": 0}, {"matrix": [0, 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}, @@ -125,7 +174,6 @@ {"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}, @@ -139,7 +187,6 @@ {"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, 1], "x": 2.25, "y": 3}, {"matrix": [3, 2], "x": 3.25, "y": 3}, @@ -153,7 +200,6 @@ {"matrix": [3, 11], "x": 11.25, "y": 3, "w": 1.75}, {"matrix": [3, 12], "x": 13, "y": 3}, {"matrix": [3, 13], "x": 14, "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}, diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm60hsrgb/rev2/keymaps/default/keymap.c deleted file mode 100644 index 7b6d1ae693..0000000000 --- a/keyboards/kprepublic/bm60hsrgb/rev2/keymaps/default/keymap.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2021 bdtc123 - * Copyright 2022 peepeetee - * - * 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_60_ansi_arrow( - 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_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_ansi_arrow( - _______, 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, - _______, RM_TOGG, RM_NEXT, RM_HUEU, RM_HUED, RM_SATU, RM_SATD, RM_VALU, RM_VALD, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) - -}; diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/keymaps/default/keymap.json b/keyboards/kprepublic/bm60hsrgb/rev2/keymaps/default/keymap.json new file mode 100644 index 0000000000..caf08550a0 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb/rev2/keymaps/default/keymap.json @@ -0,0 +1,21 @@ +{ + "keyboard": "kprepublic/bm60hsrgb/rev2", + "keymap": "default", + "layout": "LAYOUT_60_ansi_arrow", + "layers": [ + [ + "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_RSFT", "KC_UP", "KC_SLSH", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "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", "QK_BOOT", + "_______", "RM_TOGG", "RM_NEXT", "RM_HUEU", "RM_HUED", "RM_SATU", "RM_SATD", "RM_VALU", "RM_VALD", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "NK_TOGG", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c index e7ff5a9ddc..b0e68a8cd6 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c @@ -1,27 +1,19 @@ -/* Copyright 2021 bdtc123 - * Copyright 2021 sigprof - * - * 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 bdtc123 +// Copyright 2021 sigprof +// SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" +#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) +# error "RGBLight must not be enabled due to this keyboard's custom RGB Matrix driver" +#endif + #ifdef RGB_MATRIX_ENABLE # include "i2c_master.h" # include "is31fl3733.h" # include "ws2812.h" +// clang-format off const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW2_CS1, SW1_CS1, SW3_CS1 }, { 0, SW2_CS2, SW1_CS2, SW3_CS2 }, @@ -91,44 +83,7 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW2_CS16, SW1_CS16, SW3_CS16 }, { 0, SW5_CS16, SW4_CS16, SW6_CS16 } }; - -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, NO_LED, 40 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, NO_LED, 51, 52, 53 }, - { 54, 55, 56, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 58, 59, 60, 61, 62 } - }, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 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 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 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 }, - // Capslock, A, S, D, F, G, H, A, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 } -# if WS2812_LED_COUNT > 0 - ,{ 28, 40}, { 62, 40}, { 96, 40}, {130, 40}, {164, 40}, {198, 40} -# endif -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 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, [, ], - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - // Capslock, A, S, D, F, G, H, A, K, L, ;, ', Enter - 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, ? - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1 -# if WS2812_LED_COUNT > 0 - ,2, 2, 2, 2, 2, 2 -# endif - } -}; +// clang-format on bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { @@ -140,9 +95,6 @@ bool rgb_matrix_indicators_kb(void) { return true; } - -// clang-format on - // ========================================================================== // Custom RGB Matrix driver that combines IS31FL3733 and WS2812 // ========================================================================== @@ -160,26 +112,20 @@ static void rgb_matrix_driver_init(void) { static void rgb_matrix_driver_flush(void) { is31fl3733_update_pwm_buffers(0); -# if WS2812_LED_COUNT > 0 ws2812_flush(); -# endif } static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { if (index < IS31FL3733_LED_COUNT) { is31fl3733_set_color(index, red, green, blue); -# if WS2812_LED_COUNT > 0 } else { ws2812_set_color(index - IS31FL3733_LED_COUNT, red, green, blue); -# endif } } static void rgb_matrix_driver_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { is31fl3733_set_color_all(red, green, blue); -# if WS2812_LED_COUNT > 0 - ws2812_set_color_all(red, green, blue); -# endif + ws2812_set_color_all(red, green, blue); } // clang-format off From 08405df1505293acb9a4e89bcf98935d78902094 Mon Sep 17 00:00:00 2001 From: Marek Schmitt <62243375+mawaeg@users.noreply.github.com> Date: Sat, 11 Oct 2025 06:45:17 +0200 Subject: [PATCH 59/95] Add new macropad Sharkropad (#24961) --- keyboards/mawaeg/sharkropad/chconf.h | 22 +++ keyboards/mawaeg/sharkropad/config.h | 30 ++++ keyboards/mawaeg/sharkropad/halconf.h | 22 +++ keyboards/mawaeg/sharkropad/keyboard.json | 136 ++++++++++++++++++ .../sharkropad/keymaps/default/keymap.c | 45 ++++++ .../sharkropad/keymaps/default/rules.mk | 1 + keyboards/mawaeg/sharkropad/mcuconf.h | 28 ++++ keyboards/mawaeg/sharkropad/readme.md | 24 ++++ keyboards/mawaeg/sharkropad/sharkropad.c | 90 ++++++++++++ 9 files changed, 398 insertions(+) create mode 100644 keyboards/mawaeg/sharkropad/chconf.h create mode 100644 keyboards/mawaeg/sharkropad/config.h create mode 100644 keyboards/mawaeg/sharkropad/halconf.h create mode 100644 keyboards/mawaeg/sharkropad/keyboard.json create mode 100644 keyboards/mawaeg/sharkropad/keymaps/default/keymap.c create mode 100644 keyboards/mawaeg/sharkropad/keymaps/default/rules.mk create mode 100644 keyboards/mawaeg/sharkropad/mcuconf.h create mode 100644 keyboards/mawaeg/sharkropad/readme.md create mode 100644 keyboards/mawaeg/sharkropad/sharkropad.c diff --git a/keyboards/mawaeg/sharkropad/chconf.h b/keyboards/mawaeg/sharkropad/chconf.h new file mode 100644 index 0000000000..c0a2323234 --- /dev/null +++ b/keyboards/mawaeg/sharkropad/chconf.h @@ -0,0 +1,22 @@ +/* Copyright 2025 @mawaeg + * + * 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 CH_CFG_ST_RESOLUTION 16 +#define CH_CFG_ST_FREQUENCY 10000 + +#include_next diff --git a/keyboards/mawaeg/sharkropad/config.h b/keyboards/mawaeg/sharkropad/config.h new file mode 100644 index 0000000000..2e57c56f0f --- /dev/null +++ b/keyboards/mawaeg/sharkropad/config.h @@ -0,0 +1,30 @@ +/* Copyright 2025 @mawaeg + * + * 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 STM32_FLASH_SECTORS_PER_BANK 128 + +#define I2C1_SCL_PIN A9 +#define I2C1_SDA_PIN A10 + +#define WS2812_PWM_DRIVER PWMD2 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_PWM_DMA_CHANNEL 4 + +#define RGB_MATRIX_MODE_NAME_ENABLE diff --git a/keyboards/mawaeg/sharkropad/halconf.h b/keyboards/mawaeg/sharkropad/halconf.h new file mode 100644 index 0000000000..9f0b573732 --- /dev/null +++ b/keyboards/mawaeg/sharkropad/halconf.h @@ -0,0 +1,22 @@ +/* Copyright 2025 @mawaeg + * + * 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_I2C TRUE +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/mawaeg/sharkropad/keyboard.json b/keyboards/mawaeg/sharkropad/keyboard.json new file mode 100644 index 0000000000..c262d3e3cc --- /dev/null +++ b/keyboards/mawaeg/sharkropad/keyboard.json @@ -0,0 +1,136 @@ +{ + "manufacturer": "mawaeg", + "keyboard_name": "Sharkropad", + "maintainer": "mawaeg", + "bootloader": "stm32-dfu", + "bootmagic": { + "matrix": [0, 3] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "A0", "pin_b": "A1"} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "nkro": true, + "oled": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["B1", "B0", "A4", "A2"], + "rows": ["A3", "A7", "A6", "A5"] + }, + "processor": "STM32L432", + "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 + }, + "default": { + "animation": "cycle_up_down" + }, + "driver": "ws2812", + "layout": [ + {"matrix": [1, 0], "x": 189, "y": 27, "flags": 4}, + {"matrix": [1, 1], "x": 137, "y": 27, "flags": 4}, + {"matrix": [1, 2], "x": 86, "y": 27, "flags": 4}, + {"matrix": [1, 3], "x": 35, "y": 27, "flags": 4}, + {"matrix": [2, 0], "x": 189, "y": 41, "flags": 4}, + {"matrix": [2, 1], "x": 137, "y": 41, "flags": 4}, + {"matrix": [2, 2], "x": 86, "y": 41, "flags": 4}, + {"matrix": [2, 3], "x": 35, "y": 41, "flags": 4}, + {"matrix": [3, 0], "x": 189, "y": 55, "flags": 4}, + {"matrix": [3, 1], "x": 137, "y": 55, "flags": 4}, + {"matrix": [3, 2], "x": 86, "y": 55, "flags": 4}, + {"matrix": [3, 3], "x": 35, "y": 55, "flags": 4}, + {"x": 76, "y": 3, "flags": 2}, + {"x": 148, "y": 3, "flags": 2}, + {"x": 216, "y": 17, "flags": 2}, + {"x": 216, "y": 45, "flags": 2}, + {"x": 224, "y": 61, "flags": 2}, + {"x": 60, "y": 61, "flags": 2}, + {"x": 8, "y": 45, "flags": 2}, + {"x": 8, "y": 17, "flags": 2} + ], + "max_brightness": 180 + }, + "url": "https://github.com/mawaeg/sharkropad", + "usb": { + "device_version": "1.0.0", + "pid": "0xAFFE", + "vid": "0x6D73" + }, + "ws2812": { + "driver": "pwm", + "pin": "B3" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"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/mawaeg/sharkropad/keymaps/default/keymap.c b/keyboards/mawaeg/sharkropad/keymaps/default/keymap.c new file mode 100644 index 0000000000..6a95257a1c --- /dev/null +++ b/keyboards/mawaeg/sharkropad/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2025 @mawaeg + * + * 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 + /* + * ┌────────────┐ + * │ RGB_MOD │ + * ┌───┬───┬───┼────────────┤ + * │ 7 │ 8 │ 9 │ RGB_TOGGLE │ + * ├───┼───┼───┼────────────┤ + * │ 4 │ 5 │ 6 │ NUM │ + * ├───┼───┼───┼────────────┤ + * │ 1 │ 2 │ 3 │ 0 │ + * └───┴───┴───┴────────────┘ + */ + [0] = LAYOUT( + RM_NEXT, + KC_P7, KC_P8, KC_P9, RM_TOGG, + KC_P4, KC_P5, KC_P6, KC_NUM, + KC_P1, KC_P2, KC_P3, KC_P0 + ) + // clang-format on +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(RM_SPDD, RM_SPDU)}, +}; +#endif diff --git a/keyboards/mawaeg/sharkropad/keymaps/default/rules.mk b/keyboards/mawaeg/sharkropad/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/mawaeg/sharkropad/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/mawaeg/sharkropad/mcuconf.h b/keyboards/mawaeg/sharkropad/mcuconf.h new file mode 100644 index 0000000000..2a66cc8d7b --- /dev/null +++ b/keyboards/mawaeg/sharkropad/mcuconf.h @@ -0,0 +1,28 @@ +/* Copyright 2025 @mawaeg + * + * 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_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 15 diff --git a/keyboards/mawaeg/sharkropad/readme.md b/keyboards/mawaeg/sharkropad/readme.md new file mode 100644 index 0000000000..d6faf506c5 --- /dev/null +++ b/keyboards/mawaeg/sharkropad/readme.md @@ -0,0 +1,24 @@ +# sharkropad + +![sharkropad](https://i.imgur.com/qatvstX.jpeg) + +**Sharkropad** is an open-source hotswappable macropad. + +* Keyboard Maintainer: [Marek Schmitt](https://github.com/mawaeg) +* Hardware Supported: PCB included in the [Sharkropad repository](https://github.com/mawaeg/sharkropad). +* Hardware Availability: PCB has to be sourced yourserlf + +Make example for this keyboard (after setting up your build environment): + + make mawaeg/sharkropad:default + +Flashing example for this keyboard: + + make mawaeg/sharkropad: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: +* **Bootmagic reset**: Hold down the rotary encoder knob and plug in the keyboard diff --git a/keyboards/mawaeg/sharkropad/sharkropad.c b/keyboards/mawaeg/sharkropad/sharkropad.c new file mode 100644 index 0000000000..391f59800b --- /dev/null +++ b/keyboards/mawaeg/sharkropad/sharkropad.c @@ -0,0 +1,90 @@ +/* Copyright 2025 @mawaeg + * + * 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 "quantum.h" +#include +#include +#include + +static uint8_t effect_name_len = 0; + +const char *rgb_matrix_get_effect_name(void) { + static char buf[32] = {0}; + + snprintf(buf, sizeof(buf), "%s", rgb_matrix_get_mode_name(rgb_matrix_get_mode())); + for (uint8_t i = 1; i < sizeof(buf); ++i) { + if (buf[i] == 0) { + effect_name_len = i; + break; + } else if (buf[i] == '_') + buf[i] = ' '; + else if (buf[i - 1] == ' ') + buf[i] = toupper(buf[i]); + else if (buf[i - 1] != ' ') + buf[i] = tolower(buf[i]); + } + return buf; +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + + static uint8_t last_effect = 0; + static uint8_t last_speed = 0; + static uint16_t key_timer = 0; + static uint8_t start_index = 0; + + uint8_t speedPercentage = scale8(rgb_matrix_get_speed(), 100); + bool is_timer_elapsed = timer_elapsed(key_timer) > 200; + + if (last_effect != rgb_matrix_get_mode() || last_speed != speedPercentage || is_timer_elapsed) { + last_effect = rgb_matrix_get_mode(); + last_speed = speedPercentage; + + oled_write_ln_P(PSTR("Mode: "), false); + const char *name = rgb_matrix_get_effect_name(); + if (effect_name_len > 21) { + if (!is_timer_elapsed && start_index != 0) { + start_index -= 1; + } else { + key_timer = timer_read(); + } + if (start_index > effect_name_len) { + start_index = 0; + } + for (uint8_t char_index = 0; char_index < 21; char_index++) { + if ((start_index + char_index) % effect_name_len == 0 && char_index != 0) { + oled_write_char(' ', false); + } else { + oled_write_char(name[(start_index + char_index) % (effect_name_len + 1)], false); + } + } + start_index += 1; + } else { + oled_write_ln(name, false); + start_index = 0; + } + + oled_set_cursor(0, 2); + oled_write_ln_P(PSTR("RGB Speed: "), false); + oled_write(get_u8_str(speedPercentage, ' '), false); + oled_write("%", false); + } + + return true; +} From f4068dbfb0a5bc8ba0daf4e714ff3cbe89ef92c2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 13 Oct 2025 06:40:45 +0100 Subject: [PATCH 60/95] Update STM32F446 default HSE to 8MHz (#25717) --- keyboards/handwired/onekey/nucleo_f446re/board.h | 3 +-- keyboards/handwired/onekey/nucleo_f446re/mcuconf.h | 6 ------ keyboards/handwired/onekey/nucleo_f446re/readme.md | 2 +- .../ibm/model_m_4th_gen/overnumpad_1xb/mcuconf.h | 11 +++++++++++ .../overnumpad_1xb/mcuconf.h | 11 +++++++++++ .../classic_ultracl_pre_2013/overnumpad_1xb/mcuconf.h | 11 +++++++++++ keyboards/unicomp/pc122/overnumpad_1xb/mcuconf.h | 11 +++++++++++ .../spacesaver_m_post_2013/overnumpad_1xb/mcuconf.h | 11 +++++++++++ .../spacesaver_m_pre_2013/overnumpad_1xb/mcuconf.h | 11 +++++++++++ .../boards/GENERIC_STM32_F446XE/configs/board.h | 1 - .../boards/GENERIC_STM32_F446XE/configs/config.h | 1 + .../boards/GENERIC_STM32_F446XE/configs/mcuconf.h | 4 ++-- 12 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 keyboards/ibm/model_m_4th_gen/overnumpad_1xb/mcuconf.h create mode 100644 keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/mcuconf.h create mode 100644 keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/mcuconf.h create mode 100644 keyboards/unicomp/pc122/overnumpad_1xb/mcuconf.h create mode 100644 keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/mcuconf.h create mode 100644 keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/mcuconf.h diff --git a/keyboards/handwired/onekey/nucleo_f446re/board.h b/keyboards/handwired/onekey/nucleo_f446re/board.h index 0c5f4dde79..54c93c551a 100644 --- a/keyboards/handwired/onekey/nucleo_f446re/board.h +++ b/keyboards/handwired/onekey/nucleo_f446re/board.h @@ -4,6 +4,5 @@ #include_next -#undef STM32_HSECLK -#define STM32_HSECLK 8000000U +// Configure clocks to use onboard STLINKs MCO as HSE is not populated by default #define STM32_HSE_BYPASS diff --git a/keyboards/handwired/onekey/nucleo_f446re/mcuconf.h b/keyboards/handwired/onekey/nucleo_f446re/mcuconf.h index 701d61d31d..ba463bf4f7 100644 --- a/keyboards/handwired/onekey/nucleo_f446re/mcuconf.h +++ b/keyboards/handwired/onekey/nucleo_f446re/mcuconf.h @@ -4,12 +4,6 @@ #include_next -#undef STM32_PLLM_VALUE -#define STM32_PLLM_VALUE 4 - -#undef STM32_PLLSAIM_VALUE -#define STM32_PLLSAIM_VALUE 4 - #undef STM32_ADC_USE_ADC1 #define STM32_ADC_USE_ADC1 TRUE diff --git a/keyboards/handwired/onekey/nucleo_f446re/readme.md b/keyboards/handwired/onekey/nucleo_f446re/readme.md index b0645b65fe..71a5e48184 100644 --- a/keyboards/handwired/onekey/nucleo_f446re/readme.md +++ b/keyboards/handwired/onekey/nucleo_f446re/readme.md @@ -1,4 +1,4 @@ -# STM32 Nucleo-L432 onekey +# STM32 Nucleo-F446 onekey To trigger keypress, short together pins *A0* and *A1*. Note that the pin numbering is relative to the MCU, so that A0 and A1 refer to PA0 and PA1 on the MCU (which are also labelled A0 and A1 on the board, but this isn't true for the other PAx pins). diff --git a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/mcuconf.h b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/mcuconf.h new file mode 100644 index 0000000000..0e89bead66 --- /dev/null +++ b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_PLLM_VALUE +#define STM32_PLLM_VALUE 8 + +#undef STM32_PLLSAIM_VALUE +#define STM32_PLLSAIM_VALUE 8 diff --git a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/mcuconf.h b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/mcuconf.h new file mode 100644 index 0000000000..0e89bead66 --- /dev/null +++ b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_PLLM_VALUE +#define STM32_PLLM_VALUE 8 + +#undef STM32_PLLSAIM_VALUE +#define STM32_PLLSAIM_VALUE 8 diff --git a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/mcuconf.h b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/mcuconf.h new file mode 100644 index 0000000000..0e89bead66 --- /dev/null +++ b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_PLLM_VALUE +#define STM32_PLLM_VALUE 8 + +#undef STM32_PLLSAIM_VALUE +#define STM32_PLLSAIM_VALUE 8 diff --git a/keyboards/unicomp/pc122/overnumpad_1xb/mcuconf.h b/keyboards/unicomp/pc122/overnumpad_1xb/mcuconf.h new file mode 100644 index 0000000000..0e89bead66 --- /dev/null +++ b/keyboards/unicomp/pc122/overnumpad_1xb/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_PLLM_VALUE +#define STM32_PLLM_VALUE 8 + +#undef STM32_PLLSAIM_VALUE +#define STM32_PLLSAIM_VALUE 8 diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/mcuconf.h b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/mcuconf.h new file mode 100644 index 0000000000..0e89bead66 --- /dev/null +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_PLLM_VALUE +#define STM32_PLLM_VALUE 8 + +#undef STM32_PLLSAIM_VALUE +#define STM32_PLLSAIM_VALUE 8 diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/mcuconf.h b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/mcuconf.h new file mode 100644 index 0000000000..0e89bead66 --- /dev/null +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_PLLM_VALUE +#define STM32_PLLM_VALUE 8 + +#undef STM32_PLLSAIM_VALUE +#define STM32_PLLSAIM_VALUE 8 diff --git a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/board.h b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/board.h index f05762c9b4..b06d96b5d7 100644 --- a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/board.h +++ b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/board.h @@ -15,7 +15,6 @@ */ #pragma once -#define STM32_HSECLK 16000000 // The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix: #define BOARD_OTG_NOVBUSSENS diff --git a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h index 362327efde..9af5c14d52 100644 --- a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h +++ b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h @@ -13,6 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#pragma once #ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP # define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE diff --git a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h index 566c146c25..9c5cb82436 100644 --- a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h +++ b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h @@ -48,7 +48,7 @@ #define STM32_CLOCK48_REQUIRED TRUE #define STM32_SW STM32_SW_PLL #define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE 8 +#define STM32_PLLM_VALUE 4 #define STM32_PLLN_VALUE 180 #define STM32_PLLP_VALUE 2 #define STM32_PLLQ_VALUE 7 @@ -58,7 +58,7 @@ #define STM32_PLLI2SP_VALUE 4 #define STM32_PLLI2SQ_VALUE 4 #define STM32_PLLSAIN_VALUE 192 -#define STM32_PLLSAIM_VALUE 8 +#define STM32_PLLSAIM_VALUE 4 #define STM32_PLLSAIP_VALUE 8 #define STM32_PLLSAIQ_VALUE 4 #define STM32_HPRE STM32_HPRE_DIV1 From 4f21beb7153c2b0a1f4d41de7dad5a2173f896b6 Mon Sep 17 00:00:00 2001 From: Boudewijn van Groos Date: Sat, 18 Oct 2025 23:31:52 +0200 Subject: [PATCH 61/95] Fix drv haptics docs by using the correct function name (#25733) --- docs/features/haptic_feedback.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/haptic_feedback.md b/docs/features/haptic_feedback.md index 08e66ea8e1..d380b1b999 100644 --- a/docs/features/haptic_feedback.md +++ b/docs/features/haptic_feedback.md @@ -121,7 +121,7 @@ Linear resonant actuators (LRA, also know as a linear vibrator) works different #### DRV2605L waveform library -DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `DRV_pulse(*sequence name or number*)` +DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `drv2605l_pulse(*sequence name or number*)` after adding `#include "drv2605l.h"`. List of waveform sequences from the datasheet: From 81df54308687713371ed5fbf4947e38963c7867b 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: Sun, 19 Oct 2025 10:14:37 +0800 Subject: [PATCH 62/95] Debounce: Deprecate num_rows parameter (#25632) --- docs/ChangeLog/20251130/PR25632.md | 4 + docs/custom_matrix.md | 4 +- keyboards/bpiphany/pegasushoof/2015/matrix.c | 202 ++++++----- keyboards/gboards/gergo/gergo.c | 3 + keyboards/gboards/gergo/gergo.h | 3 + keyboards/gboards/gergo/matrix.c | 315 +++++++++--------- .../gergoplex/keymaps/default/config.h | 3 + keyboards/gboards/gergoplex/matrix.c | 35 +- keyboards/halfcliff/matrix.c | 56 ++-- keyboards/handwired/owlet60/matrix.c | 144 ++++---- .../symmetric70_proto/matrix_debug/matrix.c | 42 ++- .../symmetric70_proto/matrix_fast/matrix.c | 4 +- keyboards/kakunpc/angel64/alpha/matrix.c | 156 ++++----- keyboards/kakunpc/angel64/rev1/matrix.c | 156 ++++----- keyboards/kakunpc/thedogkeyboard/matrix.c | 156 ++++----- keyboards/kbdmania/kmac/matrix.c | 32 +- keyboards/redscarf_iiplus/verb/matrix.c | 183 +++++----- keyboards/redscarf_iiplus/verc/matrix.c | 183 +++++----- keyboards/redscarf_iiplus/verd/matrix.c | 183 +++++----- keyboards/ymdk/sp64/keymaps/default/keymap.c | 3 + keyboards/ymdk/sp64/matrix.c | 169 +++++----- quantum/debounce.h | 5 +- quantum/debounce/asym_eager_defer_pk.c | 4 +- quantum/debounce/none.c | 6 +- quantum/debounce/sym_defer_g.c | 6 +- quantum/debounce/sym_defer_pk.c | 4 +- quantum/debounce/sym_defer_pr.c | 4 +- quantum/debounce/sym_eager_pk.c | 4 +- quantum/debounce/sym_eager_pr.c | 4 +- .../debounce/tests/debounce_test_common.cpp | 4 +- quantum/matrix.c | 6 +- quantum/matrix_common.c | 6 +- 32 files changed, 983 insertions(+), 1106 deletions(-) create mode 100644 docs/ChangeLog/20251130/PR25632.md mode change 100755 => 100644 keyboards/redscarf_iiplus/verb/matrix.c mode change 100755 => 100644 keyboards/redscarf_iiplus/verc/matrix.c diff --git a/docs/ChangeLog/20251130/PR25632.md b/docs/ChangeLog/20251130/PR25632.md new file mode 100644 index 0000000000..39136067b9 --- /dev/null +++ b/docs/ChangeLog/20251130/PR25632.md @@ -0,0 +1,4 @@ +# 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/custom_matrix.md b/docs/custom_matrix.md index ef206944e1..294b88bb0b 100644 --- a/docs/custom_matrix.md +++ b/docs/custom_matrix.md @@ -74,7 +74,7 @@ void matrix_init(void) { // TODO: initialize hardware and global matrix state here // Unless hardware debouncing - Init the configured debounce routine - debounce_init(MATRIX_ROWS); + debounce_init(); // This *must* be called for correct keyboard behavior matrix_init_kb(); @@ -86,7 +86,7 @@ uint8_t matrix_scan(void) { // TODO: add matrix scanning routine here // Unless hardware debouncing - use the configured debounce routine - changed = debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + changed = debounce(raw_matrix, matrix, changed); // This *must* be called for correct keyboard behavior matrix_scan_kb(); diff --git a/keyboards/bpiphany/pegasushoof/2015/matrix.c b/keyboards/bpiphany/pegasushoof/2015/matrix.c index 6fc1fd6e9e..61135e5833 100644 --- a/keyboards/bpiphany/pegasushoof/2015/matrix.c +++ b/keyboards/bpiphany/pegasushoof/2015/matrix.c @@ -31,13 +31,17 @@ static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static matrix_row_t read_cols(void); -static void select_row(uint8_t col); +static void select_row(uint8_t col); // user-defined overridable functions -__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } +__attribute__((weak)) void matrix_init_kb(void) { + matrix_init_user(); +} -__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } +__attribute__((weak)) void matrix_scan_kb(void) { + matrix_scan_user(); +} __attribute__((weak)) void matrix_init_user(void) {} @@ -45,105 +49,125 @@ __attribute__((weak)) void matrix_scan_user(void) {} // helper functions -inline uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; +inline uint8_t matrix_rows(void) { + return MATRIX_ROWS; } -inline uint8_t matrix_cols(void) -{ - return MATRIX_COLS; +inline uint8_t matrix_cols(void) { + return MATRIX_COLS; } -void matrix_init(void) -{ - /* Column output pins */ - DDRD |= 0b01111011; - /* Row input pins */ - DDRC &= ~0b10000000; - DDRB &= ~0b01111111; - PORTC |= 0b10000000; - PORTB |= 0b01111111; +void matrix_init(void) { + /* Column output pins */ + DDRD |= 0b01111011; + /* Row input pins */ + DDRC &= ~0b10000000; + DDRB &= ~0b01111111; + PORTC |= 0b10000000; + PORTB |= 0b01111111; - for (uint8_t i=0; i < matrix_rows(); i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_kb(); -} - -uint8_t matrix_scan(void) -{ - bool changed = false; - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - select_row(col); - wait_us(30); - matrix_row_t rows = read_cols(); - for (uint8_t row = 0; row < matrix_rows(); row++) { - bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<. #include "gergo.h" #ifdef BALLER -#include -#include "pointing_device.h" +# include +# include "pointing_device.h" #endif #ifndef DEBOUNCE -# define DEBOUNCE 5 +# define DEBOUNCE 5 #endif // MCP Pin Defs -#define RROW1 (1u<<3) -#define RROW2 (1u<<2) -#define RROW3 (1u<<1) -#define RROW4 (1u<<0) -#define COL0 (1u<<0) -#define COL1 (1u<<1) -#define COL2 (1u<<2) -#define COL3 (1u<<3) -#define COL4 (1u<<4) -#define COL5 (1u<<5) -#define COL6 (1u<<6) +#define RROW1 (1u << 3) +#define RROW2 (1u << 2) +#define RROW3 (1u << 1) +#define RROW4 (1u << 0) +#define COL0 (1u << 0) +#define COL1 (1u << 1) +#define COL2 (1u << 2) +#define COL3 (1u << 3) +#define COL4 (1u << 4) +#define COL5 (1u << 5) +#define COL6 (1u << 6) // ATmega pin defs -#define ROW1 (1u<<6) -#define ROW2 (1u<<5) -#define ROW3 (1u<<4) -#define ROW4 (1u<<1) -#define COL7 (1u<<0) -#define COL8 (1u<<1) -#define COL9 (1u<<2) -#define COL10 (1u<<3) -#define COL11 (1u<<2) -#define COL12 (1u<<3) -#define COL13 (1u<<6) - -//Trackball pin defs -#define TRKUP (1u<<4) -#define TRKDN (1u<<5) -#define TRKLT (1u<<6) -#define TRKRT (1u<<7) -#define TRKBTN (1u<<6) +#define ROW1 (1u << 6) +#define ROW2 (1u << 5) +#define ROW3 (1u << 4) +#define ROW4 (1u << 1) +#define COL7 (1u << 0) +#define COL8 (1u << 1) +#define COL9 (1u << 2) +#define COL10 (1u << 3) +#define COL11 (1u << 2) +#define COL12 (1u << 3) +#define COL13 (1u << 6) +// Trackball pin defs +#define TRKUP (1u << 4) +#define TRKDN (1u << 5) +#define TRKLT (1u << 6) +#define TRKRT (1u << 7) +#define TRKBTN (1u << 6) // Multiple for mouse moves #ifndef TRKSTEP -#define TRKSTEP 20 +# define TRKSTEP 20 #endif // multiple for mouse scroll #ifndef SCROLLSTEP -#define SCROLLSTEP 5 +# define SCROLLSTEP 5 #endif // bit masks -#define BMASK (COL7 | COL8 | COL9 | COL10) -#define CMASK (COL13) -#define DMASK (COL11 | COL12) -#define FMASK (ROW1 | ROW2 | ROW3 | ROW4) -#define RROWMASK (RROW1 | RROW2 | RROW3 | RROW4) -#define MCPMASK (COL0 | COL1 | COL2 | COL3 | COL4 | COL5 | COL6) -#define TRKMASK (TRKUP | TRKDN | TRKRT | TRKLT) +#define BMASK (COL7 | COL8 | COL9 | COL10) +#define CMASK (COL13) +#define DMASK (COL11 | COL12) +#define FMASK (ROW1 | ROW2 | ROW3 | ROW4) +#define RROWMASK (RROW1 | RROW2 | RROW3 | RROW4) +#define MCPMASK (COL0 | COL1 | COL2 | COL3 | COL4 | COL5 | COL6) +#define TRKMASK (TRKUP | TRKDN | TRKRT | TRKLT) // Trackball interrupts accumulate over here. Processed on scan // Stores prev state of mouse, high bits store direction uint8_t trkState = 0; uint8_t trkBtnState = 0; -volatile uint8_t tbUpCnt = 0; -volatile uint8_t tbDnCnt = 0; -volatile uint8_t tbLtCnt = 0; -volatile uint8_t tbRtCnt = 0; +volatile uint8_t tbUpCnt = 0; +volatile uint8_t tbDnCnt = 0; +volatile uint8_t tbLtCnt = 0; +volatile uint8_t tbRtCnt = 0; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -111,29 +110,30 @@ static matrix_row_t read_cols(uint8_t row); static void init_cols(void); static void unselect_rows(void); static void select_row(uint8_t row); -static void enableInterrupts(void); +static void enableInterrupts(void); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; -__attribute__ ((weak)) void matrix_init_user(void) {} +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) void matrix_scan_user(void) {} +__attribute__((weak)) void matrix_scan_user(void) {} -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); +__attribute__((weak)) void matrix_init_kb(void) { + matrix_init_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); +__attribute__((weak)) void matrix_scan_kb(void) { + matrix_scan_user(); } -inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } - -inline uint8_t matrix_cols(void) { return MATRIX_COLS; } +inline uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} +inline uint8_t matrix_cols(void) { + return MATRIX_COLS; +} void matrix_init(void) { // initialize row and col @@ -141,13 +141,13 @@ void matrix_init(void) { unselect_rows(); init_cols(); - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - raw_matrix[i] = 0; - } + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + } - debounce_init(MATRIX_ROWS); + debounce_init(); matrix_init_kb(); } @@ -158,7 +158,7 @@ void matrix_power_up(void) { init_cols(); // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } } @@ -166,63 +166,66 @@ void matrix_power_up(void) { // Reads and stores a row, returning // whether a change occurred. static inline bool store_raw_matrix_row(uint8_t index) { - matrix_row_t temp = read_cols(index); - if (raw_matrix[index] != temp) { - raw_matrix[index] = temp; - return true; - } - return false; + matrix_row_t temp = read_cols(index); + if (raw_matrix[index] != temp) { + raw_matrix[index] = temp; + return true; + } + return false; } - - uint8_t matrix_scan(void) { // TODO: Find what is trashing interrupts enableInterrupts(); // First we handle the mouse inputs #ifdef BALLER - uint8_t pBtn = PINE & TRKBTN; + uint8_t pBtn = PINE & TRKBTN; - #ifdef DEBUG_BALLER +# ifdef DEBUG_BALLER // Compare to previous, mod report - if (tbUpCnt + tbDnCnt + tbLtCnt + tbRtCnt != 0) - xprintf("U: %d D: %d L: %d R: %d B: %d\n", tbUpCnt, tbDnCnt, tbLtCnt, tbRtCnt, (trkBtnState >> 6)); - #endif + if (tbUpCnt + tbDnCnt + tbLtCnt + tbRtCnt != 0) xprintf("U: %d D: %d L: %d R: %d B: %d\n", tbUpCnt, tbDnCnt, tbLtCnt, tbRtCnt, (trkBtnState >> 6)); +# endif // Modify the report report_mouse_t pRprt = pointing_device_get_report(); // Scroll by default, move on layer if (layer_state == 0) { - pRprt.h += tbLtCnt * SCROLLSTEP; tbLtCnt = 0; - pRprt.h -= tbRtCnt * SCROLLSTEP; tbRtCnt = 0; - pRprt.v -= tbUpCnt * SCROLLSTEP; tbUpCnt = 0; - pRprt.v += tbDnCnt * SCROLLSTEP; tbDnCnt = 0; + pRprt.h += tbLtCnt * SCROLLSTEP; + tbLtCnt = 0; + pRprt.h -= tbRtCnt * SCROLLSTEP; + tbRtCnt = 0; + pRprt.v -= tbUpCnt * SCROLLSTEP; + tbUpCnt = 0; + pRprt.v += tbDnCnt * SCROLLSTEP; + tbDnCnt = 0; } else { - pRprt.x -= tbLtCnt * TRKSTEP * (layer_state - 1); tbLtCnt = 0; - pRprt.x += tbRtCnt * TRKSTEP * (layer_state - 1); tbRtCnt = 0; - pRprt.y -= tbUpCnt * TRKSTEP * (layer_state - 1); tbUpCnt = 0; - pRprt.y += tbDnCnt * TRKSTEP * (layer_state - 1); tbDnCnt = 0; + pRprt.x -= tbLtCnt * TRKSTEP * (layer_state - 1); + tbLtCnt = 0; + pRprt.x += tbRtCnt * TRKSTEP * (layer_state - 1); + tbRtCnt = 0; + pRprt.y -= tbUpCnt * TRKSTEP * (layer_state - 1); + tbUpCnt = 0; + pRprt.y += tbDnCnt * TRKSTEP * (layer_state - 1); + tbDnCnt = 0; } -#ifdef DEBUG_BALLER - if (pRprt.x != 0 || pRprt.y != 0) - xprintf("X: %d Y: %d\n", pRprt.x, pRprt.y); -#endif +# ifdef DEBUG_BALLER + if (pRprt.x != 0 || pRprt.y != 0) xprintf("X: %d Y: %d\n", pRprt.x, pRprt.y); +# endif - if ((pBtn != trkBtnState) && ((pBtn >> 6) == 0)) pRprt.buttons |= MOUSE_BTN1; - if ((pBtn != trkBtnState) && ((pBtn >> 6) == 1)) pRprt.buttons &= ~MOUSE_BTN1; + if ((pBtn != trkBtnState) && ((pBtn >> 6) == 0)) pRprt.buttons |= MOUSE_BTN1; + if ((pBtn != trkBtnState) && ((pBtn >> 6) == 1)) pRprt.buttons &= ~MOUSE_BTN1; // Save state, push update - if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn)) - pointing_device_set_report(pRprt); + if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn)) pointing_device_set_report(pRprt); trkBtnState = pBtn; #endif // Then the keyboard - if (mcp23018_status) { // if there was an error + if (mcp23018_status) { // if there was an error if (++mcp23018_reset_loop == 0) { // if (++mcp23018_reset_loop >= 1300) { // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans @@ -240,7 +243,7 @@ uint8_t matrix_scan(void) { bool changed = false; for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { // select rows from left and right hands - uint8_t left_index = i; + uint8_t left_index = i; uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; select_row(left_index); select_row(right_index); @@ -254,41 +257,46 @@ uint8_t matrix_scan(void) { unselect_rows(); } - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + debounce(raw_matrix, matrix, changed); matrix_scan_kb(); enableInterrupts(); #ifdef DEBUG_MATRIX for (uint8_t c = 0; c < MATRIX_COLS; c++) - for (uint8_t r = 0; r < MATRIX_ROWS; r++) - if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); #endif return 1; } -inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } +inline bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & ((matrix_row_t)1 << col)); +} -inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} void matrix_print(void) { print("\nr/c 0123456789ABCDEF\n"); for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - print_hex8(row); print(": "); + print_hex8(row); + print(": "); print_bin_reverse16(matrix_get_row(row)); print("\n"); } } // Remember this means ROWS -static void init_cols(void) { +static void init_cols(void) { // init on mcp23018 // not needed, already done as part of init_mcp23018() // Input with pull-up(DDR:0, PORT:1) - DDRF &= ~FMASK; - PORTF |= FMASK; + DDRF &= ~FMASK; + PORTF |= FMASK; } static matrix_row_t read_cols(uint8_t row) { @@ -296,7 +304,7 @@ static matrix_row_t read_cols(uint8_t row) { if (mcp23018_status) { // if there was an error return 0; } else { - uint8_t data = 0; + uint8_t data = 0; mcp23018_status = i2c_read_register(I2C_ADDR, GPIOB, &data, 1, I2C_TIMEOUT); #ifdef DEBUG_MATRIX @@ -305,113 +313,106 @@ static matrix_row_t read_cols(uint8_t row) { return ~data; } } else { - /* read from teensy - * bitmask is 0b0111001, but we want the lower four - * we'll return 1s for the top two, but that's harmless. - */ + /* read from teensy + * bitmask is 0b0111001, but we want the lower four + * we'll return 1s for the top two, but that's harmless. + */ // So I need to confuckulate all this - //return ~(((PIND & DMASK) >> 1 | ((PINC & CMASK) >> 6) | (PIN))); - //return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); - return ~( - (((PINF & ROW4) >> 1) - | ((PINF & (ROW1 | ROW2 | ROW3)) >> 3)) - & 0xF); + // return ~(((PIND & DMASK) >> 1 | ((PINC & CMASK) >> 6) | (PIN))); + // return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); + return ~((((PINF & ROW4) >> 1) | ((PINF & (ROW1 | ROW2 | ROW3)) >> 3)) & 0xF); } } // Row pin configuration -static void unselect_rows(void) -{ +static void unselect_rows(void) { // no need to unselect on mcp23018, because the select step sets all // the other row bits high, and it's not changing to a different // direction // Hi-Z(DDR:0, PORT:0) to unselect - DDRB &= ~(BMASK | TRKMASK); + DDRB &= ~(BMASK | TRKMASK); PORTB &= ~(BMASK); - DDRC &= ~CMASK; + DDRC &= ~CMASK; PORTC &= ~CMASK; - DDRD &= ~DMASK; + DDRD &= ~DMASK; PORTD &= ~DMASK; - // Fix trashing of DDRB for TB + // Fix trashing of DDRB for TB PORTB |= TRKMASK; } -static void select_row(uint8_t row) -{ +static void select_row(uint8_t row) { if (row < 7) { // select on mcp23018 if (mcp23018_status) { // do nothing on error - } else { // set active row low : 0 // set other rows hi-Z : 1 - uint8_t data = 0xFF & ~(1<= 1300) { // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans @@ -140,7 +142,7 @@ uint8_t matrix_scan(void) { unselect_rows(); } - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + debounce(raw_matrix, matrix, changed); matrix_scan_kb(); #ifdef DEBUG_MATRIX @@ -152,8 +154,12 @@ uint8_t matrix_scan(void) { return 1; } -inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } -inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } +inline bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & ((matrix_row_t)1 << col)); +} +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} void matrix_print(void) { print("\nr/c 0123456789ABCDEF\n"); @@ -168,16 +174,16 @@ void matrix_print(void) { // Remember this means ROWS static void init_cols(void) { for (uint8_t col = 0; col < MATRIX_COLS; col++) { - gpio_set_pin_input_high(col_pins[col]); + gpio_set_pin_input_high(col_pins[col]); } } static matrix_row_t read_cols(uint8_t row) { if (row < 5) { - if (mcp23018_status) { // if there was an error + if (mcp23018_status) { // if there was an error return 0; } else { - uint8_t data = 0; + uint8_t data = 0; mcp23018_status = i2c_receive(I2C_ADDR, &data, 1, I2C_TIMEOUT); #ifdef DEBUG_MATRIX if (~data != 0x00) xprintf("I2C: %d\n", ~data); @@ -195,20 +201,19 @@ static void unselect_rows(void) { // the other row bits high, and it's not changing to a different direction for (uint8_t row = 0; row < MATRIX_ROWS_PER_SIDE; row++) { - gpio_set_pin_input(row_pins[row]); - gpio_write_pin_low(row_pins[row]); + gpio_set_pin_input(row_pins[row]); + gpio_write_pin_low(row_pins[row]); } } static void select_row(uint8_t row) { if (row < 5) { // select on mcp23018 - if (mcp23018_status) { // do nothing on error - } else { // set active row low : 0 // set other rows hi-Z : 1 + if (mcp23018_status) { // do nothing on error + } else { // set active row low : 0 // set other rows hi-Z : 1 uint8_t data; - data = 0xFF & ~(1 << (row + 1)); + data = 0xFF & ~(1 << (row + 1)); mcp23018_status = i2c_write_register(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT); - } } else { gpio_set_pin_output(row_pins[row - MATRIX_ROWS_PER_SIDE]); diff --git a/keyboards/halfcliff/matrix.c b/keyboards/halfcliff/matrix.c index 790f8c41bb..fc9d437a45 100644 --- a/keyboards/halfcliff/matrix.c +++ b/keyboards/halfcliff/matrix.c @@ -29,16 +29,20 @@ static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -static matrix_row_t matrix[MATRIX_ROWS]; // debounced values +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values // row offsets for each hand uint8_t thisHand, thatHand; // user-defined overridable functions -__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } +__attribute__((weak)) void matrix_init_kb(void) { + matrix_init_user(); +} -__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } +__attribute__((weak)) void matrix_scan_kb(void) { + matrix_scan_user(); +} __attribute__((weak)) void matrix_init_user(void) {} @@ -46,7 +50,9 @@ __attribute__((weak)) void matrix_scan_user(void) {} __attribute__((weak)) void matrix_slave_scan_user(void) {} -matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } +matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} void matrix_print(void) {} @@ -58,13 +64,19 @@ static inline void gpio_atomic_set_pin_output_low(pin_t pin) { } static inline void gpio_atomic_set_pin_input_high(pin_t pin) { - ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } + ATOMIC_BLOCK_FORCEON { + gpio_set_pin_input_high(pin); + } } // matrix code -static void select_row(uint8_t row) { gpio_atomic_set_pin_output_low(row_pins[row]); } +static void select_row(uint8_t row) { + gpio_atomic_set_pin_output_low(row_pins[row]); +} -static void unselect_row(uint8_t row) { gpio_atomic_set_pin_input_high(row_pins[row]); } +static void unselect_row(uint8_t row) { + gpio_atomic_set_pin_input_high(row_pins[row]); +} static void unselect_rows(void) { for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { @@ -92,7 +104,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // Unselect row unselect_row(current_row); if (current_row + 1 < MATRIX_ROWS) { - wait_us(30); // wait for row signal to go HIGH + wait_us(30); // wait for row signal to go HIGH } // If the row has changed, store the row and return the changed flag. @@ -103,9 +115,13 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return false; } -static void select_col(uint8_t col) { gpio_atomic_set_pin_output_low(col_pins[col]); } +static void select_col(uint8_t col) { + gpio_atomic_set_pin_output_low(col_pins[col]); +} -static void unselect_col(uint8_t col) { gpio_atomic_set_pin_input_high(col_pins[col]); } +static void unselect_col(uint8_t col) { + gpio_atomic_set_pin_input_high(col_pins[col]); +} static void unselect_cols(void) { for (uint8_t x = 0; x < MATRIX_COLS; x++) { @@ -156,7 +172,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) // Unselect col unselect_col(current_col); if (current_col + 1 < MATRIX_COLS) { - wait_us(30); // wait for col signal to go HIGH + wait_us(30); // wait for col signal to go HIGH } return matrix_changed; @@ -201,7 +217,7 @@ void matrix_init(void) { matrix[i] = 0; } - debounce_init(ROWS_PER_HAND); + debounce_init(); matrix_init_kb(); @@ -248,26 +264,26 @@ bool matrix_post_scan(void) { } uint8_t matrix_scan(void) { - bool local_changed = false; - static matrix_row_t temp_raw_matrix[MATRIX_ROWS]; // temp raw values + bool local_changed = false; + static matrix_row_t temp_raw_matrix[MATRIX_ROWS]; // temp raw values // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND/2; current_row++) { + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND / 2; current_row++) { local_changed |= read_cols_on_row(raw_matrix, current_row); } // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { local_changed |= read_rows_on_col(temp_raw_matrix, current_col); - //Updated key matrix on lines 6-10 (or lines 16-20) - if(local_changed) { - for (uint8_t i = ROWS_PER_HAND/2; i < ROWS_PER_HAND; i++) { + // Updated key matrix on lines 6-10 (or lines 16-20) + if (local_changed) { + for (uint8_t i = ROWS_PER_HAND / 2; i < ROWS_PER_HAND; i++) { raw_matrix[i] = temp_raw_matrix[i]; } } } - debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, local_changed); + debounce(raw_matrix, matrix + thisHand, local_changed); bool remote_changed = matrix_post_scan(); return (uint8_t)(local_changed || remote_changed); diff --git a/keyboards/handwired/owlet60/matrix.c b/keyboards/handwired/owlet60/matrix.c index 7ef5d66a9f..2017b4de85 100644 --- a/keyboards/handwired/owlet60/matrix.c +++ b/keyboards/handwired/owlet60/matrix.c @@ -29,82 +29,62 @@ along with this program. If not, see . #include "timer.h" #if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) # define ROW_SHIFTER ((uint8_t)1) #elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) # define ROW_SHIFTER ((uint16_t)1) #elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define ROW_SHIFTER ((uint32_t)1) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define ROW_SHIFTER ((uint32_t)1) #endif static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_select_pins[3] = MATRIX_COL_SELECT_PINS; -static const uint8_t dat_pin = MATRIX_COL_DATA_PIN; +static const uint8_t col_select_pins[3] = MATRIX_COL_SELECT_PINS; +static const uint8_t dat_pin = MATRIX_COL_DATA_PIN; /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values -static matrix_row_t matrix[MATRIX_ROWS]; //raw values +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // raw values /* 2d array containing binary representation of its index */ static const uint8_t num_in_binary[8][3] = { - {0, 0, 0}, - {0, 0, 1}, - {0, 1, 0}, - {0, 1, 1}, - {1, 0, 0}, - {1, 0, 1}, - {1, 1, 0}, - {1, 1, 1}, + {0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0, 1, 1}, {1, 0, 0}, {1, 0, 1}, {1, 1, 0}, {1, 1, 1}, }; static void select_col_analog(uint8_t col); static void mux_pin_control(const uint8_t binary[]); -void debounce_init(uint8_t num_rows); -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed); +void debounce_init(void); +void debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed); +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_init_user(void) {} +__attribute__((weak)) void matrix_scan_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) {} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); +__attribute__((weak)) void matrix_init_kb(void) { + matrix_init_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); +__attribute__((weak)) void matrix_scan_kb(void) { + matrix_scan_user(); } -inline -uint8_t matrix_rows(void) -{ +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) -{ +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<. #include "debounce.h" #if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) # define ROW_SHIFTER ((uint8_t)1) #elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) # define ROW_SHIFTER ((uint16_t)1) #elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define ROW_SHIFTER ((uint32_t)1) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define ROW_SHIFTER ((uint32_t)1) #endif #ifdef MATRIX_MASKED - extern const matrix_row_t matrix_mask[]; +extern const matrix_row_t matrix_mask[]; #endif static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values -static matrix_row_t matrix[MATRIX_ROWS]; //debounced values +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values -__attribute__ ((weak)) -void matrix_init_kb(void) { +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } -__attribute__ ((weak)) -void matrix_init_user(void) { -} +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +__attribute__((weak)) void matrix_scan_user(void) {} -inline -uint8_t matrix_rows(void) { +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) { +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<. #include "debounce.h" #if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) # define ROW_SHIFTER ((uint8_t)1) #elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) # define ROW_SHIFTER ((uint16_t)1) #elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define ROW_SHIFTER ((uint32_t)1) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define ROW_SHIFTER ((uint32_t)1) #endif #ifdef MATRIX_MASKED - extern const matrix_row_t matrix_mask[]; +extern const matrix_row_t matrix_mask[]; #endif static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values -static matrix_row_t matrix[MATRIX_ROWS]; //debounced values +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values -__attribute__ ((weak)) -void matrix_init_kb(void) { +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } -__attribute__ ((weak)) -void matrix_init_user(void) { -} +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +__attribute__((weak)) void matrix_scan_user(void) {} -inline -uint8_t matrix_rows(void) { +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) { +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<. #include "debounce.h" #if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) # define ROW_SHIFTER ((uint8_t)1) #elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) # define ROW_SHIFTER ((uint16_t)1) #elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define ROW_SHIFTER ((uint32_t)1) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define ROW_SHIFTER ((uint32_t)1) #endif #ifdef MATRIX_MASKED - extern const matrix_row_t matrix_mask[]; +extern const matrix_row_t matrix_mask[]; #endif static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values -static matrix_row_t matrix[MATRIX_ROWS]; //debounced values +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values -__attribute__ ((weak)) -void matrix_init_kb(void) { +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } -__attribute__ ((weak)) -void matrix_init_user(void) { -} +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +__attribute__((weak)) void matrix_scan_user(void) {} -inline -uint8_t matrix_rows(void) { +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) { +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<. #include "debounce.h" #if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) # define ROW_SHIFTER ((uint8_t)1) #elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) # define ROW_SHIFTER ((uint16_t)1) #elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define ROW_SHIFTER ((uint32_t)1) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define ROW_SHIFTER ((uint32_t)1) #endif #ifdef MATRIX_MASKED - extern const matrix_row_t matrix_mask[]; +extern const matrix_row_t matrix_mask[]; #endif #ifdef DIRECT_PINS @@ -47,46 +47,34 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values -static matrix_row_t matrix[MATRIX_ROWS]; //debounced values +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values -__attribute__ ((weak)) -void matrix_init_kb(void) { +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } -__attribute__ ((weak)) -void matrix_init_user(void) { -} +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +__attribute__((weak)) void matrix_scan_user(void) {} -inline -uint8_t matrix_rows(void) { +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) { +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<. #include "debounce.h" #if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) # define ROW_SHIFTER ((uint8_t)1) #elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) # define ROW_SHIFTER ((uint16_t)1) #elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define ROW_SHIFTER ((uint32_t)1) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define ROW_SHIFTER ((uint32_t)1) #endif #ifdef MATRIX_MASKED - extern const matrix_row_t matrix_mask[]; +extern const matrix_row_t matrix_mask[]; #endif #ifdef DIRECT_PINS @@ -47,46 +47,34 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values -static matrix_row_t matrix[MATRIX_ROWS]; //debounced values +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values -__attribute__ ((weak)) -void matrix_init_kb(void) { +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } -__attribute__ ((weak)) -void matrix_init_user(void) { -} +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +__attribute__((weak)) void matrix_scan_user(void) {} -inline -uint8_t matrix_rows(void) { +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) { +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<. #include "debounce.h" #if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) # define ROW_SHIFTER ((uint8_t)1) #elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) # define ROW_SHIFTER ((uint16_t)1) #elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define ROW_SHIFTER ((uint32_t)1) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define ROW_SHIFTER ((uint32_t)1) #endif #ifdef MATRIX_MASKED - extern const matrix_row_t matrix_mask[]; +extern const matrix_row_t matrix_mask[]; #endif #ifdef DIRECT_PINS @@ -47,46 +47,34 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values -static matrix_row_t matrix[MATRIX_ROWS]; //debounced values +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values -__attribute__ ((weak)) -void matrix_init_kb(void) { +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } -__attribute__ ((weak)) -void matrix_init_user(void) { -} +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +__attribute__((weak)) void matrix_scan_user(void) {} -inline -uint8_t matrix_rows(void) { +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) { +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<= 1300) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - } + // Then the keyboard + if (mcp23018_status != I2C_STATUS_SUCCESS) { + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + } + } } - } #endif - bool changed = false; - for (uint8_t row = 0; row < MATRIX_ROWS; row++) - { - matrix_row_t cols; + bool changed = false; + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_row_t cols; - matrix_select_row(row); + matrix_select_row(row); #ifndef RIGHT_HALF - _delay_us(5); + _delay_us(5); #endif - cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ); + cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF); #ifdef RIGHT_HALF - uint8_t data = 0x7F; - // Receive the columns from right half - i2c_receive(I2C_ADDR, &data, 1, MCP23018_I2C_TIMEOUT); - cols |= ((~(data) & 0x7F) << 7); + uint8_t data = 0x7F; + // Receive the columns from right half + i2c_receive(I2C_ADDR, &data, 1, MCP23018_I2C_TIMEOUT); + cols |= ((~(data) & 0x7F) << 7); #endif - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - //debouncing = DEBOUNCE; - changed = true; + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + // debouncing = DEBOUNCE; + changed = true; + } } - } - debounce(matrix_debouncing, matrix, MATRIX_ROWS, changed); + debounce(matrix_debouncing, matrix, changed); - matrix_scan_kb(); + matrix_scan_kb(); #ifdef DEBUG_MATRIX - for (uint8_t c = 0; c < MATRIX_COLS; c++) - for (uint8_t r = 0; r < MATRIX_ROWS; r++) - if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); #endif - return (uint8_t)changed; + return (uint8_t)changed; } -inline -matrix_row_t matrix_get_row(uint8_t row) -{ +inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - print_hex8(row); print(": "); - print_bin_reverse16(matrix_get_row(row)); - print("\n"); - } +void matrix_print(void) { + print("\nr/c 0123456789ABCDEF\n"); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + print_hex8(row); + print(": "); + print_bin_reverse16(matrix_get_row(row)); + print("\n"); + } } -static void matrix_select_row(uint8_t row) -{ +static void matrix_select_row(uint8_t row) { #ifdef RIGHT_HALF - uint8_t txdata[3]; + uint8_t txdata[3]; - //Set the remote row on port A - txdata[0] = GPIOA; - txdata[1] = 0xFF & ~(1< -void debounce_init(uint8_t num_rows) {} +void debounce_init(void) {} -bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { +bool debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) { bool cooked_changed = false; if (changed) { - size_t matrix_size = num_rows * sizeof(matrix_row_t); + size_t matrix_size = MATRIX_ROWS_PER_HAND * sizeof(matrix_row_t); if (memcmp(cooked, raw, matrix_size) != 0) { memcpy(cooked, raw, matrix_size); cooked_changed = true; diff --git a/quantum/debounce/sym_defer_g.c b/quantum/debounce/sym_defer_g.c index 81f351c126..a60a131072 100644 --- a/quantum/debounce/sym_defer_g.c +++ b/quantum/debounce/sym_defer_g.c @@ -20,9 +20,9 @@ #if DEBOUNCE > 0 -void debounce_init(uint8_t num_rows) {} +void debounce_init(void) {} -bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { +bool debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) { static fast_timer_t debouncing_time; static bool debouncing = false; bool cooked_changed = false; @@ -31,7 +31,7 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool debouncing = true; debouncing_time = timer_read_fast(); } else if (debouncing && timer_elapsed_fast(debouncing_time) >= DEBOUNCE) { - size_t matrix_size = num_rows * sizeof(matrix_row_t); + size_t matrix_size = MATRIX_ROWS_PER_HAND * sizeof(matrix_row_t); if (memcmp(cooked, raw, matrix_size) != 0) { memcpy(cooked, raw, matrix_size); cooked_changed = true; diff --git a/quantum/debounce/sym_defer_pk.c b/quantum/debounce/sym_defer_pk.c index 063094efe5..b910571219 100644 --- a/quantum/debounce/sym_defer_pk.c +++ b/quantum/debounce/sym_defer_pk.c @@ -32,9 +32,9 @@ static bool cooked_changed; static inline void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t elapsed_time); static inline void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[]); -void debounce_init(uint8_t num_rows) {} +void debounce_init(void) {} -bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { +bool debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) { static fast_timer_t last_time; bool updated_last = false; cooked_changed = false; diff --git a/quantum/debounce/sym_defer_pr.c b/quantum/debounce/sym_defer_pr.c index 2382fae898..feaf55b08a 100644 --- a/quantum/debounce/sym_defer_pr.c +++ b/quantum/debounce/sym_defer_pr.c @@ -33,9 +33,9 @@ static bool cooked_changed; static inline void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t elapsed_time); static inline void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[]); -void debounce_init(uint8_t num_rows) {} +void debounce_init(void) {} -bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { +bool debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) { static fast_timer_t last_time; bool updated_last = false; cooked_changed = false; diff --git a/quantum/debounce/sym_eager_pk.c b/quantum/debounce/sym_eager_pk.c index c3a7afde24..1f53330e9c 100644 --- a/quantum/debounce/sym_eager_pk.c +++ b/quantum/debounce/sym_eager_pk.c @@ -46,9 +46,9 @@ static bool cooked_changed; static inline void update_debounce_counters(uint8_t elapsed_time); static inline void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[]); -void debounce_init(uint8_t num_rows) {} +void debounce_init(void) {} -bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { +bool debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) { static fast_timer_t last_time; bool updated_last = false; cooked_changed = false; diff --git a/quantum/debounce/sym_eager_pr.c b/quantum/debounce/sym_eager_pr.c index 5a1e3a1bda..c929ff53dc 100644 --- a/quantum/debounce/sym_eager_pr.c +++ b/quantum/debounce/sym_eager_pr.c @@ -33,9 +33,9 @@ static bool cooked_changed; static inline void update_debounce_counters(uint8_t elapsed_time); static inline void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[]); -void debounce_init(uint8_t num_rows) {} +void debounce_init(void) {} -bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { +bool debounce(matrix_row_t raw[], matrix_row_t cooked[], bool changed) { static fast_timer_t last_time; bool updated_last = false; cooked_changed = false; diff --git a/quantum/debounce/tests/debounce_test_common.cpp b/quantum/debounce/tests/debounce_test_common.cpp index 3782f51411..84b91f85e1 100644 --- a/quantum/debounce/tests/debounce_test_common.cpp +++ b/quantum/debounce/tests/debounce_test_common.cpp @@ -60,7 +60,7 @@ void DebounceTest::runEventsInternal() { bool first = true; /* Initialise keyboard with start time (offset to avoid testing at 0) and all keys UP */ - debounce_init(MATRIX_ROWS); + debounce_init(); set_time(time_offset_); simulate_async_tick(async_time_jumps_); std::fill(std::begin(input_matrix_), std::end(input_matrix_), 0); @@ -129,7 +129,7 @@ void DebounceTest::runDebounce(bool changed) { reset_access_counter(); - bool cooked_changed = debounce(raw_matrix_, cooked_matrix_, MATRIX_ROWS, changed); + bool cooked_changed = debounce(raw_matrix_, cooked_matrix_, changed); if (!std::equal(std::begin(input_matrix_), std::end(input_matrix_), std::begin(raw_matrix_))) { FAIL() << "Fatal error: debounce() modified raw matrix at " << strTime() << "\ninput_matrix: changed=" << changed << "\n" << strMatrix(input_matrix_) << "\nraw_matrix:\n" << strMatrix(raw_matrix_); diff --git a/quantum/matrix.c b/quantum/matrix.c index 167a70e5b6..2e7ea085f4 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -303,7 +303,7 @@ void matrix_init(void) { memset(matrix, 0, sizeof(matrix)); memset(raw_matrix, 0, sizeof(raw_matrix)); - debounce_init(MATRIX_ROWS_PER_HAND); + debounce_init(); matrix_init_kb(); } @@ -336,9 +336,9 @@ uint8_t matrix_scan(void) { if (changed) memcpy(raw_matrix, curr_matrix, sizeof(curr_matrix)); #ifdef SPLIT_KEYBOARD - changed = debounce(raw_matrix, matrix + thisHand, MATRIX_ROWS_PER_HAND, changed) | matrix_post_scan(); + changed = debounce(raw_matrix, matrix + thisHand, changed) | matrix_post_scan(); #else - changed = debounce(raw_matrix, matrix, MATRIX_ROWS_PER_HAND, changed); + changed = debounce(raw_matrix, matrix, changed); matrix_scan_kb(); #endif return (uint8_t)changed; diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index b4a86fc483..26589f29a6 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c @@ -156,7 +156,7 @@ __attribute__((weak)) void matrix_init(void) { matrix[i] = 0; } - debounce_init(MATRIX_ROWS_PER_HAND); + debounce_init(); matrix_init_kb(); } @@ -165,9 +165,9 @@ __attribute__((weak)) uint8_t matrix_scan(void) { bool changed = matrix_scan_custom(raw_matrix); #ifdef SPLIT_KEYBOARD - changed = debounce(raw_matrix, matrix + thisHand, MATRIX_ROWS_PER_HAND, changed) | matrix_post_scan(); + changed = debounce(raw_matrix, matrix + thisHand, changed) | matrix_post_scan(); #else - changed = debounce(raw_matrix, matrix, MATRIX_ROWS_PER_HAND, changed); + changed = debounce(raw_matrix, matrix, changed); matrix_scan_kb(); #endif From cb3149b7f26bc8efb0bb9b8ab489fa3eb0f963b9 Mon Sep 17 00:00:00 2001 From: Filios92 Date: Mon, 27 Oct 2025 00:47:04 +0100 Subject: [PATCH 63/95] Fix RGB matrix not syncing and turning off properly on timeout (#25467) --- quantum/led_matrix/led_matrix.c | 32 ++++++++++++++++++-------------- quantum/rgb_matrix/rgb_matrix.c | 32 ++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index b2665597df..715d520d1c 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -78,11 +78,12 @@ static const uint8_t led_matrix_flag_steps[] = LED_MATRIX_FLAG_STEPS; #define LED_MATRIX_FLAG_STEPS_COUNT ARRAY_SIZE(led_matrix_flag_steps) // internals -static bool suspend_state = false; -static uint8_t led_last_enable = UINT8_MAX; -static uint8_t led_last_effect = UINT8_MAX; -static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false}; -static led_task_states led_task_state = SYNCING; +static bool suspend_state = false; +static uint8_t led_last_enable = UINT8_MAX; +static uint8_t led_last_effect = UINT8_MAX; +static uint8_t led_current_effect = 0; +static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false}; +static led_task_states led_task_state = SYNCING; // double buffers static uint32_t led_timer_buffer; @@ -268,6 +269,17 @@ static void led_task_start(void) { g_last_hit_tracker = last_hit_buffer; #endif // LED_MATRIX_KEYREACTIVE_ENABLED + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = suspend_state || +#if LED_MATRIX_TIMEOUT > 0 + (last_input_activity_elapsed() > (uint32_t)LED_MATRIX_TIMEOUT) || +#endif // LED_MATRIX_TIMEOUT > 0 + false; + + // Set effect to be renedered + led_current_effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode; + // next task led_task_state = RENDERING; } @@ -349,15 +361,7 @@ static void led_task_flush(uint8_t effect) { void led_matrix_task(void) { led_task_timers(); - // Ideally we would also stop sending zeros to the LED driver PWM buffers - // while suspended and just do a software shutdown. This is a cheap hack for now. - bool suspend_backlight = suspend_state || -#if LED_MATRIX_TIMEOUT > 0 - (last_input_activity_elapsed() > (uint32_t)LED_MATRIX_TIMEOUT) || -#endif // LED_MATRIX_TIMEOUT > 0 - false; - - uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode; + uint8_t effect = led_current_effect; switch (led_task_state) { case STARTING: diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 19edfb52b0..f517190e35 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -80,11 +80,12 @@ static const uint8_t rgb_matrix_flag_steps[] = RGB_MATRIX_FLAG_STEPS; #define RGB_MATRIX_FLAG_STEPS_COUNT ARRAY_SIZE(rgb_matrix_flag_steps) // internals -static bool suspend_state = false; -static uint8_t rgb_last_enable = UINT8_MAX; -static uint8_t rgb_last_effect = UINT8_MAX; -static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false}; -static rgb_task_states rgb_task_state = SYNCING; +static bool suspend_state = false; +static uint8_t rgb_last_enable = UINT8_MAX; +static uint8_t rgb_last_effect = UINT8_MAX; +static uint8_t rgb_current_effect = 0; +static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false}; +static rgb_task_states rgb_task_state = SYNCING; // double buffers static uint32_t rgb_timer_buffer; @@ -296,6 +297,17 @@ static void rgb_task_start(void) { g_last_hit_tracker = last_hit_buffer; #endif // RGB_MATRIX_KEYREACTIVE_ENABLED + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = suspend_state || +#if RGB_MATRIX_TIMEOUT > 0 + (last_input_activity_elapsed() > (uint32_t)RGB_MATRIX_TIMEOUT) || +#endif // RGB_MATRIX_TIMEOUT > 0 + false; + + // Set effect to be renedered + rgb_current_effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode; + // next task rgb_task_state = RENDERING; } @@ -384,15 +396,7 @@ static void rgb_task_flush(uint8_t effect) { void rgb_matrix_task(void) { rgb_task_timers(); - // Ideally we would also stop sending zeros to the LED driver PWM buffers - // while suspended and just do a software shutdown. This is a cheap hack for now. - bool suspend_backlight = suspend_state || -#if RGB_MATRIX_TIMEOUT > 0 - (last_input_activity_elapsed() > (uint32_t)RGB_MATRIX_TIMEOUT) || -#endif // RGB_MATRIX_TIMEOUT > 0 - false; - - uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode; + uint8_t effect = rgb_current_effect; switch (rgb_task_state) { case STARTING: From cbd55b7890b5679bb35dffabc5b4dd411b46f13e Mon Sep 17 00:00:00 2001 From: Aleks <8698469+aleksbrgt@users.noreply.github.com> Date: Mon, 27 Oct 2025 05:11:57 +0100 Subject: [PATCH 64/95] Restrict mouse timer activation to movement keycodes (#25716) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: フィルターペーパー <76888457+filterpaper@users.noreply.github.com> --- quantum/mousekey.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quantum/mousekey.c b/quantum/mousekey.c index 9649943a0d..863c6baccc 100644 --- a/quantum/mousekey.c +++ b/quantum/mousekey.c @@ -386,7 +386,8 @@ void mousekey_task(void) { void mousekey_on(uint8_t code) { # ifdef MK_KINETIC_SPEED - if (mouse_timer == 0) { + // Start kinetic timer when movement keycodes are pressed + if (mouse_timer == 0 && (IS_MOUSEKEY_MOVE(code) || IS_MOUSEKEY_WHEEL(code))) { mouse_timer = timer_read(); } # endif From acd7ad37e662b2d4dc5c0c6af79232929c84deda Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 28 Oct 2025 23:32:31 +1100 Subject: [PATCH 65/95] Update ChibiOS-Contrib. (#25751) --- lib/chibios-contrib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chibios-contrib b/lib/chibios-contrib index 3ac181e4ca..8d863d9ee4 160000 --- a/lib/chibios-contrib +++ b/lib/chibios-contrib @@ -1 +1 @@ -Subproject commit 3ac181e4ca5cafddaf8b472baa1d09c2b24c77b6 +Subproject commit 8d863d9ee4eecea68ad8d15f7e7c2b451aea79d9 From 8c93a33cd3c77ad3296c84a642d5f889fd13fac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nimish=20G=C3=A5tam?= Date: Sun, 2 Nov 2025 00:17:50 +0100 Subject: [PATCH 66/95] making flowtap timer public so it can be used easily with combos (#25731) --- quantum/action_tapping.c | 7 +++++++ quantum/action_tapping.h | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index b105cd60a9..c2f45ea178 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -883,6 +883,13 @@ static bool flow_tap_key_if_within_term(keyrecord_t *record, uint16_t prev_time) return false; } +// Checks both flow_tap_expired flag and elapsed time to determine +// if the key is within the flow tap term. +bool within_flow_tap_term(uint16_t keycode, keyrecord_t *record) { + uint16_t term = get_flow_tap_term(keycode, record, flow_tap_prev_keycode); + return !flow_tap_expired && TIMER_DIFF_16(record->event.time, flow_tap_prev_time) <= term; +} + // By default, enable Flow Tap for the keys in the main alphas area and Space. // This should work reasonably even if the layout is remapped on the host to an // alt layout or international layout (e.g. Dvorak or AZERTY), where these same diff --git a/quantum/action_tapping.h b/quantum/action_tapping.h index 0cf4aa1200..8220952706 100644 --- a/quantum/action_tapping.h +++ b/quantum/action_tapping.h @@ -169,6 +169,16 @@ uint16_t get_flow_tap_term(uint16_t keycode, keyrecord_t *record, uint16_t prev_ /** Updates the Flow Tap last key and timer. */ void flow_tap_update_last_event(keyrecord_t *record); + +/** + * Checks if the pressed key is within the flow tap term. + * Can be used to avoid triggering combos or other actions within the flow tap term. + * + * @param keycode The keycode of the pressed key. + * @param record The keyrecord of the pressed key. + * @return True if the pressed key is within the flow tap term; false otherwise. + */ +bool within_flow_tap_term(uint16_t keycode, keyrecord_t *record); #endif // FLOW_TAP_TERM #ifdef DYNAMIC_TAPPING_TERM_ENABLE From 5ba424ca17c33ca8f2ba049fceb804315679d3ae Mon Sep 17 00:00:00 2001 From: Tvrd Rad Keyboards <103246902+TvrdRadKeyboards@users.noreply.github.com> Date: Sun, 2 Nov 2025 06:53:04 +0100 Subject: [PATCH 67/95] Add TRKeyboard TRK2 keyboard (#25754) Co-authored-by: Jack Sangdahl Co-authored-by: Joel Challis --- keyboards/trkeyboards/trk2/keyboard.json | 124 ++++++++++++++++++ .../trkeyboards/trk2/keymaps/default/keymap.c | 29 ++++ .../trkeyboards/trk2/keymaps/default/rules.mk | 1 + keyboards/trkeyboards/trk2/readme.md | 26 ++++ 4 files changed, 180 insertions(+) create mode 100644 keyboards/trkeyboards/trk2/keyboard.json create mode 100644 keyboards/trkeyboards/trk2/keymaps/default/keymap.c create mode 100644 keyboards/trkeyboards/trk2/keymaps/default/rules.mk create mode 100644 keyboards/trkeyboards/trk2/readme.md diff --git a/keyboards/trkeyboards/trk2/keyboard.json b/keyboards/trkeyboards/trk2/keyboard.json new file mode 100644 index 0000000000..f62ee53a03 --- /dev/null +++ b/keyboards/trkeyboards/trk2/keyboard.json @@ -0,0 +1,124 @@ +{ + "manufacturer": "Tvrd Rad Keyboards", + "keyboard_name": "Tvrd Rad Keyboards TRK2", + "maintainer": "tvrdrad-keyboards", + "bootloader": "halfkay", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1", "resolution": 2} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["B3", "B2", "D2", "D3", "C6", "C7", "D5", "F6", "F7", "B6", "B5", "B4", "D7", "D6", "D4"], + "rows": ["F5", "F4", "F1", "F0", "B7"] + }, + "processor": "atmega32u4", + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "static_gradient": true + }, + "led_count": 19, + "max_brightness": 120 + }, + "url": "https://www.trkeyboards.com/", + "usb": { + "device_version": "0.0.1", + "pid": "0x0002", + "vid": "0x5452" + }, + "ws2812": { + "pin": "E6" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0.75, "y": 0}, + {"matrix": [0, 1], "x": 1.75, "y": 0}, + {"matrix": [0, 2], "x": 2.75, "y": 0}, + {"matrix": [0, 3], "x": 4, "y": 0}, + {"matrix": [0, 4], "x": 5, "y": 0}, + {"matrix": [0, 5], "x": 6, "y": 0}, + {"matrix": [0, 6], "x": 7, "y": 0}, + {"matrix": [0, 7], "x": 10, "y": 0}, + {"matrix": [0, 8], "x": 11, "y": 0}, + {"matrix": [0, 9], "x": 12, "y": 0}, + {"matrix": [0, 10], "x": 13, "y": 0}, + {"matrix": [0, 11], "x": 14.25, "y": 0}, + {"matrix": [0, 12], "x": 15.25, "y": 0}, + {"matrix": [0, 13], "x": 16.25, "y": 0}, + {"matrix": [0, 14], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0.5, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 2, "y": 1}, + {"matrix": [1, 2], "x": 3.5, "y": 1}, + {"matrix": [1, 3], "x": 4.5, "y": 1}, + {"matrix": [1, 4], "x": 5.5, "y": 1}, + {"matrix": [1, 5], "x": 6.5, "y": 1}, + {"matrix": [1, 6], "x": 9.25, "y": 1}, + {"matrix": [1, 7], "x": 10.25, "y": 1}, + {"matrix": [1, 8], "x": 11.25, "y": 1}, + {"matrix": [1, 9], "x": 12.25, "y": 1}, + {"matrix": [1, 10], "x": 13.25, "y": 1}, + {"matrix": [1, 11], "x": 14.75, "y": 1}, + {"matrix": [1, 12], "x": 15.75, "y": 1}, + {"matrix": [1, 13], "x": 16.75, "y": 1, "w": 1.5}, + {"matrix": [1, 14], "x": 18.25, "y": 1}, + {"matrix": [2, 0], "x": 0.25, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 2, "y": 2}, + {"matrix": [2, 2], "x": 3.75, "y": 2}, + {"matrix": [2, 3], "x": 4.75, "y": 2}, + {"matrix": [2, 4], "x": 5.75, "y": 2}, + {"matrix": [2, 5], "x": 6.75, "y": 2}, + {"matrix": [2, 6], "x": 9.5, "y": 2}, + {"matrix": [2, 7], "x": 10.5, "y": 2}, + {"matrix": [2, 8], "x": 11.5, "y": 2}, + {"matrix": [2, 9], "x": 12.5, "y": 2}, + {"matrix": [2, 10], "x": 18.25, "y": 0}, + {"matrix": [2, 11], "x": 14, "y": 2}, + {"matrix": [2, 12], "x": 15, "y": 2}, + {"matrix": [2, 13], "x": 16, "y": 2, "w": 2.25}, + {"matrix": [2, 14], "x": 18.25, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 1], "x": 2.25, "y": 3}, + {"matrix": [3, 2], "x": 4.25, "y": 3}, + {"matrix": [3, 3], "x": 5.25, "y": 3}, + {"matrix": [3, 4], "x": 6.25, "y": 3}, + {"matrix": [3, 5], "x": 7.25, "y": 3}, + {"matrix": [4, 5], "x": 8.75, "y": 3}, + {"matrix": [3, 6], "x": 9.75, "y": 3}, + {"matrix": [3, 7], "x": 10.75, "y": 3}, + {"matrix": [3, 8], "x": 11.75, "y": 3}, + {"matrix": [3, 9], "x": 12.75, "y": 3}, + {"matrix": [3, 11], "x": 14.5, "y": 3}, + {"matrix": [3, 12], "x": 15.5, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 17.25, "y": 3}, + {"matrix": [3, 14], "x": 18.25, "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": 4.5, "y": 4, "w": 1.25}, + {"matrix": [4, 4], "x": 5.75, "y": 4, "w": 2.75}, + {"matrix": [4, 6], "x": 9, "y": 4, "w": 2.25}, + {"matrix": [4, 8], "x": 11.25, "y": 4}, + {"matrix": [4, 11], "x": 15, "y": 4, "w": 1.25}, + {"matrix": [4, 12], "x": 16.25, "y": 4}, + {"matrix": [4, 13], "x": 17.25, "y": 4}, + {"matrix": [4, 14], "x": 18.25, "y": 4} + ] + } + } +} diff --git a/keyboards/trkeyboards/trk2/keymaps/default/keymap.c b/keyboards/trkeyboards/trk2/keymaps/default/keymap.c new file mode 100644 index 0000000000..0791908af1 --- /dev/null +++ b/keyboards/trkeyboards/trk2/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +// Copyright 2025 Tvrd Rad Keyboards +// 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_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_KP_SLASH, KC_KP_ASTERISK, + 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_MUTE, KC_SCLN, KC_QUOTE, KC_ENTER, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT, KC_UP, KC_DELETE, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_BSPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT( + 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_PMNS, KC_PPLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) }, + [1] = { ENCODER_CCW_CW(_______, _______) } +}; +#endif diff --git a/keyboards/trkeyboards/trk2/keymaps/default/rules.mk b/keyboards/trkeyboards/trk2/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/trkeyboards/trk2/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/trkeyboards/trk2/readme.md b/keyboards/trkeyboards/trk2/readme.md new file mode 100644 index 0000000000..7e6edbac04 --- /dev/null +++ b/keyboards/trkeyboards/trk2/readme.md @@ -0,0 +1,26 @@ +# Tvrd Rad Keyboards TRK2 + +![TRK2](https://i.imgur.com/iO2zIIT.jpeg) + +Custom keyboard designed by Tvrd Rad Keyboards aka TRK2 + +* Keyboard Maintainer: [Tvrd Rad Keyboards](https://www.trkeyboards.com) +* Hardware Supported: TRK2 PCB +* Hardware Availability: https://www.trkeyboards.com/rs/tastature/5-trk2/ + +Make example for this keyboard (after setting up your build environment): + + make trkeyboards/trk2:default + +Flashing example for this keyboard: + + make trkeyboards/trk2: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 +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available From c67e4c2caee2102ba863124bfc60caefeffecae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Jim=C3=A9nez=20Mateo?= Date: Sun, 2 Nov 2025 06:55:16 +0100 Subject: [PATCH 68/95] Add classic48 keyboard (#25492) Co-authored-by: Pablo Jimenez Mateo --- .../pablojimenezmateo/classic48/config.h | 23 +++ .../pablojimenezmateo/classic48/keyboard.json | 152 ++++++++++++++++++ .../classic48/keymaps/default/keymap.c | 72 +++++++++ .../pablojimenezmateo/classic48/readme.md | 28 ++++ 4 files changed, 275 insertions(+) create mode 100644 keyboards/pablojimenezmateo/classic48/config.h create mode 100644 keyboards/pablojimenezmateo/classic48/keyboard.json create mode 100644 keyboards/pablojimenezmateo/classic48/keymaps/default/keymap.c create mode 100644 keyboards/pablojimenezmateo/classic48/readme.md diff --git a/keyboards/pablojimenezmateo/classic48/config.h b/keyboards/pablojimenezmateo/classic48/config.h new file mode 100644 index 0000000000..8716f34b75 --- /dev/null +++ b/keyboards/pablojimenezmateo/classic48/config.h @@ -0,0 +1,23 @@ +/* Copyright 2025 Pablo Jiménez Mateo (@pablojimenezmateo) + * + * 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 EE_HANDS + +#define MK_KINETIC_SPEED +#define MOUSEKEY_INITIAL_SPEED 200 +#define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 2 +#define MOUSEKEY_WHEEL_BASE_MOVEMENTS 16 diff --git a/keyboards/pablojimenezmateo/classic48/keyboard.json b/keyboards/pablojimenezmateo/classic48/keyboard.json new file mode 100644 index 0000000000..ba65022860 --- /dev/null +++ b/keyboards/pablojimenezmateo/classic48/keyboard.json @@ -0,0 +1,152 @@ +{ + "manufacturer": "Pablo Jim\u00e9nez Mateo", + "keyboard_name": "classic48", + "maintainer": "pablojimenezmateo", + "development_board": "promicro_rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["GP23", "GP21", "GP16", "GP15", "GP14", "GP13"], + "rows": ["GP27", "GP26", "GP22", "GP20"] + }, + "rgb_matrix": { + "default": { + "hue": 180, + "sat": 100, + "val": 60 + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 100, "y": 0, "flags": 4}, + {"matrix": [4, 0], "x": 240, "y": 0, "flags": 4}, + {"matrix": [4, 1], "x": 220, "y": 0, "flags": 4}, + {"matrix": [4, 2], "x": 200, "y": 0, "flags": 4}, + {"matrix": [4, 3], "x": 180, "y": 0, "flags": 4}, + {"matrix": [4, 4], "x": 160, "y": 0, "flags": 4}, + {"matrix": [4, 5], "x": 140, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 20, "flags": 4}, + {"matrix": [1, 1], "x": 20, "y": 20, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 20, "flags": 4}, + {"matrix": [1, 3], "x": 60, "y": 20, "flags": 4}, + {"matrix": [1, 4], "x": 80, "y": 20, "flags": 4}, + {"matrix": [1, 5], "x": 100, "y": 20, "flags": 4}, + {"matrix": [5, 0], "x": 240, "y": 20, "flags": 4}, + {"matrix": [5, 1], "x": 220, "y": 20, "flags": 4}, + {"matrix": [5, 2], "x": 200, "y": 20, "flags": 4}, + {"matrix": [5, 3], "x": 180, "y": 20, "flags": 4}, + {"matrix": [5, 4], "x": 160, "y": 20, "flags": 4}, + {"matrix": [5, 5], "x": 140, "y": 20, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 40, "flags": 4}, + {"matrix": [2, 1], "x": 20, "y": 40, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 40, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 40, "flags": 4}, + {"matrix": [2, 4], "x": 80, "y": 40, "flags": 4}, + {"matrix": [2, 5], "x": 100, "y": 40, "flags": 4}, + {"matrix": [6, 0], "x": 240, "y": 40, "flags": 4}, + {"matrix": [6, 1], "x": 220, "y": 40, "flags": 4}, + {"matrix": [6, 2], "x": 200, "y": 40, "flags": 4}, + {"matrix": [6, 3], "x": 180, "y": 40, "flags": 4}, + {"matrix": [6, 4], "x": 160, "y": 40, "flags": 4}, + {"matrix": [6, 5], "x": 140, "y": 40, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 60, "flags": 4}, + {"matrix": [3, 1], "x": 20, "y": 60, "flags": 4}, + {"matrix": [3, 2], "x": 40, "y": 60, "flags": 4}, + {"matrix": [3, 3], "x": 60, "y": 60, "flags": 4}, + {"matrix": [3, 4], "x": 80, "y": 60, "flags": 4}, + {"matrix": [3, 5], "x": 100, "y": 60, "flags": 4}, + {"matrix": [7, 0], "x": 240, "y": 60, "flags": 4}, + {"matrix": [7, 1], "x": 220, "y": 60, "flags": 4}, + {"matrix": [7, 2], "x": 200, "y": 60, "flags": 4}, + {"matrix": [7, 3], "x": 180, "y": 60, "flags": 4}, + {"matrix": [7, 4], "x": 160, "y": 60, "flags": 4}, + {"matrix": [7, 5], "x": 140, "y": 60, "flags": 4} + ], + "max_brightness": 200 + }, + "split": { + "enabled": true, + "serial": { + "driver": "vendor", + "pin": "GP28" + }, + "transport": { + "sync": { + "layer_state": true + } + } + }, + "url": "https://github.com/pablojimenezmateo/classic48", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "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": [4, 5], "x": 7, "y": 0}, + {"matrix": [4, 4], "x": 8, "y": 0}, + {"matrix": [4, 3], "x": 9, "y": 0}, + {"matrix": [4, 2], "x": 10, "y": 0}, + {"matrix": [4, 1], "x": 11, "y": 0}, + {"matrix": [4, 0], "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": [5, 5], "x": 7, "y": 1}, + {"matrix": [5, 4], "x": 8, "y": 1}, + {"matrix": [5, 3], "x": 9, "y": 1}, + {"matrix": [5, 2], "x": 10, "y": 1}, + {"matrix": [5, 1], "x": 11, "y": 1}, + {"matrix": [5, 0], "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": [6, 5], "x": 7, "y": 2}, + {"matrix": [6, 4], "x": 8, "y": 2}, + {"matrix": [6, 3], "x": 9, "y": 2}, + {"matrix": [6, 2], "x": 10, "y": 2}, + {"matrix": [6, 1], "x": 11, "y": 2}, + {"matrix": [6, 0], "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": [7, 5], "x": 7, "y": 3}, + {"matrix": [7, 4], "x": 8, "y": 3}, + {"matrix": [7, 3], "x": 9, "y": 3}, + {"matrix": [7, 2], "x": 10, "y": 3}, + {"matrix": [7, 1], "x": 11, "y": 3}, + {"matrix": [7, 0], "x": 12, "y": 3} + ] + } + } +} diff --git a/keyboards/pablojimenezmateo/classic48/keymaps/default/keymap.c b/keyboards/pablojimenezmateo/classic48/keymaps/default/keymap.c new file mode 100644 index 0000000000..20dbf6269e --- /dev/null +++ b/keyboards/pablojimenezmateo/classic48/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2025 Pablo Jiménez Mateo (@pablojimenezmateo) + * + * 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 layer_names { + _MAIN, + _NUMBERS, + _SYMBOLS, + _NAVIGATION +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT( + KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO, + 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_ESCAPE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, + LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_NO, MO(_NUMBERS), LT(3, KC_SPC), LT(2, KC_ENTER), KC_LSFT, KC_NO, KC_LGUI, KC_NO, LCTL(KC_F) + ), + [_NUMBERS] = LAYOUT( + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, KC_NO, + KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, KC_NO, + KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [_SYMBOLS] = LAYOUT( + KC_NO, KC_PIPE, KC_AT, KC_LCBR, KC_RCBR, KC_CIRC, KC_QUOT, KC_DQUO, KC_EQL, KC_AMPR, KC_ASTR, KC_GRV, + KC_NO, KC_EXLM, KC_EXLM, KC_LPRN, KC_RPRN, KC_DLR, KC_EXLM, KC_QUES, KC_SLSH, KC_COLN, KC_SCLN, KC_PLUS, + KC_NO, KC_HASH, KC_PERC, KC_LBRC, KC_RBRC, KC_TILD, KC_LT, KC_GT, KC_MINS, KC_UNDS, KC_BSLS, KC_PSCR, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QK_BOOT + ), + [_NAVIGATION] = LAYOUT( + KC_NO, KC_NO, MS_BTN4, MS_UP, MS_BTN5, KC_NO, LSFT(KC_LEFT), LALT(KC_DOWN), LALT(KC_UP), LSFT(KC_RGHT), KC_NO, KC_VOLU, + KC_NO, KC_NO, MS_LEFT, MS_DOWN, MS_RGHT, KC_LEFT_CTRL, KC_HOME, MS_BTN1, MS_BTN3, MS_BTN2, KC_END, KC_VOLD, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_BRIU, + LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_NO, KC_NO, KC_NO, MS_WHLD, MS_WHLU, KC_NO, KC_NO, KC_NO, KC_BRID + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _MAIN: + /* Yellow */ + rgb_matrix_sethsv_noeeprom(50, 255, 255); break; + case _NUMBERS: + /* Cyan */ + rgb_matrix_sethsv_noeeprom(170, 255, 255); break; + case _SYMBOLS: + /* Purple */ + rgb_matrix_sethsv_noeeprom(200, 255, 255); break; + case _NAVIGATION: + /* Green */ + rgb_matrix_sethsv_noeeprom(85, 255, 255); break; + default: + /* Off */ + rgb_matrix_sethsv_noeeprom(0, 0, 0); break; + } + return state; +} diff --git a/keyboards/pablojimenezmateo/classic48/readme.md b/keyboards/pablojimenezmateo/classic48/readme.md new file mode 100644 index 0000000000..ff3dd072c5 --- /dev/null +++ b/keyboards/pablojimenezmateo/classic48/readme.md @@ -0,0 +1,28 @@ +# pablojimenezmateo/classic48 + +![pablojimenezmateo/classic48](https://i.imgur.com/czFWWhX.jpeg) + +A custom split keyboard with 48 keys and addressable LEDs. + +* Keyboard Maintainer: [Pablo Jimenez Mateo](https://github.com/pablojimenezmateo) +* Hardware Supported: RP2040 Pro Micro +* Hardware Availability: https://github.com/pablojimenezmateo/classic48 + +Make example for this keyboard (after setting up your build environment): + + make pablojimenezmateo/classic48:default + +Flashing example for this keyboard: + + qmk flash -kb pablojimenezmateo/classic48 -km default -bl uf2-split-left + qmk flash -kb pablojimenezmateo/classic48 -km default -bl uf2-split-right + +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 547d75145bb8b1ab9fde7c7f485f873d70d7d4d7 Mon Sep 17 00:00:00 2001 From: Alin Marin Elena Date: Tue, 4 Nov 2025 03:45:08 +0000 Subject: [PATCH 69/95] add SteelSeries prime, a stripped down prime+ (#24719) --- keyboards/steelseries/prime/board.h | 9 +++ keyboards/steelseries/prime/config.h | 23 +++++++ keyboards/steelseries/prime/halconf.h | 9 +++ keyboards/steelseries/prime/keyboard.json | 58 +++++++++++++++++ .../prime/keymaps/default/keymap.c | 29 +++++++++ .../prime/keymaps/default/rules.mk | 1 + keyboards/steelseries/prime/mcuconf.h | 15 +++++ keyboards/steelseries/prime/prime.c | 16 +++++ keyboards/steelseries/prime/readme.md | 41 ++++++++++++ keyboards/steelseries/prime/rgblight_custom.c | 65 +++++++++++++++++++ keyboards/steelseries/prime/rules.mk | 5 ++ 11 files changed, 271 insertions(+) create mode 100644 keyboards/steelseries/prime/board.h create mode 100644 keyboards/steelseries/prime/config.h create mode 100644 keyboards/steelseries/prime/halconf.h create mode 100644 keyboards/steelseries/prime/keyboard.json create mode 100644 keyboards/steelseries/prime/keymaps/default/keymap.c create mode 100644 keyboards/steelseries/prime/keymaps/default/rules.mk create mode 100644 keyboards/steelseries/prime/mcuconf.h create mode 100644 keyboards/steelseries/prime/prime.c create mode 100644 keyboards/steelseries/prime/readme.md create mode 100644 keyboards/steelseries/prime/rgblight_custom.c create mode 100644 keyboards/steelseries/prime/rules.mk diff --git a/keyboards/steelseries/prime/board.h b/keyboards/steelseries/prime/board.h new file mode 100644 index 0000000000..edb9e1072c --- /dev/null +++ b/keyboards/steelseries/prime/board.h @@ -0,0 +1,9 @@ +// Copyright 2024 Dasky (@daskygit) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_HSECLK +#define STM32_HSECLK 12000000 diff --git a/keyboards/steelseries/prime/config.h b/keyboards/steelseries/prime/config.h new file mode 100644 index 0000000000..2e041f4a46 --- /dev/null +++ b/keyboards/steelseries/prime/config.h @@ -0,0 +1,23 @@ +// Copyright 2024 Dasky (@daskygit) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define POINTING_DEVICE_CS_PIN A4 +#define POINTING_DEVICE_MOTION_PIN B0 +#define POINTING_DEVICE_TASK_THROTTLE_MS 1 + +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_MOSI_PIN A7 +#define SPI_MISO_PIN A6 + +#define RGB_PWM_DRIVER PWMD1 +#define RGB_BLUE_PIN A10 +#define RGB_BLUE_PWM_CHANNEL 3 +#define RGB_GREEN_PIN A8 +#define RGB_GREEN_PWM_CHANNEL 1 +#define RGB_RED_PIN A9 +#define RGB_RED_PWM_CHANNEL 2 + +#define OPTICAL_SW_PWR A2 diff --git a/keyboards/steelseries/prime/halconf.h b/keyboards/steelseries/prime/halconf.h new file mode 100644 index 0000000000..e1498a877a --- /dev/null +++ b/keyboards/steelseries/prime/halconf.h @@ -0,0 +1,9 @@ +// Copyright 2024 Dasky (@daskygit) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_SPI TRUE +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/steelseries/prime/keyboard.json b/keyboards/steelseries/prime/keyboard.json new file mode 100644 index 0000000000..e267b7506a --- /dev/null +++ b/keyboards/steelseries/prime/keyboard.json @@ -0,0 +1,58 @@ +{ + "manufacturer": "SteelSeries", + "keyboard_name": "Prime", + "maintainer": "Dasky", + "bootloader": "uf2boot", + "build": { + "debounce_type": "asym_eager_defer_pk", + "lto": true + }, + "encoder": { + "rotary": [ + {"pin_a": "B5", "pin_b": "B4", "resolution": 2} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "pointing_device": true, + "rgblight": true + }, + "matrix_pins": { + "direct": [ + ["A0", "C15", "A1", "C13", "C14", "A3"] + ] + }, + "processor": "STM32F103", + "rgblight": { + "animations": { + "breathing": true, + "rainbow_mood": true + }, + "default": { + "animation": "rainbow_mood" + }, + "driver": "custom", + "led_count": 1 + }, + "url": "https://steelseries.com/gaming-mice/prime", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "Left Click", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "Middle Click", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "Right Click", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "Side forward", "matrix": [0, 3], "x": 0, "y": 2}, + {"label": "Side back", "matrix": [0, 4], "x": 0, "y": 3}, + {"label": "boot", "matrix": [0, 5], "x": 1, "y": 1} + ] + } + } +} diff --git a/keyboards/steelseries/prime/keymaps/default/keymap.c b/keyboards/steelseries/prime/keymaps/default/keymap.c new file mode 100644 index 0000000000..803f6b47da --- /dev/null +++ b/keyboards/steelseries/prime/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +// Copyright 2024 Dasky (@daskygit) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Left, Middle, Right, + // Forward + // Back + // Underneath + [0] = LAYOUT( + MS_BTN1, MS_BTN3, MS_BTN2, + MS_BTN5, + MS_BTN4, + QK_BOOT + ) +}; +// clang-format on + +void pointing_device_init_kb(void) { + pointing_device_set_cpi(1600); +} + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = {ENCODER_CCW_CW(MS_WHLU, MS_WHLD)}, +}; +#endif diff --git a/keyboards/steelseries/prime/keymaps/default/rules.mk b/keyboards/steelseries/prime/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/steelseries/prime/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/steelseries/prime/mcuconf.h b/keyboards/steelseries/prime/mcuconf.h new file mode 100644 index 0000000000..f49ef0edf7 --- /dev/null +++ b/keyboards/steelseries/prime/mcuconf.h @@ -0,0 +1,15 @@ +// Copyright 2024 Dasky (@daskygit) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_PWM_USE_TIM1 +#define STM32_PWM_USE_TIM1 TRUE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_PLLMUL_VALUE +#define STM32_PLLMUL_VALUE 6 diff --git a/keyboards/steelseries/prime/prime.c b/keyboards/steelseries/prime/prime.c new file mode 100644 index 0000000000..11c528eea8 --- /dev/null +++ b/keyboards/steelseries/prime/prime.c @@ -0,0 +1,16 @@ +// Copyright 2024 Dasky (@daskygit) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + + +void board_init(void) { + + gpio_set_pin_output(A15); + gpio_write_pin_high(A15); // Activate D+ pullup + + gpio_set_pin_output(OPTICAL_SW_PWR); + gpio_write_pin_low(OPTICAL_SW_PWR); // Enable power for optical switches + +} + diff --git a/keyboards/steelseries/prime/readme.md b/keyboards/steelseries/prime/readme.md new file mode 100644 index 0000000000..e5a70afd4c --- /dev/null +++ b/keyboards/steelseries/prime/readme.md @@ -0,0 +1,41 @@ +# SteelSeries Prime + +![Prime](https://i.imgur.com/rPIKok3.jpeg) + +Erase with an stlink and flash this [uf2boot bootloader](https://github.com/daskygit/uf2-prime-plus), this is a a one way procedure voiding any warranty so be sure you don't want to use the original manufacturers firmware. + +you may need to remove write protection to flash, e.g. with openocd in linux + +```sh +openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c "init; reset halt; stm32f1x unlock 0; flash protect 0 0 last off; reset halt; exit" + +``` + +and write the new bootloader + +```sh + +openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c "program build/PRIME_PLUS/uf2boot.bin verify reset exit 0x8000000" + +``` + +* Keyboard Maintainer: [Dasky](https://github.com/daskygit) +* Hardware Supported: SteelSeries Prime +* Hardware Availability: https://steelseries.com/gaming-mice/prime + +Make example for this keyboard (after setting up your build environment): + + make steelseries/prime:default + +Flashing example for this keyboard: + + make steelseries/prime: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 left mouse button and plug in. +* **Bootloader entry**: Hold the underneath button while plugging in. diff --git a/keyboards/steelseries/prime/rgblight_custom.c b/keyboards/steelseries/prime/rgblight_custom.c new file mode 100644 index 0000000000..2736052587 --- /dev/null +++ b/keyboards/steelseries/prime/rgblight_custom.c @@ -0,0 +1,65 @@ +// Copyright 2024 Dasky (@daskygit) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include "chibios_config.h" +#include "gpio.h" +#include "color.h" +#include "rgblight_drivers.h" + +static PWMConfig pwmCFG = { + .frequency = 0xFFFF, + .period = 256, +}; + +rgb_t prime_leds[RGBLIGHT_LED_COUNT]; + +void init_custom(void) { + palSetPadMode(PAL_PORT(RGB_RED_PIN), PAL_PAD(RGB_RED_PIN), PAL_MODE_ALTERNATE_PUSHPULL); + palSetPadMode(PAL_PORT(RGB_GREEN_PIN), PAL_PAD(RGB_GREEN_PIN), PAL_MODE_ALTERNATE_PUSHPULL); + palSetPadMode(PAL_PORT(RGB_BLUE_PIN), PAL_PAD(RGB_BLUE_PIN), PAL_MODE_ALTERNATE_PUSHPULL); + pwmCFG.channels[RGB_RED_PWM_CHANNEL - 1].mode = PWM_OUTPUT_ACTIVE_HIGH; + pwmCFG.channels[RGB_GREEN_PWM_CHANNEL - 1].mode = PWM_OUTPUT_ACTIVE_HIGH; + pwmCFG.channels[RGB_BLUE_PWM_CHANNEL - 1].mode = PWM_OUTPUT_ACTIVE_HIGH; + pwmStart(&RGB_PWM_DRIVER, &pwmCFG); +} + +void set_color_custom(int index, uint8_t red, uint8_t green, uint8_t blue) { + prime_leds[index].r = red; + prime_leds[index].g = green; + prime_leds[index].b = blue; +} + +void set_color_all_custom(uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < RGBLIGHT_LED_COUNT; i++) { + set_color_custom(i, red, green, blue); + } +} + +void flush_custom(void) { + if (prime_leds[0].r == 0) { + pwmDisableChannel(&RGB_PWM_DRIVER, RGB_RED_PWM_CHANNEL - 1); + } else { + uint32_t duty = ((uint32_t)0xFFFF * prime_leds[0].r) / 0xFF; + pwmEnableChannel(&RGB_PWM_DRIVER, RGB_RED_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&RGB_PWM_DRIVER, 0xFFFF, duty)); + } + if (prime_leds[0].g == 0) { + pwmDisableChannel(&RGB_PWM_DRIVER, RGB_GREEN_PWM_CHANNEL - 1); + } else { + uint32_t duty = ((uint32_t)0xFFFF * prime_leds[0].g) / 0xFF; + pwmEnableChannel(&RGB_PWM_DRIVER, RGB_GREEN_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&RGB_PWM_DRIVER, 0xFFFF, duty)); + } + if (prime_leds[0].b == 0) { + pwmDisableChannel(&RGB_PWM_DRIVER, RGB_BLUE_PWM_CHANNEL - 1); + } else { + uint32_t duty = ((uint32_t)0xFFFF * prime_leds[0].b) / 0xFF; + pwmEnableChannel(&RGB_PWM_DRIVER, RGB_BLUE_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&RGB_PWM_DRIVER, 0xFFFF, duty)); + } +} + +const rgblight_driver_t rgblight_driver = { + .init = init_custom, + .set_color = set_color_custom, + .set_color_all = set_color_all_custom, + .flush = flush_custom, +}; diff --git a/keyboards/steelseries/prime/rules.mk b/keyboards/steelseries/prime/rules.mk new file mode 100644 index 0000000000..5ab86b1b69 --- /dev/null +++ b/keyboards/steelseries/prime/rules.mk @@ -0,0 +1,5 @@ +MCU_LDSCRIPT = STM32F103xB_uf2boot + +POINTING_DEVICE_DRIVER = pmw3389 + +SRC += rgblight_custom.c From 01d81b95508f8411490467fe785b84d73495bdb9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 6 Nov 2025 18:36:07 +0000 Subject: [PATCH 70/95] Rework converter docs (#18314) --- docs/feature_converters.md | 342 +++++++++++++++++------- docs/public/pin_compatible_elite_c.svg | 61 +++++ docs/public/pin_compatible_promicro.svg | 61 +++++ 3 files changed, 366 insertions(+), 98 deletions(-) create mode 100644 docs/public/pin_compatible_elite_c.svg create mode 100644 docs/public/pin_compatible_promicro.svg diff --git a/docs/feature_converters.md b/docs/feature_converters.md index 06cc7b3a11..4e0a23752c 100644 --- a/docs/feature_converters.md +++ b/docs/feature_converters.md @@ -2,8 +2,22 @@ This page documents the automated process for converting keyboards to use drop-in replacement controllers. This process is designed to be easy to use and can be completed in a few simple steps. +You can generate the firmware by appending `-e CONVERT_TO=` to your compile/flash command. For example: + +```sh +qmk flash -c -kb keebio/bdn9/rev1 -km default -e CONVERT_TO=proton_c +``` + +You can also configure this within your [keymap](#keymap) to accomplish the same thing. + +::: tip +If you get build errors, you will need to convert the keyboard's code to be [compatible](#keyboard-req) with the converter feature, or provide additional [keymap](#keymap-add) configuration. +::: + ## Supported Converters +Each converter category is broken down by its declared `pin compatibility`. This ensures that only valid combinations are attempted. + The following converters are available at this time: | From | To | @@ -28,86 +42,56 @@ The following converters are available at this time: | `elite_c` | `helios` | | `elite_c` | `liatris` | +## Configuration -## Overview +Configuring a converter to use can be done by adding one of the following lines to your keymaps's configuration: -Each converter category is broken down by its declared `pin compatibility`. This ensures that only valid combinations are attempted. You can generate the firmware by appending `-e CONVERT_TO=` to your compile/flash command. For example: +:::::tabs -```sh -qmk flash -c -kb keebio/bdn9/rev1 -km default -e CONVERT_TO=proton_c +==== keymap.json + +```json [keymap.json] +{ + "version": 1, + "keyboard": "keebio/bdn9/rev1", + "keymap": "keebio_bdn9_rev1_layout_2025-05-20", + "converter": "proton_c", // [!code focus] + "layout": "LAYOUT", +} ``` -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](drivers/gpio) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. -::: - -### Conditional Configuration - -Once a converter is enabled, it exposes the `CONVERT_TO_` flag that you can use in your code with `#ifdef`s, For example: - -```c -#ifdef CONVERT_TO_PROTON_C - // Proton C code -#else - // Pro Micro code -#endif -``` - -### Pin Compatibility - -To ensure compatibility, provide validation, and enable future workflows, a keyboard should declare its `pin compatibility`. For legacy reasons, this is currently assumed to be `promicro`. The following pin compatibility interfaces are currently defined: - -| Pin Compatibility | Notes | -|-------------------|-----------------------------------| -| `promicro` | Includes RX/TX LEDs | -| `elite_c` | Includes bottom row pins, no LEDs | - -To declare the base for conversions, add this line to your keyboard's `rules.mk`: +==== rules.mk ```makefile -PIN_COMPATIBLE = elite_c +CONVERT_TO = proton_c ``` -## Pro Micro +::::: -If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.com/products/12640) (or compatible board), the supported alternative controllers are: +::: tip +If you get build errors, you will need to convert the keyboard's code to be [compatible](#keyboard-req) with the converter feature, or provide additional [keymap](#keymap-add) configuration. +::: -| Device | Target | -|------------------------------------------------------------------------------------------|-------------------| -| [Proton C](https://qmk.fm/proton-c/) | `proton_c` | -| [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) | `kb2040` | -| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `sparkfun_pm2040` | -| [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) | `blok` | -| [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` | -| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` | -| [customMK Bonsai C4](https://shop.custommk.com/products/bonsai-c4-microcontroller-board) | `bonsai_c4` | -| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` | -| [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` | -| [Liatris](https://splitkb.com/products/liatris) | `liatris` | -| [Imera](https://splitkb.com/products/imera) | `imera` | -| [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` | -| [Svlinky](https://github.com/sadekbaroudi/svlinky) | `svlinky` | +## Pro Micro Converters -Converter summary: +If a board currently supported by QMK uses a [Pro Micro](https://www.sparkfun.com/products/12640) (or compatible board), the supported alternative controllers are: -| Target | Argument | `rules.mk` | Condition | -|-------------------|---------------------------------|------------------------------|-------------------------------------| -| `proton_c` | `-e CONVERT_TO=proton_c` | `CONVERT_TO=proton_c` | `#ifdef CONVERT_TO_PROTON_C` | -| `kb2040` | `-e CONVERT_TO=kb2040` | `CONVERT_TO=kb2040` | `#ifdef CONVERT_TO_KB2040` | -| `sparkfun_pm2040` | `-e CONVERT_TO=sparkfun_pm2040` | `CONVERT_TO=sparkfun_pm2040` | `#ifdef CONVERT_TO_SPARKFUN_PM2040` | -| `blok` | `-e CONVERT_TO=blok` | `CONVERT_TO=blok` | `#ifdef CONVERT_TO_BLOK` | -| `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` | -| `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` | -| `bonsai_c4` | `-e CONVERT_TO=bonsai_c4` | `CONVERT_TO=bonsai_c4` | `#ifdef CONVERT_TO_BONSAI_C4` | -| `rp2040_ce` | `-e CONVERT_TO=rp2040_ce` | `CONVERT_TO=rp2040_ce` | `#ifdef CONVERT_TO_RP2040_CE` | -| `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` | -| `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` | -| `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` | -| `imera` | `-e CONVERT_TO=imera` | `CONVERT_TO=imera` | `#ifdef CONVERT_TO_IMERA` | -| `michi` | `-e CONVERT_TO=michi` | `CONVERT_TO=michi` | `#ifdef CONVERT_TO_MICHI` | -| `svlinky` | `-e CONVERT_TO=svlinky` | `CONVERT_TO=svlinky` | `#ifdef CONVERT_TO_SVLINKY` | +| Device | Target | CLI Argument | `rules.mk` | Condition | +|------------------------------------------------------------------------------------------|-------------------|---------------------------------|------------------------------|-------------------------------------| +| [Proton C](https://qmk.fm/proton-c/) | `proton_c` | `-e CONVERT_TO=proton_c` | `CONVERT_TO=proton_c` | `#ifdef CONVERT_TO_PROTON_C` | +| [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) | `kb2040` | `-e CONVERT_TO=kb2040` | `CONVERT_TO=kb2040` | `#ifdef CONVERT_TO_KB2040` | +| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `sparkfun_pm2040` | `-e CONVERT_TO=sparkfun_pm2040` | `CONVERT_TO=sparkfun_pm2040` | `#ifdef CONVERT_TO_SPARKFUN_PM2040` | +| [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) | `blok` | `-e CONVERT_TO=blok` | `CONVERT_TO=blok` | `#ifdef CONVERT_TO_BLOK` | +| [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` | +| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` | +| [customMK Bonsai C4](https://shop.custommk.com/products/bonsai-c4-microcontroller-board) | `bonsai_c4` | `-e CONVERT_TO=bonsai_c4` | `CONVERT_TO=bonsai_c4` | `#ifdef CONVERT_TO_BONSAI_C4` | +| [RP2040 Community Edition](#rp2040_ce) | `rp2040_ce` | `-e CONVERT_TO=rp2040_ce` | `CONVERT_TO=rp2040_ce` | `#ifdef CONVERT_TO_RP2040_CE` | +| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` | +| [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` | +| [Liatris](https://splitkb.com/products/liatris) | `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` | +| [Imera](https://splitkb.com/products/imera) | `imera` | `-e CONVERT_TO=imera` | `CONVERT_TO=imera` | `#ifdef CONVERT_TO_IMERA` | +| [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` | `-e CONVERT_TO=michi` | `CONVERT_TO=michi` | `#ifdef CONVERT_TO_MICHI` | +| [Svlinky](https://github.com/sadekbaroudi/svlinky) | `svlinky` | `-e CONVERT_TO=svlinky` | `CONVERT_TO=svlinky` | `#ifdef CONVERT_TO_SVLINKY` | ### Proton C {#proton_c} @@ -119,26 +103,26 @@ The Proton C only has one on-board LED (C13), and by default, the TXLED (D5) is The following defaults are based on what has been implemented for STM32 boards. -| Feature | Notes | -|----------------------------------------------|------------------------------------------------------------------------------------------------------------------| -| [Audio](features/audio) | Enabled | -| [RGB Lighting](features/rgblight) | Disabled | +| Feature | Notes | +|--------------------------------------------|----------------------------------------------------------------------------------------------------------------| +| [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](features/split_keyboard) | Partial - heavily dependent on enabled features | +| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | +| [Split keyboards](features/split_keyboard) | Partial - heavily dependent on enabled features | ### Adafruit KB2040 {#kb2040} The following defaults are based on what has been implemented for [RP2040](platformdev_rp2040) boards. -| Feature | Notes | -|----------------------------------------------|------------------------------------------------------------------------------------------------------------------| -| [RGB Lighting](features/rgblight) | Enabled via `PIO` vendor driver | +| Feature | Notes | +|--------------------------------------------|----------------------------------------------------------------------------------------------------------------| +| [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](features/split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features | +| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | +| [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 {#sparkfun_pm2040 } +### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#sparkfun_pm2040} Feature set is identical to [Adafruit KB2040](#kb2040). @@ -177,31 +161,193 @@ Feature set is identical to [Adafruit KB2040](#kb2040). VBUS detection is enable Feature set is a pro micro equivalent of the [RP2040 Community Edition](#rp2040_ce), except that two of the analog GPIO have been replaced with digital only GPIO. These two were moved to the FPC connector to support the [VIK specification](https://github.com/sadekbaroudi/vik). This means that if you are expecting analog support on all 4 pins as provided on a RP2040 Community Edition pinout, you will not have that. Please see the [Svlinky github page](https://github.com/sadekbaroudi/svlinky) for more details. -## Elite-C +## Elite-C Converters -If a board currently supported in QMK uses an [Elite-C](https://keeb.io/products/elite-c-low-profile-version-usb-c-pro-micro-replacement-atmega32u4), the supported alternative controllers are: +If a board currently supported by QMK uses an [Elite-C](https://keeb.io/products/elite-c-low-profile-version-usb-c-pro-micro-replacement-atmega32u4), the supported alternative controllers are: -| Device | Target | -|----------------------------------------------------------------------------------|-------------------| -| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` | -| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` | -| [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` | -| [Liatris](https://splitkb.com/products/liatris) | `liatris` | +| Device | Target | CLI Argument | `rules.mk` | Condition | +|----------------------------------------------------------------------------------|-------------|---------------------------|------------------------|-------------------------------| +| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` | +| [RP2040 Community Edition](#rp2040_ce_elite) | `rp2040_ce` | `-e CONVERT_TO=rp2040_ce` | `CONVERT_TO=rp2040_ce` | `#ifdef CONVERT_TO_RP2040_CE` | +| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` | +| [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` | +| [Liatris](https://splitkb.com/products/liatris) | `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` | -Converter summary: - -| Target | Argument | `rules.mk` | Condition | -|-------------------|---------------------------------|------------------------------|-------------------------------------| -| `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` | -| `rp2040_ce` | `-e CONVERT_TO=rp2040_ce` | `CONVERT_TO=rp2040_ce` | `#ifdef CONVERT_TO_RP2040_CE` | -| `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` | -| `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` | -| `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` | - -### STeMCell {#stemcell}_elite +### STeMCell {#stemcell_elite} Identical to [Pro Micro - STeMCell](#stemcell) with support for the additional bottom row of pins. ### RP2040 Community Edition {#rp2040_ce_elite} Identical to [Pro Micro - RP2040 Community Edition](#rp2040_ce) with support for the additional bottom row of pins. + +## Advanced Topics + +### Keyboard Configuration + +To configure a keyboard to allow the converter feature, add the following line to your keyboard's `.json` configuration: + +```json [keyboard.json] +{ + "maintainer": "QMK", + "development_board": "promicro", // [!code focus] + "diode_direction": "COL2ROW", +} +``` + +See the [pin compatibility](#pin_compatible) for more information. + +#### Additional Requirements {#keyboard-req} + +Keyboards must use the platform agnostic abstractions provided by QMK. This includes: + +* Use of [GPIO Controls](drivers/gpio). + +### Additional Keymap Configuration {#keymap-add} + +While effort has been made to make converters as compatible as possible, sometimes additional platform specific configuration is required. + +For example, enabling hardware peripherals by adding a keymap level `mcuconf.h` with something like the following: +```c +#pragma once + +#include_next + +#undef RP_SIO_USE_UART0 +#define RP_SIO_USE_UART0 TRUE +``` + +You can find details on how to configure drivers on their respective pages. + +Alternatively, you may have to disable incompatible features. For example: + +:::::tabs + +==== keymap.json + +```json [keymap.json] +{ + "version": 1, + "keyboard": "keebio/bdn9/rev1", + "keymap": "keebio_bdn9_rev1_layout_2025-05-20", + "converter": "proton_c", + "config": { // [!code focus] + "features": { // [!code focus] + "audio": false // [!code focus] + } + } + "layout": "LAYOUT", +} +``` + +==== rules.mk + +```makefile +AUDIO_ENABLE = no +``` + +::::: + +### Conditional Configuration + +Once a converter is enabled, it exposes the `CONVERT_TO_` flag that you can use in your code with `#ifdef`s, For example: + +```c +#ifdef CONVERT_TO_PROTON_C + // Proton C code +#else + // Pro Micro code +#endif +``` + +### Pin Compatibility {#pin_compatible} + +To ensure compatibility, provide validation, and power future workflows, a keyboard should declare its `pin compatibility`. This ensures that only valid combinations are attempted. + +::: tip Note +This will already be configured for you if are using the `promicro` development board preset. +::: + +To declare the base interface for conversions, add the following line to your keyboard's configuration: + +```json [keyboard.json] +{ + "maintainer": "QMK", + "development_board": "elite_c", // [!code focus] + "pin_compatible": "elite_c", // [!code focus] + "diode_direction": "COL2ROW", +} +``` + +The above example, configures a keyboard for a default of `elite_c` while allowing any of the `elite_c` converter targets. + +The framework then allows mapping of pins from `` to converter ``. + +::: warning +Mapped pins should adhere strictly to the defined interface, any extras present on the hardware should be ignored. +::: + +#### Available Pin Compatibility + +:::::tabs + +==== promicro + +![promicro](/pin_compatible_promicro.svg) + + + +::: info Notes: +Includes LEDs - these may be mapped to unused/unavailable pins when not present. +::: + +==== elite_c + +![elite_c](/pin_compatible_elite_c.svg) + + + +::: info Notes: +Includes bottom row pins, no LEDs. +::: + +::::: diff --git a/docs/public/pin_compatible_elite_c.svg b/docs/public/pin_compatible_elite_c.svg new file mode 100644 index 0000000000..cb54d9dfe4 --- /dev/null +++ b/docs/public/pin_compatible_elite_c.svg @@ -0,0 +1,61 @@ +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 0000000000..044b265a57 --- /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 71/95] 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 458b442d59..3eed847f07 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 cbfbcc8140..f5068902d5 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 72/95] 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 173c696e2d..ce8c8efa68 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 4874d7c1d3..f4fa9064e0 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 a0b1e73dcc..7ff6d0df08 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 6e35013bc2e30af022cdb8c176e869c5c94ee17a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 8 Nov 2025 20:48:48 +0000 Subject: [PATCH 73/95] 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 a7bfc335df..d97f067be8 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 9c0e1ac72e..8a7d0968b1 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 f0342254fa..ba6f908bbb 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 358a22fd1d..16084bded1 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 59a64095e7..e6d51e1239 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 'matrix_pins' not in info_data: + info_data['matrix_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 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 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 74/95] [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 1c6e86d876..8a0c93e5ac 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 bc2c505040..2aa628c535 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 dd82c9ec99..aacafbe2ff 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 7616486c6d..a459c438c1 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 c2f45ea178..5d43dd99ea 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 8220952706..227e3330e1 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 0996ff908e..00cec24e3f 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 0000000000..e4bcba13c1 --- /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 0000000000..c03d99f686 --- /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 0000000000..db65374618 --- /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 0000000000..c92ed5a2d0 --- /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 0000000000..6988484226 --- /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 0000000000..ad8675da9d --- /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 0000000000..0433a2548d --- /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 0000000000..5b16a60687 --- /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 0000000000..7a19bcab59 --- /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 0000000000..b81485865b --- /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 0000000000..b20ddbdcad --- /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 0000000000..9bc3366e14 --- /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 0000000000..de70bf09fd --- /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 75/95] 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 ad74d0e481..75823c682b 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 dbe1cd42fa..5f6094bc81 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 9136f4a7b9..e5caa995cf 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 20850859b5..a44051b82a 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 1ddcf57382f94548aba23871c57c7ce835f203b9 Mon Sep 17 00:00:00 2001 From: Chaser Huang Date: Tue, 11 Nov 2025 07:30:42 -0500 Subject: [PATCH 76/95] [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 a642ced43e..fa7373a4bd 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 f8e8256ac8..20e90c6e14 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 77/95] [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 8073a038a2..2fb24e58bb 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 fea23cbd02..4756796ea4 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 e4f7f39ddb..3a7f51f9f0 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 ce8c8efa68..e0c9373165 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 5720bc3c4c..b8cded99fc 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 e13f4b548e..3e442ba033 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 e2d0c4112e..b95750306a 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 78/95] 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 2b7e29aa7e..7c016e5a2f 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 79/95] 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 0fe7cdc247..4964f59217 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 c14345d075..138f363346 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 88aa4ddfc9..b581015b54 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 8f4e6eb8a4..8e5923c14e 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 df59752ce0..382cb2b960 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 d49d9d0b77..65c5560556 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 90319d52e6..4414fa2832 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 3916d18366..067a278381 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 12933c4b57..66e8f7e8da 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 33131fa3e2..96cf622743 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 803f6b47da..0855107bf7 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 803f6b47da..0855107bf7 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 7bafe6b191..f21b7e3411 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 80/95] 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 f5068902d5..90b910e960 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 81/95] 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 1da13997b5..cd4e67a4bd 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 d6dcddcdf0..eedbf59b95 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 0000000000..57f89a12d6 --- /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 0000000000..8dbf6a38bb --- /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 5dfb9ce196..bb0e43af3c 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 8eebc613cf1ba9ae8213a20b3a500eefcd08ffd3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 17 Nov 2025 02:24:23 +0000 Subject: [PATCH 82/95] 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 67cf92f169..a0507b00b9 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 e35bf8d428..cd21783fe3 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 3e0b22af68da07bf2854ecde6b0f31f98fd027e2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Nov 2025 04:30:27 +0000 Subject: [PATCH 83/95] 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 e9d1420f36..54f256480b 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 9ff99cc221..7a5dbf58b6 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 84/95] [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 484ddb5bd9..8a128ce6d2 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 85/95] 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 01a29b46fe..4f322adce2 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 86/95] [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 fd87df3617..8156e85559 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.path import normpath 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 8f99410e1d..6da684a577 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 87/95] 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 e6d51e1239..a0b8fe72b6 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -5,6 +5,7 @@ import os from pathlib import Path import jsonschema from dotty_dict import dotty +from enum import IntFlag from milc import cli @@ -21,6 +22,15 @@ true_values = ['1', 'on', 'yes'] 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 88/95] [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 5d43dd99ea..ccc99bfd8e 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 0000000000..e4bcba13c1 --- /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 0000000000..1765122512 --- /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 0000000000..764b97ddde --- /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 e4bcba13c1..9891296f42 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 c03d99f686..f5decaeb78 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 c92ed5a2d0..bfa022be11 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 89/95] 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 c99a66a74b..b02b7f5433 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 d78ec55990..cc6425a94c 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 8dcb364c6e..9a0465a9b4 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 90/95] [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 9a0465a9b4..a6f249833f 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 91/95] 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 0000000000..54eb8c737e --- /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 d533e41aaa..688241a16b 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 11df62763d..36a94d8d28 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 5cccbdf439..5a972cee5a 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 4b6bdb2090..6aaf008232 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 b5dfb2bd1ea38a37c58227eb17bde583f0c0e4d6 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 27 Nov 2025 21:29:46 +0000 Subject: [PATCH 92/95] 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 640dedc31e..dae8c07e3e 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 43bbb5e99a2c552c127d30dfdf317fb70b143b40 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Mon, 1 Dec 2025 07:46:22 +1100 Subject: [PATCH 93/95] [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 e7a36550c1..0b4d32fa34 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 68c824b0e4..2c04136c36 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 715d520d1c..a751f08c75 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 36a94d8d28..399f71a827 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 f517190e35..97ae6a3c76 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 0e6b73c9ff44c8404a74e165a8aa0b258db41f8a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 1 Dec 2025 21:47:16 +0000 Subject: [PATCH 94/95] 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 54eb8c737e..0000000000 --- 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 0000000000..b86d630fa8 --- /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 ccc88e0c64..0000000000 --- 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 39136067b9..0000000000 --- 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 d237b0e1d0..2531de2b1e 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 1e9335d8bc..9dd995500c 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 29ceb09db7..2db767c5ec 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 95/95] Merge point for 2025q4 breaking changes. --- readme.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/readme.md b/readme.md index e5c0d41b7b..62aed12066 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)