tech-kern archive

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

Proposal for reporting remote control button presses to userland



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).

Comments?

Cheers,
Jared


Home | Main Index | Thread Index | Old Index