summaryrefslogtreecommitdiffstats
path: root/quantum/keycode_config.c
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-11-04 16:22:17 +1100
committerGitHub <noreply@github.com>2021-11-03 22:22:17 -0700
commitf529580860cf5a1de4afc10432f218a45daae17a (patch)
tree1d2fa041174f2586230ab831c05e5b56d8ba4f92 /quantum/keycode_config.c
parentb06d9d822cfb72e0728b11711a333f2f5d3c631e (diff)
Basic keycode overhaul (#14726)
Diffstat (limited to 'quantum/keycode_config.c')
-rw-r--r--quantum/keycode_config.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c
index f340905eab..dd2a17e242 100644
--- a/quantum/keycode_config.c
+++ b/quantum/keycode_config.c
@@ -25,89 +25,89 @@ extern keymap_config_t keymap_config;
*/
uint16_t keycode_config(uint16_t keycode) {
switch (keycode) {
- case KC_CAPSLOCK:
- case KC_LOCKING_CAPS:
+ case KC_CAPS_LOCK:
+ case KC_LOCKING_CAPS_LOCK:
if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) {
- return KC_LCTL;
+ return KC_LEFT_CTRL;
}
return keycode;
- case KC_LCTL:
+ case KC_LEFT_CTRL:
if (keymap_config.swap_control_capslock) {
- return KC_CAPSLOCK;
+ return KC_CAPS_LOCK;
}
if (keymap_config.swap_lctl_lgui) {
if (keymap_config.no_gui) {
return KC_NO;
}
- return KC_LGUI;
+ return KC_LEFT_GUI;
}
- return KC_LCTL;
- case KC_LALT:
+ return KC_LEFT_CTRL;
+ case KC_LEFT_ALT:
if (keymap_config.swap_lalt_lgui) {
if (keymap_config.no_gui) {
return KC_NO;
}
- return KC_LGUI;
+ return KC_LEFT_GUI;
}
- return KC_LALT;
- case KC_LGUI:
+ return KC_LEFT_ALT;
+ case KC_LEFT_GUI:
if (keymap_config.swap_lalt_lgui) {
- return KC_LALT;
+ return KC_LEFT_ALT;
}
if (keymap_config.swap_lctl_lgui) {
- return KC_LCTRL;
+ return KC_LEFT_CTRL;
}
if (keymap_config.no_gui) {
return KC_NO;
}
- return KC_LGUI;
- case KC_RCTL:
+ return KC_LEFT_GUI;
+ case KC_RIGHT_CTRL:
if (keymap_config.swap_rctl_rgui) {
if (keymap_config.no_gui) {
return KC_NO;
}
- return KC_RGUI;
+ return KC_RIGHT_GUI;
}
- return KC_RCTL;
- case KC_RALT:
+ return KC_RIGHT_CTRL;
+ case KC_RIGHT_ALT:
if (keymap_config.swap_ralt_rgui) {
if (keymap_config.no_gui) {
return KC_NO;
}
- return KC_RGUI;
+ return KC_RIGHT_GUI;
}
- return KC_RALT;
- case KC_RGUI:
+ return KC_RIGHT_ALT;
+ case KC_RIGHT_GUI:
if (keymap_config.swap_ralt_rgui) {
- return KC_RALT;
+ return KC_RIGHT_ALT;
}
if (keymap_config.swap_rctl_rgui) {
- return KC_RCTL;
+ return KC_RIGHT_CTRL;
}
if (keymap_config.no_gui) {
return KC_NO;
}
- return KC_RGUI;
+ return KC_RIGHT_GUI;
case KC_GRAVE:
if (keymap_config.swap_grave_esc) {
- return KC_ESC;
+ return KC_ESCAPE;
}
return KC_GRAVE;
- case KC_ESC:
+ case KC_ESCAPE:
if (keymap_config.swap_grave_esc) {
return KC_GRAVE;
}
- return KC_ESC;
- case KC_BSLASH:
+ return KC_ESCAPE;
+ case KC_BACKSLASH:
if (keymap_config.swap_backslash_backspace) {
- return KC_BSPACE;
+ return KC_BACKSPACE;
}
- return KC_BSLASH;
- case KC_BSPACE:
+ return KC_BACKSLASH;
+ case KC_BACKSPACE:
if (keymap_config.swap_backslash_backspace) {
- return KC_BSLASH;
+ return KC_BACKSLASH;
}
- return KC_BSPACE;
+ return KC_BACKSPACE;
default:
return keycode;
}