Add emoji dropdown to list of shortcuts

Bug: Issue 11799
Change-Id: I704308e12f645f5a30c2abf3ff82ef4c3581281e
This commit is contained in:
Milutin Kristofic
2019-10-28 16:20:27 +01:00
parent f4eb899988
commit 3a2f4d177e
3 changed files with 9 additions and 0 deletions

View File

@@ -180,6 +180,7 @@ shortcuts are.
SEARCH: 'SEARCH',
SEND_REPLY: 'SEND_REPLY',
EMOJI_DROPDOWN: 'EMOJI_DROPDOWN',
};
const _help = new Map();
@@ -292,6 +293,8 @@ shortcuts are.
'Show/hide selected inline diff');
_describe(Shortcut.SEND_REPLY, ShortcutSection.REPLY_DIALOG, 'Send reply');
_describe(Shortcut.EMOJI_DROPDOWN, ShortcutSection.REPLY_DIALOG,
'Emoji dropdown');
// Must be declared outside behavior implementation to be accessed inside
// behavior functions.
@@ -423,6 +426,9 @@ shortcuts are.
}
describeBinding(binding) {
if (binding.length === 1) {
return [binding];
}
return binding.split(':')[0].split('+').map(part => {
switch (part) {
case 'shift':

View File

@@ -312,6 +312,7 @@
keyboardShortcuts() {
return {
[this.Shortcut.SEND_REPLY]: null, // DOC_ONLY binding
[this.Shortcut.EMOJI_DROPDOWN]: null, // DOC_ONLY binding
[this.Shortcut.REFRESH_CHANGE]: '_handleRefreshChange',
[this.Shortcut.OPEN_REPLY_DIALOG]: '_handleOpenReplyDialog',
[this.Shortcut.OPEN_DOWNLOAD_DIALOG]:

View File

@@ -170,6 +170,8 @@
_bindKeyboardShortcuts() {
this.bindShortcut(this.Shortcut.SEND_REPLY,
this.DOC_ONLY, 'ctrl+enter', 'meta+enter');
this.bindShortcut(this.Shortcut.EMOJI_DROPDOWN,
this.DOC_ONLY, ':');
this.bindShortcut(
this.Shortcut.OPEN_SHORTCUT_HELP_DIALOG, '?');