Weirdness with the current shortcut system.
Closed, ResolvedPublic

Description

Another one:
Two bugs:

https://bugs.kde.org/show_bug.cgi?id=362134

Making an alternate shortcut breaks the primary shortcut.

https://bugs.kde.org/show_bug.cgi?id=362074

When searching for a shortcut, the trees don't get expanded.

woltherav updated the task description. (Show Details)
woltherav raised the priority of this task from to High.
woltherav assigned this task to abrahams.
woltherav added a project: Krita.
woltherav added subscribers: langkamp, woltherav, rempt, abrahams.
woltherav updated the task description. (Show Details)Dec 30 2015, 2:49 PM
woltherav updated the task description. (Show Details)Dec 30 2015, 2:56 PM
woltherav updated the task description. (Show Details)Dec 30 2015, 3:06 PM
woltherav updated the task description. (Show Details)
woltherav updated the task description. (Show Details)Dec 30 2015, 3:08 PM
abrahams added a comment.EditedJan 3 2016, 5:01 AM

I pushed a few patches. I will keep this task open and change the description to keep track of other bugs.

  1. Krita doesn't save with .shortcut appended when saving a shortcut. Krita also doesn't load a file if it's not appended with a .shortcut.
  2. Krita doesn't load the default properly when going from a custom shortcut file back to the defaults.
  3. Krita doesn't add the new shortcuts to it's list of possible shortcuts, might be related to 1. (Creating a krita_defaults.shortcut file works around this, so it's only defaults that are broken)
  4. When exporting custom shortcuts, krita only exports a few of them, not all.
  5. The shortcut list is unordered in places. So we have things belonging in the view menu under the krita menu, things belonging in the krita menu under the miscelaneous menu, etc.
  6. I can't find increase/decrease brush-size anywhere...(edit: it seems actions go missing randomly when having preexisting shortcuts.)(Edit this somehow also reflects on the shortcut files being exported...)(okay, now I feel dumb: certain actions are not loaded till a document is open)
  7. The interaction tool(white pointer) is unable to have a shortcut assigned to it.
  1. Fixed exporting. I prefer to keep the file extension check since the search relies on KoResourcePaths.
  2. Fixed.
  3. Don't quite understand?
  4. This is intended behavior - custom shortcuts are meant to be only customizations that differ from the current scheme, i.e. the contents of kritashortcutsrc. What's missing is an "import custom shortcuts" part, which would be equivalent to overwriting kritashortcutsrc with the selected file. (edit: added "load custom shortcuts")
  5. Made some improvements, if you want to reorder other things yourself it's pretty easy to do. All it requires is shuffling things inside the XML files. The <actions> grouping determines which drop-down an action goes in. (see rKRITAcc2678f14e96)
  6. I hope to find a better solution to the delayed loading of actions at some point.
  7. Is that different from the "Shape Manipulation Tool?"
  1. was that if I made a new shortcut sheet, Krita wouldn't have it in the drop-down, this is fixed now.
  1. It is, and I was actually looking for shape manipulation... I feel dumb now.

Only last weird thing that remains is that if you search an action and then switch to a different sheet, no actions are loaded in the new sheet at all.

Other than that, you are free to close this, or leave it open if it keeps you mindful of '5'.

abrahams added a comment.EditedJan 8 2016, 10:09 PM

OK, should we unify the name to either "shape manipulation tool" like in the action title or "shape handling tool" like the tooltip? I like "shape manipulation tool" because it is more descriptive.

Perhaps it is a good idea to close this after fixing the search weirdness, I can fix bugs as they are uncovered.

When I press default in more action drop-down all the shortcuts don't revert to defaults. when I click on the default check box, which is 'none' I get ambiguous shortcuts as most other shortcuts have 'none' as shortcut.

you can see a screenshot here -> https://dl.dropboxusercontent.com/u/37777793/shortcuts.png

I also noticed ( this is from 2.9 and 3.0 as well) 'mnemonics' for certain menu entries are not there, like "Trim to Selection" in image menu and also newly added copy layer and paste layer.
I rely on this "mnemonics" system and i also remember Floatharr from the IRC saying he uses it too.

woltherav moved this task from Backlog to Krita Frameworks on the Krita board.Feb 11 2016, 7:41 PM
abrahams updated the task description. (Show Details)Feb 11 2016, 8:07 PM
abrahams updated the task description. (Show Details)
abrahams updated the task description. (Show Details)Mar 11 2016, 7:00 AM
abrahams added a comment.EditedMar 11 2016, 7:07 AM

Hi @kamathraghavendra, I came to this task and made some fixes to the system, but could you provide a little more information about the problems with restoring shortcuts and the mnemonic system?

Can you give me an example of a shortcut that doesn't get restored on "Restore Defaults?" I tried a random handful and they seemed to work.

Shall we add mnemonics for all menu items?

Hi @kamathraghavendra - it's not easy to add new mnemonics for copy/paste layer because the layer menu is already full. Currently there are already two that try to claim 'C' and two that claim 'M', so there are way too many mnemonics in that menu already. Maybe it would be better to remove some of the lesser used mnemonics, or add more sub-menus. I would prefer some user input before changing the UI like that.

abrahams updated the task description. (Show Details)Mar 14 2016, 6:51 AM

@abrahams here the problem is duplicate letters, i 'll check once again for unique letters. the mnemonics for trim to selections for example is 'e' where as it is same for resize image too. so there is a conflict.

abrahams added a comment.EditedMar 26 2016, 12:37 AM

@abrahams here the problem is duplicate letters, i 'll check once again for unique letters. the mnemonics for trim to selections for example is 'e' where as it is same for resize image too. so there is a conflict.

Right, what I'm saying is that even after we remove duplicates, there are no more useful letters to add more commands under. It will require changing/moving/making submenus for some commands.

abrahams closed this task as Resolved.Mar 28 2016, 6:18 AM

Gonna call this resolved. Doing conflict checking between KisShortcutsConfiguration and XMLGUI shortcuts would involve slapping together a nasty mess just for a small benefit, I don't plan to do it myself. Those two shortcut systems need to be merged together someday anyway.

Changing the layout of the menus and new mnemonics is easy for anyone to do. Just change the krita.xmlgui and kritamenu.action files.

Some new inconsistencies appeared in the shortcut system recently i have noted them down in this bug report -> https://bugs.kde.org/show_bug.cgi?id=361325

If this is not the proper task to report this please add this bug report to the correct one thank you

abrahams reopened this task as Open.Apr 4 2016, 4:43 PM

Reopening with a new list of problems:

  1. The shortcuts which are changed don't get saved or implemented.
  2. To work around this I tried to save the changed scheme by pressing save/load button The browse file dialog shows home folder, ( this is not in the resources folder so I doubt it s supposed to get loaded next time I start krita) I browsed to resource folder and saved it .
  3. As expected the shortcut scheme I saved didn't get loaded so I pressed load shortcut and then browsed to the place where I saved it , but to my dismay the file dialog doesn't show it , the file type filter is "Shortcuts" and the file that is saved doesn't have any extension.
  4. Now in a bid to save my changes I tried by pressing the "new" button in the shortcut dialog it gave me a popup window to input the name for this scheme, I added a name and saved it , the changes were applied. but
  5. next time i load krita this new shortcut scheme is not loaded so my changes are again lost

To add to this there is also a crash when we cancel the save and load dialog, I have reported
that in other bug report here -> https://bugs.kde.org/show_bug.cgi?id=360595

I really wish this bug gets solved and there is some clarity in handling keyboard shortcuts. The concept of custom shortcut scheme is really nice and good , but these bugs hamper the newly implemented system.

Let me know if you need any more details.

P.S. I am marking this major as shortcuts are integral part and right now changing them or doing anything is kind of confusing and buggy, if you guys feel it to be classified as normal you may do so

thank you

abrahams updated the task description. (Show Details)Apr 4 2016, 4:43 PM

OK, creating new schemes seems to be fixed, and the crash from pressing "cancel" should be gone.

one new bug is surfaced , this is probably due to duplicates in defaults itself, like shortcut for curve segment and crop tool is 'C' and fill tool 'F" also has a duplicate in line segment operation.
when user tries to set it default these complain about ambiguity.

it seems there is also problem of setting default shortcuts to none.

here is the bug report -> https://bugs.kde.org/show_bug.cgi?id=361911

The error with saving when custom shortcuts are set to empty should be fixed in rKRITA55bbe2312368.

@abrahams I wish to thank you for the efforts you are taking to make the shortcuts perfect. thank you very much

No problem! ?

woltherav added a comment.EditedApr 23 2016, 3:05 PM

Another one:

https://bugs.kde.org/show_bug.cgi?id=362134

Making an alternate shortcut breaks the primary shortcut.

And

https://bugs.kde.org/show_bug.cgi?id=362074

When searching for a shortcut, the trees don't get expanded.

abrahams updated the task description. (Show Details)Apr 24 2016, 10:45 PM

I wrote a patch for each of the bugs, the first one should probably have gone on differential, but I seem to be able to save and load primary/alternate shortcuts now.

kamathraghavendra added a comment.EditedApr 27 2016, 9:18 AM

another one https://bugs.kde.org/show_bug.cgi?id=362341

in this one only the last saved or changed shortcuts are remembered any changes done previous to that are lost.

Just change a shortcut close the settings dialog , and change another shortcut again and close the settings dialog , you'll notice the shortcut your saved the first time is lost

Another duplicate shortcut F4 it has been assigned to save incremental as well as open recent . i think it should help if it is only save incremental.

abrahams closed this task as Resolved.May 5 2016, 6:14 AM