@implementation JoystickController {
IOHIDManagerRef hidManager;
- BOOL programmaticallySelecting;
NSTimer *continuousTimer;
}
return;
[controller expandRecursive:handler];
- controller->programmaticallySelecting = YES;
[controller->outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[controller->outlineView rowForItem:handler]] byExtendingSelection: NO];
+ [controller->targetController focusKey];
}
}
- (void)outlineViewSelectionDidChange: (NSNotification*) notification {
[targetController reset];
[targetController load];
- if (programmaticallySelecting)
- [targetController focusKey];
- programmaticallySelecting = NO;
}
@end
}
-(void) focusKey {
- [[[NSApplication sharedApplication] mainWindow] makeFirstResponder: keyInput];
+ Target *currentTarget = configsController.currentConfig[currentJsaction];
+ if (!currentTarget || [currentTarget isKindOfClass:[TargetKeyboard class]])
+ [[[NSApplication sharedApplication] mainWindow] makeFirstResponder: keyInput];
+ else
+ [keyInput resignFirstResponder];
}
-(void) refreshConfigsPreservingSelection: (BOOL) preserve {