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 Forum Index
SDL
Simple Directmedia Layer Forums
Trying to use scancode to get key input.
Kelvin


Joined: 31 Mar 2016
Posts: 4
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.
Naith


Joined: 03 Jul 2014
Posts: 158
I answered your question in this post: https://forums.libsdl.org/viewtopic.php?t=11858