rust-windowing / rust-windowing/winit
Physical key <-> logical key conversions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Description
Working on a Bevy project, I want to store keybindings and their defaults as physical keys but display them to the user as logical keys. There is currently no complete ecosystem solution for this (the closest is keyboard_keynames which does not have macos support or esoteric platform support).
winit creates key events on input with both physical and logical keys, but does not have a conversion API. It would make sense for winit to support conversions since it already has a large keyboard and OS internal/external surface.
Related:
- https://github.com/rust-windowing/winit/issues/2678
- https://github.com/bevyengine/bevy/discussions/12569#discussioncomment-8862240
Relevant platforms
No response
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 by reviewing winit's existing keyboard event handling and the related issue #2678, then compare how supported platforms represent physical and logical keys. Done means a defined conversion API with behavior covering the requested platforms and tests demonstrating the conversions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100