How can I map the switches of a joystick on Ubuntu linux?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How can I map the switches of a joystick on Ubuntu linux?
Hello,
I am wanting to try mapping the switches on a CH Throttle Pro joystick to act as keyboard keys.
My OS of choice is Ubuntu linux
-why-
I am trying to find a typing solution to use when lying flat on my back
speech isn`t an option, neither is maintaining a raised hand position so speech to text and almost all keyboards fail to qualify.
when upright I need to see where I am pressing to accurately type, when lying on my back this isn`t feasible.
-so-
The textured well separated keys of a throttle/flightstick seem well suited to typing without look at where fingers strike while being fully reclined.
* so far I have used dmesg to see that the throttle is recognised as being plugged in
$ dmesg|grep THROTTLE
[ 6413.129502] usb 1-8: Product: CH PRO THROTTLE USB
[ 6413.156721] input: CH PRODUCTS CH PRO THROTTLE USB as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-8/1-8:1.0/0003:068E:00F1.0002/input/input17
[ 6413.157019] hid-generic 0003:068E:00F1.0002: input,hidraw1: USB HID v1.00 Joystick [CH PRODUCTS CH PRO THROTTLE USB ] on usb-0000:01:00.0-8/input0
[19392.979246] usb 5-3: Product: CH PRO THROTTLE USB
[19392.990885] input: CH PRODUCTS CH PRO THROTTLE USB as /devices/pci0000:00/0000:00:07.1/0000:08:00.3/usb5/5-3/5-3:1.0/0003:068E:00F1.0003/input/input18
[19392.991082] hid-generic 0003:068E:00F1.0003: input,hidraw1: USB HID v1.00 Joystick [CH PRODUCTS CH PRO THROTTLE USB ] on usb-0000:08:00.3-3/input0
* and tried xev to check for response to switch presses = no responses to any throttle input, my keyboard and mouse show up fine
I don`t know where to start with recognising joystick input nor how to remap the switch responses to deliver keystrokes.
I would for testing also have a usb keyboard and usb mouse connected which I don`t want to misplace but rather have all three input devices functioning, the keyboard and throttle recognised for keystrokes.
showed my mouse and keyboard but no sign of the throttle
the dmesg shows them all fine, keyboard mounted as input/input2, the throttle as input/input3
Quote:
$ grep CH dmesg-March29th2019.txt
[ 1.452724] usb 5-3: Product: CH PRO THROTTLE USB
[ 1.452725] usb 5-3: Manufacturer: CH PRODUCTS
[ 1.821831] input: CH PRODUCTS CH PRO THROTTLE USB as /devices/pci0000:00/0000:00:07.1/0000:08:00.3/usb5/5-3/5-3:1.0/0003:068E:00F1.0001/input/input3
[ 1.821880] hid-generic 0003:068E:00F1.0001: input,hidraw0: USB HID v1.00 Joystick [CH PRODUCTS CH PRO THROTTLE USB ] on usb-0000:08:00.3-3/input0
[ 2629.604518] IPv6: ADDRCONF(NETDEV_CHANGE): enp4s0: link becomes ready
MyMachine:~$ grep keyboard dmesg-March29th2019.txt
[ 0.939028] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2
MyMachine:~$ grep mouse dmesg-March29th2019.txt
[ 0.918638] mousedev: PS/2 mouse device common for all mice
and xev shows no response to any switches on the throttle while responding freely to my keyboard and mouse
(all three devices are connected via usb direct to the rear panel of the motherboard, each of them with at least one led powered up).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.