public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Input: change joystick 80 buttons limitation
@ 2026-02-09 13:36 Ricardo Esteves
  2026-02-09 20:08 ` Ivan Gorinov
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Esteves @ 2026-02-09 13:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-input, dmitry.torokhov, ricardo.lopes.esteves


[-- Attachment #1.1.1: Type: text/plain, Size: 1389 bytes --]

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 #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3207 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: change joystick 80 buttons limitation
  2026-02-09 13:36 [PATCH] Input: change joystick 80 buttons limitation Ricardo Esteves
@ 2026-02-09 20:08 ` Ivan Gorinov
  0 siblings, 0 replies; 2+ messages in thread
From: Ivan Gorinov @ 2026-02-09 20:08 UTC (permalink / raw)
  To: Ricardo Esteves; +Cc: linux-kernel, linux-input, dmitry.torokhov

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-09 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-09 13:36 [PATCH] Input: change joystick 80 buttons limitation Ricardo Esteves
2026-02-09 20:08 ` Ivan Gorinov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox