Thank you all for your contribution.
ego-lay_atman-bay, I'm not able to reproduce the issue at will on my laptop keybord, yet it happens quite often by playing around with keys long enough.
@bh, I think you might be missing my point: I want the sprite to move say to the left as long as the player is keeping key A pressed down. So the script can't wait until A is released, hence what you're proposing doesn't apply to my case.
@dardoro, this could possibly play a role in my issue, but I think it is not the root cause. I made this short script to test my two keyboards, and indeed the Lenovo laptop one is missing several keypresses when I press multiple keys at the same time; I'd say that is more ore less a 2KRO. Also my Logitech desktop keyboard miss some keys, but it seems to be quite consistently a 4KRO. Varying the set of active keys produces different results, likely due to the underlying keyboard circuitry.
Testing WASD: all keys read correctly
Testing ZDT7P: the 7 key is lost in some combinations (rows 4 to 6)
Ghost key "A" in action: it can't be seen from the screenshot, of course, but the is reporting A continuously pressed even if it is not (see the log), and the sprite keeps moving to the left.
However, please note that I cannot relate my issue (a key is read as pressed even if it is not) to a specific combination of pressed keys, so I'm not totally sure that this is the root cause, since the "ghost" key is read as pressed only in Snap!. If I select the browser address bar, for instance, the ghost key doesn't propagate there, while in Snap! it survives also to pausing the script and resuming it.
Do you feel sure enough to exclude there could be something amiss in Snap! itself?
EDIT: I've found the following website that helps in testing a keyboard for KRO limit. As much as I'm trying to cause the stuck key issue there by pressing WASD combinations on my laptop keyboard, it doesn't happen.
http://random.xem.us/rollover.html
EDIT 2: I've ported the same script from Snap! to Scratch: on Scratch the stuck key issue does not happen, even though I'm using the same laptop.
Thanks!