[squeak-dev] Unix keyboard events lose track when multiple keys pressed or keys held down

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun Jan 17 09:47:46 UTC 2021


IMO it's a mistake: we should always pass the keypress/release events as is
to the image, that's what raw events means to be. Composition shall alter
the keychar events only - that is some 1st level interpretation of the raw
events...

Le dim. 17 janv. 2021 à 07:15, tim Rowledge <tim at rowledge.org> a écrit :

>
>
> > On 2021-01-16, at 9:17 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> >
> > On Sat, Jan 16, 2021 at 04:03:45PM -0800, tim Rowledge wrote:
> >>
> >>
> >>> On 2021-01-16, at 3:33 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> >>> . The part I
> >>> can't figure out is how it could be working on any of the VMs.
> >>
> >> I can't see any case where it can work either but the code is so
> convoluted you need a native guide. The one thing I can see that might just
> possibly account for differences is the way that x2sqKey is a function
> pointer that can end up pointing to any of three routines depending upon
> assorted commandline options, environment variables and phase of a random
> selection of Jupiter's moons.
> >>
> >
> > Exactly right. Well it's not exactly a function of Jupiter's moons, but
> > pretty darn close.
> >
> > I've narrowed the issue down some more, and can offer at least a
> > workaround for Scratch.
> >
> > The reason that the key up events are being lost is that either the
> > LC_ALL or the LC_CTYPE environment variable is set. If you unset both of
> > these, the key up events will start working.
>
> That's interesting. I had tried manually specifying the x2sqKeyPlain by
> using `-nointl` but it looks like it gets over-ridden pretty quickly. I see
> that on my Pi
> `
> echo $LC_ALL
> en_US.UTF-8
> `
>
> So it looks like the big difference is use of XmbLookupString vs
> XLookupString. Since as mentioned "We can't use XmbLookupString() since
> that is undefined for key release events." I guess maybe we might try using
> XLookupString for handling key release events ? It will potentially be
> wrong for times when a composited character was used but it's really hard
> to imagine what *wouldn't* be wrong. Maybe one might take comfort in the
> thought that using a composited character within the sort of Scratch script
> that uses key states is pretty close to unimaginable. Actually...
> checking... yes, impossible since the usable keys are
> a-z,0-9,yp,down,left,right,space. Maybe there is something in that which
> can drive a useful heuristic?
>
> Thanks so much for digging into this Dave.
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> A flash of light, a cloud of dust, and...  What was the question?
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210117/c927a58e/attachment.html>


More information about the Squeak-dev mailing list