Skip to content

Fix a few bugs with CurrentKeyModifiers - #6493

Open
dweymouth wants to merge 1 commit into
fyne-io:developfrom
dweymouth:fix-stuck-modifier-keys
Open

Fix a few bugs with CurrentKeyModifiers#6493
dweymouth wants to merge 1 commit into
fyne-io:developfrom
dweymouth:fix-stuck-modifier-keys

Conversation

@dweymouth

Copy link
Copy Markdown
Contributor

Fixes #6486

Also synchronizes currentKeyModifiers on mouse click events from GLFW (which carry the freshest key modifier state from the OS), and clear it on app backgrounding, to prevent a held, then unfocus, then released modifier key from being reported as if it were stuck on.

One note is that since we can only sync this info on mouse clicks and key press/release events, the CurrentKeyModifiers API will unavoidably be potentially stale if called after an application is re-focused but before any mouse clicks (an existing unsolvable issue).

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@andydotxyz andydotxyz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch thanks

@andydotxyz

Copy link
Copy Markdown
Member

Try a rebase to get test fixes - though there are some issues I don't recognise there.

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.

Problem with Modifier keys on Windows

2 participants