2
i want to know how to make an event, for example with the do to see if the user typed 'q' or 'o', as if it were in a addEventListener()
2
i want to know how to make an event, for example with the do to see if the user typed 'q' or 'o', as if it were in a addEventListener()
-1
Lua is a very simple language, by default it has no libraries to handle events much less user interfaces. Maybe you are using Lua in a specific context, if any, the libraries available to you to use should be documented by the tool itself.
For example: the package Ithui presents bindings in Lua to use ncurses (library for creating user interfaces in the terminal). In this case the event loop is fully managed by ncurses and we only use it within our Lua application.
As quoted by @Woss, the question asked in English has more in-depth responses.
I know the question is old, but I think it’s important for people like me who are learning to program on Lua to have a more direct and simple answer.
Browser other questions tagged lua events event-listener
You are not signed in. Login or sign up in order to post.
Question on the Soen: Keypress Event in Lua?
– Woss