Keyboard patch (rewind port)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:
  David Hammerton <david@transgaming.com>
  MapVirtualKey actually returns uppercase keys in Windows.

-- 
		 Lionel Ulmer - http://www.bbrox.org/
Index: dlls/x11drv/keyboard.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/keyboard.c,v
retrieving revision 1.3
diff -u -r1.3 keyboard.c
--- dlls/x11drv/keyboard.c	31 May 2002 23:40:57 -0000	1.3
+++ dlls/x11drv/keyboard.c	10 Jun 2002 19:53:39 -0000
@@ -1358,15 +1358,22 @@
 		        return 0; }
 
 		case 2: { /* vkey-code to unshifted ANSI code */
-			/* (was FIXME) : what does unshifted mean ? 'a' or 'A' ? */
-		        /* My Windows returns 'A'. */
+                        /* we still don't know what "unshifted" means. in windows VK_W (0x57)
+                         * returns 0x57, which is upercase 'W'. So we have to return the uppercase
+                         * key.. Looks like something is wrong with the MS docs?
+                         * This is only true for letters, for example VK_0 returns '0' not ')'.
+                         * - hence we use the lock mask to ensure this happens.
+                         */
 			/* let's do vkey -> keycode -> (XLookupString) ansi char */
 			XKeyEvent e;
 			KeySym keysym;
 			int keyc;
 			char s[2];
 			e.display = display;
-			e.state = 0; /* unshifted */
+
+			e.state = LockMask;
+			/* LockMask should behave exactly like caps lock - upercase
+			 * the letter keys and thats about it. */
 
 			e.keycode = 0;
 			/* We exit on the first keycode found, to speed up the thing. */

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux