Menu keyboard shortcuts ignored on Mac OS X, and proposed fix

In the Mac OS X version of SDL, keyboard shortcuts for main menu items–
including important standard ones like Command+Q–are simply ignored by SDL. I
believe this is because QZ_PumpEvents in SDL_QuartzEvents.m effectively hides
events from Cocoa, except in the mouse-button-down and mouse-button-up cases.
The switch block in this function indeed is intended to intercept messages and
react to them, but any application that does this is responsible for forwarding
them to Cocoa so it can handle them as it would like to. The only reason for not
forwarding messages is to override standard behavior, which certainly is not
what we would like. I propose that this problem can be corrected simply by
ensuring that each case in the switch block eventually executes [ NSApp
sendEvent:event ]; in my own build of SDL, this modification corrects the
behavior, seemingly without breaking SDL behavior.

I propose that this problem can be corrected simply by
ensuring that each case in the switch block eventually executes [ NSApp
sendEvent:event ]; in my own build of SDL, this modification corrects the
behavior, seemingly without breaking SDL behavior.

It sounds like you alreay coded the fix. Why not submit it as a patch?

ChrisOn Thu, 3 Feb 2005 21:15:02 +0000 (UTC), Marcus Brenneman wrote:


Chris Nystrom
http://www.newio.org/~ccn
AIM: nystromchris