From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Jarod Wilson <jarod@wilsonet.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent
Date: Mon, 24 Jan 2011 14:08:46 -0200 [thread overview]
Message-ID: <4D3DA40E.8040901@redhat.com> (raw)
In-Reply-To: <364852AD-6BC8-40FD-97D0-0BF8AD0DC6C2@wilsonet.com>
Em 24-01-2011 13:45, Jarod Wilson escreveu:
> On Jan 24, 2011, at 10:18 AM, Mauro Carvalho Chehab wrote:
>
>> Using xev and testing the "Windows" key on a normal keyboard, it
>> is mapped as KEY_LEFTMETA. So, as this is the standard code for
>> it, use it, instead of a generic, meaningless KEY_PROG1.
>
> Not sure I agree with this change, or at least, not with using
> KEY_LEFTMETA. The Window MCE key isn't quite analogous to the Windows
> key on a keyboard. Under Windows, I'm pretty sure its a program
> launcher key, that launches (or switches you to) the Windows Media
> Center UI.
If you look from userspace perspective, an application that will use
the media keycodes need to have a proper behaviour for each of the
received keys.
The idea is that each media key should be translated into a X key.
My idea is to add something like:
#define XK_10channelsdown 0xfc00 /* KEY_10CHANNELSDOWN */
#define XK_10channelsup 0xfc01 /* KEY_10CHANNELSUP */
#define XK_Ab 0xfc02 /* KEY_AB */
#define XK_Again 0xfc03 /* KEY_AGAIN */
#define XK_Angle 0xfc04 /* KEY_ANGLE */
#define XK_Audio 0xfc05 /* KEY_AUDIO */
#define XK_Aux 0xfc06 /* KEY_AUX */
...
to /usr/include/X11/keysymdef.h and use those new symbol internals
inside the media userspace applications.
However, for this to work, for each of the used codes, an specific
behavior should be used by the media applications.
If we look on the places that use KEY_PROG1, we have (before this patch series):
$ git grep KEY_PROG1 drivers/media/
drivers/media/dvb/dvb-usb/a800.c: { 0x0201, KEY_PROG1 }, /* SOURCE */
drivers/media/rc/imon.c: { 0x000000000f00ffeell, KEY_PROG1 }, /* Go */
drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c: { 0x03, KEY_PROG1 }, /* 1 */
drivers/media/rc/keymaps/rc-avermedia-rm-ks.c: { 0x0508, KEY_PROG1 },
drivers/media/rc/keymaps/rc-cinergy.c: { 0x0b, KEY_PROG1 }, /* app */
drivers/media/rc/keymaps/rc-encore-enltv.c: { 0x53, KEY_PROG1 }, /* teletext */
drivers/media/rc/keymaps/rc-imon-mce.c: { 0x800ff40d, KEY_PROG1 }, /* Windows MCE button */
drivers/media/rc/keymaps/rc-imon-pad.c: { 0x2ab195b7, KEY_PROG1 }, /* Go or MultiMon */
drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c: { 0x0c, KEY_PROG1 }, /* Kworld key */
drivers/media/rc/keymaps/rc-rc6-mce.c: { 0x800f040d, KEY_PROG1 }, /* Windows MCE button */
By just looking into each comment, is is clear that KEY_PROG1 can
mean different things: Source, Go, function 1, app, teletext, Windows MCE,
"Kworld key".
So, a code like KEY_PROG1 can't be translated into anything useful,
and, even if we create a "XK_Prog1", the translation for Xorg, its
translation inside the applications is not obvious at all. So, we
should really avoid things like that inside the keymaps.
Perhaps using KEY_LEFTMETA is not a good idea to map the Windows MCE
key, but, in this case, we should create another keycode inside evdev
and export it to userspace.
Cheers,
Mauro
next prev parent reply other threads:[~2011-01-24 16:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1295882104.git.mchehab@redhat.com>
2011-01-24 15:18 ` [PATCH 01/13] [media] rc/keymaps: use KEY_CAMERA for snapshots Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 02/13] [media] rc/keymaps: Use KEY_VIDEO for Video Source Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 03/13] [media] rc/keymaps: Fix most KEY_PROG[n] keycodes Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent Mauro Carvalho Chehab
2011-01-24 15:45 ` Jarod Wilson
2011-01-24 16:08 ` Mauro Carvalho Chehab [this message]
2011-01-24 19:11 ` Jarod Wilson
2011-01-24 15:18 ` [PATCH 05/13] [media] dw2102: Use multimedia keys instead of an app-specific mapping Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 06/13] [media] opera1: " Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 07/13] [media] a800: Fix a few wrong IR key assignments Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 09/13] [media] rc-rc5-hauppauge-new: Add the old control to the table Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 08/13] [media] rc-winfast: Fix the keycode tables Mauro Carvalho Chehab
2011-05-22 0:19 ` Balint Marton
2011-05-22 0:24 ` Balint Marton
2011-01-24 15:18 ` [PATCH 10/13] [media] rc-rc5-hauppauge-new: Add support for the old Black RC Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 11/13] [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 12/13] [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge Mauro Carvalho Chehab
2011-01-25 0:22 ` Andy Walls
2011-01-25 1:14 ` Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 13/13] [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map Mauro Carvalho Chehab
2011-01-25 0:32 ` Andy Walls
2011-01-25 1:23 ` Mauro Carvalho Chehab
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=4D3DA40E.8040901@redhat.com \
--to=mchehab@redhat.com \
--cc=jarod@wilsonet.com \
--cc=linux-media@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox