Workaround for Wine to produce dead-keys with Brazilian ABNT-2 keyboards

Mauro Carvalho Chehab - BrTurbo mchehab at brturbo.com
Mon Jan 6 07:17:12 CST 2003


Hi Rikki,

    My patch was designed to the brazilian ABNT-2 keyboard as a workaround.
On these keyboards we have two deak keys and <shift> <6> that produces
accented letters when followed by a vowel. It is also used in Brazil
standard US keyboards and some simbols are mapped as dead keys ("´`~^). My
patch doesn´t even fix this kind of keyboard. What my patch does is to force
the xkb to proccess that keys as dead keys.
    Does your keyboard works correclty on X sessions (using a standard
window manager - please notice that KDE has its own keyboard treatment
routines)? Maybe it is a question of editing the /etc/X11/XFConfig to use
your keymap.
    I suppose that the correct solution is to implement on keyboard.c a
specific dead key replacement code, and having specific dead key tables for
all keyboards, but it requires a major change that must be validated by
other wine users.

Cheers,

Mauro Carvalho Chehab

----- Original Message -----
From: "Richard Allen" <ra at ra.is>
To: "Mauro Carvalho Chehab" <mchehab at brturbo.com>
Sent: Friday, January 03, 2003 12:39 PM
Subject: Re: Workaround for Wine to produce dead-keys with Brazilian ABNT-2
keyboards


> Hola ;)
>
> Im trying to get the Icelandic dead (accented) keys to work.
> Your workaround did not do the trick, even tho the dead key on the IS
> keyboard is key 48 (2 buttons to the right from the L key).
>
> In vanilla wine, the dead key gave me a Z, but once your patch is
> applyed it does nothing :)   (A improvement) ;)
>
> When I press the dead key I get:
>
> trace:key:X11DRV_KeyEvent state = 0
> trace:key:X11DRV_KeyEvent KeyPress : keysym=FE51 (dead_acute), ascii
chars=1 / B4 / '´'
> trace:key:X11DRV_KeyEvent keycode 0x30 converted to vkey 0xde
> trace:key:X11DRV_KeyEvent bScan = 0x28.
> trace:key:queue_kbd_event  wParam=00de, lParam=00280001, InputKeyState=81
> trace:key:TranslateMessage (WM_KEYDOWN, 00DE, 00280001)
> trace:key:TranslateMessage Translating key VK_OEM_7 (00de), scancode 28
> trace:keyboard:X11DRV_ToUnicode AltGrMask = 0000
> trace:key:X11DRV_ToUnicode (00DE, 0028) : faked state = 0
> trace:keyboard:X11DRV_ToUnicode Found keycode 48 (0x30)
> trace:key:X11DRV_ToUnicode ToUnicode about to return -1 with char 17d
> trace:key:TranslateMessage -1 -> PostMessage(WM_DEADCHAR)
> trace:key:TranslateMessage (WM_DEADCHAR, 008E, 00280001)
> trace:key:X11DRV_KeyEvent state = 0
> trace:key:X11DRV_KeyEvent KeyRelease : keysym=FE51 (dead_acute), ascii
chars=1 / B4 / '´'
> trace:key:X11DRV_KeyEvent keycode 0x30 converted to vkey 0xde
> trace:key:X11DRV_KeyEvent bScan = 0x28.
> trace:key:queue_kbd_event  wParam=00de, lParam=c0280001, InputKeyState=1
> trace:key:TranslateMessage (WM_KEYUP, 00DE, C0280001)
>
>
>
>
>
> and then I press the "a" key and should get an "á":
>
> trace:key:X11DRV_KeyEvent state = 0
> trace:key:X11DRV_KeyEvent KeyPress : keysym=61 (a), ascii chars=1 / 61 /
'a'
> trace:key:X11DRV_KeyEvent keycode 0x26 converted to vkey 0x41
> trace:key:X11DRV_KeyEvent bScan = 0x1e.
> trace:key:queue_kbd_event  wParam=0041, lParam=001e0001, InputKeyState=81
> trace:key:TranslateMessage (WM_KEYDOWN, 0041, 001E0001)
> trace:key:TranslateMessage Translating key VK_A (0041), scancode 1e
> trace:keyboard:X11DRV_ToUnicode AltGrMask = 0000
> trace:key:X11DRV_ToUnicode (0041, 001E) : faked state = 0
> trace:keyboard:X11DRV_ToUnicode Found keycode 38 (0x26)
> trace:key:X11DRV_ToUnicode Translating char 0x61 from code page 28605 to
unicode
> trace:key:X11DRV_ToUnicode ToUnicode about to return 1 with char 61
> trace:key:TranslateMessage 1 -> PostMessage(WM_CHAR)
> trace:key:TranslateMessage (WM_CHAR, 0061, 001E0001)
> trace:key:X11DRV_KeyEvent state = 0
> trace:key:X11DRV_KeyEvent KeyRelease : keysym=61 (a), ascii chars=1 / 61 /
'a'
> trace:key:X11DRV_KeyEvent keycode 0x26 converted to vkey 0x41
> trace:key:X11DRV_KeyEvent bScan = 0x1e.
> trace:key:queue_kbd_event  wParam=0041, lParam=c01e0001, InputKeyState=1
> trace:key:TranslateMessage (WM_KEYUP, 0041, C01E0001)
>
>
>
> Do you see what I need to do to get this working ?
>
> Thanks in advance :)
>
>
> --
> Rikki.         --  RHCE, RHCX, HP-UX Certified Administrator.
>                --  Solaris 7 Certified Systems and Network Administrator.
> Bell Labs Unix --  Reach out and grep someone.
> Those who do not understand Unix are condemned to reinvent it, poorly.
>




More information about the wine-devel mailing list