All user accessible commands may be bound to almost any X
event. Almost
no default binding for commands is done in the binaries, so it is vital for the
application that at least a system-wide application resource file exists.
This file normally resides in the share/pcb
directory and
is called Pcb
. The bindings to which the manual refers to are the
ones as defined by the shipped resource file. Besides binding an action to
an X11 event, you can also execute any action command using a ":" command
(see User Commands).
Take special care about translations related to the functions keys and the
pointer buttons because most of the window managers use them too.
Change the file according to your hardware/software environment.
You may have to replace all occurances of baseTranslations to
translations if you use a X11R4
server.
Passing Object as an argument to an action routine causes the object at the cursor location to be changed, removed or whatever. If more than one object is located at the cross hair position the smallest type is used. If there are two of the same type the newer one is taken. SelectedObjects will handle all selected and visible objects.
AddRats(AllRats|SelectedRats)
None<Key>w: AddRats(AllRats) !Shift<Key>w: AddRats(SelectedRats) None<Key>o: DeleteRats(AllRats) AddRats(AllRats) !Shift<Key>o: DeleteRats(SelectedRats) AddRats(SelectedRats)
ApplyVendor()
ApplyVendor()
Atomic(Save|Restore|Block|Close)
Bell([-100..100])
ChangeClearSize(Object, value[, unit])
ChangeClearSize(SelectedPins|SelectedVias, value[, unit])
!Mod1<Key>k: ChangeClearSize(Object, +2, mil) !Mod1 Shift<Key>k: ChangeClearSize(Object, -2, mil)
ChangeDrillSize(Object, value[, unit])
ChangeDrillSize(SelectedPins|SelectedVias, value[, unit])
!Mod1<Key>s: Change2ndSize(Object, +5, mil) !Mod1 Shift<Key>s: Change2ndSize(Object, -5, mil)
ChangeFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square,0|1)
:ChangeFlag(SelectedVias,thermal,1) :ChangeFlag(SelectedPads,square,0)
ChangeHole(Object|SelectedVias)
!Ctrl<Key>h: ChangeHole(Object)
ChangeName(Object)
ChangeName(Layer|Layout)
None<Key>n: ChangeName(Object)
ChangeOctagon(Object|SelectElements|SelectedPins|SelectedVias|Selected)
!Ctrl<Key>o: ChangeOctagon(Object)
ChangeSize(Object, value[, unit])
ChangeSize(SelectedLines|SelectedPins|SelectedVias, value[, unit])
ChangeSize(SelectedPads|SelectedTexts|SelectedNames, value[, unit])
ChangeSize(SelectedElements, value[, unit])
X
event (or use :ChangeSize(...)). If value begins with
a + or - then the value will be added (or subtracted) from the current
size, otherwise the size is set equal to value. Range checking is
done to insure that none of the maximum/minimums of any size are violated.
If Object is passed then a single object at the cursor location is
changed. If any of the Selected arguments are passed then all selected
and visible objects of that type are changed. If the type being modified is
an element, then the thickness of the silkscreen lines defining the element
is changed.
unit is "mil" or "mm". If not specified the units will default
to the internal unit of 0.01 mil.
Default:
None<Key>s: ChangeSize(Object, +5) !Shift<Key>s: ChangeSize(Object, -5)
ChangeSquare(Object|SelectedElements|SelectedPins)
None<Key>q: ChangeSquare(Object)
ClrFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)
:ClrFlag(SelectedVias,thermal)
Command()
<Key>colon: Command()
Connection(Find)
Connection(ResetFoundLinesAndRectangles|ResetPinsViasAndPads|Reset)
!Shift<Key>c: Connection(Reset) None<Key>f: Connection(Find) !Shift<Key>f: Connection(Reset)
DeleteRats(AllRats|SelectedRats)
None<Key>e: DeleteRats(AllRats) !Shift<Key>e: DeleteRats(SelectedRats)
DisableVendor()
DisableVendor()
DisperseElements(All|Selected)
DisperseElements(All)
Display(Description|NameOnPCB|Value)
Display(Toggle45Degree|CycleClip)
Display(Grid|ToggleGrid)
Display(ToggleRubberBandMode)
Display(Center|ClearAndRedraw|Redraw)
Display(Pinout|PinOrPadName)
Pcb
is able to handle several labels of an element. One of them
is a description of the functionality (eg resistor), the second should be
a unique identifier (R1) whereas the last one is a value (100k).
The Display() action selects which of the names is displayed.
It also controls which name will be affected by the ChangeName command.
If ToggleGrid is passed, Pcb
changes between relative
('rel' in the statusline) and absolute grid (an 'abs' in the statusline).
Relative grid means the pointer position when the command is issued is
used as the grid origin; while (0,0) is used in the absolute grid case.
Passing Pinout displays the pinout of the element at the current
cursor location whereas PinOrPadName toggles displaying of the
pins or pads name under the cursor. If none of them matches but the cursor
is inside of an element, the flags is toggled for all of its pins and pads.
For details about rubberbands see also the details about Mode.
Default:
None<Key>c: Display(Center) None<Key>d: Display(PinOrPadName) !Shift<Key>d: Display(Pinout) None<Key>r: Display(ClearAndRedraw) None<Key>.: Display(Toggle45Degree) None<Key>/: Display(CycleClip)
DRC()
ExecuteFile(filename)
:ExecuteFile(custom.cmd)The command file contains a list of PCB actions. Blank lines are ignored and lines starting with a # are treated as comment lines. For example
# This is a comment line Display(Grid) SetValue(Zoom,2) DRC()
EditLayerGroups()
EnableVendor()
EnableVendor()
Load(ElementToBuffer|Layout|LayoutToBuffer|Nelist)
LoadVendor(vendorfile)
LoadVendor(myvendor.res)
MarkCrosshair()
!Ctrl<key>m: MarkCrosshair()
Mode(Copy|InsertPoint|Line|Move|None|PasteBuffer|Polygon|Thermal)
Mode(Remove|Rectangle|RubberbandMove|Text|Via)
Mode(Cycle)
Mode(Notify)
Mode(Save|Restore)
Pcb
is implemented by selecting a mode
and calling Mode(Notify). The arguments Line, Polygon,
Rectangle, Text and Via are used to create the
appropriate object whenever Mode(Notify) is called. Some of them,
such as Polygon, need more than one call for one object to be created.
InsertPoint adds points to existing polygons or lines.
Save and Restore are used to temporarily save the mode, switch
to another one, call Mode(Notify) and restore the saved one. Have
a look at the application resource file for examples.
Copy and Move modes are used to change an object's location and,
optionally, to create a new one. The first call of Mode(Notify) attaches
the object at the pointer location to the cross hair whereas the second
one drops it to the layout. The rubberband version of move performs the
move while overriding the current rubberband mode.
Passing PasteBuffer attaches the contents of the currently selected
buffer to the cross hair. Each call to Mode(Notify) pastes this contents
to the layout. Mode(Cycle) cycles through the modes available in the
mode-button pallet.
Mode(None) switches all modes off.
Default:
<Key>Escape: Mode(None) <Key>space: Mode(Cycle) None<Key>BackSpace: Mode(Save) Mode(Remove) Mode(Notify) Mode(Restore) None<Key>Delete: Mode(Save) Mode(Remove) Mode(Notify) Mode(Restore) None<Key>F1: Mode(Via) None<Key>F2: Mode(Line) None<Key>F3: Mode(PasteBuffer) None<Key>F4: Mode(Rectangle) None<Key>F5: Mode(Text) None<Key>F6: Mode(Polygon) None<Key>F7: Mode(Thermal) None<Key>F8: Mode(Arc) None<Key>Insert: Mode(InsertPoint) None<Key>[: Mode(Save) Mode(Move) Mode(Notify) None<Key>]: Mode(Notify) Mode(Restore) None<Btn1>: Mode(Notify) !Shift Ctrl<Btn1>: Mode(Save) Mode(Remove) Mode(Notify) Mode(Restore) None<Btn2Down>: Mode(Save) Mode(Move) Mode(Notify) None<Btn2Up>: Mode(Notify) Mode(Restore) !Mod1<Btn2Down>: Mode(Save) Mode(Copy) Mode(Notify) !Mod1<Btn2Up>: Mode(Notify) Mode(Restore) Shift BTNMOD<Btn2Down>: Mode(Save) Mode(RubberbandMove) Mode(Notify)
MovePointer(delta_x, delta_y)
X
server's pointer follows because the necessary
events are generated by Pcb
. All movements are performed with respect
to the currently set grid value.
Default:
None<Key>Up: MovePointer(0, -1) !Shift<Key>Up: MovePointer(0, -10) None<Key>Down: MovePointer(0, 1) !Shift<Key>Down: MovePointer(0, 10) None<Key>Right: MovePointer(1, 0) !Shift<Key>Right: MovePointer(10, 0) None<Key>Left: MovePointer(-1, 0) !Shift<Key>Left: MovePointer(-10, 0)
MoveToCurrentLayer(Object|SelectedObjects)
None<Key>m: MoveToCurrentLayer(Object) !Shift<Key>m: MoveToCurrentLayer(SelectedObjects)
New()
PasteBuffer(AddSelected|Clear|1..5)
PasteBuffer(Rotate, 1..3)
PasteBuffer(Convert)
!Ctrl<Key>x: PasteBuffer(Clear) PasteBuffer(AddSelected) Mode(PasteBuffer) !Shift Ctrl<Key>x: PasteBuffer(Clear) PasteBuffer(AddSelected) RemoveSelected() Mode(PasteBuffer) !Mod1<Key>c: PasteBuffer(Clear) PasteBuffer(AddSelected) !Mod1<key>x: PasteBuffer(Clear) PasteBuffer(AddSelected) RemoveSelected() !Shift<Key>1: PasteBuffer(1) !Shift<Key>2: PasteBuffer(2) !Shift<Key>3: PasteBuffer(3) !Shift<Key>4: PasteBuffer(4) !Shift<Key>5: PasteBuffer(5) None<Key>F3: Mode(PasteBuffer)
Polygon((Close|PreviousPoint)
None<Key>p: Polygon(Close) !Shift<Key>p: Polygon(Close)
Print()
POSIX (extension) 8.3 filename --------------------------------------------- *_componentmask.* cmsk.* *_componentsilk.* cslk.* *_soldermask.* smsk.* *_soldersilk.* sslk.* *_drill.* dril.* *_groundplane.* gpl.* *_group[1..8].* [..8].*The output may be sent to a post-processor by starting the filename with the pipe
("|")
character. Any "%f"
in a command is replaced
with the current filename. The function is available from the file menu.
There are no defaults.
Quit()
<Message>WM_PROTOCOLS: Quit()
Redo()
!Shift<Key>r: Redo()
RemoveSelected()
Report(Object|DrillReport)
RouteStyle(1|2|3|4)
!Ctrl<Key>1: RouteStyle(1) ... !Ctrl<Key>NUM_STYLES: RouteStyle(NUM_STYLES)The variable
NUM_STYLES
is set at compile time in
globalconfig.h
.
Save(Layout|LayoutAs)
Save(AllConnections|AllUnusedPins|ElementConnections)
Select(All|Block|Connection|ToggleObject)
Select(ElementByName|ObjectByName|PadByName|PinByName)
Select(TextByName|ViaByName)
None<Btn3Down>: Select(ToggleObject) None<Btn3Down>,None<Btn3Motion>: See resource file - this is complex
SetFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)
:SetFlag(Selected,thermal)
SetValue(Grid|LineSize|TextScale|ViaDrillingHole|ViaSize|Zoom, value)
None<Key>g: SetValue(Grid, +5) !Shift<Key>g: SetValue(Grid, -5) None<Key>l: SetValue(LineSize, +5) !Shift<Key>l: SetValue(LineSize, -5) None<Key>t: SetValue(TextScale, +10) !Shift<Key>t: SetValue(TextScale, -10) None<Key>v: SetValue(ViaSize, +5) !Shift<Key>v: SetValue(ViaSize, -5) !Mod1<Key>v: SetValue(ViaDrillingHole, +5) !Mod1 Shift<Key>v: SetValue(ViaDrillingHole, -5) None<Key>z: SetValue(Zoom, -1) !Shift<Key>z: SetValue(Zoom, +1)
SwapSides()
None<Key>Tab: SwapSides()
SwitchDrawingLayer(value)
None<Key>1: SwitchDrawingLayer(1) ... None<Key>MAX_LAYER: SwitchDrawingLayer(MAX_LAYER)
ToggleHideName(Object|SelectedElements)
None<Key>h: ToggleHideName(Object) !Shift<Key>h: ToggleHideName(SelectedElements)
ToggleVendor()
ToggleVendor()
ToggleVisibility(Layer)
Mod1<Key>1: ToggleVisibility(1) Mod1<Key>2: ToggleVisibility(2) Mod1<Key>3: ToggleVisibility(3) Mod1<Key>4: ToggleVisibility(4)
Undo()
Undo(ClearList)
Pcb
allows you to recover
from most operations that materially affect you work.
Calling Undo() without any parameter recovers
from the last (non-undo) operation. ClearList is used to release the
allocated memory. ClearList is called whenever a new layout is started
or loaded. See also Redo.
Default:
None<Key>u: Undo() !Shift Ctrl<Key>u: Undo(ClearList)
UnloadVendor()
UnloadVendor()
Unselect(All|Block|Connection)
!Shift <Btn3Down>: Mode(Save) Mode(None) Unselect(Block) !Shift <Btn3Up>: Unselect(Block) Mode(Restore)