Canonicalize <s-ascii> into uppercase in csi key parsing code

Fixes #4159
This commit is contained in:
Maxime Coste 2021-05-28 20:15:56 +10:00
parent e4a23a64fa
commit fb9dbfed2a

View File

@ -725,7 +725,13 @@ Optional<Key> NCursesUI::get_next_key()
auto masked_key = [&](Codepoint key) {
int mask = std::max(params[1] - 1, 0);
return Key{parse_mask(mask), key};
Key::Modifiers modifiers = parse_mask(mask);
if (is_basic_alpha(key) and (modifiers & Key::Modifiers::Shift))
{
modifiers &= ~Key::Modifiers::Shift;
key = to_upper(key);
}
return Key{modifiers, key};
};
switch (c)