From a442d2675e20ba1a0d5b8ea3ebded22673fa8f1a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 23 Apr 2008 23:57:26 -0700 Subject: [PATCH] winex11: control + enter should generate '\n' instead of '\r'. --- dlls/winex11.drv/keyboard.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 5d48ce78e97..40c3e551ff3 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -2566,6 +2566,12 @@ INT X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, LPBYTE lpKeyState, lpChar[0] = 0; ret = 0; } + else if((lpKeyState[VK_CONTROL] & 0x80) /* Control is pressed */ + && (keysym == XK_Return || keysym == XK_KP_Enter)) + { + lpChar[0] = '\n'; + ret = 1; + } /* Hack to detect an XLookupString hard-coded to Latin1 */ if (ret == 1 && keysym >= 0x00a0 && keysym <= 0x00ff && (BYTE)lpChar[0] == keysym)