forked from mirrors/qmk_userspace
Fix OSMs getting stuck (#20034)
This commit is contained in:
parent
1899793f27
commit
46844347c4
4 changed files with 170 additions and 19 deletions
|
@ -46,6 +46,12 @@ static uint8_t oneshot_locked_mods = 0;
|
|||
uint8_t get_oneshot_locked_mods(void) {
|
||||
return oneshot_locked_mods;
|
||||
}
|
||||
void add_oneshot_locked_mods(uint8_t mods) {
|
||||
if ((oneshot_locked_mods & mods) != mods) {
|
||||
oneshot_locked_mods |= mods;
|
||||
oneshot_locked_mods_changed_kb(oneshot_locked_mods);
|
||||
}
|
||||
}
|
||||
void set_oneshot_locked_mods(uint8_t mods) {
|
||||
if (mods != oneshot_locked_mods) {
|
||||
oneshot_locked_mods = mods;
|
||||
|
@ -58,6 +64,12 @@ void clear_oneshot_locked_mods(void) {
|
|||
oneshot_locked_mods_changed_kb(oneshot_locked_mods);
|
||||
}
|
||||
}
|
||||
void del_oneshot_locked_mods(uint8_t mods) {
|
||||
if (oneshot_locked_mods & mods) {
|
||||
oneshot_locked_mods &= ~mods;
|
||||
oneshot_locked_mods_changed_kb(oneshot_locked_mods);
|
||||
}
|
||||
}
|
||||
# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
|
||||
static uint16_t oneshot_time = 0;
|
||||
bool has_oneshot_mods_timed_out(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue