Home

linemode

Linemode is a term used in computing to describe an input processing mode in which user input is collected and made available to a program only after a line delimiter, typically a newline, has been entered. In this mode, the terminal driver or input subsystem handles line editing, echo, and related controls before delivering the data to the application. Linemode contrasts with character mode or raw mode, where input is delivered to the program one character at a time as it is typed.

In Unix-like systems, linemode is associated with canonical or line mode input. When a terminal is in

Linemode also appears in network and terminal protocols. Some interactive protocols offer a mode where input

Limitations of linemode include reduced interactivity for programs that rely on real-time, per-character input, such as

canonical
mode,
the
kernel
buffers
input
until
a
newline
or
end-of-file
is
received,
applying
line
editing
features
such
as
backspace
handling
and
line-kill
operations.
Echoing
of
typed
characters
can
be
controlled
separately.
This
line-oriented
behavior
is
typical
for
command-line
interfaces
and
shells,
which
read
full
lines
of
input
before
processing
commands.
can
be
processed
per
character,
and
others
where
input
is
transmitted
line
by
line.
In
certain
contexts,
linemode
may
involve
negotiation
between
client
and
server
to
determine
how
keystrokes
are
transmitted
and
interpreted,
potentially
affecting
local
editing
features
and
the
handling
of
special
characters
or
signals.
text
editors
or
games.
Such
applications
often
switch
to
character
or
raw
mode
to
capture
input
immediately.
Modern
systems
typically
provide
mechanisms
to
switch
between
modes,
enabling
both
line-oriented
and
character-oriented
interaction
as
needed.