rust-windowing / rust-windowing/winit

Physical key <-> logical key conversions

Open
#4,606 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S - enhancement
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:

Relevant platforms

No response

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.