-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add ScanCode enum. #862
Copy link
Copy link
Closed
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreC-FeatureA new feature, making something new possibleA new feature, making something new possible
Description
Activity
Metadata
Metadata
Assignees
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreC-FeatureA new feature, making something new possibleA new feature, making something new possible
What problem does this solve or what need does it fill?
For better keyboard layout support.
KeyCodedepends on the user's keyboard layout while scancodes doesn't (KeyCode::Awouldn't be the same physical key on a QWERTY or an AZERTY keyboard, whileScanCode::Awould be the A key on a QWERTY, while it would be the Q key on an AZERTY). Scancodes are already supported in events, but not withInput<T>.Describe the solution would you like?
Add a
ScanCodeenum. A good list to begin with would be SDL's ScanCode. If i remember correctly,SDL_Scancodeenumeration is based on the USB standard specification.Describe the alternative(s) you've considered?
An alternative would be to implement that in every project, but I think that kind of things would be better if directly inside of the engine.
Additional context
None