Learning Center


How to Navigate the COMSOL Multiphysics® User Interface

Utilizing Keyboard Shortcuts

Once you have learned and memorized the following keyboard shortcuts for frequently used commands and actions, they can help increase your productivity, replacing the need to use the mouse to access the corresponding functionality.

Navigating the Model Builder Tree

You can move up and down through the nodes in the Model Builder tree that represent the model in the Model Builder window by using the up and down arrow keys. In addition, you can use the following key combinations to navigate the model tree:

  • The right arrow key expands a node to show its subnodes
  • The left arrow key collapses a node to hide its subnodes
  • The / or + key on the keyboard number pad collapses and expands a branch in the model tree or application tree
  • Alt+left arrow key (Ctrl+left arrow key on macOS) moves to the previously selected node in the Model Builder
  • Alt+right arrow key (Ctrl+right arrow key on macOS) moves to the next selected node in the Model Builder

You can also use the Collapse All and Expand All buttons on the Model Builder window toolbar. The following images show the same model tree fully collapsed and fully expanded (the fully expanded image does not show the entire expanded tree).

The model tree collapsed and expanded.
The same model tree fully collapsed (left) and fully expanded (right).

Useful Keyboard Shortcuts for COMSOL Multiphysics®

There are many keyboard shortcuts available when using COMSOL Multiphysics®. You are probably familiar with some of them from other software programs, such as Ctrl+S for Save; Ctrl+A for Select All; Ctrl+C and Ctrl+V for Copy and Paste, respectively; and the Del key for Delete.

Note: On macOS, Command+S, Command+A, and so on replace the commands using the Ctrl key on the Windows® and Linux® operating systems.

The following table includes some of the most useful keyboard shortcuts:

Keyboard Shortcut Description
Ctrl+O Open a COMSOL file, such as an MPH-file (.mph)
Ctrl+F8 Test application; launch application for testing
Ctrl+D Clear the selection of all domains, boundaries, edges, or points in the Model Builder; clear all selections in form editor windows
Ctrl+F Open the Find tool for finding a search string in a model or application method and searching for specific strings in settings, descriptions, tags, and labels for nodes in the Model Builder and Application Builder trees
Ctrl+Z Undo the last operation
Ctrl+Y Redo the last undone operation
Ctrl+Space Opens the autofill drop down for variables. You can see an example of this in the Find and Autocomplete section of a previous article in this course.
Ctrl+Mouse Scroll Wheel Zoom in and out in the Graphics window
Hold Alt On Windows®, you can hold Alt and type ASCII numbers into text fields with the number pad
F1 Open the Help window to display context help and access the user documentation
F2 Rename the selected node, file, or folder
F7 Build the selected node in the geometry and mesh branches; compute the selected study step; compute to the selected node in the solver sequence; or plot a time-dependent, eigenfrequency, or eigenvalue solution; in Windows®, step into the method editor’s debugging tool in the Application Builder
F8 Build the geometry or mesh, compute the entire solver sequence, update results data, update the plot, or run the model method in a method call

F1, F2, and so on are function keys, typically located above the standard alphanumeric keypad on your keyboard.

Keyboard Shortcuts for the Application Builder

When you create methods in the Application Builder, you work with the code for the methods in a Method Editor window. In this environment, the following keyboard shortcuts can be especially useful:

Keyboard Shortcut Description
F8 Check the syntax in the method; problems appear in an Error and Warnings window.
F11 Go to the model node.
For example, if you highlight “pg4" in model.result("pg4").run();, the corresponding Plot Group node is highlighted in the Editor Tools window. In that window, click the Edit Node button to move to the corresponding node in the Model Builder window (to edit its settings, for example).
Ctrl+1 Create local variable declarations, which can simplify the code.
For example, the code model.result("pg4").run(); is then transformed to the following two lines:
ResultFeature pg4 =
model.result("pg4"); pg4.run;
where you can use the locally declared variable pg4 throughout the method.
Ctrl+K Create a shortcut to an object or menu; similar to Ctrl+1 but useful when you want to refer to an object, such as a plot group, by the same variable (shortcut) name in multiple methods.
For example, when you press Ctrl+K when highlighting “pg4” in model.result("pg4").run();, a Use Shortcut dialog box appears where you can provide a name for the shortcut and, as an option, update all methods. The shortcut pg4, representing Results/result/pg4, then appears under List of Shortcuts in the Settings window for the Declarations>Shortcuts node and can be used throughout all methods in the application to simplify the code.
Ctrl+R Record code; start recording the corresponding code for all subsequent modeling steps. The COMSOL Desktop® windows get a red frame to indicate that recording is in progress. Press Ctrl+R again to stop the recording. The recorded code is inserted in the active method used for the recording.

Using these keyboard shortcuts can help you to develop and debug methods for your simulation applications faster.

Key Takeaways

Here, we have just scratched the surface of how you can use keyboard shortcuts to become more productive during your COMSOL Multiphysics® modeling sessions. Explore these keyboard shortcuts to see if they, once memorized, make some tasks faster and easier to perform.

There are many additional keyboard shortcuts and mouse shortcuts. The Appendix B — Keyboard and Mouse Shortcuts section in the Introduction to COMSOL Multiphysics documentation lists all available shortcuts. In the COMSOL Multiphysics Reference Manual, you will find additional information about how to customize your modeling environment.

Submit feedback about this page or contact support here.