diff options
author | Ryan <fauxpark@gmail.com> | 2022-10-28 23:53:15 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 13:53:15 +0100 |
commit | 22be7e79ac6a328ed5a7dc8c4e6f17d749852221 (patch) | |
tree | 49320f3f101270c1c191c387156190b5e5fe688f /quantum | |
parent | 2ff1d852909daaaf94433fab202e7bf94274d67b (diff) |
Normalise Auto Shift keycodes (#18892)
* Normalise Auto Shift keycodes
* Add keycode table to main list
* Add old keycodes to legacy header
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/process_keycode/process_auto_shift.c | 12 | ||||
-rw-r--r-- | quantum/quantum_keycodes.h | 20 | ||||
-rw-r--r-- | quantum/quantum_keycodes_legacy.h | 7 |
3 files changed, 27 insertions, 12 deletions
diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index 644ad2cbaf..35d4851ee5 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -375,24 +375,24 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { } switch (keycode) { - case KC_ASTG: + case AS_TOGG: autoshift_toggle(); break; - case KC_ASON: + case AS_ON: autoshift_enable(); break; - case KC_ASOFF: + case AS_OFF: autoshift_disable(); break; # ifndef AUTO_SHIFT_NO_SETUP - case KC_ASUP: + case AS_UP: autoshift_timeout += 5; break; - case KC_ASDN: + case AS_DOWN: autoshift_timeout -= 5; break; - case KC_ASRP: + case AS_RPT: autoshift_timer_report(); break; # endif diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 0be090e48b..6c9a262484 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -105,12 +105,12 @@ enum quantum_keycodes { QK_GRAVE_ESCAPE, // 5C16 // Auto Shift - KC_ASUP, // 5C17 - KC_ASDN, // 5C18 - KC_ASRP, // 5C19 - KC_ASTG, // 5C1A - KC_ASON, // 5C1B - KC_ASOFF, // 5C1C + QK_AUTO_SHIFT_UP, // 5C17 + QK_AUTO_SHIFT_DOWN, // 5C18 + QK_AUTO_SHIFT_REPORT, // 5C19 + QK_AUTO_SHIFT_TOGGLE, // 5C1A + QK_AUTO_SHIFT_ON, // 5C1B + QK_AUTO_SHIFT_OFF, // 5C1C // Audio AU_ON, // 5C1D @@ -844,6 +844,14 @@ enum quantum_keycodes { #define UC_M_WC UNICODE_MODE_WINC #define UC_M_EM UNICODE_MODE_EMACS +// Auto Shift +#define AS_UP QK_AUTO_SHIFT_UP +#define AS_DOWN QK_AUTO_SHIFT_DOWN +#define AS_RPT QK_AUTO_SHIFT_REPORT +#define AS_TOGG QK_AUTO_SHIFT_TOGGLE +#define AS_ON QK_AUTO_SHIFT_ON +#define AS_OFF QK_AUTO_SHIFT_OFF + // Leader key #define QK_LEAD QK_LEADER diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h index a6023dee30..3baf37d378 100644 --- a/quantum/quantum_keycodes_legacy.h +++ b/quantum/quantum_keycodes_legacy.h @@ -6,6 +6,13 @@ #define KC_LEAD QK_LEADER #define KC_LOCK QK_LOCK +#define KC_ASUP QK_AUTO_SHIFT_UP +#define KC_ASDN QK_AUTO_SHIFT_DOWN +#define KC_ASRP QK_AUTO_SHIFT_REPORT +#define KC_ASTG QK_AUTO_SHIFT_TOGGLE +#define KC_ASON QK_AUTO_SHIFT_ON +#define KC_ASOFF QK_AUTO_SHIFT_OFF + #define VLK_TOG QK_VELOCIKEY_TOGGLE #define CAPSWRD QK_CAPS_WORD_TOGGLE #define CAPS_WORD QK_CAPS_WORD_TOGGLE |