Change shortcut
This commit is contained in:
parent
b069bc885d
commit
bf0f5b4ef3
1 changed files with 5 additions and 2 deletions
|
@ -19,7 +19,7 @@ import NavigatorSection from "./NavigatorSection";
|
||||||
import { QuickSearchAction } from "./types";
|
import { QuickSearchAction } from "./types";
|
||||||
import useQuickSearch from "./useQuickSearch";
|
import useQuickSearch from "./useQuickSearch";
|
||||||
|
|
||||||
const navigatorHotkey = "ctrl+m, command+m";
|
const navigatorHotkey = "ctrl+k, command+k";
|
||||||
|
|
||||||
function getItemOffset(
|
function getItemOffset(
|
||||||
actions: QuickSearchAction[],
|
actions: QuickSearchAction[],
|
||||||
|
@ -35,7 +35,10 @@ const Navigator: React.FC = () => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
hotkeys(navigatorHotkey, () => setVisible(true));
|
hotkeys(navigatorHotkey, event => {
|
||||||
|
event.preventDefault();
|
||||||
|
setVisible(!visible);
|
||||||
|
});
|
||||||
|
|
||||||
return () => hotkeys.unbind(navigatorHotkey);
|
return () => hotkeys.unbind(navigatorHotkey);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
Loading…
Reference in a new issue