Skip to content

Commit

Permalink
Use keydown instead of keypress to close terminal
Browse files Browse the repository at this point in the history
This allows the terminal to be closed using the arrow keys. #37983
  • Loading branch information
CoenraadS authored Nov 19, 2017
1 parent f33a8b7 commit f32ed90
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}));
Expand Down

0 comments on commit f32ed90

Please sign in to comment.