I've tried a similar thing with varied sucess. I wanted to get ctrl-alt-z grabbed from me MS MCE IR keyboard to my universal remote. I found that my pronto could catch it, but my harmony remote can't. In you situtation I didn't try and make an alt-f4 shortcut, i actually put the pronto into learn mode then quickly hit alt, added f4, released f4, released alt (well - ctrl alt z but you get my drift) and eventually it worked. Took quite a few attempts. My plan was to then teach the harmony with the pronto's captured IR command, but thats where everything broke - I think my harmony has a more strict set of rules for start_ir, play_ir, stop_ir actions than the pronto which seemed to handle start_ir1, start_ir2, play_ir2, stop_ir2, stop_ir1. Either that or the resulting IR command was just too long for the harmony to capture.
A while back I used girder with my MCE remote. I programmed girder to respond to the coloured "fasttext" keys which are redundant if you have freeview tuners installed. I programmed the following:
Press red button to move Media Center (or any app that was in focus) between primary monitor and secondary monitor (this relied on the ATI graphics drivers that let you configure keyboard shortcuts). Press blue button to quit the focussed application (alt+f4).
I'm actually trialling Ultramon for something similar. I can set up a desktop shortcut to switch the display from my tv to my projector, and have used the MCE keyboard to teach this to my Harmony remote.
So far I can switch displays, fire up media centre and close media centre and go back to windows, all with single button presses on the remote.
Snap - thats what I was trying to do, but I was using ctrl alt z (why, i don't know) as a screen toggle for powerstrip ... which is already running to force a 50hz scart rgb compatible signal out of my vga socket. I also tried ultramon, seem to recall that it can have discrete shortcuts for each display rather than a toggle, v useful should you go for a one button macro to perform all of that work for you on the harmony. (FWIW I've also spent a good amount of time tinkering with girder and hip to do this job and others ... but never been able to get a set of IR commands that I'm happy with - can't get a green button that I'm happy with, and miss the multi-tap when entering text for new recording search, etc).
Ultramon seems to work pretty well. It sets a desktop shortcut for the display switch, to which you can add a keyboard shorcut. I just used F1 & F2 to switch between the TV and projector.
I then used the MCE keyboard to program and label these in Harmony configuration and assigned them to the * and # buttons on the remote.
I then prgarmmed the alt+f4 into one of the additional buttons (soft button) and labelled it windows, and another soft button ( could map it to hard button as well) is labelled Media Centre (mapped the Green Button option in the Harmony set up) which switches back to MCE. Both on the first page of additional buttons.
Took a bit of faffing about and trial and error but got there in the end.