wineconsole: Don't ignore extended keys.

Dmitry Timoshkov dmitry at codeweavers.com
Mon Oct 27 06:14:05 CDT 2008


This patch is a part of the fix for the bug 4558.
---
 programs/wineconsole/user.c |   33 +++++++++++++++------------------
 1 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c
index 01950a3..1c00f31 100644
--- a/programs/wineconsole/user.c
+++ b/programs/wineconsole/user.c
@@ -1035,26 +1035,23 @@ static void    WCUSER_GenerateKeyInputRecord(struct inner_data* data, BOOL down,
     if (lParam & (1L << 24))		ir.Event.KeyEvent.dwControlKeyState |= ENHANCED_KEY;
     if (sys)				ir.Event.KeyEvent.dwControlKeyState |= LEFT_ALT_PRESSED; /* FIXME: gotta choose one */
 
-    if (!(ir.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY))
+    if (down)
     {
-	if (down)
-	{
-	    switch (ToUnicode(wParam, HIWORD(lParam), keyState, buf, 2, 0))
-	    {
-	    case 2:
-		/* FIXME... should generate two events... */
-		/* fall thru */
-	    case 1:
-		last = buf[0];
-		break;
-	    default:
-		last = 0;
-		break;
-	    }
-	}
-	ir.Event.KeyEvent.uChar.UnicodeChar = last; /* FIXME: HACKY... and buggy because it should be a stack, not a single value */
-	if (!down) last = 0;
+        switch (ToUnicode(wParam, HIWORD(lParam), keyState, buf, 2, 0))
+        {
+        case 2:
+            /* FIXME... should generate two events... */
+            /* fall thru */
+        case 1:
+            last = buf[0];
+            break;
+        default:
+            last = 0;
+            break;
+        }
     }
+    ir.Event.KeyEvent.uChar.UnicodeChar = last; /* FIXME: HACKY... and buggy because it should be a stack, not a single value */
+    if (!down) last = 0;
 
     WriteConsoleInput(data->hConIn, &ir, 1, &n);
 }
-- 
1.6.0.3




More information about the wine-patches mailing list