[Fixed] Custom Shortcuts: Loss after each update & assignment conflicts

Having tech problems? Post them here and do not worry, there is always a solution for you.
porg
Posts: 554
Joined: Tue Apr 05, 2022 1:04 pm
Country: Austria

Re: Custom shortcuts: Lost after each beta update

Post by porg »

Sadly the bug with Edit→Navigation→Open Document Folder in Browser ⌘↑ not working re-occured.

And now I managed to re-construct it in the detail.

Simplest reproduction:

1) Reset your shortcuts. Restart GC. ⌘↑ in Editor opens the parent folder in the browser.
2) Load "Shortcuts-2022-11-30e" (also ALL earlier states "d" or "c" and "b" are already triggering the bug). From now on ⌘↑ is not moving to the parent folder but instead triggers the move viewport up command (which due to another bug actually triggers a viewport down command)

Larger reproduction

1) Reset your shortcuts. Restart GC. ⌘↑ in Editor opens the parent folder in the browser.

2) I exported this state as "Shortcuts-2022-11-30a".

3) 4 new assignments + 1 re-assignment. Work in the menu.
Exported state as: Shortcuts-2022-11-30b. Noted first discrepancies:

I had changed these 4 commands

Edit
Smart
Smart Cut ⇧⌘C
Smart Paste ⇧⌘V
Smart Insert ⇧⌘I

View
Zoom
Set Position of zoomed Area during set all to
Top Left ⌃Q


I had re-assigned this 1 command

Window
Information ⌘I

These 4 additional assignments where there without user intervention!
Seems like some generic/default macOS commands get merged in:

View→Show All Tabs ⇧⌘\
Window→Minimize All ⌥⌘M
Window→Show Previous Tab ⌃⇧⇥
Window→Show Next Tab ⌃⇥


4) ⌃Q was assigned in step 3 (possible in the GUI by luck).
Now in the text file I manually assigned the 10 remaining shortcut in the "zoom command cluster" like this:

View→Zoom→Set all Windows to current zoom ⌃1
View→Zoom→Set Position of zoomed Area during set all to→Unchanged ⌃0
View→Zoom→Set Position of zoomed Area during set all to→Top Center ⌃W
View→Zoom→Set Position of zoomed Area during set all to→Top Right ⌃E
View→Zoom→Set Position of zoomed Area during set all to→Mid Left ⌃A
View→Zoom→Set Position of zoomed Area during set all to→Mid Center ⌃S
View→Zoom→Set Position of zoomed Area during set all to→Mid Right ⌃D
View→Zoom→Set Position of zoomed Area during set all to→Bottom Left ⌃Y
View→Zoom→Set Position of zoomed Area during set all to→Bottom Center ⌃X
View→Zoom→Set Position of zoomed Area during set all to→Bottom Right ⌃C

5) In the view cluster all worked except ⌃A and ⌃X and ⌃1. Investigated and soon found my human errors:

Manually unassigned from the default assignments by removing the lines manually:
Picture→Alpha Channel→Show in New Window ⌃A
Filter→Xe8472 Automatic ⌃X

Fixed one capitalization error: Corrected "zoom" to "Zoom":
View→Zoom→Set all Windows to current Zoom ⌃1

I then exported this state again as Shortcuts-2022-11-30d.

Since step 3 (backed up in "Shortcuts-2022-11-30b" the shortcut ⌘ ↑ does not do what it should.

6) Tried fixing it by removing all arrow keys in the shortcuts file. This is reflected in revision "Shortcuts-2022-11-30e".

7) Reset shortcuts. Restarted GC. Imported Shortcuts-2022-11-30e. No luck either. Still fails.

All shortcut files attached. Hope it helps you with debugging.
Shortcuts-2022-11-30.zip
(17.12 KiB) Downloaded 65 times
porg
Posts: 554
Joined: Tue Apr 05, 2022 1:04 pm
Country: Austria

Re: Custom shortcuts: Lost after each beta update

Post by porg »

GraphicConverter - Edit Shortcuts - Build 5683.png
GraphicConverter - Edit Shortcuts - Build 5683.png (490.99 KiB) Viewed 1202 times
All shortcut states and intermediary steps as text files in:
Shortcuts-2022-12-02 in build 5683.zip
(7.07 KiB) Downloaded 75 times


I) Edit Shortcuts dialog - New: Assign shortcut while mouse hovered over explicit shortcut input field

a) ✅ Works flawlessly:
a1) With a single key alone and/or in combo with any amount and kind of modifier key(s).
a2) Detection of already assigned shortcuts still kicked in correctly.
a3) Also after quitting and restarting they all worked as intended.
a4) Also after quitting and restarting they all worked as intended.
a5) Except that 4 generic View and Window commands that get merged in automatically (by macOS I assume). See in ZIP file.

b) ❗️UX improvements:
b1) Clear shortcut-input-field when mouse moves out again. The user then is sure that the input field is cleared again and will not be accidentally assigned to the next selected command above.
b2) Reduce height of command panel to keep travel distance to the input field acceptable.


II) Edit Shortcuts dialog - "Import List…" button accepts file droppings.
Spares the intermediate file chooser. Many Mac app file-chooser buttons have this function, I guess this is just a flag to set. If it's complicated then don't do it, not worth too much effort.


III) Import List — Now has sanity check


This sanity check has multiple issues:

1) Improve Layout

a) Text should be left aligned for readability.
b) Shortcut portion should be always 5 characters wide
- Maximum of 4 modifier keys + Key
- Unused positions get filled with a non breaking whitespace character
- U+00A0 NO-BREAK SPACE
- U+202F NARROW NO-BREAK SPACE
- That way you can compare the shortcuts better among themselves
c) Make it wider so that typical menu path lengths are able to be on a single line without wrapping
d) Instead of putting all duplicate menu paths on a single line, put the duplicates one on a next line. Duplicate paths above each other are much more easy to compare. You see the differences in the path instantly.
e) Offer a button "Save error log" --> Saves file <fileNameOfShortcutsFile>-import-failure-<YYYY-MM-DD--hh-mm-ss>.txt near <FileNameOfShortcutsFile>.txt and triggers an open command (opens with the default handler app). Then you can go through that faulty <FileNameOfShortcutsFile>.txt and correct the mistakes.

→ See improvements integrated at post end.



2) Error text: It's unclear whether that is a "fail" or mere "info" message!

→ See improvements integrated at post end


3) Can you confirm that the sanity job does a correct job?

Duplicate shortcuts on purpose: GraphicConverter has some commands that are for entirely different windows/sections/modes which can never be active/focused at the same time (e.g. Editor vs. Browser), hence assigning the same shortcut to those mutually exclusive sections does not pose a conflict and gives the user the possibility to better use the limited amount of shortcuts.

a) Does your sanity check consider this?

b) Or is it a primitive check: No duplicates found in entire file (ignoring mutually exclusive sections)? If that is the case, then I assume you did some housecleaning of duplicate shortcuts, which definitely existed before build 5683.

Shortcuts-2022-12-02a reset to defaults of build 5683.txt

✅ Imported without issues.
ℹ️ Have you cleaned up default shortcut assignments?


Shortcuts-2022-11-30a reset to defaults.txt (was build 5682 back then AFAIR)

❌ Fails with these duplicates:

⌘D: File→Slide Show→Launch…
File→Slide Show…
⌃⇧⌘D: File→Slide Show→Resume
File→Resume Slide Show
⌘D: File→Slide Show…
File→Slide Show→Launch…
⌃⇧⌘D: File→Resume Slide Show
File→Slide Show→Resume
⌘↑: Edit→Navigation→Previous Page
Edit→Navigation→Open Document Folder in Browser
⌘↑: Edit→Navigation→Open Document Folder in Browser
Edit→Navigation→Previous Page


4) Import List failing with duplicates - Improved dialog:

Code: Select all

File import aborted!
Contained duplicate key assignments for the following commands:

  ⌘D: File→Slide Show→Launch…
      File→Slide Show…
⌃⇧⌘D: File→Slide Show→Resume
      File→Resume Slide Show

Please correct the file and try importing again.

[√] Save report file and open it  [ Okay ]
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Custom shortcuts: Lost after each beta update

Post by forum_adm »

b1) The shortcut field shows always the current shortcut for the select line in the table. So, ok.

b2) I like to see more if possible. So, that depends onto the user. I can maybe make the dialog resizable (height only).

1a,b,c,d) Apple makes the layout for all alerts. I can provide only the text. I add to the text only one \n after each shortcut.
e) will do

2) will add.

