diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-27 13:16:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-27 13:16:46 +0200 |
commit | daff0fb73851ef368ede180dbb3b772e55304ba7 (patch) | |
tree | f670323f2ceef7078bb26398eb8b72871f1e6046 /src/misc2.c | |
parent | bade44e5cad1b08c85d4a8ba08d94a30458dddfb (diff) | |
download | vim-git-daff0fb73851ef368ede180dbb3b772e55304ba7.tar.gz |
patch 8.2.1752: GTK GUI: cannot map alt-? with <A-?>v8.2.1752
Problem: GTK GUI: cannot map alt-? with <A-?>. (Ingo Karkat)
Solution: Adjust the characters for which the shift modifier is removed.
(closes #7016) Make Motif and Win32 use the same function as GTK.
Diffstat (limited to 'src/misc2.c')
-rw-r--r-- | src/misc2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/misc2.c b/src/misc2.c index 0370bdf0d..3781dd85d 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -2950,6 +2950,7 @@ find_special_key( * 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>. + * This includes all printable ASCII characters except numbers and a-z. */ int may_remove_shift_modifier(int modifiers, int key) @@ -2957,8 +2958,9 @@ may_remove_shift_modifier(int modifiers, int key) 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 <= '/') + || (key >= ':' && key <= 'Z') + || (key >= '[' && key <= '`') || (key >= '{' && key <= '~'))) return modifiers & ~MOD_MASK_SHIFT; return modifiers; |