Update keymap.c

pull/19853/head
jonylee@hfd 2024-09-14 15:22:27 +08:00 committed by GitHub
parent 84981f07be
commit 27dc8971fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 35 deletions

View File

@ -78,38 +78,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, RGB_SAD, RGB_VAD, RGB_SAI, _______, _______)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case DF(WIN_B):
if (record->event.pressed) {
set_single_persistent_default_layer(WIN_B);
}
return false;
case DF(MAC_B):
if (record->event.pressed) {
set_single_persistent_default_layer(MAC_B);
keymap_config.no_gui = 0;
eeconfig_update_keymap(keymap_config.raw);
}
return false;
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
} break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
} break;
}
}
if (!rgb_matrix_is_enabled()) {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable();
}
return false;
default:
return true;
}
}