:experimental:

== Generic Schematic Editor commands

Commands can be executed by:

* Clicking on the menu bar (top of screen).
* Clicking on the icons on top of the screen (general commands).
* Clicking on the icons on the right side of the screen (particular
  commands or "tools").
* Clicking on the icons on the left side of the screen (display
  options).
* Pressing the mouse buttons (important complementary commands). In
  particular a right click opens a contextual menu for the
  element under the cursor (Zoom, grid and editing of the elements).
* Function keys (kbd:[F1], kbd:[F2], kbd:[F3], kbd:[F4], kbd:[Insert] and
  kbd:[Space]). Specifically: kbd:[Escape] cancels the command in progress.
  kbd:[Insert] allows the duplication of the last element created.
* Pressing hotkeys. For a list of hotkeys, see the **Help->List Hotkeys** menu
  entry or press kbd:[Ctrl+F1]. Many hotkeys select a tool but do not perform
  the tool's action until the canvas is clicked. This behavior can be changed
  by unchecking **First hotkey selects tool** in the **Common** Preferences
  pane. With this option unchecked, pressing a hotkey will select the tool and
  immediately perform the tool's action at the current cursor location.

image::images/en/commands_overview.png[alt="Commands overview",scaledwidth="60%"]

=== Mouse commands

==== Basic commands

*Left button*

* Single click: Selects the item under the cursor and displays
  the item's characteristics in the status bar.
* Double click: edits the item if it is editable.

*Right button*

* Opens a pop-up menu. If an item is selected, the items in the menu are
  related to the selected item. If an item is under the cursor when the right
  mouse button is clicked, the item is selected.

==== Selection operations

Schematic editor items can be selected by clicking on them. Multiple items can
be selected at once. Add items to the selection with kbd:[Shift] + click, and
remove items from the selection with kbd:[Ctrl+Shift] + click.

NOTE: On macOS, kbd:[Cmd] is used instead of kbd:[Ctrl].

[width="80%",cols="66%,34%",]
|======================================================
|left mouse button |Select item.
|kbd:[Shift] + left mouse button |Add item to selection.
|kbd:[Ctrl+Shift] + left mouse button |Remove item from selection.
|kbd:[Ctrl] + left mouse button |Highlight net.
|======================================================

Items can also be selected by drawing a box around them using the left mouse
button.

Dragging from left to right includes all items fully enclosed by the box.
Dragging from right to left includes all items touched by the box, even if they
are not fully enclosed.

The kbd:[Shift] and kbd:[Ctrl+Shift] modifiers also work with drag selections
to add and remove items from the selection, respectively.


=== Hotkeys

* The kbd:[Ctrl+F1] displays the current hotkey list.
* All hotkeys can be redefined using the hotkey editor (**Preferences** ->
  **Preferences...** -> **<<preferences-controls,Hotkeys>>**).

The default hotkey list is below. Many additional actions do not have hotkeys by
default, but hotkeys can be assigned to them with the hotkey editor.


[width="100%",options="header",cols="20%,15%,65%"]
|===
| Action | Default Hotkey | Description
| Click
  | kbd:[Return]
  | Performs left mouse button click
| Double-click
  | kbd:[End]
  | Performs left mouse button double-click
| Cursor Down
  | kbd:[Down]
  | 
| Cursor Down Fast
  | kbd:[Ctrl+Down]
  | 
| Cursor Left
  | kbd:[Left]
  | 
| Cursor Left Fast
  | kbd:[Ctrl+Left]
  | 
| Cursor Right
  | kbd:[Right]
  | 
| Cursor Right Fast
  | kbd:[Ctrl+Right]
  | 
| Cursor Up
  | kbd:[Up]
  | 
| Cursor Up Fast
  | kbd:[Ctrl+Up]
  | 
| Switch to Fast Grid 1
  | kbd:[Alt+1]
  | 
| Switch to Fast Grid 2
  | kbd:[Alt+2]
  | 
| Switch to Next Grid
  | kbd:[N]
  | 
| Switch to Previous Grid
  | kbd:[Shift+N]
  | 
| Reset Grid Origin
  | kbd:[Z]
  | 
| Grid Origin
  | kbd:[S]
  | Set the grid origin point
| New...
  | kbd:[Ctrl+N]
  | Create a new document in the editor
| Open...
  | kbd:[Ctrl+O]
  | Open existing document
| Pan Down
  | kbd:[Shift+Down]
  | 
| Pan Left
  | kbd:[Shift+Left]
  | 
| Pan Right
  | kbd:[Shift+Right]
  | 
| Pan Up
  | kbd:[Shift+Up]
  | 
| Print...
  | kbd:[Ctrl+P]
  | Print
| Reset Local Coordinates
  | kbd:[Space]
  | 
| Save
  | kbd:[Ctrl+S]
  | Save changes
| Save As…
  | kbd:[Ctrl+Shift+S]
  | Save current document to another location
| Always Show Cursor
  | kbd:[Ctrl+Shift+X]
  | Display crosshairs even in selection tool
| Switch units
  | kbd:[Ctrl+U]
  | Switch between imperial and metric units
| Update PCB from Schematic…
  | kbd:[F8]
  | Update PCB with changes made to schematic
| Center
  | kbd:[F4]
  | Center
| Zoom to Objects
  | kbd:[Ctrl+Home]
  | Zoom to Objects
| Zoom to Fit
  | kbd:[Home]
  | Zoom to Fit
| Zoom In at Cursor
  | kbd:[F1]
  | Zoom In at Cursor
| Zoom Out at Cursor
  | kbd:[F2]
  | Zoom Out at Cursor
| Refresh
  | kbd:[F5]
  | Refresh
| Zoom to Selection
  | kbd:[Ctrl+F5]
  | Zoom to Selection
| Change Edit Method
  | kbd:[Ctrl+Space]
  | Change edit method constraints
| Copy
  | kbd:[Ctrl+C]
  | Copy selected item(s) to clipboard
| Cut
  | kbd:[Ctrl+X]
  | Cut selected item(s) to clipboard
| Delete
  | kbd:[Del]
  | Deletes selected item(s)
| Duplicate
  | kbd:[Ctrl+D]
  | Duplicates the selected item(s)
| Find
  | kbd:[Ctrl+F]
  | Find text
| Find and Replace
  | kbd:[Ctrl+Alt+F]
  | Find and replace text
| Find Next
  | kbd:[F3]
  | Find next match
| Find Next Marker
  | kbd:[Shift+F3]
  | 
| Paste
  | kbd:[Ctrl+V]
  | Paste item(s) from clipboard
| Redo
  | kbd:[Ctrl+Y]
  | Redo last edit
| Select All
  | kbd:[Ctrl+A]
  | Select all items on screen
| Undo
  | kbd:[Ctrl+Z]
  | Undo last edit
| List Hotkeys...
  | kbd:[Ctrl+F1]
  | Displays current hotkeys table and corresponding commands
| Preferences...
  | kbd:[Ctrl+,]
  | Show preferences for all open tools
| Clear Net Highlighting
  | kbd:[~]
  | Clear any existing net highlighting
| Edit Library Symbol...
  | kbd:[Ctrl+Shift+E]
  | Open the library symbol in the Symbol Editor
| Edit with Symbol Editor
  | kbd:[Ctrl+E]
  | Open the selected symbol in the Symbol Editor
