Request: Temporary key all shortcuts option #105
Replies: 4 comments
-
|
Hi, sorry for no response so far. Currently available actions can be treated as a showcase of what the plugin is capable of. For many users those are enough, but the plugin is written in a way to allow creating new actions. There is no GUI for this, but can be done with some very basic changes in code. There are several discussions here where I explain how to do this kind of changes: I did not immediately respond to you, as I thought I would create a wiki page that guiding users through modifying Shortcut Composer. Sadly, this turned out to be a little more time consuming and I got busy with other tasks. If I finish that guide, I will let you know about it here. If by "all actions" you really mean every action in krita - that does not sound feasable. If you want to dig deeper into plugins code, you can run custom code at key press and release events by implementing the ComplexActionInterface. So you can do anything you want, but probably not in a general solution. As for transform modes - those are very finnicky. I barely made that feature work, by clicking GUI buttons from code. This is not very reliable and may not work in contexts other than the ones I use already - but this should by possible by creating new implementation of ComplexActionInterface or some clever use of Instruction class. Also, I am moving this topic from issues to discussions, where other feature suggestions are held. |
Beta Was this translation helpful? Give feedback.
-
That's true, definitely not feasible or appropriate for all actions. It would have to be filtered down to things that are tool-like. I'll take a look at intercepting and filtering with ComplexActionInterface.
That sounds like a pain! I'm guessing it's because Krita devs made the useful internals private (in C++) which end up not getting python hooks. I encountered this before myself, and I don't really know why they do that, but it seems like it makes creating plugins a lot harder than it needs to be, to the point that trying to do something like extend an existing docker would entail just reimplementing the whole thing in python. Thank you for the thoughtful response, I appreciate it! |
Beta Was this translation helpful? Give feedback.
-
|
Okay I learned that stuff that is not exposed basically needs to be done in Krita's |
Beta Was this translation helpful? Give feedback.
-
|
Krita dev team has only a few developers and there is no one actively working on python API. There are still many things, that you do not have proper access to when scripting. For transform shortcuts, it is not about python hooks though. Those should be defined as krita actions - vanilla users can bind those to keyboard keys, while plugin developers can trigger without fear that those would get broken with krita updates. In fact there was a discussion about that, which resulted in that wish https://bugs.kde.org/show_bug.cgi?id=507855, but things like that are rather low priority, so the task waits for a volunteer. As for the actions, if you have not already, you can take a look at enums in my plugin: https://github.com/wojtryb/Shortcut-Composer/tree/main/shortcut_composer/api_krita/enums. Especially tool.py (actions that activate krita tools) and toggle.py (actions that have on/off states). Those are integrated with other plugin components, and should not require new implementations of ComplexActionInterface. You could see how those are used in https://github.com/wojtryb/Shortcut-Composer/blob/main/shortcut_composer/actions.py. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice to have it so the temporary key behavior can be applied to ALL shortcuts (like you can do in Drawpile, SAI, and CSP).
It would also be nice if shortcut keys could be assigned to subtools like warp or mesh transform, since this already seems to be done via the pie menu.
Beta Was this translation helpful? Give feedback.
All reactions