[Bug] Fix media key missing upstroke event (#11162)

[Bug] Pressing media key on a momentarily activated layer may leads to
missing key up events.
This commit is contained in:
Alexander Ulitin 2021-02-07 17:43:39 +01:00 committed by GitHub
parent 0288142769
commit 9146d30f06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1035,6 +1035,10 @@ void clear_keyboard_but_mods(void) {
* FIXME: Needs documentation.
*/
void clear_keyboard_but_mods_and_keys() {
#ifdef EXTRAKEY_ENABLE
host_system_send(0);
host_consumer_send(0);
#endif
clear_weak_mods();
clear_macro_mods();
send_keyboard_report();
@ -1042,10 +1046,6 @@ void clear_keyboard_but_mods_and_keys() {
mousekey_clear();
mousekey_send();
#endif
#ifdef EXTRAKEY_ENABLE
host_system_send(0);
host_consumer_send(0);
#endif
}
/** \brief Utilities for actions. (FIXME: Needs better description)