What is the difference between an SDL physical key code and an SDL virtual key code?

前端 未结 2 955
渐次进展
渐次进展 2021-02-12 10:24

The struct SDL_Keysym has SDL_Scancode and SDL_Keycode members. What is the difference between them? The documentation does not really cle

2条回答
  •  耶瑟儿~
    2021-02-12 11:05

    See the SDL documentation. Scancodes represent the physical position of the keys, modeled after a standard QWERTY keyboard, while Keycodes are the character obtained by pressing the key.

    On an AZERTY keyboard, pressing A will emit a 'Q' scancode and an 'a' keycode.

提交回复
热议问题