% Screen - VT100/ANSI Terminal Emulator Cheat Sheet
%
% by Peteris Krumins (peter@catonmat.net)
% http://www.catonmat.net  -  good coders code, great reuse
%
% 2007.09.21
%

\documentclass{article}

\usepackage[left=1.5cm,top=1cm,right=1.5cm,bottom=1cm,nohead,nofoot]{geometry}

\usepackage[pdftex]{hyperref}
\hypersetup{pdftitle={Screen VT100/ANSI Terminal Emulator Cheat Sheet}}
\hypersetup{pdfauthor={Peteris Krumins (peter@catonmat.net)}}
\hypersetup{pdfkeywords={cheat sheet, cheat sheat, cheet sheet, cheet sheat, screen, ansi, vt100, terminal, emulator, unix, linux}}
\hypersetup{pdfsubject={http://www.catonmat.net - good coders code, great reuse}}
\hypersetup{colorlinks}

\pagestyle{empty}

% -----------------------------------------------------------------------

\begin{document}

\begin{center}
\Large Screen VT100/ANSI Terminal Emulator Cheat Sheet \\
\Large Default Keyboard Shortcuts
\end{center}

\vspace{0.6in}

\renewcommand{\arraystretch}{1.3}
\begin{tabular}{|p{3.5cm}|p{3cm}|p{10cm}|}
\hline
\large\textbf{Shortcut} & \large\textbf{Command} & \large\textbf{Description} \\
\hline
\textbf{C-a '} & select & Prompt for a window name or number to switch to. \\
\hline
\textbf{C-a "} & windowlist -b & Present a list of all windows for selection. \\
\hline
\textbf{C-a 0\ldots 9} & select 0\ldots select 9 & Switch to window number 0\ldots 9. \\
\hline
\textbf{C-a -} & select - & Switch to the blank window. \\
\hline
\textbf{C-a [TAB]} & focus & Switch the input focus to the next region. \\
\hline
\textbf{C-a C-a} & other & Toggle  to  the  window  displayed previously. \\
\hline
\textbf{C-a a} & meta & Send the command character (C-a) to window. \\
\hline
\textbf{C-a A} & title & Allow the user to enter a name for the current window. \\
\hline
\parbox{1in}{%
\textbf{C-a b} \\
\textbf{C-a C-b} %
} & break & Send a break to window. \\
\hline
\textbf{C-a B} & pow\_break & Reopen the terminal line and send a break. \\
\hline
\parbox{1in}{%
\textbf{C-a c} \\
\textbf{C-a C-c} %
} & screen & Create a new window with a shell and switch to that window. \\
\hline
\textbf{C-a C} & clear & Clear the screen. \\
\hline
\parbox{1in}{%
\textbf{C-a d} \\
\textbf{C-a C-d} %
} & detach & Detach screen from this terminal. \\
\hline
\textbf{C-a D D} & pow\_detach & Detach and logout. \\
\hline
\parbox{1in}{%
\textbf{C-a f} \\
\textbf{C-a C-f} %
} & flow & Toggle flow on, off or auto. \\
\hline
\textbf{C-a F} & fit & Resize the window to the current region size. \\
\hline
\textbf{C-a C-g} & vbell & Toggles screen's visual bell mode. \\
\hline
\textbf{C-a h} & hardcopy & Write a hardcopy of the current window to the file "hardcopy.n". \\
\hline
\textbf{C-a H} & log & Begins/ends logging of the current window to the file "screenlog.n". \\
\hline
\parbox{1in}{%
\textbf{C-a i} \\
\textbf{C-a C-i} %
} & info & Show info about this window. \\
\hline
\parbox{1in}{%
\textbf{C-a k} \\
\textbf{C-a C-k} %
} & kill & Destroy current window. \\
\hline
\parbox{1in}{%
\textbf{C-a l} \\
\textbf{C-a C-l} %
} & redisplay & Fully refresh current window. \\
\hline
\textbf{C-a L} & login & Toggle this windows login slot. Available only if screen is configured to update the utmp database. \\
\hline
\parbox{1in}{%
\textbf{C-a m} \\
\textbf{C-a C-m} %
} & lastmsg & Repeat the last message displayed in the message line. \\
\hline
\textbf{C-a M} & monitor & Toggles monitoring of the current window. \\
\hline
\parbox{1in}{%
\textbf{C-a [space]} \\
\textbf{C-a n} \\
\textbf{C-a C-n} %
} & next & Switch to the next window. \\
\hline
\textbf{C-a N} & number & Show the number (and title) of the current window. \\
\hline
\parbox{1.2in}{%
\textbf{C-a [back-space]} \\
\textbf{C-a h} \\
\textbf{C-a p} \\
\textbf{C-a C-p} %
} & prev & Switch to the previous window (opposite of \textbf{C-a n}). \\
\hline
\end{tabular}

\vfill

\framebox{\parbox{3.5in}{
\copyright\ 2007 \textbf{Peteris Krumins} (peter@catonmat.net)

\href{http://www.catonmat.net}{http://www.catonmat.net} - good coders code, great reuse}}

%---------------------------------------------------------------------------

\newpage

\mbox{}
\vspace{1.2in}

\begin{tabular}{|p{3.5cm}|p{3cm}|p{10cm}|}
\hline
\large\textbf{Shortcut} & \large\textbf{Command} & \large\textbf{Description} \\
\hline
\parbox{1in}{%
\textbf{C-a q} \\
\textbf{C-a C-q} %
} & xon & Send a control-q to the current window. \\
\hline
\textbf{C-a Q} & only & Delete all regions but the current one. \\
\hline
\parbox{1in}{%
\textbf{C-a r} \\
\textbf{C-a C-r} %
} & wrap & Toggle the current window's line-wrap setting (turn the  current  window's automatic margins on and off). \\
\hline
\parbox{1in}{%
\textbf{C-a s} \\
\textbf{C-a C-s} %
} & xoff & Send a control-s to the current window. \\
\hline
\textbf{C-a S} & split & Split the current region into two new ones. \\
\hline
\parbox{1in}{%
\textbf{C-a t} \\
\textbf{C-a C-t} %
} & time & Show system information. \\
\hline
\textbf{C-a v} & version & Display the version and compilation date. \\
\hline
\textbf{C-a C-v} & digraph & Enter digraph. \\
\hline
\parbox{1in}{%
\textbf{C-a w} \\
\textbf{C-a C-w} %
} & windows & Show a list of window. \\
\hline
\textbf{C-a W} & width & Toggle 80/132 columns. \\
\hline
\parbox{1in}{%
\textbf{C-a x} \\
\textbf{C-a C-x} %
} & lockscreen & Lock this terminal. \\
\hline
\textbf{C-a X} & remove & Kill the current region. \\
\hline
\parbox{1in}{%
\textbf{C-a z} \\
\textbf{C-a C-z} %
} & suspend & Suspend screen. Your system must support BSD-style job-control. \\
\hline
\textbf{C-a Z} & reset & Reset the virtual terminal to its "power-on" values. \\
\hline
\textbf{C-a .} & dumptermcap & Write out a ".termcap" file. \\
\hline
\textbf{C-a ?} & help & Show key bindings. \\
\hline
\textbf{C-a C-\textbackslash} & quit & Kill all windows and terminate screen. \\
\hline
\textbf{C-a :} & colon & Enter command line mode. \\
\hline
\parbox{1in}{%
\textbf{C-a [} \\
\textbf{C-a C-[} \\
\textbf{C-a [ESC]} %
} & copy & Enter copy/scrollback mode. \\
\hline
\textbf{C-a ]} & paste . & Write  the contents of the paste buffer to the stdin queue of the current window. \\
\hline
\parbox{1in}{%
\textbf{C-a \{} \\
\textbf{C-a \}} %
} & history & Copy and paste a previous (command) line. \\
\hline
\textbf{C-a \textgreater} & writebuf & Write paste buffer to a file. \\
\hline
\textbf{C-a \textless} & readbuf & Reads the screen-exchange file into the paste buffer. \\
\hline
\textbf{C-a =} & removebuf & Removes the file used by \textbf{C-a \textless} and \textbf{C-a \textgreater}. \\
\hline
\textbf{C-a ,} & license & Shows where screen comes from, where it went to and why  you  can  use it. \\
\hline
\textbf{C-a \_} & silence & Start/stop monitoring the current window for inactivity. \\
\hline
\textbf{C-a *} & displays & Show a listing of all currently attached displays. \\
\hline
\end{tabular}

\vfill

\framebox{\parbox{3.5in}{
\copyright\ 2007 \textbf{Peteris Krumins} (peter@catonmat.net)

\href{http://www.catonmat.net}{http://www.catonmat.net} - good coders code, great reuse}}

\end{document}

