My application is for interactive live performance, so I'd like there to be a way to disable exiting the program via keyboard only (i.e. NOT via mouse). I want this so that the operator of the program doesn't mistakenly exit the app while executing other keyboard commands, even though this would be a very rare occurence.
So, my question is, how do I disable Alt-F4 (Windows) and Cmd-Q (OS X)? On Windows for example, it seems that the WM_CLOSE message is sent to the Window without any information about whether it was triggered by the keyboard vs. by clicking the close button.
It might also be relevant that I'm using native OS windows.
Thanks for any advice.