% $Id$
%
%                            COPYRIGHT
%
%  PCB, interactive printed circuit board design
%  Copyright (C) 1994, 1995 Thomas Nau
%  Copyright (C) 1998, 1999, 2000, 2001 harry eaton
%  Copyright (C) 2009 Chitlesh Goorah
%
%  This program is free software; you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation; either version 2 of the License, or
%  (at your option) any later version.
%
%  This program is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.
%
%  You should have received a copy of the GNU General Public License
%  along with this program; if not, write to the Free Software
%  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%
%  Contact addresses for paper mail and Email:
%  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
%  Thomas.Nau@rz.uni-ulm.de


\documentclass[11pt,landscape]{article}
\usepackage{multicol}
\usepackage{calc}
\usepackage{ifthen}
\usepackage[landscape,left=2.5cm,top=2cm,right=2cm,bottom=2cm,nohead]{geometry}

% Turn off header and footer
\pagestyle{empty}
 
% Redefine section commands to use less space
\makeatletter
\renewcommand{\section}{\@startsection{section}{1}{0mm}%
  {-1ex plus -.5ex minus -.2ex}%
  {0.5ex plus .2ex}%x
  {\normalfont\large\bfseries}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}%
  {-1explus -.5ex minus -.2ex}%
  {0.5ex plus .2ex}%
  {\normalfont\normalsize\bfseries}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}%
  {-1ex plus -.5ex minus -.2ex}%
  {1ex plus .2ex}%
  {\normalfont\small\bfseries}}
\makeatother

% Define BibTeX command
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}

% Don't print section numbers
\setcounter{secnumdepth}{0}


\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt plus 0.5ex}

%------------------------------------------------------------------
% some new commands to define the modifier keys
%
\newcommand{\Shift}{{\it [S]}}
\newcommand{\Ctrl}{{\it [C]}}
\newcommand{\Mod}{{\it [M]}}
\newcommand{\Btn}{{\it Btn}}
\newcommand{\Fun}{{\it F}}

\begin{document}
\raggedright
\footnotesize
\begin{multicols}{3}


% multicol parameters
% These lengths are set only within the two main columns
%\setlength{\columnseprule}{0.25pt}
\setlength{\premulticols}{1pt}
\setlength{\postmulticols}{1pt}
\setlength{\multicolsep}{1pt}
\setlength{\columnsep}{2pt}

\begin{center}
  \Large{\textbf{PCB Command reference}}
  \footnote{http://pcb.gpleda.org/index.html}
  \footnote{Obviously \Shift, \Ctrl, \Mod, \Fun \space and \Btn \space mean the shift,
    control, modifier1 (BTNMOD for buttons), function key and mouse button.} \\
\end{center}

\section{Misc operations}
\begin{tabular}{@{}ll@{}}
backspace    & remove object \\
\Shift\Ctrl\Btn1  & remove object \\
scroll wheel & vertical pan \\
\Shift scroll wheel  & horizontal pan \\
\Btn1  & current mode action\\
u & undo operation \\
\Shift r & redo operation \\
\Shift\Ctrl u & clear undo-list \\
tab & switch viewing side \\
cursor key & move crosshair 1 grid\\
\Shift cursor key! & move crosshair 10 grid\\
\end{tabular}


\section{Connections}
\begin{tabular}{@{}ll@{}}
\Shift f & reset found connections \\
f & find connections \\
\Shift backspace & remove connections \\
\end{tabular}


\section{User (:) commands}
\begin{tabular}{@{}ll@{}}
:DRC() & check layout for rule violations \\
:l [file] & load data file \\
:le [file] & load element to buffer \\
:m [file] & load layout to buffer \\
:q & quit application \\
:rn [file] & load netlist \\
:s [file] & save data as file \\
\end{tabular}

\section{Display}
\begin{tabular}{@{}ll@{}}
c & center display \\
g & increase grid spacing \\
\Shift g & decrease grid spacing \\
\Ctrl m & mark location \\
r & clear and redraw output \\
z & zoom in \\
\Shift z & zoom out \\
v & zoom extents \\
\Shift\Btn3 & temporary zoom extents \\
\end{tabular}


\section{Selections}
\begin{tabular}{@{}ll@{}}
\Btn2 & select/deselect object \\
\Shift\Btn2 & toggle object to selection \\
drag \Btn2 & select only objects in box \\
drag \Shift\Btn2 & add box to selection \\
\Shift m & move selected to current layer \\
\end{tabular}


\section{Copy and move}
\begin{tabular}{@{}ll@{}}
drag \Btn2 & move object or selection\\
drag \Mod\Btn2 & copy object \\
drag \Shift\Mod\Btn2 & override rubberband \& move \\
m & move to current layer \\
\end{tabular}


\section{Pastebuffer}
\begin{tabular}{@{}ll@{}}
\Ctrl x & copy selected objects to buffer \\
        & and enter pastebuffer mode \\
\Shift \Ctrl x & cut selected objects to buffer \\
        & and enter pastebuffer mode \\
\Btn1 & in pastebuffer mode copy to layout \\
\Shift \Fun7 & rotate 90 degree cc \\
\Ctrl 1$\cdots$5 & select buffer \# 1$\cdots$5 \\
\end{tabular}


\section{Sizing}
\begin{tabular}{@{}ll@{}}
s & increase size of TLAPV\footnotemark\\
\Shift s & decrease size of TLAPV\\
\Mod s & increase drill size of PV \\
\Shift\Mod s & decrease drill size of PV \\
k & increase clearance of LAPV\\
\Shift\ k & decrease clearance of LAPV\\
\end{tabular}
\footnotetext{TLAPV: text, line, arc, pin or via}


\section{Element}
\begin{tabular}{@{}ll@{}}
d & display pinout \\
\Shift d & open pinout window \\
h & hide/show element name \\
n & change element name \\
\end{tabular}


\section{Pin/pad}
\begin{tabular}{@{}ll@{}}
n & change name \\
q & toggle square flag \\
\end{tabular}


\section{Via}
\begin{tabular}{@{}ll@{}}
\Fun1 & enter via-mode \\
\Ctrl v & increase initial size \\
\Shift \Ctrl v & decrease initial size \\
\Mod v & inc. initial drilling hole \\
\Shift\Mod v & dec. initial drilling hole \\
\Ctrl h & convert via to mounting hole \\
\end{tabular}


\section{Lines and arcs}
\begin{tabular}{@{}ll@{}}
\Fun2 & enter line mode \\
\Fun3 & enter arc mode \\
l & increase initial line size \\
\Shift l & decrease initial line size \\
period & toggle 45 degree enforcement \\
/ & cycle multiline mode \\
\Shift & override multiline mode \\
\end{tabular}


\section{Polygon}
\begin{tabular}{@{}ll@{}}
\Fun5 & enter rectangle-mode \\
\Fun6 & enter polygon-mode \\
\Shift p & close path \\
insert & enter insert point mode \\
\end{tabular}


\section{Text}
\begin{tabular}{@{}ll@{}}
\Fun4 & enter text-mode \\
n & edit string \\
t & increase initial text size \\
\Shift t & decrease initial text size \\
\end{tabular}


\section{Rats nest}
\begin{tabular}{@{}ll@{}}
w & add all rats \\
\Shift w & add rats to selected pins/pads \\
e & delete all rats \\
\Shift e & delete selected rats \\
o & optimize all rats \\
\Shift o & optimize selected rats \\
\end{tabular}


\end{multicols}


\end{document}
