521 posts
Location
Stockholm, Sweden
Posted 13 November 2012 - 09:48 PM
Is it possible to check if a key is hold down with os.pullEvent() ?
I want this to check for multiple button event at the same time.
I want to check for shift and the arrow keys.
I know that if I want to check for shift + a letter I could just check for capitalized characters.
But is there a smart way to do what I need/want?
294 posts
Posted 13 November 2012 - 10:04 PM
Not possible yet.
389 posts
Location
Norway
Posted 13 November 2012 - 11:52 PM
Not posible due to SMP. what if one guy is holding down all the keys just to troll?
294 posts
Posted 14 November 2012 - 01:09 AM
Then program would just register all keys as holding down. It does not really matter.
389 posts
Location
Norway
Posted 14 November 2012 - 01:20 AM
it would block userinput, so it does matter :P/>/>
but it cant be added because of SMP stuff anyways, so yeah, thats it :)/>/>
521 posts
Location
Stockholm, Sweden
Posted 14 November 2012 - 01:40 AM
It would be great if we could have a button released and pressed event.
if event == "button_pressed" then
elseif event == "botton_released" then
end
Like for example now if you hold down a button it just spams events.
294 posts
Posted 14 November 2012 - 03:23 AM
it would block userinput, so it does matter :P/>/>
but it cant be added because of SMP stuff anyways, so yeah, thats it :)/>/>
What is the difference between troll holding keys or troll pressing random keys? It also blocks user input.
389 posts
Location
Norway
Posted 14 November 2012 - 03:33 AM
lets do it Cloudy style:
It wont happend because it is confusing in a mulituser environment.
(90% quoted from IRC :P/>/>)
521 posts
Location
Stockholm, Sweden
Posted 14 November 2012 - 06:02 AM
lets do it Cloudy style:
It wont happend because it is confusing in a mulituser environment.
(90% quoted from IRC :P/>/>)
Oh yeah, multiple users would make it tricky.
1214 posts
Location
The Sammich Kingdom
Posted 14 November 2012 - 06:14 AM
They could just have the events return a table of all users using the computer currently, and the coder can make the script only detect key presses if it is done by the first person to open the terminal. There is still a very high chance of it not being added.
However, what you could, is see if the keys were pressed in sequence within x period of time. AfterLifeLochie has done this for one of his scripts I believe.
40 posts
Location
Poland
Posted 14 November 2012 - 06:29 AM
lets do it Cloudy style:
It wont happend because it is confusing in a mulituser environment.
(90% quoted from IRC :P/>/>)
Hmm… Wait, I know a multiuser environment with computers supporting key_up and key_down events! It's called
real world. What is your problem, Cloudy? Are those events a paradox for you?
871 posts
Posted 14 November 2012 - 06:31 AM
jajnick, you frequently have someone next to you typing on the same keyboard in the real world? That seems inconvenient.
40 posts
Location
Poland
Posted 14 November 2012 - 06:59 AM
294 posts
Posted 14 November 2012 - 07:18 AM
jajnick, you frequently have someone next to you typing on the same keyboard in the real world? That seems inconvenient.
But it still works.
Also it's not really frequent to have someone next to you typing on same PC in ComputerCraft either.
2447 posts
Posted 14 November 2012 - 08:43 AM
lets do it Cloudy style:
It wont happend because it is confusing in a mulituser environment.
(90% quoted from IRC :P/>/>)
Hmm… Wait, I know a multiuser environment with computers supporting key_up and key_down events! It's called
real world. What is your problem, Cloudy? Are those events a paradox for you?
Don't be an ass. I don't reply with what people want to know when people are asses.
40 posts
Location
Poland
Posted 14 November 2012 - 09:24 AM
I'm sorry, but the answer is very important to me. I already have got many project ideas that won't realize without those events ._.
1214 posts
Location
The Sammich Kingdom
Posted 14 November 2012 - 09:40 AM
lets do it Cloudy style:
It wont happend because it is confusing in a mulituser environment.
(90% quoted from IRC :P/>/>)
Hmm… Wait, I know a multiuser environment with computers supporting key_up and key_down events! It's called
real world. What is your problem, Cloudy? Are those events a paradox for you?
Don't be an ass. I don't reply with what people want to know when people are asses.
Cloudy is good at pwning people.
1548 posts
Location
That dark shadow under your bed...
Posted 14 November 2012 - 10:33 AM
–snip–
Cloudy is good at pwning people.
I'm sorry, "good" is just an understatement. I look up his profile regularly just to view all of his posts :P/>/> one of the few things that cheer me up while I'm dealing with a moronic client
2447 posts
Posted 15 November 2012 - 04:36 AM
No idea why this was locked. Fixed!
8543 posts
Posted 15 November 2012 - 04:57 AM
Well, I had locked it because the original question had been answered and the topic had subsequently veered off topic. Seemed like there wasn't any reason to keep it open at that point. I must have been mistaken! :P/>/>
2447 posts
Posted 15 November 2012 - 05:18 AM
Ah, I would have kept it closed had you posted advising why it had been done - I didn't know who closed it due to IP Board's lacking logging facilities. Re-closed :P/>/>