<br><br><div class="gmail_quote">On Wed, Jun 24, 2009 at 2:06 PM, Michael van der Gulik <span dir="ltr">&lt;<a href="mailto:mikevdg@gmail.com">mikevdg@gmail.com</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;">
Hi all.<br><br>I&#39;m writing my own EventSensor class (as part of Subcanvas: <a href="http://gulik.pbwiki.com/Canvas" target="_blank">http://gulik.pbwiki.com/Canvas</a>) and I&#39;m looking at what the VM is doing.<br><br>
When I press and release key under a recent Linux VM, I get three events:<br>
<br>#(2 512613 53 1 8 0 0 0)<br>#(2 512613 53 0 8 0 0 0)<br>#(2 512664 53 2 8 0 0 0)<br clear="all"><br>The fields are (for those that don&#39;t already know this):<br><br>1: type (2=keyboard), <br>2: timestamp, <br>3: character in Mac Roman encoding, <br>

4: key press/release (0=character, 1=press, 2=release)<br>5: modifiers (1=shift, 2=ctrl, 4=mac option, 8=cmd/alt)<br><font color="#888888"><br>
</font></blockquote></div><br>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><br>And why is the character repeated in the 6th field?<br clear="all"><br>Also, under the Windows VM, modifier key pressed and releases /are/ sent to the VM.<br><br>Gulik.<br><br>-- <br><a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a><br>