Re: [PATCH v2] Input: Fix the HID usage of DPAD input event generation.

From: Chris Ye
Date: Wed Nov 04 2020 - 12:13:55 EST


Hi Benjamin,

   We are using hid driver to inject hid report for D-Pad and Hat switch events, like:

      [0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],

Check the HID format dump from kernel, this will send a 0x1 on HID usage GenericDesktop.HatSwitch.

Do you need me to help write the gamevice tests? I've not observed any regression from my side, as this patch is very specific to usage D-PadUp/Down/Left/Right.


Thanks!

Chris


On 11/3/20 9:36 AM, Benjamin Tissoires wrote:
I can emulate events for X,Y,
buttons,... but I am not sure how the gamepad sends the events for the
Hat switch and the D-Pad together.