diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx index f34427ba88..5f276f1e7a 100644 --- a/src/components/structures/LoggedInView.tsx +++ b/src/components/structures/LoggedInView.tsx @@ -420,7 +420,7 @@ class LoggedInView extends React.Component { } break; case Key.F: - if (ctrlCmdOnly) { + if (ctrlCmdOnly && SettingsStore.getValue("ctrlFForSearch")) { dis.dispatch({ action: 'focus_search', }); diff --git a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js index 4d8493401e..a32549b326 100644 --- a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js @@ -52,6 +52,7 @@ export default class PreferencesUserSettingsTab extends React.Component { 'showImages', 'showChatEffects', 'Pill.shouldShowPillAvatar', + 'ctrlFForSearch', ]; static GENERAL_SETTINGS = [ diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index b239b809fe..fd03de1eb5 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -331,6 +331,11 @@ export const SETTINGS: {[setting: string]: ISetting} = { displayName: _td("Show typing notifications"), default: true, }, + "ctrlFForSearch": { + supportedLevels: LEVELS_ACCOUNT_SETTINGS, + displayName: isMac ? _td("Use Command + F to search") : _td("Use Ctrl + F to search"), + default: false, + }, "MessageComposerInput.ctrlEnterToSend": { supportedLevels: LEVELS_ACCOUNT_SETTINGS, displayName: isMac ? _td("Use Command + Enter to send a message") : _td("Use Ctrl + Enter to send a message"),