Shortkey Guidelines

Is there a way to add a shortkey for Add Guideline?

There is a shortcut already. If you use the measurement tool to drag a measurement, and then press the ‘g’ key, it will add a guide. So adding a guide means pressing cmd+opt+control > drag > ‘g’ (keep the mouse pressed when pressing the g). I know that it might be challenging to do with one hand :wink:

I was hoping for a shortcut (e.g I select two point (press shortkey) and voila a guideline appears.

Can we add the option to add a custom Services Preferences - Shortcuts for the next built. I find this is a bit challenging and am aiming for speed and convenience.

On another note - a shortcut or even and option (right now you have to type minus in the field which is pain to select because it is so small) to flip the guideline will be most appreciated.

You can add a shortcut yourself. There is a script in Rainers repository that adds a guideline. You can assign shortcuts in System Preferences.

What do you mean by that?

You have that already, but via the context menu.

Context menu is extra clicks away.

How many guides do you have? And what do you use them for?

You’re can rotate a guide by 90 degree by double clicking the origin node.

For example you are building an “x” and you make one guideline and you want to flip it. 180 degrees is what you are after in most cases imo

180? I don’t understand. The guideline would look exactly the same. Can you show a mockup or screenshot of what you mean? Just mirroring would not be rotating.

Why flip guidelines? Why not flip the paths right away?

If you are making V for example, making mirrored guideline for diagonal is not easy (involves manual math, doing 90-x degrees). I do it manually every time, but I rarely need to do it that I personally didn’t really need to have it supported as default.

Now I see. But I think you mean 180-x degrees. For example, 80 -> 100, 20 -> 160.

So, the mirror buttons should mirror guides too. That would be a simple feature request, then.

2 Likes

If you can add mirroring to existing interface, then that’s very welcome.

@Realist and @Tosche: Does this little Macro Window script do what you want in terms of mirroring?

for selectedItem in Layer.selection:
	if type(selectedItem) == GSGuideLine:
		selectedItem.angle = 180-selectedItem.angle
  1. Copy and paste it into the Macro window
  2. Select any number of guides in a glyph.
  3. Press the Run button in the Macro Window. (Press again to mirror back to the previous state.)

Update: OK, I added three new scripts for guides to my Scripts repo:

  • Guides through All Selected Nodes: Lays guides through all selected nodes in current glyph. Tries to avoid duplicate guides. Hint: Try this one with many nodes selected.
  • Mirror Selected Guides: Mirrors all selected guides (in all selected glyphs).
  • Select All Local Guides: Selects all local (blue) guides (in all selected glyphs).

These should take care of any extra needs concerning guides. You can add shortcuts via System Preferences > Keyboard.

2 Likes

Now the flip button flips the angle of selected guides, too.

3 Likes

Cool. Then I’ll remove the script again once the stable version is out.

Awesome, guys. Love both the macros and the buttons!

Happy new year!

It currently (v957) only flips the positions.