Illustrator: lock/unlock current layer via keyboard shortcut?


Is it possible to toggle the locked/unlocked state of the current layer via keyboard shortcut? I'd love to be able to toggle show/hide for layers as well.

12/9/2014 9:22:00 PM

Accepted Answer

here's a one-liner script that toggles active layer visibility

app.activeDocument.activeLayer.visible ^= 1;

this other one-liner toggles lock/unlock

app.activeDocument.activeLayer.locked ^= 1;

install those 2 scripts into your default scripts folder, then create two actions to run them, assign them shortcut keys and you're all set.

12/10/2014 7:30:00 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow

Website under construction!!!