forked from mirrors/qmk_userspace
Deprecate SECURE_*
keycodes for QK_SECURE_*
(#18847)
* Deprecate SECURE_* keycodes for QK_SECURE_* * Update keycode process * Update process_secure.c * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
parent
812001de7f
commit
ec2414c074
4 changed files with 25 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue