Hi all,
I'm trying to fix bug 2400 - removes one char and puts comma simultaneously.
My guess: this old bug is in dlls/x11drv/keyboard.c or dlls/user/message.c, something about dead keys implementation.
Can somebody help me with a little explanation or documentation? I don't know what scancode, keycode and vkey mean.
Thanks, agaro
I know now what scancode, keycode and vkey are! :)
Some references: * ScanCode and KeyCode http://lct.sourceforge.net/lct/x60.html http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-2.html http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html * Virtual-Key Codes (vkey) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui...
I thought the problem was in TranslateMessage (dlls/user/message.c) and X11DRV_ToUnicodeEx (dlls/x11drv/keyboard.c) functions but I found others suspects: EVENT_event_to_vkey and X11DRV_InitKeyBoard (boths in dlls/x11drv/keyboard.c).
What is happening? (in brazilian abnt2 keyboard with wine-0.9.9)
The EVENT_event_to_vkey function return the wrong value 0x2E to X11DRV_KeyEvent which emits an event through X11DRV_send_keyboard_input.
On MSDN and dlls/user/spy.c VK_SEPARATOR virtual key code apears as 0x6C, however in trace below apears as 0x2E while in both cases keycodes are equals. The 0x2E virtual key code value corresponds to VK_DELETE.
My guess for now: X11DRV_InitKeyboard function initialize keyc2vkey array with wrong value for this case.
Trace ($ WINEDEBUG=+key wine winecfg) of NumPad Delete key with NumLock key activated:
trace:key:X11DRV_KeyEvent type 2, window a0000a, state 0x0010, keycode 0x005b trace:key:X11DRV_KeyEvent state = 10 nbyte = 1, status 0x4 trace:key:X11DRV_KeyEvent KeyPress : keysym=FFAC (KP_Separator), # of chars=1 / 0x2c / ',' trace:key:EVENT_event_to_vkey e->keycode = 5b trace:key:X11DRV_KeyEvent keycode 0x5b converted to vkey 0x2e trace:key:X11DRV_KeyEvent bScan = 0x53. trace:key:X11DRV_send_keyboard_input wParam=002e, lParam=00530001, InputKeyState=c1 trace:key:TranslateMessage Translating key VK_DELETE (002e), scancode 53 trace:key:GetKeyboardState (0x7faff024) trace:key:X11DRV_ToUnicodeEx (002E, 0053) : faked state = 0x0010 trace:key:EVENT_event_to_vkey e->keycode = 5b trace:key:X11DRV_ToUnicodeEx type 2, window a0000a, state 0x0010, keycode 0x005b trace:key:X11DRV_ToUnicodeEx Translating char 0x2c to unicode trace:key:X11DRV_ToUnicodeEx ToUnicode about to return 1 with char 2c trace:key:TranslateMessage 1 -> PostMessageW(0x10050,WM_CHAR,002c,00530001) trace:key:GetKeyState key (0x12) -> 0 trace:key:GetKeyState key (0x10) -> 0 trace:key:GetKeyState key (0x11) -> 0 trace:key:GetKeyState key (0x11) -> 0 trace:key:X11DRV_KeyEvent type 3, window a0000a, state 0x0010, keycode 0x005b trace:key:X11DRV_KeyEvent state = 10 nbyte = 0, status 0x1 trace:key:X11DRV_KeyEvent KeyRelease : keysym=0 (No Name), # of chars=0 / 0x00 / '' trace:key:EVENT_event_to_vkey e->keycode = 5b trace:key:X11DRV_KeyEvent keycode 0x5b converted to vkey 0x2e trace:key:X11DRV_KeyEvent bScan = 0x53. trace:key:X11DRV_send_keyboard_input wParam=002e, lParam=c0530001, InputKeyState=41
[]s agaro
Only posting here a litle news about this thread subject.
I sent an patch to fix this problem: http://www.winehq.org/pipermail/wine-patches/2006-March/024891.html
Works for your keyboard layout? Please, let me know! :)
[]s agaro
agaro schrieb:
Works for your keyboard layout? Please, let me know! :)
Fixes the bug in my german layout :-)
Sven
agaro wrote:
Only posting here a litle news about this thread subject. I sent an patch to fix this problem: http://www.winehq.org/pipermail/wine-patches/2006-March/024891.html Works for your keyboard layout? Please, let me know! :)
works great for croatian. hooray!