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:
Joel Challis 2022-10-25 22:59:17 +01:00 committed by GitHub
parent 812001de7f
commit ec2414c074
Failed to generate hash of commit
4 changed files with 25 additions and 14 deletions

View file

@ -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;
}