Skip to content

Commit

Permalink
Add keyboard shortcut to set focus on search bar (#1369)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschwendener authored Feb 15, 2025
1 parent 5645d8a commit d3349e6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/renderer/Core/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ export const Search = ({
additionalActionsButtonRef.current?.click();
},
},
{
validate: (event) =>
window.ContextBridge.getOperatingSystem() === "macOS"
? event.key === "l" && event.metaKey
: event.key === "l" && event.ctrlKey,
action: () => {
userInput.focus();
userInput.select();
},
},
];

const keyboardShortcuts: Record<"openSettings" | "openAdditionalActionsMenu", Record<OperatingSystem, string>> = {
Expand Down

0 comments on commit d3349e6

Please sign in to comment.