pencil icon indicating copy to clipboard operation
pencil copied to clipboard

Certain keyboard shortcuts without modifiers appear broken while focus is on a text input

Open Kaikogf opened this issue 4 years ago • 6 comments

Issue Summary

When changing the default Onion Skins visualization from "1" to a different number, it will make shortcuts keys NextFrame "." and PreviousFrame ";" to stop working.

Steps to reproduce

Open Pencil2D Have several frames on the timeline. There is no need to activate Onion Skins. Confirm that the shortcuts "." and "," are working. Now change the number of "previous frames" or "next frames" on the Onion Skins' panel. Those shortcuts will stop working after that. You have to click on "activate onion skins" for them to work again.

System Information

  • Pencil2D Version: Nightly Build 07thDec2020
  • Operating System: Win 10pro

  • Graphics Tablet: HUION HD185

Kaikogf avatar Dec 10 '20 18:12 Kaikogf

I can’t reproduce this behaviour exactly as you described it, but I think it might be related to keyboard focus. If you click on the canvas or press the tab key while the shortcuts are not working, do they start working again?

J5lx avatar Dec 12 '20 02:12 J5lx

@J5lx I edited a little bit the steps above (my English was no good)

Answering your questions, if I click on the canvas the shortcut keys will start working again (right on point there). Hitting on the TAB key will do the same as before but here I have to hit it twice.

Kaikogf avatar Dec 12 '20 04:12 Kaikogf

Alright, that does sound like a keyboard focus issue. It’s because the , and . shortcuts do not use any modifiers such as Ctrl or Alt, so instead of triggering the associated actions, the comma and dot are sent to the previous/next frames input field (and discarded, because those fields only accept numbers). I’m not sure yet if there even is a proper way to “fix” this, but as a workaround you can go to the preferences and change those shortcuts to something else with modifiers, for example Ctrl+Shift+.

J5lx avatar Dec 12 '20 13:12 J5lx

@J5lx If you're going to work on this, have a look at what the fps control does. I believe there were some changes to that to reduce the chances of it stealing keyboard focus when that is not desired.

scribblemaniac avatar Dec 12 '20 15:12 scribblemaniac

Oh thanks, I didn’t remember that. I’ll add it to the onion skin spin boxes as well.

J5lx avatar Dec 12 '20 16:12 J5lx

Alright, that does sound like a keyboard focus issue. It’s because the , and . shortcuts do not use any modifiers such as Ctrl or Alt, so instead of triggering the associated actions, the comma and dot are sent to the previous/next frames input field (and discarded, because those fields only accept numbers). I’m not sure yet if there even is a proper way to “fix” this, but as a workaround you can go to the preferences and change those shortcuts to something else with modifiers, for example Ctrl+Shift+.

Ohhh I see. That is why. So I am going to use the alternatives shortcuts... Thanks

Kaikogf avatar Dec 14 '20 12:12 Kaikogf