The NEXTSTEP/OpenStep FAQ

! to the table of contents
< to the previous section:
> to the next section:


4.6 How do I get the arrow keys to work in csh?

csh, arrow keys

This is for people who use a terminal app that does vt100 keyboard emulation - pasc

First, add these lines to your .cshrc (preferably between the if and endif):

set editmode=emacs set macrofiles=.macros

Then create a file called .bindings and put in it:

bind-to-key ExecuteNamedMacro '\e['

And, next, you need to make a file called ".macros". Using an editor like emacs (which can insert control characters using a &Qcirc; prefix), into this file put:

A^@^@^@^A^P B^@^@^@^A^N C^@^@^@^A^F D^@^@^@^A^B

where &@circ; means Control-@ and  means Control-A, etc. Also, don't put in the leading spaces. This will set up the left and right arrows to move back and forth on the line, and the up and down arrows will cycle through your history.

On Intel machines these sequences are a little different:

A^A^@^@^@^P B^A^@^@^@^N C^A^@^@^@^F D^A^@^@^@^B

Then source .cshrc and the changes should take effect.



This document was converted from LaTeX using Karl Ewald's latex2html.