Reputation: 77
How would I know what keys are currently being pressed in SDL2 (not event)?
Upvotes: 2
Views: 146
Reputation: 96091
if (SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_???]) {/*the key is held*/}
where ???
is a key name, one of those.
Upvotes: 4