Correctly catch quit events instead of manually catching OS X hotkeys