11
$\begingroup$

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.

$\endgroup$

2 Answers 2

11
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Hopefully those bugs will get fixed for Mathematica 9. $\endgroup$
    – nixeagle
    Mar 24, 2012 at 17:00
4
$\begingroup$

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.

$\endgroup$
6
  • 2
    $\begingroup$ 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. $\endgroup$
    – celtschk
    Jan 19, 2012 at 15:12
  • $\begingroup$ @celtschk Good suggestion $\endgroup$
    – magma
    Jan 19, 2012 at 15:18
  • $\begingroup$ How do I "select a cell bracket"? $\endgroup$
    – Phira
    Jan 19, 2012 at 15:18
  • 3
    $\begingroup$ @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. $\endgroup$
    – celtschk
    Jan 19, 2012 at 15:21
  • 2
    $\begingroup$ @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). $\endgroup$ Jan 19, 2012 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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