mirror of
https://review.haiku-os.org/haiku
synced 2025-02-01 03:06:08 +01:00
usb_hid: do not publish a keyboard device when a mouse is connected
My trackball has a "system control" in its descriptor, but is definitely not a keyboard. This results in an extra entry in Input preferences for it. If we actually want to accept input from such devices, we should scan them more closely to check there is actually a valid input there, and consider publishing them as something else than keyboards, because that's not really suitable in Input preferences. Change-Id: I9027454b3b24d0f39ea562aed851402d0be7aeb4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2715 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
47bf2e3878
commit
c12c97a6f1
@ -188,7 +188,13 @@ KeyboardProtocolHandler::AddHandlers(HIDDevice &device,
|
||||
switch (collection.UsageID()) {
|
||||
case B_HID_UID_GD_KEYBOARD:
|
||||
case B_HID_UID_GD_KEYPAD:
|
||||
#if 0
|
||||
// This is not specific enough to deserve a keyboard device on
|
||||
// its own (some mice have one such descriptor, for example).
|
||||
// If your keyboard uses this, do a more extensive check of
|
||||
// the descriptor to make sure there actually are keys in it.
|
||||
case B_HID_UID_GD_SYSTEM_CONTROL:
|
||||
#endif
|
||||
handled = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user