remap " " to "space" for love 0.9

This commit is contained in:
airstruck
2016-02-05 00:32:40 -05:00
parent 95ba34f7b1
commit cf42d88148

View File

@@ -143,9 +143,11 @@ function Backend.show (layout)
end end
end) end)
hook(layout, 'keypressed', function (key, isRepeat) hook(layout, 'keypressed', function (key, isRepeat)
if key == ' ' then key = 'space' end
return input:handleKeyPress(layout, key, Backend.getMousePosition()) return input:handleKeyPress(layout, key, Backend.getMousePosition())
end) end)
hook(layout, 'keyreleased', function (key) hook(layout, 'keyreleased', function (key)
if key == ' ' then key = 'space' end
return input:handleKeyRelease(layout, key, Backend.getMousePosition()) return input:handleKeyRelease(layout, key, Backend.getMousePosition())
end) end)
hook(layout, 'textinput', function (text) hook(layout, 'textinput', function (text)