This file documents the 'Screen' virtual terminal manager.

   Copyright (c) 1993-2023 Free Software Foundation, Inc.

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the Foundation.

10.4 Login
==========

 -- Command: deflogin state
     (none)
     Same as the 'login' command except that the default setting for new
     windows is changed.  This defaults to 'on' unless otherwise
     specified at compile time (see Installation).  Both commands
     are only present when 'screen' has been compiled with utmp support.

 -- Command: login [state]
     ('C-a L')
     Adds or removes the entry in '/run/utmp' for the current window.
     This controls whether or not the window is "logged in".  In
     addition to this toggle, it is convenient to have "log in" and "log
     out" keys.  For instance, 'bind I login on' and 'bind O login off'
     will map these keys to be 'C-a I' and 'C-a O' (see Key Binding).

10.5 Mode
=========

 -- Command: defmode mode
     (none)
     The mode of each newly allocated pseudo-tty is set to MODE.  MODE
     is an octal number as used by chmod(1).  Defaults to 0622 for
     windows which are logged in, 0600 for others (e.g.  when '-ln' was
     specified for creation, see Screen Command).

10.6 Monitoring
===============

 -- Command: activity message
     (none)
     When any activity occurs in a background window that is being
     monitored, 'screen' displays a notification in the message line.
     The notification message can be redefined by means of the
     'activity' command.  Each occurrence of '%' in MESSAGE is replaced
     by the number of the window in which activity has occurred, and
     each occurrence of '^G' is replaced by the definition for bell in
     your termcap (usually an audible bell).  The default message is

          'Activity in window %n'

     Note that monitoring is off for all windows by default, but can be
     altered by use of the 'monitor' command ('C-a M').

 -- Command: defmonitor state
     (none)
     Same as the 'monitor' command except that the default setting for
     new windows is changed.  Initial setting is 'off'.

 -- Command: monitor [state]
     ('C-a M')
     Toggles monitoring of the current window.  When monitoring is
     turned on and the affected window is switched into the background,
     the activity notification message will be displayed in the status
     line at the first sign of output, and the window will also be
     marked with an '@' in the window-status display (see Windows).
     Monitoring defaults to 'off' for all windows.

 -- Command: silence [STATE|SEC]
     ('C-a _')
     Toggles silence monitoring of windows.  When silence is turned on
     and an affected window is switched into the background, you will
     receive the silence notification message in the status line after a
     specified period of inactivity (silence).  The default timeout can
     be changed with the 'silencewait' command or by specifying a number
     of seconds instead of 'on' or 'off'.  Silence is initially off for
     all windows.

 -- Command: defsilence state
     (none)
     Same as the 'silence' command except that the default setting for
     new windows is changed.  Initial setting is 'off'.

 -- Command: silencewait SECONDS
     (none)
     Define the time that all windows monitored for silence should wait
     before displaying a message.  Default is 30 seconds.

10.7 Windows
============

 -- Command: windows [ string ]
     ('C-a w', 'C-a C-w')
     Uses the message line to display a list of all the windows.  Each
     window is listed by number with the name of the program running in
     the window (or its title).

     The current window is marked with a '*'; the previous window is
     marked with a '-'; all the windows that are logged in are marked
     with a '$' (see Login); a background window that has received a
     bell is marked with a '!'; a background window that is being
     monitored and has had activity occur is marked with an '@' (see
     Monitor); a window which has output logging turned on is marked
     with '(L)'; windows occupied by other users are marked with '&' or
     '&&' if the window is shared by other users; windows in the zombie
     state are marked with 'Z'.

     If this list is too long to fit on the terminal's status line only
     the portion around the current window is displayed.

     You can customize the output format to any string you like
     including string escapes (see String Escapes).  In this case,
     if the string parameter is passed, the maximum output size is
     unlimited (instead of 1024 bytes if no parameter is passed).

10.8 Hardstatus
===============

'Screen' maintains a hardstatus line for every window.  If a window gets
selected, the display's hardstatus will be updated to match the window's
hardstatus line.  The hardstatus line can be changed with the ANSI
Application Program Command (APC): 'ESC_<string>ESC\'.  As a convenience
for xterm users the sequence 'ESC]0..2;<string>^G' is also accepted.

 -- Command: defhstatus [status]
     (none)
     The hardstatus line that all new windows will get is set to STATUS.
     This command is useful to make the hardstatus of every window
     display the window number or title or the like.  STATUS may contain
     the same directives as in the window messages, but the directive
     escape character is '^E' (octal 005) instead of '%'.  This was done
     to make a misinterpretation of program generated hardstatus lines
     impossible.  If the parameter STATUS is omitted, the current
     default string is displayed.  Per default the hardstatus line of
     new windows is empty.

 -- Command: hstatus status
     (none)
     Changes the current window's hardstatus line to STATUS.

10.9 Mousetrack
===============

 -- Command: mousetrack [ on|off ]
     (none)
     This command determines whether 'screen' will watch for mouse
     clicks.  When this command is enabled, regions that have been split
     in various ways can be selected by pointing to them with a mouse
     and left-clicking them.  Without specifying ON or OFF, the current
     state is displayed.  The default state is determined by the
     'defmousetrack' command.

 -- Command: defmousetrack on|off
     (none)
     This command determines the default state of the 'mousetrack'
     command, currently defaulting of OFF.

11 Virtual Terminal
*******************

Each window in a 'screen' session emulates a VT100 terminal, with some
extra functions added.  The VT100 emulator is hard-coded, no other
terminal types can be emulated.  The commands described here modify the
terminal emulation.

11.1 Control Sequences
======================

The following is a list of control sequences recognized by 'screen'.
'(V)' and '(A)' indicate VT100-specific and ANSI- or ISO-specific
functions, respectively.

     ESC E                           Next Line
     ESC D                           Index
     ESC M                           Reverse Index
     ESC H                           Horizontal Tab Set
     ESC Z                           Send VT100 Identification String
     ESC 7                   (V)     Save Cursor and Attributes
     ESC 8                   (V)     Restore Cursor and Attributes
     ESC [s                  (A)     Save Cursor and Attributes
     ESC [u                  (A)     Restore Cursor and Attributes
     ESC c                           Reset to Initial State
     ESC g                           Visual Bell
     ESC Pn p                        Cursor Visibility (97801)
         Pn = 6                      Invisible
              7                      Visible
     ESC =                   (V)     Application Keypad Mode
     ESC >                   (V)     Numeric Keypad Mode
     ESC # 8                 (V)     Fill Screen with E's
     ESC \                   (A)     String Terminator
     ESC ^                   (A)     Privacy Message String (Message Line)
     ESC !                           Global Message String (Message Line)
     ESC k                           Title Definition String
     ESC P                   (A)     Device Control String
                                     Outputs a string directly to the host
                                     terminal without interpretation.
     ESC _                   (A)     Application Program Command (Hardstatus)
     ESC ] 0 ; string ^G     (A)     Operating System Command (Hardstatus, xterm
                                     title hack)
     ESC ] 83 ; cmd ^G       (A)     Execute screen command. This only works if
                                     multi-user support is compiled into screen.
                                     The pseudo-user ":window:" is used to check
                                     the access control list. Use "addacl :window:
                                     -rwx #?" to create a user with no rights and
                                     allow only the needed commands.
     Control-N               (A)     Lock Shift G1 (SO)
     Control-O               (A)     Lock Shift G0 (SI)
     ESC n                   (A)     Lock Shift G2
     ESC o                   (A)     Lock Shift G3
     ESC N                   (A)     Single Shift G2
     ESC O                   (A)     Single Shift G3
     ESC ( Pcs               (A)     Designate character set as G0
     ESC ) Pcs               (A)     Designate character set as G1
     ESC * Pcs               (A)     Designate character set as G2
     ESC + Pcs               (A)     Designate character set as G3
     ESC [ Pn ; Pn H                 Direct Cursor Addressing
     ESC [ Pn ; Pn f                 same as above
     ESC [ Pn J                      Erase in Display
           Pn = None or 0            From Cursor to End of Screen
                1                    From Beginning of Screen to Cursor
                2                    Entire Screen
     ESC [ Pn K                      Erase in Line
           Pn = None or 0            From Cursor to End of Line
                1                    From Beginning of Line to Cursor
                2                    Entire Line
     ESC [ Pn X                      Erase character
     ESC [ Pn A                      Cursor Up
     ESC [ Pn B                      Cursor Down
     ESC [ Pn C                      Cursor Right
     ESC [ Pn D                      Cursor Left
     ESC [ Pn E                      Cursor next line
     ESC [ Pn F                      Cursor previous line
     ESC [ Pn G                      Cursor horizontal position
     ESC [ Pn `                      same as above
     ESC [ Pn d                      Cursor vertical position
     ESC [ Ps ;...; Ps m             Select Graphic Rendition
           Ps = None or 0            Default Rendition
                1                    Bold
                2            (A)     Faint
                3            (A)     Standout Mode (ANSI: Italicized)
                4                    Underlined
                5                    Blinking
                7                    Negative Image
                22           (A)     Normal Intensity
                23           (A)     Standout Mode off (ANSI: Italicized off)
                24           (A)     Not Underlined
                25           (A)     Not Blinking
                27           (A)     Positive Image
                30           (A)     Foreground Black
                31           (A)     Foreground Red
                32           (A)     Foreground Green
                33           (A)     Foreground Yellow
                34           (A)     Foreground Blue
                35           (A)     Foreground Magenta
                36           (A)     Foreground Cyan
                37           (A)     Foreground White
                39           (A)     Foreground Default
                40           (A)     Background Black
                ...                  ...
                49           (A)     Background Default
     ESC [ Pn g                      Tab Clear
           Pn = None or 0            Clear Tab at Current Position
                3                    Clear All Tabs
     ESC [ Pn ; Pn r         (V)     Set Scrolling Region
     ESC [ Pn I              (A)     Horizontal Tab
     ESC [ Pn Z              (A)     Backward Tab
     ESC [ Pn L              (A)     Insert Line
     ESC [ Pn M              (A)     Delete Line
     ESC [ Pn @              (A)     Insert Character
     ESC [ Pn P              (A)     Delete Character
     ESC [ Pn S                      Scroll Scrolling Region Up
     ESC [ Pn T                      Scroll Scrolling Region Down
     ESC [ Pn ^                      same as above
     ESC [ Ps ;...; Ps h             Set Mode
     ESC [ Ps ;...; Ps l             Reset Mode
           Ps = 4            (A)     Insert Mode
                20           (A)     'Automatic Linefeed' Mode.
                34                   Normal Cursor Visibility
                ?1           (V)     Application Cursor Keys
                ?3           (V)     Change Terminal Width to 132 columns
                ?5           (V)     Reverse Video
                ?6           (V)     'Origin' Mode
                ?7           (V)     'Wrap' Mode
                ?9                   X10 mouse tracking
                ?25          (V)     Visible Cursor
                ?47                  Alternate Screen (old xterm code)
                ?1000        (V)     VT200 mouse tracking
                ?1047                Alternate Screen (new xterm code)
                ?1049                Alternate Screen (new xterm code)
     ESC [ 5 i               (A)     Start relay to printer (ANSI Media Copy)
     ESC [ 4 i               (A)     Stop relay to printer (ANSI Media Copy)
     ESC [ 8 ; Ph ; Pw t             Resize the window to 'Ph' lines and
                                     'Pw' columns (SunView special)
     ESC [ c                         Send VT100 Identification String
     ESC [ x                 (V)     Send Terminal Parameter Report
     ESC [ > c                       Send Secondary Device Attributes String
     ESC [ 6 n                       Send Cursor Position Report

11.2 Input Translation
======================

In order to do a full VT100 emulation 'screen' has to detect that a
sequence of characters in the input stream was generated by a keypress
on the user's keyboard and insert the VT100 style escape sequence.
'Screen' has a very flexible way of doing this by making it possible to
map arbitrary commands on arbitrary sequences of characters.  For
standard VT100 emulation the command will always insert a string in the
input buffer of the window (see also command 'stuff', see Paste).
Because the sequences generated by a keypress can change after a
reattach from a different terminal type, it is possible to bind commands
to the termcap name of the keys.  'Screen' will insert the correct
binding after each reattach.  See Bindkey for further details on
the syntax and examples.

   Here is the table of the default key bindings.  (A) means that the
command is executed if the keyboard is switched into application mode.

     Key name        Termcap name    Command
     -----------------------------------------------------
     Cursor up            ku         stuff \033[A
                                     stuff \033OA      (A)
     Cursor down          kd         stuff \033[B
                                     stuff \033OB      (A)
     Cursor right         kr         stuff \033[C
                                     stuff \033OC      (A)
     Cursor left          kl         stuff \033[D
                                     stuff \033OD      (A)
     Function key 0       k0         stuff \033[10~
     Function key 1       k1         stuff \033OP
     Function key 2       k2         stuff \033OQ
     Function key 3       k3         stuff \033OR
     Function key 4       k4         stuff \033OS
     Function key 5       k5         stuff \033[15~
     Function key 6       k6         stuff \033[17~
     Function key 7       k7         stuff \033[18~
     Function key 8       k8         stuff \033[19~
     Function key 9       k9         stuff \033[20~
     Function key 10      k;         stuff \033[21~
     Function key 11      F1         stuff \033[23~
     Function key 12      F2         stuff \033[24~
     Home                 kh         stuff \033[1~
     End                  kH         stuff \033[4~
     Insert               kI         stuff \033[2~
     Delete               kD         stuff \033[3~
     Page up              kP         stuff \033[5~
     Page down            kN         stuff \033[6~
     Keypad 0             f0         stuff 0
                                     stuff \033Op      (A)
     Keypad 1             f1         stuff 1
                                     stuff \033Oq      (A)
     Keypad 2             f2         stuff 2
                                     stuff \033Or      (A)
     Keypad 3             f3         stuff 3
                                     stuff \033Os      (A)
     Keypad 4             f4         stuff 4
                                     stuff \033Ot      (A)
     Keypad 5             f5         stuff 5
                                     stuff \033Ou      (A)
     Keypad 6             f6         stuff 6
                                     stuff \033Ov      (A)
     Keypad 7             f7         stuff 7
                                     stuff \033Ow      (A)
     Keypad 8             f8         stuff 8
                                     stuff \033Ox      (A)
     Keypad 9             f9         stuff 9
                                     stuff \033Oy      (A)
     Keypad +             f+         stuff +
                                     stuff \033Ok      (A)
     Keypad -             f-         stuff -
                                     stuff \033Om      (A)
     Keypad *             f*         stuff *
                                     stuff \033Oj      (A)
     Keypad /             f/         stuff /
                                     stuff \033Oo      (A)
     Keypad =             fq         stuff =
                                     stuff \033OX      (A)
     Keypad .             f.         stuff .
                                     stuff \033On      (A)
     Keypad ,             f,         stuff ,
                                     stuff \033Ol      (A)
     Keypad enter         fe         stuff \015
                                     stuff \033OM      (A)

11.3 Digraph
============

 -- Command: digraph [preset [unicode-value]]
     ('C-a C-v')
     This command prompts the user for a digraph sequence.  The next two
     characters typed are looked up in a builtin table and the resulting
     character is inserted in the input stream.  For example, if the
     user enters 'a"', an a-umlaut will be inserted.  If the first
     character entered is a 0 (zero), 'screen' will treat the following
     characters (up to three) as an octal number instead.  The optional
     argument PRESET is treated as user input, thus one can create an
     "umlaut" key.  For example the command 'bindkey ^K digraph '"''
     enables the user to generate an a-umlaut by typing 'CTRL-K a'.
     When a non-zero UNICODE-VALUE is specified, a new digraph is
     created with the specified preset.  The digraph is unset if a zero
     value is provided for the UNICODE-VALUE.

     The following table is the builtin sequences.

               Sequence   Octal   Digraph   Unicode Equivalent
               -----------------------------------------------
               ' ', ' '    160    (space)         U+00A0
               'N', 'S'    160    (space)         U+00A0
               '~', '!'    161       ¡            U+00A1
               '!', '!'    161       ¡            U+00A1
               '!', 'I'    161       ¡            U+00A1
               'c', '|'    162       ¢            U+00A2
               'c', 't'    162       ¢            U+00A2
               '$', '$'    163       £            U+00A3
               'P', 'd'    163       £            U+00A3
               'o', 'x'    164       ¤            U+00A4
               'C', 'u'    164       ¤            U+00A4
               'C', 'u'    164       ¤            U+00A4
               'E', 'u'    164       ¤            U+00A4
               'Y', '-'    165       ¥            U+00A5
               'Y', 'e'    165       ¥            U+00A5
               '|', '|'    166       ¦            U+00A6
               'B', 'B'    166       ¦            U+00A6
               'p', 'a'    167       §            U+00A7
               'S', 'E'    167       §            U+00A7
               '"', '"'    168       ¨            U+00A8
               ''', ':'    168       ¨            U+00A8
               'c', 'O'    169       ©            U+00A9
               'C', 'o'    169       ©            U+00A9
               'a', '-'    170       ª            U+00AA
               '<', '<'    171       «            U+00AB
               '-', ','    172       ¬            U+00AC
               'N', 'O'    172       ¬            U+00AC
               '-', '-'    173       ­            U+00AD
               'r', 'O'    174       ®            U+00AE
               'R', 'g'    174       ®            U+00AE
               '-', '='    175       ¯            U+00AF
               ''', 'm'    175       ¯            U+00AF
               '~', 'o'    176       °            U+00B0
               'D', 'G'    176       °            U+00B0
               '+', '-'    177       ±            U+00B1
               '2', '2'    178       ²            U+00B2
               '2', 'S'    178       ²            U+00B2
               '3', '3'    179       ³            U+00B3
               '3', 'S'    179       ³            U+00B3
               ''', '''    180       ´            U+00B4
               'j', 'u'    181       µ            U+00B5
               'M', 'y'    181       µ            U+00B5
               'p', 'p'    182       ¶            U+00B6
               'P', 'I'    182       ¶            U+00B6
               '~', '.'    183       ·            U+00B7
               '.', 'M'    183       ·            U+00B7
               ',', ','    184       ¸            U+00B8
               ''', ','    184       ¸            U+00B8
               '1', '1'    185       ¹            U+00B9
               '1', 'S'    185       ¹            U+00B9
               'o', '-'    186       º            U+00BA
               '>', '>'    187       »            U+00BB
               '1', '4'    188       ¼            U+00BC
               '1', '2'    189       ½            U+00BD
               '3', '4'    190       ¾            U+00BE
               '~', '?'    191       ¿            U+00BF
               '?', '?'    191       ¿            U+00BF
               '?', 'I'    191       ¿            U+00BF
               'A', '`'    192       À            U+00C0
               'A', '!'    192       À            U+00C0
               'A', '''    193       Á            U+00C1
               'A', '^'    194       Â            U+00C2
               'A', '>'    194       Â            U+00C2
               'A', '~'    195       Ã            U+00C3
               'A', '?'    195       Ã            U+00C3
               'A', '"'    196       Ä            U+00C4
               'A', ':'    196       Ä            U+00C4
               'A', '@'    197       Å            U+00C5
               'A', 'A'    197       Å            U+00C5
               'A', 'E'    198       Æ            U+00C6
               'C', ','    199       Ç            U+00C7
               'E', '`'    200       È            U+00C8
               'E', '!'    200       È            U+00C8
               'E', '''    201       É            U+00C9
               'E', '^'    202       Ê            U+00CA
               'E', '>'    202       Ê            U+00CA
               'E', '"'    203       Ë            U+00CB
               'E', ':'    203       Ë            U+00CB
               'I', '`'    204       Ì            U+00CC
               'I', '!'    204       Ì            U+00CC
               'I', '''    205       Í            U+00CD
               'I', '^'    206       Î            U+00CE
               'I', '>'    206       Î            U+00CE
               'I', '"'    207       Ï            U+00CF
               'I', ':'    207       Ï            U+00CF
               'D', '-'    208       Ð            U+00D0
               'N', '~'    209       Ñ            U+00D1
               'N', '?'    209       Ñ            U+00D1
               'O', '`'    210       Ò            U+00D2
               'O', '!'    210       Ò            U+00D2
               'O', '''    211       Ó            U+00D3
               'O', '^'    212       Ô            U+00D4
               'O', '>'    212       Ô            U+00D4
               'O', '~'    213       Õ            U+00D5
               'O', '?'    213       Õ            U+00D5
               'O', '"'    214       Ö            U+00D6
               'O', ':'    214       Ö            U+00D6
               '/', '\'    215       ×            U+00D7
               '*', 'x'    215       ×            U+00D7
               'O', '/'    216       Ø            U+00D8
               'U', '`'    217       Ù            U+00D9
               'U', '!'    217       Ù            U+00D9
               'U', '''    218       Ú            U+00DA
               'U', '^'    219       Û            U+00DB
               'U', '>'    219       Û            U+00DB
               'U', '"'    220       Ü            U+00DC
               'U', ':'    220       Ü            U+00DC
               'Y', '''    221       Ý            U+00DD
               'I', 'p'    222       Þ            U+00DE
               'T', 'H'    222       Þ            U+00DE
               's', 's'    223       ß            U+00DF
               's', '"'    223       ß            U+00DF
               'a', '`'    224       à            U+00E0
               'a', '!'    224       à            U+00E0
               'a', '''    225       á            U+00E1
               'a', '^'    226       â            U+00E2
               'a', '>'    226       â            U+00E2
               'a', '~'    227       ã            U+00E3
               'a', '?'    227       ã            U+00E3
               'a', '"'    228       ä            U+00E4
               'a', ':'    228       ä            U+00E4
               'a', 'a'    229       å            U+00E5
               'a', 'e'    230       æ            U+00E6
               'c', ','    231       ç            U+00E7
               'e', '`'    232       è            U+00E8
               'e', '!'    232       è            U+00E8
               'e', '''    233       é            U+00E9
               'e', '^'    234       ê            U+00EA
               'e', '>'    234       ê            U+00EA
               'e', '"'    235       ë            U+00EB
               'e', ':'    235       ë            U+00EB
               'i', '`'    236       ì            U+00EC
               'i', '!'    236       ì            U+00EC
               'i', '''    237       í            U+00ED
               'i', '^'    238       î            U+00EE
               'i', '>'    238       î            U+00EE
               'i', '"'    239       ï            U+00EF
               'i', ':'    239       ï            U+00EF
               'd', '-'    240       ð            U+00F0
               'n', '~'    241       ñ            U+00F1
               'n', '?'    241       ñ            U+00F1
               'o', '`'    242       ò            U+00F2
               'o', '!'    242       ò            U+00F2
               'o', '''    243       ó            U+00F3
               'o', '^'    244       ô            U+00F4
               'o', '>'    244       ô            U+00F4
               'o', '~'    245       õ            U+00F5
               'o', '?'    245       õ            U+00F5
               'o', '"'    246       ö            U+00F6
               'o', ':'    246       ö            U+00F6
               ':', '-'    247       ÷            U+00F7
               'o', '/'    248       ø            U+00F8
               'u', '`'    249       ù            U+00F9
               'u', '!'    249       ù            U+00F9
               'u', '''    250       ú            U+00FA
               'u', '^'    251       û            U+00FB
               'u', '>'    251       û            U+00FB
               'u', '"'    252       ü            U+00FC
               'u', ':'    252       ü            U+00FC
               'y', '''    253       ý            U+00FD
               'i', 'p'    254       þ            U+00FE
               't', 'h'    254       þ            U+00FE
               'y', '"'    255       ÿ            U+00FF
               'y', ':'    255       ÿ            U+00FF
               '"', '['    196       Ä            U+00C4
               '"', '\'    214       Ö            U+00D6
               '"', ']'    220       Ü            U+00DC
               '"', '{'    228       ä            U+00E4
               '"', '|'    246       ö            U+00F6
               '"', '}'    252       ü            U+00FC
               '"', '~'    223       ß            U+00DF

11.4 Bell
=========

 -- Command: bell_msg [message]
     (none)
     When a bell character is sent to a background window, 'screen'
     displays a notification in the message line.  The notification
     message can be re-defined by this command.  Each occurrence of '%'
     in MESSAGE is replaced by the number of the window to which a bell
     has been sent, and each occurrence of '^G' is replaced by the
     definition for bell in your termcap (usually an audible bell).  The
     default message is

          'Bell in window %n'

     An empty message can be supplied to the 'bell_msg' command to
     suppress output of a message line ('bell_msg ""').  Without a
     parameter, the current message is shown.

 -- Command: vbell [state]
     ('C-a C-g')
     Sets or toggles the visual bell setting for the current window.  If
     'vbell' is switched to 'on', but your terminal does not support a
     visual bell, the visual bell message is displayed in the status
     line when the bell character is received.  Visual bell support of a
     terminal is defined by the termcap variable 'vb'.  See Bell,
     for more information on visual bells.  The equivalent terminfo
     capability is 'flash'.

     Per default, 'vbell' is 'off', thus the audible bell is used.

 -- Command: vbell_msg [message]
     (none)
     Sets the visual bell message.  MESSAGE is printed to the status
     line if the window receives a bell character (^G), 'vbell' is set
     to 'on' and the terminal does not support a visual bell.  The
     default message is 'Wuff, Wuff!!'.  Without a parameter, the
     current message is shown.

 -- Command: vbellwait sec
     (none)
     Define a delay in seconds after each display of 'screen' 's visual
     bell message.  The default is 1 second.

11.5 Clear
==========

 -- Command: clear
     ('C-a C')
     Clears the screen and saves its contents to the scrollback buffer.

11.6 Info
=========

 -- Command: info
     ('C-a i', 'C-a C-i')
     Uses the message line to display some information about the current
     window: the cursor position in the form '(COLUMN,ROW)' starting
     with '(1,1)', the terminal width and height plus the size of the
     scrollback buffer in lines, like in '(80,24)+50', the current state
     of window XON/XOFF flow control is shown like this (see Flow Control):
            +flow     automatic flow control, currently on.
            -flow     automatic flow control, currently off.
            +(+)flow  flow control enabled. Agrees with automatic control.
            -(+)flow  flow control disabled. Disagrees with automatic control.
            +(-)flow  flow control enabled. Disagrees with automatic control.
            -(-)flow  flow control disabled. Agrees with automatic control.

     The current line wrap setting ('+wrap' indicates enabled, '-wrap'
     not) is also shown.  The flags 'ins', 'org', 'app', 'log', 'mon'
     and 'nored' are displayed when the window is in insert mode, origin
     mode, application-keypad mode, has output logging, activity
     monitoring or partial redraw enabled.

     The currently active character set ('G0', 'G1', 'G2', or 'G3'), and
     in square brackets the terminal character sets that are currently
     designated as 'G0' through 'G3'.  If the window is in UTF-8 mode,
     the string 'UTF-8' is shown instead.  Additional modes depending on
     the type of the window are displayed at the end of the status line
     (see Window Types).

     If the state machine of the terminal emulator is in a non-default
     state, the info line is started with a string identifying the
     current state.

     For system information use 'time'.

 -- Command: dinfo
     (none)
     Show what 'screen' thinks about your terminal.  Useful if you want
     to know why features like color or the alternate charset don't
     work.

11.7 Redisplay
==============

 -- Command: allpartial state
     (none)
     If set to on, only the current cursor line is refreshed on window
     change.  This affects all windows and is useful for slow terminal
     lines.  The previous setting of full/partial refresh for each
     window is restored with 'allpartial off'.  This is a global flag
     that immediately takes effect on all windows overriding the
     'partial' settings.  It does not change the default redraw behavior
     of newly created windows.

 -- Command: altscreen state
     (none)
     If set to on, "alternate screen" support is enabled in virtual
     terminals, just like in xterm.  Initial setting is 'off'.

 -- Command: partial state
     (none)
     Defines whether the display should be refreshed (as with
     'redisplay') after switching to the current window.  This command
     only affects the current window.  To immediately affect all windows
     use the 'allpartial' command.  Default is 'off', of course.  This
     default is fixed, as there is currently no 'defpartial' command.

 -- Command: redisplay
     ('C-a l', 'C-a C-l')
     Redisplay the current window.  Needed to get a full redisplay in
     partial redraw mode.

11.8 Wrap
=========

 -- Command: wrap [ on | off ]
     ('C-a r', 'C-a C-r')
     Sets the line-wrap setting for the current window.  When line-wrap
     is on, the second consecutive printable character output at the
     last column of a line will wrap to the start of the following line.
     As an added feature, backspace (^H) will also wrap through the left
     margin to the previous line.  Default is 'on'.  Without any
     options, the state of 'wrap' is toggled.

 -- Command: defwrap state
     (none)
     Same as the 'wrap' command except that the default setting for new
     windows is changed.  Initially line-wrap is on and can be toggled
     with the 'wrap' command ('C-a r') or by means of "C-a : wrap
     on|off".

11.9 Reset
==========

 -- Command: reset
     ('C-a Z')
     Reset the virtual terminal to its "power-on" values.  Useful when
     strange settings (like scroll regions or graphics character set)
     are left over from an application.

11.10 Window Size
=================

 -- Command: width [-w|-d] [cols [lines]]
     ('C-a W')
     Toggle the window width between 80 and 132 columns, or set it to
     COLS columns if an argument is specified.  This requires a capable
     terminal and the termcap entries 'Z0' and 'Z1'.  See the 'termcap'
     command (see Termcap), for more information.  You can also
     specify a height if you want to change both values.  The '-w'
     option tells screen to leave the display size unchanged and just
     set the window size, '-d' vice versa.

 -- Command: height [-w|-d] [lines [cols]]
     (none)
     Set the display height to a specified number of lines.  When no
     argument is given it toggles between 24 and 42 lines display.

11.11 Character Processing
==========================

 -- Command: c1 [state]
     (none)
     Change c1 code processing.  'c1 on' tells screen to treat the input
     characters between 128 and 159 as control functions.  Such an 8-bit
     code is normally the same as ESC followed by the corresponding
     7-bit code.  The default setting is to process c1 codes and can be
     changed with the 'defc1' command.  Users with fonts that have
     usable characters in the c1 positions may want to turn this off.

 -- Command: gr [state]
     (none)
     Turn GR charset switching on/off.  Whenever screen sees an input
     char with an 8th bit set, it will use the charset stored in the GR
     slot and print the character with the 8th bit stripped.  The
     default (see also 'defgr') is not to process GR switching because
     otherwise the ISO88591 charset would not work.

 -- Command: bce [state]
     (none)
     Change background-color-erase setting.  If 'bce' is set to on, all
     characters cleared by an erase/insert/scroll/clear operation will
     be displayed in the current background color.  Otherwise the
     default background color is used.

 -- Command: encoding enc [denc]
     (none)
     Tell screen how to interpret the input/output.  The first argument
     sets the encoding of the current window.  Each window can emulate a
     different encoding.  The optional second parameter overwrites the
     encoding of the connected terminal.  It should never be needed as
     screen uses the locale setting to detect the encoding.  There is
     also a way to select a terminal encoding depending on the terminal
     type by using the 'KJ' termcap entry.  See Special Capabilities.

     Supported encodings are 'eucJP', 'SJIS', 'eucKR', 'eucCN', 'Big5',
     'GBK', 'KOI8-R', 'CP1251', 'UTF-8', 'ISO8859-2', 'ISO8859-3',
     'ISO8859-4', 'ISO8859-5', 'ISO8859-6', 'ISO8859-7', 'ISO8859-8',
     'ISO8859-9', 'ISO8859-10', 'ISO8859-15', 'jis'.

     See also 'defencoding', which changes the default setting of a new
     window.

 -- Command: charset set
     (none)
     Change the current character set slot designation and charset
     mapping.  The first four character of SET are treated as charset
     designators while the fifth and sixth character must be in range
     '0' to '3' and set the GL/GR charset mapping.  On every position a
     '.' may be used to indicate that the corresponding charset/mapping
     should not be changed (SET is padded to six characters internally
     by appending '.' chars).  New windows have 'BBBB02' as default
     charset, unless a 'encoding' command is active.

     The current setting can be viewed with the Info command.

 -- Command: utf8 [state [dstate]]
     (none)
     Change the encoding used in the current window.  If utf8 is
     enabled, the strings sent to the window will be UTF-8 encoded and
     vice versa.  Omitting the parameter toggles the setting.  If a
     second parameter is given, the display's encoding is also changed
     (this should rather be done with screen's '-U' option).  See also
     'defutf8', which changes the default setting of a new window.

 -- Command: defc1 state
     (none)
     Same as the 'c1' command except that the default setting for new
     windows is changed.  Initial setting is 'on'.

 -- Command: defgr state
     (none)
     Same as the 'gr' command except that the default setting for new
     windows is changed.  Initial setting is 'off'.

 -- Command: defbce state
     (none)
     Same as the 'bce' command except that the default setting for new
     windows is changed.  Initial setting is 'off'.

 -- Command: defencoding enc
     (none)
     Same as the 'encoding' command except that the default setting for
     new windows is changed.  Initial setting is the encoding taken from
     the terminal.

 -- Command: defcharset [set]
     (none)
     Like the 'charset' command except that the default setting for new
     windows is changed.  Shows current default if called without
     argument.

 -- Command: defutf8 state
     (none)
     Same as the 'utf8' command except that the default setting for new
     windows is changed.  Initial setting is 'on' if screen was started
     with '-U', otherwise 'off'.

 -- Command: cjkwidth [state]
     (none)
     Toggle how ambiguous characters are treated.  If cjkwidth is on
     screen interprets them as double (full) width characters.  If off
     then they are seen as one cell (half) width characters.

12 Copy and Paste
*****************

For those confined to a hardware terminal, these commands provide a cut
and paste facility more powerful than those provided by most windowing
systems.

12.1 Copying
============

 -- Command: copy
     ('C-a [', 'C-a C-[', 'C-a <ESC>')
     Enter copy/scrollback mode.  This allows you to copy text from the
     current window and its history into the paste buffer.  In this mode
     a 'vi'-like full screen editor is active, with controls as outlined
     below.

12.1.1 CR/LF
------------

 -- Command: crlf [state]
     (none)
     This affects the copying of text regions with the 'copy' command.
     If it is set to 'on', lines will be separated by the two character
     sequence 'CR'/'LF'.  Otherwise only 'LF' is used.  'crlf' is off by
     default.  When no parameter is given, the state is toggled.

12.1.2 Scrollback
-----------------

To access and use the contents in the scrollback buffer, use the 'copy'
command.  See Copy.
 -- Command: defscrollback num
     (none)
     Same as the 'scrollback' command except that the default setting
     for new windows is changed.  Defaults to 100.

 -- Command: scrollback num
     (none)
     Set the size of the scrollback buffer for the current window to NUM
     lines.  The default scrollback is 100 lines.  Use 'info' to view
     the current setting.

 -- Command: compacthist [state]
     (none)
     This tells screen whether to suppress trailing blank lines when
     scrolling up text into the history buffer.  Turn compacting 'on' to
     hold more useful lines in your scrollback buffer.

12.1.3 Markkeys
---------------

 -- Command: markkeys string
     (none)
     This is a method of changing the keymap used for copy/history mode.
     The string is made up of OLDCHAR=NEWCHAR pairs which are separated
     by ':'.  Example: The command 'markkeys h=^B:l=^F:$=^E' would set
     some keys to be more familiar to 'emacs' users.  If your terminal
     sends characters, that cause you to abort copy mode, then this
     command may help by binding these characters to do nothing.  The
     no-op character is '@' and is used like this: 'markkeys @=L=H' if
     you do not want to use the 'H' or 'L' commands any longer.  As
     shown in this example, multiple keys can be assigned to one
     function in a single statement.

12.1.4 Movement Keys
--------------------

'h', 'C-h', or 'left arrow' move the cursor left.

'j', 'C-n', or 'down arrow' move the cursor down.

'k', 'C-p', or 'up arrow' move the cursor up.

'l' ('el'), or 'right arrow' move the cursor right.

'0' (zero) or 'C-a' move to the leftmost column.

'+' and '-' move the cursor to the leftmost column of the next or
previous line.

'H', 'M' and 'L' move the cursor to the leftmost column of the top,
center or bottom line of the window.

'|' moves to the specified absolute column.

'g' or 'home' moves to the beginning of the buffer.

'G' or 'end' moves to the specified absolute line (default: end of
buffer).

'%' jumps to the specified percentage of the buffer.

'^' or '$' move to the first or last non-whitespace character on the
line.

'w', 'b', and 'e' move the cursor word by word.

'B', 'E' move the cursor WORD by WORD (as in vi).

'f'/'F', 't'/'T' move the cursor forward/backward to the next occurrence
of the target.  (eg, '3fy' will move the cursor to the 3rd 'y' to the
right.)

';' and ',' Repeat the last f/F/t/T command in the same/opposite
direction.

'C-e' and 'C-y' scroll the display up/down by one line while preserving
the cursor position.

'C-u' and 'C-d' scroll the display up/down by the specified amount of
lines while preserving the cursor position.  (Default: half screenful).

'C-b' and 'C-f' move the cursor up/down a full screen.

   Note that Emacs-style movement keys can be specified by a .screenrc
command.  ('markkeys "h=^B:l=^F:$=^E"') There is no simple method for a
full emacs-style keymap, however, as this involves multi-character
codes.

12.1.5 Marking
--------------

The copy range is specified by setting two marks.  The text between
these marks will be highlighted.  Press:

'space' or 'enter' to set the first or second mark respectively.  If
'mousetrack' is set to 'on', marks can also be set using 'left mouse
click'.

'Y' and 'y' can be used to mark one whole line or to mark from start of
line.

'W' marks exactly one word.

12.1.6 Repeat Count
-------------------

Any command in copy mode can be prefixed with a number (by pressing
digits '0...9') which is taken as a repeat count.  Example:
     C-a C-[ H 10 j 5 Y
will copy lines 11 to 15 into the paste buffer.