nurpax / petmate

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

ESC doesn't always clear brush #161

Closed c64whiz closed 5 years ago

c64whiz commented 5 years ago

After using a brush, ESC doesn't always seem to clear the brush. I haven't been able to replicate this issue reliably. When it does happen (ESC doesn't clear the brush), it starts working again after I go to a different window and then bring focus back to Petmate. Could be a coincidence, so at this point, it's just an observation.

OS: Debian Linux 64 Petmate: v0.7.0 downloaded from Petmate web site

nurpax commented 5 years ago

Thanks for the report! There is indeed some kind of a keyboard focus bug in Petmate on Linux. I also discovered this just a while ago now that I mostly develop on Linux and not macOS. Mac had a similar bug earlier which I fixed but looks like Linux behaves differently here.

What window manager do you use? I use xfce.

@manuelvio you had this too?

Btw it’s not just ESC that’s broken for me but all keyboard shortcuts.

Will fix this for the next release.

manuelvio commented 5 years ago

Uhmm, nope, mostly due to the fact that I don't even reach the point of pressing esc if the brush shortcut doesn't work first. I just keep trying until I get them working.

nurpax commented 5 years ago

I just figured out an easy repro for this. Didn't try on mac or Windows, but on Linux this breaks keyboard shortcuts:

  1. Start petmate
  2. Open file ---> BOOM, shortcuts broken

If I don't open a file, the shortcuts seemed to work just fine.

nurpax commented 5 years ago

I think I just fixed it. Working well for me on Linux xfce now. This was an extremely annoying bug on Linux for me -- I found myself using Petmate in all sorts of wonky ways, trying to avoid keyboard shortcuts.

I'll make a release any day now that will include this fix and all that cool SEQ stuff.

nurpax commented 5 years ago

This was fixed already.