Changing the Undo/Redo keyboard shortcut

I want to change the undo/redo hotkey because I am using DVORAK rather than QWERTY, however mekkablue’s script does not have the option to change it.

I was able to change the command from within System Preferences (Edit->Undo bound to Cmd+;), and it shows up correctly in Glyphs.

However, whenever an action is taken, the name of the ‘Undo’ action changes. i.e. if you move a node then the Undo action will change it’s name to ‘Undo Move Nodes’ and thus the new bound hotkey reverts to Cmd+z

Any suggestions for changing the Undo hotkey?
I sent an email to the info email, apologies for being redundant and reposting here.

maybe try something at the system level:

I just played around a bit and it seems that you can change it by a simple script.

undoKey = "#"
from AppKit import NSShiftKeyMask, NSCommandKeyMask
editMenu =[EDIT_MENU].submenu().itemArray()
editMenu[1].setKeyEquivalentModifierMask_(NSShiftKeyMask | NSCommandKeyMask)

You will need to run that script every time you start Glyphs. You can put it into a .glyphsPlugin so that it is run automatically.

1 Like