[PATCH] Input: change joystick 80 buttons limitation
From: Ricardo Esteves
Date: Mon Feb 09 2026 - 08:36:53 EST
Currently linux joystick support is limited to 80 buttons.
The default value for the max scan code that a key/button can have in the linux kernel is 0x2ff (767), which is equivalent to 80 keys/buttons.
The value i propose in the bellow patch is 0x31d (797) which is +30 buttons, so a max of 110 keys/buttons.
Works perfectly with WINWING Orion Throttle Base II + F15EX HANDLE, all 110 buttons are recognized (is the joystick i found to have the biggest amount of buttons so far).
--- a/include/linux/mod_devicetable.h 2025-11-14 16:31:54.542228221 +0100
+++ a/include/linux/mod_devicetable.h 2025-11-02 01:00:00.000000000 +0100
@@ -333,7 +333,7 @@
/* Input */
#define INPUT_DEVICE_ID_EV_MAX 0x1f
#define INPUT_DEVICE_ID_KEY_MIN_INTERESTING 0x71
-#define INPUT_DEVICE_ID_KEY_MAX 0x2ff
+#define INPUT_DEVICE_ID_KEY_MAX 0x31d
#define INPUT_DEVICE_ID_REL_MAX 0x0f
#define INPUT_DEVICE_ID_ABS_MAX 0x3f
#define INPUT_DEVICE_ID_MSC_MAX 0x07
--- a/include/uapi/linux/input-event-codes.h 2025-11-02 01:00:00.000000000 +0100
+++ a/include/uapi/linux/input-event-codes.h 2025-11-14 16:34:37.218263985 +0100
@@ -817,7 +817,7 @@
/* We avoid low common keys in module aliases so they don't get huge. */
#define KEY_MIN_INTERESTING KEY_MUTE
-#define KEY_MAX 0x2ff
+#define KEY_MAX 0x31d
#define KEY_CNT (KEY_MAX+1)
/*
Attachment:
OpenPGP_0x9DCA12A350F395E0.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature