Page history Edit this page How do I edit this website?

Keyboard Shortcuts

ImageJ has a lot of keyboard shortcuts.

Listing all keyboard shortcuts

For a verbose list of keyboard shortcuts, call PluginsShortcutsList Shortcuts.

Use ⌃ Ctrl / ⌘ ⌃ Ctrl on a PC ⌘ command on a Mac  + L to jump to the search bar, to call menu entries by name.

Recent commands

To open a list of some recent commands, and a list of the most frequently called commands, press ⌃ Ctrl / ⌘ ⌃ Ctrl on a PC ⌘ command on a Mac  + 9.

Open

To open new images, press ⌃ Ctrl / ⌘ ⌃ Ctrl on a PC ⌘ command on a Mac  + O.

Creating your own keyboard shortcuts

You can also assign your own keyboard shortcuts!

Assign a shortcut to a macro

There are 3 options to assign a keyboard shortcut to a macro:

Option 1: Edit the StartupMacros file

Either put the code of the macro in the file macros/StartupMacros.ijm (or StartupMacros.fiji.ijm in Fiji) to have it installed automatically at startup.

The code of the macro must declare a keyboard shortcut in square brackets:

macro "Macro 1 [1]" {
    print("The user pressed '1' on the top row of the keyboard");
}

macro "Macro 1.2 [n1]" {
    print("The user pressed '1' on the numerical keypad");
}

macro Macro 1.3 [&1]{
    print("The user pressed '1' either on the numerical keyboard or on the top row of the keyboard. This is new since ImageJ v1.53a, thanks to Norbert Vischer.")
}

macro "Macro 2 [h]" {
    print ("the user pressed 'h'");
}

macro "Macro 3 [H]"{
    print ("the user pressed 'shift + h'");
}

The key defined in square bracket is case sensitive ! If a capital letter is used then the shortcut is ⇧ Shift + <key>.

Option 2: Save the macro(s) as a toolset

The shortcut should be defined in square bracket like for option 1, but instead of editing the existing StartupMacros file, the macros(s) can be saved as a separate MyShortcut.ijm or .txt file in the ImageJ/Fiji subfolder macros/toolsets.

Then restart ImageJ/Fiji and click the >> at the rightmost side of the fiji toolbar and click the entry MyShortcut. This will install your macros and thus activate the associated shortcuts.

This option is more convenient to distribute macros with keyboard shortcuts to colleagues or via an update site.

Option 3: Associate shortcut to a plugin menu entry

The third possibility consists of saving the macro code as a small script file into the ./Fiji.app/scripts/Plugins/ folder, so that it appears in the menu upon restart.

Then you can register a shortcut using PluginsShortcutsAdd Shortcut….