basic keyboard: release all keys on FocusOut event

This commit is contained in:
Megamouse 2021-04-17 11:22:54 +02:00
parent 67e2e154fa
commit 5416f60643
3 changed files with 33 additions and 6 deletions

View file

@ -186,3 +186,14 @@ void KeyboardHandlerBase::SetIntercepted(bool intercepted)
}
}
}
void KeyboardHandlerBase::ReleaseAllKeys()
{
for (const Keyboard& keyboard : m_keyboards)
{
for (const KbButton& button : keyboard.m_buttons)
{
Key(button.m_keyCode, false);
}
}
}