From 13f69b15f006fb4e5ab33c56f436d9d94d8b6911 Mon Sep 17 00:00:00 2001 From: Grace Date: Tue, 3 Dec 2024 13:21:28 +0000 Subject: [PATCH] Revert removing of open settings dialog shortcut --- src/components/ActionBar/ActionBarItemsRight.tsx | 10 ++++++++++ src/keyboard-shortcuts.ts | 1 + 2 files changed, 11 insertions(+) diff --git a/src/components/ActionBar/ActionBarItemsRight.tsx b/src/components/ActionBar/ActionBarItemsRight.tsx index 53b66e0a6..cb91afab5 100644 --- a/src/components/ActionBar/ActionBarItemsRight.tsx +++ b/src/components/ActionBar/ActionBarItemsRight.tsx @@ -1,7 +1,12 @@ import { HStack, MenuDivider, useDisclosure } from "@chakra-ui/react"; import { ReactNode, useMemo } from "react"; +import { useHotkeys } from "react-hotkeys-hook"; import { useIntl } from "react-intl"; import { useLocation } from "react-router"; +import { + globalShortcutConfig, + keyboardShortcuts, +} from "../../keyboard-shortcuts"; import { useStore } from "../../store"; import AboutDialog from "../AboutDialog"; import ConnectFirstDialog from "../ConnectFirstDialog"; @@ -47,6 +52,11 @@ const ItemsRight = ({ menuItems, toolbarItems }: ItemsRightProps) => { } } }, [tourTriggerName]); + useHotkeys( + keyboardShortcuts.settings, + settingsDisclosure.onOpen, + globalShortcutConfig + ); return ( <>