Expose ScanCode to VirtualKeyCode mapping #2436
Labels
F - duplicate
This issue or pull request already exists
S - api
Design and usability
S - enhancement
Wouldn't this be the coolest?
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 aScanCode
to aVirtualKeyCode
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.
The text was updated successfully, but these errors were encountered: