fix: from windows side send a key up if it was down before

This commit is contained in:
barrelltitor 2026-08-08 18:37:52 +03:00 committed by Nick Bolton
parent 6692fa5636
commit 5094580606

View file

@ -1087,7 +1087,9 @@ bool MSWindowsScreen::onKey(WPARAM wParam, LPARAM lParam)
}
// stop sending modifier keys over and over again
if (isModifierRepeat(oldState, state, wParam)) {
// but allow up to be sent if the previous state was down
// to prevent stuck modifier keys on the client
if (down && wasDown && isModifierRepeat(oldState, state, wParam)) {
return true;
}