Change shortcut

This commit is contained in:
dominik-zeglen 2019-11-25 16:42:24 +01:00
parent b069bc885d
commit bf0f5b4ef3

View file

@ -19,7 +19,7 @@ import NavigatorSection from "./NavigatorSection";
import { QuickSearchAction } from "./types";
import useQuickSearch from "./useQuickSearch";
const navigatorHotkey = "ctrl+m, command+m";
const navigatorHotkey = "ctrl+k, command+k";
function getItemOffset(
actions: QuickSearchAction[],
@ -35,7 +35,10 @@ const Navigator: React.FC = () => {
const intl = useIntl();
React.useEffect(() => {
hotkeys(navigatorHotkey, () => setVisible(true));
hotkeys(navigatorHotkey, event => {
event.preventDefault();
setVisible(!visible);
});
return () => hotkeys.unbind(navigatorHotkey);
}, []);