1
0
forked from aniani/vim

patch 8.2.1809: mapping some keys with Ctrl does not work properly

Problem:    Mapping some keys with Ctrl does not work properly.
Solution:   For terminal, GTK and Motif handle "@", "^" and "_" codes.
This commit is contained in:
Bram Moolenaar
2020-10-07 16:12:37 +02:00
parent f12f0022e6
commit 4e2114e988
7 changed files with 56 additions and 10 deletions

View File

@@ -1236,11 +1236,10 @@ key_press_event(GtkWidget *widget UNUSED,
}
else
{
// <C-H> and <C-h> mean the same thing, always use "H"
if ((modifiers & MOD_MASK_CTRL) && ASCII_ISALPHA(key))
key = TOUPPER_ASC(key);
// Some keys need adjustment when the Ctrl modifier is used.
key = may_adjust_key_for_ctrl(modifiers, key);
// May remove the shift modifier if it's included in the key.
// May remove the Shift modifier if it's included in the key.
modifiers = may_remove_shift_modifier(modifiers, key);
len = mb_char2bytes(key, string);