Changes between Initial Version and Version 9 of Ticket #16647


Ignore:
Timestamp:
Dec 9, 2020, 5:13:22 PM (4 years ago)
Author:
pulkomandy
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16647

    • Property Cc mmlr added
    • Property Component Drivers/USBDrivers/Input/USB-HID
    • Property Keywords usb_hid removed
    • Property Owner changed from mmlr to nobody
  • Ticket #16647 – Description

    initial v9  
    11So it seems that some usb keyboards are not working on Haiku because they send keystroke reports using a bitmap instead of the more common way of using arrays. Perhaps, I should have opened a bug ticket with this... Instead, I have ended trying to fix myself, and I almost done, but I am blocked by a bug.
    22
    3 The report descriptor, from what I understand, defines a 8 bit constant padding and a 112 bit with current keystroke status. Whenever I press key ''A'', with usage 0x04, I get an ''I'', with usage 0x0C, and so on with ''B,C,D,...'' So it seems that padding is not being honored.
     3~~The report descriptor, from what I understand, defines a 8 bit constant padding and a 112 bit with current keystroke status. Whenever I press key ''A'', with usage 0x04, I get an ''I'', with usage 0x0C, and so on with ''B,C,D,...'' So it seems that padding is not being honored.~~
    44
    55**disclaimer:** I am not a usb hid guru and I may have done some wrong assumptions
     6
     7**Correct explanation**
     8
     9The report defines two successive usage pages (E0 to E7 and then 00 to 67). The HID spec says these should each consume the corresponding number of bits from the report, but our parser instead erases the values from the first usage page with the values from the second one.
     10
     11This results in all key sending incorrect key codes. The key that should be E0 is now 00, E1 is 01, ... E7 is 07, and then 00 becomes 08.
     12
     13Our HID parser must be adjusted to handle multiple usage ranges and correctly assign the keycodes.