本文介绍了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键盘上,按将发出'Q'扫描代码和'a'键盘代码.

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

这篇关于SDL物理密钥代码和SDL虚拟密钥代码有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 08:54