Enhancement and fixes of "Secure" feature (#16958)
This commit is contained in:
parent
baa8d07fdb
commit
db887e63d7
8 changed files with 379 additions and 2 deletions
|
@ -7,7 +7,9 @@
|
|||
|
||||
bool preprocess_secure(uint16_t keycode, keyrecord_t *record) {
|
||||
if (secure_is_unlocking()) {
|
||||
if (!record->event.pressed) {
|
||||
// !pressed will trigger on any already held keys (such as layer keys),
|
||||
// and cause the request secure check to prematurely fail.
|
||||
if (record->event.pressed) {
|
||||
secure_keypress_event(record->event.key.row, record->event.key.col);
|
||||
}
|
||||
|
||||
|
@ -33,7 +35,11 @@ bool process_secure(uint16_t keycode, keyrecord_t *record) {
|
|||
secure_is_locked() ? secure_unlock() : secure_lock();
|
||||
return false;
|
||||
}
|
||||
if (keycode == SECURE_REQUEST) {
|
||||
secure_request_unlock();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue