FEATURE: allow ctrl+shift+s to open search
This commit is contained in:
parent
dc4d5677eb
commit
889b99552a
|
@ -236,7 +236,7 @@ export default Ember.Component.extend({
|
||||||
const shortcuts = this.get('toolbar.shortcuts');
|
const shortcuts = this.get('toolbar.shortcuts');
|
||||||
|
|
||||||
// for some reason I am having trouble bubbling this so hack it in
|
// for some reason I am having trouble bubbling this so hack it in
|
||||||
mouseTrap.bind(['ctrl+/','command+/'], (event) =>{
|
mouseTrap.bind(['ctrl+shift+s','command+shift+s'], (event) =>{
|
||||||
this.appEvents.trigger('header:keyboard-trigger', {type: 'search', event});
|
this.appEvents.trigger('header:keyboard-trigger', {type: 'search', event});
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,8 +6,8 @@ const bindings = {
|
||||||
'!': {postAction: 'showFlags'},
|
'!': {postAction: 'showFlags'},
|
||||||
'#': {handler: 'goToPost', anonymous: true},
|
'#': {handler: 'goToPost', anonymous: true},
|
||||||
'/': {handler: 'toggleSearch', anonymous: true},
|
'/': {handler: 'toggleSearch', anonymous: true},
|
||||||
'ctrl+/': {handler: 'toggleSearch', anonymous: true},
|
'ctrl+shift+s': {handler: 'toggleSearch', anonymous: true},
|
||||||
'command+/': {handler: 'toggleSearch', anonymous: true},
|
'command+shift+s': {handler: 'toggleSearch', anonymous: true},
|
||||||
'=': {handler: 'toggleHamburgerMenu', anonymous: true},
|
'=': {handler: 'toggleHamburgerMenu', anonymous: true},
|
||||||
'?': {handler: 'showHelpModal', anonymous: true},
|
'?': {handler: 'showHelpModal', anonymous: true},
|
||||||
'.': {click: '.alert.alert-info.clickable', anonymous: true}, // show incoming/updated topics
|
'.': {click: '.alert.alert-info.clickable', anonymous: true}, // show incoming/updated topics
|
||||||
|
|
|
@ -181,6 +181,7 @@ export default createWidget('search-menu', {
|
||||||
// add a link and focus composer
|
// add a link and focus composer
|
||||||
|
|
||||||
this.appEvents.trigger('composer:insert-text', focused[0].href, {ensureSpace: true});
|
this.appEvents.trigger('composer:insert-text', focused[0].href, {ensureSpace: true});
|
||||||
|
this.appEvents.trigger('header:keyboard-trigger', {type: 'search'});
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$('#reply-control.open textarea').focus();
|
$('#reply-control.open textarea').focus();
|
||||||
|
|
|
@ -2376,7 +2376,7 @@ en:
|
||||||
hamburger_menu: '<b>=</b> Open hamburger menu'
|
hamburger_menu: '<b>=</b> Open hamburger menu'
|
||||||
user_profile_menu: '<b>p</b> Open user menu'
|
user_profile_menu: '<b>p</b> Open user menu'
|
||||||
show_incoming_updated_topics: '<b>.</b> Show updated topics'
|
show_incoming_updated_topics: '<b>.</b> Show updated topics'
|
||||||
search: '<b>/</b> or <b>ctrl</b>+<b>/</b> Search'
|
search: '<b>/</b> or <b>ctrl</b>+<b>shift</b>+<b>s</b> Search'
|
||||||
help: '<b>?</b> Open keyboard help'
|
help: '<b>?</b> Open keyboard help'
|
||||||
dismiss_new_posts: '<b>x</b>, <b>r</b> Dismiss New/Posts'
|
dismiss_new_posts: '<b>x</b>, <b>r</b> Dismiss New/Posts'
|
||||||
dismiss_topics: '<b>x</b>, <b>t</b> Dismiss Topics'
|
dismiss_topics: '<b>x</b>, <b>t</b> Dismiss Topics'
|
||||||
|
|
Loading…
Reference in New Issue