tech-kern archive

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

Re: Suggestions for reporting remote control button presses to userland



On Wed, 08 Oct 2008 08:58:21 -0400
"Jared D. McNeill" <jmcneill%invisible.ca@localhost> wrote:

> Steven M. Bellovin wrote:
> > On Wed, 08 Oct 2008 08:41:20 -0400
> > "Jared D. McNeill" <jmcneill%invisible.ca@localhost> wrote:
> > 
> >>> how do keyboards (or computers) with 'media buttons' work?  If
> >>> they translate into some kind of keycode then I think a remote
> >>> control should probably just do that also.. (it is a key press on
> >>> a board of keys :)
> > It depends on the keyboard.  Some button presses are just key codes,
> > some are USB HID events.  
> > 
> > I'd look at how MythTV handles remotes -- it might be a good API to
> > emulate.
> 
> I suspect MythTV uses lirc. I am somewhat tempted to create a simple 
> /dev/wsremote interface that allows you to query the encoding type
> (RC4, RC5/NEC, etc) and then read raw remote codes from it. Let
> userland (lirc or some replacement) worry about deoding them and
> mapping keys.

MythTV can handle different types of remotes.  A friend of mine, for
example, is using a Wii controller.

There's an interesting question of how this is actually used.  If you
have, say, a MythTV-like application, you want the remote codes to go
directly to the application.  If you're trying to change the volume on
your computer, you may just want the remote control daemon to invoke
mixerctl, much as one can do now via usbhidctl or the ACPI hotkey
script.  How is the decision made about who gets which events?


                --Steve Bellovin, http://www.cs.columbia.edu/~smb


Home | Main Index | Thread Index | Old Index