mirror of
https://github.com/airstruck/luigi.git
synced 2026-01-09 15:58:22 +00:00
Fix #46
This commit is contained in:
@@ -85,10 +85,10 @@ Backend.run = function ()
|
|||||||
local motion = event.motion
|
local motion = event.motion
|
||||||
callback.mousemoved(motion.x, motion.y)
|
callback.mousemoved(motion.x, motion.y)
|
||||||
elseif event.type == sdl.KEYDOWN then
|
elseif event.type == sdl.KEYDOWN then
|
||||||
local key = Keyboard.stringByKeycode[event.key.keysym.sym]
|
local key = Keyboard.stringByKeycode[event.key.keysym.sym] or 'unknown'
|
||||||
callback.keypressed(key, event.key['repeat'])
|
callback.keypressed(key, event.key['repeat'])
|
||||||
elseif event.type == sdl.KEYUP then
|
elseif event.type == sdl.KEYUP then
|
||||||
local key = Keyboard.stringByKeycode[event.key.keysym.sym]
|
local key = Keyboard.stringByKeycode[event.key.keysym.sym] or 'unknown'
|
||||||
callback.keyreleased(key, event.key['repeat'])
|
callback.keyreleased(key, event.key['repeat'])
|
||||||
elseif event.type == sdl.TEXTINPUT then
|
elseif event.type == sdl.TEXTINPUT then
|
||||||
callback.textinput(ffi.string(event.text.text))
|
callback.textinput(ffi.string(event.text.text))
|
||||||
|
|||||||
Reference in New Issue
Block a user