[2/2] winex11.drv: Fix CTRL + Tab and CTRL + SHIFT + Return handling

Andre Wisplinghoff andre.wisplinghoff at gmail.com
Tue Jul 29 08:47:48 CDT 2008


Changelog:
    winex11.drv: CTRL + Tab and CTRL + SHIFT + Return handling fixed

---
 dlls/winex11.drv/keyboard.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index bf399c9..738de57 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -2614,11 +2614,12 @@ INT X11DRV_ToUnicodeEx(UINT virtKey, UINT 
scanCode, LPBYTE lpKeyState,
         }
 
         /* more areas where X returns characters but Windows does not
-           CTRL + number or CTRL + symbol */
+           CTRL + number, CTRL + symbol and CTRL + tab */
         if (e.state & ControlMask)
         {
             if (((keysym>=33) && (keysym < 'A')) ||
-                ((keysym > 'Z') && (keysym < 'a')))
+                ((keysym > 'Z') && (keysym < 'a')) ||
+                (keysym == XK_Tab))
             {
                 lpChar[0] = 0;
                 ret = 0;
@@ -2641,8 +2642,16 @@ INT X11DRV_ToUnicodeEx(UINT virtKey, UINT 
scanCode, LPBYTE lpKeyState,
     else if((lpKeyState[VK_CONTROL] & 0x80) /* Control is pressed */
         && (keysym == XK_Return || keysym == XK_KP_Enter))
         {
-            lpChar[0] = '\n';
-            ret = 1;
+            if(lpKeyState[VK_SHIFT] & 0x80) /* Shift is pressed */
+            {
+                lpChar[0] = 0;
+                ret = 0;
+            }
+            else
+            {
+                lpChar[0] = '\n';
+                ret = 1;
+            }
         }
 
         /* Hack to detect an XLookupString hard-coded to Latin1 */
-- 
1.5.6.4



More information about the wine-patches mailing list