From a3fcbd60dffe989b757595ecbafd0705ae7dd369 Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Mon, 22 Jul 2024 17:50:14 +0300 Subject: [PATCH] [ENG-1830] Change sidebar toggle shortcut (#2625) * Change sidebar shortcut to cmd/ctrl + s * tooltip icon --- .../Layout/Sidebar/SidebarLayout/index.tsx | 12 ++++++++++-- interface/hooks/useShortcut.ts | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/index.tsx b/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/index.tsx index 4259d0062..6d81355da 100644 --- a/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/index.tsx +++ b/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/index.tsx @@ -5,7 +5,14 @@ import { PropsWithChildren, useCallback, useEffect, useRef, useState } from 'rea import { useKey } from 'rooks'; import { Button, Kbd, Resizable, ResizableHandle, Tooltip, useResizableContext } from '@sd/ui'; import { MacTrafficLights } from '~/components'; -import { useLocale, useOperatingSystem, useShortcut, useShowControls } from '~/hooks'; +import { + useKeyMatcher, + useKeysMatcher, + useLocale, + useOperatingSystem, + useShortcut, + useShowControls +} from '~/hooks'; import { layoutStore, useLayoutStore } from '../../store'; import { getSidebarStore } from '../store'; @@ -208,6 +215,7 @@ function SidebarControls() { const { t } = useLocale(); const os = useOperatingSystem(); const { sidebar } = useLayoutStore(); + const ctrlmeta = useKeysMatcher(['Meta']).Meta.icon; if (os !== 'macOS') return null; @@ -215,7 +223,7 @@ function SidebarControls() {