From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Tomasz Pakuła" <tomasz.pakula.oficjalny@gmail.com>
Cc: bentiss@kernel.org, linux-input@vger.kernel.org,
Peter Hutterer <peter.hutterer@who-t.net>
Subject: Re: [PATCH] [v2] Input: increase max button number to 0x340
Date: Fri, 2 Aug 2024 16:58:31 -0700 [thread overview]
Message-ID: <Zq1ypyDxAVQsjpjB@google.com> (raw)
In-Reply-To: <20240802201001.406898-1-tomasz.pakula.oficjalny@gmail.com>
Hi Tomasz,
On Fri, Aug 02, 2024 at 10:09:40PM +0200, Tomasz Pakuła wrote:
> Hi. I can't seem to shake the feeling I'm being ignored here. I would love to
> get some input from you Dmitry, as this is an issue that was raised a few
> times throught the years and many times, it was left to wither, even with
> proper patches submitted and the reasoning explained.
>
> One might think of this as trivial, but this is kind of an ancient limitation
> and we ought to improve linux HID compatibility, especially since this is
> such an "easy" fix but still has to propagate throught the linux world.
>
> If I'm stepping out of the line, or something is really worng with my
> intention here then please let me know, but I know at least in 2020 there
> was a similar push to change this and after Wei Shuai explained his reasons
> he was similary ignored.
>
> Me? I just got a new Moza wheel and it too uses button above 80 so I can't
> make proper use of it :)
Sorry, I must have missed Wei's email and I was just trying to figure
out what to do here...
I understand that we have a limitation in the input layer for the number
of keys/buttons to support, but I wonder if input layer is the best way
of going through here. For the long time I was against an "anonymous" or
programmable buttons in the EV_KEY space. The reason is that we want
userspace to not care what device emits an event and act solely upon
what that event is. I.e. if a device emits KEY_A it should not matter if
it is an external USB keyboard, or internal PS/2 one or maybe it is
Chrome OS matrix keyboard connected to an embedded controller with it's
own protocol. Same goes for KEY_SCREENLOCK and others. Yes, we do have
multiple usages called "trigger happy" but I am not really happy about
them.
Additionally extending keys space is not free, we need to allocate
bitmaps, historically we run into issues with uevents being too big,
etc, etc.
I wonder if we can consider following alternatives:
1. Can we go through HID (/dev/hidraw) instead of input layer? I do not
think we will see such devices connected over anything but HID (BT or
USB).
2. Can we consider using something other than EV_KEY? For example we
could define EV_MSC/MSC_PROG_KEY and EV_MSC/MSG_PROG_VAL pair to allow
transmitting key number and state of keys that do not have pre-defined
meaning. Here we are losing event deduplication and ability to query
full keyboard state, but I wonder how important that is for the devices
in question.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2024-08-02 23:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACa7zykn0q9XJAUvrqnNATr4DUv3Kc7XujF3vm6sfRB5pE6YNQ>
2024-08-02 20:09 ` [PATCH] [v2] Input: increase max button number to 0x340 Tomasz Pakuła
2024-08-02 23:58 ` Dmitry Torokhov [this message]
2024-08-05 5:34 ` Peter Hutterer
2024-08-06 17:50 ` Tomasz Pakuła
2024-08-07 3:12 ` Peter Hutterer
2024-08-07 4:12 ` Dmitry Torokhov
2024-08-07 5:17 ` Peter Hutterer
2024-08-07 6:23 ` Tomasz Pakuła
2024-08-07 8:42 ` Wei Shuai
2024-08-07 19:01 ` Dmitry Torokhov
2024-08-07 20:22 ` Tomasz Pakuła
2024-08-07 21:07 ` Dmitry Torokhov
2024-08-08 7:46 ` Tomasz Pakuła
2024-08-08 16:42 ` Tomasz Pakuła
2024-08-16 0:58 ` Peter Hutterer
2024-08-08 23:00 ` Peter Hutterer
2024-08-07 23:33 ` Peter Hutterer
2024-07-30 11:17 Tomasz Pakuła
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=Zq1ypyDxAVQsjpjB@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=bentiss@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=peter.hutterer@who-t.net \
--cc=tomasz.pakula.oficjalny@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.