All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lars R. Damerow" <lars@pixar.com>
To: linux-input@vger.kernel.org
Subject: increasing LED_MAX and INPUT_DEVICE_ID_LED_MAX?
Date: Thu, 22 Dec 2016 13:03:07 -0800	[thread overview]
Message-ID: <20161222210306.GE8919@pixar.com> (raw)

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

             reply	other threads:[~2016-12-22 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-22 21:03 Lars R. Damerow [this message]
2016-12-28 18:56 ` increasing LED_MAX and INPUT_DEVICE_ID_LED_MAX? Dmitry Torokhov
2017-01-03 20:26   ` Lars R. Damerow

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=20161222210306.GE8919@pixar.com \
    --to=lars@pixar.com \
    --cc=linux-input@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 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.