Skip to content

Add ScanCode enum. #862

Description

@linkpy

What problem does this solve or what need does it fill?

For better keyboard layout support. KeyCode depends on the user's keyboard layout while scancodes doesn't (KeyCode::A wouldn't be the same physical key on a QWERTY or an AZERTY keyboard, while ScanCode::A would 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 with Input<T>.

Describe the solution would you like?

Add a ScanCode enum. A good list to begin with would be SDL's ScanCode. If i remember correctly, SDL_Scancode enumeration 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreC-FeatureA new feature, making something new possible

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions