Shortcuts

QuPath would like you to be able to work easily with your images, and not get in your way.

Learning the shortcut keys for the tools and commands you use most frequently can help a lot to get things done quickly, and with less frustration.

Viewer shortcuts

The following shortcuts apply to the viewer. They are worth remembering, because they can be used very frequently when navigating and annotating images.

Note

These shortcuts only work whenever the viewer is ‘in focus’, i.e. it is the last thing that was clicked. If a shortcut doesn’t seem to work, click on the viewer once to bring it into focus, then try the shortcut again.

Drawing & navigation

Tool Shortcut
Move M
Move (temporary) Spacebar
Rectangle R
Ellipse O
Line L
Polygon P
Polyline V
Brush B
Wand W
Points .

The Alt key

  • When the Move tool is selected, use the Alt key to click on multiple objects to select them.
  • When the Brush or Wand tools are selected, use the Alt key to switch to ‘eraser’ mode when drawing.

The Shift key

  • When the Brush or Wand tools are selected, use the Shift key to continue adding to an existing selected annotation (rather than creating a new one).

Display shortcuts

The following shortcuts are used to toggle on/off display elements in the viewer.

Action Shortcut
Show/hide detections H
Show/hide annotations A
Show/hide TMA grid G
Show/hide counting grid Shift + G
Show/hide pixel classification C
Fill/unfill detections F
Fill/unfill annotations Shift + F
Show/hide color channel Numeric keys

Command shortcuts

The following shortcuts trigger commands that can also be accessed within the QuPath menus.

Because the shortcuts are shown in the menus as well, only a small number of the most important are shown here to draw attention to them - subjectively ordered according to usefulness.

Main QuPath window

Command Shortcut
File ‣ Save Ctrl + S
File ‣ Reload data Ctrl + R
View ‣ Show command list Ctrl + L
View ‣ Brightness/Contrast Shift + C
View ‣ Show log Ctrl + Shift + L
Objects ‣ Duplicate annotation Shift + D
Objects ‣ Restore last annotation Shift + E
Objects ‣ Create full image annotation Ctrl + Shift + A
Objects ‣ Select ‣ Reset selection Ctrl + Shift + R
Classify ‣ Create detection classifier Ctrl + Shift + D

Scripting shortcuts

Script editor menus

The Script editor has its own menubar, which supports the followings shortcuts when in focus.

Command Shortcut
Run ‣ Run Ctrl + R
File ‣ Save Ctrl + S
File ‣ Close script Ctrl + W
Edit ‣ Find Ctrl + F

Autocompletion

There is an additional shortcut that can be very helpful when typing code in the Script editor window: for any built-in function, start typing the name and then press Ctrl + space.

If the script editor can find the function you are aiming at, it should then auto-complete the name. If there are multiple options, press Ctrl + space repeatedly to cycle through them.

For example, starting to type

cells = getC

and pressing Ctrl + space should automatically produce

cells = getCellObjects

Pressing Ctrl + space again immediately would produce

cells = getColorRGB

Probably not what you want in this case, admittedly, but useful to know. Especially if, like me, you often do not quite remember the function name or capitalization used.