diff options
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/process_keycode/process_secure.c | 8 | ||||
-rw-r--r-- | quantum/quantum_keycodes.h | 14 | ||||
-rw-r--r-- | quantum/quantum_keycodes_legacy.h | 5 |
3 files changed, 19 insertions, 8 deletions
diff --git a/quantum/process_keycode/process_secure.c b/quantum/process_keycode/process_secure.c index 3224104c99..894051fb33 100644 --- a/quantum/process_keycode/process_secure.c +++ b/quantum/process_keycode/process_secure.c @@ -23,19 +23,19 @@ bool preprocess_secure(uint16_t keycode, keyrecord_t *record) { bool process_secure(uint16_t keycode, keyrecord_t *record) { #ifndef SECURE_DISABLE_KEYCODES if (!record->event.pressed) { - if (keycode == SECURE_LOCK) { + if (keycode == QK_SECURE_LOCK) { secure_lock(); return false; } - if (keycode == SECURE_UNLOCK) { + if (keycode == QK_SECURE_UNLOCK) { secure_unlock(); return false; } - if (keycode == SECURE_TOGGLE) { + if (keycode == QK_SECURE_TOGGLE) { secure_is_locked() ? secure_unlock() : secure_lock(); return false; } - if (keycode == SECURE_REQUEST) { + if (keycode == QK_SECURE_REQUEST) { secure_request_unlock(); return false; } diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 8689b913ed..c5b9342b17 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -598,10 +598,10 @@ enum quantum_keycodes { QK_MAKE, QK_REBOOT, - SECURE_LOCK, - SECURE_UNLOCK, - SECURE_TOGGLE, - SECURE_REQUEST, + QK_SECURE_LOCK, + QK_SECURE_UNLOCK, + QK_SECURE_TOGGLE, + QK_SECURE_REQUEST, QK_CAPS_WORD_TOGGLE, @@ -857,6 +857,12 @@ enum quantum_keycodes { #define KO_ON QK_KEY_OVERRIDE_ON #define KO_OFF QK_KEY_OVERRIDE_OFF +// Secure +#define SE_LOCK QK_SECURE_LOCK +#define SE_UNLK QK_SECURE_UNLOCK +#define SE_TOGG QK_SECURE_TOGGLE +#define SE_REQ QK_SECURE_REQUEST + // Swap Hands #define SH_T(kc) (QK_SWAP_HANDS | (kc)) #define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE) diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h index f53b8ef72a..652aaaa9a8 100644 --- a/quantum/quantum_keycodes_legacy.h +++ b/quantum/quantum_keycodes_legacy.h @@ -84,6 +84,11 @@ #define JS_BUTTON30 QK_JOYSTICK_BUTTON_30 #define JS_BUTTON31 QK_JOYSTICK_BUTTON_31 +#define SECURE_LOCK QK_SECURE_LOCK +#define SECURE_UNLOCK QK_SECURE_UNLOCK +#define SECURE_TOGGLE QK_SECURE_TOGGLE +#define SECURE_REQUEST QK_SECURE_REQUEST + #define TERM_ON _Static_assert(false, "The Terminal feature has been removed from QMK. Please remove use of TERM_ON/TERM_OFF from your keymap.") #define TERM_OFF _Static_assert(false, "The Terminal feature has been removed from QMK.. Please remove use of TERM_ON/TERM_OFF from your keymap.") // #define RESET _Static_assert(false, "The RESET keycode has been removed from QMK.. Please remove use from your keymap.") |