Assign Shortkeys to Contextual Right Click

Is there any way to a assign shortkeys to the right click (mouse) contextual menus like (make first point, connect, etc.)

No, but some of them are also in the menu, and there, you can assign a shortcut.

I think I am mostly interested in the ones that didn’t make an appearance in the menu. Is there a way to call them with python?

You can easily call them with python. At least it is a bit complicated to get to them. Which ones are you interested in? Then I have a look.

I mostly use Connect Nodes & Make Node First

Should be easy to do with Python.

The question is how to access the contextual menu via python.

You do not need to access the context menu, you need to access the function you want, e.g.:

GSPath.makeNodeFirst_(node)
GSLayer.connectPathsWithNode_andNode_(node1,node2)
GSLayer.connectAllOpenPaths()
2 Likes

How would you add hints, is there a convenience function for vertical and horizontal hints, or should one push the nodes to the hints menu?

It should be possible to assign a shortcut to the menu item name of a custom script in the scripts folder, even if nested, no?

I’ve lost my keyboard shortcut somewhere along the way. I had defined a shortcut to ‘close open paths’, but now can’t figure out how I’d done that. Please can anyone advise?

System Preferences > Keyboard > Shortcuts > App Shortcuts > Glyphs.app > :heavy_plus_sign:

Most odd. It’s there, but it’s not doing anything except making the Mac go bong.

Works for me. I assume by Close open paths you mean the script from my repo? I would double check the app you added it to, Glyphs (cutting edge). You could also try adding it to All Applications.

1 Like

Ah, I see. I’d forgotten it was a script, I thought it was integral to Glyphs. Reinstalled the script and it’s good now. Thanks (sorry).

1 Like

Ah yes, so that works and I found @mekkablue’s glyphs-scripts have the “Add Hints to Selected Nodes”, so that does the trick. Thanks!