SDL物理密钥代码和SDL虚拟密钥代码有什么区别?

问题描述:

结构SDL_Keysym具有SDL_ScancodeSDL_Keycode成员.它们之间有什么区别?该文档并没有真正为我清除它.我都尝试过,而且它们似乎也做同样的事情.

The struct SDL_Keysym has SDL_Scancode and SDL_Keycode members. What is the difference between them? The documentation does not really clear it up for me. I tried both and they seem to do the same thing.

请参见 SDL文档.扫描码代表按标准QWERTY键盘建模的键的物理位置,而键码则是通过按键获得的字符.

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.

在AZERTY键盘上,按 A 将发出'Q'扫描代码和'a'键盘代码.

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