One of the most popular automation tasks is to use shortcuts to send IR codes - from within every application! To achieve this all you have to do is to create a single-line AppleScript like this:
|tell application "iRed" to send ir Code "Power" of RC "Sony"|
With this setting you may toggle your HiFi set by simply pressing F13 on the keyboard. You may configure Ctrl-F13 and Shift-F13 for volume control as well - your mileage may vary.
This screenshot shows the "F13" example after configuration :
This screenshot shows the "Ctrl-F13" example after configuration: