Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I move through a notebook using only the keyboard?

If one tries to use the arrow keys, the cursor tends to get "trapped" in comments and error messages.

share|improve this question
up vote 10 down vote accepted

There are some known bugs where the caret can get, as you say, "trapped" when using the up/down arrow keys. I.e., further presses of the up/down key at certain points in typesetting cells can just do nothing. However, it has always been my experience that left/right arrow will continue to work, and that usually one or two presses will get you to a point that the up/down arrow keys begin working again.

Also, important to note, that you can traverse the notebook more quickly with the arrow keys by popping the selection out to the cell bracket. You can, of course, select the cell bracket using the mouse, but you can also select it from the keyboard by repeatedly pressing Ctrl+period (or Cmd+period on Mac) to move the structured selection outwards until it hits the cell bracket. At that point, using the up/down arrow keys will never get trapped, and it will also be very efficient if you're looking to skip through content cell by cell.

share|improve this answer
Hopefully those bugs will get fixed for Mathematica 9. – nixeagle Mar 24 '12 at 17:00

I do not see exactly what you mean by "get trapped by comments". Anyway, you can move fairly well in a notebook and inside a cell with a keyboard. 1-select a cell bracket 2- use the op-down arrow keys to move and select other cells. 3- once you are on the desired cell bracket, press the left arrow key to enter the cell. Then use the arrow keys to move to the desired point in the cell text.

You do not really need to execute point 1. If you are anywhere in a cell, just press the up-down keys until you get out of the cell and move betweeen cells or into other cells above or below.

You may also move faster inside a cell using the Ctrl (or Cmd)-left-right arrow key.

share|improve this answer
Note that to get into the cell, you can use both the left-arrow and right-arrow key. When pressing the left-arrow key, you'll get to the end of the text in the cell, for the right-arrow key you'll get to the beginning of the text in the cell. – celtschk Jan 19 '12 at 15:12
@celtschk Good suggestion – magma Jan 19 '12 at 15:18
How do I "select a cell bracket"? – Phira Jan 19 '12 at 15:18
@Phira: If you are in between cells (the cursor is a horizontal line), you can select the cell above by pressing Shift+Up, or the cell below by pressing Shift+Down. Alternatively you can do it with the mouse by left-clicking on the corresponding cell bracket on the right. – celtschk Jan 19 '12 at 15:21
@Phira: If you only want to use the keybord, then the only way you can select the actual cell is to use CTRL+. multiple times, as it selects the actual subexpression, and then each hit selects the enclosing expression, until the whole cell is selected (i.e. the cell bracket on the right is highlighted). – István Zachar Jan 19 '12 at 15:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.