3) Apple allows only one usage of a shortcut in the menu. Duplicates may not work.
Fotokunst
Posts: 62
Joined: Sun Aug 01, 2021 12:34 pm
Country: Germany

Re: Custom shortcuts: Lost after each beta update

Post by Fotokunst »

porg wrote: Fri Dec 02, 2022 12:49 pm b2) Reduce height of command panel to keep travel distance to the input field acceptable.
forum_adm wrote: Fri Dec 02, 2022 12:58 pm b2) I like to see more if possible. So, that depends onto the user. I can maybe make the dialog resizable (height only).

I like to see more if possible, too.


Joerg
porg
Posts: 554
Joined: Tue Apr 05, 2022 1:04 pm
Country: Austria

Re: Custom shortcuts: Lost after each beta update

Post by porg »

forum_adm wrote: b1) The shortcut field shows always the current shortcut for the select line in the table. So, ok.
What you are talking is a master/detail relationship: Was not obvious to me, but when thinking about it, that design pattern fits ok here. Because you select in the master (table panel on top) and in the detail (input field below) you read the selected value or you change it when hovering the mouse and pressing a shortcut.
forum_adm wrote: b2) I like to see more if possible. So, that depends onto the user. I can maybe make the dialog resizable (height only).
Ad b2)
- For better comparability more height is ofc better.
- For assigning shorter ways are better.
- Ideal compromise: On panel bottom offer a drag-handle for resizing the panel height.

c) Make table filter-able.

See both integrated into revised design below.


forum_adm wrote: 1a,b,c,d) Apple makes the layout for all alerts. I can provide only the text. I add to the text only one \n after each shortcut.
e) will do
Okay then adding (e) is the maximum improvement possible.
forum_adm wrote: 2) will add.
Ok.
forum_adm wrote: 3) Apple allows only one usage of a shortcut in the menu. Duplicates may not work.
Fine! That limitation keeps things really simple also for the sanity check then.

You did not answer me whether you performed a cleanup of the default shortcuts in GC for build 5683. But I assume you must have done it, b/c exporting after reset in build 5683 produces no duplicate warning on import whereas the earlier GC shortcut export immediately a shortcut reset produces a duplicate warning on import.


Revised design of the "Import Shortcuts" dialog:

GraphicConverter - Edit Shortcuts - Redesign 2.png
GraphicConverter - Edit Shortcuts - Redesign 2.png (102.39 KiB) Viewed 1193 times

Behavior
• When filtering in the menu path the entire tree until the match is expanded.
• Non matching command paths are hidden.
• The match highlighted. If too much effort, forget. Perfection not worth here.
• But a filter function per se would indeed help a lot in this massive tree structure.
porg
Posts: 554
Joined: Tue Apr 05, 2022 1:04 pm
Country: Austria

Re: Custom shortcuts: Lost after each beta update

Post by porg »

If that tree auto expansion logic during filtering is too hard, I have a cheap alternative in mind:

Keep two synced representations of the same data-set:

1) The tree view for browsing as long as both filtering fields are empty.
2) View as flat lines in "Menu→Path→Command" fashion (1:1 as in the text file before the TAB separator) whenever one of the filter fields is filled.
- Not only potentially easier to implement, but also more compact to read/compare.
- Highlighting the matching part is probably also "included for free" by Cocoa features.
- Interestingly also the Menu Search in macOS Cocoa Apps displays the results in a "Path > to … > Command" fashion:

Menu Search in macOS Cocoa Apps.png
Menu Search in macOS Cocoa Apps.png (72.68 KiB) Viewed 1185 times
porg
Posts: 554
Joined: Tue Apr 05, 2022 1:04 pm
Country: Austria

Re: [Fixed] Custom Shortcuts: Loss after each update & assignment conflicts

Post by porg »

✅ Closed this issue:
• No more conflicts or non-working shortcuts.
• Also all custom shortcuts survived an update this time (from build 5683 to 5687).

Put the remaining issues in followup issues:
Edit Shortcuts: Improve warning dialog when attempting to assign a shortcut that is already assigned
Edit Shortcuts: Dialog gets filters (search fields)
Edit Shortcuts: Resize command panel with drag handle and persist height change

Related issues I found along the way:
Arrow Up/Down keys in Editor misbehave when System Preference Scroll Direction set to Natural ON

@forum_adm: I'd appreciate a short reaction in each of those. A short reaction (also a clear No) is better than nothing. Thanks!
Post Reply