Difference between revisions of "Keyboard shortcuts"

(Mention macro shortcut)
(Use bc template for menu trail)
Line 3: Line 3:
 
== Listing all keyboard shortcuts ==
 
== Listing all keyboard shortcuts ==
  
For a verbose list of keyboard shortcuts, call {{bc | Plugins | Shortcuts | List shortcuts...}}
+
For a verbose list of keyboard shortcuts, call {{bc | Plugins | Shortcuts | List Shortcuts}}.
  
 
== The Command Launcher ==
 
== The Command Launcher ==
Line 35: Line 35:
 
=== Option 2: Associate shortcut to a plugin menu entry ===
 
=== Option 2: Associate shortcut to a plugin menu entry ===
 
The second possibility consist in 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.<br>  
 
The second possibility consist in 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.<br>  
Then you can register a shortcut using Plugins > Shortcuts > Add Shortcut…
+
Then you can register a shortcut using {{bc|Plugins|Shortcuts|Add Shortcut…}}
  
 
[[Category:User interface]]
 
[[Category:User interface]]

Revision as of 08:47, 10 January 2020

ImageJ has a lot of keyboard shortcuts.

Listing all keyboard shortcuts

For a verbose list of keyboard shortcuts, call Plugins  › Shortcuts  › List Shortcuts.

The Command Launcher

Use ^ Ctrl+L (on Mac, Command+L) to open the Command Launcher, 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, hit ^ Ctrl+9 (on Mac, Command+9).

Open

To open new images, type ^ Ctrl+O (on Mac, Command+O).

Creating your own keyboard shortcuts

You can also assign your own keyboard shortcuts!

Assign a shortcut to a macro

There are 2 options to assign a keyboard shortcut to a macro.

Option 1: StartupMacros

Either put the code of the macro in the file macro>StartupMacros.ijm (or StartupMacros.fiji.ijm in Fiji) to have it installed automatically.
The code of the macro must declared a keyboard shortcut in square bracket as such

macro "Macro 1 [1]" {
    print("The user pressed '1'");
    } 

Option 2: Associate shortcut to a plugin menu entry

The second possibility consist in 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 Plugins › Shortcuts › Add Shortcut…