[Vm-dev] Incorrect keyUp events on SqueakVM (was: Where are precompiled stack VMs or interpreter VMs?)

Eliot Miranda eliot.miranda at gmail.com
Thu Jan 13 02:47:05 UTC 2011


Hi David,

On Wed, Jan 12, 2011 at 6:38 PM, David T. Lewis <lewis at mail.msen.com> wrote:

>
> (changing subject line to reflect new topic)
>
> Thanks Matthew,
>
> This is now Mantis 7597: "keyUp events reported incorrectly on SqueakVM".
>  http://bugs.squeak.org/view.php?id=7597
>
> Eliot, by any chance do you recall fixing this? Symptoms are
> that a keyUp event is reported for the most recently depressed key,
> rather than for the key that is actually being released. It works
> properly on Cog, and has apparently been broken for some time on
> SqueakVM.
>

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 :)]
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/.

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?

TIA
Eliot


> Dave
>
>
> On Wed, Jan 12, 2011 at 08:30:47PM -0500, Matthew Fulmer wrote:
> >
> > On Wed, Jan 12, 2011 at 12:15:22PM -0500, David T. Lewis wrote:
> > >
> > > On Tue, Jan 11, 2011 at 12:45:14PM -0500, Matthew Fulmer wrote:
> > > >
> > > > - Keyboard Up events are incorrect when multiple keys are
> > > >   pressed at once. The latest vm's on squeakvm.org fail,
> > > >   however, they are nearing a year old, and the cog VMs (all
> > > >   newer) don't have this bug.
> > >
> > > I'm not familiar with the Keyboard Up event issue. Can you say
> > > how to reproduce this, preferably with a Squeak trunk image?
> > > Sorry if this was discussed before, but I don't recall it.
> > >
> > > I was not anticipating any further changes to the interpreter VM
> > > until after this round of "official" builds, but this one sounds
> > > like it may be important.
> >
> > File in the attached changeset. (don't show keystroke events)
> >
> > do: "HandMorph showEvents: true"
> >
> > quickly, press A, press B, release A, release B.
> >
> > you should see these flash by the top-left corner of the screen,
> > and on Cog, this is what you see:
> >
> >     [keyDown 'a']
> >     [keyDown 'b']
> >     [keyUp 'a']
> >     [keyUp 'b']
> >
> > on the official VMs, you instead see this:
> >
> >     [keyDown 'a']
> >     [keyDown 'b']
> >     [keyUp 'b']
> >
> > (you can of course use any two keyboard buttons)
> >
> > It's an issue on mac and linux at least. Not sure about windows
> >
> > --
> > Matthew Fulmer (a.k.a. Tapple)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110112/17a91dd6/attachment.htm


More information about the Vm-dev mailing list