Assign shortcuts to scripts

PLEASE NOTE:

You can only assign shortcuts to scripts located in the main Scripts folder. Unfortunately you cannot assign shortcuts to scripts located in the ScriptUI Panels folder.

To assign keyboard shortcuts to scripts you need to modify the After Effects shortcuts prefs file which is located in same location as the main app prefs or for an easier approach you can use the KeyEd Up script from Jeff Almasol, which is available on the Adobe After Effects Exchange website as part of the Additional Scripts for After Effects. There is a CS3 version and a CS4 version.

The keyboard shortcuts work in the order the scripts are displayed when you select File->Scripts. To assign or change the order you need to rename the script. An easy way to set the order is to prefix the script name with a number. For example: 01_RandomLayerSelector.jsx

Rename Scripts to Assign Shortcuts  (image © yenaphe.info)

If you are editing the shortcut prefs file, search for ExecuteScriptMenuItem01. This will be the shortcut for the first script in your menu. Please note that there is a bug on Macintosh that shifts the order by one so ExecuteScriptMenuItem02 is where you would assign the shortcut for the first script on the list.

If you are using the KeyEd Up script, go to (category) General > Run Script and look for Run Script #1 to assign the shortcut for the first script in the menu. The same bug exists here so on Mac Run Script #2 is where you assign the shortcut for the first script in the menu.

KeyEd Up Script Settings  (image © yenaphe.info)

KeyEd Up Script Settings (images © yenaphe.info)