| Highlight Net
  | kbd:[`]
  | Highlight net under cursor
| Show Datasheet
  | kbd:[D]
  | Opens the datasheet in a browser
| Add Sheet
  | kbd:[S]
  | Add a hierarchical sheet
| Add Wire to Bus Entry
  | kbd:[Z]
  | Add a wire entry to a bus
| Add Global Label
  | kbd:[Ctrl+L]
  | Add a global label
| Add Hierarchical Label
  | kbd:[H]
  | Add a hierarchical label
| Add Junction
  | kbd:[J]
  | Add a junction
| Add Label
  | kbd:[L]
  | Add a net label
| Add No Connect Flag
  | kbd:[Q]
  | Add a no-connection flag
| Add Power
  | kbd:[P]
  | Add a power port
| Add Text
  | kbd:[T]
  | Add text
| Add Symbol
  | kbd:[A]
  | Add a symbol
| Add Bus
  | kbd:[B]
  | Add a bus
| Add Lines
  | kbd:[I]
  | Add connected graphic lines
| Add Wire
  | kbd:[W]
  | Add a wire
| Finish Wire or Bus
  | kbd:[K]
  | Complete drawing at current segment
| Unfold from Bus
  | kbd:[C]
  | Break a wire out of a bus
| Autoplace Fields
  | kbd:[O]
  | Runs the automatic placement algorithm on the symbol or sheet's fields
| Edit Footprint…
  | kbd:[F]
  | Displays footprint field dialog
| Edit Reference Designator...
  | kbd:[U]
  | Displays reference designator dialog
| Edit Value…
  | kbd:[V]
  | Displays value field dialog
| Mirror Horizontally
  | kbd:[X]
  | Flips selected item(s) from left to right
| Mirror Vertically
  | kbd:[Y]
  | Flips selected item(s) from top to bottom
| Properties…
  | kbd:[E]
  | Displays item properties dialog
| Repeat Last Item
  | kbd:[Ins]
  | Duplicates the last drawn item
| Rotate Counterclockwise
  | kbd:[R]
  | Rotates selected item(s) counter-clockwise
| Drag
  | kbd:[G]
  | Drags the selected item(s)
| Move
  | kbd:[M]
  | Moves the selected item(s)
| Select Connection
  | kbd:[Alt+4]
  | Select a complete connection
| Select Node
  | kbd:[Alt+3]
  | Select a connection item under the cursor
| Leave Sheet
  | kbd:[Alt+Back]
  | Display the parent sheet in the schematic editor
|===

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`

It is possible to import hotkey settings from a `user.hotkeys` file using menu
**Preferences**->**Preferences...**->**Hotkeys**->**Import Hotkeys...**.

=== Grid

In the Schematic Editor the cursor always moves over a grid. The grid can be
customized:

* Size can be changed using the right click menu or using **View** -> **Grid Properties...**.
* Color can be changed in the **Colors** page of the **Preferences** dialog
  (menu **Preferences** -> **General Options**).
* Visibility can be switched using the left-hand toolbar button.

The default grid size is 50 mil (0.050") or 1.27 millimeters.

This is the preferred grid to place symbols and wires in a schematic,
and to place pins when designing a symbol in the Symbol Editor.

One can also work with a smaller grid from 25 mil to 10 mil.
This is only intended for designing the symbol body
or placing text and comments and not recommended for placing pins and wires.

=== Zoom selection

To change the zoom level:

* Right click to open the Pop-up menu and select the desired zoom.

* Or use hotkeys:

  ** kbd:[F1]: Zoom in

  ** kbd:[F2]: Zoom out

  ** kbd:[F4]: Center the view around the cursor pointer position

  ** kbd:[Home]: Zoom and center the view to fit the entire schematic sheet

  ** kbd:[Ctrl+Home]: Zoom and center the view to fit all of the objects in the
     schematic

  ** kbd:[Ctrl+F5]: Activate the Zoom to Selection tool

* Window Zoom:

  ** Mouse wheel: Zoom in/out

  ** Shift+Mouse wheel: Pan up/down

  ** Ctrl+Mouse wheel: Pan left/right

Mouse scroll gestures are configurable in the **Mouse and Touchpad** page of
the **Preferences** dialog.


=== Displaying cursor coordinates

The display units are in inches, mils, or millimeters.

The following information is displayed at the bottom right hand side of
the window:

* The zoom factor
* The absolute position of the cursor
* The relative position of the cursor
* The grid size
* The active unit system
* The active tool

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

image::images/en/status_bar.png[alt="status_bar",scaledwidth="95%"]

=== Top menu bar

The top menu bar allows the opening and saving of schematics,
program configuration and viewing the documentation.

image::images/en/menu_bar.png[alt="menubar",scaledwidth="70%"]

=== Upper toolbar

This toolbar gives access to the main functions of the Schematic Editor.

If the Schematic Editor is run in standalone mode, this is the available tool
set:

image::images/toolbar_schedit_standalone.png[alt="images/toolbar_schedit_standalone.png",scaledwidth="100%"]

Note that when KiCad runs in project mode, the first two icons are not available
as they work with individual files.

[width="100%",cols="10%,90%",]
|=======================================================================
|image:images/icons/new_generic_24.png[New schematic icon]
|Create a new schematic (only in standalone mode).

|image:images/icons/directory_open_24.png[Open schematic icon]
|Open a schematic (only in standalone mode).

|image:images/icons/save_24.png[Save schematic icon]
|Save complete schematic project.

|image:images/icons/options_schematic_24.png[Schematic Setup icon]
|Set the schematic-specific options.

|image:images/icons/sheetset_24.png[Page Settings icon]
|Select the sheet size and edit the title block.

|image:images/icons/print_button_24.png[Print icon]
|Open print dialog.

|image:images/icons/plot_24.png[Plot icon]
|Open plot dialog.

|image:images/icons/paste_24.png[paste icon]
|Paste a copied/cut item or block to the current sheet.

|image:images/icons/undo_24.png[undo icon]
|Undo: Revert the last change.

|image:images/icons/redo_24.png[redo icon]
|Redo: Revert the last undo operation.

|image:images/icons/find_24.png[search icon]
|Show the dialog to search symbols and texts in the schematic.

|image:images/icons/find_replace_24.png[search replace icon]
|Show the dialog to search and replace texts in the schematic.

|image:images/icons/refresh_24.png[refresh icon]
|Refresh screen.

|image:images/icons/zoom_in_24.png[zoom in icon]
|Zoom in.

|image:images/icons/zoom_out_24.png[zoom out icon]
|Zoom out.

|image:images/icons/zoom_fit_in_page_24.png[zoom to fit icon]
|Zoom to fit the entire schematic sheet.

|image:images/icons/zoom_fit_to_objects_24.png[zoom fit to objects icon]
|Zoom to fit all objects in the schematic.

|image:images/icons/zoom_selection_24.png[zoom fit to selection icon]
|Zoom to fit selected items.

|image:images/icons/hierarchy_nav_24.png[hierarchy navigator icon]
|View and navigate the hierarchy tree.

|image:images/icons/leave_sheet_24.png[leave sheet icon]
|Leave the current sheet and go up in the hierarchy.

|image:images/icons/rotate_ccw_24.png[rotate counter-clockwise icon]
|Rotate selected items counter-clockwise.

|image:images/icons/rotate_cw_24.png[rotate clockwise icon]
|Rotate selected items clockwise.

|image:images/icons/mirror_v_24.png[mirror vertical icon]
|Mirror selected items vertically.

|image:images/icons/mirror_h_24.png[mirror horizontal icon]
|Mirror selected items horizontally.

|image:images/icons/libedit_24.png[symbol editor icon]
|Call the symbol library editor to view and modify libraries and symbols.

|image:images/icons/library_browser_24.png[symbol library browser icon]
|Browse symbol libraries.

|image:images/icons/module_editor_24.png[footprint editor icon]
|Open the footprint library editor to view and modify libraries and footprints.

|image:images/icons/annotate_24.png[annotate icon]
|Annotate symbols.

|image:images/icons/erc_24.png[ERC icon]
|Electrical Rules Checker (ERC), automatically validate electrical connections.

|image:images/icons/icon_cvpcb_24_24.png[run footprint assignment icon]
|Open the footprint assignment tool to assign footprints to symbols.

|image:images/icons/spreadsheet_24.png[Symbol fields editor icon]
|Bulk edit symbol fields in a spreadsheet interface.

|image:images/icons/post_bom_24.png[BOM icon]
|Generate the Bill of Materials (BOM).

|image:images/icons/icon_pcbnew_24_24.png[pcb editor icon]
|Open the PCB editor.

|image:images/icons/py_script_24.png[python scripting console icon]
|Open the Python scripting console.
|=======================================================================


=== Right toolbar icons

This toolbar contains tools to:

* Place symbols, wires, buses, junctions, labels, text, etc.
* Create hierarchical subsheets and connection symbols.

[width="100%",cols="10%,90%",]
|=======================================================================
|image:images/icons/cursor_24.png[Selection tool icon]
|Cancel the active command or tool and go into selection mode.

|image:images/icons/net_highlight_schematic_24.png[Highlight net icon]
|Highlight a net by marking its wires and net labels with a different color.
If the PCB Editor is also open then copper corresponding to the selected net
will be highlighted as well.

|image:images/icons/add_component_24.png[New Symbol icon]
|Display the symbol selector dialog to select a new symbol to be placed.

|image:images/icons/add_power_24.png[Add Power icon]
|Display the power symbol selector dialog to select a power symbol to be placed.

|image:images/icons/add_line_24.png[Draw Wire icon]
|Draw a wire.

|image:images/icons/add_bus_24.png[Draw Bus icon]
|Draw a bus.

|image:images/icons/add_line2bus_24.png[Draw wire to bus icon]
|Draw wire-to-bus entry points. These elements are only graphical and do not create
a connection, thus they should not be used to connect wires together.

|image:images/icons/noconn_24.png[draw no connect flag icon]
|Place a "No Connect" flag. These flags should be placed on symbol pins which
are meant to be left unconnected. It is done to notify the Electrical Rules
Checker that lack of connection for a particular pin is intentional and should
not be reported.

|image:images/icons/add_junction_24.png[place junction icon]
|Place a junction. This connects two crossing wires or a wire and a pin,
when it can be ambiguous (i.e. if a wire end or a pin is not directly
connected to another wire end).

|image:images/icons/add_line_label_24.png[Local label icon]
|Place a local label. Local label connects items located **in the same sheet**.
For connections between two different sheets, you have to use global or
hierarchical labels.

|image:images/icons/add_glabel_24.png[Global label icon]
|Place a global label. All global labels with the same name are connected, even when
located on different sheets.

|image:images/icons/add_hierarchical_label_24.png[Hierarchical label icon]
|Place a hierarchical label. Hierarchical labels are used to create a
connection between a subsheet and the parent sheet that contains it.

|image:images/icons/add_hierarchical_subsheet_24.png[Hierarchical subsheet icon]
|Place a hierarchical subsheet. You must specify the file name for this subsheet.

|image:images/icons/import_hierarchical_label_24.png[Import hierarchical label icon]
|Import a hierarchical pin from a subsheet. This command can be executed only on
hierarchical subsheets. It will create hierarchical pins corresponding to hierarchical
labels placed in the target subsheet.

|image:images/icons/add_dashed_line_24.png[draw dashed line icon]
|Draw a line. These are only graphical and do not connect anything.

|image:images/icons/text_24.png[place text icon]
|Place a text comment.

|image:images/icons/image_24.png[place bitmap icon]
|Place a bitmap image.

|image:images/icons/delete_cursor_24.png[interactive delete tool icon]
|Delete clicked items.

|=======================================================================

=== Left toolbar icons

This toolbar manages the display options:

[width="100%",cols="10%,90%",]
|=======================================================================

|image:images/icons/grid_24.png[grid visibility icon]
|Toggle grid visibility.

|image:images/icons/unit_inch_24.png[inch unit icon]
|Switch units to inches.

|image:images/icons/unit_mil_24.png[mil unit icon]
|Switch units to mils (0.001 inches).

|image:images/icons/unit_mm_24.png[millimeter unit icon]
|Switch units to millimeters.

|image:images/icons/cursor_shape_24.png[cursor shape icon]
|Choose the cursor shape (full screen/small).

|image:images/icons/hidden_pin_24.png[hidden pin icon]
|Toggle visibility of "invisible" pins.

|image:images/icons/lines90_24.png[free angle wire icon]
|Toggle free angle/90 degrees wires and buses placement.

|=======================================================================

[[pop-up-menus-and-quick-editing]]
=== Pop-up menus and quick editing

A right-click opens a contextual menu for the selected element. This contains:

* Zoom factor.
* Grid adjustment.
* Copy/Paste/Delete commands.
* Add Wire/Bus.
* Commonly edited parameters of the selected element.
