lirc - how do you call one script for every button?
Hi - I'm setting-up lirc and I want it such that whenever a button is pressed, that button is passed to my script to process it.
I gather that the part of lirc where buttons are processed is the lircrc file, however I cannot for-the-life-of-me understand it. It is bizarre for two reasons.
Firstly, it appears you have to have a section to process every button. I would rather have minimal code in this file to just pass every button to my script. Then I don't need to modify this lircrc file every time I change the remote and I can do all of the processing in my script. How would I do this?
Secondly, even if I did want to process the buttons in the lircrc file, I cannot understand it. I would expect that the lircrc file would fundamentally have two things, the button and the related command to run. Instead it has three parameters (button, prog, config). I gather you set prog=irexec and config=the command you want to run. Why isn't there just two parameters (the button, and the command to run)????
I'm mostly interested in the answer to the first point above. I only mention the second point because it is really messing-me-up and I can't figure out the first point.
|