![]() Registered Member ![]()
|
I'm not exactly sure if this is the right corner of the KDE forum to put my question forward, so if you know better, please direct me to the place where my question may be better suited.
For video editing purposes I've got a jog dial, it's a Contour ShuttlePRO v2 USB device. To my limited understanding, it's a USB HID device. When connected to my Linux system, the kernel will spit out the following two lines of information:
At this time, the fine Kdenlive video editor directly supports this device. However, I cannot use the device in other applications, such as The Gimp, the KDE graphics applications, et ceteral. The company making the ShuttlePRO is Contour and it has software for Windows and OS X which allows the ShuttlePRO to be used in basically all Windows or OS X applications. I've locked around but could not find anything suitable for KDE nor in the KDE SC, not even a macro recorder or something similar. However, if I simply missed the obvious I would be glad if other people could point me to the appropriate tools. So, in case there is nothing suitable in the KDE SC, where can I get more information about how to maybe program some kind of KDE tool that reads events from the ShuttlePRO and simulates keyboard and mouse events? In addition, how can I find out in a KDE tool which application currently is active. The latter becomes necessary as I need to switch between different event mappings depending on which application currently hold the focus. Any concrete help is greatly appreciated! |
![]() Administrator ![]()
|
Can you try running "xev" to see if it makes any output which is detectable by it?
You might also want to look into https://wiki.archlinux.org/index.php/jo ... ving_mouse
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I already gave xev a try, but it doesn't respond any events from the device. However, I stumbled across evtest which I could use successfully to dump the events sent by the ShuttlePRO. So what I would like to have is a KDE tool that can attach to a Linux input device and map events to X events.
Is there a Qt od KDE abstraction for working with emulated keyboard and core pointer events? I would like to not get down to xlib level, but instead make use of any abstraction available. |
![]() Administrator ![]()
|
I'm not aware of any such abstraction layer, at the very least it isn't something exported outside of Qt.
What sort of events did your ShuttlePRO generate?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
It is probably the best to let the ShuttlePro v2 speak for itself...
![]()
The ShuttlePRO v2 can generate the following events:
One thing I noticed and that may point at some minor issue is that the ShuttlePRO reports both the shuttle d the jog as sending relative events. This is, in my opinion, a mistake by Contour: if you look at the events you see that the jog and shuttle events contain absolute positions. The unfortunate result of this mistake seems to be that the Linux USBHID driver swallows relative jog and shuttle events with the position of 0, as it correctly thinks that this would be "no movement" when in fact it indicates movement to the absolute position 0. |
![]() Administrator ![]()
|
How did the Contour software allow other applications to be used by the ShuttlePRO? Did it simply move the mouse cursor, or did it do something else?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
There is no Contour software for Linux, only for Windows and Mac OSX. On Windows, the Contour software works on the basis of the program (file idenity) that creates a window. It thus does not on the title of a window but instead uses the name of the executable. According to the manual describing the software, when updating software for which key and shuttle bindings exist, the user can update the reference between the executable and the set of bindings.
|
![]() Administrator ![]()
|
I see, this seems rather specific and special. Due to this, any particular support for jog-dials would need to be implemented in Qt first, so that KDE applications could then utilise it. Otherwise, you could look into options which allow you to map the functions of a Joystick to allow them to function similar to a mouse - which X11 does support I believe.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I don't think that Qt support is required. I can perfectly live with a KDE daemon that handles the /dev/input device pseudo file, reading events and then sending the appropriate synthetized keyboard and mouse events to KDE applications. Where can I find more about KDE daemons?
|
![]() Administrator ![]()
|
Due to the nature of such a process, it would probably would be better suited to being it's own independent application.
I would recommend checking the QCoreApplication, KApplication and KUniqueApplication documentation on api.kde.org and doc.qt-project.org.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]