# Shortcut to Connect Nodes

**URL:** <https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291>\
**Category:** Uncategorized\
**Created:** [April 23, 2016, 1:33pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291 "2016-04-23T13:33:41Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Realist](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/r/b19c9b/32.png) [@Realist](https://forum.glyphsapp.com/u/Realist)\
**Post date:** [April 23, 2016, 1:33pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/1 "2016-04-23T13:33:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jeremie](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/jeremie/32/11156_2.png) [@jeremie](https://forum.glyphsapp.com/u/jeremie)\
**Post date:** [April 23, 2016, 2:14pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/2 "2016-04-23T14:14:08Z")

</div>

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.

 ![](https://forum.glyphsapp.com/uploads/default/original/2X/c/c794b49d545c1f393e335a4e1f024b3ad8026511.png)

@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.

---

<div class="post-metadata">

**Author:** ![Realist](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/r/b19c9b/32.png) [@Realist](https://forum.glyphsapp.com/u/Realist)\
**Post date:** [April 24, 2016, 3:05pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/3 "2016-04-24T15:05:21Z")

</div>

@ 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?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [April 24, 2016, 5:21pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/4 "2016-04-24T17:21:18Z")

</div>

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.

```auto
#MenuTitle: Connect Nodes
# encoding: utf-8
from Foundation import NSSelectorFromString
print Font.currentTab.graphicView().tryToPerform_with_(NSSelectorFromString("connectNodes"), None)

```

---

<div class="post-metadata">

**Author:** ![mekkablue](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/mekkablue/32/23_2.png) [@mekkablue](https://forum.glyphsapp.com/u/mekkablue)\
**Post date:** [April 24, 2016, 5:25pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/5 "2016-04-24T17:25:38Z")

</div>

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])
```

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [April 24, 2016, 5:27pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/6 "2016-04-24T17:27:47Z")

</div>

We did answer the same question at the same time 😉

---

<div class="post-metadata">

**Author:** ![Realist](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/r/b19c9b/32.png) [@Realist](https://forum.glyphsapp.com/u/Realist)\
**Post date:** [April 24, 2016, 8:53pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/7 "2016-04-24T20:53:19Z")

</div>

Thank you, guys. This is excellent!

---

<div class="post-metadata">

**Author:** ![LucasFonts](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@LucasFonts](https://forum.glyphsapp.com/u/LucasFonts)\
**Post date:** [July 13, 2026, 3:42pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/8 "2026-07-13T15:42:20Z")

</div>

In Glyphs 4 still no shortcuts for contextual menu items right?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [July 13, 2026, 5:23pm UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/9 "2026-07-13T17:23:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![LucasFonts](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@LucasFonts](https://forum.glyphsapp.com/u/LucasFonts)\
**Post date:** [July 14, 2026, 10:15am UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/10 "2026-07-14T10:15:01Z")

</div>

“Connect Nodes” (for stroked paths with rounded corners from Glyphs 3)

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [July 14, 2026, 11:05am UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/11 "2026-07-14T11:05:29Z")

</div>

I’ll have a look.  
Does “Close Open Paths” help in your situation?

---

<div class="post-metadata">

**Author:** ![LucasFonts](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/l/c0e974/32.png) [@LucasFonts](https://forum.glyphsapp.com/u/LucasFonts)\
**Post date:** [July 16, 2026, 8:58am UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/12 "2026-07-16T08:58:21Z")

</div>

no, that connects the wrong end points when there are many. (and sometimes left a single point)

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [July 16, 2026, 8:58am UTC](https://forum.glyphsapp.com/t/shortcut-to-connect-nodes/4291/13 "2026-07-16T08:58:55Z")

</div>

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).
