[5/8] IR: extend MCE keymap.

Message ID 1283808373-27876-6-git-send-email-maximlevitsky@gmail.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Maxim Levitsky Sept. 6, 2010, 9:26 p.m. UTC
  These keys are found on remote bundled with
Toshiba Qosmio F50-10q.

Found and tested by, Sami R <maesesami@gmail.com>

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
 drivers/media/IR/keymaps/rc-rc6-mce.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
  

Comments

Jarod Wilson Sept. 8, 2010, 2:47 p.m. UTC | #1
On Mon, Sep 6, 2010 at 5:26 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> These keys are found on remote bundled with
> Toshiba Qosmio F50-10q.
>
> Found and tested by, Sami R <maesesami@gmail.com>
>
> Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> ---
>  drivers/media/IR/keymaps/rc-rc6-mce.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)

Acked-by: Jarod Wilson <jarod@redhat.com>
  
Maxim Levitsky Sept. 10, 2010, 12:40 a.m. UTC | #2
On Wed, 2010-09-08 at 10:47 -0400, Jarod Wilson wrote: 
> On Mon, Sep 6, 2010 at 5:26 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > These keys are found on remote bundled with
> > Toshiba Qosmio F50-10q.
> >
> > Found and tested by, Sami R <maesesami@gmail.com>
> >
> > Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> > ---
> >  drivers/media/IR/keymaps/rc-rc6-mce.c |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)

Tommorow I will resend that patch with even more scancodes.

Best regards,
Maxim Levitsky

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Jarod Wilson Sept. 10, 2010, 1:37 a.m. UTC | #3
On Thu, Sep 9, 2010 at 8:40 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> On Wed, 2010-09-08 at 10:47 -0400, Jarod Wilson wrote:
>> On Mon, Sep 6, 2010 at 5:26 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
>> > These keys are found on remote bundled with
>> > Toshiba Qosmio F50-10q.
>> >
>> > Found and tested by, Sami R <maesesami@gmail.com>
>> >
>> > Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
>> > ---
>> >  drivers/media/IR/keymaps/rc-rc6-mce.c |    3 +++
>> >  1 files changed, 3 insertions(+), 0 deletions(-)
>
> Tommorow I will resend that patch with even more scancodes.

