Skip to content
Snippets Groups Projects

Keyboard layout support.

Closed Golden requested to merge Golden/SRB2:text-input into next

Uses SDL_Keycode to implement basic keyboard layout support, specifically for text fields.

Console variables:

  • kb_ignorelayout (default Off), CV_SAVE: Turn on to disable keyboard layout support.

C:

  • event_t has one new field:
    • INT32realkey (after key): The key, generated from SDL_Keycode instead of SDL_Scancode -- what key uses.
      When the event_t is not generated from a SDL_KeyboardEvent, equals key.

Lua:

  • keyevent_t userdata sent by the KeyDown and KeyUp hooks has 2 new fields.
    The original fields name and num remain, and retain their behavior of assuming you're using the QWERTY layout.
    • stringrealname: The name of the key according to the current keyboard layout.
    • intrealnum: The numeric code of the key according to the current keyboard layout.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading