Skip to content

Commit

Permalink
Revert removing of open settings dialog shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-grace committed Dec 3, 2024
1 parent 48f4110 commit 13f69b1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/ActionBar/ActionBarItemsRight.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -47,6 +52,11 @@ const ItemsRight = ({ menuItems, toolbarItems }: ItemsRightProps) => {
}
}
}, [tourTriggerName]);
useHotkeys(
keyboardShortcuts.settings,
settingsDisclosure.onOpen,
globalShortcutConfig
);
return (
<>
<LanguageDialog
Expand Down
1 change: 1 addition & 0 deletions src/keyboard-shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const keyboardShortcuts = {
// This is scoped by keyboard focus.
addAction: ["ctrl+shift+enter", "meta+shift+enter"],
saveSession: ["ctrl+shift+s", "meta+shift+s"],
settings: ["ctrl+shift+p", "meta+shift+p"],
nextAction: ["down"],
previousAction: ["up"],
renameAction: ["F2"],
Expand Down

0 comments on commit 13f69b1

Please sign in to comment.