patch for Bug 33051 - Ctrl+]/[ does not work in gvim

陈锦辉 chenjh_06 at hotmail.com
Sun Feb 24 20:14:46 CST 2013


The two keys is block by X11DRV_ToUnicodeEx. This patch make them work
correctly.

diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index 039d15b..36c404e 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -2664,6 +2664,18 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
            CTRL + number or CTRL + symbol */
         if (e.state & ControlMask)
         {
+	    if (keysym == '[')
+	    {
+                lpChar[0] = 0x1B;
+                ret = 1;
+	    }
+	    else
+	    if (keysym == ']')
+	    {
+                lpChar[0] = 0x1D;
+                ret = 1;
+	    }
+	    else
             if (((keysym>=33) && (keysym < 'A')) ||
                 ((keysym > 'Z') && (keysym < 'a')) ||
                 (keysym == XK_Tab))
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130225/12cca5fd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keyboard.patch
Type: text/x-patch
Size: 737 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130225/12cca5fd/attachment.bin>


More information about the wine-patches mailing list