Created attachment 77118 [details]
I have a Mionix Naos 5000 mouse, and according to hadess in #control-center, it is getting detected as a keyboard.
Steps to reproduce:
1. Plug the mouse in
2. Go to the mouse & touchpad settings in gnome >= 3.6
Mouse settings should be exposed
There are no mouse settings exposed
I'm not certain it gets detected as a keyboard, but it doesn't get tagged with XI_MOUSE, which means that we skipped the mouse section of the "mouse & touchpad" panel.
This is the output from xinput that I copied from Simon's pastebin:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ La-VIEW Technology Naos 5000 Mouse id=8 [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)]
↳ USB Keyboard id=9 [slave keyboard (3)]
↳ USB Keyboard id=10 [slave keyboard (3)]
Looking at the evtest output, it's not surprising. The mouse looks like a keyboard and we tag it as such. Problem here is that there are many _keyboards_ that have the same or roughly the same evtest output. Not sure a generic solution is possible here.
This is the product page for the device:
A notable feature is a programmable macro function. I suspect this is why keyboard key events are possible. If so, perhaps this problem is not localized to this device, but also present in other "gaming" mice?
I have also seen other devices which might be problematic, like a keyboard with an integrated touchpad. Is it possible for a single device to act like multiple types of devices simultaneously?
(I guess it's possible the mentioned keyboard acts as a usb hub with two devices attached, I wouldn't know about that)
(In reply to comment #4)
> I have also seen other devices which might be problematic, like a keyboard
> with an integrated touchpad. Is it possible for a single device to act like
> multiple types of devices simultaneously?
yes, and no :)
yes: devices can send pointer and keyboard events and the server will handle it accordingly.
no: the XI protocol spec allows for only one type-name, so a device will be either keyboard, touchpad, mouse, etc. in it's client-visible declination.
The problem here is largely that we don't know in the driver what a device is solely based on the events it sends. The only way to fix this I can see right now is to have this as a config option that's set in a quirk file.
Created attachment 77298 [details] [review]
Add option TypeName to be used by devices that need a quirk for the auto-assigned type. Example configuration:
Identifier "trackball type name"
Option "TypeName" "TRACKBALL" # XI_TRACKBALL
Author: Peter Hutterer <firstname.lastname@example.org>
Date: Tue Apr 2 14:12:26 2013 +1000
Add option TypeName (#62831)