New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key shortcuts stop working #97

Closed
Viza74 opened this Issue Aug 23, 2018 · 11 comments

Comments

Projects
None yet
3 participants
@Viza74

Viza74 commented Aug 23, 2018

Unfortunately I can't provide repro, but sometimes the keys just stop responding. The program working, I can sue it with mouse, but no shortcuts work at all.
I experienced this with 0.3 or 0.3.1, I don't know if it is still happens in the newer ones

@nurpax

This comment has been minimized.

Show comment
Hide comment
@nurpax

nurpax Aug 23, 2018

Owner

I fixed a bug like that in 0.3.2 (#94).

Can you try with that?

Re-open this bug if you still hit this bug with 0.3.2.

Owner

nurpax commented Aug 23, 2018

I fixed a bug like that in 0.3.2 (#94).

Can you try with that?

Re-open this bug if you still hit this bug with 0.3.2.

@nurpax nurpax closed this Aug 23, 2018

@Viza74

This comment has been minimized.

Show comment
Hide comment
@Viza74

Viza74 Sep 1, 2018

It is in 0.4 too. At least in the preview from your dropbox.
Maybe it is connected to saving. I saved the file for the first time, and after that wasd and qe stopped working.

Ok, seems more complicated - now that I switched back to the program, the shortcuts working again... :-?

Hmm, I don't know how to re-open an issue, or I don't have the rights for or something, but hopefully you got a notification :)

Viza74 commented Sep 1, 2018

It is in 0.4 too. At least in the preview from your dropbox.
Maybe it is connected to saving. I saved the file for the first time, and after that wasd and qe stopped working.

Ok, seems more complicated - now that I switched back to the program, the shortcuts working again... :-?

Hmm, I don't know how to re-open an issue, or I don't have the rights for or something, but hopefully you got a notification :)

@nurpax

This comment has been minimized.

Show comment
Hide comment
@nurpax

nurpax Sep 1, 2018

Owner

Strange. I haven't hit that. But in my use I reload in dev mode often so I miss stuff like this.

If you have a simple repro please let me know. The ones that I was able to repro earlier did definitely go away with the changes I made for 0.3.2.

Owner

nurpax commented Sep 1, 2018

Strange. I haven't hit that. But in my use I reload in dev mode often so I miss stuff like this.

If you have a simple repro please let me know. The ones that I was able to repro earlier did definitely go away with the changes I made for 0.3.2.

@nurpax nurpax reopened this Sep 1, 2018

@nurpax

This comment has been minimized.

Show comment
Hide comment
@nurpax

nurpax Sep 1, 2018

Owner

It’s of course possible it’s a new regression.

The earlier problem was that alt and ctrl key up event was lost sometimes (due to Window manager eating that event). When you repro stuck keys, can you try if pressing either alt or ctrl fixes it and report here? (try to check which exact key fixes it).

I fixed this by resetting modifier key state when the app loses focus.

Shortcut code did change and input capture is quite messy nowadays.

Owner

nurpax commented Sep 1, 2018

It’s of course possible it’s a new regression.

The earlier problem was that alt and ctrl key up event was lost sometimes (due to Window manager eating that event). When you repro stuck keys, can you try if pressing either alt or ctrl fixes it and report here? (try to check which exact key fixes it).

I fixed this by resetting modifier key state when the app loses focus.

Shortcut code did change and input capture is quite messy nowadays.

@Viza74

This comment has been minimized.

Show comment
Hide comment
@Viza74

Viza74 Sep 1, 2018

Hmm, yeah could be lost key up event. I can't prove it with repo, but:

  • when I switched away and back to the program, the keys worked again - I used cmd+tab to switch between windows, so I definitely pressed the cmd key
  • I'm not completely sure, but the custom palette order switch shortcut still worked, but without the cmd key, just by pressing the numbers... I think. I don't know if I remember well or not.

Also, there is a new issue, I don't know if it is related to this, or a separete one, but it is connected to the keys - I enter it as a new issue.

Viza74 commented Sep 1, 2018

Hmm, yeah could be lost key up event. I can't prove it with repo, but:

  • when I switched away and back to the program, the keys worked again - I used cmd+tab to switch between windows, so I definitely pressed the cmd key
  • I'm not completely sure, but the custom palette order switch shortcut still worked, but without the cmd key, just by pressing the numbers... I think. I don't know if I remember well or not.

Also, there is a new issue, I don't know if it is related to this, or a separete one, but it is connected to the keys - I enter it as a new issue.

@nurpax

This comment has been minimized.

Show comment
Hide comment
@nurpax

nurpax Sep 1, 2018

Owner

Sounds like the cmd key gets stuck in down state (would explain your second bullet). I can't see why since the fix I did earlier for alt-tabbing on Windows (and ctrl-arrowing between desktops on macOS) should equally fix the cmd-tab since I clear all the modifer keys.

Owner

nurpax commented Sep 1, 2018

Sounds like the cmd key gets stuck in down state (would explain your second bullet). I can't see why since the fix I did earlier for alt-tabbing on Windows (and ctrl-arrowing between desktops on macOS) should equally fix the cmd-tab since I clear all the modifer keys.

@Viza74

This comment has been minimized.

Show comment
Hide comment
@Viza74

Viza74 Sep 1, 2018

Ok, it just happened again.
I doodled for a while, then clicked save (or save as?), gave it a filename, and when i was back at the main program, the wasd stopped working again. I can confirm that I can switching the palette orders simply with the number keys, without holding cmd.
Also can confirm, that simply swiching away, and back to the window fixed the issue. I did not even used cmd+tab, just clicked away, and then back.

Since this switch away and back fixed the issue, i did not have a chance to test if pressing the cmd would fix it.

Also, I tried to save/save as from a clean state, but that did not repeated the issue, so there must be something else too.

Viza74 commented Sep 1, 2018

Ok, it just happened again.
I doodled for a while, then clicked save (or save as?), gave it a filename, and when i was back at the main program, the wasd stopped working again. I can confirm that I can switching the palette orders simply with the number keys, without holding cmd.
Also can confirm, that simply swiching away, and back to the window fixed the issue. I did not even used cmd+tab, just clicked away, and then back.

Since this switch away and back fixed the issue, i did not have a chance to test if pressing the cmd would fix it.

Also, I tried to save/save as from a clean state, but that did not repeated the issue, so there must be something else too.

@nurpax

This comment has been minimized.

Show comment
Hide comment
@nurpax

nurpax Sep 1, 2018

Owner

So you clicked save from the menus (not CMD-S'd)?

I suspect it's some interaction where the CMD key is down and then something switches the focus away from the app (could be menus or switching apps), something that's not controlled by HTML/Javascript world.

Owner

nurpax commented Sep 1, 2018

So you clicked save from the menus (not CMD-S'd)?

I suspect it's some interaction where the CMD key is down and then something switches the focus away from the app (could be menus or switching apps), something that's not controlled by HTML/Javascript world.

@Viza74

This comment has been minimized.

Show comment
Hide comment
@Viza74

Viza74 Sep 1, 2018

yepp, bingo, seems to be exactly what you just said.

We have a repro:
It seems that i did used cmd+s to save - in a yet-unnamed file that brings up the file dialog to give it a name, and I guess thats the event, which takes away the focus from the main window, and eats the cmd up event.

So, just start petmate, press cmd+s, give a filename and save, and when you are back at drawing the wasd won't work

Viza74 commented Sep 1, 2018

yepp, bingo, seems to be exactly what you just said.

We have a repro:
It seems that i did used cmd+s to save - in a yet-unnamed file that brings up the file dialog to give it a name, and I guess thats the event, which takes away the focus from the main window, and eats the cmd up event.

So, just start petmate, press cmd+s, give a filename and save, and when you are back at drawing the wasd won't work

@nurpax

This comment has been minimized.

Show comment
Hide comment
@nurpax

nurpax Sep 1, 2018

Owner

Should be easy enough to fix that we have an easy repro. Already fixed all the other problems you reported, so maybe there will be a release out today, or at least a release candidate 2.

Owner

nurpax commented Sep 1, 2018

Should be easy enough to fix that we have an easy repro. Already fixed all the other problems you reported, so maybe there will be a release out today, or at least a release candidate 2.

@nurpax nurpax added the bug label Sep 2, 2018

nurpax added a commit that referenced this issue Sep 3, 2018

@Esshahn

This comment has been minimized.

Show comment
Hide comment
@Esshahn

Esshahn Sep 4, 2018

Collaborator

Fixed in latest. Recommend closing this and open new issues if the fix introduced new bugs.

Collaborator

Esshahn commented Sep 4, 2018

Fixed in latest. Recommend closing this and open new issues if the fix introduced new bugs.

@Esshahn Esshahn closed this Sep 4, 2018

@Esshahn Esshahn added this to the 0.5 milestone Sep 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment