rust-windowing / rust-windowing/winit

Wrong modifier physical_key/location in KeyEvent on a Mac with Sticky mods

Open
#4,232 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

B - bug DS - appkit
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.