Changeset 572 for trunk/Cocoa/Pester/Source/NJRHotKeyField.m
- Timestamp:
- 07/20/09 06:03:42 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/NJRHotKeyField.m
r355 r572 111 111 } 112 112 113 - (void)textDidEndEditing:(NSNotification *)notification; 114 { 115 [self showKeyEquivalentAttributedStringFinalized: YES]; 116 [super textDidEndEditing: notification]; 117 } 118 113 119 #pragma mark event handling 114 120 … … 125 131 id delegate = [self delegate]; 126 132 NSString *message = nil; 127 if (delegate != nil && ![delegate hotKeyField: self shouldAcceptCharacter: [characters characterAtIndex: 0] modifierFlags: modifierFlags rejectionMessage: &message]) { 133 unichar character = [characters characterAtIndex: 0]; 134 if (character == NSTabCharacter || character == NSBackTabCharacter) 135 return; 136 if (delegate != nil && ![delegate hotKeyField: self shouldAcceptCharacter: character modifierFlags: modifierFlags rejectionMessage: &message]) { 128 137 [self showStatus: message != nil ? message : @"key is unavailable for use"]; 129 138 } else { … … 137 146 - (BOOL)performKeyEquivalent:(NSEvent *)theEvent; 138 147 { 139 [self keyUp: theEvent]; 148 if ([[self window] firstResponder] == self) 149 [self keyUp: theEvent]; 140 150 return [super performKeyEquivalent: theEvent]; 141 151 }
Note:
See TracChangeset
for help on using the changeset viewer.