[PATCH] Input: change joystick 80 buttons limitation

Ricardo Esteves posted 1 patch 14 hours ago
[PATCH] Input: change joystick 80 buttons limitation
Posted by Ricardo Esteves 14 hours ago
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)

  /*


Re: [PATCH] Input: change joystick 80 buttons limitation
Posted by Ivan Gorinov 8 hours ago
On 2026-02-09 05:36, Ricardo Esteves wrote:

> Currently linux joystick support is limited to 80 buttons.
> The default value for the max scan code that a key/button can hav
e 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).

That device will be supported in 6.19, including LED controls. I have 
also posted a patch to enable rumble feedback.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-winwing.c?h=v6.19