Re: [RFC PATCH 0/6] Input: New EV_BTN event for generic buttons

From: Ivan Gorinov

Date: Wed Jan 07 2026 - 00:44:45 EST


On Sun, Jan 04, 2026 at 10:31:26PM +0100, Tomasz Pakuła wrote:

> I'm eagerly waiting for comments, recommendations and critique. Currently, there
> isn't a way to poll states of all buttons like with EVIOCGKEY but I'm not sure
> if it's needed? I added INPUT_MAX_KEYS just for some sane limits BUT I don't see
> a real use for it. Instead of this define, we could just use U16_MAX. 65k of
> buttons ought to be enough for ANYBODY :D

If I understand correctly, EVIOCGKEY is the only way to read initial state of buttons
and switches when the input device is opened with /dev/input/event# interface.

Legacy /dev/input/js# interface sends those initial states immediately after openeing
as JS_EVENT_BUTTON | JS_EVENT_INIT event type.