How to change USB device type

Hi!

I’ve been having this issue for a few months. I have a Keychron Q1 keyboard with a Knob. In the past the knob was recognized as part of the keyboard and was used for media control (volume and play/pause).
Lately, (I don’t know maybe a couple of months?) my system both before last reinstall and now, is detecting that same device as:

Bus 001 Device 005: ID 3434:0109 Keychron Keychron Q1

But KDE Plasma settings detects:

Mouse panel > Keychron Keychron Q1 Consumer Control
Mouse panel > Keychron Keychron Q1 Mouse
Game controller panel > Keychron Q1 System Control (/dev/input/event9

This completely disrupts device mapping in gaming, like Steam and retroarch because the knob is not a game controller but alphabetically appears before “Wireless Controller” which is the default name of the “Sony Dualsense” in linux.

Any input is appreciated.

What do the following commands report when the device plugged in?
sudo dmesg -w
usb-devices

https://paste.opensuse.org/pastes/19a46e871d83

https://paste.opensuse.org/pastes/e2b0a3550b7b

I was hoping that you’d just snip the relevant parts of the output. Anyway, the Keychron device is reported here (as three HID devices)…

T:  Bus=01 Lev=01 Prnt=04 Port=07 Cnt=01 Dev#=  5 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=3434 ProdID=0109 Rev=02.04
S:  Manufacturer=Keychron
S:  Product=Keychron Q1
C:  #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=1ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=03(O) Atr=03(Int.) MxPS=  32 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=  32 Ivl=1ms
I:  If#= 2 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=84(I) Atr=03(Int.) MxPS=  32 Ivl=1ms

You can’t change the USB device type as such, but I guess you mean how the device is handled at a higher level by libinput perhaps.

Show

udevadm info --export-db
1 Like

Sorry, I didn’t know what you were looking for specifically.
I also forgot to mention the Keychron Q1 is ALSO detected as a mouse in the Plasma System Settings mouse panel.

https://paste.opensuse.org/pastes/8d3673ddde4d

P: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/usb1/1-8/1-8:1.2/0003:3434:0109.000C/input/input9
...
E: NAME="Keychron Keychron Q1 System Control"
...
E: KEY=c000 0 0 40000001000000 1200000000 0 100000800000000 40000010cc00 10168000000000 0
E: ABS=10000030000
...
E: ID_INPUT_JOYSTICK=1
E: ID_INPUT_KEY=1

Whatever is inside your device claims that it has absolute positioning and joystick buttons, so for all practical purposes it is joystick. Maybe it is possible to configure your device to not advertise this.

It may be possible to override it using hwdb (see man hwdb.d), or it may be possible to make libinput to ignore this device.

Finally it may be possible to configure your applications to ignore it.

I will look at hwdb and libinput, but it may take some time. Maybe someone will offer a solution in the meantime.

Well, your device says it has mouse. Do not blame the messenger.

This may be of interest to the OP…

It’s setup in Plasma 6 System Settings as generic 105-key keyboard and unfortunately it’s not affecting anything. This wasn’t even noticeable a few weeks ago. I recall now, after reinstalling Tumbleweed 3 weeks ago this started happening, before that I was on a Tumbleweed installation that had other issues but the keyboard had never been detected as 2 separate game controllers/mice.

Apparently this is a bug that still has to be fully addressed:

https://web.git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git/commit/?h=for-next&id=1989dada7ce07848196991c9ebf25ff9c5f14d4e

https://bbs.archlinux.org/viewtopic.php?id=190485
https://forums.gentoo.org/viewtopic-t-362032.html

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.