X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=TargetController.m;h=14f81a94dd4ab317d302cfd55ef57047f43cd498;hp=3fc0f288ad9ce7033e17e70732e0cf5028a316b9;hb=08c920c47d68423c16a6deba2a59488772066f6b;hpb=c6fb77859e508aaef686b7a5a6a12abe29178708 diff --git a/TargetController.m b/TargetController.m index 3fc0f28..14f81a9 100644 --- a/TargetController.m +++ b/TargetController.m @@ -55,7 +55,6 @@ if(keyInput.hasKey) { TargetKeyboard* k = [[TargetKeyboard alloc] init]; [k setVk: [keyInput vk]]; - [k setDescr: [keyInput descr]]; return k; } break; @@ -190,7 +189,11 @@ } -(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 {