Re: Menu shortcuts without modifiers?

2009-12-22 Thread Uli Kusterer
On 22.12.2009, at 02:35, Peter Ammon wrote: > To get Carbon's notion of the focus, you can do this: > >HIViewRef focusedView = NULL; >HIViewGetFocus(GetUserFocusWindow(), &focusedView, NULL); > > To get Cocoa's notion, you would write: > >NSResponder *fr = [[NSApp keyWindow] firstRes

Re: Menu shortcuts without modifiers?

2009-12-21 Thread Peter Ammon
On Dec 21, 2009, at 7:29 AM, Uli Kusterer wrote: > On 18.09.2009, at 23:07, Peter Ammon wrote: >> For key events without modifiers, like hitting the spacebar, the first >> responder of the key window should get first crack via keyDown:. So I'm not >> sure why you're seeing the behavior you de

Re: Menu shortcuts without modifiers?

2009-12-21 Thread Uli Kusterer
On 18.09.2009, at 23:07, Peter Ammon wrote: > For key events without modifiers, like hitting the spacebar, the first > responder of the key window should get first crack via keyDown:. So I'm not > sure why you're seeing the behavior you describe. I wrote a quick test with > a focused text fiel

Re: Menu shortcuts without modifiers?

2009-09-21 Thread Uli Kusterer
On 18.09.2009, at 23:07, Peter Ammon wrote: For key events without modifiers, like hitting the spacebar, the first responder of the key window should get first crack via keyDown:. So I'm not sure why you're seeing the behavior you describe. I wrote a quick test with a focused text field in

Re: Menu shortcuts without modifiers?

2009-09-18 Thread Peter Ammon
On Sep 17, 2009, at 12:29 PM, Uli Kusterer wrote: Hi, I have an app that contains a QTMovieView. I've set things up so people can use the arrow keys to skip, fast forward, rewind, use space to play/pause etc., as they're used to from other movie- playing apps. Now, I'd like to add menu it

Re: Menu shortcuts without modifiers?

2009-09-18 Thread Uli Kusterer
On 17.09.2009, at 22:26, Ashley Clark wrote: Have you tried looking at the menuHasKeyEquivalent:forEvent:target:action: delegate method on NSMenu? I suppose you could examine the firstResponder status and other state and return NO if you don't want the key to be handled as a key equivale

Menu shortcuts without modifiers?

2009-09-17 Thread Uli Kusterer
Hi, I have an app that contains a QTMovieView. I've set things up so people can use the arrow keys to skip, fast forward, rewind, use space to play/pause etc., as they're used to from other movie-playing apps. Now, I'd like to add menu items that correspond to these actions for people who