Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ScanCode to VirtualKeyCode mapping #2436

Closed
NotAFile opened this issue Aug 20, 2022 · 1 comment
Closed

Expose ScanCode to VirtualKeyCode mapping #2436

NotAFile opened this issue Aug 20, 2022 · 1 comment
Labels
F - duplicate This issue or pull request already exists S - api Design and usability S - enhancement Wouldn't this be the coolest?

Comments

@NotAFile
Copy link

NotAFile commented Aug 20, 2022

In applications that care more about the position of a key than it's function, one is supposed to use a ScanCode. However this creates an UI issue when asking the user to press a certain button, if one only knows it's scan code.

The best solution to my knowledge is to pass the scan code through the OS keyboard mapping as if it was a key press to determine the name of the key in that location. However it seems that this currently happens very deep within the platform implementations and is not exposed by winit. (e.g. here in very deep in sctk). It would be useful to expose this in a cross-platform way, allowing users to map a ScanCode to a VirtualKeyCode for display in the application.

There have been a lot of discussions about revamping keyboard input that might be relevant (#753, #1806), however I have not seen any issues for this specific functionality yet.

@msiglreith msiglreith added S - enhancement Wouldn't this be the coolest? S - api Design and usability labels Aug 30, 2022
@kchibisov
Copy link
Member

Duplicate of #2678.

Will hopefully be a part of next release.

@kchibisov kchibisov added the F - duplicate This issue or pull request already exists label May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F - duplicate This issue or pull request already exists S - api Design and usability S - enhancement Wouldn't this be the coolest?
Development

No branches or pull requests

3 participants