diff --git a/src/app/(main)/chat/(workspace)/_layout/Desktop/HotKeys.tsx b/src/app/(main)/chat/(workspace)/_layout/Desktop/HotKeys.tsx index 8321622c9588e..f3b6501c869f0 100644 --- a/src/app/(main)/chat/(workspace)/_layout/Desktop/HotKeys.tsx +++ b/src/app/(main)/chat/(workspace)/_layout/Desktop/HotKeys.tsx @@ -4,6 +4,7 @@ import isEqual from 'fast-deep-equal'; import { useHotkeys } from 'react-hotkeys-hook'; import { HOTKEYS } from '@/const/hotkeys'; +import { useOpenChatSettings } from '@/hooks/useInterceptingRoutes'; import { useChatStore } from '@/store/chat'; import { chatSelectors } from '@/store/chat/selectors'; import { useGlobalStore } from '@/store/global'; @@ -13,12 +14,18 @@ const HotKeys = () => { const lastMessage = useChatStore(chatSelectors.latestMessage, isEqual); const toggleZenMode = useGlobalStore((s) => s.toggleZenMode); + const openChatSettings = useOpenChatSettings(); useHotkeys(HOTKEYS.zenMode, toggleZenMode, { enableOnFormTags: true, preventDefault: true, }); + useHotkeys(HOTKEYS.chatSettings, () => openChatSettings(), { + enableOnFormTags: true, + preventDefault: true, + }); + useHotkeys( HOTKEYS.regenerate, () => { diff --git a/src/const/hotkeys.ts b/src/const/hotkeys.ts index 03f2d63980dd8..b85e9f4f09fb0 100644 --- a/src/const/hotkeys.ts +++ b/src/const/hotkeys.ts @@ -4,6 +4,7 @@ export const SAVE_TOPIC_KEY = 'n'; export const CLEAN_MESSAGE_KEY = 'backspace'; export const HOTKEYS = { + chatSettings: 'mod+comma', regenerate: 'alt+r', saveTopic: 'alt+n', zenMode: 'mod+\\',