Skip to content

Commit

Permalink
📝 Update keyboard shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
veit committed May 18, 2023
1 parent 74a69b0 commit 81f728c
Showing 1 changed file with 97 additions and 65 deletions.
162 changes: 97 additions & 65 deletions docs/workspace/jupyter/notebook/shortcuts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,127 +13,159 @@ green cell border.
**Command mode** binds the keyboard to notebook-level commands and is indicated
by a gray cell border with a blue left border.

Command mode
------------

This mode is available with ``esc``.

+---------------------------------------------------------+
| Command mode |
+=========================================================+
| This mode is available with :kbd:``. |
+----------------+----------------------------------------+
| ```` | Call up edit mode |
| :kbd:`f` | find and replace |
+----------------+----------------------------------------+
| ``⇧↩`` | Execute cell, select below |
| :kbd:`` | enter edit mode |
+----------------+----------------------------------------+
| ``⌃↩`` | Run cell |
| :kbd:`--f`, | open the command palette |
| :kbd:`--p`, | |
| :kbd:`p` | |
+----------------+----------------------------------------+
| ``⌥↩`` | Execute cell, insert below |
| :kbd:`-` | run cell, select below |
+----------------+----------------------------------------+
| ``Y`` | to the code cell |
| :kbd:`-`, | run selected cells |
| :kbd:`-` | |
+----------------+----------------------------------------+
| ``M`` | to the markdown cell |
| :kbd:`-` | run cell and insert below |
+----------------+----------------------------------------+
| ``R`` | to the raw view |
| :kbd:`y` | change cell to code |
+----------------+----------------------------------------+
| ``1``, ``2`` | Change the cell to ``h1``, ``h2`` |
| etc. | etc. |
| :kbd:`m` | change cell to markdown |
+----------------+----------------------------------------+
| ````, ``K`` | to the cell above |
| :kbd:`r` | change cell to raw |
+----------------+----------------------------------------+
| ````, ``J`` | to the next cell |
| :kbd:`1`, | change cell to heading 1, heading 2, |
| :kbd:`2` etc. | etc. |
+----------------+----------------------------------------+
| ``A``, ``B`` | Insert cell above or below |
| :kbd:`k`, | select cell above |
| :kbd:`` | |
+----------------+----------------------------------------+
| ``X`` | Cut out selected cell |
| :kbd:`j`, | select cell below |
| :kbd:`` | |
+----------------+----------------------------------------+
| ``C`` | Copy selected cell |
| :kbd:`-k`, | extend selected cells above |
| :kbd:`-` | |
+----------------+----------------------------------------+
| ``⇧V`` | Insert line above |
| :kbd:`-j`, | extend selected cells below |
| :kbd:`-` | |
+----------------+----------------------------------------+
| ``V`` | Insert cell below |
| :kbd:`-a` | select all cells |
+----------------+----------------------------------------+
| ``Z`` | Undo delete cell |
| :kbd:`a` | insert cell above |
+----------------+----------------------------------------+
| ``D``-``D`` | Delete cell |
| :kbd:`b` | insert cell below |
+----------------+----------------------------------------+
| ``⇧M`` | Merge cell with next |
| :kbd:`x` | cut selected cells |
+----------------+----------------------------------------+
| ``⌘S`` | Save and checkpoint |
| :kbd:`c` | copy selected cells |
+----------------+----------------------------------------+
| ``L`` | Toggle line numbers |
| :kbd:`-v` | paste cells above |
+----------------+----------------------------------------+
| ``O`` | Toggle output |
| :kbd:`v` | paste cells below |
+----------------+----------------------------------------+
| ``⇧O`` | Toggle the scrolling of the output |
| :kbd:`z` | undo cell deletion |
+----------------+----------------------------------------+
| ``Esc``, ``Q`` | Exit command mode |
| :kbd:`d d` | delete selected cells |
+----------------+----------------------------------------+
| ``H`` | Help dialog for keyboard shortcuts |
| :kbd:`-m` | merge selected cells, or current cell |
| | with cell below if only one cell is |
| | selected |
+----------------+----------------------------------------+
| ``I``-``I`` | Interrupt kernel |
| :kbd:`-s`, | save and checkpoint |
| :kbd:`s` | |
+----------------+----------------------------------------+
| ``0``-``0`` | Restart the kernel |
| :kbd:`l` | toggle line numbers |
+----------------+----------------------------------------+
| ```` | scroll down |
| :kbd:`o` | toggle output of selected cells |
+----------------+----------------------------------------+
| ``⇧␣`` | scroll up |
| :kbd:`-o` | toggle output scrolling of selected |
| | cells |
+----------------+----------------------------------------+
| ```` | ignore |
| :kbd:`h` | show keyboard shortcuts |
+----------------+----------------------------------------+
| :kbd:`i i` | interrupt the kernel |
+----------------+----------------------------------------+
| :kbd:`0 0` | restart the kernel (with dialog) |
+----------------+----------------------------------------+
| :kbd:`-v` | dialog for paste from system clipboard |
+----------------+----------------------------------------+
| :kbd:``, | close the pager |
| :kbd:`q` | |
+----------------+----------------------------------------+

Edit mode
---------

This mode becomes available with ``Enter``.

+---------------------------------------------------------+
| Edit mode |
+=========================================================+
| This mode becomes available with :kbd:``. |
+----------------+----------------------------------------+
| :kbd:`` | code completion or indent |
+----------------+----------------------------------------+
| :kbd:`-` | tooltip |
+----------------+----------------------------------------+
| :kbd:`-]` | indent |
+----------------+----------------------------------------+
| :kbd:`-[` | dedent |
+----------------+----------------------------------------+
| :kbd:`-a` | select all |
+----------------+----------------------------------------+
| :kbd:`-z` | undo |
+----------------+----------------------------------------+
| ```` | Code completion or indentation |
| :kbd:`-/` | comment |
+----------------+----------------------------------------+
| ``⇧⇥`` | Tooltip |
| :kbd:`-d` | delete whole line |
+----------------+----------------------------------------+
| ``⌘]`` | Indent |
| :kbd:`-u` | undo selection |
+----------------+----------------------------------------+
| ``⌘[`` | Move out |
| :kbd:`` | toggle overwrite flag |
+----------------+----------------------------------------+
| ``⌘A`` | Select all |
| :kbd:`-` | go to cell start |
+----------------+----------------------------------------+
| ``⌘Z`` | Undo |
| :kbd:`-` | go to cell end |
+----------------+----------------------------------------+
| ``⌘⇧Z``, ``⌘Y``| Repeat |
| :kbd:`-` | go one word left |
+----------------+----------------------------------------+
| ``⌘↑`` | to the beginning of the cell |
| :kbd:`-` | go one word right |
+----------------+----------------------------------------+
| ``⌘↓`` | to the end of the cell |
| :kbd:`-` | delete word before |
+----------------+----------------------------------------+
| ``⌥←`` | one word to the left |
| :kbd:`-` | delete word after |
+----------------+----------------------------------------+
| ``⌥→`` | one word to the right |
| :kbd:`--z` | redo |
+----------------+----------------------------------------+
| ``⌥⌫`` | delete previous word |
| :kbd:`--u` | redo selection |
+----------------+----------------------------------------+
| ``⌥⌦`` | delete the following word |
| :kbd:`-k` | emacs-style line kill |
+----------------+----------------------------------------+
| ``⌘⇧Z`` | Repeat |
| :kbd:`-` | delete line left of cursor |
+----------------+----------------------------------------+
| ``⌘⇧U`` | Repeat selection |
| :kbd:`-` | delete line right of cursor |
+----------------+----------------------------------------+
| ``⌘⌫`` | delete to the beginning of the line |
| :kbd:`-m`, | enter command mode |
| :kbd:`` | |
+----------------+----------------------------------------+
| ``⌘⌦`` | delete to the end of the line |
| :kbd:`--f`, | open the command palette |
| :kbd:`--p` | |
+----------------+----------------------------------------+
| ``⌃M``, ``Esc``| Command mode |
| :kbd:`-` | run cell, select below |
+----------------+----------------------------------------+
| ``⇧↩`` | Execute cell, select below |
| :kbd:`-` | run selected cells |
+----------------+----------------------------------------+
| ``⌃↩`` | Run selected cells |
| :kbd:`-` | run selected cells |
+----------------+----------------------------------------+
| ``⌥↩`` | Execute cell, insert below |
| :kbd:`-` | run cell and insert below |
+----------------+----------------------------------------+
| ``⌃⇧-`` | Split cell at cursor |
| :kbd:`---` | split cell at cursor(s) |
+----------------+----------------------------------------+
| ``⌘S`` | Save and checkpoint |
| :kbd:`-s` | save and checkpoint |
+----------------+----------------------------------------+
| ```` | Cursor down |
| :kbd:`` | move cursor down |
+----------------+----------------------------------------+
| ```` | Cursor up |
| :kbd:`` | move cursor up |
+----------------+----------------------------------------+

Own keyboard shortcuts
Expand Down

0 comments on commit 81f728c

Please sign in to comment.