comparison src/term.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 9bb1c984c4da
children f7f2d73ff85e
comparison
equal deleted inserted replaced
22521:3ab7a6685179 22522:6c7e4db139a3
4782 else 4782 else
4783 key = arg[2]; 4783 key = arg[2];
4784 4784
4785 modifiers = decode_modifiers(arg[1]); 4785 modifiers = decode_modifiers(arg[1]);
4786 4786
4787 // Some keys need adjustment when the Ctrl modifier is used.
4788 key = may_adjust_key_for_ctrl(modifiers, key);
4789
4787 // May remove the shift modifier if it's already included in the key. 4790 // May remove the shift modifier if it's already included in the key.
4788 modifiers = may_remove_shift_modifier(modifiers, key); 4791 modifiers = may_remove_shift_modifier(modifiers, key);
4789
4790 // When used with Ctrl we always make a letter upper case,
4791 // so that mapping <C-H> and <C-h> are the same. Typing
4792 // <C-S-H> also uses "H" but modifier is different.
4793 if ((modifiers & MOD_MASK_CTRL) && ASCII_ISALPHA(key))
4794 key = TOUPPER_ASC(key);
4795 4792
4796 // insert modifiers with KS_MODIFIER 4793 // insert modifiers with KS_MODIFIER
4797 new_slen = modifiers2keycode(modifiers, &key, string); 4794 new_slen = modifiers2keycode(modifiers, &key, string);
4798 4795
4799 if (has_mbyte) 4796 if (has_mbyte)