From 7af1bf32d510ef5af7345c53f03ced304e65472d Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 16 Oct 2017 10:01:17 +1100 Subject: [PATCH] UX: switch global search trigger to ctrl+alt+s Otherwise it conflicts with firefox --- app/assets/javascripts/discourse/components/d-editor.js.es6 | 2 +- .../javascripts/discourse/lib/keyboard-shortcuts.js.es6 | 4 ++-- config/locales/client.en.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/components/d-editor.js.es6 b/app/assets/javascripts/discourse/components/d-editor.js.es6 index d661b26a219..441bfe4e87d 100644 --- a/app/assets/javascripts/discourse/components/d-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/d-editor.js.es6 @@ -233,7 +233,7 @@ export default Ember.Component.extend({ const shortcuts = this.get('toolbar.shortcuts'); // for some reason I am having trouble bubbling this so hack it in - mouseTrap.bind(['ctrl+shift+s','command+shift+s'], (event) =>{ + mouseTrap.bind(['ctrl+alt+s','command+alt+s'], (event) =>{ this.appEvents.trigger('header:keyboard-trigger', {type: 'search', event}); return true; }); diff --git a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 index 6ae50d04755..bf36a4a50cd 100644 --- a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 +++ b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 @@ -6,8 +6,8 @@ const bindings = { '!': {postAction: 'showFlags'}, '#': {handler: 'goToPost', anonymous: true}, '/': {handler: 'toggleSearch', anonymous: true}, - 'ctrl+shift+s': {handler: 'toggleSearch', anonymous: true}, - 'command+shift+s': {handler: 'toggleSearch', anonymous: true}, + 'ctrl+alt+s': {handler: 'toggleSearch', anonymous: true}, + 'command+alt+s': {handler: 'toggleSearch', anonymous: true}, '=': {handler: 'toggleHamburgerMenu', anonymous: true}, '?': {handler: 'showHelpModal', anonymous: true}, '.': {click: '.alert.alert-info.clickable', anonymous: true}, // show incoming/updated topics diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 548dd602802..8284adbcd5e 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2383,7 +2383,7 @@ en: hamburger_menu: '= Open hamburger menu' user_profile_menu: 'p Open user menu' show_incoming_updated_topics: '. Show updated topics' - search: '/ or ctrl+shift+s Search' + search: '/ or ctrl+alt+s Search' help: '? Open keyboard help' dismiss_new_posts: 'x, r Dismiss New/Posts' dismiss_topics: 'x, t Dismiss Topics'