You can perform a variety of actions with each cell in a notebook, including most of the cell actions supported in classic Jupyter notebooks. To see the set of available cell actions in the notebook editor, click on the menu icon in the upper right corner of the cell.

{% if section(page, "dr-notebooks") %}

![](images/nb-10.png)

{% else %}

![](images/wb-nb-10.png)

{% endif %}

## Modal editor {: #modal-editor }

DataRobot notebooks include a modal editor that changes keyboard shortcuts and cell actions based on which mode the notebook is in: [edit mode](#edit-mode) or [command mode](#command-mode).

### Edit mode {: #edit-mode }

Enter edit mode by clicking on the text editor portion of a cell. When a cell is in edit mode, you can enter text into the cell. This mode is indicated by a green border around the selected cell and text cursor inside of it:

{% if section(page, "dr-notebooks") %}

![](images/nb-30.png)

{% else %}

![](images/wb-nb-30.png)

{% endif %}

### Command mode {: #command-mode }

When you are in command mode, you are able to execute notebook-wide and cell-wide actions. However you cannot enter text into individual cells. Enter command mode by clicking the empty space outside of a DataRobot notebook's cells (where the pointer is in the following screenshot), or on the header or footer portion of the cell. This mode is indicated by a blue border around a cell:

{% if section(page, "dr-notebooks") %}

![](images/nb-31.png)

{% else %}

![](images/wb-nb-31.png)

{% endif %}

When a cell is currently selected in edit mode, you can switch to command mode via the keyboard shortcut ++esc++.

## Keyboard shortcuts {: #keyboard-shortcuts }

Some cell actions have corresponding keyboard shortcuts. It is important to note that *there are two different sets of keyboard shortcuts*, one corresponding to edit mode and another set for command mode. Edit mode primarily contains shortcuts for editing text, while command mode shortcuts control actions on the cell itself (and not the cell’s text contents). The majority of the DataRobot Notebook keyboard shortcuts align with the classic Jupyter shortcuts you may already be familiar with.

The tables below include a summary of all available cell actions. Some cell actions have corresponding keyboard shortcuts. To view the shortcuts in the notebook editor, select the keyboard icon from the sidebar.

=== "Mac keyboard shortcuts"

    Cell action | Keyboard shortcut | Description |
    ----------- | ----------------- | ----------
    **Command mode** | :~~: | :~~: |
    Switch to edit mode | ++enter++ | Exits command mode and uses edit mode shortcuts. |
    Run selected cells |  ++shift+enter++ | Runs the currently selected cell. |
    Run selected cells without advancing | ++cmd+enter++ | Runs the selected cell without progressing to the following cell.
    Insert code cell above | ++a++ | Inserts a code cell above the currently selected cell.
    Insert code cell below | ++b++ |  Inserts a code cell below the currently selected cell.
    Change cell to code | ++y++ | Changes a Markdown cell into a code cell.
    Change cell to Markdown | ++m++ | Changes a code cell into a Markdown cell.
    Stop execution (Interrupt kernel) | ++cmd+shift+c++ | Terminates the cell currently running in a notebook, as well as all queued cells.
    Select cell above | ++k+up++ | Selects the cell above the one currently selected.
    Select cell below |  ++k+down++ | Selects the cell below the one currently selected.
    Delete cell(s) | ++x++ | Deletes the currently selected cell.
    Copy selected cell(s) | ++c++ | Copies the selected cell(s) to your clipboard.
    Paste cell(s) below | ++v++ | Pastes copied cells below the currently selected cell. |
    Paste cell(s) above | ++shift+v++ | Pastes copied cells above the currently selected cell. |
    Undo delete | ++d+d++ | Undoes the previous cell deletion action. |
    Merge cells | ++shift+m++ | Merges the selected cell with the cell above or below. |
    Toggle line numbers | ++l++ | Shows or hides the line numbers for the selected code cell. |
    Toggle all line numbers | ++shift+l++ | Shows or hides the line numbers for all cells. |
    Toggle cell output | ++o++ | Shows or hides the output of a code cell. |
    Toggle all outputs | ++shift+o++ | Shows or hides the output of all code cells. |
    Toggle code display | ++e++ | Shows or hides the code input for the currently selected cell. If hidden, only the cell output is displayed. |
    Toggle all code displays | ++shift+e++ | Shows or hides the code input for all cells. |
    **Edit mode** | :~~: | :~~: |
    Switch to command mode | ++esc++ | Exits edit mode and uses command mode shortcuts. |
    Autocomplete code | ++tab++ | Triggers code completion suggestions. |
    Select all text | ++cmd+a++ | Selects all text in a cell. |
    Undo text | ++cmd+z++ | Undoes the previously entered text. |
    Split cell | ++cmd+shift+minus++ | Splits the contents of a cell into two separate cells at the cursor location. |
    Run selected cells | ++shift+enter++ | Runs the currently selected cell. |
    Run selected cells without advancing | ++cmd+enter++ | Runs the selected cell without progressing to the following cell. |
    Show inline documentation | ++shift+tab++ | For code cells, displays the docstrings tooltip for function documentation and parameters. |
    Comment | Insert a comment on the selected line. | N/A |
    Move cursor up | ++up++ | :~~: |
    Move cursor down | ++down++ | :~~: |
    Move one word right | ++opt+right++ | :~~: |
    Move one word left | ++opt+left++ | :~~: |
    Delete a line | ++cmd+d++ | :~~: |

=== "Windows keyboard shortcuts"

    Cell action | Keyboard shortcut | Description |
    ----------- | ----------------- | ----------
    **Command mode** | :~~: | :~~: |
    Switch to edit mode | ++enter++ | Exits command mode and uses edit mode shortcuts. |
    Run selected cells | ++shift+enter++ | Runs the currently selected cell. |
    Run selected cells without advancing | ++ctrl+enter++ | Runs the selected cell without progressing to the following cell. |
    Insert code cell above | ++a++ | Inserts a code cell above the currently selected cell. |
    Insert code cell below | ++b++ | Inserts a code cell below the currently selected cell. |
    Change cell to code | +y+ | Changes a Markdown cell into a code cell. |
    Change cell to Markdown | ++m++ | Changes a code cell into a Markdown cell. |
    Stop execution (Interrupt kernel) | ++ctrl+shift+c++ | Terminates the cell currently running in a notebook, as well as all queued cells. |
    Select cell above | ++k+up++ | Selects the cell above the one currently selected.  |
    Select cell below | ++k+down++ | Selects the cell below the one currently selected. |
    Delete cell(s) | ++x++ | Deletes the currently selected cell. |
    Copy selected cell(s) | ++c++ | Copies the selected cell(s) to your clipboard. |
    Paste cell(s) below | ++v++ | Pastes copied cells below the currently selected cell. |
    Paste cell(s) above | ++shift+v++ | Pastes copied cells above the currently selected cell. | ++shift+v++
    Undo delete | ++d+d++ | Undoes the previous cell deletion action. |
    Merge cells | ++shift+m++ | Merges the selected cell with the cell above or below. |
    Toggle line numbers | ++l++ | Shows or hides the line numbers for the selected code cell. |
    Toggle all line numbers | ++shift+l++ | Shows or hides the line numbers for all cells. |
    Toggle cell output | ++o++ | Shows or hides the output of a code cell. |
    Toggle all outputs | ++shift+o++ | Shows or hides the output of all code cells. |
    Toggle code display | ++e++ | Shows or hides the code input for the currently selected cell. If hidden, only the cell output is displayed. |
    Toggle all code displays | ++shift+e++ | Shows or hides the code input for all cells. |
    **Edit mode** | :~~: | :~~: |
    Switch to command mode | ++esc++ | Exits edit mode and uses command mode shortcuts. |
    Autocomplete code | ++tab++ | Triggers code completion suggestions. |
    Select all text | ++ctrl+a++ | Selects all text in a cell. |
    Undo text | ++ctrl+z++ | Undoes the previously entered text. |
    Split cell | ++ctrl+shift+minus++  | Splits the contents of a cell into two separate cells at the cursor location. |
    Run selected cells | ++shift+enter++ | Runs the currently selected cell. |
    Run selected cells without advancing |  ++ctrl+enter++ | Runs the selected cell without progressing to the following cell. |
    Show inline documentation | ++shift+tab++ | For code cells, displays the docstrings tooltip for function documentation and parameters. |
    Comment | ?? | Insert a comment on the selected line. |
    Move cursor up | ++up++ | :~~: |
    Move cursor down | ++down++ | :~~: |
    Move one word right | ++opt+right++ | :~~: |
    Move one word left | ++opt+left++ | :~~: |
    Delete a line | ++ctrl+d++ | :~~: |

### Additional actions {: #additional-actions }

In addition to the actions outlined above, DataRobot offers some additional cell control capabilities.

Cell action | Description
----------- | -----------
Move cell | Moves a cell to a new location in the notebook via the drag icon in the top center of the cell.
Run cells above | Runs all the cells above the currently selected cell (exclusive). |
Run cells below | Runs the currently selected cell and all cells below it (inclusive). |
Disable run | Disables a cell from executing after running. |
Move up | Moves the currently selected cell up one cell. |
Move down | Moves the currently selected cell down one cell. |
Duplicate cell | Duplicates the currently selected cell. |
Insert markdown cell above | Inserts a Markdown cell above the currently selected cell. |
Insert markdown cell below | Inserts a Markdown cell below the currently selected cell. |
Clear output | Clears the output of the selected code cell. |
Merge cell above or below | Merges the selected cell with the cell above or below. |


### Multi-cell selection
Similar to Jupyter, you can select multiple adjacent cells at once to perform bulk actions on those cells. To select multiple cells, either:

1. Hold down the Shift key and use your mouse to select the cells.
2. Hold down Cmd-Shift and use the Up/Down arrows to select the cells.
