我如何知道 SDL2 中当前按下了哪些键(不是事件)?
最佳答案
if (SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_???]) {/*the key is held*/}
其中 ???
是键名称,those 之一.
关于c++ - 如何知道SDL2中按下了哪些键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69607185/
我如何知道 SDL2 中当前按下了哪些键(不是事件)?
最佳答案
if (SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_???]) {/*the key is held*/}
其中 ???
是键名称,those 之一.
关于c++ - 如何知道SDL2中按下了哪些键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69607185/