<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body text="#000000" link="#0000ee" alink="#0000ee" vlink="#551a8b">
Dear sirs,<br>
<br>
&nbsp;&nbsp;&nbsp; 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 &lt;ALT GR&gt; keycodes.<br>
<br>
&nbsp;&nbsp;&nbsp; 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.<br>
<br>
&nbsp;&nbsp;&nbsp; I would also to ask how to use dead keys for generating accents. On Brasilian
Portuguese keyboards, when you press <b><font color="#ff0000">'a</font></b>,
for example, it will convert to <b><font color="#ff0000">&aacute;</font></b> &nbsp;(a
acute).<br>
<br>
<tt>#define MAIN_LEN <b><font color="#ff0000">49</font></b><br>
static const WORD main_key_scan_qwerty[MAIN_LEN] =<br>
{<br>
/* this is my (102-key) keyboard layout, sorry if it doesn't quite match
yours */<br>
&nbsp;/* `&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp; 6&nbsp;&nbsp;&nbsp; 7&nbsp;&nbsp;&nbsp; 8&nbsp;&nbsp;&nbsp; 9&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp; = */<br>
&nbsp;&nbsp; 0x29,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,<br>
&nbsp;/* q&nbsp;&nbsp;&nbsp; w&nbsp;&nbsp;&nbsp; e&nbsp;&nbsp;&nbsp; r&nbsp;&nbsp;&nbsp; t&nbsp;&nbsp;&nbsp; y&nbsp;&nbsp;&nbsp; u&nbsp;&nbsp;&nbsp; i&nbsp;&nbsp;&nbsp; o&nbsp;&nbsp;&nbsp; p&nbsp;&nbsp;&nbsp; [&nbsp;&nbsp;&nbsp; ] */<br>
&nbsp;&nbsp; 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,<br>
&nbsp;/* a&nbsp;&nbsp;&nbsp; s&nbsp;&nbsp;&nbsp; d&nbsp;&nbsp;&nbsp; f&nbsp;&nbsp;&nbsp; g&nbsp;&nbsp;&nbsp; h&nbsp;&nbsp;&nbsp; j&nbsp;&nbsp;&nbsp; k&nbsp;&nbsp;&nbsp; l&nbsp;&nbsp;&nbsp; ;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp; \ */<br>
&nbsp;&nbsp; 0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x2B,<br>
&nbsp;/* z&nbsp;&nbsp;&nbsp; x&nbsp;&nbsp;&nbsp; c&nbsp;&nbsp;&nbsp; v&nbsp;&nbsp;&nbsp; b&nbsp;&nbsp;&nbsp; n&nbsp;&nbsp;&nbsp; m&nbsp;&nbsp;&nbsp; ,&nbsp;&nbsp;&nbsp; .&nbsp;&nbsp;&nbsp; / */<br>
&nbsp;&nbsp; 0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,<br>
&nbsp;&nbsp; 0x56, /* the 102nd key (actually to the right of l-shift) */<br>
&nbsp;&nbsp; <b><font color="#ff0000">0x5e, /* VK_OEM_5 used on Brasilian Keyboard)
*/</font></b><br>
};<br>
<br>
</tt><tt>/*** Brazilian ABNT-2 keyboard layout (contributed by Mauro Carvalho
Chehab) */<br>
static const char main_key_PT_br[MAIN_LEN][4] =<br>
{<br>
&nbsp;/* `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp; 6&nbsp;&nbsp;&nbsp; 7&nbsp;&nbsp;&nbsp; 8&nbsp;&nbsp;&nbsp; 9&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp; =
*/<br>
&nbsp;&nbsp; "'\"&sup1;","1!&sup2;","2@&sup3;","3#&pound;","4$&cent;","5%&not;","6&uml;","7&amp;","8*","9(","0)","-_","=+&sect;",<br>
&nbsp;/* q&nbsp;&nbsp;&nbsp; w&nbsp;&nbsp;&nbsp; e&nbsp;&nbsp;&nbsp; r&nbsp;&nbsp;&nbsp; t&nbsp;&nbsp;&nbsp; y&nbsp;&nbsp;&nbsp; u&nbsp;&nbsp;&nbsp; i&nbsp;&nbsp;&nbsp; o&nbsp;&nbsp;&nbsp; p&nbsp;&nbsp;&nbsp; &acute;&nbsp;&nbsp;&nbsp; [ */<br>
&nbsp;&nbsp; "qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","&acute;`","[{&ordf;",<br>
&nbsp;/* a&nbsp;&nbsp;&nbsp; s&nbsp;&nbsp;&nbsp; d&nbsp;&nbsp;&nbsp; f&nbsp;&nbsp;&nbsp; g&nbsp;&nbsp;&nbsp; h&nbsp;&nbsp;&nbsp; j&nbsp;&nbsp;&nbsp; k&nbsp;&nbsp;&nbsp; l&nbsp;&nbsp;&nbsp; &ccedil;&nbsp;&nbsp;&nbsp; ~&nbsp;&nbsp;&nbsp; ] */<br>
&nbsp;&nbsp; "aA","sS","dD","fF","gG","hH","jJ","kK","lL","&ccedil;&Ccedil;","~^","]}&ordm;",</tt>/* Keyboard
translation tables */<br>
<tt>&nbsp;/* z&nbsp;&nbsp;&nbsp; x&nbsp;&nbsp;&nbsp; c&nbsp;&nbsp;&nbsp; v&nbsp;&nbsp;&nbsp; b&nbsp;&nbsp;&nbsp; n&nbsp;&nbsp;&nbsp; m&nbsp;&nbsp;&nbsp; ,&nbsp;&nbsp;&nbsp; .&nbsp;&nbsp;&nbsp; ;&nbsp;&nbsp;&nbsp; / */<br>
&nbsp;&nbsp; "zZ","xX","cC","vV","bB","nN","mM",",&lt;",".&gt;",";:","/?&deg;",<br>
&nbsp; /* \ */<br>
<b><font color="#ff0000">&nbsp; &nbsp; "\\|"</font></b><br>
};<br>
</tt><br>
-----------------------------------------<br>
That is the logs for the 49 keycode:<br>
<br>
trace:key:X11DRV_KeyEvent state = 10<br>
trace:key:X11DRV_KeyEvent KeyPress : keysym=5C (backslash), ascii chars=1
/ 5C / '\'<br>
trace:key:X11DRV_KeyEvent keycode 0x5e converted to vkey 0xdc<br>
trace:key:X11DRV_KeyEvent bScan = 0x60.<br>
trace:key:queue_kbd_event&nbsp; wParam=00dc, lParam=00600001, InputKeyState=80<br>
trace:key:TranslateMessage (WM_KEYDOWN, 00DC, 00600001)<br>
trace:key:TranslateMessage Translating key VK_OEM_5 (00dc), scancode 60<br>
trace:keyboard:X11DRV_ToUnicode NumLockMask = 0010<br>
trace:keyboard:X11DRV_ToUnicode AltGrMask = 0000<br>
trace:key:X11DRV_ToUnicode (00DC, 0060) : faked state = 10<br>
trace:keyboard:X11DRV_ToUnicode Found keycode 51 (0x33)<br>
trace:key:X11DRV_ToUnicode Translating char 0x5d from code page 28591 to
unicode<br>
trace:key:X11DRV_ToUnicode ToUnicode about to return 1 with char 5d <br>
trace:key:TranslateMessage 1 -&gt; PostMessage(WM_CHAR)<br>
trace:key:TranslateMessage (WM_CHAR, 005D, 00600001)<br>
trace:key:X11DRV_KeyEvent state = 10<br>
trace:key:X11DRV_KeyEvent KeyRelease : keysym=5C (backslash), ascii chars=1
/ 5C / '\'<br>
trace:key:X11DRV_KeyEvent keycode 0x5e converted to vkey 0xdc<br>
trace:key:X11DRV_KeyEvent bScan = 0x60.<br>
trace:key:queue_kbd_event&nbsp; wParam=00dc, lParam=c0600001, InputKeyState=0<br>
trace:key:TranslateMessage (WM_KEYUP, 00DC, C0600001)<br>
trace:key:X11DRV_KeyEvent state = 10<br>
<br>
<br>
</body>
</html>