On Fri, 10 Feb 2012 08:34:49 -0800 (PST) Jan Panteltje wrote: > I recently bought a Terratec cinergy S2 USB HD receiver. > I got everything working just fine in Linux and get excellent > reception. > This thing came with a small remote controller, and I notice > that the output of this remote appears as ASCII characters on stdin, > on any terminal that I open... > Wrote a small GUI application that sets the input focus to a hidden > input field, and can process the numbers from this remote that way, > but of course this only works if the mouse has selected that > application. > > Thinking about this I think that the driver dumps the received remote > control characters simply to stdout. Something fairly low level processes the input events and converts them to keyboard events. IIRC this happens on the console as well as in X. > If this is so, does there perhaps exists a /dev/dvb/adapterX/remoteX > interface in the specs so I could modify that driver to send the codes > there? The events can be read from /dev/input/eventX. You can do something like parse /proc/bus/input/devices to work out which device corresponds to your remote. The structure of the events etc is defined in /usr/include/linux/input.h. The EVIOCGRAB ioctl is useful to grab the events exclusively for your application and stop them appearing on the console. I don't know exactly what the fields in input_event are supposed to mean, and IME their significance can vary with remote and with kernel version. If you can find more information about this, please send a copy to me because I'm about to unsubscribe from linux-media. If you can't find the information you'll probably find it useful to experiment with the attached python script (treat as Public Domain).