Re: Keyboard Loop in Programmatically Created Window
Re: Keyboard Loop in Programmatically Created Window
- Subject: Re: Keyboard Loop in Programmatically Created Window
- From: "Sean McBride" <email@hidden>
- Date: Tue, 3 Apr 2007 14:49:11 -0400
- Organization: Rogue Research
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@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden