Posted 04 April 2015 - 04:59 AM
It probably been done before, but I made it so I figured I would post it.
This is basically an API that assigns key codes to a variable named after the letter the key code references.
for example if you want to do
you could instead do
here is the pastebin. :)/>
This is basically an API that assigns key codes to a variable named after the letter the key code references.
for example if you want to do
local event, param1, param2, param3 = os.pullEvent()
if event == "key" then
if param1 == 17 then
print(" 'w' was pressed")
end
end
you could instead do
if param1 == k.w then
here is the pastebin. :)/>