diff options
| author | Osamu Aoki <osamuaoki@users.noreply.github.com> | 2022-07-02 21:08:48 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-02 22:08:48 +1000 |
| commit | 871eeae4eab476cb64b40e0636ec19deeea79525 (patch) | |
| tree | 3b3836b26b02805ef814e06299c3e61e74e66a31 /quantum/keycode_config.c | |
| parent | c7d8adfeaab26aedcf2edb22c29440a17462471c (diff) | |
PoC: Swap Escape and Caps (#16336)
Diffstat (limited to 'quantum/keycode_config.c')
| -rw-r--r-- | quantum/keycode_config.c | 4 |
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) { | |||
| 29 | case KC_LOCKING_CAPS_LOCK: | 29 | case KC_LOCKING_CAPS_LOCK: |
| 30 | if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) { | 30 | if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) { |
| 31 | return KC_LEFT_CTRL; | 31 | return KC_LEFT_CTRL; |
| 32 | } else if (keymap_config.swap_escape_capslock) { | ||
| 33 | return KC_ESCAPE; | ||
| 32 | } | 34 | } |
| 33 | return keycode; | 35 | return keycode; |
| 34 | case KC_LEFT_CTRL: | 36 | case KC_LEFT_CTRL: |
| @@ -96,6 +98,8 @@ uint16_t keycode_config(uint16_t keycode) { | |||
| 96 | case KC_ESCAPE: | 98 | case KC_ESCAPE: |
| 97 | if (keymap_config.swap_grave_esc) { | 99 | if (keymap_config.swap_grave_esc) { |
| 98 | return KC_GRAVE; | 100 | return KC_GRAVE; |
| 101 | } else if (keymap_config.swap_escape_capslock) { | ||
| 102 | return KC_CAPS_LOCK; | ||
| 99 | } | 103 | } |
| 100 | return KC_ESCAPE; | 104 | return KC_ESCAPE; |
| 101 | case KC_BACKSLASH: | 105 | case KC_BACKSLASH: |
