Important: Please read the Qt Code of Conduct -

How to not(!) allow QT to handle jog-dial/shuttle input device?

  • I have a ShuttlePro v2 jog dial/shuttle device plugged into USB on a Linux Kubuntu system. The ShuttlePro gets properly recognized as a USB HID device by the kernel. So, we're on a desktop device here, and thus not an embedded Qt topic.

    Previous Qt versions seem to have ignored this input device -- unfortunately I can't tell the exact Qt versions, but up to what Kubuntu 15.04 came packaged with.

    After upgrading to Kubuntu 15.10 that comes with Qt 5.4.2 I now experience crashes in Qt applications, caused by unwanted use of the ShuttlePro device in newer Qt versions.

    My experiments indicate that newer Qt versions compiled with libinput support unfortunately pick up the ShuttlePro device. This results in unwanted mouse button and wheel events getting fired ... and crashing some Qt/KDE applications, such as Kdenlive.

    Is there a way to make Qt ignoring certain input devices? Alternatively, is there a way to differentiate events coming from different input devices?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Can you reliably trigger that crash ? If so you should take a look at the bug report system to see if something known.

    You should also check if you are experiencing the same problem with the latest Qt version (currently, 5.5.1)

  • @SGaist The crash depends on the particular application, not all Qt/KDE5 applications do crash. In my case the problem is that the Kdenlive application is not prepared to receive mouse events from the ShuttlePro input device that do not make sense as mouse events. As for Kdenlive with Qt 5.4 the crash is reproducible.

    Qt 5.4 insists of opening all available input devices, such as the ShuttlePro, and then converting all input events. The problem is that these Qt-routed input events seemingly cannot be distinguished from ordinary mouse events. Kdenlive does its own handling of the ShuttlePro input device. I've found no reliable event parameter so far that could be used to filter out the "dangerous" Qt mouse events.

    I'm not really eager to replace the distribution's Qt 5.4 libraries with newer libraries; this could probably kill my whole installation. I need to edit video on my system, so this not an option for me.

  • Lifetime Qt Champion

    I didn't meant that you should replace it, just use the official online installer to get the latest version and test with it. No need to replace anything.

    You should also contact the Kdenlive team about that problem

  • @SGaist My system is already at the latest release 15.10 with all available updates installed, and this boils down to Qt 5.4. I've contacted the Kdenlive team, but they are not able to resolve the issue (in part because there is only one core developer with a ShuttlePro device).

    The problem is that Qt some time ago started to integrate event input devices on its own.

    At the moment I can see only either to make Qt not integrate any input device or detecting mouse events from such input devices. Unfortunately, after reading the sources it doesn't seem to exist any indication in mouse events that they have been received through the event input integration plugin. So is there a way to disable this plugin, at least on a per-application basis?

    The reason is that the ShuttlePro must not be seen as an ordinary mouse device. Its events when taken as mouse events will cause havroc in all Qt-based applications, as they appear as if someone uses another mouse.

  • Lifetime Qt Champion

    Sorry for the late reply. I'd recommend brining this to attention on the interest mailing list. You'll find there Qt's developers/maintainers (this forum is more user oriented)

Log in to reply