Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,17 @@ - (void)windowDidResignKey:(NSNotification *)notification {
[self hideApp];
}

- (void)windowDidBecomeKey:(NSNotification *)notification {
// The search window is opened from a global hotkey while another app is
// active, and app activation is asynchronous on modern macOS. A
// makeFirstResponder: call at show time runs before the window can take
// focus, so the field accepts keystrokes but never shows its caret.
// Focus the field once the window has actually become key.
if ( [notification object] == searchWindow ) {
[searchWindow makeFirstResponder:searchWindowSearchField];
}
}

-(void)fakeKey:(NSNumber*) keyCode withCommandFlag:(BOOL) setFlag
/*" +fakeKey synthesizes keyboard events. "*/
{
Expand Down