On 2023-10-08 22:54:34+0530, Anshul Dalal wrote: > [..] > + > + input_report_abs(input, ABS_X, data.x); > + input_report_abs(input, ABS_Y, data.y); > + input_report_key(input, BTN_A, data.button_a); > + input_report_key(input, BTN_B, data.button_b); > + input_report_key(input, BTN_X, data.button_x); > + input_report_key(input, BTN_Y, data.button_y); FYI the button layout on this device is different from common commercial gamepads like XBox, Playstation and Logitech. This seems to be common to all gamepads from Adafruit. Adafruit: X Y A B Others: Y X B A In input-event-codes.h the symbol BTN_A actually maps to BTN_SOUTH, matching the common layout. But as you can see this is wrong for this device. (Same for BTN_B and BTN_EAST) Weirdly enough for BTN_X/BTN_NORTH and BTN_Y/BNT_WEST the aliasing is correct for Adafruit and wrong for the others. Not sure how to fix this correctly. Maybe the input maintainers know. > + input_report_key(input, BTN_START, data.button_start); > + input_report_key(input, BTN_SELECT, data.button_select); > + input_sync(input); > +}