Re: Using EV_MSC or extending KEY_*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 15 Sep 2009, Rick L. Vinyard, Jr. wrote:
> As I understand it the EV_MSC/MSC_SCAN is used to trigger a prompting of
> the user to map a key, which would be useful for the G1-G22 keys and
> perhaps 5 of the 10 special keys. But, that's not the behavior I want for
> the M1, M2, M3, MR and backlight keys.

Why?

> Somehow they need to be distinct from any existing KEY_* codes or not have
> a code at all... i.e. only emitting the raw misc events.

Use KEY_RESERVED for them and in your driver, special case it to not output
EV_KEY events for KEY_RESERVED, but still output the EV_MSC/MSC_SCAN.

This allows userspace to reprogram them to normal keys (or even to
KEY_UNKNOWN) if it wants.

> Perhaps the BTN_MISC codes are better suited for these keys?

That could work too, but are these generic buttons?

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux