Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
fix: Apply hack to allow to use ctrl-p on terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsmfm committed Aug 22, 2021
1 parent 24f40bb commit dbdebcd
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,16 @@ export class RemoteTerminalWidget extends TerminalWidgetImpl {

this.socket = this.createWebSocket(this.terminalApiEndPoint!);

const sendListener = (data: string) => this.socket.send(data);
const sendListener = (data: string) => {
this.socket.send(data);

// To use ctrl-p on terminal.
// On k8s with docker, ctrl-p ctrl-q is default detach keys and currently there's no way to customize.
// https://github.com/kubernetes/kubectl/issues/1011
if (data === '\u0010') {
this.socket.send('\u0000');
}
};

let onDataDisposeHandler: IDisposable;
this.socket.onopen = () => {
Expand Down

0 comments on commit dbdebcd

Please sign in to comment.