//Translations of this page are also available in the following languages:// [[pcb-quick_reference.fr|Français]], [[pcb-quick_reference.ru|Русский]].

====== PCB: Quick Reference ======

===== Additional information =====
More information on PCB you can find in the PCB Command reference
(//''refcard.pdf''//) containing description of all PCB shortcuts
and in the PCB Manual (//''pcb.pdf''// or //''pcb.html''//)
residing in the //''doc/''// directory of your PCB installation
(its path may vary on various systems).


===== Default Key Mapping =====

==== All Keystrokes ====

^  Key                    ^ Mnemonic           ^ Description  ^
|          <key>esc</key> | select             | enter select mode (same as <key>space</key>, or <key>F11</key>)  |
|          <key>esc</key> | end of action      | terminate the current action, e.g. stop drawing tracks  |
|       <key>insert</key> | insert point       | enter insert point mode. Click and drag on track to insert a point  |
|       <key>return</key> | click              | same as a click on the left mouse button  |
|        <key>space</key> | select             | enter select mode (same as <key>esc</key>, or <key>F11</key>)  |
|          <key>tab</key> | flip up/down       | view: vertical flip  |
|        <key>S-tab</key> | flip left/right    | view: horizontal flip  |
|      <key>C-S-tab</key> | far side           | view: exchange the roles of front side and far side  |
|          <key>del</key> | delete             | delete object under the mouse cursor |
| <key>C-S</key> L-Mouse | delete             | delete object under the mouse cursor (fast) |
|        <key>S-del</key> | del-sel            | delete objects in selection |
|    <key>backspace</key> | del-sel            | delete objects in selection |
|  <key>S-backspace</key> | del-copper         | deletes connected copper under the cursor. Rats are considered a connection.  |
|   <key><nowiki>|</nowiki></key> | thin-draw  | toggles thin draw mode  |
|            <key>a</key> | set same           | read the parameters to use for new objects from the object below the cursor.  |
|          <key>A-a</key> | select-all         | select all objects on active layers. Deactivated layers are ignored.  |
|        <key>S-A-a</key> | unselect           | clear selection  |
|            <key>b</key> | to other side      | flip object to the other side of the board  |
|            <key>c</key> | center             | view: center display at cursor position  |
|          <key>C-c</key> | copy to buffer     | copy selection to buffer and unselect  |
|            <key>d</key> | display name       | display pin or pad name  |
|          <key>S-d</key> | pinout dialog      | open pinout window for element under mouse cursor  |
|            <key>e</key> | eliminate rats     | delete all rats  |
|          <key>S-e</key> | eliminate some rats| delete selected rats  |
|            <key>f</key> | find               | highlight connections to object under mouse cursor. This includes rats and objects on invisible layers  |
|          <key>C-f</key> | add to found       | add connections to object under mouse cursor to the set of found objects  |
|          <key>S-f</key> | un-find            | un-highlight found connections  |
|            <key>g</key> | incr grid mil      | increment grid by configured imperial increment  |
|          <key>S-g</key> | decr grid mil      | decrement grid by configured imperial increment  |
|          <key>C-g</key> | incr grid mm       | increment grid by configured metric increment  |
|        <key>C-S-g</key> | decr grid mm       | decrement grid by configured metric increment  |
|            <key>h</key> | hide               | toggle the visibility of the refdes or value attached to the component under the cursor |
|          <key>S-h</key> | hide sel           | toggle the visibility of the refdes or value attached to selected components  |
|          <key>C-h</key> | holeplate          | toggle plating of a via. Used to produce non metalized mounting holes  |
|            <key>j</key> | lineclear          | toggle the polygon clear flag of the line under the cursor  |
|          <key>S-j</key> | lineclear sel      | toggle the polygon clear flag of selected lines  |
|            <key>k</key> | klear              | increment clearance (soldermask to copper edge)  |
|          <key>S-k</key> | klear (-)          | decrement clearance (soldermask to copper edge (NOTE: can go negative!))  |
|          <key>C-k</key> | klear sel          | increment clearance of selected objects (soldermask to copper edge)  |
|        <key>S-C-k</key> | klear sel (-)      | decrement clearance of selected objects (soldermask to copper edge)  |
|            <key>l</key> | increase line      | increment width of the line tool, adds to the settings of the current line style  |
|          <key>S-l</key> | decrease line      | reduce the current linewidth |
|            <key>m</key> | move to layer      | move the object under the cursor to the current layer  |
|          <key>S-m</key> | move selection to layer | move selected objects to the current working layer (see [[geda:pcb_tips#how_do_i_move_one_set_of_layer_tracks_to_another_layer|pcb tip]])  |
|          <key>C-m</key> | move origin        | set the origin to the current position of the mouse pointer |
|            <key>n</key> | name               | show object refdes / pin number at mouse pointer |
|          <key>S-n</key> | next               | Select the shortest unselected rat on the board |
|            <key>o</key> | optimize rats      | optimize and redraw all rats |
|          <key>S-o</key> | optimize some rats | optimize and redraw selected nets only |
|          <key>C-o</key> | octagon            | toggle the octagon flag of the object under the cursor  |
|          <key>S-p</key> | polygon close      | connect the first point of a polygon with the last  |
|            <key>q</key> | square toggle      | toggle square/round corners on pads  |
|          <key>S-r</key> | redo               | redo what was undone with undo  |
|          <key>C-r</key> | report             | show object report  |
|            <key>s</key> | size               | increment size of the object under the cursor  |
|          <key>S-s</key> | size (-)           | decrement size of the object under the cursor  |
|          <key>A-s</key> | sizehole           | increase the hole of the object under the cursor  |
|        <key>A-S-s</key> | sizehole (-)       | decrease the hole of the object under the cursor  |
|          <key>C-s</key> | sizehole           | increase the hole of the object under the cursor  |
|        <key>C-S-s</key> | sizehole (-)       | decrease the hole size  |
|            <key>t</key> | text tool size     | increase the size of new text by 10 mil  |
|          <key>S-t</key> | text tool size (-) | decrease the size of new text by 10 mil  |
|            <key>v</key> | view extents       | global view of working area  |
|          <key>S-v</key> | via tool dia       | increase the diameter of new vias by 5 mil  |
|          <key>C-v</key> | paste buffer       | paste from buffer |
|        <key>C-S-v</key> | via tool dia (-)   | decrease the diameter of new vias by 5 mil  |
|          <key>A-v</key> | via tool drill     | increase the drill diameter of new vias by 5 mil  |
|        <key>S-A-v</key> | via tool drill (-) | decrease the drill diameter of new vias by 5 mil  |
|          <key>C-x</key> | cut to buffer      | cut selection to buffer |
|            <key>z</key> | zoom               | view: zoom in  |
|          <key>S-z</key> | un-zoom            | view: zoom out  |
|           <key>F1</key> | via                | enter via tool |
|           <key>F2</key> | line               | enter line tool  |
|           <key>F3</key> | arc                | enter arc tool |
|           <key>F4</key> | text               | enter text tool |
|           <key>F5</key> | rectangle          | enter rectangle tool|
|           <key>F6</key> | polygon            | enter polygon tool |
|           <key>F7</key> | buffer             | enter buffer mode |
|           <key>F8</key> | delete             | enter remove mode |
|           <key>F9</key> | rotate             | enter rotate mode  |
|          <key>F10</key> | file menu          | file menu |
|          <key>F11</key> | select             | enter select mode (same as <key>space</key>, or <key>esc</key>)  |
|          <key>F12</key> | lock               | enter lock mode |

==== Viewport Keystrokes ====

^  Key                    ^  Mnemonic        ^ Description  ^
|            <key>v</key> | view extents     | global view of working area  |
|            <key>c</key> | center           | centers view on cursor  |
|            <key>z</key> | zoom             | zoom in       |
|          <key>S-z</key> | un-zoom          | zoom out      |
|  <key><nowiki>|</nowiki></key> | thin-draw | toggles thin draw mode  |
|          <key>tab</key> | flip up/down     | vertical flip  |
|        <key>S-tab</key> | flip left/right  | horizontal flip  |
|      <key>C-S-tab</key> | far side         | exchange the roles of front and far side  |

==== Layers ====
^  Key                                   ^  Mnemonic  ^ Description  ^
|  <key>1</key> to <key>9</key>          |  -  | select layers 1 to 9  |
|  <key>0</key>                          |  -  | select layer 10<sup>*</sup>  |
|  <key>A-1</key> to <key>A-9</key>      |  -  | select layers 11 to 19<sup>*</sup>  |
|  <key>A-0</key>                        |  -  | select layer 20<sup>*</sup>  |
|  <key>C-1</key> to <key>C-9</key>      |  -  | toggle visibility of layers 1 to 9<sup>*</sup>  |
|  <key>C-0</key>                        |  -  | toggle visibility of layer 10<sup>*</sup>  |
|  <key>C-A-1</key> to <key>C-A-9</key>  |  -  | toggle visibility of 11 to 19<sup>*</sup>  |
|  <key>C-A-0</key>                      |  -  | toggle visibility of 20<sup>*</sup>  |
<sup>*</sup> <sub>These accels are available in PCB, GTK GUI in versions after August 2011</sub>
====== Footprint Quick Reference ======
The Master document for footprint creation is the [[http://pcb.geda-project.org/manual.html|PCB Manual]]. There is also Stuart Brorson’s [[http://www.brorson.com/gEDA/land_patterns_20050129.pdf|Footprint Creation for the Open-Source Layout Program PCB]].

===== General syntax =====
A pcb footprint file may contain any of the following commands:
  * **''Element [element_flags, description, pcb_name, value, mark_x, mark_y, text_x, text_y, text_direction, text_scale, text_flags]''**
  * **''Pad [x1 y1 x2 y2 thickness clearance mask name pad_number flags]''**
  * **''Pin [x y thickness clearance mask drillholedia name number flags]''**
  * **''ElementArc [x y r1 r2 startangle sweepangle thickness]''**
  * **''ElementLine [x1 y1 x2 y2 thickness] –> thickness != 1000 = 10 mils almost for all footprints''**
  * Comment lines start with the ‘**''#''**’-sign

===== PCB Units =====
PCB handles metric and imperial units in the following way:
       * The base Imperial unit is the "centimil", or 1/100 of a thousandth, or 1/100,000 inch, or 0.00001 inch.
       * Allowable imperial value range:  "0.04" (0.0000004 inches) to approx. "78740000" (about 78-3/4")
       * The base Metric unit is 1nm (one nanometer).  PCB parses in metric if the number has a "mm" behind it.
       * Allowable metric value range:  "0.000001mm" to "2000mm"
       * NOTES:
         * use "mm" after number to specify metric
         * imperial and metric may be mixed within a footprint (!)

===== Elements =====
**''Element [element_flags, description, pcb_name, value, mark_x, mark_y, text_x, text_y, text_direction, text_scale, text_flags]''**

^    ^  Allowed value (unit = 1e-5 inches) ^  Allowed Value (mm)  ^  explanation  ^  comment  ^
|  element_flags  |  unsigned hex value  |  |  |
|  description  |  string  |  |  text description of footprint  |  user-defined  |
|  pcb_name  |  string  |  |  generic refdes (R?, U? etc.) |  user-defined   |
|  value  |  string  |  |  component value (layout specific)  |  user-defined (blank)  |
|  mark_x  |  "1" to ~ "78740000"  |  "0.000001mm" to "2000mm"  |  (x,y) loc. of center mark  |  |
|  mark_y  |  "1" to ~ "78740000"  |  "0.000001mm" to "2000mm"  |  |  |
|  text_x  |  "1" to ~ "78740000"  |  "0.000001mm" to "2000mm"  |  (x,y) loc. of REFDES  |  |
|  text_y  |  "1" to ~ "78740000"  |  "0.000001mm" to "2000mm"  |  |  |
|  text_direction  |  decimal integer  |  |  0=horiz; 1=ccw90; 2=180; 3=cw90  |  |
|  text_scale  |  decimal integer  |  |  |  usu. set to 100  |
|  text_flags  |  unsigned hex  |  |  |  |

===== Pads =====
**''Pad[x1 y1 x2 y2 thickness clearance mask name pad_number flags]''**

^  Item  ^  Allowed Value  ^  Explanation  ^  Comment  ^
|  x1  |  1/100th mil  |  x (1st point)  |   |
|  y1  |  1/100th mil  |  y (1st point)  |   |
|  x2  |  1/100th mil  |  x (2nd point)  |   |
|  y2  |  1/100th mils  |  y (2nd point)  |   |
|  thickness  |  1/100 mils  |  width of metal surrounding line segment  |see Brorson .pdf  |
|  clearance  |  1/100 mils  |  distance to any other copper on any layer  |actually 1/2 of this number is used!  |
|  mask  |  1/100th mils  |  width of mask relief  |actual width of the mask centered on pad copper  |
|  name  |  string  |  name of pad (arb. string)  |e.g. %%"pad_1"%% or %%"positive"%% or any other string  |
|  pad_number  |  string  |  pad #  | used for nets. it MUST be consistent with the definitions on the netlist.  |
|  flags  |  hex or string  |   | examples:  |

===== Pins =====
**''Pin[x y thickness clearance mask drillholedia name number flags]''**

^  Item  ^ Allowed Value  ^  Explanation  ^  Comment  ^
|  x  |  1/100th mils  |  pin x coord.  |  |
|  y  |  1/100th mils  |  pin y coord.  |  |
|  thickness  |  1/100th mils  |  copper diameter  |  |
|  clearance  |  1/100th mils  |  2*(cu to cu clearance)  |if you want a 10 mil clearance, put 2000 (20 mils) here  |
|  mask  |  1/100th mils  |  diameter of mask aperture  |actual dia. of hole in mask  |
|  drillholedia  |  1/100th mils  |  dia. of hole  |  |
|  name  |  string  |  arb. pin name  |  |
|  number  |  decimal integer  |  pin number used by nets/rats  |  |
|  flags  |  hex  |  xxx  |  |

===== Examples =====
  * **''%%Pad[-24606 14760 -19538 14760 1181 2000 3181 "" "16" "square"]%%''**
  * **''%%Pad[-14760 19538 -14760 24606 1181 2000 3181 "" "17" "square,edge2"]%%''**
  * **''%%Pad[-240.00mil 0.0000 -80.00mil 0.0000 40.00mil 20.00mil 46.00mil "2" "2" "onsolder,square"]%%''**
  * **''%%Pad[80.00mil 0.0000 240.00mil 0.0000 40.00mil 20.00mil 46.00mil "1" "1" "onsolder,square,edge2"]%%''**
  * **''%%Pin[0 0 12000 2000 12500 6400 "" "1" 0×00000001]%%''**
  * **''%%Pin[0 0 11500 11800 35000 12500 "" "1" 0x08]%%''**                  <-- unplated / nonplated hole
  * **''%%ElementArc [0 0 6800 6800 0 360 1000]%%''**
  * **''%%ElementLine [-26696 -26696 26696 -26696 1000]%%''**
  * **''%%# notes within PCB Footprints go after the pound sign%%''**


====== PCB Command Line Action Reference (abridged) ======
|:FreeRotateBuffer(degrees)||Rotate buffer arbitrarily |
|:MoveObject(x,y,unit) ||Move Absolute (x,y,mil) or Relative(+x,-y,mil)|
|:ChangeClearSize(Selected,<amount>,<unit>)|| Clearance Size|
|:ChangeSize(SelectedPins, SIZE)|| Pin Size |
|:ChangeSize(SelectedLines,+N,mils)|| Line Size |
|:MinClearGap(Selected,<amount>,<unit>)|| Clearance Gap |

  * units can be specified as mm or mil.
  * [[http://pcb.geda-project.org/pcb-20100929/pcb.html#Action-Reference|Action Reference from the PCB Manual]]


====== PCB Physical Layer Reference ======
  * outline layer reference
  * physical layer how-to (outline, direct (x,y) footprint placement, part insertion)
