Using Command Line Shortcut Keys
User-defined shortcut keys: include Ctrl+G, Ctrl+L, Ctrl+O, and Ctrl+U. You can associate these shortcut keys with any commands. When a shortcut key is pressed, the system runs the corresponding command.
System-defined shortcut keys: shortcut keys defined in the system that have fixed functions. Users cannot define these shortcut keys. Table 1-5 lists the frequently used system-defined shortcut keys.
The terminal in use may affect the functions of the shortcut keys. For example, if the shortcut keys defined by the terminal conflict with those defined in the system, the shortcut keys entered by the user are captured by the terminal program and the commands corresponding to the shortcut keys are not executed.
User-defined Shortcut Keys
- Run the system-view command to enter the system view.
- Run the hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_U } command-text command to configure a shortcut key corresponding to a command.
Ctrl+G: display current-configuration
Ctrl+L: undo idle-timeout
Ctrl+O: undo debugging all
Ctrl+U: Null
When defining shortcut keys, use double quotation marks to define the command if this command contains several keywords separated by spaces. For example, hotkey ctrl_l "display tcp status". Do not use double quotation marks to define a command if the command contains only one keyword.
Run the display hotkey command to view the status of the defined, undefined, and system-defined shortcut keys.
Run the undo hotkey command to restore default values of the configured shortcut keys.
Shortcut keys are executed in the same way as commands. The system can record commands in their original formats in the command buffer and logs to help query and locate the fault.
The user-defined shortcut keys are available to all users. If a user does not have the rights to use the command defined by a shortcut key, the system displays an error message when this shortcut key is executed.
System-defined Shortcut Keys
Key |
Function |
---|---|
Ctrl+A |
Moves the cursor to the beginning of the current line. |
Ctrl+B |
Moves the cursor back one character. |
Ctrl+C |
Stops performing current functions. |
Ctrl+D |
Deletes the character where the cursor is located at. |
Ctrl+E |
Moves the cursor to the end of the last line. |
Ctrl+F |
Moves the cursor forward one character. |
Ctrl+H |
Deletes the character on the left side of the cursor. |
Ctrl+I |
Provides the same function as Tab. |
Ctrl+J |
Provides the same function as Enter. |
Ctrl+M |
Provides the same function as Enter. |
Ctrl+N |
Displays the next command in the history command buffer. |
Ctrl+P |
Displays the previous command in the history command buffer. |
Ctrl+T |
Provides the same function as a question mark. |
Ctrl+W |
Deletes a character string on the left side of the cursor. |
Ctrl+X |
Deletes all the characters on the left side of the cursor. |
Ctrl+Y |
Deletes all the characters on the right side of the cursor and the character where the cursor is located at. |
Ctrl+Z |
Returns to the user view. |
Ctrl+] |
Stops incoming connections or redirects the connections. |
Esc+B |
Moves the cursor back one word. |
Esc+D |
Deletes one word on the right side of the cursor. |
Esc+F |
Moves the cursor forward one word. |