What is the difference between the "Return" and "Enter" keys in the VT100 terminal:
1 Answer
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 theRETURN
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.
-
"RETURN and ENTER will send CR or CR LF as configured by the New Line Mode" What is the "New Line Mode" exactly? May 24, 2017 at 0:38
-
3@user7681202: New Line Mode is also explained in the VT-100 User Guide which I linked to. 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. Nov 3, 2022 at 20:31