Copy link to clipboard
Copied
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
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
Copy link to clipboard
Copied
Object Editing > Vertical Distribute Space:
Copy link to clipboard
Copied
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)
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Essentially, there seems to be no built-in keyboard shortcut. One has to resort to a script...