<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. See the commentary in <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. </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. On the mac we can supply all three at any point, but were told that is impossible under windows. </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. </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"><<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>></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>
<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'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. Göran is finding out some "infelicities" 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'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>
><br>
> On Wed, Jan 12, 2011 at 12:15:22PM -0500, David T. Lewis wrote:<br>
> ><br>
> > On Tue, Jan 11, 2011 at 12:45:14PM -0500, Matthew Fulmer wrote:<br>
> > ><br>
> > > - Keyboard Up events are incorrect when multiple keys are<br>
> > > pressed at once. The latest vm's on <a href="http://squeakvm.org/" target="_blank">squeakvm.org</a> fail,<br>
> > > however, they are nearing a year old, and the cog VMs (all<br>
> > > newer) don't have this bug.<br>
> ><br>
> > I'm not familiar with the Keyboard Up event issue. Can you say<br>
> > how to reproduce this, preferably with a Squeak trunk image?<br>
> > Sorry if this was discussed before, but I don't recall it.<br>
> ><br>
> > I was not anticipating any further changes to the interpreter VM<br>
> > until after this round of "official" builds, but this one sounds<br>
> > like it may be important.<br>
><br>
> File in the attached changeset. (don't show keystroke events)<br>
><br>
> do: "HandMorph showEvents: true"<br>
><br>
> quickly, press A, press B, release A, release B.<br>
><br>
> you should see these flash by the top-left corner of the screen,<br>
> and on Cog, this is what you see:<br>
><br>
> [keyDown 'a']<br>
> [keyDown 'b']<br>
> [keyUp 'a']<br>
> [keyUp 'b']<br>
><br>
> on the official VMs, you instead see this:<br>
><br>
> [keyDown 'a']<br>
> [keyDown 'b']<br>
> [keyUp 'b']<br>
><br>
> (you can of course use any two keyboard buttons)<br>
><br>
> It's an issue on mac and linux at least. Not sure about windows<br>
><br>
> --<br>
> 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 <<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>> Twitter: 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. <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>