未验证 提交 f32ed90b 编写于 作者: C CoenraadS 提交者: GitHub

Use keydown instead of keypress to close terminal

This allows the terminal to be closed using the arrow keys. https://github.com/Microsoft/vscode/issues/37983
上级 f33a8b7b
......@@ -714,7 +714,7 @@ export class TerminalInstance implements ITerminalInstance {
}
private _attachPressAnyKeyToCloseListener() {
this._processDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'keypress', (event: KeyboardEvent) => {
this._processDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'keydown', (event: KeyboardEvent) => {
this.dispose();
event.preventDefault();
}));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册