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

tim Rowledge tim at rowledge.org
Wed Jan 13 05:43:45 UTC 2021


One of the things I had to make for NuScratch was a keyboardlistener that keeps a bitmap of the keys currently pressed - quite a few Scratch things are state dependent rather than even responsive. It originally worked pretty well as far as anybody could ever see; I had no reports of problems for years.

Whilst trying to make a 5.3 version it seems that something is making it much less reliable. It is clear from some tracking code that if one holds down a key, presses and releases another key and then finally releases the initial key, that we are losing the  final expected  key-up of the held-down key. Which in turn leaves my keyboard listener thinking the key is still pressed. This is a Bad Thing. It causes me to lose games of Asteroid Blaster. I don't like to lose at Asteroid Blaster.

Looking at the unix VM keystroke handling code causes migraines. Has anybody got any idea what on earth is going on down there? I'll build a VM with the relevant debug code turned on soon but really... if anyone that knows this part could save some pain it would be very pleasant.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Hmm. That’s the second time today I’ve seen a Word doc eat a man’s soul. Time for a bug report...



More information about the Squeak-dev mailing list