DYankee

Keytest

Mar 19th, 2022 (edited)
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. while true do
  2.     local event, key = os.pullEvent()
  3.     if event == "key" then
  4.         local key = key
  5.             if key == 265  then
  6.                 print("up arrow")
  7.             elseif key == 264 then
  8.                 print("down arrow")
  9.             else
  10.                 print("invalid key")
  11.         end
  12.     end
  13. end
Add Comment
Please, Sign In to add comment