The simplest way is to use a redundant button ( say 1 or 2) and program it to switch the HDMI and power off the unwanted device and power on the other. then you need to press A or B to get the right control functions.
If you do this for both activities then you can simply switch between the 2 .
Power on/off will only turn on/off the devices assigned to A or B, so by turning off the un wanted source, you will keep everything in sync.
It takes a while to unlearn the way your previous device works, but I like the way selection of A/B/C is independent of the power button, but does control what the power button will do.