Made search shortcut optional

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-01-17 16:44:29 +01:00
parent 8853508363
commit e7384f829a
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
3 changed files with 7 additions and 1 deletions

View file

@ -420,7 +420,7 @@ class LoggedInView extends React.Component<IProps, IState> {
}
break;
case Key.F:
if (ctrlCmdOnly) {
if (ctrlCmdOnly && SettingsStore.getValue("ctrlFForSearch")) {
dis.dispatch({
action: 'focus_search',
});

View file

@ -52,6 +52,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
'showImages',
'showChatEffects',
'Pill.shouldShowPillAvatar',
'ctrlFForSearch',
];
static GENERAL_SETTINGS = [

View file

@ -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"),