Important: Please read the Qt Code of Conduct -

Qt 5.2 Android: Capturing GenericMotion events from external touchpad.

  • I have an Apple Touchpad connected via bluetooth to an Android tablet. I want it to work independently of the main device touchscreen, and so have an Android input device configuration file setting it up as a touch.deviceType=TouchPad.

    From this device, I'm not receiving any events via MainWindow::touchEvent or MainWindow::event. However, by placing debugging code into, the event does get passed to the dispatchGenericMotionEvent handler.

    • I have tried passing the dispatchGenericMotionEvent event on to QtNative.sendTouchEvent(), but still no events appeared from the touchpad in the c++ event handler.
    • I have considered passing the touch information separately via JNI, but even then, there doesn't appear to be an interface to inject the motion event into the gesture recogniser.

    I'm looking for some direction on how to capture these events and pass them to the gesture recognition handling. Any ideas, or direction on how this event handling works? Thanks

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    For such a low level question, I would advise you to ask it on the interest mailing list, you'll find there Qt's developers/maintainers (this forum is more user oriented)

Log in to reply