Interpret escape as alt only if it's the escape byte

No need to take this code path when an unambiguous, prefix-free encoding is
used for the escape key.
This commit is contained in:
Johannes Altmanninger 2024-05-03 08:56:11 +02:00
parent e1eeb3177e
commit d855d1a2e6

View File

@ -683,7 +683,7 @@ impl EventQueuePeeker<'_> {
return false;
};
if WAIT_ON_ESCAPE_MS.load(Ordering::Relaxed) != 0
&& kevt.key == Key::from_raw(key::Escape)
&& kevt.seq == L!("\x1b")
&& key.modifiers == Modifiers::ALT
{
self.idx += 1;