iPython Notebook Keyboard Shortcuts

The documentation for the iPython Notebook is top-notch. I am only copying the keyboard shortcuts here so that I have quick access to them as I learn them. I like the notebook interface so much, despite it being browser-based, that I am actually using it as a notebook and I’m doing some drafting of my MLA paper in it. (I’ll report more on this experience later.)

Shortcut Action
Shift-Enter run cell
Ctrl-Enter run cell in-place
Alt-Enter run cell, insert below
Ctrl-m x cut cell
Ctrl-m c copy cell
Ctrl-m v paste cell
Ctrl-m d delete cell
Ctrl-m z undo last cell deletion
Ctrl-m – split cell
Ctrl-m a insert cell above
Ctrl-m b insert cell below
Ctrl-m o toggle output
Ctrl-m O toggle output scroll
Ctrl-m l toggle line numbers
Ctrl-m s save notebook
Ctrl-m j move cell down
Ctrl-m k move cell up
Ctrl-m y code cell
Ctrl-m m markdown cell
Ctrl-m t raw cell
Ctrl-m 1-6 heading 1-6 cell
Ctrl-m p select previous
Ctrl-m n select next
Ctrl-m i interrupt kernel
Ctrl-m . restart kernel
Ctrl-m h show keyboard shortcuts

[sheepish] The keyboard shortcuts are available under the Help menu. [/sheepish]

12 thoughts on “iPython Notebook Keyboard Shortcuts

  1. Thanks so much for posting this.

    I have a ridiculous question; I can’t figure the keyboard shortcuts for moving to the begining and end of a line. It’s driving me nuts 🙁

    • Sum … I can’t remember the iPython shortcuts off the top of my head — and I’m not currently in front of the machine where I do my work — but your usual system shortcuts should also work. I’ll check and reply again here.

      • Thanks for the reply! I’m on Linux, and Ctrl+E usually gets me to the end of a line… but it doesn’t seem to work for me. I’ll dig deeper and post back if I figure it out. Thank you!

      • Oh dear.. It was as simple as hitting “home” and “end” on the keyboard. I’m going to blame this on my coming from an OrgMode background 🙂

  2. Not all of these shortcuts work as listed. For the Delete Cell and Kernel Interrupt shortcuts, you have to hit the key twice. i.e. Ctrl-m ii

    Not sure why, I found this on another web page after scratching my head as to why these two didn’t work. The Ipython Notebook documentation is wrong too, I’m trying to figure out who to ask to update.


  3. When I hit ctrl + m, it deselects the cell. It is a very strange problem. it was working a few weeks back and then randomly this started happening. has anyone heard of this problem?

  4. Python Basics - Programmiersprache für künstliche Intelligenz

Leave a Reply