From 59188e616b28c5d825a4c9a081746532efa6aae1 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 8 Jul 2026 11:43:14 +0100 Subject: [PATCH 1/2] Tidy sawnsprojects/satxri6key (#26317) --- .../sawnsprojects/satxri6key/keyboard.json | 8 +++- .../satxri6key/keymaps/default/keymap.c | 37 +++++-------------- .../satxri6key/keymaps/default/rules.mk | 2 - 3 files changed, 15 insertions(+), 32 deletions(-) diff --git a/keyboards/sawnsprojects/satxri6key/keyboard.json b/keyboards/sawnsprojects/satxri6key/keyboard.json index 30f1ec3fd14..100d92325b3 100644 --- a/keyboards/sawnsprojects/satxri6key/keyboard.json +++ b/keyboards/sawnsprojects/satxri6key/keyboard.json @@ -92,7 +92,7 @@ "bootmagic": true, "extrakey": true, "mousekey": true, - "nkro": false + "rgblight": true }, "matrix_pins": { "cols": ["F1", "F4", "F5"], @@ -101,8 +101,12 @@ "diode_direction": "COL2ROW", "processor": "atmega32u4", "bootloader": "atmel-dfu", + "community_layouts": ["ortho_2x3"], + "layout_aliases": { + "LAYOUT": "LAYOUT_ortho_2x3" + }, "layouts": { - "LAYOUT": { + "LAYOUT_ortho_2x3": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0}, {"matrix": [0, 1], "x": 1, "y": 0}, diff --git a/keyboards/sawnsprojects/satxri6key/keymaps/default/keymap.c b/keyboards/sawnsprojects/satxri6key/keymaps/default/keymap.c index b44effb84de..a38b1adfc9c 100644 --- a/keyboards/sawnsprojects/satxri6key/keymaps/default/keymap.c +++ b/keyboards/sawnsprojects/satxri6key/keymaps/default/keymap.c @@ -1,34 +1,15 @@ -/* 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 . - */ - +// Copyright 2021 SawnsProjects +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - + [0] = LAYOUT_ortho_2x3( KC_ESC, KC_GRV, TO(1), - KC_Z, KC_X, KC_C ), - - [1] = LAYOUT( - - KC_TRNS, KC_TRNS, TO(0), - KC_TRNS, KC_TRNS, KC_TRNS ), - - + KC_Z, KC_X, KC_C + ), + [1] = LAYOUT_ortho_2x3( + _______, _______, TO(0), + _______, _______, _______ + ) }; - diff --git a/keyboards/sawnsprojects/satxri6key/keymaps/default/rules.mk b/keyboards/sawnsprojects/satxri6key/keymaps/default/rules.mk index 3d821b064a3..1a840036e2a 100644 --- a/keyboards/sawnsprojects/satxri6key/keymaps/default/rules.mk +++ b/keyboards/sawnsprojects/satxri6key/keymaps/default/rules.mk @@ -1,4 +1,2 @@ -VIA_ENABLE = no RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = ws2812 From f533c6113dbb00e5f6e7256239168d5e25c02b52 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 8 Jul 2026 11:43:31 +0100 Subject: [PATCH 2/2] Fix use of `via.h` (#26316) --- keyboards/cipulot/common/via_ec.c | 2 +- keyboards/hs60/v2/ansi/ansi.h | 1 - keyboards/hs60/v2/hhkb/hhkb.h | 1 - keyboards/hs60/v2/iso/iso.h | 1 - keyboards/keebwerk/mega/ansi/ansi.h | 1 - keyboards/keychron/common/keychron_common.h | 4 - keyboards/novelkeys/nk87/nk87.h | 1 - keyboards/rocketboard_16/keycode_lookup.c | 1 - keyboards/tkc/portico/portico.h | 1 - keyboards/tkc/portico75/portico75.h | 1 - .../rama_works_kara/rama_works_kara.h | 1 - .../rama_works_koyu/rama_works_koyu.h | 1 - .../rama_works_m10_c/rama_works_m10_c.h | 1 - .../rama_works_m50_a/rama_works_m50_a.h | 1 - .../rama_works_m60_a/rama_works_m60_a.h | 1 - .../rama_works_m65_b/rama_works_m65_b.h | 1 - .../rama_works_m65_bx/rama_works_m65_bx.h | 1 - .../rama_works_u80_a/rama_works_u80_a.h | 1 - keyboards/wilba_tech/via_test.c | 132 ------------------ keyboards/wilba_tech/wt60_b/wt60_b.h | 1 - keyboards/wilba_tech/wt60_bx/wt60_bx.h | 1 - keyboards/wilba_tech/wt60_c/wt60_c.h | 1 - keyboards/wilba_tech/wt_main.c | 3 +- keyboards/wilba_tech/zeal60/zeal60.h | 1 - keyboards/wilba_tech/zeal65/zeal65.h | 1 - keyboards/xelus/dawn60/rev1/rev1.h | 1 - 26 files changed, 2 insertions(+), 161 deletions(-) delete mode 100644 keyboards/wilba_tech/via_test.c diff --git a/keyboards/cipulot/common/via_ec.c b/keyboards/cipulot/common/via_ec.c index 7be6edd026a..4f5137f1442 100644 --- a/keyboards/cipulot/common/via_ec.c +++ b/keyboards/cipulot/common/via_ec.c @@ -16,13 +16,13 @@ #include "ec_switch_matrix.h" #include "action.h" #include "print.h" -#include "via.h" #ifdef SPLIT_KEYBOARD # include "transactions.h" #endif #ifdef VIA_ENABLE +# include "via.h" void ec_rescale_values(uint8_t item); void ec_save_threshold_data(uint8_t option); diff --git a/keyboards/hs60/v2/ansi/ansi.h b/keyboards/hs60/v2/ansi/ansi.h index d7296c38c18..2fbe06e7f4d 100644 --- a/keyboards/hs60/v2/ansi/ansi.h +++ b/keyboards/hs60/v2/ansi/ansi.h @@ -17,4 +17,3 @@ #include "quantum.h" #include "../../wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/hs60/v2/hhkb/hhkb.h b/keyboards/hs60/v2/hhkb/hhkb.h index d7296c38c18..2fbe06e7f4d 100644 --- a/keyboards/hs60/v2/hhkb/hhkb.h +++ b/keyboards/hs60/v2/hhkb/hhkb.h @@ -17,4 +17,3 @@ #include "quantum.h" #include "../../wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/hs60/v2/iso/iso.h b/keyboards/hs60/v2/iso/iso.h index d7296c38c18..2fbe06e7f4d 100644 --- a/keyboards/hs60/v2/iso/iso.h +++ b/keyboards/hs60/v2/iso/iso.h @@ -17,4 +17,3 @@ #include "quantum.h" #include "../../wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/keebwerk/mega/ansi/ansi.h b/keyboards/keebwerk/mega/ansi/ansi.h index 7f1a26c10e8..24d2bd65456 100755 --- a/keyboards/keebwerk/mega/ansi/ansi.h +++ b/keyboards/keebwerk/mega/ansi/ansi.h @@ -17,4 +17,3 @@ #include "quantum.h" #include "../wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/keychron/common/keychron_common.h b/keyboards/keychron/common/keychron_common.h index 648a5d3371a..fbc7aa40091 100644 --- a/keyboards/keychron/common/keychron_common.h +++ b/keyboards/keychron/common/keychron_common.h @@ -20,10 +20,6 @@ #include #include "action.h" -#ifdef VIA_ENABLE -# include "via.h" -#endif - #include "quantum_keycodes.h" enum custom_keycodes { diff --git a/keyboards/novelkeys/nk87/nk87.h b/keyboards/novelkeys/nk87/nk87.h index 7f1a26c10e8..24d2bd65456 100755 --- a/keyboards/novelkeys/nk87/nk87.h +++ b/keyboards/novelkeys/nk87/nk87.h @@ -17,4 +17,3 @@ #include "quantum.h" #include "../wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/rocketboard_16/keycode_lookup.c b/keyboards/rocketboard_16/keycode_lookup.c index a765968bc3e..1e5bc0a22e9 100644 --- a/keyboards/rocketboard_16/keycode_lookup.c +++ b/keyboards/rocketboard_16/keycode_lookup.c @@ -19,7 +19,6 @@ #include "quantum_keycodes.h" #include "keymap_us.h" #include "print.h" -#include "via.h" #include "util.h" #define num_keycodes ARRAY_SIZE(lookup_table) diff --git a/keyboards/tkc/portico/portico.h b/keyboards/tkc/portico/portico.h index b93c7f8d3c8..951940f47bf 100644 --- a/keyboards/tkc/portico/portico.h +++ b/keyboards/tkc/portico/portico.h @@ -20,5 +20,4 @@ along with this program. If not, see . #include "quantum.h" #ifdef RGB_BACKLIGHT_PORTICO #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" #endif diff --git a/keyboards/tkc/portico75/portico75.h b/keyboards/tkc/portico75/portico75.h index a9c26f4d8bf..ff8e351364d 100644 --- a/keyboards/tkc/portico75/portico75.h +++ b/keyboards/tkc/portico75/portico75.h @@ -22,5 +22,4 @@ along with this program. If not, see . #ifdef RGB_BACKLIGHT_PORTICO75 #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" #endif diff --git a/keyboards/wilba_tech/rama_works_kara/rama_works_kara.h b/keyboards/wilba_tech/rama_works_kara/rama_works_kara.h index b712f6ccd3a..d597cd61d4b 100644 --- a/keyboards/wilba_tech/rama_works_kara/rama_works_kara.h +++ b/keyboards/wilba_tech/rama_works_kara/rama_works_kara.h @@ -17,4 +17,3 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h b/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h index 297b98f6d1f..a740edd7053 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h +++ b/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h @@ -18,4 +18,3 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.h b/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.h index 24dae9d7d06..a51cddb53bd 100644 --- a/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.h +++ b/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.h @@ -17,4 +17,3 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.h b/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.h index 24dae9d7d06..a51cddb53bd 100644 --- a/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.h +++ b/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.h @@ -17,4 +17,3 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h b/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h index 3966f822ee4..84e2ac0ee6c 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h +++ b/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h @@ -17,4 +17,3 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.h b/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.h index 537457a47ed..16ceee46a75 100644 --- a/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.h +++ b/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.h @@ -18,4 +18,3 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.h b/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.h index 537457a47ed..16ceee46a75 100644 --- a/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.h +++ b/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.h @@ -18,4 +18,3 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h b/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h index 297b98f6d1f..a740edd7053 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h +++ b/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h @@ -18,4 +18,3 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "via.h" diff --git a/keyboards/wilba_tech/via_test.c b/keyboards/wilba_tech/via_test.c deleted file mode 100644 index 46cc42a9e40..00000000000 --- a/keyboards/wilba_tech/via_test.c +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2022 Jason Williams (@wilba) -// SPDX-License-Identifier: GPL-2.0-or-later - -// This is a test harness for VIA custom UI. -// -// It handles channel IDs 0-7, value IDs 0-7. -// -// It's useful for testing custom UI on a PCB without compiling in -// features, especially features that will cause firmware to freeze -// if the PCB doesn't have support. -// -// To use: -// - add `SRC = keyboards/wilba_tech/via_test.c` to rules.mk -// - add `#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 128` to config.h -// (or change to match CHANNELS*VALUES*2) - -#include "via.h" - -#ifdef VIA_ENABLE - -#define CHANNELS 8 -#define VALUES 8 -uint8_t g_value[CHANNELS][VALUES][2]; - -void values_init(void) -{ - for ( uint8_t channel_id = 0; channel_id < CHANNELS; channel_id++ ) { - for ( uint8_t value_id = 0; value_id < VALUES; value_id++ ) { - g_value[channel_id][value_id][0] = 0x00; - g_value[channel_id][value_id][1] = 0x00; - } - } -} - -void values_load(void) -{ - eeprom_read_block( g_value, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), VIA_EEPROM_CUSTOM_CONFIG_SIZE ); -} - -void values_save(void) -{ - eeprom_update_block( g_value, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), VIA_EEPROM_CUSTOM_CONFIG_SIZE ); -} - -// We do this to test if VIA is sending save commands per channel -// Not relevant for real situations -void values_save_on_channel(uint8_t channel_id) -{ - uint16_t offset = channel_id * VALUES * 2; - eeprom_update_block( ((void*)g_value) + offset, - ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR) + offset, - VALUES * 2 ); -} - -void via_init_kb(void) -{ - values_init(); - - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM - if (via_eeprom_is_valid()) { - values_load(); - } else { - values_save(); - // DO NOT set EEPROM valid here, let caller do this - } -} - -void set_value( uint8_t channel_id, uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - if ( *value_id >= 0 && *value_id < VALUES ) { - g_value[channel_id][*value_id][0] = value_data[0]; - g_value[channel_id][*value_id][1] = value_data[1]; - } -} - -void get_value( uint8_t channel_id, uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - if ( *value_id >= 0 && *value_id < VALUES ) { - value_data[0] = g_value[channel_id][*value_id][0]; - value_data[1] = g_value[channel_id][*value_id][1]; - } -} - -void via_custom_value_command(uint8_t *data, uint8_t length) { - // data = [ command_id, channel_id, value_id, value_data ] - uint8_t *command_id = &(data[0]); - uint8_t *channel_id = &(data[1]); - uint8_t *value_id_and_data = &(data[2]); - - if ( *channel_id >= 0 && *channel_id < CHANNELS ) { - switch ( *command_id ) - { - case id_custom_set_value: - { - set_value(*channel_id,value_id_and_data); - break; - } - case id_custom_get_value: - { - get_value(*channel_id,value_id_and_data); - break; - } - case id_custom_save: - { - //for ( uint8_t i=0; i