theia-ide / sprotty

A next-gen web-based graphics framework
Apache License 2.0
138 stars 23 forks source link

[keys] key events are processed twice on windows #150

Closed JanKoehnlein closed 7 years ago

JanKoehnlein commented 7 years ago

On windows, open the Chrome console and hit CTRL-C (or another magic sprotty key binding): The respective actions are dispatched twice.

JanKoehnlein commented 7 years ago

Reason is we get both key-up and key-down events and call the same method in KeyListener. On MacOS we get the key-up event only for the modifier key.

I changed it to use keyDown only.

https://github.com/theia-ide/sprotty/pull/151