summaryrefslogtreecommitdiff
path: root/keyboards/keychron/q1
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keychron/q1')
-rw-r--r--keyboards/keychron/q1/rev_0100/config.h2
-rw-r--r--keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c5
-rw-r--r--keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c11
-rw-r--r--keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c5
-rw-r--r--keyboards/keychron/q1/rev_0100/rev_0100.c2
-rw-r--r--keyboards/keychron/q1/rev_0101/config.h2
-rw-r--r--keyboards/keychron/q1/rev_0101/rev_0101.c2
-rw-r--r--keyboards/keychron/q1/rev_0102/config.h2
-rw-r--r--keyboards/keychron/q1/rev_0102/keymaps/kubahorak/rgb_matrix_user.c5
-rw-r--r--keyboards/keychron/q1/rev_0102/keymaps/mkillewald_iso/rgb_matrix_user.c11
-rw-r--r--keyboards/keychron/q1/rev_0102/rev_0102.c2
11 files changed, 27 insertions, 22 deletions
diff --git a/keyboards/keychron/q1/rev_0100/config.h b/keyboards/keychron/q1/rev_0100/config.h
index 1b8c65165c..0a30f7d82d 100644
--- a/keyboards/keychron/q1/rev_0100/config.h
+++ b/keyboards/keychron/q1/rev_0100/config.h
@@ -23,4 +23,4 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 59
#define DRIVER_2_LED_TOTAL 23
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) \ No newline at end of file
+#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) \ No newline at end of file
diff --git a/keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c
index 9bc7231ece..b7d12f9466 100644
--- a/keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c
+++ b/keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c
@@ -18,7 +18,7 @@
#include "rgb_matrix_user.h"
#include "keymap_user.h"
-keypos_t led_index_key_position[DRIVER_LED_TOTAL];
+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++) {
@@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) {
}
}
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+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:
@@ -49,6 +49,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
#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) {
diff --git a/keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c
index f06039af06..c6fa5f1f15 100644
--- a/keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c
+++ b/keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c
@@ -18,7 +18,7 @@
#include "rgb_matrix_user.h"
#include "keymap_user.h"
-keypos_t led_index_key_position[DRIVER_LED_TOTAL];
+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++) {
@@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) {
}
}
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+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:
@@ -54,6 +54,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
}
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) {
@@ -67,11 +68,11 @@ void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t l
bool is_caps_lock_indicator(uint16_t keycode) {
bool indicator = keycode == KC_CAPS;
-
+
if (get_caps_lock_light_tab()) {
indicator = keycode == KC_TAB || keycode == KC_CAPS;
}
-
+
if (get_caps_lock_light_alphas()) {
return (KC_A <= keycode && keycode <= KC_Z) || indicator;
} else {
@@ -80,4 +81,4 @@ bool is_caps_lock_indicator(uint16_t keycode) {
}
bool is_transparent(uint16_t keycode) { return keycode == KC_TRNS; }
-bool is_not_transparent(uint16_t keycode) { return keycode != KC_TRNS; } \ No newline at end of file
+bool is_not_transparent(uint16_t keycode) { return keycode != KC_TRNS; }
diff --git a/keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c
index 77f1c1011b..fbc37fb5bf 100644
--- a/keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c
+++ b/keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c
@@ -18,7 +18,7 @@
#include "rgb_matrix_user.h"
#include "keymap_user.h"
-keypos_t led_index_key_position[DRIVER_LED_TOTAL];
+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++) {
@@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) {
}
}
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
uint8_t current_layer = get_highest_layer(layer_state | default_layer_state);
switch (current_layer) {
case MAC_BASE:
@@ -59,6 +59,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
#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) {
diff --git a/keyboards/keychron/q1/rev_0100/rev_0100.c b/keyboards/keychron/q1/rev_0100/rev_0100.c
index f424669527..2c87a8241e 100644
--- a/keyboards/keychron/q1/rev_0100/rev_0100.c
+++ b/keyboards/keychron/q1/rev_0100/rev_0100.c
@@ -17,7 +17,7 @@
#include "quantum.h"
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q1/rev_0101/config.h b/keyboards/keychron/q1/rev_0101/config.h
index 58d77477ca..b38261abf6 100644
--- a/keyboards/keychron/q1/rev_0101/config.h
+++ b/keyboards/keychron/q1/rev_0101/config.h
@@ -23,7 +23,7 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 59
#define DRIVER_2_LED_TOTAL 23
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* Encoder used pins */
#define ENCODERS_PAD_A { E6 }
diff --git a/keyboards/keychron/q1/rev_0101/rev_0101.c b/keyboards/keychron/q1/rev_0101/rev_0101.c
index dd7f69529e..4edd2c761f 100644
--- a/keyboards/keychron/q1/rev_0101/rev_0101.c
+++ b/keyboards/keychron/q1/rev_0101/rev_0101.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q1/rev_0102/config.h b/keyboards/keychron/q1/rev_0102/config.h
index 7aa0ae8662..b9b33cf320 100644
--- a/keyboards/keychron/q1/rev_0102/config.h
+++ b/keyboards/keychron/q1/rev_0102/config.h
@@ -23,4 +23,4 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 59
#define DRIVER_2_LED_TOTAL 24
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) \ No newline at end of file
+#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) \ No newline at end of file
diff --git a/keyboards/keychron/q1/rev_0102/keymaps/kubahorak/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0102/keymaps/kubahorak/rgb_matrix_user.c
index 8650f30df1..638aa77eb0 100644
--- a/keyboards/keychron/q1/rev_0102/keymaps/kubahorak/rgb_matrix_user.c
+++ b/keyboards/keychron/q1/rev_0102/keymaps/kubahorak/rgb_matrix_user.c
@@ -18,7 +18,7 @@
#include "rgb_matrix_user.h"
#include "keymap_user.h"
-keypos_t led_index_key_position[DRIVER_LED_TOTAL];
+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++) {
@@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) {
}
}
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+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:
@@ -49,6 +49,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
#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) {
diff --git a/keyboards/keychron/q1/rev_0102/keymaps/mkillewald_iso/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0102/keymaps/mkillewald_iso/rgb_matrix_user.c
index f06039af06..c6fa5f1f15 100644
--- a/keyboards/keychron/q1/rev_0102/keymaps/mkillewald_iso/rgb_matrix_user.c
+++ b/keyboards/keychron/q1/rev_0102/keymaps/mkillewald_iso/rgb_matrix_user.c
@@ -18,7 +18,7 @@
#include "rgb_matrix_user.h"
#include "keymap_user.h"
-keypos_t led_index_key_position[DRIVER_LED_TOTAL];
+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++) {
@@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) {
}
}
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+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:
@@ -54,6 +54,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
}
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) {
@@ -67,11 +68,11 @@ void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t l
bool is_caps_lock_indicator(uint16_t keycode) {
bool indicator = keycode == KC_CAPS;
-
+
if (get_caps_lock_light_tab()) {
indicator = keycode == KC_TAB || keycode == KC_CAPS;
}
-
+
if (get_caps_lock_light_alphas()) {
return (KC_A <= keycode && keycode <= KC_Z) || indicator;
} else {
@@ -80,4 +81,4 @@ bool is_caps_lock_indicator(uint16_t keycode) {
}
bool is_transparent(uint16_t keycode) { return keycode == KC_TRNS; }
-bool is_not_transparent(uint16_t keycode) { return keycode != KC_TRNS; } \ No newline at end of file
+bool is_not_transparent(uint16_t keycode) { return keycode != KC_TRNS; }
diff --git a/keyboards/keychron/q1/rev_0102/rev_0102.c b/keyboards/keychron/q1/rev_0102/rev_0102.c
index f1468d1094..5304a602c3 100644
--- a/keyboards/keychron/q1/rev_0102/rev_0102.c
+++ b/keyboards/keychron/q1/rev_0102/rev_0102.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location