The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.
SDL
Simple Directmedia Layer Forums
Trying to use scancode to get key input.
Kelvin
Joined: 31 Mar 2016
Posts: 4
Posted: Sat Apr 30, 2016 7:47 pm
The wiki seems to be missing a ton of code samples, so I'm sorry if this seems like a stupid question. I'm trying to make a function that gets an integer to represent the scancode of a key then pass it to SDL from a Squirrel-scripted VM. I tried to use SDL_GetKeyFromScancode(), but it won't let me use an integer as input, so how to I turn an integer into an SDL_Scancode? I can't pass SDL_Scancode directly from Squirrel, or if i can, I don't know how.