tech-kern archive

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

Re: Proposal for reporting remote control button presses to userland



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

> Ok, I think I have a plan. Is this cool with everybody?
> 
> 
> I'd like to add a wsremote(4) device that uses its own wsmux. Add new 
> WSCONS_EVENT_REMOTE_UP/DOWN event type definitions, and feed struct 
> wscons_events for button presses/releases.
> 
> We'll deliver raw keycodes to userland, and a 'wsremoted' service
> that can run which loads a buttonmap (it's going to be different for
> each remote, lets use /usr/pkg/share/wsremote/ati_tv_wonder_600.plist
> as an example) and can translate raw button codes to cooked ones on a
> socket, lets say /var/run/wsremoted.sock. Message format can be
> something like:
> 
>    <?xml version="1.0" encoding="UTF-8"?>
>    <plist version="1.0">
>    <dict>
>      <key>source</key>
>      <string>wsremote0</string>
>      <key>event</key>
>      <string>button-pressed</string>
>      <key>command</key>
>      <string>volume-up</string>
>    </dict>
> 
> An application can then listen on that socket for button presses and
> do whatever it feels like (application might be MythTV, lirc,
> mplayer, etc).
> 
Seems reasonable (though I'm no fan of XML, and in any event think that
if we do use XML we should think hard about the actual data returned --
envstat has far too much knowledge of what it's seeing).  Two concerns:
first, can more than one application connect to the daemon at once?  I
hope so.  Second, is there going to be some optional filtering, say by
device?


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


Home | Main Index | Thread Index | Old Index