Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Keyboard shortcut for "Distribute vertical space"?

People's Champ ,
Feb 05, 2017 Feb 05, 2017

I'd like to assign a keyboard shortcut to the "distribute vertical space" command. It's the one in the Align panel, at the bottom left, where it says "Distribute spacing". I'm using it a lot to get two images to abut each other with 0 space between them.

I can't find the command in keyboard shortcuts, nor in Quick Apply.

Anyone know where it is?

Thanks,

Ariel

3.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Feb 06, 2017 Feb 06, 2017

Hi Ariel

My suggestion so far was "fill a feature request", and this is not an answer good enough to be 'correct'.

I guess the only way to get the thing is scripting.

This one-liner will distribute selected objects with a spacing of a given value:

app.activeDocument.distribute(app.selection, DistributeOptions.VERTICAL_SPACE, undefined, true, 10);

and this one will honor Key Object, but spacing is zero:

app.activeDocument.distribute(app.selection, DistributeOptions.VERTICAL_SPACE, AlignDistributeBounds

...
Translate
Mentor ,
Feb 05, 2017 Feb 05, 2017

Object Editing > Vertical Distribute Space:

Capture0.PNG

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Feb 05, 2017 Feb 05, 2017

Thanks.

I tried that, but I can't get it to work. Nothing happens. Two objects are selected. One is made a key object. But the shortcut doesn't work.

Are you able to get it to work?

(I'm on CC2015)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 05, 2017 Feb 05, 2017

Yes, I use it quite often (you see, I do have KB shortcut assigned) and have no problems at all. However, I'm still on CS6.

Does it works from the panel, with the same selection? FWIW, never use 'key object' feature...

EDIT: context selection in KB shortcut panel is OK?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Feb 05, 2017 Feb 05, 2017

Tried it on CS6 and it doesn't work. But.... see more info below!

With this selection, it does indeed work from the panel.

Why not use the key object feature? It's a great shortcut, straight out of Illustrator!

Context selection is Default, confirmed.

But here's the but: I now see that the shortcut does work to distribute objects if there are 3 or more... I.e., it adjusts them to have equal spacing between them.

However, it does not respect the "use spacing" option.

In the Align panel, you can set "use spacing" to 0 to have to objects touch each other perfectly without overlapping.

The keyboard shortcut ignores the fact that that option is selected, so, if 2 objects are selected, they are not moved adjacent to each other.

Any way of getting THAT to work? That's what I was hoping to find!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 05, 2017 Feb 05, 2017

Ah, I see. Never used it for just two objects.

Probably because in panel you use separate checkbox with custom value... that's not a part of an 'distribute' icon.

Well, that's a 'feature', I'm afraid.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Feb 05, 2017 Feb 05, 2017

I guess so. Well, I'll wait a bit to see if anyone else has a brainwave. Otherwise, I'll come back and mark your previous answer as correct, since there doesn't seem to be a way to do this.

Thanks,

Ariel

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 06, 2017 Feb 06, 2017

Hi Ariel

My suggestion so far was "fill a feature request", and this is not an answer good enough to be 'correct'.

I guess the only way to get the thing is scripting.

This one-liner will distribute selected objects with a spacing of a given value:

app.activeDocument.distribute(app.selection, DistributeOptions.VERTICAL_SPACE, undefined, true, 10);

and this one will honor Key Object, but spacing is zero:

app.activeDocument.distribute(app.selection, DistributeOptions.VERTICAL_SPACE, AlignDistributeBounds.KEY_OBJECT, undefined, true, app.activeDocument.selectionKeyObject);

both ignore current Spacing settings in Align panel.

Not a final answer, too. Just a way to go, I believe. I'm not a scripter, let's see what the experts will say.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Feb 06, 2017 Feb 06, 2017
LATEST

Essentially, there seems to be no built-in keyboard shortcut. One has to resort to a script...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines