rust-windowing / rust-windowing/winit
Wrong modifier physical_key/location in KeyEvent on a Mac with Sticky mods
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Description
If you enable sticky modifiers, then pressing Right Shift is reported as Left Shift in KeyEvent (both in physical_key and also left in location)
So currently these aren't really physical keys, but logical state, which with sticky keys is always set to the left shift.
macOS version
macOS
13.4.1
22f82
Winit version
git version using this simple modifier / key event printing app for the modified window example
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the modified window example and the linked modifier/key event printing app, then reproduce the case on macOS 13.4.1 with Sticky Modifiers enabled. Compare Right Shift events with the reported physical_key and location; done means Right Shift is reported as right in both fields rather than as Left Shift.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100