1
0
Fork 0

Enhancement and fixes of "Secure" feature (#16958)

This commit is contained in:
Drashna Jael're 2022-05-14 15:07:08 -07:00 committed by GitHub
parent baa8d07fdb
commit db887e63d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 379 additions and 2 deletions

View file

@ -571,3 +571,16 @@ const char *get_u16_str(uint16_t curr_num, char curr_pad) {
last_pad = curr_pad;
return get_numeric_str(buf, sizeof(buf), curr_num, curr_pad);
}
#if defined(SECURE_ENABLE)
void secure_hook_quantum(secure_status_t secure_status) {
// If keys are being held when this is triggered, they may not be released properly
// this can result in stuck keys, mods and layers. To prevent that, manually
// clear these, when it is triggered.
if (secure_status == SECURE_PENDING) {
clear_keyboard();
layer_clear();
}
}
#endif