1
0
Fork 0

PoC: Swap Escape and Caps (#16336)

This commit is contained in:
Osamu Aoki 2022-07-02 21:08:48 +09:00 committed by GitHub
parent c7d8adfeaa
commit 871eeae4ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 0 deletions

View file

@ -29,6 +29,8 @@ uint16_t keycode_config(uint16_t keycode) {
case KC_LOCKING_CAPS_LOCK:
if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) {
return KC_LEFT_CTRL;
} else if (keymap_config.swap_escape_capslock) {
return KC_ESCAPE;
}
return keycode;
case KC_LEFT_CTRL:
@ -96,6 +98,8 @@ uint16_t keycode_config(uint16_t keycode) {
case KC_ESCAPE:
if (keymap_config.swap_grave_esc) {
return KC_GRAVE;
} else if (keymap_config.swap_escape_capslock) {
return KC_CAPS_LOCK;
}
return KC_ESCAPE;
case KC_BACKSLASH: