From b7c33974713263af7caaa686730817d8268c48b4 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Thu, 9 Dec 2021 13:14:43 -0800 Subject: [PATCH] Clear unprocessed dead key state on input or press Fixes #3573 --- src/browser/Terminal.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/browser/Terminal.ts b/src/browser/Terminal.ts index 23122f3f..130cb3db 100644 --- a/src/browser/Terminal.ts +++ b/src/browser/Terminal.ts @@ -1169,6 +1169,10 @@ export class Terminal extends CoreTerminal implements ITerminal { this._keyPressHandled = true; + // The key was handled so clear the dead key state, otherwise certain keystrokes like arrow + // keys could be ignored + this._unprocessedDeadKey = false; + return true; } @@ -1186,6 +1190,10 @@ export class Terminal extends CoreTerminal implements ITerminal { return false; } + // The key was handled so clear the dead key state, otherwise certain keystrokes like arrow + // keys could be ignored + this._unprocessedDeadKey = false; + const text = ev.data; this.coreService.triggerDataEvent(text, true);