Development Environment    

Arrow and Control Keys in the Command Window

Following is the list of arrow and control keys you can use in the Command Window. If the preference you select for Command line key bindings is Emacs (MATLAB standard), you can also use the Ctrl+key combinations shown. See also general Keyboard Shortcuts.

Key
Control Key for Emacs (MATLAB standard) Preference
Operation 

Ctrl+P
Recall previous line. See also Command History, which is a log of previously used functions, and Keeping a Session Log. Works only at command line.

Ctrl+N
Recall next line. Works only at command line if you previously used the up arrow or Ctrl+P.

Ctrl+B
Move back one character.

Ctrl+F
Move forward one character.
Ctrl+

Move right one word.
Ctrl+

Move left one word.
Home
Ctrl+A
Move to beginning of command line.
End
Ctrl+E
Move to end of command line.
Ctrl+Home

Move to top of Command Window.
Ctrl+End

Move to end of Command Window.
Esc
Ctrl+U
Clear command line.
Delete
Ctrl+D
Delete character at cursor in command line.
Backspace
Ctrl+H
Delete character before cursor in command line.

Ctrl+K
Cut contents (kill) to end of command line.
Shift+Home

Highlight to beginning of command line.
Shift+End

Highlight to end of last line. Can start at any line in the Command Window.


  Command Line Editing Clearing the Command Window