From 8c6587d76806c6f6d276c99a2fd86d1af5451b52 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 22 Apr 2022 14:39:37 -0700 Subject: [PATCH] Send `p` instead of `\0` for `sendKeyPress` --- src/process.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/process.ts b/src/process.ts index 10a20e2d57..2a8dfcf05c 100644 --- a/src/process.ts +++ b/src/process.ts @@ -164,7 +164,11 @@ export class PowerShellProcess { } public sendKeyPress() { - this.consoleTerminal.sendText("\0", false); + // NOTE: This is a regular character instead of something like \0 + // because non-printing characters can cause havoc with different + // languages and terminal settings. We discard the character server-side + // anyway, so it doesn't matter what we send. + this.consoleTerminal.sendText("p", false); } private logTerminalPid(pid: number, exeName: string) {