Changing system shortcuts like Undo without side effects

On german keyboards the system shortcut for Undo is the same as on an english keyboard: command + z.

The problem: On a german keyboard layout the z key is switched with the y and as such very inconvenient to reach with left hand only. (On english keyboard it would be the same as pressing command + y - not ergonomic)

Using System Preferences > Keyboard > Shortcuts and adding a custom App Shortcut does not seem to work as command + y collides with other application shortcuts (e.g. Redo in Sublime).

So what are my options to remap the undo shortcut system-wide so that pressing command + y triggers it, without side effects?

Preferably I would not like to use third party solutions.


Solution 1:

I doubt you'll manage this natively - because there is no system-wide undo/redo sequence.
Some apps use still use the older Cmd ⌘ Y , many others the newer Cmd ⌘ Shift ⇧ Z .

You can, of course, change any menu command, but you can't change a command that doesn't have a menu item. You also cannot wildcard a menu name.
Just to take an example from Safari. Cmd ⌘ Z is currently 'Undo Typing'

enter image description here

However, if I close a tab it becomes 'Undo Close Tab'

enter image description here

Once you Undo, then your Redo becomes similarly context-sensitive

enter image description here

You would have to try to make one new key command for each potential menu item & also ignore that the Keyboard prefs page is going to keep shouting at you that you have duplicates.

You might be able to get something like Karabiner Elements to globally change those specific key combinations around. There are some pre-made 'recipes' to do some fairly complex reassignments, but it's not something I've studied. See https://ke-complex-modifications.pqrs.org/#Keychron%20K6