From 3455c396b8b3ba6a0a69e1a48cbcc40bf8c9f263 Mon Sep 17 00:00:00 2001 From: Andrew Kay Date: Tue, 18 Jun 2019 22:00:14 -0500 Subject: [PATCH] Explicitly ignore any modifier keys when mapping keys with the ALT modifier --- oec/emulator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/oec/emulator.py b/oec/emulator.py index 0b3db50..f2281b6 100644 --- a/oec/emulator.py +++ b/oec/emulator.py @@ -125,6 +125,12 @@ class VT100Emulator: def _map_key(self, key, keyboard_modifiers): if keyboard_modifiers.is_alt(): + # Ignore any modifiers... this would fall through and result in a warning + # if they are not explicitly ignored. + if key in [Key.LEFT_ALT, Key.RIGHT_ALT, Key.LEFT_SHIFT, Key.RIGHT_SHIFT, + Key.CAPS_LOCK]: + return None + bytes_ = VT100_KEY_MAP_ALT.get(key) if bytes_ is not None: