These special characters are active only in canonical input mode. See Canonical or Not.
The EOF character is recognized only in canonical input mode. It acts as a line terminator in the same way as a newline character, but if the EOF character is typed at the beginning of a line it causes
readto return a byte count of zero, indicating end-of-file. The EOF character itself is discarded.
Usually, the EOF character is C-d.
The EOL character is recognized only in canonical input mode. It acts as a line terminator, just like a newline character. The EOL character is not discarded; it is read as the last character in the input line.
You don't need to use the EOL character to make <RET> end a line. Just set the ICRNL flag. In fact, this is the default state of affairs.
The EOL2 character works just like the EOL character (see above), but it can be a different character. Thus, you can specify two characters to terminate an input line, by setting EOL to one of them and EOL2 to the other.
The EOL2 character is a BSD extension; it exists only on BSD systems and GNU/Linux and GNU/Hurd systems.
The ERASE character is recognized only in canonical input mode. When the user types the erase character, the previous character typed is discarded. (If the terminal generates multibyte character sequences, this may cause more than one byte of input to be discarded.) This cannot be used to erase past the beginning of the current line of text. The ERASE character itself is discarded.
Usually, the ERASE character is <DEL>.
The WERASE character is recognized only in canonical mode. It erases an entire word of prior input, and any whitespace after it; whitespace characters before the word are not erased.
The definition of a “word” depends on the setting of the
ALTWERASEmode; see Local Modes.
ALTWERASEmode is not set, a word is defined as a sequence of any characters except space or tab.
ALTWERASEmode is set, a word is defined as a sequence of characters containing only letters, numbers, and underscores, optionally followed by one character that is not a letter, number, or underscore.
The WERASE character is usually C-w.
This is a BSD extension.
The KILL character is recognized only in canonical input mode. When the user types the kill character, the entire contents of the current line of input are discarded. The kill character itself is discarded too.
The KILL character is usually C-u.
The REPRINT character is recognized only in canonical mode. It reprints the current input line. If some asynchronous output has come while you are typing, this lets you see the line you are typing clearly again.
The REPRINT character is usually C-r.
This is a BSD extension.