Re: Cocoa and full-screen GL
Re: Cocoa and full-screen GL
- Subject: Re: Cocoa and full-screen GL
- From: John Stiles <email@hidden>
- Date: Mon, 31 Jan 2005 18:19:01 -0800
I've gotten a few recommendations about overriding NSApp's sendEvent method, and this seems like doing the same thing but kind of in reverse.
It looks like most of my NSView functions (keyDown/mouseDown/etc) would transition over to this technique, but what about insertText?
keyUp and keyDown might seem like substitutes, but they don't handle complicated input (like Japanese inline input or even accented characters/dead keys). Knowing our business, I can practically guarantee that at some point we will need accented/composed characters to work.
So, hmm... is there any way I could override "sendEvent," catch all the events, and then route them to an NSView of my choice?
On Jan 31, 2005, at 6:15 PM, Guy English wrote:
Hi John,
On Mon, 31 Jan 2005 17:48:25 -0800, John Stiles <email@hidden> wrote:
> 3 - The other demos I've found that enter fullscreen mode will run
> their own event loop with, say, a while around [NSApp
> nextEventMatchingMask:NSAnyEventMask…].
> [snip] For example, command keys are no
> longer processed AFAICS (maybe I need to propagate events I'm not
> explicitly handling, but I don't know how to do this).
This is what I do in my code. If you don't like the event you can have
NSApplication send it down the responder chain by calling [NSApp
sendEvent: event]; I check [event window] against the window with my
GL context in it and pass it down the responder chain if it's not for
me.
Hope that helps,
Guy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden