<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The complex key up/down/char code is per Andreas historical intent for windows. &nbsp;See the commentary in&nbsp;<a href="http://isqueak.org/ioGetNextEvent">http://isqueak.org/ioGetNextEvent</a><div><br><div>The modifier keys were not an event on os-9, they were inferred by add them to mouse coordinate data which then would be processed by the event polling in the image.&nbsp;</div><div>On os-x those do come in as events, and we painfully attempt to adhere to the windows standard.</div><div><br></div><div>Also btw windows has many flaws for multi-stroke dead key input where you have to figure out the mac os key code, the virtual key, or the unicode. &nbsp;On the mac we can supply all three at any point, but were told that is impossible under windows. &nbsp;</div><div><br></div><div>Likely changes would cause tweak to die as it has a different opinion of how the intent of the character is arrived at versus squeak.&nbsp;</div><div><br></div><div><div><div><div>On 2011-01-12, at 6:47 PM, Eliot Miranda wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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: "keyUp events reported incorrectly on SqueakVM".<br>
 &nbsp;<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? &nbsp;I infer linux. &nbsp;[Please can we be more informative in these discussions. &nbsp;It's hard trying to follow all the VM bugs when people don't specify the platform. please :)]</div>
<div>I did do a fair amount of work on the linux keyboard handling for Teleplace's linux client. &nbsp;Göran is finding out some "infelicities" in my code, like not answering the right release code for a shiftPress-keyPress-shiftRelease-keyRelease sequence. &nbsp;So while it might be better than the standard VM it is far from perfect. &nbsp;Also, the X11 keyboard handling code is, um, /complex/. &nbsp;</div>
<div><br></div><div>On this tack, on the Mac I notice that the VM isn'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. &nbsp;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. &nbsp;John, is there any fundamental reason why this is? &nbsp;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? &nbsp;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; &nbsp; pressed at once. The latest vm's on <a href="http://squeakvm.org/" target="_blank">squeakvm.org</a> fail,<br>
&gt; &gt; &gt; &nbsp; however, they are nearing a year old, and the cog VMs (all<br>
&gt; &gt; &gt; &nbsp; newer) don't have this bug.<br>
&gt; &gt;<br>
&gt; &gt; I'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'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 "official" builds, but this one sounds<br>
&gt; &gt; like it may be important.<br>
&gt;<br>
&gt; File in the attached changeset. (don't show keystroke events)<br>
&gt;<br>
&gt; do: "HandMorph showEvents: true"<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; &nbsp; &nbsp; [keyDown 'a']<br>
&gt; &nbsp; &nbsp; [keyDown 'b']<br>
&gt; &nbsp; &nbsp; [keyUp 'a']<br>
&gt; &nbsp; &nbsp; [keyUp 'b']<br>
&gt;<br>
&gt; on the official VMs, you instead see this:<br>
&gt;<br>
&gt; &nbsp; &nbsp; [keyDown 'a']<br>
&gt; &nbsp; &nbsp; [keyDown 'b']<br>
&gt; &nbsp; &nbsp; [keyUp 'b']<br>
&gt;<br>
&gt; (you can of course use any two keyboard buttons)<br>
&gt;<br>
&gt; It'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>
</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">--</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">===========================================================================</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">John M. McIntosh &lt;<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>&gt; &nbsp; Twitter: &nbsp;squeaker68882</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Corporate Smalltalk Consulting Ltd.&nbsp;&nbsp;<a href="http://www.smalltalkconsulting.com">http://www.smalltalkconsulting.com</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">===========================================================================</font></div><div><br></div></div></div></div></div></div></span></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></div></div></body></html>