mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: add ability to blur search bar with Escape key
This commit is contained in:
parent
3adc8662dc
commit
bf6ce2b465
1 changed files with 5 additions and 0 deletions
|
@ -71,6 +71,11 @@ export function Header({ onSearch, onClear, search }: HeaderProps) {
|
|||
if (!isFocused && ctrlKey && key === "k") {
|
||||
focusInput();
|
||||
}
|
||||
|
||||
if (isFocused && key === "Escape" && inputRef.current) {
|
||||
inputRef.current.blur();
|
||||
handleBlur();
|
||||
}
|
||||
};
|
||||
|
||||
return () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue