[mythtv-users] Two actions off one lirc keypress?

Michael T. Dean mtdean at thirdcontact.com
Fri Aug 4 01:40:42 UTC 2006


On 08/02/2006 10:47 PM, Robin Gilks wrote:

>Having at last got a string of IR leds on my IR blaster I can now turn my
>TV & theatre amp on/off under control of the mythboxen. I use an irexec
>entry in the lircrc file to run a shell script that does the necessary ir
>blaster commands to do this.
>
>What I'd ALSO like to have it fire a command up to mythtv when I power the
>TV & amp off to jump to the top level menu. Can I chain commands under
>irexec so that a keypress (mapped to the main menu jump-point) is sent up
>to mythtv?
>
>I THINK I may need an equivalent of irxevent but which I can call inline
>from the shell script to pass a key up to mythtv. Sort of a keyboard
>stuffer where I can specify the key and the application that gets it...
>  
>

I think you're trying to make things harder than they are...  There's a 
much easier solution than the one you were trying to find or the one you 
settled on.

>and the tail end of my lircrc file
>
>begin
>    prog   = irexec
>    button = Power
>    config = /usr/local/bin/power_toggle.sh
>end
>  
>

Assuming you're using native LIRC in Myth, add also:

begin
  prog   = mythtv
  button = Power
  config = F8
end

(or whatever key you mapped to the Main Menu jump point).  If you're not 
using native, use irxevent.  Nothing eats your button press--the config 
string for ALL matching entries in your LIRC config file is sent to it's 
associated application.  You can even create multiple entries for the 
same program (i.e. send a key to two different programs using 
irxevent--or, more commonly--accidentally send the same keypress to 
MythTV twice because of a copy/paste error).

This way, there's no script-compatible version of irxevent and no netcat 
required.

Mike


More information about the mythtv-users mailing list