Closed Lukc closed 7 years ago
Scancodes are helpful in that they are independent from the user’s keyboard layout (and are not “unknown” when unicode characters are being entered…).
Löve’s API makes it easy to obtain them: https://love2d.org/wiki/love.keypressed Haven’t checked SDL’s API, sorry. :(
Sounds reasonable. Pull requests welcome, have a look at Input:handleKey* in input.lua and Backend.show in backend/*.lua. SDL scancodes are mapped to Love equivalents in backend/ffisdl/keyboard.lua
Input:handleKey*
Backend.show
Scancodes are helpful in that they are independent from the user’s keyboard layout (and are not “unknown” when unicode characters are being entered…).
Löve’s API makes it easy to obtain them: https://love2d.org/wiki/love.keypressed Haven’t checked SDL’s API, sorry. :(