allow modifier-only hotkeys

This commit is contained in:
Eugene Pankov
2021-07-31 17:18:03 +02:00
parent 8b8bacdf69
commit 1fc57018e3
5 changed files with 154 additions and 68 deletions

View File

@@ -97,7 +97,7 @@ export default class TerminalModule { // eslint-disable-line @typescript-eslint/
htermHandler: 'onKeyUp_',
},
]
events.forEach((event) => {
events.forEach(event => {
const oldHandler = hterm.hterm.Keyboard.prototype[event.htermHandler]
hterm.hterm.Keyboard.prototype[event.htermHandler] = function (nativeEvent) {
hotkeys.pushKeystroke(event.name, nativeEvent)