Is there a way to close all Sync Metrics locks at once?

I’m currently adjusting the spacing of a new typeface, and during the process I noticed that many glyphs have the Sync Metrics lock (LSB/RSB lock icon) open.

Because I’m testing different letter combinations, I constantly need to close those locks manually, glyph by glyph, to keep left and right sidebearings synced while spacing. This becomes quite slow and repetitive when working across many glyphs.

My question is:Is there any way to close (enable) Sync Metrics for multiple glyphs at once?
Either via a script, a command, or any built-in feature I might be missing?

I’m not referring to Metrics Keys (= / ==), only to the Sync Metrics lock icon itself.

Example

Thanks in advance!

You’re not talking about metrics keys. You’re changing the kerning. Is that what you want?

Read this, especially the section on kerning exceptions.

Yes, I am working on kerning.

While kerning, I noticed that many glyphs have the Sync Metrics (LSB/RSB) lock open. For some tests I want LSB and RSB to stay linked, so I have to manually close the lock for each glyph involved, which gets slow.

You are not talking about syncing metrics. You are talking about kerning exceptions.

Read this:

The lock symbol is misleading, and it has occasionally caused confusion in my discussions about kerning with others. The thing is, there doesn’t seem to be an obviously better symbol that should be used.

There is nothing “locked” about the pairs that are shown with a locked icon in Glyphs. It simply tells you whether you are editing a group-group pair, or a glyph-glyph pair, or a group-glyph pair.

Closing the kerning locks is called Compress Kerning and you’ll find it in the actions menu of Window > Kerning.

Syncing metrics keys is done by selecting all glyphs in question and then selecting Glyph > Update Metrics.

In the UI, you lock a side of a glyph, not a pair. I think it is fair to say that the right or left side of the glyph is locked to the group. You unlock it to release it from the constrains of the group kerning. If you can come up with a better metaphor, I’m all ears.

The locks are properties of the pair, not the side of the glyph. Glyph sides cannot be locked.

Did you really read my post above?

Under the hood, yes. I meant that in the UI the functionality is attached to the glyph. Makes sense because the group name is next to it.

I figured it out just selecting all kerning pairs and click on Compress