Saw the discussion on irc. Feel your pain big-time on the X server
limitation on keycodes. Its put a big damper on efforts to add native
support to mythtv. Peter Hutterer's libXi2 cookbook tutorials talk a
good game about how libXi2 supports 32-bit keycodes, but neglects to
mention that the X server still gobbles up anything above 248 or 255
or whatever it is, and remedying that is no small task. :(

I think for mythtv, we're going to end up having a daemon process with
elevated privs that reads directly from input devices to get around
this annoyance, until such time as the annoyance is gone.
  
David Härdeman Sept. 10, 2010, 8:27 a.m. UTC | #4
On Fri, September 10, 2010 03:37, Jarod Wilson wrote:
> I think for mythtv, we're going to end up having a daemon process with
> elevated privs that reads directly from input devices to get around
> this annoyance, until such time as the annoyance is gone.

A similar approach could work for XBMC since it already has input plugins
(e.g. for using a Nintendo Wii controller, etc).
  
Maxim Levitsky Sept. 10, 2010, 8:40 a.m. UTC | #5
On Thu, 2010-09-09 at 21:37 -0400, Jarod Wilson wrote: 
> On Thu, Sep 9, 2010 at 8:40 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > On Wed, 2010-09-08 at 10:47 -0400, Jarod Wilson wrote:
> >> On Mon, Sep 6, 2010 at 5:26 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> >> > These keys are found on remote bundled with
> >> > Toshiba Qosmio F50-10q.
> >> >
> >> > Found and tested by, Sami R <maesesami@gmail.com>
> >> >
> >> > Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> >> > ---
> >> >  drivers/media/IR/keymaps/rc-rc6-mce.c |    3 +++
> >> >  1 files changed, 3 insertions(+), 0 deletions(-)
> >
> > Tommorow I will resend that patch with even more scancodes.
> 
> Saw the discussion on irc. Feel your pain big-time on the X server
> limitation on keycodes. Its put a big damper on efforts to add native
> support to mythtv. Peter Hutterer's libXi2 cookbook tutorials talk a
> good game about how libXi2 supports 32-bit keycodes, but neglects to
> mention that the X server still gobbles up anything above 248 or 255
> or whatever it is, and remedying that is no small task. :(
> 
> I think for mythtv, we're going to end up having a daemon process with
> elevated privs that reads directly from input devices to get around
> this annoyance, until such time as the annoyance is gone.


Btw, indeed Xi2 still doesn't pass > 248 keycodes, just tested that with
-git versions of X stack from about 2 months ago.
However this can be fixed relatively easily.
Maybe even I could do that.

The big problem is however about ability to map extended keycodes to
actions, thing that should be provided by XKB2, which we will see
probably when DNF is released on Phantom console...
Also this will need lots of changes in toolkits.
Thats the problem I don't have resources to fix.

Best regards,
Maxim Levitsky


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Jarod Wilson Sept. 10, 2010, 1:11 p.m. UTC | #6
On Fri, Sep 10, 2010 at 11:40:31AM +0300, Maxim Levitsky wrote:
> On Thu, 2010-09-09 at 21:37 -0400, Jarod Wilson wrote: 
> > On Thu, Sep 9, 2010 at 8:40 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > > On Wed, 2010-09-08 at 10:47 -0400, Jarod Wilson wrote:
> > >> On Mon, Sep 6, 2010 at 5:26 PM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > >> > These keys are found on remote bundled with
> > >> > Toshiba Qosmio F50-10q.
> > >> >
> > >> > Found and tested by, Sami R <maesesami@gmail.com>
> > >> >
> > >> > Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> > >> > ---
> > >> >  drivers/media/IR/keymaps/rc-rc6-mce.c |    3 +++
> > >> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > >
> > > Tommorow I will resend that patch with even more scancodes.
> > 
> > Saw the discussion on irc. Feel your pain big-time on the X server
> > limitation on keycodes. Its put a big damper on efforts to add native
> > support to mythtv. Peter Hutterer's libXi2 cookbook tutorials talk a
> > good game about how libXi2 supports 32-bit keycodes, but neglects to
> > mention that the X server still gobbles up anything above 248 or 255
> > or whatever it is, and remedying that is no small task. :(
> > 
> > I think for mythtv, we're going to end up having a daemon process with
> > elevated privs that reads directly from input devices to get around
> > this annoyance, until such time as the annoyance is gone.
> 
> Btw, indeed Xi2 still doesn't pass > 248 keycodes, just tested that with
> -git versions of X stack from about 2 months ago.
> However this can be fixed relatively easily.
> Maybe even I could do that.
> 
> The big problem is however about ability to map extended keycodes to
> actions, thing that should be provided by XKB2, which we will see
> probably when DNF is released on Phantom console...
> Also this will need lots of changes in toolkits.
> Thats the problem I don't have resources to fix.

Yeah, that's exactly what I got from Peter when I was asking him about
this issue on irc -- X server can be modified fairly easily, but there's
the arduous and undesirable task of making all the toolkits and whatnot
behave again, and nobody in their right mind really *wants* to dig into
xkb. :)
  
Jarod Wilson Sept. 10, 2010, 1:18 p.m. UTC | #7
On Fri, Sep 10, 2010 at 10:27:02AM +0200, David Härdeman wrote:
> On Fri, September 10, 2010 03:37, Jarod Wilson wrote:
> > I think for mythtv, we're going to end up having a daemon process with
> > elevated privs that reads directly from input devices to get around
> > this annoyance, until such time as the annoyance is gone.
> 
> A similar approach could work for XBMC since it already has input plugins
> (e.g. for using a Nintendo Wii controller, etc).

While attempting to drift off to sleep last night, it occurred to me that
lircd already has support for attaching to input devices, so it might be
an option to extend lircd and the lirc client library to have a "pass raw
keycodes" mode. Both xmbc and mythtv already have options to build in lirc
client support, so it'd just be minor extension of its use in both cases,
at least in theory...
  

Patch

diff --git a/drivers/media/IR/keymaps/rc-rc6-mce.c b/drivers/media/IR/keymaps/rc-rc6-mce.c
index 64264f7..39557ad 100644
--- a/drivers/media/IR/keymaps/rc-rc6-mce.c
+++ b/drivers/media/IR/keymaps/rc-rc6-mce.c
@@ -19,6 +19,7 @@  static struct ir_scancode rc6_mce[] = {
 
 	{ 0x800f0416, KEY_PLAY },
 	{ 0x800f0418, KEY_PAUSE },
+	{ 0x800f046e, KEY_PLAYPAUSE },
 	{ 0x800f0419, KEY_STOP },
 	{ 0x800f0417, KEY_RECORD },
 
@@ -37,6 +38,8 @@  static struct ir_scancode rc6_mce[] = {
 	{ 0x800f0411, KEY_VOLUMEDOWN },
 	{ 0x800f0412, KEY_CHANNELUP },
 	{ 0x800f0413, KEY_CHANNELDOWN },
+	{ 0x800f043a, KEY_BRIGHTNESSUP },
+	{ 0x800f0480, KEY_BRIGHTNESSDOWN },
 
 	{ 0x800f0401, KEY_NUMERIC_1 },
 	{ 0x800f0402, KEY_NUMERIC_2 },