tmk / tmk_keyboard

Keyboard firmwares for Atmel AVR and Cortex-M
3.99k stars 1.71k forks source link

USB interface of EXTRAKEY as a pointer device #696

Open tmk opened 3 years ago

tmk commented 3 years ago

Interface of EXTRAKEY(System and Consumer) is recognzied as a pointer device(mouse) on Xfce4/Xorg/Linux.

Report descriptor of Consumer Page causes this problem. https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/protocol/lufa/descriptor.c#L169-L180

    HID_RI_USAGE_PAGE(8, 0x0C), /* Consumer */
    HID_RI_USAGE(8, 0x01), /* Consumer Control */
    HID_RI_COLLECTION(8, 0x01), /* Application */
        HID_RI_REPORT_ID(8, REPORT_ID_CONSUMER),
        HID_RI_LOGICAL_MINIMUM(16, 0x0001),
        HID_RI_LOGICAL_MAXIMUM(16, 0x029C),
        HID_RI_USAGE_MINIMUM(16, 0x0001), /* +10 */
        HID_RI_USAGE_MAXIMUM(16, 0x029C), /* AC Distribute Vertically */
        HID_RI_REPORT_SIZE(8, 16),
        HID_RI_REPORT_COUNT(8, 1),
        HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_ARRAY | HID_IOF_ABSOLUTE),
    HID_RI_END_COLLECTION(0),

This includes some usages for pointer device probably, AC Pan(0x238) for example?