| 74 | }, |
| 75 | |
| 76 | getKeyCharString(event) { |
| 77 | let keyChar = this.getKeyChar(event); |
| 78 | if (!keyChar) { |
| 79 | return; |
| 80 | } |
| 81 | |
| 82 | const modifiers = []; |
| 83 | |
| 84 | if (event.shiftKey && (keyChar.length === 1)) keyChar = keyChar.toUpperCase(); |
| 85 | // These must be in alphabetical order (to match the sorted modifier order in |
| 86 | // Commands.normalizeKey). |
| 87 | if (event.altKey) modifiers.push("a"); |
| 88 | if (event.ctrlKey) modifiers.push("c"); |
| 89 | if (event.metaKey) modifiers.push("m"); |
| 90 | if (event.shiftKey && (keyChar.length > 1)) modifiers.push("s"); |
| 91 | |
| 92 | keyChar = [...modifiers, keyChar].join("-"); |
| 93 | if (1 < keyChar.length) keyChar = `<${keyChar}>`; |
| 94 | keyChar = mapKeyRegistry[keyChar] != null ? mapKeyRegistry[keyChar] : keyChar; |
| 95 | return keyChar; |
| 96 | }, |
| 97 | |
| 98 | isEscape: (function () { |
| 99 | let useVimLikeEscape = true; |