diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/search-modal/search-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/search-modal/search-modal.tsx index e6d842a81d..d545d38067 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/search-modal/search-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/search-modal/search-modal.tsx @@ -394,19 +394,28 @@ export function SearchModal({ // Only handle shortcuts when modal is open if (!open) return - // Don't trigger if user is typing in the search input - const activeElement = document.activeElement - const isEditableElement = - activeElement instanceof HTMLInputElement || - activeElement instanceof HTMLTextAreaElement || - activeElement?.hasAttribute('contenteditable') - - if (isEditableElement) return - const isMac = typeof navigator !== 'undefined' && navigator.platform.toUpperCase().indexOf('MAC') >= 0 const isModifierPressed = isMac ? e.metaKey : e.ctrlKey + // Check if this is one of our specific shortcuts + const isOurShortcut = + isModifierPressed && + e.shiftKey && + (e.key.toLowerCase() === 'l' || e.key.toLowerCase() === 'k') + + // Don't trigger other shortcuts if user is typing in the search input + // But allow our specific shortcuts to pass through + if (!isOurShortcut) { + const activeElement = document.activeElement + const isEditableElement = + activeElement instanceof HTMLInputElement || + activeElement instanceof HTMLTextAreaElement || + activeElement?.hasAttribute('contenteditable') + + if (isEditableElement) return + } + if (isModifierPressed && e.shiftKey) { // Command+Shift+L - Navigate to Logs if (e.key.toLowerCase() === 'l') { @@ -541,7 +550,7 @@ export function SearchModal({ className='bg-white/50 dark:bg-black/50' style={{ backdropFilter: 'blur(4.8px)' }} /> - + Search diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx index 0074b02cfd..5a5fc70c79 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx @@ -735,7 +735,6 @@ export function Sidebar() { icon: LibraryBig, href: `/workspace/${workspaceId}/knowledge`, tooltip: 'Knowledge', - shortcut: getKeyboardShortcutText('K', true, true), active: pathname === `/workspace/${workspaceId}/knowledge`, }, {