Results 1 to 3 of 3

Thread: Simultaneous mouse and keyboard

  1. #1
    Join Date
    Aug 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Simultaneous mouse and keyboard

    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?

  2. #2
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    287
    Thanks
    23
    Thanked 31 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Simultaneous mouse and keyboard

    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
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  3. #3
    Join Date
    Jun 2011
    Posts
    45
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Simultaneous mouse and keyboard

    how to solve?

Similar Threads

  1. QT3/QT4 Simultaneous
    By JediSpam in forum Installation and Deployment
    Replies: 8
    Last Post: 24th August 2011, 08:33
  2. Mouse & KeyBoard Event
    By anafor2004 in forum Newbie
    Replies: 2
    Last Post: 26th October 2009, 11:39
  3. Hooking Keyboard and mouse
    By moya in forum Qt Programming
    Replies: 2
    Last Post: 3rd August 2009, 15:34
  4. Filtering all mouse/keyboard events
    By maverick_pol in forum Qt Programming
    Replies: 9
    Last Post: 27th November 2008, 17:03
  5. Replies: 2
    Last Post: 24th July 2006, 18:36

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.