mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Using EV_MSC or extending KEY_*
@ 2009-09-15 16:19 Rick L. Vinyard, Jr.
  2009-09-15 17:11 ` Trilok Soni
  0 siblings, 1 reply; 15+ messages in thread
From: Rick L. Vinyard, Jr. @ 2009-09-15 16:19 UTC (permalink / raw)
  To: Linux USB, LKML

On the Logitech G13 there are a set of 10 special keys at the top of the
device.

I've written the driver so that it maintains a map from the general keys
(G1-G22) to Linux' input subsystem keys.

The map can be changed on the fly, allowing multiple keymaps to be loaded.

As a side note I haven't provided for this functionality (multiple
keymaps) in the driver since this can be maintained from userspace, but it
does need to know about the currently loaded keymap so that when the raw
HID events are parsed the appropriate EV_KEY events can be input.

I could set it up so that the special keys also map to a KEY_* code.
However, I'd prefer to set things up so that any G1-G22 key can be mapped
to any input subsystem KEY_* code and not reserve a set of 10 from the
current KEY_* codes for the 10 special keys.

One way I was thinking of approaching this was to generate EV_MSC type
events (with a MSC_RAW code) using the value to indicate the state
(pressed/released) and special key.

Another way to approach this would be to extend the KEY_* #defines with a
special set of 10 codes for the 10 special keys.

Any suggestions on the better approach?

Thanks,

Rick



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

end of thread, other threads:[~2009-09-28 17:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15 16:19 Using EV_MSC or extending KEY_* Rick L. Vinyard, Jr.
2009-09-15 17:11 ` Trilok Soni
2009-09-15 18:34   ` Dmitry Torokhov
2009-09-15 19:05     ` Rick L. Vinyard, Jr.
2009-09-16  2:19       ` Henrique de Moraes Holschuh
2009-09-16 21:27         ` Rick L. Vinyard, Jr.
2009-09-16  3:46       ` Dmitry Torokhov
2009-09-16 21:27         ` Rick L. Vinyard, Jr.
2009-09-17 17:57           ` Henrique de Moraes Holschuh
2009-09-18  6:46             ` Dmitry Torokhov
2009-09-18 13:56               ` Henrique de Moraes Holschuh
2009-09-18 16:00                 ` Rick L. Vinyard, Jr.
2009-09-28 17:03                 ` Dmitry Torokhov
2009-09-18 15:40               ` Rick L. Vinyard, Jr.
2009-09-28 17:03                 ` Dmitry Torokhov

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®