summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/keychron/c1_pro/c1_pro.c13
-rw-r--r--keyboards/keychron/c1_pro/config.h6
-rw-r--r--keyboards/keychron/c1_pro/info.json3
-rw-r--r--keyboards/keychron/c2_pro/c2_pro.c12
-rw-r--r--keyboards/keychron/c2_pro/config.h6
-rw-r--r--keyboards/keychron/c2_pro/info.json3
-rw-r--r--keyboards/keychron/q10/config.h6
-rw-r--r--keyboards/keychron/q10/info.json5
-rw-r--r--keyboards/keychron/q10/q10.c9
-rwxr-xr-xkeyboards/keychron/q11/config.h9
-rwxr-xr-xkeyboards/keychron/q11/info.json6
-rwxr-xr-xkeyboards/keychron/q11/q11.c19
-rw-r--r--keyboards/keychron/q12/config.h8
-rw-r--r--keyboards/keychron/q12/info.json5
-rw-r--r--keyboards/keychron/q12/q12.c10
-rw-r--r--keyboards/keychron/q1v1/ansi/ansi.c9
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c9
-rw-r--r--keyboards/keychron/q1v1/config.h6
-rw-r--r--keyboards/keychron/q1v1/info.json3
-rw-r--r--keyboards/keychron/q1v1/iso/iso.c9
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/iso_encoder.c9
-rw-r--r--keyboards/keychron/q1v2/config.h9
-rw-r--r--keyboards/keychron/q1v2/info.json3
-rw-r--r--keyboards/keychron/q1v2/q1v2.c9
-rw-r--r--keyboards/keychron/q2/config.h6
-rw-r--r--keyboards/keychron/q2/info.json3
-rw-r--r--keyboards/keychron/q2/q2.c8
-rw-r--r--keyboards/keychron/q3/config.h6
-rw-r--r--keyboards/keychron/q3/info.json3
-rw-r--r--keyboards/keychron/q3/q3.c13
-rw-r--r--keyboards/keychron/q4/config.h6
-rw-r--r--keyboards/keychron/q4/info.json3
-rw-r--r--keyboards/keychron/q4/q4.c8
-rw-r--r--keyboards/keychron/q5/config.h6
-rw-r--r--keyboards/keychron/q5/info.json3
-rw-r--r--keyboards/keychron/q5/q5.c9
-rw-r--r--keyboards/keychron/q6/config.h6
-rw-r--r--keyboards/keychron/q6/info.json5
-rw-r--r--keyboards/keychron/q6/q6.c9
-rw-r--r--keyboards/keychron/q60/config.h6
-rw-r--r--keyboards/keychron/q60/info.json5
-rw-r--r--keyboards/keychron/q60/q60.c8
-rw-r--r--keyboards/keychron/q65/config.h6
-rw-r--r--keyboards/keychron/q65/info.json5
-rw-r--r--keyboards/keychron/q65/q65.c8
-rw-r--r--keyboards/keychron/q7/config.h6
-rw-r--r--keyboards/keychron/q7/info.json3
-rw-r--r--keyboards/keychron/q7/q7.c8
-rw-r--r--keyboards/keychron/q8/config.h6
-rw-r--r--keyboards/keychron/q8/info.json3
-rw-r--r--keyboards/keychron/q8/q8.c8
-rw-r--r--keyboards/keychron/q9/config.h6
-rw-r--r--keyboards/keychron/q9/info.json3
-rw-r--r--keyboards/keychron/q9/q9.c7
-rwxr-xr-xkeyboards/keychron/q9_plus/config.h6
-rwxr-xr-xkeyboards/keychron/q9_plus/info.json3
-rwxr-xr-xkeyboards/keychron/q9_plus/q9_plus.c7
-rw-r--r--keyboards/keychron/s1/config.h6
-rw-r--r--keyboards/keychron/s1/info.json5
-rw-r--r--keyboards/keychron/s1/s1.c9
-rw-r--r--keyboards/keychron/v1/config.h6
-rw-r--r--keyboards/keychron/v1/info.json5
-rw-r--r--keyboards/keychron/v1/v1.c9
-rw-r--r--keyboards/keychron/v10/config.h6
-rw-r--r--keyboards/keychron/v10/info.json5
-rw-r--r--keyboards/keychron/v10/v10.c9
-rw-r--r--keyboards/keychron/v2/config.h6
-rw-r--r--keyboards/keychron/v2/info.json5
-rw-r--r--keyboards/keychron/v2/v2.c8
-rw-r--r--keyboards/keychron/v3/config.h6
-rw-r--r--keyboards/keychron/v3/info.json5
-rw-r--r--keyboards/keychron/v3/v3.c13
-rw-r--r--keyboards/keychron/v4/config.h6
-rw-r--r--keyboards/keychron/v4/info.json5
-rw-r--r--keyboards/keychron/v4/v4.c8
-rw-r--r--keyboards/keychron/v5/config.h6
-rw-r--r--keyboards/keychron/v5/info.json5
-rw-r--r--keyboards/keychron/v5/v5.c9
-rw-r--r--keyboards/keychron/v6/config.h5
-rw-r--r--keyboards/keychron/v6/info.json5
-rw-r--r--keyboards/keychron/v6/v6.c9
-rw-r--r--keyboards/keychron/v7/config.h6
-rw-r--r--keyboards/keychron/v7/info.json5
-rw-r--r--keyboards/keychron/v7/v7.c8
-rw-r--r--keyboards/keychron/v8/config.h6
-rw-r--r--keyboards/keychron/v8/info.json5
-rw-r--r--keyboards/keychron/v8/v8.c8
87 files changed, 117 insertions, 466 deletions
diff --git a/keyboards/keychron/c1_pro/c1_pro.c b/keyboards/keychron/c1_pro/c1_pro.c
index 607cd958ad..178dca8121 100644
--- a/keyboards/keychron/c1_pro/c1_pro.c
+++ b/keyboards/keychron/c1_pro/c1_pro.c
@@ -16,19 +16,6 @@
#include "quantum.h"
-// clang-format off
-
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
-// clang-format on
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/c1_pro/config.h b/keyboards/keychron/c1_pro/config.h
index 2d81490471..78415190b7 100644
--- a/keyboards/keychron/c1_pro/config.h
+++ b/keyboards/keychron/c1_pro/config.h
@@ -16,12 +16,6 @@
#pragma once
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { { 5, 4 } }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* EEPROM Driver Configuration */
#define WEAR_LEVELING_LOGICAL_SIZE 2048
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
diff --git a/keyboards/keychron/c1_pro/info.json b/keyboards/keychron/c1_pro/info.json
index 9c9b4bf16f..080392ea48 100644
--- a/keyboards/keychron/c1_pro/info.json
+++ b/keyboards/keychron/c1_pro/info.json
@@ -17,6 +17,9 @@
"mousekey": true,
"nkro": true
},
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "H3"],
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
diff --git a/keyboards/keychron/c2_pro/c2_pro.c b/keyboards/keychron/c2_pro/c2_pro.c
index 2cd58ab4d7..593e404997 100644
--- a/keyboards/keychron/c2_pro/c2_pro.c
+++ b/keyboards/keychron/c2_pro/c2_pro.c
@@ -16,18 +16,6 @@
#include "quantum.h"
-// clang-format off
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111101111,
-};
-
-// clang-format on
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/c2_pro/config.h b/keyboards/keychron/c2_pro/config.h
index 6971ebd1aa..7422e29f6f 100644
--- a/keyboards/keychron/c2_pro/config.h
+++ b/keyboards/keychron/c2_pro/config.h
@@ -16,12 +16,6 @@
#pragma once
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { { 5, 4 } }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* EEPROM Driver Configuration */
#define WEAR_LEVELING_LOGICAL_SIZE 2048
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
diff --git a/keyboards/keychron/c2_pro/info.json b/keyboards/keychron/c2_pro/info.json
index dd97dd7adf..736a2e86a1 100644
--- a/keyboards/keychron/c2_pro/info.json
+++ b/keyboards/keychron/c2_pro/info.json
@@ -17,6 +17,9 @@
"mousekey": true,
"nkro": true
},
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"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"],
diff --git a/keyboards/keychron/q10/config.h b/keyboards/keychron/q10/config.h
index e999515abc..0a19cc008c 100644
--- a/keyboards/keychron/q10/config.h
+++ b/keyboards/keychron/q10/config.h
@@ -44,12 +44,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5,5} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Disable RGB lighting when PC is in suspend */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/q10/info.json b/keyboards/keychron/q10/info.json
new file mode 100644
index 0000000000..98a376bd20
--- /dev/null
+++ b/keyboards/keychron/q10/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 5] ]
+ }
+}
diff --git a/keyboards/keychron/q10/q10.c b/keyboards/keychron/q10/q10.c
index 455a2a25f2..754b148175 100644
--- a/keyboards/keychron/q10/q10.c
+++ b/keyboards/keychron/q10/q10.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111011111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q11/config.h b/keyboards/keychron/q11/config.h
index 949e5cf1da..184785ed98 100755
--- a/keyboards/keychron/q11/config.h
+++ b/keyboards/keychron/q11/config.h
@@ -16,15 +16,6 @@
#pragma once
-// Connects each switch in the dip switch to the GPIO pin of the MCU
-#define DIP_SWITCH_PINS \
- { A8 }
-
-/* handedness */
-#define SPLIT_HAND_MATRIX_GRID A2, A15
-
-#define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `q11.c`
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
diff --git a/keyboards/keychron/q11/info.json b/keyboards/keychron/q11/info.json
index f240c70801..8b962e4a76 100755
--- a/keyboards/keychron/q11/info.json
+++ b/keyboards/keychron/q11/info.json
@@ -11,6 +11,9 @@
"bootmagic": {
"matrix": [0, 1]
},
+ "dip_switch": {
+ "pins": ["A8"]
+ },
"features": {
"bootmagic": true,
"command": false,
@@ -36,6 +39,9 @@
]
}
},
+ "handedness": {
+ "matrix_grid": ["A2", "A15"]
+ },
"matrix_pins": {
"right": {
"cols": ["A8", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0"],
diff --git a/keyboards/keychron/q11/q11.c b/keyboards/keychron/q11/q11.c
index bf7bab4b53..f643113ea3 100755
--- a/keyboards/keychron/q11/q11.c
+++ b/keyboards/keychron/q11/q11.c
@@ -16,25 +16,6 @@
#include "quantum.h"
-// Mask out handedness diode to prevent it
-// from keeping the keyboard awake
-// - just mirroring `KC_NO` in the `LAYOUT`
-// macro to keep it simple
-const matrix_row_t matrix_mask[] = {
- 0b011111111,
- 0b011111111,
- 0b011011111,
- 0b001111111,
- 0b011111111,
- 0b001011111,
- 0b111111111,
- 0b101111111,
- 0b111111111,
- 0b110111111,
- 0b010111111,
- 0b111011110,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) {
diff --git a/keyboards/keychron/q12/config.h b/keyboards/keychron/q12/config.h
index 2f6a277439..e13238d9ee 100644
--- a/keyboards/keychron/q12/config.h
+++ b/keyboards/keychron/q12/config.h
@@ -39,16 +39,8 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID \
- { \
- { 5, 4 } \
- }
#define SCAN_COUNT_MAX 100
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/q12/info.json b/keyboards/keychron/q12/info.json
new file mode 100644
index 0000000000..7019c8755b
--- /dev/null
+++ b/keyboards/keychron/q12/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
diff --git a/keyboards/keychron/q12/q12.c b/keyboards/keychron/q12/q12.c
index 3d8eab5659..9a019af6ac 100644
--- a/keyboards/keychron/q12/q12.c
+++ b/keyboards/keychron/q12/q12.c
@@ -16,16 +16,6 @@
#include "quantum.h"
-// clang-format off
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111101111,
-};
-// clang-format on
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) {
diff --git a/keyboards/keychron/q1v1/ansi/ansi.c b/keyboards/keychron/q1v1/ansi/ansi.c
index bc352a1964..f45907eaf6 100644
--- a/keyboards/keychron/q1v1/ansi/ansi.c
+++ b/keyboards/keychron/q1v1/ansi/ansi.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b0111111111111101,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
-};
-
#ifdef RGB_MATRIX_ENABLE
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
/* Refer to IS31 manual for these locations
diff --git a/keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c
index 387f3e0b32..1c15ac633d 100644
--- a/keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b0111111111111101,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
-};
-
#ifdef RGB_MATRIX_ENABLE
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
/* Refer to IS31 manual for these locations
diff --git a/keyboards/keychron/q1v1/config.h b/keyboards/keychron/q1v1/config.h
index aa6658e1ba..c61d83a0ab 100644
--- a/keyboards/keychron/q1v1/config.h
+++ b/keyboards/keychron/q1v1/config.h
@@ -20,12 +20,6 @@
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {0,1} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Encoder Configuration*/
#define ENCODER_DEFAULT_POS 0x3
diff --git a/keyboards/keychron/q1v1/info.json b/keyboards/keychron/q1v1/info.json
index 0041687269..f4a3c5bb24 100644
--- a/keyboards/keychron/q1v1/info.json
+++ b/keyboards/keychron/q1v1/info.json
@@ -17,6 +17,9 @@
"nkro": true,
"rgb_matrix": true
},
+ "dip_switch": {
+ "matrix_grid": [ [0, 1] ]
+ },
"matrix_pins": {
"cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"],
"rows": ["D3", "D2", "B3", "B2", "B1", "B0"]
diff --git a/keyboards/keychron/q1v1/iso/iso.c b/keyboards/keychron/q1v1/iso/iso.c
index ad3152adcd..109eb01282 100644
--- a/keyboards/keychron/q1v1/iso/iso.c
+++ b/keyboards/keychron/q1v1/iso/iso.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b0111111111111101,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
-};
-
#ifdef RGB_MATRIX_ENABLE
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
/* Refer to IS31 manual for these locations
diff --git a/keyboards/keychron/q1v1/iso_encoder/iso_encoder.c b/keyboards/keychron/q1v1/iso_encoder/iso_encoder.c
index 19122aa18d..e46a17cdc6 100644
--- a/keyboards/keychron/q1v1/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q1v1/iso_encoder/iso_encoder.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b0111111111111101,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
-};
-
#ifdef RGB_MATRIX_ENABLE
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
diff --git a/keyboards/keychron/q1v2/config.h b/keyboards/keychron/q1v2/config.h
index 67c7cae5bb..7f94cbee55 100644
--- a/keyboards/keychron/q1v2/config.h
+++ b/keyboards/keychron/q1v2/config.h
@@ -27,15 +27,6 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID \
- { \
- { 5, 4 } \
- }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Disable RGB lighting when PC is in suspend */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/q1v2/info.json b/keyboards/keychron/q1v2/info.json
index b40c41c760..03411bd4de 100644
--- a/keyboards/keychron/q1v2/info.json
+++ b/keyboards/keychron/q1v2/info.json
@@ -18,6 +18,9 @@
"rgb_matrix": true,
"dip_switch": true
},
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"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"],
diff --git a/keyboards/keychron/q1v2/q1v2.c b/keyboards/keychron/q1v2/q1v2.c
index 4f83a760d3..1de8f205c7 100644
--- a/keyboards/keychron/q1v2/q1v2.c
+++ b/keyboards/keychron/q1v2/q1v2.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) {
diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h
index d0beff49f0..e55d78afd5 100644
--- a/keyboards/keychron/q2/config.h
+++ b/keyboards/keychron/q2/config.h
@@ -18,18 +18,12 @@
#define MATRIX_UNSELECT_DRIVE_HIGH
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO
#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/q2/info.json b/keyboards/keychron/q2/info.json
index 47d9aa83b1..e18c9b2448 100644
--- a/keyboards/keychron/q2/info.json
+++ b/keyboards/keychron/q2/info.json
@@ -22,6 +22,9 @@
"nkro": true,
"rgb_matrix": true
},
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ },
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
"rows": ["B4", "B3", "A15", "A14", "A13"]
diff --git a/keyboards/keychron/q2/q2.c b/keyboards/keychron/q2/q2.c
index 7ff85556de..1dd839eccc 100644
--- a/keyboards/keychron/q2/q2.c
+++ b/keyboards/keychron/q2/q2.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q3/config.h b/keyboards/keychron/q3/config.h
index 6af0afd18f..176e14a5e2 100644
--- a/keyboards/keychron/q3/config.h
+++ b/keyboards/keychron/q3/config.h
@@ -29,12 +29,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Encoder Configuration*/
#define ENCODER_DEFAULT_POS 0x3
diff --git a/keyboards/keychron/q3/info.json b/keyboards/keychron/q3/info.json
index c08d73f26a..6d1bb49d6e 100644
--- a/keyboards/keychron/q3/info.json
+++ b/keyboards/keychron/q3/info.json
@@ -3,6 +3,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"eeprom": {
"wear_leveling": {
"backing_size": 4096
diff --git a/keyboards/keychron/q3/q3.c b/keyboards/keychron/q3/q3.c
index 2bf8bf08a0..846b58d4a7 100644
--- a/keyboards/keychron/q3/q3.c
+++ b/keyboards/keychron/q3/q3.c
@@ -17,19 +17,6 @@
#include "quantum.h"
#include "rgb_matrix.h"
-// clang-format off
-
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
-// clang-format on
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q4/config.h b/keyboards/keychron/q4/config.h
index 97f480ea31..a46d98eb06 100644
--- a/keyboards/keychron/q4/config.h
+++ b/keyboards/keychron/q4/config.h
@@ -16,12 +16,6 @@
#pragma once
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/q4/info.json b/keyboards/keychron/q4/info.json
index 0a9dcf4957..4e88d4db6a 100644
--- a/keyboards/keychron/q4/info.json
+++ b/keyboards/keychron/q4/info.json
@@ -4,6 +4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ },
"dynamic_keymap": {
"layer_count": 5
},
diff --git a/keyboards/keychron/q4/q4.c b/keyboards/keychron/q4/q4.c
index c3cb67bcc2..54ad01250f 100644
--- a/keyboards/keychron/q4/q4.c
+++ b/keyboards/keychron/q4/q4.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q5/config.h b/keyboards/keychron/q5/config.h
index 240baeea6c..3fa2421999 100644
--- a/keyboards/keychron/q5/config.h
+++ b/keyboards/keychron/q5/config.h
@@ -33,12 +33,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/q5/info.json b/keyboards/keychron/q5/info.json
index 243f70ddf1..f1cdd43c4e 100644
--- a/keyboards/keychron/q5/info.json
+++ b/keyboards/keychron/q5/info.json
@@ -4,6 +4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"eeprom": {
"wear_leveling": {
"backing_size": 4096
diff --git a/keyboards/keychron/q5/q5.c b/keyboards/keychron/q5/q5.c
index 7a1cabcd1a..4026e9dea8 100644
--- a/keyboards/keychron/q5/q5.c
+++ b/keyboards/keychron/q5/q5.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q6/config.h b/keyboards/keychron/q6/config.h
index ff8cd1142b..4b9963de85 100644
--- a/keyboards/keychron/q6/config.h
+++ b/keyboards/keychron/q6/config.h
@@ -30,12 +30,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/q6/info.json b/keyboards/keychron/q6/info.json
new file mode 100644
index 0000000000..7019c8755b
--- /dev/null
+++ b/keyboards/keychron/q6/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
diff --git a/keyboards/keychron/q6/q6.c b/keyboards/keychron/q6/q6.c
index 8a9750e9de..c1dc38a3fc 100644
--- a/keyboards/keychron/q6/q6.c
+++ b/keyboards/keychron/q6/q6.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q60/config.h b/keyboards/keychron/q60/config.h
index 3a6c3ea8ee..c22e74da97 100644
--- a/keyboards/keychron/q60/config.h
+++ b/keyboards/keychron/q60/config.h
@@ -29,12 +29,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/q60/info.json b/keyboards/keychron/q60/info.json
new file mode 100644
index 0000000000..5084aad927
--- /dev/null
+++ b/keyboards/keychron/q60/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
diff --git a/keyboards/keychron/q60/q60.c b/keyboards/keychron/q60/q60.c
index d97f72fb8e..c6f2d1a38c 100644
--- a/keyboards/keychron/q60/q60.c
+++ b/keyboards/keychron/q60/q60.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q65/config.h b/keyboards/keychron/q65/config.h
index 99eb4572cf..abea6f6599 100644
--- a/keyboards/keychron/q65/config.h
+++ b/keyboards/keychron/q65/config.h
@@ -40,12 +40,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58 }
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
/* Turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/q65/info.json b/keyboards/keychron/q65/info.json
new file mode 100644
index 0000000000..5084aad927
--- /dev/null
+++ b/keyboards/keychron/q65/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
diff --git a/keyboards/keychron/q65/q65.c b/keyboards/keychron/q65/q65.c
index 18fa8697c7..e293733bfe 100644
--- a/keyboards/keychron/q65/q65.c
+++ b/keyboards/keychron/q65/q65.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q7/config.h b/keyboards/keychron/q7/config.h
index 00f09dd1bf..4a2a6af9e3 100644
--- a/keyboards/keychron/q7/config.h
+++ b/keyboards/keychron/q7/config.h
@@ -30,9 +30,3 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
#define SNLED27351_CURRENT_TUNE \
{ 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80 }
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED \ No newline at end of file
diff --git a/keyboards/keychron/q7/info.json b/keyboards/keychron/q7/info.json
index d6d0c5d1fc..6b8a94ce99 100644
--- a/keyboards/keychron/q7/info.json
+++ b/keyboards/keychron/q7/info.json
@@ -4,6 +4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ },
"dynamic_keymap": {
"layer_count": 5
},
diff --git a/keyboards/keychron/q7/q7.c b/keyboards/keychron/q7/q7.c
index abd4ac11f0..d020f6ab43 100644
--- a/keyboards/keychron/q7/q7.c
+++ b/keyboards/keychron/q7/q7.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q8/config.h b/keyboards/keychron/q8/config.h
index 163d3775d9..df9c1a9a30 100644
--- a/keyboards/keychron/q8/config.h
+++ b/keyboards/keychron/q8/config.h
@@ -34,12 +34,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Encoder Configuration */
#define ENCODER_DEFAULT_POS 0x3
diff --git a/keyboards/keychron/q8/info.json b/keyboards/keychron/q8/info.json
index 7f98bf537c..4d4677f8af 100644
--- a/keyboards/keychron/q8/info.json
+++ b/keyboards/keychron/q8/info.json
@@ -4,6 +4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ },
"dynamic_keymap": {
"layer_count": 5
},
diff --git a/keyboards/keychron/q8/q8.c b/keyboards/keychron/q8/q8.c
index a653bdc8b9..c28f992f8e 100644
--- a/keyboards/keychron/q8/q8.c
+++ b/keyboards/keychron/q8/q8.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q9/config.h b/keyboards/keychron/q9/config.h
index 8b5cc06d8b..09b7be0459 100644
--- a/keyboards/keychron/q9/config.h
+++ b/keyboards/keychron/q9/config.h
@@ -16,12 +16,6 @@
#pragma once
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { { 3, 4 } }
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
diff --git a/keyboards/keychron/q9/info.json b/keyboards/keychron/q9/info.json
index 5cc519c720..5dd1134ba6 100644
--- a/keyboards/keychron/q9/info.json
+++ b/keyboards/keychron/q9/info.json
@@ -22,6 +22,9 @@
"nkro": true,
"rgb_matrix": true
},
+ "dip_switch": {
+ "matrix_grid": [ [3, 4] ]
+ },
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
"rows": ["B3", "A15", "A14", "A13"]
diff --git a/keyboards/keychron/q9/q9.c b/keyboards/keychron/q9/q9.c
index 51dea886f1..d020f6ab43 100644
--- a/keyboards/keychron/q9/q9.c
+++ b/keyboards/keychron/q9/q9.c
@@ -16,13 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/q9_plus/config.h b/keyboards/keychron/q9_plus/config.h
index cbd3c8b11b..16a274217d 100755
--- a/keyboards/keychron/q9_plus/config.h
+++ b/keyboards/keychron/q9_plus/config.h
@@ -16,12 +16,6 @@
#pragma once
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID {{ 3, 4 }}
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
diff --git a/keyboards/keychron/q9_plus/info.json b/keyboards/keychron/q9_plus/info.json
index 9f8703de37..0abc5b591e 100755
--- a/keyboards/keychron/q9_plus/info.json
+++ b/keyboards/keychron/q9_plus/info.json
@@ -19,6 +19,9 @@
"nkro": true,
"rgb_matrix": true
},
+ "dip_switch": {
+ "matrix_grid": [ [3, 4] ]
+ },
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
"rows": ["B3", "A15", "A14", "A13"]
diff --git a/keyboards/keychron/q9_plus/q9_plus.c b/keyboards/keychron/q9_plus/q9_plus.c
index 848117d323..77fd5f3cb0 100755
--- a/keyboards/keychron/q9_plus/q9_plus.c
+++ b/keyboards/keychron/q9_plus/q9_plus.c
@@ -16,13 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) {
diff --git a/keyboards/keychron/s1/config.h b/keyboards/keychron/s1/config.h
index 8c98389522..adea1822e5 100644
--- a/keyboards/keychron/s1/config.h
+++ b/keyboards/keychron/s1/config.h
@@ -16,12 +16,6 @@
#pragma once
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5,4} }
-
/* EEPROM Driver Configuration */
#define WEAR_LEVELING_LOGICAL_SIZE 2048
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
diff --git a/keyboards/keychron/s1/info.json b/keyboards/keychron/s1/info.json
new file mode 100644
index 0000000000..7019c8755b
--- /dev/null
+++ b/keyboards/keychron/s1/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
diff --git a/keyboards/keychron/s1/s1.c b/keyboards/keychron/s1/s1.c
index d8488dd6ea..2f1b905505 100644
--- a/keyboards/keychron/s1/s1.c
+++ b/keyboards/keychron/s1/s1.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/v1/config.h b/keyboards/keychron/v1/config.h
index 84334306dd..8fe6495937 100644
--- a/keyboards/keychron/v1/config.h
+++ b/keyboards/keychron/v1/config.h
@@ -25,12 +25,6 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5,4} }
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO
#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND
diff --git a/keyboards/keychron/v1/info.json b/keyboards/keychron/v1/info.json
new file mode 100644
index 0000000000..7019c8755b
--- /dev/null
+++ b/keyboards/keychron/v1/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
diff --git a/keyboards/keychron/v1/v1.c b/keyboards/keychron/v1/v1.c
index 79c5919174..7f93b37bcc 100644
--- a/keyboards/keychron/v1/v1.c
+++ b/keyboards/keychron/v1/v1.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/v10/config.h b/keyboards/keychron/v10/config.h
index 01d3b3e042..719a5829ff 100644
--- a/keyboards/keychron/v10/config.h
+++ b/keyboards/keychron/v10/config.h
@@ -44,12 +44,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
#define SNLED27351_CURRENT_TUNE { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5,5} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Disable RGB lighting when PC is in suspend */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/v10/info.json b/keyboards/keychron/v10/info.json
new file mode 100644
index 0000000000..98a376bd20
--- /dev/null
+++ b/keyboards/keychron/v10/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 5] ]
+ }
+}
diff --git a/keyboards/keychron/v10/v10.c b/keyboards/keychron/v10/v10.c
index 2e1e3f090f..1bde388544 100644
--- a/keyboards/keychron/v10/v10.c
+++ b/keyboards/keychron/v10/v10.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111011111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/v2/config.h b/keyboards/keychron/v2/config.h
index f42e87368b..e90e60fa35 100644
--- a/keyboards/keychron/v2/config.h
+++ b/keyboards/keychron/v2/config.h
@@ -32,12 +32,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/v2/info.json b/keyboards/keychron/v2/info.json
new file mode 100644
index 0000000000..5084aad927
--- /dev/null
+++ b/keyboards/keychron/v2/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
diff --git a/keyboards/keychron/v2/v2.c b/keyboards/keychron/v2/v2.c
index 7703c280df..f2aed82fa9 100644
--- a/keyboards/keychron/v2/v2.c
+++ b/keyboards/keychron/v2/v2.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/v3/config.h b/keyboards/keychron/v3/config.h
index 9532062aaa..6fe3e4dd97 100644
--- a/keyboards/keychron/v3/config.h
+++ b/keyboards/keychron/v3/config.h
@@ -32,12 +32,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/v3/info.json b/keyboards/keychron/v3/info.json
new file mode 100644
index 0000000000..7019c8755b
--- /dev/null
+++ b/keyboards/keychron/v3/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
diff --git a/keyboards/keychron/v3/v3.c b/keyboards/keychron/v3/v3.c
index 17ea8f0e97..4452556ca6 100644
--- a/keyboards/keychron/v3/v3.c
+++ b/keyboards/keychron/v3/v3.c
@@ -16,19 +16,6 @@
#include "quantum.h"
-// clang-format off
-
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
-// clang-format on
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/v4/config.h b/keyboards/keychron/v4/config.h
index 27147555ea..4c121c9ede 100644
--- a/keyboards/keychron/v4/config.h
+++ b/keyboards/keychron/v4/config.h
@@ -29,12 +29,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/v4/info.json b/keyboards/keychron/v4/info.json
new file mode 100644
index 0000000000..5084aad927
--- /dev/null
+++ b/keyboards/keychron/v4/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
diff --git a/keyboards/keychron/v4/v4.c b/keyboards/keychron/v4/v4.c
index 402eadf2d7..d020f6ab43 100644
--- a/keyboards/keychron/v4/v4.c
+++ b/keyboards/keychron/v4/v4.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/v5/config.h b/keyboards/keychron/v5/config.h
index 128c0aa9f1..d49649c809 100644
--- a/keyboards/keychron/v5/config.h
+++ b/keyboards/keychron/v5/config.h
@@ -39,12 +39,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/v5/info.json b/keyboards/keychron/v5/info.json
new file mode 100644
index 0000000000..7019c8755b
--- /dev/null
+++ b/keyboards/keychron/v5/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
diff --git a/keyboards/keychron/v5/v5.c b/keyboards/keychron/v5/v5.c
index 6d87524b23..050ea18c0c 100644
--- a/keyboards/keychron/v5/v5.c
+++ b/keyboards/keychron/v5/v5.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/v6/config.h b/keyboards/keychron/v6/config.h
index 129f3925bb..ff16573b93 100644
--- a/keyboards/keychron/v6/config.h
+++ b/keyboards/keychron/v6/config.h
@@ -33,13 +33,8 @@
/* Limit the maximum brigtness current of colour white to 500mA */
#define SNLED27351_CURRENT_TUNE { 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
#define SCAN_COUNT_MAX 100
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/v6/info.json b/keyboards/keychron/v6/info.json
new file mode 100644
index 0000000000..7019c8755b
--- /dev/null
+++ b/keyboards/keychron/v6/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
diff --git a/keyboards/keychron/v6/v6.c b/keyboards/keychron/v6/v6.c
index 0f9305d2d0..8aeab5e952 100644
--- a/keyboards/keychron/v6/v6.c
+++ b/keyboards/keychron/v6/v6.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/v7/config.h b/keyboards/keychron/v7/config.h
index 500e4df30d..40c4aee28b 100644
--- a/keyboards/keychron/v7/config.h
+++ b/keyboards/keychron/v7/config.h
@@ -30,12 +30,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
#define SNLED27351_CURRENT_TUNE { 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/v7/info.json b/keyboards/keychron/v7/info.json
new file mode 100644
index 0000000000..5084aad927
--- /dev/null
+++ b/keyboards/keychron/v7/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
diff --git a/keyboards/keychron/v7/v7.c b/keyboards/keychron/v7/v7.c
index e6b8309cae..215b4922dc 100644
--- a/keyboards/keychron/v7/v7.c
+++ b/keyboards/keychron/v7/v7.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
diff --git a/keyboards/keychron/v8/config.h b/keyboards/keychron/v8/config.h
index c9db5c0755..7b139dbd54 100644
--- a/keyboards/keychron/v8/config.h
+++ b/keyboards/keychron/v8/config.h
@@ -33,12 +33,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
#define SNLED27351_CURRENT_TUNE { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Turn off effects when suspended */
#define RGB_MATRIX_SLEEP
diff --git a/keyboards/keychron/v8/info.json b/keyboards/keychron/v8/info.json
new file mode 100644
index 0000000000..5084aad927
--- /dev/null
+++ b/keyboards/keychron/v8/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
diff --git a/keyboards/keychron/v8/v8.c b/keyboards/keychron/v8/v8.c
index 38d3cada17..5cc6c0782c 100644
--- a/keyboards/keychron/v8/v8.c
+++ b/keyboards/keychron/v8/v8.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {