Photoshop actions · Windows hotkeys

Assign a Photoshop action to any key with one script line

Actions accept function keys only. A one-line script removes that limit and lets any free combination start the action.

NewSoftwares.net editorial teamPublished November 2026Last verified: November 2026About 10 minutes

Quick answer

Save a script that calls the action by name, restart Photoshop, then give the script a shortcut in Edit > Keyboard Shortcuts. The shortcut runs the script, and the script runs the action, so the key no longer has to be a function key.

Any key to script to actionANY KEY.JSXACTION

At a glance

Time
About 10 minutes
Platform
Windows 10 and 11
Cost
Free
Skill level
Beginner to intermediate

Photoshop actions

Run an action from any key with a one-line script

To run a Photoshop action from any key, save a one-line script that calls the action by name, restart Photoshop so it appears under File > Scripts, then assign a shortcut to it in Edit > Keyboard Shortcuts. The script runs the action and the shortcut starts the script.

Script wrapper pathACTIONONE-LINE SCRIPTANY SHORTCUTKEY
A script bridges any key to a recorded action.
  1. Note the exact names

    Open the Actions panel and copy the action name and the set name. Capitals and spaces must match.

  2. Write the script

    Open a plain text editor and enter the single line shown below, replacing the two names.

  3. Save as .jsx

    Save the file with a .jsx extension in the Scripts folder inside Photoshop’s Presets folder. Restart Photoshop.

  4. Find it in the menu

    Choose File > Scripts. Your script is listed by file name.

  5. Assign the key

    Open Edit > Keyboard Shortcuts, pick Application Menus, expand File > Scripts, and type the key beside your script. Accept it, or resolve a conflict if Photoshop reports one.

  6. Save the set

    Click Save Set before closing the dialog, and test the key on a duplicate file.

One-line script
app.doAction("Resize and Sharpen", "My Actions");

Why this works when actions will not accept your key

Actions are limited to function keys, and on Windows F1 cannot pair with Ctrl. Menu commands accept far more combinations, and scripts appear as menu commands. The shortcut therefore starts the script, and the script starts the action.

Risks to watch

  • Renaming the action or set breaks the script silently. Edit the script when you rename.
  • A key already owned by another command raises the conflict prompt. Choose a different one rather than overriding a command you still use.
  • Back up the .jsx file with your exported .atn files and your saved shortcut set.

If the key still does nothing, return to the checks on a silent action key. For deciding between script, remap and typing tool, read Photoshop Actions vs macros, and the backup section lists where each file lives.

Windows hotkeys

Choosing a key that will not fight back

Pick a combination that no Photoshop command, Windows feature or tool already owns. Run Summarize first, avoid Windows-reserved keys, and prefer three-key combinations such as Ctrl+Alt+Shift plus a letter.

Keys to avoid

  • Anything Summarize already lists, unless you are sure you will never use that command again.
  • Win+L and Ctrl+Alt+Del, which Microsoft says PowerToys cannot remap and Windows reserves.
  • Alt+Shift and Ctrl+Shift alone, which Windows can use to change the input language.

Keys that usually work

Three-key combinations with Ctrl, Alt and Shift plus a letter are rarely taken, and they sit within reach of the left hand. Write the final choice on a sticky note beside the monitor until the habit forms.

Several actions, several scripts

Each action needs its own script file, because each script holds one line. Name the files after the action, for example resize-sharpen.jsx, so the Scripts menu reads like a list of your macros. A short prefix such as pm- groups them together.

Keep the chain documented

Write one line per macro in a text file: the key, the script file, the action name and the set name. When Photoshop updates or a new PC arrives, that file tells you what to rebuild. Back it up beside your .atn files.

Testing the finished key

Open a duplicate file and press the new key once. Window > History should show the same states as a manual run of the action. Then restart Photoshop and press the key again. If the shortcut vanished after the restart, the set was never saved, so reselect your set in the Keyboard Shortcuts dialog and click Save Set.

When this is overkill

If F2 to F12 with Shift and Ctrl give you enough free combinations, skip the script. Twelve function keys across four modifier states already offer up to 44 slots on paper, and most people use fewer than ten macros daily.

Common question

Questions about this topic

Can a Photoshop action use a key other than F2 to F12?

Not directly. Actions accept function keys with Shift or Ctrl. A script that runs the action can take any shortcut in the Keyboard Shortcuts dialog, which is the workaround Adobe community experts suggest.

Where do I put the script file?

Save it as a .jsx file in the Presets folder’s Scripts subfolder of your Photoshop installation, then restart Photoshop so it appears under File > Scripts. Use the folder path from your own installation.

What does the script contain?

One line calls app.doAction with the action name and the set name, both in quotes. Both names must match the Actions panel exactly, including capitals and spaces.

Does it work on a Mac?

The scripting route exists on macOS too, but this guide checked Windows only. Folder locations and modifier keys differ on a Mac.

What if the script does nothing?

Check that the action and set names match exactly, restart Photoshop after saving the script, and run the script once from File > Scripts to read any error.