
== Introduction to Pcbnew

[[initial-configuration]]
=== Initial configuration

When Pcbnew is run for the first time, if the global footprint table file `fp-lib-table` is not
found in the KiCad configuration folder then Pcbnew will ask how to create this file:

image::images/en/fp_lib_table_initial_setup.png[footprint library table initial setup dialog]

The first option is recommended (*Copy default global footprint library table
(recommended)*). The default footprint library table includes all of the
standard footprint libraries that are installed as part of KiCad.

If this option is disabled, KiCad was unable to find the default global
footprint library table. This probably means you did not install the standard
footprint libraries with KiCad, or they are not installed where KiCad expects to
find them. On some systems the KiCad libraries are installed as a separate package.

* If you have installed the standard KiCad footprint libraries and want to use
  them, but the first option is disabled, select the second option and browse to
  the `fp-lib-table` file in the directory where the KiCad libraries were
  installed.
* If you already have a custom footprint library table that you would like to use,
  select the second option and browse to your `fp-lib-table` file.
* If you want to construct a new footprint library table from scratch, select
  the third option.

Footprint library management is described in more detail xref:pcbnew_footprints_and_libraries.adoc#managing-footprint-libraries[later].

=== The Pcbnew user interface
:experimental:

image::images/pcbnew_user_interface.png[width=1000,scaledwidth=70%]

The main Pcbnew user interface is shown above, with some key elements indicated:

1. Top toolbars (file management, zoom tools, editing tools)
2. Left toolbar (display options)
3. Message panel and status bar
4. Right toolbar (drawing and design tools)
5. Appearance panel
6. Selection filter panel

=== Navigating the editing canvas

The editing canvas is a view onto the board being designed.  You can pan and zoom to different
areas of the board, and also flip the view to show the board from the bottom.

By default, dragging with the middle or right mouse button will pan the canvas view and scrolling
the mouse wheel will zoom the view in or out.  You can change this behavior in the Mouse and
Touchpad section of the preferences (see
<<configuration-and-customization,Configuration and Customization>> for details).

Several other zoom tools are available in the top toolbar:

* image:images/icons/zoom_in_24.png[Zoom In icon] zooms in on the center of the
  viewport.

* image:images/icons/zoom_out_24.png[Zoom Out icon] zooms out from the center of
  the viewport.

* image:images/icons/zoom_fit_in_page_24.png[Zoom to Page icon] zooms to fit the
  frame around the drawing sheet.

* image:images/icons/zoom_fit_to_objects_24.png[Zoom to Objects icon] zooms to
  fit the items within the drawing sheet.

* image:images/icons/zoom_area_24.png[Zoom to Selection icon] allows you to
  draw a box to determine the zoomed area.

The cursor's current position is displayed at the bottom of the window (X and
Y), along with the current zoom factor (Z), the cursor's relative position (dx,
dy, and dist), the grid setting, and the display units.

The relative coordinates can be reset to zero by pressing kbd:[Space]. This is
useful for measuring distance between two points or aligning objects.

=== Hotkeys

The kbd:[Ctrl+F1] shortcut displays the current hotkey list. The default hotkey
list is included in the <<pcbnew-actions-reference,Actions Reference>> section
of the manual.

The hotkeys described in this manual use the key labels that appear on a
standard PC keyboard. On an Apple keyboard layout, use the kbd:[Cmd] key in
place of kbd:[Ctrl], and the kbd:[Option] key in place of kbd:[Alt].

Many actions do not have hotkeys assigned by default, but hotkeys can be
assigned or redefined using the hotkey editor (**Preferences** ->
**Preferences...** -> **<<preferences-controls,Hotkeys>>**).

NOTE: Many of the actions available through hotkeys are also available in context menus.  To access
the context menu, right-click in the editing canvas.  Different actions will be available depending
on what is selected or what tool is active.

Hotkeys are stored in the file `user.hotkeys` in KiCad's configuration
directory. The location is platform-specific:

* Windows: `%APPDATA%\kicad\6.0\user.hotkeys`
* Linux: `~/.config/kicad/6.0/user.hotkeys`
* macOS: `~/Library/Preferences/kicad/6.0/user.hotkeys`

KiCad can import hotkey settings from a `user.hotkeys` file using the **Import
Hotkeys** button in the hotkey editor.
