Bug 472611

Summary: the key sequence is ambiguous by assigning shortcut to 'hide file toolbar' & 'hide brushes and stuff toolbar'
Product: [Applications] krita Reporter: rad logan <raddlogan>
Component: Shortcuts and Canvas Input SettingsAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: penguinflyer2222
Priority: NOR    
Version First Reported In: 5.1.5   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description rad logan 2023-07-25 11:43:14 UTC
SUMMARY
When assigning shortcuts, when i assign a shortcut to: (it does not matter what shortcut is used)
- hide file toolbar: ctrl+1 
- hide brushes and stuff toolbar: ctrl+2

it works like expected.
but after restarting krita it will give an error message: 

"the key sequence 'Ctrl+1' is ambiguous. Use 'Configure Keyboard Shortcuts from the 'Setting' menu to solve the ambiguity. No action will be triggerd". Which implies there is a conflict with double assignment of a shortcut but this is not the case.


Steps to reproduce:

step1:
    state of krita
    - hide file toolbar: none 
    - hide brushes and stuff toolbar: none

    - assign file toolbar: ctrl+1 
    - assign brushes and stuff toolbar: ctrl+2

    expected result matches observed behaviour: hide & show with shortcut

step2
    - restart krita

step3
    action; press ctrl+1 or ctrl+2
    observed behaviour: the ambiguity error message

    changing it to an unused key works normaly.

step4
    unassign ctrl+1 & ctrl+2 (both set to none)

    action; press ctrl+1 or ctrl+2
    observed behaviour: as if ctrl+1 or ctrl+2 are still assigned

step5
    restart krita

    action; press ctrl+1 or ctrl+2
    does not do anything as expected

step6
    assign ctrl+1 & ctrl+2
    action; press ctrl+1 or ctrl+2

    works as expected


so I conclude, the ambiguity is an ambiguity with itself bij somehow emit ctrl+1 twice when restarting while a shortcut is assigned. This would explain why changing it to an unused key, it works like expected.

greetz Rad


KDE Plasma:  5.27.6
(available in About System)
Comment 1 Freya Lupen 2023-07-27 03:30:39 UTC
Confirming this behavior. It seems to do with there being actions for these two toolbars in krita.action as well as being generated in KisMainWindow for every toolbar, with the duplicate actions causing it to be ambiguous.
Comment 2 rad logan 2023-09-30 08:59:06 UTC
Not to push the devs but rather to tell about my workaround. It's kind of a funny workaround.

In KDE manjaro, I have made a setupsequence custom hotkey for krita. So when i press this key it will automate some keystrokes.

F8 krita setup seq:
canvas only mode
open settings

manual search: tool
remove or add hotkey for file toolbar & brushes and stuff toolbar. If there is no hotkey I add, if there is I remove
apply

F7 krita zoom seq: 
Make krita horizontal zoom match my screen width. I am using a cintiq 27hd and i like using a 1 to 1 ratio on my drawings. 
to accomplish this i made a macro for this when pressed f7:

fit to width (zoom canvas action)
zoom in 1 step
zoom out 1 step

And my krita startup sequence is complete, cost a few seconds :D
the reason why I zoom in and out is because if I dont, when I press the hotkey to unhide the dockers, it shifts the whole canvas with it. Seems like the zoom to width is still active when the docker appears. This is unwanted behaviour. I want the canvas to stay where it was. The zoom in and out is the workaround for this as it cancels the fit to width but keeps the preferred zoomlevels.

I wish you all the best.