[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <fc66f27b-9a73-4a71-8dbe-f48609719d90@oracle.com>
Date: Mon, 9 Feb 2026 14:36:12 +0100
From: Ricardo Esteves <ricardo.lopes.esteves@...cle.com>
To: linux-kernel@...r.kernel.org
Cc: linux-input@...r.kernel.org, dmitry.torokhov@...il.com,
ricardo.lopes.esteves@...cle.com
Subject: [PATCH] Input: change joystick 80 buttons limitation
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)
/*
Download attachment "OpenPGP_0x9DCA12A350F395E0.asc" of type "application/pgp-keys" (3156 bytes)
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (841 bytes)
Powered by blists - more mailing lists