Keyboard Shortcuts and Mouse Actions for Simulink Modeling - MATLAB & Simulink (2024)

Keyboard Shortcuts and Mouse Actions for Simulink Modeling

You can use keyboard shortcuts and mouse actions to model systems in Simulink®. To open this page from a model, press Shift+? or click Keyboard Shortcuts Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (1) on the navigation bar.

Note

When you use the keyboard shortcuts on macOS:

  • Press command (⌘) instead of Ctrl.

  • Press option instead of Alt.

View Keyboard Shortcuts in Editor

When you are in any of these modes, you can view a hints panel that displays keyboard shortcuts specific to the active mode.

ModeDefinitionHow to Enter ModeHow to View Hints Panel
Keyboard SelectionUse the arrow keys to select a different block.Select a block in your model. Press M to switch from movement mode (the default) to selection mode.The hints panel appears when you enter selection mode.
MovementMove a block by dragging it with the pointer.Drag a block with the pointer.The hints panel appears when you enter movement mode.
Keyboard MovementUse the arrow keys to move the selected block.

When you open Simulink, you are in movement mode by default.

To switch from selection mode to movement mode, press M.

The hints panel appears when you use the arrow keys to move a selected block.

Signal tracing

Trace the signal line to the signal source or destination. See Highlight Signal Sources and Destinations for details.

Click a signal in your model. Pause on the ellipsis that appears. In the action bar that expands, click either Highlight Signal to Source Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (2) or Highlight Signal to Destination Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (3).

The hints panel appears when you enter signal tracing mode.
Pan and zoomPan to move the view over the model. Zoom to change how close the model appears.When you open Simulink, you are in pan and zoom mode by default.

Press the space bar until the hints panel expands. If the hints panel is minimized, press the space bar until the ? button Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (4) appears.

To hide the hints panel, click the canvas.

ResizeChange the size of a block.Pause on a block resize handle.The hints panel appears when you enter resize mode.

To minimize the hints panel, press ? on your keyboard. When the hints panel is minimized, only the ? button Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (5) is visible.

To restore the hints panel, press ? on your keyboard.

Minimizing or restoring a hints panel in one mode does not affect the hints panels of other modes. Expanded hints panels remain expanded and minimized hints panels remain minimized across MATLAB® sessions.

For example, to see the Keyboard Selection hints panel for selection mode:

  1. Select a block in your model.

  2. Press M. The minimized hints panel appears in the lower right of the model window.

  3. To restore the hints panel, press ? on your keyboard.

Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (6)

Perform File and Clipboard Actions

TaskShortcuts
Open modelCtrl+O
Create modelCtrl+N
Print modelCtrl+P
Save all modified models in current model hierarchyCtrl+S
Save current referenced modelCtrl+Shift+S
Close modelCtrl+W
CutCtrl+X
CopyCtrl+C
PasteCtrl+V
UndoCtrl+Z
RedoCtrl+Y, Ctrl+Shift+Z (Simulink Online™)
Find search stringCtrl+F

Zoom and Pan

TaskShortcuts and Actions
Fit diagram to windowSpace bar
Fit selection to windowSpace bar + F
Zoom inCtrl+Plus (+) or space bar + Plus (+)
Zoom outCtrl+Minus (-) or space bar + Minus (-)
Zoom to 100%Ctrl+0, Alt+1, or space bar + 0
Zoom with scroll wheel

Scroll wheel

Ctrl + scroll wheel when Scroll wheel controls zooming is cleared

Zoom in on model elementDrag the Zoom button Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (7) from the palette to the element.
View portion of block diagram visible in model window relative to full block diagram with miniature map

Zoom or pan to part of the model.

When only part of the model is visible, press the space bar until the miniature map appears.

View different portion of modelClick the destination in the miniature map.
Pan

Drag the highlighted area in the miniature map.

Drag with middle button.

Space bar + drag.

When a scroll bar is shown, to move the scroll bar with your keyboard, press Space bar + left, right, up, or down arrow.

Pan verticallyCtrl + scroll wheel
Pan horizontallyShift + scroll wheel
Pan by pageShift + space bar + left, right, up, or down arrow

Navigate Model

TaskShortcuts and Actions
Open model

Double-click.

Enter

