Skip navigation.
 
mlRe: Keyboard Loop in Programmatically Created Window
FROM : Sean McBride
DATE : Tue Apr 03 20:49:11 2007

On 4/3/07 8:17 AM, Jerry Krinock said:

>[3] Subclass of NSWindow to fix the problem...
>
>@interface SSAlertWindow : NSWindow
>@end
>
>@implementation SSAlertWindow
>
>- (void)sendEvent:(NSEvent *)event {
>    int tab = 0 ;
>    if ([event type] == NSKeyDown) {
>        unichar character = [[event characters] characterAtIndex:0] ;
>        if (character == 9) {
>            tab = 1 ;
>        }
>        else if (character == 25) {
>            tab = -1 ;
>        }
>    }


Users can change keybindings, and ASCII 9 isn't necessarily what should
invoke the 'tab' behaviour.

The default keybindings are here:

/System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict

See also:
<http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/
TextDefaultsBindings/chapter_9_section_2.html#//apple_ref/doc/uid/
20000468-611005
>

--
____________________________________________________________
Sean McBride, B. Eng                <email_removed>
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

Related mailsAuthorDate
mlKeyboard Loop in Programmatically Created Window Jerry Krinock Apr 1, 07:14
mlRe: Keyboard Loop in Programmatically Created Window Jerry Krinock Apr 3, 17:17
mlRe: Keyboard Loop in Programmatically Created Window Sean McBride Apr 3, 20:49
mlRe: Keyboard Loop in Programmatically Created Window Jerry Krinock Apr 4, 01:13
mlRe: Keyboard Loop in Programmatically Created Window Jerry Krinock Apr 6, 18:10