From 647ba7b9cbb4e22df8566215265499c5b1445223 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Wed, 24 Jul 2024 12:46:03 +0300 Subject: [PATCH] feat: separate command bar and search hotkeys (#7651) Currently, the command bar and search hotkeys are conflicting. I am now separating them and assigning search an extra modifier key: Shift. --- frontend/src/component/common/Search/Search.tsx | 4 ++-- .../__tests__/__snapshots__/TagTypeList.test.tsx.snap | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/component/common/Search/Search.tsx b/frontend/src/component/common/Search/Search.tsx index 67c5944312..87ad34a5c3 100644 --- a/frontend/src/component/common/Search/Search.tsx +++ b/frontend/src/component/common/Search/Search.tsx @@ -134,8 +134,8 @@ export const Search = ({ const hotkey = useKeyboardShortcut( { - modifiers: ['ctrl'], - key: 'k', + modifiers: ['ctrl', 'shift'], + key: 'K', preventDefault: true, }, () => { diff --git a/frontend/src/component/tags/TagTypeList/__tests__/__snapshots__/TagTypeList.test.tsx.snap b/frontend/src/component/tags/TagTypeList/__tests__/__snapshots__/TagTypeList.test.tsx.snap index e3b6dfcff7..bedd39c8c9 100644 --- a/frontend/src/component/tags/TagTypeList/__tests__/__snapshots__/TagTypeList.test.tsx.snap +++ b/frontend/src/component/tags/TagTypeList/__tests__/__snapshots__/TagTypeList.test.tsx.snap @@ -53,14 +53,14 @@ exports[`renders an empty list correctly 1`] = ` onClick={[Function]} >