Mark ESC as handled so that it doesn't come back in CharacterHandler (#1974)
This commit is contained in:
parent
fa5b9b06bd
commit
a0782bfd6c
|
@ -258,6 +258,14 @@ bool Terminal::SendKeyEvent(const WORD vkey, const ControlKeyStates states)
|
|||
}
|
||||
}
|
||||
|
||||
// Manually handle Escape here. If we let it fall through, it'll come
|
||||
// back up through the character handler. It's registered as a translation
|
||||
// in TerminalInput, so we'll let TerminalInput control it.
|
||||
if (vkey == VK_ESCAPE)
|
||||
{
|
||||
ch = UNICODE_ESC;
|
||||
}
|
||||
|
||||
const bool manuallyHandled = ch != UNICODE_NULL;
|
||||
|
||||
KeyEvent keyEv{ true, 0, vkey, 0, ch, states.Value() };
|
||||
|
|
|
@ -27,6 +27,7 @@ Author(s):
|
|||
|
||||
// UNICODE_NULL is a Windows macro definition
|
||||
const wchar_t UNICODE_BACKSPACE = 0x8;
|
||||
const wchar_t UNICODE_ESC = 0x1b;
|
||||
const wchar_t UNICODE_DEL = 0x7f;
|
||||
// NOTE: This isn't actually a backspace. It's a graphical block. But
|
||||
// I believe it's emitted by one of our ANSI/OEM --> Unicode conversions.
|
||||
|
|
Loading…
Reference in a new issue