How to handle key release.

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
byelan74
Posts: 28
Joined: Sat Dec 24, 2005 11:29 am

How to handle key release.

Post 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.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post 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
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply