summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2023-01-24 08:52:36 +0000
committerQMK Bot <hello@qmk.fm>2023-01-24 08:52:36 +0000
commitfca6d16b5509c677a33d0023e580243e125391ae (patch)
tree1e60c881f94a72ba650e67a26eac9e8fdfe20616 /keyboards
parent025e530f46277bd1e7f6196ffe017a94caa807fd (diff)
parent695c4c603005469704cd678a1d3ffb093d7e1231 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/keychron/v2/v2.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/keyboards/keychron/v2/v2.c b/keyboards/keychron/v2/v2.c
index 852a9637c4..7703c280df 100644
--- a/keyboards/keychron/v2/v2.c
+++ b/keyboards/keychron/v2/v2.c
@@ -26,6 +26,17 @@ const matrix_row_t matrix_mask[] = {
#ifdef DIP_SWITCH_ENABLE
+bool dip_switch_update_kb(uint8_t index, bool active) {
+ if (!dip_switch_update_user(index, active)) { return false;}
+ if (index == 0) {
+ default_layer_set(1UL << (active ? 1 : 0));
+ }
+ return true;
+}
+
+#endif // DIP_SWITCH_ENABLE
+
+#if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX)
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (!process_record_user(keycode, record)) { return false; }
switch (keycode) {