From: "Rick L. Vinyard, Jr." <rvinyard-qcTL/1vZYtiVc3sceRu5cw@public.gmane.org>
To: Dmitry Torokhov
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Henrique de Moraes Holschuh
<hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>,
Trilok Soni <soni.trilok-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Linux USB <linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Using EV_MSC or extending KEY_*
Date: Fri, 18 Sep 2009 09:40:23 -0600 [thread overview]
Message-ID: <4d6ae6e7ee9b38f99e38d357dc755d64.squirrel@intranet.cs.nmsu.edu> (raw)
In-Reply-To: <20090918064627.GG18668-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
Dmitry Torokhov wrote:
> On Thu, Sep 17, 2009 at 02:57:07PM -0300, Henrique de Moraes Holschuh
> wrote:
>> On Wed, 16 Sep 2009, Rick L. Vinyard, Jr. wrote:
>> > The M* keys are intended to provide a quick way to switch between key
>> > mappings, with each mode having their own user-defined mappings.
>>
>> What I'd do in this case would be this:
>>
>> 1. Initially have the M* level-shift keys assigned KEY_RESERVED
>>
>> 2. Have a big enough keymap to map all keys in all M*-level shift states
>> possible.
>>
>> Eg:
>> START OF KEYMAP
>> M* keys
>> 1st set of G* keys
>> 2nd set of G* keys
>> 3rd set of G* keys...
>> ...
>> last set of G* keys
>> END OF KEYMAP
>>
>> 3. Have the driver special-process M* level-shift keys *as long as they
>> are
>> still set to KEY_RESERVED* to select which part of the keymap is used to
>> translate the other keys. Note that this likely means pressing a M* key
>> would be transparent to userspace in this case, i.e. no events would be
>> issued when a M* key is doing a level shift.
>>
>> So, you'd be able to set all mappings you want in the driver, and the M*
>> keys would do what they're expected to do without any userland help at
>> all,
>> but you'd still be able to program the M* keys to be normal keys if you
>> want.
>>
>> Of course, this assumes you don't do chording on multiple M* keys to end
>> up
>> with a huge number of keymaps :p
>>
>
> Actually I think that the device should just emit KEY_PROG1..KEY_PROG4
> for the M keys and have userspace daemon load alternate keymaps on the
> fly in resaponse to KEY_PROGx. The device is just a set of completely
> generic buttons... User will have to tell the kernel what to map them
> to.
>
Emitting a keycode certainly does simplify things, but that will preclude
the user from programming the G-keys to KEY_PROG1..KEY_PROG4.
Are there any specific use cases where a user would want to program a
G-key to KEY_PROG1..KEY_PROG4?
---
Rick
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-09-18 15:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <aac07123ee2b14a0ac25d1652dbe0780.squirrel@intranet.cs.nmsu.edu>
2009-09-15 17:11 ` Using EV_MSC or extending KEY_* Trilok Soni
[not found] ` <5d5443650909151011k4b21a6d0n28ac6142c3d7161d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-15 18:34 ` Dmitry Torokhov
[not found] ` <20090915183406.GA5696-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
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.
[not found] ` <20090918135601.GA25109-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org>
2009-09-28 17:03 ` Dmitry Torokhov
[not found] ` <20090918064627.GG18668-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2009-09-18 15:40 ` Rick L. Vinyard, Jr. [this message]
2009-09-28 17:03 ` Dmitry Torokhov
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=4d6ae6e7ee9b38f99e38d357dc755d64.squirrel@intranet.cs.nmsu.edu \
--to=rvinyard-qctl/1vzytivc3sceru5cw@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=soni.trilok-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).