Module: wine Branch: master Commit: a442d2675e20ba1a0d5b8ea3ebded22673fa8f1a URL: http://source.winehq.org/git/wine.git/?a=commit;h=a442d2675e20ba1a0d5b8ea3eb...
Author: Lei Zhang thestig@google.com Date: Wed Apr 23 23:57:26 2008 -0700
winex11: control + enter should generate '\n' instead of '\r'.
---
dlls/winex11.drv/keyboard.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 5d48ce7..40c3e55 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)