Is it possible to assign a keyboard shortcut (maybe Cmd+Something) to perform Connect Nodes? I am asking since Connect Nodes is not present in the menu items and there is no way assign that way.
You can assign a keyboard shortcut to anything you want if you go in System Preferences. Go in System Preferences > Keyboard > Shortcuts > App Shortcuts then add a shortcut for Glyphs.app by entering the exact name of the menu item you want.
I tried though and it seems it only works with menu bar items and not with contextual menu items. You can use reconnect nodes instead. It doesn’t do the exact same thing but it works as a shortcut since it is also available in the Paths menu.
@GeorgSeifert Maybe you could add the rest of the contextual options of the edit view in the “Other” section of the paths menu. This way we could add shortcuts to anyone one of them. I don’t know if it would be overcrowded though. Just a thought.
@ jeremie - That is what I meant by “not present in the menu items”
@ georg - So the question still holds, is there a way to do it?
Copy the following code in a file and save it to the Scripts folder. This will generate a menu item with the name "
“Connect Nodes” and that can be used to add the keyboard shortcut in system preferences as described above.
#MenuTitle: Connect Nodes
# encoding: utf-8
from Foundation import NSSelectorFromString
print Font.currentTab.graphicView().tryToPerform_with_(NSSelectorFromString("connectNodes"), None)
You could write a simple script and that way, add it to the menu, and thus have a menu entry you can assign short cut to. This is the code you need:
Layer = Glyphs.font.selectedLayers[0] # frontmost font
sel = Layer.selection
if len(sel) == 2 and type(sel[0]) == GSNode and type(sel[1]) == GSNode:
Layer.connectPathsWithNode_andNode_(sel[0],sel[1])
We did answer the same question at the same time 
Thank you, guys. This is excellent!
In Glyphs 4 still no shortcuts for contextual menu items right?
Technically there are no shortcuts for context menus. But we added a bunch of commands to the shortcut settings in the Preferences. If one is missing, I can add it.
“Connect Nodes” (for stroked paths with rounded corners from Glyphs 3)
I’ll have a look.
Does “Close Open Paths” help in your situation?
no, that connects the wrong end points when there are many. (and sometimes left a single point)
I added the shortcut in the latest Glyphs 4.
And, if you added a shortcut in Preferences, that shortcut is shown in the context menu, too (not added for all commands, yet. Will add the others, soon).
