View Full Version : Simultaneous mouse and keyboard

27th August 2011, 22:12
Hello, I am currently trying to make a map editor using Irrlicht and Qt4. I can process mouse events and keyboard events separately, but I need to actually be able to process the two together. For example, to move around the scene, I want the user to click the window with the right button, and while the right button is held, the wasd keys can be used to move around.

I looked at Keyboard modifiers, but that doesn't work since it only registers the keyboard events before the mouse click.

My question is: is it possible to hold down a mouse button, but still receive keyboard input?

29th August 2011, 03:46
I never tried it but it should work. Some sugestions, use QEvent instead of key press event and mouse press event, then use some ifelse's to see what type of events they are, and if necessary perform some casts to key press and mouse press event. Or you can try to check on event filters (http://doc.qt.nokia.com/latest/eventsandfilters.html#event-filters)

29th August 2011, 05:01
how to solve?