Release 970305
Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [*/*]
Completed transition to new Win32 types.
* [tools/build.c]
Changed CallTo16_regs to take a CONTEXT argument.
* [memory/virtual.c]
Rewrote Virtual* functions. Implemented CreateFileMapping and
OpenFileMapping. Broke MapViewOfFile ;-)
* [win32/k32obj.c]
Implemented named objects.
Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl>
* [misc/ole2nls.c] [resources/sysres_Pl.c]
Added Polish language support.
Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr>
* [windows/keyboard.c]
Wrote VkKeyScan and tested with Winword. Works ok except for dead
chars.
Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk>
* [graphics/win16drv/font.c] [graphics/win16drv/init.c]
[graphics/win16drv/obects.c]
Added start of SelectObject call for printer driver. Write should
now run with the printer driver enabled.
Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [debugger/*.c]
Re-added a disassembly command (list serves another functionality
now).
* [loader/pe_resource.c]
Added # support.
* [misc/ole2nls.c]
GetStringType* added.
* [objects/color.c]
VGA16 fixes.
* [windows/class.c]
Look for global widget classes too in GetClassInfo32.
* [windows/sysmetrics.c] [include/windows.h]
Added Win32 sysmetrics.
Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi>
* [documentation/languages]
The fourth case updated.
* [if1632/ntdll.spec]
Added some is* and to* functions.
Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk>
* [configure.in]
Add tests for wait4 and waitpid.
* [loader/signal.c]
Clean up OS-dependent code. I hope I got it right, :-)
* [tools/wineconf]
Recognise vfat file systems. Ignore floppy drives specified in
/etc/fstab.
* [files/*]
Fix function names in error messages.
Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be>
* [windows/keyboard.c] [windows/message.c]
Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9}
characters sets.
Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [controls/edit.c]
Fix incorrect arg order in LOCAL_Alloc() call.
Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c] [multimedia/mcistring.c]
Fixed bug related to device IDs returned by multimedia
system. Implemented mciGetDeviceID.
Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com>
* [debugger/dbg.y]
Do not dereference invalid expressions.
diff --git a/windows/keyboard.c b/windows/keyboard.c
index 8ed9eeb..d1c0c98 100644
--- a/windows/keyboard.c
+++ b/windows/keyboard.c
@@ -6,7 +6,7 @@
* Copyright 1997 David Faure
*
*/
-#define NO_TRANSITION_TYPES
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -731,7 +731,7 @@
*/
/* VkKeyScan translates an ANSI character to a virtual-key and shift code
* for the current keyboard.
- * FIXME high-order byte should yield :
+ * high-order byte yields :
* 0 Unshifted
* 1 Shift
* 2 Ctrl
@@ -739,21 +739,53 @@
* 6 Ctrl-Alt
* 7 Ctrl-Alt-Shift
* I.e. : Shift = 1, Ctrl = 2, Alt = 4.
+ * FIXME : works ok except for dead chars :
+ * VkKeyScan '^'(0x5e, 94) ... got keycode 00 ... returning 00
+ * VkKeyScan '`'(0x60, 96) ... got keycode 00 ... returning 00
*/
WORD VkKeyScan32A(CHAR cChar)
{
KeyCode keycode;
- dprintf_keyboard(stddeb,"VkKeyScan '%c'(%d) ",cChar,cChar);
-
-/* let's do this : char = keysym (for ANSI chars) -> keyc [ + shift ... (?? how ??)]
-keyc -> (keyc2vkey) vkey */
+ KeySym keysym;
+ int i,index;
+ int highbyte=0;
- keycode = XKeysymToKeycode(display, cChar & 0xFF);
+ /* char->keysym (same for ANSI chars) */
+ keysym=(unsigned char) cChar;/* (!) cChar is signed */
+ if (keysym<=27) keysym+=0xFF00;/*special chars : return, backspace...*/
- dprintf_keyboard(stddeb," ... got keycode 0x%x ... returning 0x%x\n",
- keycode,keyc2vkey[keycode]);
- return keyc2vkey[keycode];
+ keycode = XKeysymToKeycode(display, keysym); /* keysym -> keycode */
+ if (!keycode)
+ { /* It didn't work ... let's try with deadchar code. */
+ keycode = XKeysymToKeycode(display, keysym | 0xFE00);
+ }
+
+ dprintf_keyboard(stddeb,"VkKeyScan '%c'(%#lx, %lu) : got keycode %#.2x ",
+ cChar,keysym,keysym,keycode);
+
+ if (keycode)
+ {
+ for (index=-1, i=0; (i<8) && (index<0); i++) /* find shift state */
+ if (XKeycodeToKeysym(display,keycode,i)==keysym) index=i;
+ switch (index) {
+ case -1 :
+ fprintf(stderr,"Keysym %lx not found while parsing the keycode table\n",keysym); break;
+ case 0 : break;
+ case 1 : highbyte = 0x0100; break;
+ case 2 : highbyte = 0X0600; break;
+ default : fprintf(stderr,"index %d found by XKeycodeToKeysym. please report! \n",index);
+ }
+ /*
+ index : 0 adds 0x0000
+ index : 1 adds 0x0100 (shift)
+ index : ? adds 0x0200 (ctrl)
+ index : 2 adds 0x0600 (ctrl+alt)
+ index : ? adds 0x0700 (ctrl+alt+shit (used?))
+ */
+ }
+ dprintf_keyboard(stddeb," ... returning %#.2x\n", keyc2vkey[keycode]+highbyte);
+ return keyc2vkey[keycode]+highbyte; /* keycode -> (keyc2vkey) vkey */
}
/******************************************************************************
@@ -962,7 +994,7 @@
{
if ((e.keycode) && ((virtKey<0x10) || (virtKey>0x12)))
/* it's normal to have 2 shift, control, and alt ! */
- dprintf_keyboard(stddeb,"ToAscii : The keycodes %X and %X are matching the same vkey %X\n",
+ dprintf_keyboard(stddeb,"ToAscii : The keycodes %d and %d are matching the same vkey %#X\n",
e.keycode,keyc,virtKey);
e.keycode = keyc;
}
@@ -1002,26 +1034,62 @@
((char*)lpChar)[1] = '\0';
switch (keysym)
{
+ /* symbolic ASCII is the same as defined in rfc1345 */
case XK_dead_tilde :
case 0x1000FE7E : /* Xfree's XK_Dtilde */
- dead_char = '~';
+ dead_char = '~'; /* '? */
break;
case XK_dead_acute :
case 0x1000FE27 : /* Xfree's XK_Dacute_accent */
- dead_char = 0xb4;
+ dead_char = 0xb4; /* '' */
break;
case XK_dead_circumflex :
case 0x1000FE5E : /* Xfree's XK_Dcircumflex_accent */
- dead_char = '^';
+ dead_char = '^'; /* '> */
break;
case XK_dead_grave :
case 0x1000FE60 : /* Xfree's XK_Dgrave_accent */
- dead_char = '`';
+ dead_char = '`'; /* '! */
break;
case XK_dead_diaeresis :
case 0x1000FE22 : /* Xfree's XK_Ddiaeresis */
- dead_char = 0xa8;
+ dead_char = 0xa8; /* ': */
break;
+ case XK_dead_cedilla :
+ dead_char = 0xb8; /* ', */
+ break;
+ case XK_dead_macron :
+ dead_char = '-'; /* 'm isn't defined on iso-8859-x */
+ break;
+ case XK_dead_breve :
+ dead_char = 0xa2; /* '( */
+ break;
+ case XK_dead_abovedot :
+ dead_char = 0xff; /* '. */
+ break;
+ case XK_dead_abovering :
+ dead_char = '0'; /* '0 isn't defined on iso-8859-x */
+ break;
+ case XK_dead_doubleacute :
+ dead_char = 0xbd; /* '" */
+ break;
+ case XK_dead_caron :
+ dead_char = 0xb7; /* '< */
+ break;
+ case XK_dead_ogonek :
+ dead_char = 0xb2; /* '; */
+ break;
+/* FIXME: I don't know this three.
+ case XK_dead_iota :
+ dead_char = 'i';
+ break;
+ case XK_dead_voiced_sound :
+ dead_char = 'v';
+ break;
+ case XK_dead_semivoiced_sound :
+ dead_char = 's';
+ break;
+*/
}
if (dead_char)
{