Change tabsCtrl+Shift+Tab
Enter selected subsystem, referenced model, or Stateflow® chartEnter
Go to parent of selected subsystem, referenced model, or Stateflow chartEsc
Go to last viewed component in model hierarchy navigation historyCtrl+[
Go to next viewed component in model hierarchy navigation historyCtrl+]
Look under block maskCtrl+U
For linked blocks, go to library of parent blockCtrl+L
Open the Model ExplorerCtrl+H

Select and Move Model Elements

Selected elements have a solid blue outline. The most recently selected element has blue corner brackets in addition to the outline. To represent the cursor when you use the keyboard for selection, a blue box with dashed lines surrounds the element.

Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (8)

By default, the model is in movement mode. To switch to selection mode, press M.

TaskShortcuts and Actions
Toggle between movement and selection mode

M

Select all blocks, lines, and annotationsCtrl+A
Clear selectionCtrl+Alt+A
Select one or more model elementsDraw a selection box around the model elements you want to select. Start the selection box on an empty spot on the canvas.
Move any model element, including signal labelsDrag element.
Move selected elements

Drag one of the selected elements.

Drag selection box.

After selecting elements with the keyboard, in selection mode, press the left, right, up, or down arrow.

By default, when you move or resize a block with three or more ports, the shape of signal lines connecting to blocks with one or two ports does not change. Instead, the connected blocks move.

Turn the functionality off.

Hold the space bar while you move or resize a block.

When you release the space bar, the functionality turns back on.

Change selection to closest similar element in a direction

In selection mode, press the left, right, up, or down arrow.

Move cursor to closest element in a direction, regardless of similarity

In selection mode, press Ctrl+Shift + left, right, up, or down arrow.

Change selection to element at top-left of canvas

Ctrl+Home

On macOS, press home.

Change selection to element at bottom-right of canvas

Ctrl+End

On macOS, press end.

Change selection to leftmost element relative to cursor

Home

On macOS, press control+left.

Change selection to rightmost element relative to cursor

End

On macOS, press control+right.

Select additional adjacent elements

To select additional adjacent elements with the keyboard, in selection mode, press Shift + left, right, up, or down arrow.

To select additional adjacent elements with the pointer, press Shift while dragging a selection box around the additional elements.

Select additional elements that are not adjacent

To select additional elements with the keyboard, in selection mode, press Ctrl + left, right, up, or down arrow and navigate to the element you want to select. Then, add the element to the selection by pressing Ctrl + space bar.

On macOS, to add the current element to the selection, press command+shift + space bar or shift + space bar.

To select additional elements with the pointer, press Shift and click.

Constrain movement of model elements to vertical and horizontal directionsStart dragging the element, then press Shift.

Add and Edit Model Elements

TaskShortcuts and Actions
Open or hide the Property Inspector

Ctrl+Shift+I

On macOS, press command+option+O. (since R2023b)

Before R2023b, on macOS, press command+shift+I.

Set main parameter for selected blockAlt+Enter
Add block to model at current location with the quick insert menu

Double-click the Simulink Editor canvas and start typing the block name, then select the block from the menu.

Ctrl+Period (.) twice and start typing the block name, then press the down arrow to select the block from the list and press Enter to insert the block.

On AZERTY keyboards, press Ctrl+Shift+Period (.) instead of Ctrl+Period (.).

Choose block to connect to signal line

Move your pointer over the unconnected end of a signal line. When your pointer is over the end of the signal line, it becomes a circle. Double-click the end of the signal line. Using the quick insert menu that appears, add a block. The new block is connected to the end of the signal line that you double-clicked.

For information about how to use the quick insert menu, see Add Blocks to Models Using Quick Insert Menu.

Open the Library BrowserCtrl+Shift+L
Add annotation to model at current location with the quick insert menu

Double-click the Simulink Editor canvas and type the annotation content, then select the annotation option.

Ctrl+Period (.) twice and type the annotation content, then press the down arrow to select the annotation option and press Enter to insert the annotation.

On AZERTY keyboards, press Ctrl+Shift+Period (.) instead of Ctrl+Period (.).

Copy selected model elements

Drag elements with the right mouse button.

Ctrl + drag.

Copy selected model elements between Simulink Editor windowsDrag elements between windows.
Delete selected model elementsDelete or Backspace

Connect Model Elements

TaskShortcuts and Actions
Connect blocks with signal lines

Click a port. Click the blue chevron symbol Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (9) that appears near a compatible port you want to connect to.

Select the first block, then Ctrl + click a second block.

Drag from port to port.

Click a port and press Shift as you connect to the next port. Press Shift to make multiple, consecutive connections.

Branch signal line

Click a port, move the cursor near the line you want to branch, and then click after you see the preview.

Select a line, move the cursor toward the element you want to connect with, and then click the blue chevron symbol Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (10) that appears near the port.

Ctrl + drag line.

Right mouse button + drag.

Add ports to blocks that take multiple inputs

Drag toward the port from a compatible block or signal line.

Drag from the edge of the block that you want to add the port to.

Click the edge of the port, and then drag.

Click the edge of the port, move the cursor over the signal type — signal, bus, or connector — from the menu, and drag.

Disconnect selected blocks

Press Shift, then drag block.

After selecting blocks with the keyboard, press M then Shift + left, right, up, or down arrow.

Comment through selected blocksCtrl+Shift+Y
Comment out or uncomment selected blocksCtrl+Shift+X

Name Model Elements

TaskShortcuts and Actions
Rename selected model element

Click or double-click the label.

Select the element and press F2.

On macOS, press command+return instead of F2.

Name signal lineDouble-click the signal and type its name.
Display name on branch of a named signal lineDouble-click the branch.
Name every branch of a signal lineRight-click the signal, select Properties, and use the Signal Properties dialog box.
Delete signal label and nameDelete characters in the label, or delete the name in Signal Properties dialog box.
Delete signal label only Right-click the label and select Delete Label.
Copy signal labelCtrl + drag the signal label.
Edit port labels on subsystem blocks

Point to the port label and click the interactive cue (blue box surrounding the label).

Select the port. Click the port label cue or press F2.

To switch between block name and signal name when editing labels on signal ports, press Ctrl+1,2.

To make successive port label edits on a subsystem block:

  • Select a port on the block, edit the label, and press Enter. This action enables keyboard selection of ports.

  • Use up or down arrow keys to select adjacent ports and press F2 for quick editing.

Format Block Diagram

TaskShortcuts and Actions
Automatically arrange modelCtrl+Shift+A
Resize block, maintaining ratio of width and heightShift + drag handle
Resize block about the centerCtrl + drag handle
Route lines around blocksShift + drag while drawing
Rotate blocks clockwiseCtrl+R
Rotate blocks counterclockwiseCtrl+Shift+R
Flip blocksCtrl+I
Create subsystem from selectionCtrl+G
Create subsystem or area from empty selection

To create the highlighted option, which you can change by using the arrow keys or mouse:

  • Click inside the selection box.

  • Press Enter.

Press the number key associated with an option.

Change signal label fontSelect the signal line (not the label), then on the Format tab, click the Font Properties button arrow, then click Fonts for Model.
Mask blockCtrl+M
Refresh Model blocksCtrl+K

Perform Generic Actions

TaskShortcuts and Actions
Perform generic action with the quick action search menu

Double-click the Simulink Editor canvas, select the Actions tab, and start typing the action name or description, then select the action from the list.

Ctrl+Period (.) and start typing the action name or description, then press the down arrow to select the action and press Enter to perform it.

On AZERTY keyboards, press Ctrl+Shift+Period (.) instead of Ctrl+Period (.).

Perform context-sensitive action

Before opening the quick action search menu, select a model element.

Simulate, Update, and Generate Code for Models

TaskShortcuts
Start simulationCtrl+T or F5
Stop simulationCtrl+Shift+T
Update modelCtrl+D
Open Configuration Parameters dialog boxCtrl+E
Build model (for code generation)Ctrl+B

Debug Simulations

Since R2023b

The keyboard shortcuts in the table are the same in the Simulink Editor, the Stateflow Editor, and the MATLAB Function Block Editor.

TaskShortcuts
Step over

F10

On macOS, press shift+command+O.

Step in

F11

On macOS, press shift+command+I.

Step out

Shift+F11

On macOS, press shift+command+U.

Related Topics

  • Library Browser Keyboard Shortcuts

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

 

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Keyboard Shortcuts and Mouse Actions for Simulink Modeling- MATLAB & Simulink (11)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

Contact your local office

Keyboard Shortcuts and Mouse Actions for Simulink Modeling
- MATLAB & Simulink (2024)

FAQs

Keyboard Shortcuts and Mouse Actions for Simulink Modeling - MATLAB & Simulink? ›

In MATLAB® Online™, to search text in the Command Window, use the Ctrl+F keyboard shortcut to open the find and replace dialog box.

What is the shortcut for search in MATLAB Simulink? ›

In MATLAB® Online™, to search text in the Command Window, use the Ctrl+F keyboard shortcut to open the find and replace dialog box.

How to run keyboard shortcut in MATLAB? ›

Use Keyboard Shortcuts to Navigate MATLAB
  1. Command Window: Ctrl+0.
  2. Command History: Ctrl+1.
  3. Current Folder: Ctrl+2.
  4. Workspace: Ctrl+3.
  5. Profiler: Ctrl+4.
  6. Figure Palette: Ctrl+6.
  7. Plot Browser: Ctrl+7.
  8. Property Editor: Ctrl+8.

How do I run a shortcut in Simulink? ›

To start execution of a model, select Start from the model editor's Simulation menu or click the Start button on the model's toolbar. You can also use the keyboard shortcut, Ctrl+T, to start the simulation.

How to use Simulink model in MATLAB? ›

Create a Simulink Model
  1. Select Simulink > Sources, and then add a Signal Generator block to the model.
  2. Select Simulink > Continuous, and then add a Transfer Fcn block to the model.
  3. Select Simulink > Sinks, and then add a Scope block to the model.

How to quick search in Simulink? ›

Keyword Search for Simulink Editor Actions
  1. To open the quick insert menu, double-click the canvas.
  2. To search for actions instead of blocks, switch to action search by pressing Ctrl+..
  3. To search for the action, type the keyword update .

How do I change shortcuts in Simulink? ›

To customize a keyboard shortcut: Open the Keyboard Shortcuts Preferences page in the Preferences Window and, in the search box, type an existing keyboard shortcut or the name of an action, tool, or menu. For example, you can type Ctrl+R (shortcut), Delete (action), Command Window (tool), or File (menu).

How can I learn keyboard shortcuts? ›

You can use mnemonics to learn and remember keyboard shortcuts by creating associations between the keys and the commands they perform. For example, you can remember that Ctrl + C copies the selected data by thinking of "copy" or "cut".

How to move a model in Simulink? ›

Use the arrow keys to move the selected block. When you open Simulink, you are in movement mode by default. To switch from selection mode to movement mode, press M.

How to run Simulink step by step? ›

In the Simulink Toolstrip, on the Simulation tab, click Step Forward to start a simulation of the model vdp . The simulation starts and pauses just after calculating the output values for the first simulation time and before stepping to the next simulation time.

What is the shortcut to add blocks in Simulink? ›

When you have found the block that you want to add, click and drag it from the Library tab or the Search Results tab to the Simulink canvas. To add the block to the model, you can also do one of these actions: Right-click the block in the Library Browser and select Add block to model. Select the block and press Ctrl+I.

What is the basics of Simulink? ›

Basic Elements

There are two major classes of items in Simulink: blocks and lines. Blocks are used to generate, modify, combine, output, and display signals. Lines are used to transfer signals from one block to another.

How to understand Simulink model? ›

The blocks and lines in a block diagram collectively describe the overall model of a system. Simulink extends classic block diagrams by: Adding a set of equations (block methods) to each block that defines the time-based relationships between the input signals, output signals, and block state variables.

Is MATLAB Simulink hard to learn? ›

Although Matlab is not considered to be a programming language, it really is easy to learn. When you write code on Matlab you actually don't care about declaring data types, allocating memories e.t.c like you do in other programming languages.

How to search in MATLAB Simulink? ›

In the Simulink quick access toolbar, click Find . If Find is not in the quick access toolbar, click Common Controls and select Find. With the Simulink Editor selected, press Ctrl+F.

What is the shortcut code for search? ›

Ctrl + f

What does Ctrl B do in Simulink? ›

Build action

With this option, pressing Ctrl+B or clicking Build Model: Generates code from the model. Compiles and links the code into a shared object called librsedu.so .

What is the shortcut for search function? ›

Press Ctrl+F, and then type your search words.

Top Articles
Latest Posts
Article information

Author: Chrissy Homenick

Last Updated:

Views: 5784

Rating: 4.3 / 5 (54 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Chrissy Homenick

Birthday: 2001-10-22

Address: 611 Kuhn Oval, Feltonbury, NY 02783-3818

Phone: +96619177651654

Job: Mining Representative

Hobby: amateur radio, Sculling, Knife making, Gardening, Watching movies, Gunsmithing, Video gaming

Introduction: My name is Chrissy Homenick, I am a tender, funny, determined, tender, glorious, fancy, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.