There is no key up event right? So, it's not possible to do things like ctrl + x? If so, it really should be added. Seriously.
Key events
Started by sci4me, Jun 14 2014 04:26 AM
4 replies to this topic
#1
Posted 14 June 2014 - 04:26 AM
#2
Posted 14 June 2014 - 04:37 AM
Ctrl-keypresses can be detected by seeing a Ctrl key event, then a printable key event, then NO char event.
#3
Posted 14 June 2014 - 04:42 AM
Ah, really? Cool! Good to know, thanks!
#4
Posted 14 June 2014 - 04:48 AM
Would this be a way of catching one, or am I not getting the idea?
local event = { os.pullEvent( "key" ) }
if event[2] == control then --#insert key code for control
local second = { os.pullEvent( "key" ) }
if not os.pullEvent( 'char', 1 ) then
--#control combination pressed
else
--#not control combo
end
else
--#not control
end
#5
Posted 14 June 2014 - 04:59 AM
Uh, no. Check out Gopher's ctrlkeys program for a properly structured example.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











