25

What is the difference between the "Return" and "Enter" keys in the VT100 terminal:

VT100 keyboard

1 Answer 1

32

Under normal circumstances, there is no difference (RETURN and ENTER will send CR or CR LF as configured by the New Line Mode). However, there is a mode called "keypad application mode" where all the keys on the numeric keypad send their own distinct control sequences which are different from the rest of the keyboard.

From the VT-100 User Guide:

Auxiliary Keypad – The keys on the auxiliary keypad normally transmit the codes for the numerals, decimal point, minus sign, and comma. In addition, the key labeled ENTER transmits the same code as the RETURN key. The host cannot tell if these keys were typed on the auxiliary keypad as opposed to the corresponding keys on the main keyboard. Therefore, software which requires considerable numeric data entry need not be rewritten to use the keypad.

However, if software must be able to distinguish between pressing a key on the auxiliary keypad and pressing the corresponding key on the main keyboard, the host can give the terminal a command to place it in keypad application mode. In keypad application mode all keys on the auxiliary keypad are defined to give control sequences which may be used by the host as user-defined functions.

3
  • "RETURN and ENTER will send CR or CR LF as configured by the New Line Mode" What is the "New Line Mode" exactly? Commented May 24, 2017 at 0:38
  • 3
    @user7681202: New Line Mode is also explained in the VT-100 User Guide which I linked to. Commented May 24, 2017 at 0:44
  • For completeness: there are two escape codes ^M for Return and ^[OM for Enter (KP). Wether the latter one gets emitted depends on several factors. On a HW VT-100 I assume the behavior in the manual is accurate. On a XTerm VT-100 in KAM mode, if NumLock is on, then ^M is generated and if NumLock is off, then ^[OM is generated.
    – Dorian B.
    Commented Nov 3, 2022 at 20:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .