<br><div class="gmail_quote">On Wed, Jun 24, 2009 at 4:52 PM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Michael van der Gulik wrote:<br>
</div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On a random Windows VM I just found, I get even more interesting results:<br>
<br>
#(2 14856453 72 1 0 72 0 0)<br>
#(2 14856453 104 0 0 104 0 0)<br>
#(2 14856500 72 2 0 72 0 0)<br>
<br>
The character changes. I typed in a lower case &#39;h&#39;, but the VM returns an upper-case &#39;H&#39; (72) as the press and release field character, and a lower case &#39;h&#39; (104) in the character field.<br>
<br>
Why?<br>
</blockquote>
<br></div>
Look at your keyboard. Real close. What does the letter that is printed on the keyboard say? Does it say &quot;h&quot; or does it say &quot;H&quot;? ;-)<br>
<br>
When you press the &quot;H&quot; key (as it is denoted on your keyboard) the VM reports this as the &quot;H&quot; key which is then interpreted by Windows to be the lowercase &quot;h&quot; character, which it reports as well. Similarly, if you would press Shift-H, it would report that you pressed the shift key, the &quot;H&quot; key which then resulted in the uppercase &quot;H&quot; character. Makes sort of sense dunnit? ;-)</blockquote>
<div><br>Not any more :-). I found this: <a href="http://www.win.tue.nl/~aeb/linux/kbd/scancodes-14.html">http://www.win.tue.nl/~aeb/linux/kbd/scancodes-14.html</a><br><br>I think that using the USB scan codes would make more sense. It&#39;s a &quot;standard&quot;, although so far I&#39;ve only found Microsoft to be declaring it as such. I haven&#39;t investigated finding out if X11, Win32 and the Macintosh APIs allow you access to them directly, but if they don&#39;t, I can still convert the VM&#39;s &quot;characters&quot; for the key press and key release events to this standard. Using this &quot;standard&quot; means that the VM&#39;s input events are the same across all platforms.<br>
<br>I think I&#39;m satisfied that the scancodes are the same across the vast majority of modern keyboards around the world. There seems to be two types of hardware keyboards being made: a US one and a European one. The rest of the world&#39;s keyboards seem to be one of these two models with different printing on them. Let me know if this assumption is wrong.<br>
<br>International keyboard mappings:<br><a href="http://msdn.microsoft.com/en-gb/goglobal/bb964651.aspx">http://msdn.microsoft.com/en-gb/goglobal/bb964651.aspx</a><br><br></div></div>Gulik.<br clear="all"><br>-- <br><a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a><br>