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

David T. Lewis lewis at mail.msen.com
Sun Jan 17 05:17:39 UTC 2021


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.

The reason that my interpreter VM showed the problem and Spur did not
is that the run script for the interpreter VM sets LC_ALL to the current
value of $LANG. The run script for the Spur VM does not do this.

The X11 VM display module provides three variations of x2sqKey() functions,
only one of which will be active. The default is x2sqKeyPlain(), which works as
expected for key up events. The x2sqKeyInput() variant is activated if
LC_ALL or LC_CTYPE are defined in then environment, and this function has
the missing key up event problem. The third variant, x2sqKeyCompositionInput(),
is active when the VM is started with the -compositioninput command line option
(or SQUEAK_COMPOSITIONINPUT environment variable is set). This also seems
to have the missing key up event problem.

Dave
 


More information about the Squeak-dev mailing list