Keys

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
alelink
Posts: 52
Joined: Tue Jan 20, 2004 8:32 pm
Location: Italy
Contact:

Keys

Post by alelink »

Hi,
somebody knows how to handle event from 2 key pressed togheter?

thanks
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Well, you won't ever get two keys pressed together in the event receiver because even though the action of pressing the keys may be parallel to a user, it will be serial to a computer.

What you will need to do is store what keys are pressed down and then check for the combination of keys.

For special keys, I store the state. CTRL, ALT, SHIFT, & "Windows", so if another key is pressed, it will function as expected.

There should be another post in here describing storing key states.
Crud, how do I do this again?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

If you need to check if a 'normal' key is pressed together with a key like shift or ctrl, you could even just wait for 0.5, I included some additional features for this.
Helioplex

Post by Helioplex »

Cool, seems it isn't a long time till 0.5 is coming, after all niko suggests to wait for it :D
alelink
Posts: 52
Joined: Tue Jan 20, 2004 8:32 pm
Location: Italy
Contact:

Post by alelink »

Saigumi,
have you some code to send me?
I'm not a great coder....so I need to view to learn...

thanks
Post Reply