summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2024-02-09 06:56:13 +0000
committerGitHub <noreply@github.com>2024-02-09 06:56:13 +0000
commit137938b67afbf35fd34f2e5cbe3c5c6367a1d0cc (patch)
tree9bde863a119f5e8c84840b34c839011d9403cfb6
parente7b84e1cf6d864b1df41e7a81c576baa9d7ca30a (diff)
Migrate dip switch config to info.json - keychron (#23037)
-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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19// clang-format off
20
21const matrix_row_t matrix_mask[] = {
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111111111,
25 0b1111111111111111,
26 0b1111111111111111,
27 0b1111111111101111,
28};
29
30// clang-format on
31
32#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
33 20
34bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
16 16
17#pragma once 17#pragma once
18 18
19/* DIP switch */
20#define DIP_SWITCH_MATRIX_GRID { { 5, 4 } }
21
22/* Disable DIP switch in matrix data */
23#define MATRIX_MASKED
24
25/* EEPROM Driver Configuration */ 19/* EEPROM Driver Configuration */
26#define WEAR_LEVELING_LOGICAL_SIZE 2048 20#define WEAR_LEVELING_LOGICAL_SIZE 2048
27#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) 21#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 @@
17 "mousekey": true, 17 "mousekey": true,
18 "nkro": true 18 "nkro": true
19 }, 19 },
20 "dip_switch": {
21 "matrix_grid": [ [5, 4] ]
22 },
20 "matrix_pins": { 23 "matrix_pins": {
21 "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "H3"], 24 "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "H3"],
22 "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] 25 "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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19// clang-format off
20const matrix_row_t matrix_mask[] = {
21 0b11111111111111111111,
22 0b11111111111111111111,
23 0b11111111111111111111,
24 0b11111111111111111111,
25 0b11111111111111111111,
26 0b11111111111111101111,
27};
28
29// clang-format on
30
31#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
32 20
33bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
16 16
17#pragma once 17#pragma once
18 18
19/* DIP switch */
20#define DIP_SWITCH_MATRIX_GRID { { 5, 4 } }
21
22/* Disable DIP switch in matrix data */
23#define MATRIX_MASKED
24
25/* EEPROM Driver Configuration */ 19/* EEPROM Driver Configuration */
26#define WEAR_LEVELING_LOGICAL_SIZE 2048 20#define WEAR_LEVELING_LOGICAL_SIZE 2048
27#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) 21#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 @@
17 "mousekey": true, 17 "mousekey": true,
18 "nkro": true 18 "nkro": true
19 }, 19 },
20 "dip_switch": {
21 "matrix_grid": [ [5, 4] ]
22 },
20 "matrix_pins": { 23 "matrix_pins": {
21 "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"], 24 "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"],
22 "rows": ["B5", "B4", "B3", "A15", "A14", "A13"], 25 "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 @@
44#define SNLED27351_CURRENT_TUNE \ 44#define SNLED27351_CURRENT_TUNE \
45 { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A } 45 { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
46 46
47/* DIP switch */
48#define DIP_SWITCH_MATRIX_GRID { {5,5} }
49
50/* Disable DIP switch in matrix data */
51#define MATRIX_MASKED
52
53/* Disable RGB lighting when PC is in suspend */ 47/* Disable RGB lighting when PC is in suspend */
54#define RGB_MATRIX_SLEEP 48#define RGB_MATRIX_SLEEP
55 49
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [5, 5] ]
4 }
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b1111111111111111,
21 0b1111111111111111,
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111111111,
25 0b1111111111011111,
26};
27
28#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
29 20
30bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
16 16
17#pragma once 17#pragma once
18 18
19// Connects each switch in the dip switch to the GPIO pin of the MCU
20#define DIP_SWITCH_PINS \
21 { A8 }
22
23/* handedness */
24#define SPLIT_HAND_MATRIX_GRID A2, A15
25
26#define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `q11.c`
27
28/* RGB Matrix Driver Configuration */ 19/* RGB Matrix Driver Configuration */
29#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND 20#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
30 21
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 @@
11 "bootmagic": { 11 "bootmagic": {
12 "matrix": [0, 1] 12 "matrix": [0, 1]
13 }, 13 },
14 "dip_switch": {
15 "pins": ["A8"]
16 },
14 "features": { 17 "features": {
15 "bootmagic": true, 18 "bootmagic": true,
16 "command": false, 19 "command": false,
@@ -36,6 +39,9 @@
36 ] 39 ]
37 } 40 }
38 }, 41 },
42 "handedness": {
43 "matrix_grid": ["A2", "A15"]
44 },
39 "matrix_pins": { 45 "matrix_pins": {
40 "right": { 46 "right": {
41 "cols": ["A8", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0"], 47 "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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19// Mask out handedness diode to prevent it
20// from keeping the keyboard awake
21// - just mirroring `KC_NO` in the `LAYOUT`
22// macro to keep it simple
23const matrix_row_t matrix_mask[] = {
24 0b011111111,
25 0b011111111,
26 0b011011111,
27 0b001111111,
28 0b011111111,
29 0b001011111,
30 0b111111111,
31 0b101111111,
32 0b111111111,
33 0b110111111,
34 0b010111111,
35 0b111011110,
36};
37
38#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
39bool dip_switch_update_kb(uint8_t index, bool active) { 20bool dip_switch_update_kb(uint8_t index, bool active) {
40 if (!dip_switch_update_user(index, active)) { 21 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 @@
39#define SNLED27351_CURRENT_TUNE \ 39#define SNLED27351_CURRENT_TUNE \
40 { 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55 } 40 { 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55 }
41 41
42/* DIP switch */
43#define DIP_SWITCH_MATRIX_GRID \
44 { \
45 { 5, 4 } \
46 }
47#define SCAN_COUNT_MAX 100 42#define SCAN_COUNT_MAX 100
48 43
49/* Disable DIP switch in matrix data */
50#define MATRIX_MASKED
51
52/* turn off effects when suspended */ 44/* turn off effects when suspended */
53#define RGB_MATRIX_SLEEP 45#define RGB_MATRIX_SLEEP
54 46
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [5, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19// clang-format off
20const matrix_row_t matrix_mask[] = {
21 0b111111111111111111,
22 0b111111111111111111,
23 0b111111111111111111,
24 0b111111111111111111,
25 0b111111111111111111,
26 0b111111111111101111,
27};
28// clang-format on
29#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
30bool dip_switch_update_kb(uint8_t index, bool active) { 20bool dip_switch_update_kb(uint8_t index, bool active) {
31 if (!dip_switch_update_user(index, active)) { 21 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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b0111111111111101,
21 0b0111111111111111,
22 0b0111111111111111,
23 0b0111111111111111,
24 0b0111111111111111,
25 0b0111111111111111,
26};
27
28#ifdef RGB_MATRIX_ENABLE 19#ifdef RGB_MATRIX_ENABLE
29const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { 20const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
30/* Refer to IS31 manual for these locations 21/* 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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b0111111111111101,
21 0b0111111111111111,
22 0b0111111111111111,
23 0b0111111111111111,
24 0b0111111111111111,
25 0b0111111111111111,
26};
27
28#ifdef RGB_MATRIX_ENABLE 19#ifdef RGB_MATRIX_ENABLE
29const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { 20const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
30/* Refer to IS31 manual for these locations 21/* 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 @@
20#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND 20#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
21#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_VCC_VCC 21#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
22 22
23/* DIP switch */
24#define DIP_SWITCH_MATRIX_GRID { {0,1} }
25
26/* Disable DIP switch in matrix data */
27#define MATRIX_MASKED
28
29/* Encoder Configuration*/ 23/* Encoder Configuration*/
30#define ENCODER_DEFAULT_POS 0x3 24#define ENCODER_DEFAULT_POS 0x3
31 25
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 @@
17 "nkro": true, 17 "nkro": true,
18 "rgb_matrix": true 18 "rgb_matrix": true
19 }, 19 },
20 "dip_switch": {
21 "matrix_grid": [ [0, 1] ]
22 },
20 "matrix_pins": { 23 "matrix_pins": {
21 "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"], 24 "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"],
22 "rows": ["D3", "D2", "B3", "B2", "B1", "B0"] 25 "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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b0111111111111101,
21 0b0111111111111111,
22 0b0111111111111111,
23 0b0111111111111111,
24 0b0111111111111111,
25 0b0111111111111111,
26};
27
28#ifdef RGB_MATRIX_ENABLE 19#ifdef RGB_MATRIX_ENABLE
29const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { 20const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
30/* Refer to IS31 manual for these locations 21/* 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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b0111111111111101,
21 0b0111111111111111,
22 0b0111111111111111,
23 0b0111111111111111,
24 0b0111111111111111,
25 0b0111111111111111,
26};
27
28#ifdef RGB_MATRIX_ENABLE 19#ifdef RGB_MATRIX_ENABLE
29 20
30const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { 21const 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 @@
27#define I2C1_TIMINGR_SCLH 15U 27#define I2C1_TIMINGR_SCLH 15U
28#define I2C1_TIMINGR_SCLL 51U 28#define I2C1_TIMINGR_SCLL 51U
29 29
30/* DIP switch */
31#define DIP_SWITCH_MATRIX_GRID \
32 { \
33 { 5, 4 } \
34 }
35
36/* Disable DIP switch in matrix data */
37#define MATRIX_MASKED
38
39/* Disable RGB lighting when PC is in suspend */ 30/* Disable RGB lighting when PC is in suspend */
40#define RGB_MATRIX_SLEEP 31#define RGB_MATRIX_SLEEP
41 32
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 @@
18 "rgb_matrix": true, 18 "rgb_matrix": true,
19 "dip_switch": true 19 "dip_switch": true
20 }, 20 },
21 "dip_switch": {
22 "matrix_grid": [ [5, 4] ]
23 },
21 "matrix_pins": { 24 "matrix_pins": {
22 "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", null, null, null, null, null, null, null, null], 25 "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", null, null, null, null, null, null, null, null],
23 "rows": ["B5", "B4", "B3", "A15", "A14", "A13"], 26 "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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b1111111111111111,
21 0b1111111111111111,
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111111111,
25 0b1111111111101111,
26};
27
28#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
29bool dip_switch_update_kb(uint8_t index, bool active) { 20bool dip_switch_update_kb(uint8_t index, bool active) {
30 if (!dip_switch_update_user(index, active)) { 21 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 @@
18 18
19#define MATRIX_UNSELECT_DRIVE_HIGH 19#define MATRIX_UNSELECT_DRIVE_HIGH
20 20
21/* DIP switch */
22#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
23
24/* RGB Matrix Driver Configuration */ 21/* RGB Matrix Driver Configuration */
25#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO 22#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO
26#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND 23#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND
27 24
28#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL 25#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
29 26
30/* Disable DIP switch in matrix data */
31#define MATRIX_MASKED
32
33/* turn off effects when suspended */ 27/* turn off effects when suspended */
34#define RGB_MATRIX_SLEEP 28#define RGB_MATRIX_SLEEP
35 29
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 @@
22 "nkro": true, 22 "nkro": true,
23 "rgb_matrix": true 23 "rgb_matrix": true
24 }, 24 },
25 "dip_switch": {
26 "matrix_grid": [ [4, 4] ]
27 },
25 "matrix_pins": { 28 "matrix_pins": {
26 "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], 29 "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
27 "rows": ["B4", "B3", "A15", "A14", "A13"] 30 "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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b1111111111111111,
21 0b1111111111111111,
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
29 29
30#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL 30#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
31 31
32/* DIP switch */
33#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
34
35/* Disable DIP switch in matrix data */
36#define MATRIX_MASKED
37
38/* Encoder Configuration*/ 32/* Encoder Configuration*/
39#define ENCODER_DEFAULT_POS 0x3 33#define ENCODER_DEFAULT_POS 0x3
40 34
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 @@
3 "maintainer": "lalalademaxiya1", 3 "maintainer": "lalalademaxiya1",
4 "bootloader": "stm32-dfu", 4 "bootloader": "stm32-dfu",
5 "diode_direction": "ROW2COL", 5 "diode_direction": "ROW2COL",
6 "dip_switch": {
7 "matrix_grid": [ [5, 4] ]
8 },
6 "eeprom": { 9 "eeprom": {
7 "wear_leveling": { 10 "wear_leveling": {
8 "backing_size": 4096 11 "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 @@
17#include "quantum.h" 17#include "quantum.h"
18#include "rgb_matrix.h" 18#include "rgb_matrix.h"
19 19
20// clang-format off
21
22const matrix_row_t matrix_mask[] = {
23 0b1111111111111111,
24 0b1111111111111111,
25 0b1111111111111111,
26 0b1111111111111111,
27 0b1111111111111111,
28 0b1111111111101111,
29};
30
31// clang-format on
32
33#ifdef DIP_SWITCH_ENABLE 20#ifdef DIP_SWITCH_ENABLE
34 21
35bool dip_switch_update_kb(uint8_t index, bool active) { 22bool 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 @@
16 16
17#pragma once 17#pragma once
18 18
19/* DIP switch */
20#define DIP_SWITCH_MATRIX_GRID { {4,4} }
21
22/* Disable DIP switch in matrix data */
23#define MATRIX_MASKED
24
25/* turn off effects when suspended */ 19/* turn off effects when suspended */
26#define RGB_MATRIX_SLEEP 20#define RGB_MATRIX_SLEEP
27 21
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 @@
4 "maintainer": "lalalademaxiya1", 4 "maintainer": "lalalademaxiya1",
5 "bootloader": "stm32-dfu", 5 "bootloader": "stm32-dfu",
6 "diode_direction": "ROW2COL", 6 "diode_direction": "ROW2COL",
7 "dip_switch": {
8 "matrix_grid": [ [4, 4] ]
9 },
7 "dynamic_keymap": { 10 "dynamic_keymap": {
8 "layer_count": 5 11 "layer_count": 5
9 }, 12 },
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b11111111111111,
21 0b11111111111111,
22 0b11111111111111,
23 0b11111111111111,
24 0b11111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
33#define SNLED27351_CURRENT_TUNE \ 33#define SNLED27351_CURRENT_TUNE \
34 { 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 } 34 { 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 }
35 35
36/* DIP switch */
37#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
38
39/* Disable DIP switch in matrix data */
40#define MATRIX_MASKED
41
42/* turn off effects when suspended */ 36/* turn off effects when suspended */
43#define RGB_MATRIX_SLEEP 37#define RGB_MATRIX_SLEEP
44 38
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 @@
4 "maintainer": "lalalademaxiya1", 4 "maintainer": "lalalademaxiya1",
5 "bootloader": "stm32-dfu", 5 "bootloader": "stm32-dfu",
6 "diode_direction": "ROW2COL", 6 "diode_direction": "ROW2COL",
7 "dip_switch": {
8 "matrix_grid": [ [5, 4] ]
9 },
7 "eeprom": { 10 "eeprom": {
8 "wear_leveling": { 11 "wear_leveling": {
9 "backing_size": 4096 12 "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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b111111111111111111,
21 0b111111111111111111,
22 0b111111111111111111,
23 0b111111111111111111,
24 0b111111111111111111,
25 0b111111111111101111,
26};
27
28#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
29 20
30bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
30#define SNLED27351_CURRENT_TUNE \ 30#define SNLED27351_CURRENT_TUNE \
31 { 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52 } 31 { 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52 }
32 32
33/* DIP switch */
34#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
35
36/* Disable DIP switch in matrix data */
37#define MATRIX_MASKED
38
39/* turn off effects when suspended */ 33/* turn off effects when suspended */
40#define RGB_MATRIX_SLEEP 34#define RGB_MATRIX_SLEEP
41 35
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [5, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b11111111111111111111,
21 0b11111111111111111111,
22 0b11111111111111111111,
23 0b11111111111111111111,
24 0b11111111111111111111,
25 0b11111111111111101111,
26};
27
28#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
29 20
30bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
29#define SNLED27351_CURRENT_TUNE \ 29#define SNLED27351_CURRENT_TUNE \
30 { 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60 } 30 { 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60 }
31 31
32/* DIP switch */
33#define DIP_SWITCH_MATRIX_GRID { {4,4} }
34
35/* Disable DIP switch in matrix data */
36#define MATRIX_MASKED
37
38/* turn off effects when suspended */ 32/* turn off effects when suspended */
39#define RGB_MATRIX_SLEEP 33#define RGB_MATRIX_SLEEP
40 34
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [4, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b11111111111111,
21 0b11111111111111,
22 0b11111111111111,
23 0b11111111111111,
24 0b11111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
40#define SNLED27351_CURRENT_TUNE \ 40#define SNLED27351_CURRENT_TUNE \
41 { 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58 } 41 { 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58 }
42 42
43/* Disable DIP switch in matrix data */
44#define MATRIX_MASKED
45
46/* DIP switch */
47#define DIP_SWITCH_MATRIX_GRID { {4,4} }
48
49/* Turn off effects when suspended */ 43/* Turn off effects when suspended */
50#define RGB_MATRIX_SLEEP 44#define RGB_MATRIX_SLEEP
51 45
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [4, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b1111111111111111,
21 0b1111111111111111,
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
30#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL 30#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
31#define SNLED27351_CURRENT_TUNE \ 31#define SNLED27351_CURRENT_TUNE \
32 { 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80 } 32 { 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80 }
33
34/* DIP switch */
35#define DIP_SWITCH_MATRIX_GRID { {4,4} }
36
37/* Disable DIP switch in matrix data */
38#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 @@
4 "maintainer": "lalalademaxiya1", 4 "maintainer": "lalalademaxiya1",
5 "bootloader": "stm32-dfu", 5 "bootloader": "stm32-dfu",
6 "diode_direction": "ROW2COL", 6 "diode_direction": "ROW2COL",
7 "dip_switch": {
8 "matrix_grid": [ [4, 4] ]
9 },
7 "dynamic_keymap": { 10 "dynamic_keymap": {
8 "layer_count": 5 11 "layer_count": 5
9 }, 12 },
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b1111111111111111,
21 0b1111111111111111,
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
34#define SNLED27351_CURRENT_TUNE \ 34#define SNLED27351_CURRENT_TUNE \
35 { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 } 35 { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
36 36
37/* DIP switch */
38#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
39
40/* Disable DIP switch in matrix data */
41#define MATRIX_MASKED
42
43/* Encoder Configuration */ 37/* Encoder Configuration */
44#define ENCODER_DEFAULT_POS 0x3 38#define ENCODER_DEFAULT_POS 0x3
45 39
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 @@
4 "maintainer": "lalalademaxiya1", 4 "maintainer": "lalalademaxiya1",
5 "bootloader": "stm32-dfu", 5 "bootloader": "stm32-dfu",
6 "diode_direction": "ROW2COL", 6 "diode_direction": "ROW2COL",
7 "dip_switch": {
8 "matrix_grid": [ [4, 4] ]
9 },
7 "dynamic_keymap": { 10 "dynamic_keymap": {
8 "layer_count": 5 11 "layer_count": 5
9 }, 12 },
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b111111111111111,
21 0b111111111111111,
22 0b111111111111111,
23 0b111111111111111,
24 0b111111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
16 16
17#pragma once 17#pragma once
18 18
19/* Disable DIP switch in matrix data */
20#define MATRIX_MASKED
21
22/* DIP switch */
23#define DIP_SWITCH_MATRIX_GRID { { 3, 4 } }
24
25/* RGB Matrix Driver Configuration */ 19/* RGB Matrix Driver Configuration */
26#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND 20#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
27 21
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 @@
22 "nkro": true, 22 "nkro": true,
23 "rgb_matrix": true 23 "rgb_matrix": true
24 }, 24 },
25 "dip_switch": {
26 "matrix_grid": [ [3, 4] ]
27 },
25 "matrix_pins": { 28 "matrix_pins": {
26 "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], 29 "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
27 "rows": ["B3", "A15", "A14", "A13"] 30 "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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b111111111111111,
21 0b111111111111111,
22 0b111111111111111,
23 0b111111111101111,
24};
25
26#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
27 20
28bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
16 16
17#pragma once 17#pragma once
18 18
19/* Disable DIP switch in matrix data */
20#define MATRIX_MASKED
21
22/* DIP switch */
23#define DIP_SWITCH_MATRIX_GRID {{ 3, 4 }}
24
25/* RGB Matrix Driver Configuration */ 19/* RGB Matrix Driver Configuration */
26#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND 20#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
27 21
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 @@
19 "nkro": true, 19 "nkro": true,
20 "rgb_matrix": true 20 "rgb_matrix": true
21 }, 21 },
22 "dip_switch": {
23 "matrix_grid": [ [3, 4] ]
24 },
22 "matrix_pins": { 25 "matrix_pins": {
23 "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"], 26 "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
24 "rows": ["B3", "A15", "A14", "A13"] 27 "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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b111111111111111,
21 0b111111111111111,
22 0b111111111111111,
23 0b111111111101111,
24};
25
26#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
27bool dip_switch_update_kb(uint8_t index, bool active) { 20bool dip_switch_update_kb(uint8_t index, bool active) {
28 if (!dip_switch_update_user(index, active)) { 21 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 @@
16 16
17#pragma once 17#pragma once
18 18
19/* Disable DIP switch in matrix data */
20#define MATRIX_MASKED
21
22/* DIP switch */
23#define DIP_SWITCH_MATRIX_GRID { {5,4} }
24
25/* EEPROM Driver Configuration */ 19/* EEPROM Driver Configuration */
26#define WEAR_LEVELING_LOGICAL_SIZE 2048 20#define WEAR_LEVELING_LOGICAL_SIZE 2048
27#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) 21#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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [5, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b111111111111111,
21 0b111111111111111,
22 0b111111111111111,
23 0b111111111111111,
24 0b111111111111111,
25 0b111111111101111,
26};
27
28#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
29 20
30bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
25/* COL2ROW or ROW2COL */ 25/* COL2ROW or ROW2COL */
26#define DIODE_DIRECTION ROW2COL 26#define DIODE_DIRECTION ROW2COL
27 27
28/* Disable DIP switch in matrix data */
29#define MATRIX_MASKED
30
31/* DIP switch */
32#define DIP_SWITCH_MATRIX_GRID { {5,4} }
33
34/* RGB Matrix Driver Configuration */ 28/* RGB Matrix Driver Configuration */
35#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO 29#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO
36#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND 30#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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [5, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b1111111111111111,
21 0b1111111111111111,
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111111111,
25 0b1111111111101111,
26};
27
28#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
29 20
30bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
44#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL 44#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
45#define SNLED27351_CURRENT_TUNE { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A } 45#define SNLED27351_CURRENT_TUNE { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
46 46
47/* DIP switch */
48#define DIP_SWITCH_MATRIX_GRID { {5,5} }
49
50/* Disable DIP switch in matrix data */
51#define MATRIX_MASKED
52
53/* Disable RGB lighting when PC is in suspend */ 47/* Disable RGB lighting when PC is in suspend */
54#define RGB_MATRIX_SLEEP 48#define RGB_MATRIX_SLEEP
55 49
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [5, 5] ]
4 }
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b1111111111111111,
21 0b1111111111111111,
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111111111,
25 0b1111111111011111,
26};
27
28#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
29 20
30bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
32 32
33#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL 33#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
34 34
35/* Disable DIP switch in matrix data */
36#define MATRIX_MASKED
37
38/* DIP switch */
39#define DIP_SWITCH_MATRIX_GRID { {4,4} }
40
41/* turn off effects when suspended */ 35/* turn off effects when suspended */
42#define RGB_MATRIX_SLEEP 36#define RGB_MATRIX_SLEEP
43 37
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [4, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b111111111111111,
21 0b111111111111111,
22 0b111111111111111,
23 0b111111111111111,
24 0b111111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
32 32
33#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL 33#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
34 34
35/* DIP switch */
36#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
37
38/* Disable DIP switch in matrix data */
39#define MATRIX_MASKED
40
41/* turn off effects when suspended */ 35/* turn off effects when suspended */
42#define RGB_MATRIX_SLEEP 36#define RGB_MATRIX_SLEEP
43 37
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [5, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19// clang-format off
20
21const matrix_row_t matrix_mask[] = {
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111111111,
25 0b1111111111111111,
26 0b1111111111111111,
27 0b1111111111101111,
28};
29
30// clang-format on
31
32#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
33 20
34bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
29#define SNLED27351_CURRENT_TUNE \ 29#define SNLED27351_CURRENT_TUNE \
30 { 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60 } 30 { 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60 }
31 31
32/* DIP switch */
33#define DIP_SWITCH_MATRIX_GRID { {4,4} }
34
35/* Disable DIP switch in matrix data */
36#define MATRIX_MASKED
37
38/* turn off effects when suspended */ 32/* turn off effects when suspended */
39#define RGB_MATRIX_SLEEP 33#define RGB_MATRIX_SLEEP
40 34
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [4, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b11111111111111,
21 0b11111111111111,
22 0b11111111111111,
23 0b11111111111111,
24 0b11111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
39#define SNLED27351_CURRENT_TUNE \ 39#define SNLED27351_CURRENT_TUNE \
40 { 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 } 40 { 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 }
41 41
42/* DIP switch */
43#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
44
45/* Disable DIP switch in matrix data */
46#define MATRIX_MASKED
47
48/* turn off effects when suspended */ 42/* turn off effects when suspended */
49#define RGB_MATRIX_SLEEP 43#define RGB_MATRIX_SLEEP
50 44
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [5, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b111111111111111111,
21 0b111111111111111111,
22 0b111111111111111111,
23 0b111111111111111111,
24 0b111111111111111111,
25 0b111111111111101111,
26};
27
28#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
29 20
30bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
33/* Limit the maximum brigtness current of colour white to 500mA */ 33/* Limit the maximum brigtness current of colour white to 500mA */
34#define SNLED27351_CURRENT_TUNE { 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48 } 34#define SNLED27351_CURRENT_TUNE { 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48 }
35 35
36/* DIP switch */
37#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
38#define SCAN_COUNT_MAX 100 36#define SCAN_COUNT_MAX 100
39 37
40/* Disable DIP switch in matrix data */
41#define MATRIX_MASKED
42
43/* turn off effects when suspended */ 38/* turn off effects when suspended */
44#define RGB_MATRIX_SLEEP 39#define RGB_MATRIX_SLEEP
45 40
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [5, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b11111111111111111111,
21 0b11111111111111111111,
22 0b11111111111111111111,
23 0b11111111111111111111,
24 0b11111111111111111111,
25 0b11111111111111101111,
26};
27
28#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
29 20
30bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
30#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL 30#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
31#define SNLED27351_CURRENT_TUNE { 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70 } 31#define SNLED27351_CURRENT_TUNE { 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70 }
32 32
33/* DIP switch */
34#define DIP_SWITCH_MATRIX_GRID { {4,4} }
35
36/* Disable DIP switch in matrix data */
37#define MATRIX_MASKED
38
39/* turn off effects when suspended */ 33/* turn off effects when suspended */
40#define RGB_MATRIX_SLEEP 34#define RGB_MATRIX_SLEEP
41 35
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [4, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b1111111111111111,
21 0b1111111111111111,
22 0b1111111111111111,
23 0b1111111111111111,
24 0b1111111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool 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 @@
33#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL 33#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
34#define SNLED27351_CURRENT_TUNE { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 } 34#define SNLED27351_CURRENT_TUNE { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
35 35
36/* DIP switch */
37#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
38
39/* Disable DIP switch in matrix data */
40#define MATRIX_MASKED
41
42/* Turn off effects when suspended */ 36/* Turn off effects when suspended */
43#define RGB_MATRIX_SLEEP 37#define RGB_MATRIX_SLEEP
44 38
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 @@
1{
2 "dip_switch": {
3 "matrix_grid": [ [4, 4] ]
4 }
5}
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 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19const matrix_row_t matrix_mask[] = {
20 0b111111111111111,
21 0b111111111111111,
22 0b111111111111111,
23 0b111111111111111,
24 0b111111111101111,
25};
26
27#ifdef DIP_SWITCH_ENABLE 19#ifdef DIP_SWITCH_ENABLE
28 20
29bool dip_switch_update_kb(uint8_t index, bool active) { 21bool dip_switch_update_kb(uint8_t index, bool active) {