All of lore.kernel.org
 help / color / mirror / Atom feed
* increasing LED_MAX and INPUT_DEVICE_ID_LED_MAX?
@ 2016-12-22 21:03 Lars R. Damerow
  2016-12-28 18:56 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Lars R. Damerow @ 2016-12-22 21:03 UTC (permalink / raw)
  To: linux-input

Hello,

I'm trying to use a range of P. I. Engineering's X-keys (like this one: http://xkeys.com/xkeys/xk60.php) on Linux.

The XK-60 mostly works when it's plugged in, but buttons on the last four columns don't do anything. I figured out that this is because of how the events get coded in the input system. Button events from the XK-60's generic event device are marked as type EV_LED, and the event code seems to represent the button's column on the device, starting at 10 for the leftmost column.

Since LED_MAX is set to 0x0f, only the first six columns of buttons can report events, and the remaining columns set their code higher than LED_MAX, causing the input system to drop those events.

I patched my kernel to increase LED_MAX and INPUT_DEVICE_ID_LED_MAX to 0x20, and after that all of the XK-60's buttons worked.

Would it be acceptable to make this change upstream, or should this problem be solved a different way (e.g., tweaking the events so that they're EV_KEY instead of EV_LED, though I wouldn't want them to autorepeat)?

Thanks!
-lars

--
lars r. damerow :: button pusher :: pixar animation studios

https://keybase.io/ldamerow
F29F 160D B23C 3237 1BA3 FCD5 4E13 C775 36B3 ABCA

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

* Re: increasing LED_MAX and INPUT_DEVICE_ID_LED_MAX?
  2016-12-22 21:03 increasing LED_MAX and INPUT_DEVICE_ID_LED_MAX? Lars R. Damerow
@ 2016-12-28 18:56 ` Dmitry Torokhov
  2017-01-03 20:26   ` Lars R. Damerow
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2016-12-28 18:56 UTC (permalink / raw)
  To: Lars R. Damerow; +Cc: linux-input

Hi Lars,

On Thu, Dec 22, 2016 at 1:03 PM, Lars R. Damerow <lars@pixar.com> wrote:
> Hello,
>
> I'm trying to use a range of P. I. Engineering's X-keys (like this one: http://xkeys.com/xkeys/xk60.php) on Linux.
>
> The XK-60 mostly works when it's plugged in, but buttons on the last four columns don't do anything. I figured out that this is because of how the events get coded in the input system. Button events from the XK-60's generic event device are marked as type EV_LED, and the event code seems to represent the button's column on the device, starting at 10 for the leftmost column.
>
> Since LED_MAX is set to 0x0f, only the first six columns of buttons can report events, and the remaining columns set their code higher than LED_MAX, causing the input system to drop those events.
>
> I patched my kernel to increase LED_MAX and INPUT_DEVICE_ID_LED_MAX to 0x20, and after that all of the XK-60's buttons worked.
>
> Would it be acceptable to make this change upstream, or should this problem be solved a different way (e.g., tweaking the events so that they're EV_KEY instead of EV_LED, though I wouldn't want them to autorepeat)?

No, we do not want to extend LED range to allow device report buttons
as leds. You need to teach hid-input to parse the descriptors better
for your device.

Thanks.

-- 
Dmitry

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

* Re: increasing LED_MAX and INPUT_DEVICE_ID_LED_MAX?
  2016-12-28 18:56 ` Dmitry Torokhov
@ 2017-01-03 20:26   ` Lars R. Damerow
  0 siblings, 0 replies; 3+ messages in thread
From: Lars R. Damerow @ 2017-01-03 20:26 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input

>From Dmitry Torokhov <dmitry.torokhov@gmail.com>, Wed, Dec 28, 2016 at 10:56:17AM -0800:
> Hi Lars,
> 
> No, we do not want to extend LED range to allow device report buttons
> as leds. You need to teach hid-input to parse the descriptors better
> for your device.

Sounds good. Thanks!
-lars

--
lars r. damerow :: button pusher :: pixar animation studios

https://keybase.io/ldamerow
F29F 160D B23C 3237 1BA3 FCD5 4E13 C775 36B3 ABCA

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

end of thread, other threads:[~2017-01-03 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-22 21:03 increasing LED_MAX and INPUT_DEVICE_ID_LED_MAX? Lars R. Damerow
2016-12-28 18:56 ` Dmitry Torokhov
2017-01-03 20:26   ` Lars R. Damerow

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.