<br><div class="gmail_quote">On Wed, Jun 24, 2009 at 4:52 PM, Andreas Raab <span dir="ltr"><<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>></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 'h', but the VM returns an upper-case 'H' (72) as the press and release field character, and a lower case 'h' (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 "h" or does it say "H"? ;-)<br>
<br>
When you press the "H" key (as it is denoted on your keyboard) the VM reports this as the "H" key which is then interpreted by Windows to be the lowercase "h" character, which it reports as well. Similarly, if you would press Shift-H, it would report that you pressed the shift key, the "H" key which then resulted in the uppercase "H" 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's a "standard", although so far I've only found Microsoft to be declaring it as such. I haven't investigated finding out if X11, Win32 and the Macintosh APIs allow you access to them directly, but if they don't, I can still convert the VM's "characters" for the key press and key release events to this standard. Using this "standard" means that the VM's input events are the same across all platforms.<br>
<br>I think I'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'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>