Skip to content

Commit

Permalink
[Keyboard] Add missing dip_switch_update_kb for Keychron V2 (qmk#19674
Browse files Browse the repository at this point in the history
)
  • Loading branch information
adophoxia authored Jan 24, 2023
1 parent 4d180c9 commit 695c4c6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions keyboards/keychron/v2/v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 695c4c6

Please sign in to comment.