Skip to main content

MATLAB shortcuts

Your answer helps keep this page right.

Do these shortcuts work for you?

Function keys, alone or with Shift, are the whole Running and Debugging section of the MATLAB list. Run current script, Run selected section, Step over, Step into and Set/clear breakpoint need no modifier. Command Window has two shortcuts, Recall previous command and Recall next command, on the up and down arrow keys. Every Navigation shortcut is one modifier and a letter, such as Go to line and Open function definition.

Start with these

  • Run current script
  • Run selected section
  • Set/clear breakpoint
  • Step over
  • Go to line
  • Evaluate selection in Command Window

Tips for MATLAB

  • With Shift, the key of Step into F11 becomes Step out ShiftF11 and the key of Run current script F5 becomes Stop debugging ShiftF5.
  • In Editing, the two bracket keys change the indent: Increase indent Ctrl] and Decrease indent Ctrl[ share one modifier.
Jump to section

File6

ActionShortcut
New script
Open file
Save current file
Save as
Close current document
Print

Editing11

ActionShortcut
Undo
Redo
Cut
Copy
Paste
Select all
Comment lines
Uncomment lines
Increase indent
Decrease indent
Smart indent (auto-format)

Running and Debugging7

ActionShortcut
Run current script
Run selected section
Step over
Step into
Step out
Set/clear breakpoint
Stop debugging

Command Window2

ActionShortcut
Recall previous command
Recall next command
Report a problem

GitHub is public. Email is private.

Frequently Asked Questions

How many keyboard shortcuts does MATLAB have on Windows?

MATLAB has 31 keyboard shortcuts on Windows, organized into 5 sections: File, Editing, Navigation, Running and Debugging, and more. This page lists all of them with searchable, organized shortcut tables.

Which MATLAB shortcuts should I learn first?

Start with Run current script (F5), Run selected section (F9), Set/clear breakpoint (F12), Step over (F10), Go to line (Ctrl+G), Evaluate selection in Command Window (Ctrl+E). The sections on this page list the rest.

Can I download MATLAB shortcuts as a PDF?

Yes. Click the download button at the top of this page to generate a printable PDF cheat sheet with all 31 MATLAB shortcuts. The PDF includes organized sections, keycap-style key labels, and space for your own notes.

Where is the official MATLAB keyboard shortcuts documentation?

The official MATLAB keyboard shortcuts documentation is available on their website. Every shortcut on this page is sourced from and verified against the official documentation to ensure accuracy.

Do these MATLAB shortcuts work on all Windows keyboards?

Yes. These shortcuts work on standard Windows keyboards. The modifier keys are Ctrl, Alt, Shift, and the Windows key (⊞). Some laptop keyboards may have compact layouts where certain keys require an Fn modifier to access.

Maintained by