On Wednesday 09 October 2002 14:25, Rizsanyi Zsolt wrote:
Hi!
When running MS Word 97 I get the next error messages when I try to write some of the Hungarian characters. So I'm reporting it as requested in the message :)
err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 01F5 (odoubleacute) : err:keyboard:X11DRV_ToUnicode (virtKey=DB,scanCode=1A,keycode=22,state=10) err:keyboard:X11DRV_ToUnicode Please report: no char for keysym 01FB (udoubleacute) : err:keyboard:X11DRV_ToUnicode (virtKey=DC,scanCode=2B,keycode=33,state=10)
Is it trivial to fix, or there are some problems with it? I would like if that could work... I'm also willing to code it if that is needed :)
I have investigated it, and the problem is in this code (from dlls/x11drv/keyboard.c):
else TRACE("Found keycode %d (0x%2X)\n",e.keycode,e.keycode);
ret = XLookupString(&e, (LPVOID)lpChar, 2, &keysym, NULL); wine_tsx11_unlock();
if (ret == 0) · { · BYTE dead_char;
· dead_char = KEYBOARD_MapDeadKeysym(keysym); · if (dead_char) · { · MultiByteToWideChar(main_key_tab[kbd_layout].layout_cp, 0, &dead_char, 1, bufW, bufW_siz e); · ret = -1; · } · else · { · char· *ksname;
· ksname = TSXKeysymToString(keysym); · if (!ksname) · · ksname = "No Name"; · if ((keysym >> 8) != 0xff) · · { · · ERR("Please report: no char for keysym %04lX (%s) :\n", keysym, ksname); · · ERR("(virtKey=%X,scanCode=%X,keycode=%X,state=%X)\n", virtKey, scanCode, e.keycode, e.state); · · } · } · }
The problems come from that the XLookupString is used to convert the keycode to the display string. It does properly display that the pressed key is odoubleacute, but because XLookupString works only for Latin1 characters, so the string representation is not returned.
I dont see how this situation should be handled. Maybe another X function should be used instead of XLookupString (one which works with chars other than Latin1).
I'm not too good in X programming so please HELP!!
Thanks Zsolt