Hi David,<br><br><div class="gmail_quote">On Wed, Jan 12, 2011 at 6:38 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
(changing subject line to reflect new topic)<br>
<br>
Thanks Matthew,<br>
<br>
This is now Mantis 7597: &quot;keyUp events reported incorrectly on SqueakVM&quot;.<br>
  <a href="http://bugs.squeak.org/view.php?id=7597" target="_blank">http://bugs.squeak.org/view.php?id=7597</a><br>
<br>
Eliot, by any chance do you recall fixing this? Symptoms are<br>
that a keyUp event is reported for the most recently depressed key,<br>
rather than for the key that is actually being released. It works<br>
properly on Cog, and has apparently been broken for some time on<br>
SqueakVM.<br></blockquote><div><br></div><div>Which platform?  I infer linux.  [Please can we be more informative in these discussions.  It&#39;s hard trying to follow all the VM bugs when people don&#39;t specify the platform. please :)]</div>
<div>I did do a fair amount of work on the linux keyboard handling for Teleplace&#39;s linux client.  Göran is finding out some &quot;infelicities&quot; in my code, like not answering the right release code for a shiftPress-keyPress-shiftRelease-keyRelease sequence.  So while it might be better than the standard VM it is far from perfect.  Also, the X11 keyboard handling code is, um, /complex/.  </div>
<div><br></div><div>On this tack, on the Mac I notice that the VM isn&#39;t sending key-down and key-up events separately but instead sends a key-down, key-up pair when a key is released, which makes it difficult to do raw keyboard stuff where one has to detect if the shift key is dow.  e.g. if one does shiftPress, keyPress, keyRelease, shiftRelease then that arrives in the image as keyPress, keyRelease, shiftPress, shiftRelease, and so the shift key appears /not/ to be pressed when the key is.  John, is there any fundamental reason why this is?  I see the Vm code is explicit about doing this but would anything (apart from lots of existing image code) break if it were fixed?  And is it fixed in the iOS code?</div>
<div><br></div><div>TIA</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Dave<br>
<br>
<br>
On Wed, Jan 12, 2011 at 08:30:47PM -0500, Matthew Fulmer wrote:<br>
&gt;<br>
&gt; On Wed, Jan 12, 2011 at 12:15:22PM -0500, David T. Lewis wrote:<br>
&gt; &gt;<br>
&gt; &gt; On Tue, Jan 11, 2011 at 12:45:14PM -0500, Matthew Fulmer wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; - Keyboard Up events are incorrect when multiple keys are<br>
&gt; &gt; &gt;   pressed at once. The latest vm&#39;s on <a href="http://squeakvm.org" target="_blank">squeakvm.org</a> fail,<br>
&gt; &gt; &gt;   however, they are nearing a year old, and the cog VMs (all<br>
&gt; &gt; &gt;   newer) don&#39;t have this bug.<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m not familiar with the Keyboard Up event issue. Can you say<br>
&gt; &gt; how to reproduce this, preferably with a Squeak trunk image?<br>
&gt; &gt; Sorry if this was discussed before, but I don&#39;t recall it.<br>
&gt; &gt;<br>
&gt; &gt; I was not anticipating any further changes to the interpreter VM<br>
&gt; &gt; until after this round of &quot;official&quot; builds, but this one sounds<br>
&gt; &gt; like it may be important.<br>
&gt;<br>
&gt; File in the attached changeset. (don&#39;t show keystroke events)<br>
&gt;<br>
&gt; do: &quot;HandMorph showEvents: true&quot;<br>
&gt;<br>
&gt; quickly, press A, press B, release A, release B.<br>
&gt;<br>
&gt; you should see these flash by the top-left corner of the screen,<br>
&gt; and on Cog, this is what you see:<br>
&gt;<br>
&gt;     [keyDown &#39;a&#39;]<br>
&gt;     [keyDown &#39;b&#39;]<br>
&gt;     [keyUp &#39;a&#39;]<br>
&gt;     [keyUp &#39;b&#39;]<br>
&gt;<br>
&gt; on the official VMs, you instead see this:<br>
&gt;<br>
&gt;     [keyDown &#39;a&#39;]<br>
&gt;     [keyDown &#39;b&#39;]<br>
&gt;     [keyUp &#39;b&#39;]<br>
&gt;<br>
&gt; (you can of course use any two keyboard buttons)<br>
&gt;<br>
&gt; It&#39;s an issue on mac and linux at least. Not sure about windows<br>
&gt;<br>
&gt; --<br>
&gt; Matthew Fulmer (a.k.a. Tapple)<br>
<br>
</blockquote></div><br>