Problems with ABNT2 Layout

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

 



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