Keyboard and mouse module for LuaJIT.
$ luarocks install keyboard
This module can read keyboard and mouse inputs.Also can simulate keys with it.
root