Skip to content

Prevent key modifiers in MainWindow from getting stuck#8282

Open
yohannd1 wants to merge 1 commit intoLMMS:masterfrom
yohannd1:fix-stuck-shift
Open

Prevent key modifiers in MainWindow from getting stuck#8282
yohannd1 wants to merge 1 commit intoLMMS:masterfrom
yohannd1:fix-stuck-shift

Conversation

@yohannd1
Copy link
Contributor

@yohannd1 yohannd1 commented Feb 25, 2026

This PR adds some extra code to MainWindow::eventFilter, and adds such event filter to itself, in order to detect events which may suppress key-release events of modifiers, which in my experience have been the ones such of type QEvent::WindowDeactivate. It also removes the MainWindow::focusOutEvent overload, which indeed didn't seem to be called. In case that event ever gets received, though, the event filter should be handling it properly.

Previously, the bug could be replicated by holding shift in LMMS, then changing to another window, then releasing shift. After going back to LMMS (without pressing shift again) and using a knob, it would change values slowly (as if shift was still being pressed).

I've also removed the [[deprecated]] notice from MainWindow::isShiftPressed, though I'm not sure if this was the sole reason for its deprecation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant