Editing

The notebook interface is a modal editor. The keyboard does different things depending on what mode the notebook is in.

There are two modes: edit mode and command mode.

Edit mode

When you click inside the input area of a cell you enter edit mode. This is indicated visually by a shadowed box surrounding your cell. While in edit mode you type text normally into the cell. Many keyboard shortcuts are disabled.

You can enter edit mode from command mode by pressing Return from command mode, or by clicking inside the input area with the mouse pointer.

Command mode

In command mode there is a simple dark outline of the cell. While in command mode you can quickly perform many operations with a single keystroke.

You can enter command mode from edit mode by pressing Esc, or by clicking on the cell outside the input area with the mouse pointer.

Key Commands

Many key bindings work no matter which mode you are in.

General (all modes)

+ N: new notebook

+ O: open

+ S: save

Shift + + S: save as

+ W: close

+ Q: quit

+ I: interrupt kernel

+ 0: restart kernel

+ =: insert cell below

Shift + + D: delete cell

Shift + + O: move cell up

Shift + + L: move cell down

Shift + Return : evaluate cell and move cursor down

+ Return : evaluate cell with no cursor movement

Option + Return : evaluate cell and insert new cell below

Shift + + X: cut cell

Shift + + C: copy cell

Shift + + V: paste cell

Edit mode exclusive

Esc: go to command mode

+ X: cut text

+ C: cop text

+ V: paste text

Shift + + -: split cell

+ M: go to command mode

Command mode exclusive

Return : go to edit mode

+ Y: change cell type to code

+ M: change cell type to markdown

+ R: change cell type to raw

: select previous cell

: select next cell

Y: change cell type to code

M: change cell type to markdown

R: change cell type to raw

K: select previous cell

J: select next cell

A: insert cell above

B: insert cell below

X: cut cell

C: copy cell

V: paste cell

Shift + V: paste cell above

1: heading level 1

2: heading level 2

3: heading level 3

4: heading level 4

5: heading level 5

S: save

D + D: delete cell

Z: undelete cell

L: toggle line numbers

O: toggle output

Shift + O: toggle output scrolling

I + I: interrupt kernel

0 + 0: restart kernel