mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ricardo Esteves <ricardo.lopes.esteves@oracle.com>
To: linux-kernel@vger.kernel.org
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
	ricardo.lopes.esteves@oracle.com
Subject: [PATCH] Input: change joystick 80 buttons limitation
Date: Mon, 9 Feb 2026 14:36:12 +0100	[thread overview]
Message-ID: <fc66f27b-9a73-4a71-8dbe-f48609719d90@oracle.com> (raw)


[-- 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 --]

             reply	other threads:[~2026-02-09 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 13:36 Ricardo Esteves [this message]
2026-02-09 20:08 ` Ivan Gorinov

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=fc66f27b-9a73-4a71-8dbe-f48609719d90@oracle.com \
    --to=ricardo.lopes.esteves@oracle.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®