summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/term.c b/src/term.c
index 1556c2eec..3bda87ccc 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4769,17 +4769,8 @@ handle_key_with_modifier(
modifiers = decode_modifiers(arg[1]);
- // Some keys already have Shift included, pass them as
- // normal keys. Not when Ctrl is also used, because <C-H>
- // and <C-S-H> are different.
- // Also for <A-S-a> and <M-S-a>.
- if ((modifiers == MOD_MASK_SHIFT
- || modifiers == (MOD_MASK_SHIFT | MOD_MASK_ALT)
- || modifiers == (MOD_MASK_SHIFT | MOD_MASK_META))
- && ((key >= '@' && key <= 'Z')
- || key == '^' || key == '_'
- || (key >= '{' && key <= '~')))
- modifiers &= ~MOD_MASK_SHIFT;
+ // May remove the shift modifier if it's already included in the key.
+ modifiers = may_remove_shift_modifier(modifiers, key);
// When used with Ctrl we always make a letter upper case,
// so that mapping <C-H> and <C-h> are the same. Typing