The arrow keys can not always be made to work correctly over dial-up. In order to make them work, for starters, the correct terminal emulation must be used, the communications program being used must be translating correctly, and there cannot be other programs (such as Windows or possibly the communications program itself) "capturing" the arrow keys and not sending them to the Athena side. There are ways of fixing the first two, however, if this is the problem.
In general, if you are using vt100 terminal emulation (on Athena, and in your communications software, where appropriate), you can add the following lines to your .emacs file (create one if you don't already have one):
Another common possibility is replacing the "[" with "O" in line 4 of this code.
If after loading the new .emacs file, nothing happens when using the arrow keys (or if nothing happened before), then you are probably running inside a program that is capturing the arrow keys, and there isn't any "standard" way of avoiding this. (Usually, there is NO way.) However, if you get errors trying to use the arrow keys, first make sure the terminal emulation is set properly. If that doesn't help, you should make sure these are the escape sequences that your arrow keys are really sending.
To do this, type the following sequence of keys (The spaces are here just to make the sequence clearer; it's easier if you don't type them, but you can - the output below will just have extra SPC's in it.)
# up-arrow down-arrow right-arrow left-arrow # C-h l
(In other words, a '#' key, each of the arrows in turn, the '#' key again, and control-h l). This will display a history of the last 100 keystrokes you have pressed, and if the arrow keys translate to anything, this will show them. For example, you might see something like this:
The # signs help you determine where your arrow key translations are. In this example, which shows the "correct" translations for vt100 emulation, the up arrow translates as "ESC-[ A", the down arrow as "ESC-[ B", and so on. Once you know these translations, you can adjust the code given above appropriately. If you aren't sure how to do this, ask a consultant in OLC.
In the worst case, when the arrow keys cannot be used at all, you can still move the cursor around with the following commands:
- Cursor up: C-p
- Cursor down: C-n
- Cursor right: C-f
- Cursor left: C-b
last updated: 6/25/95
Alternative article title: Trouble using the Arrow keys when using Dialup.txt