Skip to content

Keyboard layout issues #4187

Closed
Closed
@renom

Description

  1. The SDL_KEYMAPCHANGED event never occurs (this event is supposed to occur when the layout is switched).

  2. Field key.keysym.sym (type SDL_Keycode) of SDL_Event (used when type=SDL_KeyboardEvent), sticks to a single layout (mostly the one that's enabled when the app is started, but not always), so that regardless whether the layout is changed or not afterwards, all the keycodes are obtained like the layout has never been changed (e.g. I start the app when the russian layout is enabled, then I switch to the english one, but when SDL_KeyboardEvent occurs, key.keysym.sym is filled with russian letter keycodes unless I restart the app).

  3. The same way, SDL_GetKeyFromScancode and SDL_GetScancodeFromKey are supposed to return values depending on the current layout, but always use the starting layout.

My OS is Arch Linux, the SDL version is 2.0.14. Tested both on Wayland and X11.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions