diff src/gui_x11.c @ 20563:a5a24d688e11 v8.2.0835

patch 8.2.0835: Motif: mapping <C-bslash> still doesn't work Commit: https://github.com/vim/vim/commit/c998370562425e70f4cf202a87112d638f5f7b38 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 28 21:03:53 2020 +0200 patch 8.2.0835: Motif: mapping <C-bslash> still doesn't work Problem: Motif: mapping <C-bslash> still doesn't work. Solution: Accept CSI for K_SPECIAL. Do not apply CTRL to the character early. (closes #6150)
author Bram Moolenaar <Bram@vim.org>
date Thu, 28 May 2020 21:15:04 +0200
parents 2c808d01a9fd
children 64c1b0796c46
line wrap: on
line diff
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -920,7 +920,12 @@ gui_x11_key_hit_cb(
     if (ev_press->state & ShiftMask)
 	modifiers |= MOD_MASK_SHIFT;
     if (ev_press->state & ControlMask)
+    {
 	modifiers |= MOD_MASK_CTRL;
+	if (len == 1 && string[0] < 0x20)
+	    // Use the character before applyng CTRL.
+	    string[0] += 0x40;
+    }
     if (ev_press->state & Mod1Mask)
 	modifiers |= MOD_MASK_ALT;
     if (ev_press->state & Mod4Mask)