summaryrefslogtreecommitdiff
path: root/keyboards/keychron
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keychron')
-rw-r--r--keyboards/keychron/common/keychron_common.c2
-rw-r--r--keyboards/keychron/common/keychron_common.h6
-rw-r--r--keyboards/keychron/q0/config.h3
-rw-r--r--keyboards/keychron/q0/rev_0130/config.h4
-rw-r--r--keyboards/keychron/q0/rev_0130/info.json5
-rw-r--r--keyboards/keychron/q0/rev_0131/config.h4
-rw-r--r--keyboards/keychron/q0/rev_0131/info.json5
-rw-r--r--keyboards/keychron/q1/ansi/ansi.c2
-rw-r--r--keyboards/keychron/q1/ansi/ansi.h19
-rw-r--r--keyboards/keychron/q1/ansi/config.h4
-rw-r--r--keyboards/keychron/q1/ansi/info.json5
-rw-r--r--keyboards/keychron/q1/ansi_encoder/ansi_encoder.c2
-rw-r--r--keyboards/keychron/q1/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q1/ansi_encoder/config.h4
-rw-r--r--keyboards/keychron/q1/ansi_encoder/info.json5
-rw-r--r--keyboards/keychron/q1/config.h3
-rw-r--r--keyboards/keychron/q1/iso/config.h4
-rw-r--r--keyboards/keychron/q1/iso/info.json5
-rw-r--r--keyboards/keychron/q1/iso/iso.c2
-rw-r--r--keyboards/keychron/q1/iso/iso.h19
-rw-r--r--keyboards/keychron/q1/iso_encoder/config.h4
-rw-r--r--keyboards/keychron/q1/iso_encoder/info.json5
-rw-r--r--keyboards/keychron/q1/iso_encoder/iso_encoder.c2
-rw-r--r--keyboards/keychron/q1/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q1/q1.c2
-rw-r--r--keyboards/keychron/q1/q1.h29
-rw-r--r--keyboards/keychron/q10/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q10/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q10/q10.c2
-rw-r--r--keyboards/keychron/q10/q10.h25
-rw-r--r--keyboards/keychron/q2/ansi/ansi.c2
-rw-r--r--keyboards/keychron/q2/ansi/ansi.h19
-rw-r--r--keyboards/keychron/q2/ansi/info.json5
-rw-r--r--keyboards/keychron/q2/ansi_encoder/ansi_encoder.c2
-rw-r--r--keyboards/keychron/q2/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q2/ansi_encoder/info.json5
-rw-r--r--keyboards/keychron/q2/config.h7
-rw-r--r--keyboards/keychron/q2/iso/info.json5
-rw-r--r--keyboards/keychron/q2/iso/iso.c2
-rw-r--r--keyboards/keychron/q2/iso/iso.h19
-rw-r--r--keyboards/keychron/q2/iso_encoder/info.json5
-rw-r--r--keyboards/keychron/q2/iso_encoder/iso_encoder.c2
-rw-r--r--keyboards/keychron/q2/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q2/jis/info.json5
-rw-r--r--keyboards/keychron/q2/jis_encoder/info.json5
-rw-r--r--keyboards/keychron/q2/q2.c2
-rw-r--r--keyboards/keychron/q2/q2.h29
-rw-r--r--keyboards/keychron/q3/ansi/ansi.c2
-rw-r--r--keyboards/keychron/q3/ansi/ansi.h19
-rw-r--r--keyboards/keychron/q3/ansi_encoder/ansi_encoder.c2
-rw-r--r--keyboards/keychron/q3/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q3/iso/iso.c2
-rw-r--r--keyboards/keychron/q3/iso/iso.h19
-rw-r--r--keyboards/keychron/q3/iso_encoder/iso_encoder.c2
-rw-r--r--keyboards/keychron/q3/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q3/jis/jis.c2
-rw-r--r--keyboards/keychron/q3/jis/jis.h19
-rw-r--r--keyboards/keychron/q3/jis_encoder/jis_encoder.c2
-rw-r--r--keyboards/keychron/q3/jis_encoder/jis_encoder.h19
-rw-r--r--keyboards/keychron/q3/q3.c2
-rw-r--r--keyboards/keychron/q3/q3.h33
-rw-r--r--keyboards/keychron/q4/ansi_v1/ansi_v1.c2
-rw-r--r--keyboards/keychron/q4/ansi_v1/ansi_v1.h19
-rw-r--r--keyboards/keychron/q4/ansi_v1/info.json5
-rw-r--r--keyboards/keychron/q4/ansi_v2/ansi_v2.h19
-rw-r--r--keyboards/keychron/q4/ansi_v2/info.json5
-rw-r--r--keyboards/keychron/q4/config.h7
-rw-r--r--keyboards/keychron/q4/iso/info.json5
-rw-r--r--keyboards/keychron/q4/iso/iso.c2
-rw-r--r--keyboards/keychron/q4/iso/iso.h19
-rw-r--r--keyboards/keychron/q4/q4.c2
-rw-r--r--keyboards/keychron/q4/q4.h27
-rw-r--r--keyboards/keychron/q5/ansi/ansi.c2
-rw-r--r--keyboards/keychron/q5/ansi/ansi.h19
-rw-r--r--keyboards/keychron/q5/ansi_encoder/ansi_encoder.c2
-rw-r--r--keyboards/keychron/q5/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q5/iso/iso.c2
-rw-r--r--keyboards/keychron/q5/iso/iso.h19
-rw-r--r--keyboards/keychron/q5/iso_encoder/iso_encoder.c2
-rw-r--r--keyboards/keychron/q5/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q5/q5.c2
-rw-r--r--keyboards/keychron/q5/q5.h29
-rw-r--r--keyboards/keychron/q6/ansi/ansi.c2
-rw-r--r--keyboards/keychron/q6/ansi/ansi.h19
-rw-r--r--keyboards/keychron/q6/ansi_encoder/ansi_encoder.c2
-rw-r--r--keyboards/keychron/q6/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q6/iso/iso.c2
-rw-r--r--keyboards/keychron/q6/iso/iso.h19
-rw-r--r--keyboards/keychron/q6/iso_encoder/iso_encoder.c2
-rw-r--r--keyboards/keychron/q6/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q6/q6.c2
-rw-r--r--keyboards/keychron/q6/q6.h29
-rw-r--r--keyboards/keychron/q60/ansi/info.json5
-rw-r--r--keyboards/keychron/q60/config.h9
-rw-r--r--keyboards/keychron/q7/ansi/info.json5
-rw-r--r--keyboards/keychron/q7/config.h7
-rw-r--r--keyboards/keychron/q7/iso/info.json5
-rw-r--r--keyboards/keychron/q8/ansi/ansi.h19
-rw-r--r--keyboards/keychron/q8/ansi/info.json5
-rw-r--r--keyboards/keychron/q8/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q8/ansi_encoder/info.json5
-rw-r--r--keyboards/keychron/q8/config.h9
-rw-r--r--keyboards/keychron/q8/iso/info.json5
-rw-r--r--keyboards/keychron/q8/iso/iso.h19
-rw-r--r--keyboards/keychron/q8/iso_encoder/info.json5
-rw-r--r--keyboards/keychron/q8/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q8/q8.c2
-rw-r--r--keyboards/keychron/q8/q8.h29
-rw-r--r--keyboards/keychron/q9/ansi/ansi.c2
-rw-r--r--keyboards/keychron/q9/ansi/ansi.h19
-rw-r--r--keyboards/keychron/q9/ansi/info.json5
-rw-r--r--keyboards/keychron/q9/ansi_encoder/ansi_encoder.c2
-rw-r--r--keyboards/keychron/q9/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q9/ansi_encoder/info.json5
-rw-r--r--keyboards/keychron/q9/config.h9
-rw-r--r--keyboards/keychron/q9/iso/info.json5
-rw-r--r--keyboards/keychron/q9/iso/iso.c2
-rw-r--r--keyboards/keychron/q9/iso/iso.h19
-rw-r--r--keyboards/keychron/q9/iso_encoder/info.json5
-rw-r--r--keyboards/keychron/q9/iso_encoder/iso_encoder.c2
-rw-r--r--keyboards/keychron/q9/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q9/q9.c2
-rw-r--r--keyboards/keychron/q9/q9.h29
-rw-r--r--keyboards/keychron/s1/ansi/rgb/info.json5
-rw-r--r--keyboards/keychron/s1/ansi/white/info.json5
-rw-r--r--keyboards/keychron/s1/config.h9
-rw-r--r--keyboards/keychron/v2/ansi/info.json5
-rw-r--r--keyboards/keychron/v2/ansi_encoder/info.json5
-rw-r--r--keyboards/keychron/v2/config.h9
-rw-r--r--keyboards/keychron/v2/iso/info.json5
-rw-r--r--keyboards/keychron/v2/iso_encoder/info.json5
-rw-r--r--keyboards/keychron/v2/jis/info.json5
-rw-r--r--keyboards/keychron/v2/jis_encoder/info.json5
-rw-r--r--keyboards/keychron/v4/ansi/info.json5
-rw-r--r--keyboards/keychron/v4/config.h9
-rw-r--r--keyboards/keychron/v4/iso/info.json5
-rw-r--r--keyboards/keychron/v7/ansi/info.json5
-rw-r--r--keyboards/keychron/v7/config.h9
-rw-r--r--keyboards/keychron/v7/iso/info.json5
-rw-r--r--keyboards/keychron/v8/ansi/info.json5
-rw-r--r--keyboards/keychron/v8/ansi_encoder/info.json5
-rw-r--r--keyboards/keychron/v8/config.h7
-rw-r--r--keyboards/keychron/v8/iso/info.json5
-rw-r--r--keyboards/keychron/v8/iso_encoder/info.json5
144 files changed, 253 insertions, 1084 deletions
diff --git a/keyboards/keychron/common/keychron_common.c b/keyboards/keychron/common/keychron_common.c
index a6250966f3..9c7fc3ace5 100644
--- a/keyboards/keychron/common/keychron_common.c
+++ b/keyboards/keychron/common/keychron_common.c
@@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include QMK_KEYBOARD_H
#include "keychron_common.h"
+#include "sync_timer.h"
bool is_siri_active = false;
uint32_t siri_timer = 0;
diff --git a/keyboards/keychron/common/keychron_common.h b/keyboards/keychron/common/keychron_common.h
index 5e56a828c8..648a5d3371 100644
--- a/keyboards/keychron/common/keychron_common.h
+++ b/keyboards/keychron/common/keychron_common.h
@@ -16,10 +16,14 @@
#pragma once
-#include "stdint.h"
+#include <stdint.h>
+#include <stdbool.h>
+#include "action.h"
+
#ifdef VIA_ENABLE
# include "via.h"
#endif
+
#include "quantum_keycodes.h"
enum custom_keycodes {
diff --git a/keyboards/keychron/q0/config.h b/keyboards/keychron/q0/config.h
index 28e942da07..616f5494e7 100644
--- a/keyboards/keychron/q0/config.h
+++ b/keyboards/keychron/q0/config.h
@@ -16,9 +16,6 @@
#pragma once
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
#define CKLED2001_CURRENT_TUNE { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 }
/* NKRO */
diff --git a/keyboards/keychron/q0/rev_0130/config.h b/keyboards/keychron/q0/rev_0130/config.h
index 80a2e150af..9a5d3bc372 100644
--- a/keyboards/keychron/q0/rev_0130/config.h
+++ b/keyboards/keychron/q0/rev_0130/config.h
@@ -16,10 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B5, B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS { A5, A6, A7, B0 }
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 1
#define DRIVER_ADDR_1 0b1110100
diff --git a/keyboards/keychron/q0/rev_0130/info.json b/keyboards/keychron/q0/rev_0130/info.json
index 334f879d3b..acfd07e390 100644
--- a/keyboards/keychron/q0/rev_0130/info.json
+++ b/keyboards/keychron/q0/rev_0130/info.json
@@ -8,6 +8,11 @@
"pid": "0x0130",
"device_version": "1.0.2"
},
+ "matrix_pins": {
+ "cols": ["A5", "A6", "A7", "B0"],
+ "rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q0/rev_0131/config.h b/keyboards/keychron/q0/rev_0131/config.h
index f94517ebb4..e4c5c2d3fc 100644
--- a/keyboards/keychron/q0/rev_0131/config.h
+++ b/keyboards/keychron/q0/rev_0131/config.h
@@ -16,10 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B5, B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS { C14, C15, A0, A1, A2 }
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 1
#define DRIVER_ADDR_1 0b1110111
diff --git a/keyboards/keychron/q0/rev_0131/info.json b/keyboards/keychron/q0/rev_0131/info.json
index 94808bd9c4..d447502cba 100644
--- a/keyboards/keychron/q0/rev_0131/info.json
+++ b/keyboards/keychron/q0/rev_0131/info.json
@@ -8,6 +8,11 @@
"pid": "0x0131",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2"],
+ "rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A3", "pin_b": "A4"}
diff --git a/keyboards/keychron/q1/ansi/ansi.c b/keyboards/keychron/q1/ansi/ansi.c
index fc22d1aff3..ee586fef93 100644
--- a/keyboards/keychron/q1/ansi/ansi.c
+++ b/keyboards/keychron/q1/ansi/ansi.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q1/ansi/ansi.h b/keyboards/keychron/q1/ansi/ansi.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q1/ansi/ansi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q1/ansi/config.h b/keyboards/keychron/q1/ansi/config.h
index 0a30f7d82d..c6d4e44c87 100644
--- a/keyboards/keychron/q1/ansi/config.h
+++ b/keyboards/keychron/q1/ansi/config.h
@@ -16,10 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { D3, D2, B3, B2, B1, B0 }
-#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 }
-
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 59
#define DRIVER_2_LED_TOTAL 23
diff --git a/keyboards/keychron/q1/ansi/info.json b/keyboards/keychron/q1/ansi/info.json
index 63602d71c5..c878317063 100644
--- a/keyboards/keychron/q1/ansi/info.json
+++ b/keyboards/keychron/q1/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x0100",
"device_version": "1.0.0"
},
+ "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"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c
index 5909b993e3..bc559b3541 100644
--- a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q1/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q1/ansi_encoder/config.h b/keyboards/keychron/q1/ansi_encoder/config.h
index a41976d560..28bbea9087 100644
--- a/keyboards/keychron/q1/ansi_encoder/config.h
+++ b/keyboards/keychron/q1/ansi_encoder/config.h
@@ -16,10 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { D3, D2, B3, B2, B1, B0 }
-#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 }
-
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 59
#define DRIVER_2_LED_TOTAL 23
diff --git a/keyboards/keychron/q1/ansi_encoder/info.json b/keyboards/keychron/q1/ansi_encoder/info.json
index 2391e674ad..9b1f1ba014 100644
--- a/keyboards/keychron/q1/ansi_encoder/info.json
+++ b/keyboards/keychron/q1/ansi_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0101",
"device_version": "1.0.0"
},
+ "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"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "E6", "pin_b": "B7"}
diff --git a/keyboards/keychron/q1/config.h b/keyboards/keychron/q1/config.h
index a49ec41a06..a87754e9f2 100644
--- a/keyboards/keychron/q1/config.h
+++ b/keyboards/keychron/q1/config.h
@@ -16,9 +16,6 @@
#pragma once
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1010000
diff --git a/keyboards/keychron/q1/iso/config.h b/keyboards/keychron/q1/iso/config.h
index b9b33cf320..cb7b05560a 100644
--- a/keyboards/keychron/q1/iso/config.h
+++ b/keyboards/keychron/q1/iso/config.h
@@ -16,10 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { D3, D2, B3, B2, B1, B0 }
-#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 }
-
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 59
#define DRIVER_2_LED_TOTAL 24
diff --git a/keyboards/keychron/q1/iso/info.json b/keyboards/keychron/q1/iso/info.json
index d8f5205f5f..447a246471 100644
--- a/keyboards/keychron/q1/iso/info.json
+++ b/keyboards/keychron/q1/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0102",
"device_version": "1.0.0"
},
+ "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"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/keychron/q1/iso/iso.c b/keyboards/keychron/q1/iso/iso.c
index c8e3165bd3..619d89dffc 100644
--- a/keyboards/keychron/q1/iso/iso.c
+++ b/keyboards/keychron/q1/iso/iso.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q1/iso/iso.h b/keyboards/keychron/q1/iso/iso.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q1/iso/iso.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q1/iso_encoder/config.h b/keyboards/keychron/q1/iso_encoder/config.h
index b52fb88383..c1e84e44d3 100644
--- a/keyboards/keychron/q1/iso_encoder/config.h
+++ b/keyboards/keychron/q1/iso_encoder/config.h
@@ -16,10 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { D3, D2, B3, B2, B1, B0 }
-#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 }
-
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {0,1} }
diff --git a/keyboards/keychron/q1/iso_encoder/info.json b/keyboards/keychron/q1/iso_encoder/info.json
index e4dce374c8..ceee988875 100644
--- a/keyboards/keychron/q1/iso_encoder/info.json
+++ b/keyboards/keychron/q1/iso_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0103",
"device_version": "1.0.2"
},
+ "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"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "E6", "pin_b": "B7"}
diff --git a/keyboards/keychron/q1/iso_encoder/iso_encoder.c b/keyboards/keychron/q1/iso_encoder/iso_encoder.c
index c6563ad318..c6b091fff1 100644
--- a/keyboards/keychron/q1/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q1/iso_encoder/iso_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q1/iso_encoder/iso_encoder.h b/keyboards/keychron/q1/iso_encoder/iso_encoder.h
deleted file mode 100644
index d62d707b4a..0000000000
--- a/keyboards/keychron/q1/iso_encoder/iso_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h" \ No newline at end of file
diff --git a/keyboards/keychron/q1/q1.c b/keyboards/keychron/q1/q1.c
index aa0789e852..3df62c4339 100644
--- a/keyboards/keychron/q1/q1.c
+++ b/keyboards/keychron/q1/q1.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q1.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b0111111111111101,
diff --git a/keyboards/keychron/q1/q1.h b/keyboards/keychron/q1/q1.h
deleted file mode 100644
index d706779910..0000000000
--- a/keyboards/keychron/q1/q1.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q1_ansi)
-# include "ansi.h"
-#elif defined(KEYBOARD_keychron_q1_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q1_iso)
-# include "iso.h"
-#elif defined(KEYBOARD_keychron_q1_iso_encoder)
-# include "iso_encoder.h"
-#endif
diff --git a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q10/iso_encoder/iso_encoder.h b/keyboards/keychron/q10/iso_encoder/iso_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q10/iso_encoder/iso_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q10/q10.c b/keyboards/keychron/q10/q10.c
index c823e6939f..455a2a25f2 100644
--- a/keyboards/keychron/q10/q10.c
+++ b/keyboards/keychron/q10/q10.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q10.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b1111111111111111,
diff --git a/keyboards/keychron/q10/q10.h b/keyboards/keychron/q10/q10.h
deleted file mode 100644
index 80e747aca3..0000000000
--- a/keyboards/keychron/q10/q10.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q10_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q10_iso_encoder)
-# include "iso_encoder.h"
-#endif
diff --git a/keyboards/keychron/q2/ansi/ansi.c b/keyboards/keychron/q2/ansi/ansi.c
index 5c5acb3fd8..28f91269c4 100644
--- a/keyboards/keychron/q2/ansi/ansi.c
+++ b/keyboards/keychron/q2/ansi/ansi.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q2/ansi/ansi.h b/keyboards/keychron/q2/ansi/ansi.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q2/ansi/ansi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q2/ansi/info.json b/keyboards/keychron/q2/ansi/info.json
index 054786185a..eac3fc529c 100644
--- a/keyboards/keychron/q2/ansi/info.json
+++ b/keyboards/keychron/q2/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x0110",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
index c926a5bf75..28f91269c4 100644
--- a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q2/ansi_encoder/info.json b/keyboards/keychron/q2/ansi_encoder/info.json
index a2a12dc39c..e0f7c6cebd 100644
--- a/keyboards/keychron/q2/ansi_encoder/info.json
+++ b/keyboards/keychron/q2/ansi_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0111",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h
index e421906a68..63e31cd01d 100644
--- a/keyboards/keychron/q2/config.h
+++ b/keyboards/keychron/q2/config.h
@@ -16,18 +16,11 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 }
-
#define MATRIX_UNSELECT_DRIVE_HIGH
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110111
diff --git a/keyboards/keychron/q2/iso/info.json b/keyboards/keychron/q2/iso/info.json
index e295fcef18..afc1079ae1 100644
--- a/keyboards/keychron/q2/iso/info.json
+++ b/keyboards/keychron/q2/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0112",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q2/iso/iso.c b/keyboards/keychron/q2/iso/iso.c
index 7f8d388b0e..1f2c76468e 100644
--- a/keyboards/keychron/q2/iso/iso.c
+++ b/keyboards/keychron/q2/iso/iso.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q2/iso/iso.h b/keyboards/keychron/q2/iso/iso.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q2/iso/iso.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q2/iso_encoder/info.json b/keyboards/keychron/q2/iso_encoder/info.json
index 028522c259..249813f517 100644
--- a/keyboards/keychron/q2/iso_encoder/info.json
+++ b/keyboards/keychron/q2/iso_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0113",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.c b/keyboards/keychron/q2/iso_encoder/iso_encoder.c
index af7b818149..1f2c76468e 100644
--- a/keyboards/keychron/q2/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q2/iso_encoder/iso_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.h b/keyboards/keychron/q2/iso_encoder/iso_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q2/iso_encoder/iso_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q2/jis/info.json b/keyboards/keychron/q2/jis/info.json
index d41bf49cb2..f36cda421f 100644
--- a/keyboards/keychron/q2/jis/info.json
+++ b/keyboards/keychron/q2/jis/info.json
@@ -8,6 +8,11 @@
"pid": "0x0114",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q2/jis_encoder/info.json b/keyboards/keychron/q2/jis_encoder/info.json
index 18e800703b..9e217dddea 100644
--- a/keyboards/keychron/q2/jis_encoder/info.json
+++ b/keyboards/keychron/q2/jis_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0115",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/q2/q2.c b/keyboards/keychron/q2/q2.c
index 13b2238d17..7ff85556de 100644
--- a/keyboards/keychron/q2/q2.c
+++ b/keyboards/keychron/q2/q2.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q2.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b1111111111111111,
diff --git a/keyboards/keychron/q2/q2.h b/keyboards/keychron/q2/q2.h
deleted file mode 100644
index a256ceae6a..0000000000
--- a/keyboards/keychron/q2/q2.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q2_ansi)
-# include "ansi.h"
-#elif defined(KEYBOARD_keychron_q2_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q2_iso)
-# include "iso.h"
-#elif defined(KEYBOARD_keychron_q2_iso_encoder)
-# include "iso_encoder.h"
-#endif
diff --git a/keyboards/keychron/q3/ansi/ansi.c b/keyboards/keychron/q3/ansi/ansi.c
index beff3bc5ec..432a914058 100644
--- a/keyboards/keychron/q3/ansi/ansi.c
+++ b/keyboards/keychron/q3/ansi/ansi.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/ansi/ansi.h b/keyboards/keychron/q3/ansi/ansi.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q3/ansi/ansi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c
index 13f6c26d2d..f873f77d12 100644
--- a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q3/iso/iso.c b/keyboards/keychron/q3/iso/iso.c
index e753a39c1b..d747d55115 100644
--- a/keyboards/keychron/q3/iso/iso.c
+++ b/keyboards/keychron/q3/iso/iso.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/iso/iso.h b/keyboards/keychron/q3/iso/iso.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q3/iso/iso.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q3/iso_encoder/iso_encoder.c b/keyboards/keychron/q3/iso_encoder/iso_encoder.c
index 02aac01ddc..d2bb169aac 100644
--- a/keyboards/keychron/q3/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q3/iso_encoder/iso_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/iso_encoder/iso_encoder.h b/keyboards/keychron/q3/iso_encoder/iso_encoder.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q3/iso_encoder/iso_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q3/jis/jis.c b/keyboards/keychron/q3/jis/jis.c
index 20983c6a5f..f262d3c7d8 100644
--- a/keyboards/keychron/q3/jis/jis.c
+++ b/keyboards/keychron/q3/jis/jis.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "jis.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/jis/jis.h b/keyboards/keychron/q3/jis/jis.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q3/jis/jis.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q3/jis_encoder/jis_encoder.c b/keyboards/keychron/q3/jis_encoder/jis_encoder.c
index efaf5fc5f2..0a97c5ca68 100644
--- a/keyboards/keychron/q3/jis_encoder/jis_encoder.c
+++ b/keyboards/keychron/q3/jis_encoder/jis_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "jis_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/jis_encoder/jis_encoder.h b/keyboards/keychron/q3/jis_encoder/jis_encoder.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q3/jis_encoder/jis_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q3/q3.c b/keyboards/keychron/q3/q3.c
index 120013e77e..2bf8bf08a0 100644
--- a/keyboards/keychron/q3/q3.c
+++ b/keyboards/keychron/q3/q3.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q3.h"
+#include "quantum.h"
#include "rgb_matrix.h"
// clang-format off
diff --git a/keyboards/keychron/q3/q3.h b/keyboards/keychron/q3/q3.h
deleted file mode 100644
index bc2d458bb7..0000000000
--- a/keyboards/keychron/q3/q3.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q3_ansi)
-# include "ansi.h"
-#elif defined(KEYBOARD_keychron_q3_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q3_iso)
-# include "iso.h"
-#elif defined(KEYBOARD_keychron_q3_iso_encoder)
-# include "iso_encoder.h"
-#elif defined(KEYBOARD_keychron_q3_jis)
-# include "jis.h"
-#elif defined(KEYBOARD_keychron_q3_jis_encoder)
-# include "jis_encoder.h"
-#endif
diff --git a/keyboards/keychron/q4/ansi_v1/ansi_v1.c b/keyboards/keychron/q4/ansi_v1/ansi_v1.c
index e651744262..88599103ef 100644
--- a/keyboards/keychron/q4/ansi_v1/ansi_v1.c
+++ b/keyboards/keychron/q4/ansi_v1/ansi_v1.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi_v1.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q4/ansi_v1/ansi_v1.h b/keyboards/keychron/q4/ansi_v1/ansi_v1.h
deleted file mode 100644
index 381c674dad..0000000000
--- a/keyboards/keychron/q4/ansi_v1/ansi_v1.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h" \ No newline at end of file
diff --git a/keyboards/keychron/q4/ansi_v1/info.json b/keyboards/keychron/q4/ansi_v1/info.json
index f24a4acba5..cb0fc55e3f 100644
--- a/keyboards/keychron/q4/ansi_v1/info.json
+++ b/keyboards/keychron/q4/ansi_v1/info.json
@@ -8,6 +8,11 @@
"pid": "0x0140",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q4/ansi_v2/ansi_v2.h b/keyboards/keychron/q4/ansi_v2/ansi_v2.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q4/ansi_v2/ansi_v2.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q4/ansi_v2/info.json b/keyboards/keychron/q4/ansi_v2/info.json
index f24a4acba5..cb0fc55e3f 100644
--- a/keyboards/keychron/q4/ansi_v2/info.json
+++ b/keyboards/keychron/q4/ansi_v2/info.json
@@ -8,6 +8,11 @@
"pid": "0x0140",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q4/config.h b/keyboards/keychron/q4/config.h
index 08549247f3..940ee44e77 100644
--- a/keyboards/keychron/q4/config.h
+++ b/keyboards/keychron/q4/config.h
@@ -16,13 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {4,4} }
diff --git a/keyboards/keychron/q4/iso/info.json b/keyboards/keychron/q4/iso/info.json
index 9c65fa29d1..908c5bdae1 100644
--- a/keyboards/keychron/q4/iso/info.json
+++ b/keyboards/keychron/q4/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0142",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q4/iso/iso.c b/keyboards/keychron/q4/iso/iso.c
index c1d1982b94..24cbcfd745 100644
--- a/keyboards/keychron/q4/iso/iso.c
+++ b/keyboards/keychron/q4/iso/iso.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q4/iso/iso.h b/keyboards/keychron/q4/iso/iso.h
deleted file mode 100644
index 381c674dad..0000000000
--- a/keyboards/keychron/q4/iso/iso.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h" \ No newline at end of file
diff --git a/keyboards/keychron/q4/q4.c b/keyboards/keychron/q4/q4.c
index 6d31e45607..c3cb67bcc2 100644
--- a/keyboards/keychron/q4/q4.c
+++ b/keyboards/keychron/q4/q4.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q4.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b11111111111111,
diff --git a/keyboards/keychron/q4/q4.h b/keyboards/keychron/q4/q4.h
deleted file mode 100644
index 34aa4a8505..0000000000
--- a/keyboards/keychron/q4/q4.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q4_ansi_v1)
-# include "ansi_v1.h"
-#elif defined(KEYBOARD_keychron_q4_ansi_v2)
-# include "ansi_v2.h"
-#elif defined(KEYBOARD_keychron_q4_iso)
-# include "iso.h"
-#endif
diff --git a/keyboards/keychron/q5/ansi/ansi.c b/keyboards/keychron/q5/ansi/ansi.c
index 6aeb46c07d..dda563cd79 100644
--- a/keyboards/keychron/q5/ansi/ansi.c
+++ b/keyboards/keychron/q5/ansi/ansi.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q5/ansi/ansi.h b/keyboards/keychron/q5/ansi/ansi.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q5/ansi/ansi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c
index 43c27433b2..4d3cc0f036 100644
--- a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q5/iso/iso.c b/keyboards/keychron/q5/iso/iso.c
index b57474f535..65924abd76 100644
--- a/keyboards/keychron/q5/iso/iso.c
+++ b/keyboards/keychron/q5/iso/iso.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q5/iso/iso.h b/keyboards/keychron/q5/iso/iso.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q5/iso/iso.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q5/iso_encoder/iso_encoder.c b/keyboards/keychron/q5/iso_encoder/iso_encoder.c
index 8ae11bc36b..22ba9e2d4e 100644
--- a/keyboards/keychron/q5/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q5/iso_encoder/iso_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q5/iso_encoder/iso_encoder.h b/keyboards/keychron/q5/iso_encoder/iso_encoder.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q5/iso_encoder/iso_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q5/q5.c b/keyboards/keychron/q5/q5.c
index 4130dcebe3..7a1cabcd1a 100644
--- a/keyboards/keychron/q5/q5.c
+++ b/keyboards/keychron/q5/q5.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q5.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b111111111111111111,
diff --git a/keyboards/keychron/q5/q5.h b/keyboards/keychron/q5/q5.h
deleted file mode 100644
index 70ccc8dcfa..0000000000
--- a/keyboards/keychron/q5/q5.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q5_ansi)
-# include "ansi.h"
-#elif defined(KEYBOARD_keychron_q5_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q5_iso)
-# include "iso.h"
-#elif defined(KEYBOARD_keychron_q5_iso_encoder)
-# include "iso_encoder.h"
-#endif
diff --git a/keyboards/keychron/q6/ansi/ansi.c b/keyboards/keychron/q6/ansi/ansi.c
index 982996d347..a81d5f9e9f 100644
--- a/keyboards/keychron/q6/ansi/ansi.c
+++ b/keyboards/keychron/q6/ansi/ansi.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q6/ansi/ansi.h b/keyboards/keychron/q6/ansi/ansi.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q6/ansi/ansi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c
index 6cf593dd25..6fbece3678 100644
--- a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q6/iso/iso.c b/keyboards/keychron/q6/iso/iso.c
index d8c4add867..f2081177e9 100644
--- a/keyboards/keychron/q6/iso/iso.c
+++ b/keyboards/keychron/q6/iso/iso.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q6/iso/iso.h b/keyboards/keychron/q6/iso/iso.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q6/iso/iso.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q6/iso_encoder/iso_encoder.c b/keyboards/keychron/q6/iso_encoder/iso_encoder.c
index c6a21a6223..e9a6f6edfc 100644
--- a/keyboards/keychron/q6/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q6/iso_encoder/iso_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q6/iso_encoder/iso_encoder.h b/keyboards/keychron/q6/iso_encoder/iso_encoder.h
deleted file mode 100644
index de5b0aedb1..0000000000
--- a/keyboards/keychron/q6/iso_encoder/iso_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q6/q6.c b/keyboards/keychron/q6/q6.c
index d2f9d2aa4e..8a9750e9de 100644
--- a/keyboards/keychron/q6/q6.c
+++ b/keyboards/keychron/q6/q6.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q6.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b11111111111111111111,
diff --git a/keyboards/keychron/q6/q6.h b/keyboards/keychron/q6/q6.h
deleted file mode 100644
index 9e878e700c..0000000000
--- a/keyboards/keychron/q6/q6.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q6_ansi)
-# include "ansi.h"
-#elif defined(KEYBOARD_keychron_q6_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q6_iso)
-# include "iso.h"
-#elif defined(KEYBOARD_keychron_q6_iso_encoder)
-# include "iso_encoder.h"
-#endif
diff --git a/keyboards/keychron/q60/ansi/info.json b/keyboards/keychron/q60/ansi/info.json
index c64de7b5e2..cf4e86f8aa 100644
--- a/keyboards/keychron/q60/ansi/info.json
+++ b/keyboards/keychron/q60/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x01C0",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q60/config.h b/keyboards/keychron/q60/config.h
index bd192cd8bd..779feea4ce 100644
--- a/keyboards/keychron/q60/config.h
+++ b/keyboards/keychron/q60/config.h
@@ -16,15 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS \
- { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS \
- { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 1
#define DRIVER_ADDR_1 0b1110100
diff --git a/keyboards/keychron/q7/ansi/info.json b/keyboards/keychron/q7/ansi/info.json
index dbbc462a6d..00240fd6a3 100644
--- a/keyboards/keychron/q7/ansi/info.json
+++ b/keyboards/keychron/q7/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x0170",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q7/config.h b/keyboards/keychron/q7/config.h
index f0a545bd98..0ea9ee5f46 100644
--- a/keyboards/keychron/q7/config.h
+++ b/keyboards/keychron/q7/config.h
@@ -16,13 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, A10, B5 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110111
diff --git a/keyboards/keychron/q7/iso/info.json b/keyboards/keychron/q7/iso/info.json
index 876412d7b6..b060b570b9 100644
--- a/keyboards/keychron/q7/iso/info.json
+++ b/keyboards/keychron/q7/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0172",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q8/ansi/ansi.h b/keyboards/keychron/q8/ansi/ansi.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q8/ansi/ansi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q8/ansi/info.json b/keyboards/keychron/q8/ansi/info.json
index b80cb42432..96efa35d26 100644
--- a/keyboards/keychron/q8/ansi/info.json
+++ b/keyboards/keychron/q8/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x0180",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q8/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q8/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q8/ansi_encoder/ansi_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q8/ansi_encoder/info.json b/keyboards/keychron/q8/ansi_encoder/info.json
index b75a878198..071a7a25f9 100644
--- a/keyboards/keychron/q8/ansi_encoder/info.json
+++ b/keyboards/keychron/q8/ansi_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0181",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "B5", "pin_b": "A10"}
diff --git a/keyboards/keychron/q8/config.h b/keyboards/keychron/q8/config.h
index 017f463d84..e0f6c673a5 100644
--- a/keyboards/keychron/q8/config.h
+++ b/keyboards/keychron/q8/config.h
@@ -16,15 +16,6 @@
#pragma once
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/* Key matrix pins */
-#define MATRIX_ROW_PINS \
- { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS \
- { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 }
-
/* If PH3 used with a stronger pull resistor then the following definition needs be included */
// #define MATRIX_UNSELECT_DRIVE_HIGH
diff --git a/keyboards/keychron/q8/iso/info.json b/keyboards/keychron/q8/iso/info.json
index c5a5b7653e..e716b347a0 100644
--- a/keyboards/keychron/q8/iso/info.json
+++ b/keyboards/keychron/q8/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0182",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q8/iso/iso.h b/keyboards/keychron/q8/iso/iso.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q8/iso/iso.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q8/iso_encoder/info.json b/keyboards/keychron/q8/iso_encoder/info.json
index 45181452be..f70548f3c4 100644
--- a/keyboards/keychron/q8/iso_encoder/info.json
+++ b/keyboards/keychron/q8/iso_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0183",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "B5", "pin_b": "A10"}
diff --git a/keyboards/keychron/q8/iso_encoder/iso_encoder.h b/keyboards/keychron/q8/iso_encoder/iso_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q8/iso_encoder/iso_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q8/q8.c b/keyboards/keychron/q8/q8.c
index d86ced3d1b..a653bdc8b9 100644
--- a/keyboards/keychron/q8/q8.c
+++ b/keyboards/keychron/q8/q8.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q8.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b111111111111111,
diff --git a/keyboards/keychron/q8/q8.h b/keyboards/keychron/q8/q8.h
deleted file mode 100644
index 02981db19c..0000000000
--- a/keyboards/keychron/q8/q8.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q8_ansi)
-# include "ansi.h"
-#elif defined(KEYBOARD_keychron_q8_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q8_iso)
-# include "iso.h"
-#elif defined(KEYBOARD_keychron_q8_iso_encoder)
-# include "iso_encoder.h"
-#endif
diff --git a/keyboards/keychron/q9/ansi/ansi.c b/keyboards/keychron/q9/ansi/ansi.c
index e10c4de25b..b98149a5f8 100644
--- a/keyboards/keychron/q9/ansi/ansi.c
+++ b/keyboards/keychron/q9/ansi/ansi.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q9/ansi/ansi.h b/keyboards/keychron/q9/ansi/ansi.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q9/ansi/ansi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q9/ansi/info.json b/keyboards/keychron/q9/ansi/info.json
index e1a6ae534d..cd971b155a 100644
--- a/keyboards/keychron/q9/ansi/info.json
+++ b/keyboards/keychron/q9/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x0190",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
+ "rows": ["B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c
index 24c401473d..de0eda1c02 100644
--- a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index 366d3f39c2..0000000000
--- a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 1010 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q9/ansi_encoder/info.json b/keyboards/keychron/q9/ansi_encoder/info.json
index 5100c18945..7b4e73eee3 100644
--- a/keyboards/keychron/q9/ansi_encoder/info.json
+++ b/keyboards/keychron/q9/ansi_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0191",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
+ "rows": ["B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "B4", "pin_b": "B5"}
diff --git a/keyboards/keychron/q9/config.h b/keyboards/keychron/q9/config.h
index e051703d11..742dde3ff2 100644
--- a/keyboards/keychron/q9/config.h
+++ b/keyboards/keychron/q9/config.h
@@ -16,15 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS \
- { B3, A15, A14, A13 }
-#define MATRIX_COL_PINS \
- { A10, A9, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* Disable DIP switch in matrix data */
#define MATRIX_MASKED
diff --git a/keyboards/keychron/q9/iso/info.json b/keyboards/keychron/q9/iso/info.json
index 159abc63ae..7f435a2b7b 100644
--- a/keyboards/keychron/q9/iso/info.json
+++ b/keyboards/keychron/q9/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0192",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
+ "rows": ["B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q9/iso/iso.c b/keyboards/keychron/q9/iso/iso.c
index e038e8581f..0e258e8c63 100644
--- a/keyboards/keychron/q9/iso/iso.c
+++ b/keyboards/keychron/q9/iso/iso.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q9/iso/iso.h b/keyboards/keychron/q9/iso/iso.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q9/iso/iso.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q9/iso_encoder/info.json b/keyboards/keychron/q9/iso_encoder/info.json
index dee0a8953a..8ecb23b0a3 100644
--- a/keyboards/keychron/q9/iso_encoder/info.json
+++ b/keyboards/keychron/q9/iso_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0193",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
+ "rows": ["B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "B4", "pin_b": "B5"}
diff --git a/keyboards/keychron/q9/iso_encoder/iso_encoder.c b/keyboards/keychron/q9/iso_encoder/iso_encoder.c
index 7f6db9a128..0804f33671 100644
--- a/keyboards/keychron/q9/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q9/iso_encoder/iso_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q9/iso_encoder/iso_encoder.h b/keyboards/keychron/q9/iso_encoder/iso_encoder.h
deleted file mode 100644
index 366d3f39c2..0000000000
--- a/keyboards/keychron/q9/iso_encoder/iso_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 1010 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q9/q9.c b/keyboards/keychron/q9/q9.c
index 2f98a72974..51dea886f1 100644
--- a/keyboards/keychron/q9/q9.c
+++ b/keyboards/keychron/q9/q9.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q9.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b111111111111111,
diff --git a/keyboards/keychron/q9/q9.h b/keyboards/keychron/q9/q9.h
deleted file mode 100644
index d6a0ef1bea..0000000000
--- a/keyboards/keychron/q9/q9.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q9_ansi)
-# include "ansi.h"
-#elif defined(KEYBOARD_keychron_q9_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q9_iso)
-# include "iso.h"
-#elif defined(KEYBOARD_keychron_q9_iso_encoder)
-# include "iso_encoder.h"
-#endif
diff --git a/keyboards/keychron/s1/ansi/rgb/info.json b/keyboards/keychron/s1/ansi/rgb/info.json
index 02ea4d4c90..2aabe622d4 100644
--- a/keyboards/keychron/s1/ansi/rgb/info.json
+++ b/keyboards/keychron/s1/ansi/rgb/info.json
@@ -8,6 +8,11 @@
"pid": "0x0410",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
+ "rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layout_aliases": {
diff --git a/keyboards/keychron/s1/ansi/white/info.json b/keyboards/keychron/s1/ansi/white/info.json
index a64f5eb0a9..e6c0e4f3d1 100644
--- a/keyboards/keychron/s1/ansi/white/info.json
+++ b/keyboards/keychron/s1/ansi/white/info.json
@@ -8,6 +8,11 @@
"pid": "0x0411",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
+ "rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layout_aliases": {
diff --git a/keyboards/keychron/s1/config.h b/keyboards/keychron/s1/config.h
index e12cc0479c..8c98389522 100644
--- a/keyboards/keychron/s1/config.h
+++ b/keyboards/keychron/s1/config.h
@@ -16,15 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS \
- { B5, B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS \
- { A10, A9, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* Disable DIP switch in matrix data */
#define MATRIX_MASKED
diff --git a/keyboards/keychron/v2/ansi/info.json b/keyboards/keychron/v2/ansi/info.json
index f0bb49cee2..9c8bffb4f1 100644
--- a/keyboards/keychron/v2/ansi/info.json
+++ b/keyboards/keychron/v2/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x0320",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/v2/ansi_encoder/info.json b/keyboards/keychron/v2/ansi_encoder/info.json
index 1e729eb636..3a8f9add34 100644
--- a/keyboards/keychron/v2/ansi_encoder/info.json
+++ b/keyboards/keychron/v2/ansi_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0321",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/v2/config.h b/keyboards/keychron/v2/config.h
index 4cb2721911..08cc5b8e84 100644
--- a/keyboards/keychron/v2/config.h
+++ b/keyboards/keychron/v2/config.h
@@ -16,15 +16,6 @@
#pragma once
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/* key matrix pins */
-#define MATRIX_ROW_PINS \
- { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS \
- { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 }
-
/* If uses PH3 with a stronger pull resistor then the following definition should be included */
// #define MATRIX_UNSELECT_DRIVE_HIGH
diff --git a/keyboards/keychron/v2/iso/info.json b/keyboards/keychron/v2/iso/info.json
index 0679e1737c..9a79f31149 100644
--- a/keyboards/keychron/v2/iso/info.json
+++ b/keyboards/keychron/v2/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0322",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/v2/iso_encoder/info.json b/keyboards/keychron/v2/iso_encoder/info.json
index a784b33ec5..13a232c6da 100644
--- a/keyboards/keychron/v2/iso_encoder/info.json
+++ b/keyboards/keychron/v2/iso_encoder/info.json
@@ -7,6 +7,11 @@
"pid": "0x0323",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/v2/jis/info.json b/keyboards/keychron/v2/jis/info.json
index 89ec07b072..a727490f8f 100644
--- a/keyboards/keychron/v2/jis/info.json
+++ b/keyboards/keychron/v2/jis/info.json
@@ -8,6 +8,11 @@
"pid": "0x0324",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/v2/jis_encoder/info.json b/keyboards/keychron/v2/jis_encoder/info.json
index abb76636f7..222861041c 100644
--- a/keyboards/keychron/v2/jis_encoder/info.json
+++ b/keyboards/keychron/v2/jis_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0325",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/v4/ansi/info.json b/keyboards/keychron/v4/ansi/info.json
index 04bd9e4761..372f8d2bf0 100644
--- a/keyboards/keychron/v4/ansi/info.json
+++ b/keyboards/keychron/v4/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x0340",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/v4/config.h b/keyboards/keychron/v4/config.h
index eb22d58fb9..8d92219f20 100644
--- a/keyboards/keychron/v4/config.h
+++ b/keyboards/keychron/v4/config.h
@@ -16,15 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS \
- { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS \
- { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 1
#define DRIVER_ADDR_1 0b1110111
diff --git a/keyboards/keychron/v4/iso/info.json b/keyboards/keychron/v4/iso/info.json
index 561fdde3cc..79d23c7853 100644
--- a/keyboards/keychron/v4/iso/info.json
+++ b/keyboards/keychron/v4/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0342",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/v7/ansi/info.json b/keyboards/keychron/v7/ansi/info.json
index 00df236f6d..7b3eb8db78 100644
--- a/keyboards/keychron/v7/ansi/info.json
+++ b/keyboards/keychron/v7/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x0370",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/v7/config.h b/keyboards/keychron/v7/config.h
index b6a08098ce..c439a7e366 100644
--- a/keyboards/keychron/v7/config.h
+++ b/keyboards/keychron/v7/config.h
@@ -16,15 +16,6 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS \
- { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS \
- { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, A10, B5 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110111
diff --git a/keyboards/keychron/v7/iso/info.json b/keyboards/keychron/v7/iso/info.json
index e01b12464c..449ec89487 100644
--- a/keyboards/keychron/v7/iso/info.json
+++ b/keyboards/keychron/v7/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0372",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/v8/ansi/info.json b/keyboards/keychron/v8/ansi/info.json
index f1f2e75e4d..6924af28b5 100644
--- a/keyboards/keychron/v8/ansi/info.json
+++ b/keyboards/keychron/v8/ansi/info.json
@@ -8,6 +8,11 @@
"pid": "0x0380",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/v8/ansi_encoder/info.json b/keyboards/keychron/v8/ansi_encoder/info.json
index f6a9de655b..8ff94cedb0 100644
--- a/keyboards/keychron/v8/ansi_encoder/info.json
+++ b/keyboards/keychron/v8/ansi_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0381",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/v8/config.h b/keyboards/keychron/v8/config.h
index c5a3857f40..7c6076e199 100644
--- a/keyboards/keychron/v8/config.h
+++ b/keyboards/keychron/v8/config.h
@@ -16,13 +16,6 @@
#pragma once
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/* Key matrix pins */
-#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 }
-
/* If uses PH3 with a stronger pull resistor then the following definition should be included */
// #define MATRIX_UNSELECT_DRIVE_HIGH
diff --git a/keyboards/keychron/v8/iso/info.json b/keyboards/keychron/v8/iso/info.json
index 22b363d072..1cfb662ba2 100644
--- a/keyboards/keychron/v8/iso/info.json
+++ b/keyboards/keychron/v8/iso/info.json
@@ -8,6 +8,11 @@
"pid": "0x0382",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/v8/iso_encoder/info.json b/keyboards/keychron/v8/iso_encoder/info.json
index 2abaeda111..a70cc2c43b 100644
--- a/keyboards/keychron/v8/iso_encoder/info.json
+++ b/keyboards/keychron/v8/iso_encoder/info.json
@@ -8,6 +8,11 @@
"pid": "0x0383",
"device_version": "1.0.0"
},
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}