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

Commit 203780c

Browse files
committed
Apply hack to allow to use ctrl-p on terminal
1 parent 24f40bb commit 203780c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

extensions/eclipse-che-theia-terminal/src/browser/terminal-widget/remote-terminal-widget.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,16 @@ export class RemoteTerminalWidget extends TerminalWidgetImpl {
230230

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

233-
const sendListener = (data: string) => this.socket.send(data);
233+
const sendListener = (data: string) => {
234+
this.socket.send(data);
235+
236+
// To use ctrl-p on terminal.
237+
// On k8s with docker, ctrl-p ctrl-q is default detach keys and currently there's no way to customize.
238+
// https://github.com/kubernetes/kubectl/issues/1011
239+
if (data === "\u0010") {
240+
this.socket.send("\u0000");
241+
}
242+
};
234243

235244
let onDataDisposeHandler: IDisposable;
236245
this.socket.onopen = () => {

0 commit comments

Comments
 (0)