Just had a quick look. I'm not sure I understand it all.
Look in those forum for a tool called Sharp Display Manager you may find it useful. It will allow you to execute actions such as HDMI switch via CEC or/and Harmony Hub and launch applications such as MP in response to HID key press such as Green Button. I'm not sure you can us it to run a script. That could be added though.