tags:

views:

94

answers:

1

I'd like to capture the input from a TV remote control and detect which buttons are pressed in my application. The operating system is Linux (Windows answers won't be much use to me, but may be to others). I'm using C++ but C code would work for me also.

I'd like to use the code in a fashion similar to this:

if (remoteControl.buttonPressed(PLAY_BUTTON))
{
    fooBar.doSomethingFun();
}

Also, I was thinking there may be a generic library I can use, which would with all remotes, or would I have to do some really low level coding?

+5  A: 

First off you are going to need some hardware to detect the IR emissions, for example a USB-UIRT

On Linux, the USB-UIRT is support by LIRC which deals with the low level end of things for you.

There are a number of open source packages that work with this to provide control, so you can look at their code for examples, eg. Myth TV

Rob Walker