Mercurial > vim
diff src/gui_gtk_x11.c @ 22522:6c7e4db139a3 v8.2.1809
patch 8.2.1809: mapping some keys with Ctrl does not work properly
Commit: https://github.com/vim/vim/commit/4e2114e988f5d8635f2ad748be3cafcc44289138
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 7 16:12:37 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 07 Oct 2020 16:15:04 +0200 |
parents | 3845389725c9 |
children | 8623ab39b421 |
line wrap: on
line diff
--- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -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); - - // May remove the shift modifier if it's included in the 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. modifiers = may_remove_shift_modifier(modifiers, key); len = mb_char2bytes(key, string);