Adding a ShuttleXpress

More
6 years 4 months ago #172725 by JetForMe
Replied by JetForMe on topic Adding a ShuttleXpress
Ah, I found it! The command is xinput. I had to install it (sudo apt install xinput). With that you can see that the ShuttleXpress is a “slave pointer” “slave keyboard,” and you can “float” those so they no longer affect the UI.
Code:
rmann@router:~ $ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Contour Design ShuttleXpress id=9 [slave pointer (2)] ⎜ ↳ Logitech USB Optical Mouse id=10 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=7 [slave keyboard (3)] ↳ Sleep Button id=8 [slave keyboard (3)] ↳ Logitech USB Keyboard id=11 [slave keyboard (3)] ↳ Logitech USB Keyboard id=12 [slave keyboard (3)] ↳ Contour Design ShuttleXpress id=13 [slave keyboard (3)] rmann@router:~ $ xinput float 9 rmann@router:~ $ xinput float 13

Unfortunately this doesn't stick around. This page talks about calling xinput in the ~/.xsessionrc file, but I wasn't sure the IDs would persist. I did some quick tests, and they seem to, at least if you don't move the ShuttleXpress from one USB port to another. It even survived this, but I don’t know if it will with a reboot mixed in. That page has a script for searching the list more robustly. For now I'm hoping the IDs stay the same.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #172726 by JetForMe
Replied by JetForMe on topic Adding a ShuttleXpress
Ah, yeah, the IDs change if you reboot with it plugged in elsewhere. Might also change if another USB device is added. I'm gonna work on that script solution referenced above.

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #172779 by JetForMe
Replied by JetForMe on topic Adding a ShuttleXpress
This seems to work:
Code:
xinput list | grep ShuttleXpress | sed -ne 's/^[^V].*id=\([0-9]*\).*/\1/p' | while read id do xinput float $id done

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #174268 by Haarie
Replied by Haarie on topic Adding a ShuttleXpress
The following user(s) said Thank You: mudnaes

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago - 6 years 3 months ago #174270 by Haarie
Replied by Haarie on topic Adding a ShuttleXpress
Here is my working shuttle.hal file for version 2.9, the only thing to add/change is: loadrt or2 count=4 in the .hal file, I use an other or2 so your count can differ.

I found this file here and had to modify it a little to got it work in 2.9.
Last edit: 6 years 3 months ago by Haarie.

Please Log in or Create an account to join the conversation.

More
6 years 2 weeks ago #186336 by JetForMe
Replied by JetForMe on topic Adding a ShuttleXpress

Haarie wrote: Here is my working shuttle.hal file for version 2.9, the only thing to add/change is: loadrt or2 count=4 in the .hal file, I use an other or2 so your count can differ.

I found this file here and had to modify it a little to got it work in 2.9.


Thanks for that. I tried to take the jog wheel part to add to my config, but unfortunately, up to now, I've been using halui to handle jogging. That component doesn't have the jog-count pins. So my big question is, should I be using halui or motion/motmod to drive the jogging?

Please Log in or Create an account to join the conversation.

Time to create page: 0.355 seconds
Powered by Kunena Forum