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 Oct 8, 2008, at 6:58 AM, Jared D. McNeill 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.

It depends; actually. If you use a Hauppauge DVB-{S,T} card, then the driver presents the IR receiver as a /dev/input device and you upload an IR-code -> keymapping file to /dev/input which causes IR codes to become keyboard input... I far prefer this method over LIRC... There's way less lag between pressing the button and menu action. My wife prefers it to my other mythfrontend which was using LIRC on a PVR-250.

input: DVB on-card IR receiver as /class/input/input0




Home | Main Index | Thread Index | Old Index