Re: Problems with ABNT2 Layout

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

 




I just forgot. It also needs to include the VK_OEM_5 on the following constant:

static const WORD main_key_vkey_qwerty[MAIN_LEN] =
{
/* NOTE: this layout must concur with the scan codes layout above */
   VK_OEM_3,VK_1,VK_2,VK_3,VK_4,VK_5,VK_6,VK_7,VK_8,VK_9,VK_0,VK_OEM_MINUS,VK_OEM_PLUS,
   VK_Q,VK_W,VK_E,VK_R,VK_T,VK_Y,VK_U,VK_I,VK_O,VK_P,VK_OEM_4,VK_OEM_6,
   VK_A,VK_S,VK_D,VK_F,VK_G,VK_H,VK_J,VK_K,VK_L,VK_OEM_1,VK_OEM_7,VK_OEM_5,
   VK_Z,VK_X,VK_C,VK_V,VK_B,VK_N,VK_M,VK_OEM_COMMA,VK_OEM_PERIOD,VK_OEM_2,
   VK_OEM_102, /* the 102nd key (actually to the right of l-shift) */
   VK_OEM_5,   /* VK_OEM_5 used on Brasilian Keyboard) */
};


Mauro Carvalho Chehab
,



Mauro Carvalho Chehab <mchehab@brturbo.com>

11/29/02 10:04 AM

       
        Para:        wine-patches@winehq.com
        cc:        Mauro Carvalho Chehab/BRT@BRT
        Assunto:        Problems with ABNT2 Layout



Dear sirs,

   There's a missing key on the ABNT2 Layout. The Brasilian Keyboard uses 49 keys instead of only 48 for the others. It uses the key named VT_OEM_5 as backslash key ("\|"). The keyboard.c has the correct definitions for lowercase and uppercase for the first 48 keys, but i couldn't find a way to map the last one. It also lacks the <ALT GR> keycodes.

   I'm sending bellow the complete keycodes. I also included the 49 keycode, but it requires some changes inside the keyboard.c to operate with the last one, as stated on the following lines.

   I would also to ask how to use dead keys for generating accents. On Brasilian Portuguese keyboards, when you press
'a, for example, it will convert to á  (a acute).

#define MAIN_LEN
49
static const WORD main_key_scan_qwerty[MAIN_LEN] =
{
/* this is my (102-key) keyboard layout, sorry if it doesn't quite match yours */
/* `    1    2    3    4    5    6    7    8    9    0    -    = */
  0x29,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,
/* q    w    e    r    t    y    u    i    o    p    [    ] */
  0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,
/* a    s    d    f    g    h    j    k    l    ;    '    \ */
  0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x2B,
/* z    x    c    v    b    n    m    ,    .    / */
  0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,
  0x56, /* the 102nd key (actually to the right of l-shift) */
 
0x5e, /* VK_OEM_5 used on Brasilian Keyboard) */
};

/*** Brazilian ABNT-2 keyboard layout (contributed by Mauro Carvalho Chehab) */
static const char main_key_PT_br[MAIN_LEN][4] =
{
/* `      1     2     3     4     5     6    7    8    9    0    -    = */
  "'\"¹","1!²","2@³","3#£","4$¢","5%¬","6¨","7&","8*","9(","0)","-_","=+§",
/* q    w    e    r    t    y    u    i    o    p    ´    [ */
  "qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","´`","[{ª",
/* a    s    d    f    g    h    j    k    l    ç    ~    ] */
  "aA","sS","dD","fF","gG","hH","jJ","kK","lL","çÇ","~^","]}º",
/* Keyboard translation tables */
/* z    x    c    v    b    n    m    ,    .    ;    / */
  "zZ","xX","cC","vV","bB","nN","mM",",<",".>",";:","/?°",
 /* \ */

   "\\|"

};


-----------------------------------------
That is the logs for the 49 keycode:

trace:key:X11DRV_KeyEvent state = 10
trace:key:X11DRV_KeyEvent KeyPress : keysym=5C (backslash), ascii chars=1 / 5C / '\'
trace:key:X11DRV_KeyEvent keycode 0x5e converted to vkey 0xdc
trace:key:X11DRV_KeyEvent bScan = 0x60.
trace:key:queue_kbd_event  wParam=00dc, lParam=00600001, InputKeyState=80
trace:key:TranslateMessage (WM_KEYDOWN, 00DC, 00600001)

trace:key:TranslateMessage Translating key VK_OEM_5 (00dc), scancode 60
trace:keyboard:X11DRV_ToUnicode NumLockMask = 0010
trace:keyboard:X11DRV_ToUnicode AltGrMask = 0000
trace:key:X11DRV_ToUnicode (00DC, 0060) : faked state = 10
trace:keyboard:X11DRV_ToUnicode Found keycode 51 (0x33)
trace:key:X11DRV_ToUnicode Translating char 0x5d from code page 28591 to unicode
trace:key:X11DRV_ToUnicode ToUnicode about to return 1 with char 5d
trace:key:TranslateMessage 1 -> PostMessage(WM_CHAR)
trace:key:TranslateMessage (WM_CHAR, 005D, 00600001)
trace:key:X11DRV_KeyEvent state = 10
trace:key:X11DRV_KeyEvent KeyRelease : keysym=5C (backslash), ascii chars=1 / 5C / '\'
trace:key:X11DRV_KeyEvent keycode 0x5e converted to vkey 0xdc
trace:key:X11DRV_KeyEvent bScan = 0x60.
trace:key:queue_kbd_event  wParam=00dc, lParam=c0600001, InputKeyState=0
trace:key:TranslateMessage (WM_KEYUP, 00DC, C0600001)
trace:key:X11DRV_KeyEvent state = 10




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

  Powered by Linux