463 posts
Location
Star Wars
Posted 26 February 2016 - 05:18 PM
Hey guys,
I have a little question:
How can I get modifier keys like CTRL + L or T + A?
Sewbacca
3057 posts
Location
United States of America
Posted 26 February 2016 - 05:42 PM
Control + (key) is possible, T+A is not.
Run this little script to figure out how this works:
--#proof of concept control keys
while true do
local event = {os.pullEvent()}
if event[ 1 ] == "char" or event[ 1 ] == "key" then
print( event[ 1 ] .. ": " .. event[ 2 ] )
end
end
(actually, in newer versions you could track key_up events. But I haven't played with that yet)
463 posts
Location
Star Wars
Posted 01 March 2016 - 07:36 PM
Thank you, I didn't know the key_up event. I solved it (
here is the working code)
Edited on 01 March 2016 - 06:40 PM