TagSpaces is an offline, open source, document manager with tagging support
chore: adjusting the internal shortcut for showing search to c+k
Ilian Sapundshiev1cc3bf0657da
diff --git a/src/renderer/components/FolderContainer.tsx b/src/renderer/components/FolderContainer.tsxindex 06b07be7d..5d3156143 100644--- a/src/renderer/components/FolderContainer.tsx+++ b/src/renderer/components/FolderContainer.tsx@@ -27,7 +27,7 @@ import Typography from '@mui/material/Typography';import ToggleButton from '@mui/material/ToggleButton';import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';import AppConfig from '-/AppConfig';-import { getDesktopMode } from '-/reducers/settings';+import { getDesktopMode, getKeyBindingObject } from '-/reducers/settings';import {actions as AppActions,AppDispatch,@@ -67,6 +67,7 @@ function FolderContainer(props: Props) {const { t } = useTranslation();const theme = useTheme();+ const keyBindings = useSelector(getKeyBindingObject);const { openFileUploadDialog } = useFileUploadDialogContext();const { openProTeaserDialog } = useProTeaserDialogContext();const {@@ -182,14 +183,7 @@ function FolderContainer(props: Props) {enterSearchMode();};- const openSearchKeyBinding = AppConfig.isElectron- ? ' (' +- adjustKeyBinding(- AppConfig.isMacLike ? 'Command+Shift+F' : 'Ctrl+Shift+F',- ) +- ')'- : '';- // keyBindings['openSearch'].toUpperCase()+ const openSearchKeyBinding = ` (${adjustKeyBinding(keyBindings.openSearch)})`;const { FILE } = NativeTypes;@@ -278,7 +272,7 @@ function FolderContainer(props: Props) {flexDirection: 'column',}}/>- <Tooltip title={t('core:searchTitle') + openSearchKeyBinding}>+ <Tooltip title={t('core:openSearch') + openSearchKeyBinding}><IconButtondata-tid="toggleSearch"onClick={openSearchMode}diff --git a/src/renderer/reducers/keybindings-default.ts b/src/renderer/reducers/keybindings-default.tsindex f1ff35563..2b07cef97 100644--- a/src/renderer/reducers/keybindings-default.ts+++ b/src/renderer/reducers/keybindings-default.ts@@ -78,7 +78,7 @@ export default function keyBindings(isMacLike) {},{name: 'openSearch',- command: (isMacLike ? 'command' : 'ctrl') + '+f',+ command: (isMacLike ? 'command' : 'ctrl') + '+k',},{name: 'renameFile',