nurpax / petmate

PETSCII editor with Electron/React/Redux
MIT License
181 stars 14 forks source link

alt/ctrl key state gets stuck when alt-tabbing (Windows) or ctrl-arrowing (Mac OS) between desktops #94

Closed nurpax closed 6 years ago

nurpax commented 6 years ago

What the title says.

Found by @supermuumi

nurpax commented 6 years ago

still buggy on Windows. after alt-tabbing out of the window and clicking the canvas to regain focus, the first click is with the alt key down which selects a char code. on an empty canvas it chooses an empty char after which painting uses the space char. this is confusing.

maybe better to clear modifier key state on mainwindow blur instead of focus. also not sure how regaining focus should work. should petmate eat up all click&key events until the app is in focus? (so that clicking canvas wouldn’t paint when clicking from blurred state to focused)