Page 1 of 1

How to handle key release.

Posted: Thu Jan 05, 2006 2:20 pm
by byelan74
I have some problem. I create a function to handle model walking. When key pressed, I want the model's walking and when key released, I want the model stop walking. My problem is I don't know how to check when key released (I know only how to check when key pressed). Can anyone help me, please? Thank you.

Posted: Thu Jan 05, 2006 3:19 pm
by bitplane
please check the tutorial, wiki and API before posting anything in advanced help.

tutorial - http://irrlicht.sourceforge.net/tut004.html
tutorial 4 wrote: If the key 'W' or 'S' was left up, we get the position of the scene node, and modify the Y coordinate a little bit. So if you press 'W', the node moves up, and if you press 'S' it moves down.
wiki - http://irrforge.org/index.php/Keyboard_Input
wiki - keyboard input wrote: // if not PressedDown, the key was lifted up
if (!event.KeyInput.PressedDown)
api - http://irrlicht.sourceforge.net/docu/st ... event.html
SEvent structure wrote: bool PressedDown
if not pressed, then the key was left up