summaryrefslogtreecommitdiffstats
path: root/quantum/keycode_config.c
diff options
context:
space:
mode:
authorOsamu Aoki <osamuaoki@users.noreply.github.com>2022-07-02 21:08:48 +0900
committerGitHub <noreply@github.com>2022-07-02 22:08:48 +1000
commit871eeae4eab476cb64b40e0636ec19deeea79525 (patch)
tree3b3836b26b02805ef814e06299c3e61e74e66a31 /quantum/keycode_config.c
parentc7d8adfeaab26aedcf2edb22c29440a17462471c (diff)
PoC: Swap Escape and Caps (#16336)
Diffstat (limited to 'quantum/keycode_config.c')
-rw-r--r--quantum/keycode_config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c
index dd2a17e242..5b5cc5d28e 100644
--- a/quantum/keycode_config.c
+++ b/quantum/keycode_config.c
@@ -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: