Raphael Kubo da Costa
822a51b396
bthidd: Consider usage ranges when dealing with array inputs.
...
So far, we were always using HID_USAGE() to determine the Usage ID of a
certain HID report input item. This does not work as intended if a field
is an array and the allowed usages are specified with a usage range, as
HID_USAGE() will return 0. We need to use the field value as an index in
the usage range list in this case instead.
This makes the volume keys in a Microsoft Bluetooth Mobile Keyboard
5000 be properly recognized. The relevant part of the HID report looks
like this:
0xA1, 0x01, // Collection (Application)
0x85, 0x07, // Report ID (7)
0x05, 0x0C, // Usage Page (Consumer)
0x19, 0x00, // Usage Minimum (Unassigned)
0x2A, 0xFF, 0x03, // Usage Maximum (0x03FF)
0x95, 0x01, // Report Count (1)
0x75, 0x10, // Report Size (16)
0x15, 0x00, // Logical Minimum (0)
0x27, 0xFF, 0x03, 0x00, 0x00, // Logical Maximum (1023)
0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred
// State,No Null Position)
When a key such as "volume down" is pressed, the following data is
transferred through Interrupt In:
0x07 0xEA 0x00
Differential Revision: https://reviews.freebsd.org/D2229
Reviewed by: emax
Approved by: emax
MFC after: 1 week
2015-04-05 18:53:48 +00:00
..
2015-02-18 20:33:00 +00:00
2014-06-20 09:57:27 +00:00
2015-01-02 18:45:03 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-04-02 18:18:40 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-03-13 12:44:46 +00:00
2015-04-01 20:36:07 +00:00
2015-01-18 03:08:30 +00:00
2014-11-25 16:57:27 +00:00
2015-02-16 20:55:37 +00:00
2015-04-05 18:53:48 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2015-03-31 21:34:42 +00:00
2015-04-01 02:05:26 +00:00
2014-12-26 21:56:23 +00:00
2014-08-19 15:04:32 +00:00
2014-11-25 16:57:27 +00:00
2014-12-14 16:17:48 +00:00
2014-07-17 06:57:26 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-01-29 22:49:30 +00:00
2014-06-20 13:13:38 +00:00
2013-12-25 15:23:01 +00:00
2014-11-28 22:03:35 +00:00
2015-03-27 19:34:24 +00:00
2015-02-12 11:27:54 +00:00
2015-04-04 20:55:47 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-02-16 02:20:11 +00:00
2015-02-05 22:42:44 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-10-29 18:01:09 +00:00
2014-09-28 11:32:46 +00:00
2014-06-20 09:57:27 +00:00
2014-11-28 22:03:35 +00:00
2015-02-13 23:57:20 +00:00
2015-03-12 06:41:01 +00:00
2015-01-14 11:26:03 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2015-03-08 21:11:08 +00:00
2015-02-13 18:34:04 +00:00
2014-11-25 16:57:27 +00:00
2014-09-13 02:15:31 +00:00
2014-11-12 03:59:26 +00:00
2015-02-19 22:42:33 +00:00
2014-11-25 16:57:27 +00:00
2015-01-23 15:55:03 +00:00
2015-03-01 02:45:46 +00:00
2014-11-25 16:57:27 +00:00
2015-02-12 11:57:31 +00:00
2015-03-22 20:38:28 +00:00
2014-11-25 16:57:27 +00:00
2015-02-22 00:00:10 +00:00
2014-12-29 13:50:59 +00:00
2014-08-26 10:55:08 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2015-01-15 00:46:30 +00:00
2014-11-25 16:57:27 +00:00
2014-12-17 07:10:48 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-01-12 19:26:31 +00:00
2014-11-25 16:57:27 +00:00
2014-07-07 00:27:09 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-02-10 18:00:32 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-05-06 04:22:01 +00:00
2015-01-16 21:39:08 +00:00
2014-12-26 21:56:23 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-07-18 06:48:02 +00:00
2014-10-08 17:44:30 +00:00
2015-01-01 06:53:33 +00:00
2014-12-26 21:56:23 +00:00
2015-01-16 18:51:26 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-03-30 13:30:15 +00:00
2014-06-20 09:57:27 +00:00
2015-01-16 18:42:49 +00:00
2015-02-12 05:35:00 +00:00
2015-03-01 00:59:35 +00:00
2014-06-20 09:57:27 +00:00
2015-04-03 17:35:30 +00:00
2014-06-20 09:57:27 +00:00
2015-02-22 14:45:00 +00:00
2015-03-28 21:28:22 +00:00
2015-03-26 15:54:54 +00:00
2015-01-02 21:02:41 +00:00
2015-03-20 15:07:05 +00:00
2015-02-04 06:53:45 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-02-24 22:22:06 +00:00
2014-02-06 09:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-08-20 17:27:15 +00:00
2015-01-19 00:33:32 +00:00
2015-01-19 00:33:32 +00:00
2014-12-26 21:56:23 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-12-26 21:56:23 +00:00
2014-12-26 21:56:23 +00:00
2014-06-20 09:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-06-28 15:53:28 +00:00
2015-01-28 22:22:49 +00:00
2014-11-25 16:57:27 +00:00
2014-07-16 19:02:30 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-09-01 16:12:29 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-03-03 20:23:59 +00:00
2015-03-05 05:54:34 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2015-01-07 19:55:18 +00:00
2014-03-16 04:09:22 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-05-06 04:22:01 +00:00
2014-11-25 16:57:27 +00:00
2015-02-26 15:48:20 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2015-01-05 15:09:00 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-10-23 12:38:05 +00:00
2014-12-14 16:40:46 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-08-25 05:52:05 +00:00
2014-11-25 16:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-06-20 09:57:27 +00:00
2014-11-25 16:57:27 +00:00
2014-06-19 13:18:23 +00:00
2015-03-01 00:52:41 +00:00
2015-01-26 06:44:48 +00:00
2014-10-18 08:07:17 +00:00