Strovent SystemsSign in
Reference

Enter vs Return on 3270, 5250 and VT keyboards, and the New Line key

On a 3270 or 5250 terminal, Enter sends the screen and New Line only moves the cursor. On a VT terminal, Return sends a carriage return. Which PC key does what.

A PC keyboard has one big Return key (labelled Enter on many keyboards) and often a second Enter on the number pad. IBM and DEC terminals gave these keys different jobs, which is why the "wrong" thing can happen when you press Return in an emulator.

3270: Enter sends, New Line moves

On a 3270 keyboard, Enter is an attention (AID) key. It sends the fields you changed and the cursor position to the host, and the keyboard locks until the host answers. See AID keys (Enter, PF, PA, Clear).

The 3270 keyboard also has a New Line key (↲). It sends nothing. It moves the cursor to the first field you can type in on a following line, wrapping from the bottom of the screen to the top.

Emulators put these two on PC keys in different ways. In x3270, c3270, wc3270 and wx3270 the default for Enter is Return, and wx3270 also maps Right Ctrl to Enter. New Line is Shift+Return in x3270 and wx3270, and Ctrl+J in c3270 and wc3270. IBM Host On-Demand's default map also has New Line on Shift+Enter. So if Return moves you to the next line instead of sending the screen, the key has been mapped to New Line; look in your emulator's keyboard mapping to see which key sends Enter.

5250: Enter and Field Exit

A 5250 keyboard also has an Enter key that sends the screen, and a separate Field Exit key, which ends the field you are in and moves to the next one. Emulators map them differently. IBM Host On-Demand's defaults, for example, are Enter on the Enter key and Field Exit on Ctrl+Enter; other emulators can be set to put Field Exit on the big key and Enter elsewhere. If Return only moves you to the next field, check which function your emulator gives it. See Field Exit, Field+ and Field-.

VT: Return sends a character

A VT terminal has no fields and no AID keys. Return sends a carriage return (CR, octal 015) to the host, and the host decides what it means. The VT100 has a New Line setting that makes Return send CR and line feed (CR LF) instead.

The Enter key on the VT keypad sends the same code as Return, unless the host switches the keypad to application mode; then Enter sends its own control sequence, which some programs use as a separate key. See VT220 keypad on OpenVMS: PF1 (GOLD) to PF4 and application keypad from a PC or tablet and Shift+Enter or Ctrl+Enter acts like Enter in a terminal: why, and how to fix it.

Sources

Spotted a mistake? Email [email protected].