From: Shehriyar Qureshi <thatdevsherry@gmail.com>
To: linux-input@vger.kernel.org
Cc: jikos@kernel.org, bentiss@kernel.org
Subject: hid: dragonrise: map gamepad buttons to BTN_GAMEPAD?
Date: Sun, 2 Aug 2026 14:00:30 +0500 [thread overview]
Message-ID: <am8GOnuoT_7Q3jr1@thatdevsherry.pk> (raw)
Hi,
I have a Ucom ps2-style usb game controller.
I noticed that the controller exposes BTN_JOYSTICK events rather than
BTN_GAMEPAD. I first noticed this when using raylib/glfw, which treats
BTN_GAMEPAD events as standard gamepad buttons.
One possible solution would be in userspace. However, I was wondering
whether `dragonrise` should remap it to BTN_GAMEPAD codes or if the
existing joystick mapping is intentional.
I understand that mapping based on the HID descriptor to joystick
events is expected behaviour, but I was wondering if this device should
be treated differently because it is physically a gamepad.
Sharing details of hardware below.
Hardware:
=========
Controller: DragonRise Inc. PC TWIN SHOCK Gamepad
USB ID: 0079:0006
Kernel log:
===========
$ dmesg | grep -E "Microntek|dragonrise"
[ 2.268782] usb 1-3: Manufacturer: Microntek
[ 3.653949] input: Microntek USB Joystick as /devices/pci0000:00/0000:00:02.1/0000:02:00.0/0000:03:0c.0/0000:09:00.0/usb1/1-3/1-3:1.0/0003:0079:0006.0001/input/input7
[ 3.654013] dragonrise 0003:0079:0006.0001: input,hidraw4: USB HID v1.10 Joystick [Microntek USB Joystick ] on usb-0000:09:00.0-3/input0
[ 3.654018] dragonrise 0003:0079:0006.0001: Force Feedback for DragonRise Inc. game controllers by Richard Walmsley <richwalm@gmail.com>
USB info:
=========
$ lsusb
Bus 001 Device 003: ID 0079:0006 DragonRise Inc. PC TWIN SHOCK Gamepad
$ lsusb -t
|__ Port 003: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
HID descriptor:
===============
when bound to the `dragonrise` driver.
$ hid-decode /sys/bus/hid/devices/0003:0079:0006.0001/report_descriptor
# device 0:0
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x04, // Usage (Joystick) 2
...
evtest reports:
===============
$ evtest
Input device ID: bus 0x3 vendor 0x79 product 0x6 version 0x110
Input device name: "Microntek USB Joystick "
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 288 (BTN_TRIGGER)
Event code 289 (BTN_THUMB)
Event code 290 (BTN_THUMB2)
Event code 291 (BTN_TOP)
Event code 292 (BTN_TOP2)
Event code 293 (BTN_PINKIE)
Event code 294 (BTN_BASE)
Event code 295 (BTN_BASE2)
Event code 296 (BTN_BASE3)
Event code 297 (BTN_BASE4)
Event code 298 (BTN_BASE5)
Event code 299 (BTN_BASE6)
...
for comparison, this is evtest report for the xbox style controller.
$ evtest
Input device ID: bus 0x3 vendor 0x45e product 0x28e version 0x110
Input device name: "Microsoft X-Box 360 pad"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 304 (BTN_SOUTH)
Event code 305 (BTN_EAST)
Event code 307 (BTN_NORTH)
Event code 308 (BTN_WEST)
Event code 310 (BTN_TL)
Event code 311 (BTN_TR)
Event code 314 (BTN_SELECT)
Event code 315 (BTN_START)
Event code 316 (BTN_MODE)
Event code 317 (BTN_THUMBL)
Event code 318 (BTN_THUMBR)
...
reply other threads:[~2026-08-02 9:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=am8GOnuoT_7Q3jr1@thatdevsherry.pk \
--to=thatdevsherry@gmail.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.