<br><font size=2 face="sans-serif">I just forgot. It also needs to include the VK_OEM_5 on the following constant:</font>
<br>
<br><font size=2 face="sans-serif">static const WORD main_key_vkey_qwerty[MAIN_LEN] =</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">/* NOTE: this layout must concur with the scan codes layout above */</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;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,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;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,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;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,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;VK_Z,VK_X,VK_C,VK_V,VK_B,VK_N,VK_M,VK_OEM_COMMA,VK_OEM_PERIOD,VK_OEM_2,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;VK_OEM_102, /* the 102nd key (actually to the right of l-shift) */</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;</font><font size=2 color=#ff1f35 face="sans-serif">VK_OEM_5, &nbsp; /* VK_OEM_5 used on Brasilian Keyboard) */</font>
<br><font size=2 face="sans-serif">};</font>
<br><font size=2 face="sans-serif"><br>
<br>
Mauro Carvalho Chehab<br>
,</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Mauro Carvalho Chehab &lt;mchehab@brturbo.com&gt;</b></font>
<p><font size=1 face="sans-serif">11/29/02 10:04 AM</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Para: &nbsp; &nbsp; &nbsp; &nbsp;wine-patches@winehq.com</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; &nbsp;Mauro Carvalho Chehab/BRT@BRT</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Assunto: &nbsp; &nbsp; &nbsp; &nbsp;Problems with ABNT2 Layout</font></table>
<br>
<br>
<br><font size=3 face="Times New Roman">Dear sirs,<br>
<br>
 &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 (&quot;\|&quot;). 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;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;I would also to ask how to use dead keys for generating accents. On Brasilian Portuguese keyboards, when you press </font><font size=3 color=red face="Times New Roman"><b>'a</b></font><font size=3 face="Times New Roman">, for example, it will convert to </font><font size=3 color=red face="Times New Roman"><b>�</b></font><font size=3 face="Times New Roman"> &nbsp;(a acute).<br>
</font><font size=3 face="Courier New"><br>
#define MAIN_LEN </font><font size=3 color=red face="Courier New"><b>49</b></font><font size=3 face="Courier New"><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;1 &nbsp; &nbsp;2 &nbsp; &nbsp;3 &nbsp; &nbsp;4 &nbsp; &nbsp;5 &nbsp; &nbsp;6 &nbsp; &nbsp;7 &nbsp; &nbsp;8 &nbsp; &nbsp;9 &nbsp; &nbsp;0 &nbsp; &nbsp;- &nbsp; &nbsp;= */<br>
 &nbsp; 0x29,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,<br>
 /* q &nbsp; &nbsp;w &nbsp; &nbsp;e &nbsp; &nbsp;r &nbsp; &nbsp;t &nbsp; &nbsp;y &nbsp; &nbsp;u &nbsp; &nbsp;i &nbsp; &nbsp;o &nbsp; &nbsp;p &nbsp; &nbsp;[ &nbsp; &nbsp;] */<br>
 &nbsp; 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,<br>
 /* a &nbsp; &nbsp;s &nbsp; &nbsp;d &nbsp; &nbsp;f &nbsp; &nbsp;g &nbsp; &nbsp;h &nbsp; &nbsp;j &nbsp; &nbsp;k &nbsp; &nbsp;l &nbsp; &nbsp;; &nbsp; &nbsp;' &nbsp; &nbsp;\ */<br>
 &nbsp; 0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x2B,<br>
 /* z &nbsp; &nbsp;x &nbsp; &nbsp;c &nbsp; &nbsp;v &nbsp; &nbsp;b &nbsp; &nbsp;n &nbsp; &nbsp;m &nbsp; &nbsp;, &nbsp; &nbsp;. &nbsp; &nbsp;/ */<br>
 &nbsp; 0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,<br>
 &nbsp; 0x56, /* the 102nd key (actually to the right of l-shift) */<br>
 &nbsp; </font><font size=3 color=red face="Courier New"><b>0x5e, /* VK_OEM_5 used on Brasilian Keyboard) */</b></font><font size=3 face="Courier New"><br>
};<br>
<br>
/*** 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;1 &nbsp; &nbsp; 2 &nbsp; &nbsp; 3 &nbsp; &nbsp; 4 &nbsp; &nbsp; 5 &nbsp; &nbsp; 6 &nbsp; &nbsp;7 &nbsp; &nbsp;8 &nbsp; &nbsp;9 &nbsp; &nbsp;0 &nbsp; &nbsp;- &nbsp; &nbsp;= */<br>
 &nbsp; &quot;'\&quot;�&quot;,&quot;1!�&quot;,&quot;2@�&quot;,&quot;3#�&quot;,&quot;4$�&quot;,&quot;5%�&quot;,&quot;6�&quot;,&quot;7&amp;&quot;,&quot;8*&quot;,&quot;9(&quot;,&quot;0)&quot;,&quot;-_&quot;,&quot;=+�&quot;,<br>
 /* q &nbsp; &nbsp;w &nbsp; &nbsp;e &nbsp; &nbsp;r &nbsp; &nbsp;t &nbsp; &nbsp;y &nbsp; &nbsp;u &nbsp; &nbsp;i &nbsp; &nbsp;o &nbsp; &nbsp;p &nbsp; &nbsp;� &nbsp; &nbsp;[ */<br>
 &nbsp; &quot;qQ&quot;,&quot;wW&quot;,&quot;eE&quot;,&quot;rR&quot;,&quot;tT&quot;,&quot;yY&quot;,&quot;uU&quot;,&quot;iI&quot;,&quot;oO&quot;,&quot;pP&quot;,&quot;�`&quot;,&quot;[{�&quot;,<br>
 /* a &nbsp; &nbsp;s &nbsp; &nbsp;d &nbsp; &nbsp;f &nbsp; &nbsp;g &nbsp; &nbsp;h &nbsp; &nbsp;j &nbsp; &nbsp;k &nbsp; &nbsp;l &nbsp; &nbsp;� &nbsp; &nbsp;~ &nbsp; &nbsp;] */<br>
 &nbsp; &quot;aA&quot;,&quot;sS&quot;,&quot;dD&quot;,&quot;fF&quot;,&quot;gG&quot;,&quot;hH&quot;,&quot;jJ&quot;,&quot;kK&quot;,&quot;lL&quot;,&quot;��&quot;,&quot;~^&quot;,&quot;]}�&quot;,</font><font size=3 face="Times New Roman">/* Keyboard translation tables */</font><font size=3 face="Courier New"><br>
 /* z &nbsp; &nbsp;x &nbsp; &nbsp;c &nbsp; &nbsp;v &nbsp; &nbsp;b &nbsp; &nbsp;n &nbsp; &nbsp;m &nbsp; &nbsp;, &nbsp; &nbsp;. &nbsp; &nbsp;; &nbsp; &nbsp;/ */<br>
 &nbsp; &quot;zZ&quot;,&quot;xX&quot;,&quot;cC&quot;,&quot;vV&quot;,&quot;bB&quot;,&quot;nN&quot;,&quot;mM&quot;,&quot;,&lt;&quot;,&quot;.&gt;&quot;,&quot;;:&quot;,&quot;/?�&quot;,<br>
 &nbsp;/* \ */</font><font size=3 color=red face="Courier New"><b><br>
 &nbsp; &nbsp;&quot;\\|&quot;</b></font><font size=3 face="Courier New"><br>
};</font><font size=3 face="Times New Roman"><br>
<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)</font>
<br><font size=3 face="Times New Roman">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>
</font>
<br>
<br>