codefrau / SqueakJS

A Squeak Smalltalk VM in Javascript
https://squeak.js.org
MIT License
380 stars 76 forks source link

Invalid keyboard events #167

Open LinqLover opened 6 months ago

LinqLover commented 6 months ago

The keyboard exerciser (from the objects bin > demo) does not work in SqueakJS because many (all?) events from the VM have a keyCode of 0:

image

codefrau commented 6 months ago

Huh. A key code makes little sense on a stroke event. What are the exact semantics for it? Squeak 5.0 did not have that, it was introduced more recently.

SqueakJS does not generate key up/down events, which is the only place where key codes make sense. Key stroke events work, I think they are valid. It looks like something in image event handling (or in your Keyboard Exerciser) assumes there are up/down events.