Proposal for new modifiers/shortcuts system

jaham at gmx.net jaham at gmx.net
Mon Jun 13 20:15:04 BST 2011


On Sunday 12 June 2011 11:13:59 Dmitry Kazakov wrote:
> Hi!
> 
> As we discussed at the last Krita sprint, Krita needs some common system to
> manage keyboard shortcuts and modifiers. The problem is, different keyboard
> keys should switch tools temporarily and restore the tool when the key is
> released. E.g. we need canvas panning, rotation, color picking, brush
> adjustments.
> 
> I was thinking about the design of this system. And i think it is better to
> do it Calligra-wide. That's why I've published its design proposal to
> Calligra wiki:
> 
> http://community.kde.org/Calligra/Libs/Interactional_Tools
> 
> Theoretically, all the other tools may be ported to it in the future, but
> this is not mandatory as there are wrappers for old tools left.
> 
> So i would really like to hear your opinion about this system. Especially,
> about naming of the classes =)

If I have understood correctly there two types of shortcuts needed.
1. Global shortcuts to change tools
2. Local shortcuts to change a tools state

What I think is that the global shortcuts should be handled by the 
toolmanager, as that is exactly the kind of things the toolmanager is doing.
For local shortcuts I am not sure why it is not possible to fold the common 
shortcut/gesture handling into the KoInteractionTool base class? I think we 
should keep the number of involved classes at a minimum, otherwise no one can 
understand what is actually happening in our tool system.
Also from reading your requirement list, I hope that you also looked at tools 
that are not krita tools. 

Requirement 1: 

For instance shift drag is used to override the snapping. And there are 
probably other places where dragging with a modifier is used. So you will have 
a hard time reserving those for common stuff. 

Requirement 2: 

Single global key shortcuts are dangerous. The Ctrl modifier is use a lot, and 
the space key is also used at least in the text tools.

Requirement 3: 

I do not understand that. Can you elaborate, preferably with an example.

Requirement 4: 

A Krita specific requirement, is there a more general example? What is canvas 
rotation actually, a tool?

Requirement 5: 

I am not sure i understand what you mean by that. Can you be more specific 
please? I.e. how should a tool be canceled when Esc is bound to another 
action?

Requirement 6: 

Great!

Requirement 7: 

Yes I agree.

To sum it up, I think i need some clarifications. ;-)

Ciao Jan







More information about the calligra-devel mailing list