Irrlicht 1.5 , Vista , Do not read l/r alt and shift

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
MarcinS
Posts: 25
Joined: Tue Feb 17, 2009 3:14 pm
Location: Poland

Irrlicht 1.5 , Vista , Do not read l/r alt and shift

Post by MarcinS »

I do not know how does it work on other systems but
my code is very simple (here are some parts of it)

Code: Select all

void CMyCamera::Move()
{
f32 speed = 1.5f;
if(_receiver.IsKeyDown(irr::KEY_RSHIFT))
	{
		speed = 10.0f;
	}

//....not needed parts of code

}

and the some receiver methods

Code: Select all

bool CMyEventReceiver::OnEvent(const SEvent& event)
{
	if (event.EventType == irr::EET_KEY_INPUT_EVENT) KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
	if (event.EventType == irr::EET_MOUSE_INPUT_EVENT) 
	{
		switch(event.MouseInput.Event)
			{
			case EMIE_LMOUSE_PRESSED_DOWN:
				m_.left = 1;
				break;

			case EMIE_LMOUSE_LEFT_UP:
				m_.left = 0;
				break;

			case EMIE_RMOUSE_PRESSED_DOWN:
				m_.right = 1;
				break;

			case EMIE_RMOUSE_LEFT_UP:
				m_.right = 0;
				break;

			case EMIE_MOUSE_MOVED:
				m_.X = event.MouseInput.X;
				m_.Y = event.MouseInput.Y;
				m_.move = true;
				break;

			default:
				m_.W = event.MouseInput.Wheel;
				m_.move = false;
				break;
		}
		
		
		
	}
    return false;
}
It just do not catch the shift and alt .. with capslock , spacebar and letterkeys , numberkeys it works
Post Reply