comparison src/gui_gtk_x11.c @ 20935:d64520bfafa0 v8.2.1019

patch 8.2.1019: mapping <M-S-a> does not work in the GUI Commit: https://github.com/vim/vim/commit/ef6746f637adbdb6860b4fa0266c43c49fa498bc Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 20 14:43:23 2020 +0200 patch 8.2.1019: mapping <M-S-a> does not work in the GUI Problem: Mapping <M-S-a> does not work in the GUI. Solution: Move the logic to remove the shift modifier to may_remove_shift_modifier() and also use it in the GUI.
author Bram Moolenaar <Bram@vim.org>
date Sat, 20 Jun 2020 14:45:03 +0200
parents 9f5f64cc9720
children 64c1b0796c46
comparison
equal deleted inserted replaced
20934:f2f7fd76430e 20935:d64520bfafa0
1209 } 1209 }
1210 1210
1211 if (len == 0) // Unrecognized key 1211 if (len == 0) // Unrecognized key
1212 return TRUE; 1212 return TRUE;
1213 1213
1214 // Handle modifiers.
1215 modifiers = modifiers_gdk2vim(state);
1216
1217 // For some keys a shift modifier is translated into another key code. 1214 // For some keys a shift modifier is translated into another key code.
1218 if (len == -3) 1215 if (len == -3)
1219 key = TO_SPECIAL(string[1], string[2]); 1216 key = TO_SPECIAL(string[1], string[2]);
1220 else 1217 else
1221 key = string[0]; 1218 key = string[0];
1222 1219
1220 // Handle modifiers.
1221 modifiers = modifiers_gdk2vim(state);
1222
1223 // Recognize special keys.
1223 key = simplify_key(key, &modifiers); 1224 key = simplify_key(key, &modifiers);
1224 if (key == CSI) 1225 if (key == CSI)
1225 key = K_CSI; 1226 key = K_CSI;
1226 if (IS_SPECIAL(key)) 1227 if (IS_SPECIAL(key))
1227 { 1228 {
1233 else 1234 else
1234 { 1235 {
1235 // <C-H> and <C-h> mean the same thing, always use "H" 1236 // <C-H> and <C-h> mean the same thing, always use "H"
1236 if ((modifiers & MOD_MASK_CTRL) && ASCII_ISALPHA(key)) 1237 if ((modifiers & MOD_MASK_CTRL) && ASCII_ISALPHA(key))
1237 key = TOUPPER_ASC(key); 1238 key = TOUPPER_ASC(key);
1239
1240 // May remove the shift modifier if it's included in the key.
1241 modifiers = may_remove_shift_modifier(modifiers, key);
1242
1238 string[0] = key; 1243 string[0] = key;
1239 len = 1; 1244 len = 1;
1240 } 1245 }
1241 1246
1242 if (modifiers != 0) 1247 if (modifiers != 0)