We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using sdl2-ffi in my YEng project, and try to handle the escape keypress, which doesn't work as expected. my code:
if event.type == Y.sdl.KEYUP then print(event.key.keysym.sym,Y.sdl.K.ESCAPE,type(event.key.keysym.sym),type(Y.sdl.K.ESCAPE)) end
output when pressing the escape key:
27 23 number number
Y.sdl defined as:
local core_sdl=require'sdl2' local additional_sdl = {} local meta_sdl = { __index = function(self, key) return additional_sdl[key] end } local meta_K={ __index = function(self, key) return tonumber(core_sdl.C['SDLK_'..key]) end } additional_sdl.K=setmetatable({},meta_K) Y.sdl = setmetatable(core_sdl, meta_sdl)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using sdl2-ffi in my YEng project, and try to handle the escape keypress, which doesn't work as expected. my code:
output when pressing the escape key:
Y.sdl defined as:
The text was updated successfully, but these errors were encountered: