summaryrefslogtreecommitdiff
path: root/keyboards/keychron/q2
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keychron/q2')
-rw-r--r--keyboards/keychron/q2/ansi/ansi.c2
-rw-r--r--keyboards/keychron/q2/ansi/config.h3
-rw-r--r--keyboards/keychron/q2/ansi/keymaps/ladduro/config.h25
-rw-r--r--keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c68
-rw-r--r--keyboards/keychron/q2/ansi/keymaps/ladduro/keymap_user.h27
-rw-r--r--keyboards/keychron/q2/ansi/keymaps/ladduro/readme.md29
-rw-r--r--keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.c73
-rw-r--r--keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.h25
-rw-r--r--keyboards/keychron/q2/ansi/keymaps/ladduro/rules.mk5
-rw-r--r--keyboards/keychron/q2/ansi_encoder/ansi_encoder.c2
-rw-r--r--keyboards/keychron/q2/ansi_encoder/config.h3
-rw-r--r--keyboards/keychron/q2/config.h12
-rw-r--r--keyboards/keychron/q2/info.json6
-rw-r--r--keyboards/keychron/q2/iso/config.h3
-rw-r--r--keyboards/keychron/q2/iso/iso.c2
-rw-r--r--keyboards/keychron/q2/iso_encoder/config.h3
-rw-r--r--keyboards/keychron/q2/iso_encoder/iso_encoder.c2
-rw-r--r--keyboards/keychron/q2/jis/jis.c2
-rw-r--r--keyboards/keychron/q2/jis_encoder/jis_encoder.c2
-rw-r--r--keyboards/keychron/q2/q2.c8
20 files changed, 11 insertions, 291 deletions
diff --git a/keyboards/keychron/q2/ansi/ansi.c b/keyboards/keychron/q2/ansi/ansi.c
index d0ff0a1869..64abe016a6 100644
--- a/keyboards/keychron/q2/ansi/ansi.c
+++ b/keyboards/keychron/q2/ansi/ansi.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
/* Refer to SNLED27351 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q2/ansi/config.h b/keyboards/keychron/q2/ansi/config.h
index 41b92074be..1850088b1f 100644
--- a/keyboards/keychron/q2/ansi/config.h
+++ b/keyboards/keychron/q2/ansi/config.h
@@ -16,8 +16,5 @@
#pragma once
-/* RGB Matrix Configuration */
-#define RGB_MATRIX_LED_COUNT 67
-
/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 30 \ No newline at end of file
diff --git a/keyboards/keychron/q2/ansi/keymaps/ladduro/config.h b/keyboards/keychron/q2/ansi/keymaps/ladduro/config.h
deleted file mode 100644
index a8ad37d003..0000000000
--- a/keyboards/keychron/q2/ansi/keymaps/ladduro/config.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright 2022 @ Ionut Micu
- *
- * 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
-
-/* RGB Matrix Configuration */
-#ifdef RGB_MATRIX_ENABLE
-# define RGB_DISABLE_WHEN_USB_SUSPENDED
-# define CAPS_LOCK_INDICATOR_COLOR RGB_RED
-# define CAPS_LOCK_INDICATOR_LIGHT_ALPHAS
-# define FN_LAYER_TRANSPARENT_KEYS_OFF
-#endif \ No newline at end of file
diff --git a/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c b/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c
deleted file mode 100644
index 55ee7a9732..0000000000
--- a/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright 2022 @ Ionut Micu
- *
- * 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/>.
- */
-
-#include QMK_KEYBOARD_H
-#include "keymap_user.h"
-#ifdef RGB_MATRIX_ENABLE
-# include "rgb_matrix_user.h"
-#endif
-
-#define KC_WAVE S(KC_GRV)
-#define KC_TASK LGUI(KC_TAB)
-#define KC_FLXP LGUI(KC_E)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [MAC_BASE] = LAYOUT_ansi_67(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
- KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT),
-
- [WIN_BASE] = LAYOUT_ansi_67(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_LEFT, KC_DOWN, KC_RGHT),
-
- [_FN1] = LAYOUT_ansi_67(
- KC_GRV, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
-
- [_FN2] = LAYOUT_ansi_67(
- KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
-
- [_FN3] = LAYOUT_ansi_67(
- KC_WAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
-};
-
-void matrix_init_user(void) {
-#ifdef RGB_MATRIX_ENABLE
- rgb_matrix_init_user();
-#endif
-}
diff --git a/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap_user.h b/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap_user.h
deleted file mode 100644
index ded78ae1b8..0000000000
--- a/keyboards/keychron/q2/ansi/keymaps/ladduro/keymap_user.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright 2022 @ Ionut Micu
- *
- * 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
-
-// clang-format off
-
-enum layers{
- MAC_BASE,
- WIN_BASE,
- _FN1,
- _FN2,
- _FN3,
-}; \ No newline at end of file
diff --git a/keyboards/keychron/q2/ansi/keymaps/ladduro/readme.md b/keyboards/keychron/q2/ansi/keymaps/ladduro/readme.md
deleted file mode 100644
index 42ca81a1a1..0000000000
--- a/keyboards/keychron/q2/ansi/keymaps/ladduro/readme.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Ladduro keymap for Keychron Q2 (ANSI rev_0110) v1.01
-
-This keymap ports Q1 logic (by gtg465x) for RGB caps lock indicator and layer RBG assigned key.
-
-## Features:
-- On macOS, F3 opens Mission Control and F4 opens Launchpad without needing to configure shortcuts in System Preferences
-- RGB lighting turns off when the computer sleeps
-- Caps Lock and alpha keys turn red to indicate when Caps Lock is on
-- When the Fn layer is active, RGB lighting turns off for keys that are not assigned
-
-Make example for this keyboard (after setting up your build environment):
-
- make keychron/q2/rev_0110:ladduro
-
-Flashing example for this keyboard:
-
- make keychron/q2/rev_0110:ladduro:flash
-
-See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
-
-## Changelog
-
-### 14/03/2021 - 1.
-
-- Initial release
-
-### 02/04/2021 - 1.01
-
-- Remove via enable from rules.mk as it breaks the layout for some reason
diff --git a/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.c b/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.c
deleted file mode 100644
index 604f54a705..0000000000
--- a/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright 2022 @ Ionut Micu
- *
- * 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/>.
- */
-
-#include QMK_KEYBOARD_H
-#include "rgb_matrix_user.h"
-#include "keymap_user.h"
-
-keypos_t led_index_key_position[RGB_MATRIX_LED_COUNT];
-
-void rgb_matrix_init_user(void) {
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- for (uint8_t col = 0; col < MATRIX_COLS; col++) {
- uint8_t led_index = g_led_config.matrix_co[row][col];
- if (led_index != NO_LED) {
- led_index_key_position[led_index] = (keypos_t){.row = row, .col = col};
- }
- }
- }
-}
-
-bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
- uint8_t current_layer = get_highest_layer(layer_state);
- switch (current_layer) {
- case MAC_BASE:
- case WIN_BASE:
-#ifdef CAPS_LOCK_INDICATOR_COLOR
- if (host_keyboard_led_state().caps_lock) {
- rgb_matrix_set_color_by_keycode(led_min, led_max, current_layer, is_caps_lock_indicator, CAPS_LOCK_INDICATOR_COLOR);
- }
-#endif
- break;
- case _FN1:
- case _FN2:
- case _FN3:
-#ifdef FN_LAYER_TRANSPARENT_KEYS_OFF
- rgb_matrix_set_color_by_keycode(led_min, led_max, current_layer, is_transparent, RGB_OFF);
-#endif
- break;
- }
- return false;
-}
-
-void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue) {
- for (uint8_t i = led_min; i < led_max; i++) {
- uint16_t keycode = keymap_key_to_keycode(layer, led_index_key_position[i]);
- if ((*is_keycode)(keycode)) {
- rgb_matrix_set_color(i, red, green, blue);
- }
- }
-}
-
-bool is_caps_lock_indicator(uint16_t keycode) {
-#ifdef CAPS_LOCK_INDICATOR_LIGHT_ALPHAS
- return (KC_A <= keycode && keycode <= KC_Z) || keycode == KC_CAPS;
-#else
- return keycode == KC_CAPS;
-#endif
-}
-
-bool is_transparent(uint16_t keycode) { return keycode == KC_TRNS; }
diff --git a/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.h b/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.h
deleted file mode 100644
index 4d33f483ae..0000000000
--- a/keyboards/keychron/q2/ansi/keymaps/ladduro/rgb_matrix_user.h
+++ /dev/null
@@ -1,25 +0,0 @@
-
-/* Copyright 2022 @ Ionut Micu
- *
- * 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
-
-void rgb_matrix_init_user(void);
-
-void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue);
-
-bool is_caps_lock_indicator(uint16_t keycode);
-bool is_transparent(uint16_t keycode); \ No newline at end of file
diff --git a/keyboards/keychron/q2/ansi/keymaps/ladduro/rules.mk b/keyboards/keychron/q2/ansi/keymaps/ladduro/rules.mk
deleted file mode 100644
index c0ee640cd2..0000000000
--- a/keyboards/keychron/q2/ansi/keymaps/ladduro/rules.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-MOUSEKEY_ENABLE = no
-
-ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
- SRC += rgb_matrix_user.c
-endif
diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
index d0ff0a1869..64abe016a6 100644
--- a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
/* Refer to SNLED27351 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q2/ansi_encoder/config.h b/keyboards/keychron/q2/ansi_encoder/config.h
index 41b92074be..1850088b1f 100644
--- a/keyboards/keychron/q2/ansi_encoder/config.h
+++ b/keyboards/keychron/q2/ansi_encoder/config.h
@@ -16,8 +16,5 @@
#pragma once
-/* RGB Matrix Configuration */
-#define RGB_MATRIX_LED_COUNT 67
-
/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 30 \ No newline at end of file
diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h
index 831612326b..8b446442cb 100644
--- a/keyboards/keychron/q2/config.h
+++ b/keyboards/keychron/q2/config.h
@@ -18,23 +18,11 @@
#define MATRIX_UNSELECT_DRIVE_HIGH
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO
#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* turn off effects when suspended */
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
-
/* Encoder Configuration*/
#define ENCODER_DEFAULT_POS 0x3
-
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/keychron/q2/info.json b/keyboards/keychron/q2/info.json
index 47d9aa83b1..d0bb48d7cb 100644
--- a/keyboards/keychron/q2/info.json
+++ b/keyboards/keychron/q2/info.json
@@ -22,6 +22,9 @@
"nkro": true,
"rgb_matrix": true
},
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ },
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
"rows": ["B4", "B3", "A15", "A14", "A13"]
@@ -51,7 +54,8 @@
"splash": true,
"typing_heatmap": true
},
- "driver": "snled27351"
+ "driver": "snled27351",
+ "sleep": true
},
"url": "https://github.com/Keychron",
"usb": {
diff --git a/keyboards/keychron/q2/iso/config.h b/keyboards/keychron/q2/iso/config.h
index b463f7886e..22ddcba3ad 100644
--- a/keyboards/keychron/q2/iso/config.h
+++ b/keyboards/keychron/q2/iso/config.h
@@ -16,8 +16,5 @@
#pragma once
-/* RGB Matrix Configuration */
-#define RGB_MATRIX_LED_COUNT 68
-
/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 29 \ No newline at end of file
diff --git a/keyboards/keychron/q2/iso/iso.c b/keyboards/keychron/q2/iso/iso.c
index a54c90bc4b..7da02c4a79 100644
--- a/keyboards/keychron/q2/iso/iso.c
+++ b/keyboards/keychron/q2/iso/iso.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
/* Refer to SNLED27351 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q2/iso_encoder/config.h b/keyboards/keychron/q2/iso_encoder/config.h
index b463f7886e..22ddcba3ad 100644
--- a/keyboards/keychron/q2/iso_encoder/config.h
+++ b/keyboards/keychron/q2/iso_encoder/config.h
@@ -16,8 +16,5 @@
#pragma once
-/* RGB Matrix Configuration */
-#define RGB_MATRIX_LED_COUNT 68
-
/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 29 \ No newline at end of file
diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.c b/keyboards/keychron/q2/iso_encoder/iso_encoder.c
index a54c90bc4b..7da02c4a79 100644
--- a/keyboards/keychron/q2/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q2/iso_encoder/iso_encoder.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
/* Refer to SNLED27351 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q2/jis/jis.c b/keyboards/keychron/q2/jis/jis.c
index d877e225d9..b8d36be505 100644
--- a/keyboards/keychron/q2/jis/jis.c
+++ b/keyboards/keychron/q2/jis/jis.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
/* Refer to SNLED27351 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q2/jis_encoder/jis_encoder.c b/keyboards/keychron/q2/jis_encoder/jis_encoder.c
index d877e225d9..b8d36be505 100644
--- a/keyboards/keychron/q2/jis_encoder/jis_encoder.c
+++ b/keyboards/keychron/q2/jis_encoder/jis_encoder.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
/* Refer to SNLED27351 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q2/q2.c b/keyboards/keychron/q2/q2.c
index 7ff85556de..1dd839eccc 100644
--- a/keyboards/keychron/q2/q2.c
+++ b/keyboards/keychron/q2/q2.c
@@ -16,14 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {