Explicitly ignore any modifier keys when mapping keys with the ALT modifier

This commit is contained in:
Andrew Kay
2019-06-18 22:00:14 -05:00
parent b8346cd8fe
commit 3455c396b8

View File

@@ -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: