hotkey: Move ctrl+[ back from cmd+[.

This was incorrectly changed; the goal here is to match what vim does
for this keyboard shortcut.

Fixes #9525.
This commit is contained in:
Tim Abbott
2018-05-24 08:29:53 -07:00
parent 3818a0ca3d
commit 5a5ca12f6f
2 changed files with 13 additions and 2 deletions

View File

@@ -47,9 +47,12 @@ var keydown_unshift_mappings = {
40: {name: 'down_arrow', message_view_only: false}, // down arrow
};
var keydown_ctrl_mappings = {
219: {name: 'escape', message_view_only: false}, // '['
};
var keydown_cmd_or_ctrl_mappings = {
75: {name: 'search_with_k', message_view_only: false}, // 'K'
219: {name: 'escape', message_view_only: false}, // '['
};
var keydown_either_mappings = {
@@ -113,6 +116,13 @@ exports.get_keydown_hotkey = function (e) {
var hotkey;
if (e.ctrlKey) {
hotkey = keydown_ctrl_mappings[e.which];
if (hotkey) {
return hotkey;
}
}
var isCmdOrCtrl = /Mac/i.test(navigator.userAgent) ? e.metaKey : e.ctrlKey;
if (isCmdOrCtrl) {
hotkey = keydown_cmd_or_ctrl_mappings[e.which];