pencil2d / pencil

Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations. Pencil2D is open source and cross-platform.
http://pencil2d.org
GNU General Public License v2.0
1.43k stars 269 forks source link

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

Open Kaikogf opened 3 years ago

Kaikogf commented 3 years ago

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

+ Operating System: Win 10pro + Graphics Tablet: HUION HD185
J5lx commented 3 years ago

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?

Kaikogf commented 3 years ago

@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.

J5lx commented 3 years ago

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+.

scribblemaniac commented 3 years ago

@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.

J5lx commented 3 years ago

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

Kaikogf commented 3 years ago

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