[Qt-interest] Raw input events issue

Guillaume Spalla guillaume.spalla at gmail.com
Mon Apr 18 17:41:48 CEST 2011


Hi all,

I am trying to develop an application controlled by a dedicated device (a
touchpad “Wacom Bamboo Touch”), and keep the mouse and the keyboard actives.

For that, I am dealing with the Raw Input from the device using WM_INPUT (
http://msdn.microsoft.com/en-us/library/ms645546%28v=VS.85%29.aspx), and
here is the problem. The program seems to receive the raw events, but
doesn’t treat them until a “classical” event (mouse or keyboard for example)
happens.

Here a copy of the code I have made for the event filter. The class
“touchpad Controller” of my program is in charge of the raw inputs. The
WindowProc function is in charge of emitting the signals according to the
raw input sent by the touchpad:

*bool TouchPadController::RawInputEventFilter(void* msg, long* result)
{
        if (touchPadController == 0)
        {
               return false;
        }
        MSG* message = (MSG*)(msg);

        if (message->message == WM_INPUT) {
               touchPadController->WindowProc(message->message,
message->wParam, message->lParam);
               if (result != 0)
               {
                       result = 0;
               }
               return true;
        }
        return false;
}*

So in the current state of the program, we first have to make a command with
the touchpad, and then to press a key of the keyboard to get it working,
which is not really efficient. Did anyone already experienced this problem
and maybe if you know how to fix it?

Another possible solution could be to let the Wacom driver and QT converting
those inputs into classical Mouse event (this would solve the “real time
control problem"). But then the cursor will move when using the touchpad,
which is not expected. Would it be possible to unlink the cursor from this
“second mouse”?  In other words, could it be possible to use the bamboo
touch without modifying the cursor position?

Thanks in advance,

Best regards,

Guillaume
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110418/4869f930/attachment.html 


More information about the Qt-interest-old mailing list