Skip to content
Cheat sheet · pgAdmin

pgAdmin Keyboard Shortcuts Cheat Sheet

A printable list of the default pgAdmin 4 keyboard shortcuts, grouped by task, with Windows/Linux and macOS keys side by side. Every entry comes from the pgAdmin 9.18 documentation; shortcuts can be changed in Preferences, so if a key does nothing, check your Keyboard shortcuts settings.

Steps and facts checked 8 October 2026 against the vendor's official documentation. Versions covered: pgAdmin 4 v9.18. Next review due April 2027. Menus, shortcuts and prices change between releases; check the vendor's documentation for your version.
Short answer
  • Run a script with F5, run only the statement at the cursor with Alt + F5 (Option + F5 on Mac), and cancel with Alt + Shift + Q.
  • F7 shows EXPLAIN and Shift + F7 EXPLAIN ANALYZE; F8 saves the results to a file.
  • Ctrl + Space triggers auto-complete, Ctrl + / toggles comments and Ctrl + K formats SQL (Cmd on Mac).
  • Shortcuts are configurable under File > Preferences (pgAdmin 4 > Preferences in desktop mode on Mac) in each tool's Keyboard shortcuts panel.
How we know: Research-based: shortcuts were copied from the pgAdmin 4 9.18 Keyboard Shortcuts page, with Execute query and Format SQL from the Query Tool Toolbar page, on 8 October 2026. They are the documented defaults; we have not checked each key on every platform, and a customised installation may differ.

pgAdmin shortcuts in the Query Tool

These are the pgAdmin shortcuts most people need: running, explaining and cancelling queries, and working with the result grid.

Query Tool shortcuts (pgAdmin 4 9.18)
ActionWindows / LinuxmacOS
Execute scriptF5F5
Execute query at cursorAlt + F5Option + F5
Cancel queryAlt + Shift + QOption + Shift + Q
EXPLAIN queryF7F7
EXPLAIN ANALYZE queryShift + F7Shift + F7
Execute optionsAlt + Shift + XOption + Shift + X
CommitShift + Ctrl + MShift + Ctrl + M
RollbackShift + Ctrl + RShift + Ctrl + R
Download (save) resultsF8F8
Open fileCtrl + OCmd + O
Save fileCtrl + SCmd + S
Clear queryCtrl + Alt + LCtrl + Option + L
Format SQLCtrl + KCmd + K
Edit optionsAlt + Shift + NOption + Shift + N
Sort/FilterAlt + Shift + FOption + Shift + F
Filter optionsAlt + Shift + IOption + Shift + I
Toggle case of selected textShift + Ctrl + UShift + Ctrl + U

Result grid and data editing

Data Output grid shortcuts
ActionWindows / LinuxmacOS
Add rowAlt + Ctrl + AOption + Ctrl + A
Copy rowsCtrl + CCmd + C
Paste rowsAlt + Shift + POption + Shift + P
Delete rowsAlt + Shift + DOption + Shift + D
Save data changesF6F6
Next tabShift + Alt + ]Shift + Option + ]
Previous tabShift + Alt + [Shift + Option + [
Switch panelShift + Alt + TabShift + Option + Tab

SQL editor shortcuts

Shortcuts in the syntax-highlighting SQL editors
ActionWindows / LinuxmacOS
Auto-completeCtrl + SpaceCtrl + Space
Comment/uncomment code (block)Ctrl + /Cmd + /
FindCtrl + FCmd + F
ReplaceCtrl + Shift + FOption + Cmd + F
Go to line, columnCtrl + LCmd + L
Indent selected textTabTab
Un-indent selected textShift + TabShift + Tab
Undo last editCtrl + ZCmd + Z
Redo last edit undoneCtrl + RCmd + R
Select allCtrl + ACmd + A
Copy / pasteCtrl + C / Ctrl + VCmd + C / Cmd + V
Move to beginning of lineAlt + LeftOption + Left
Move to end of lineAlt + RightOption + Right
Move left one wordCtrl + Alt + LeftCmd + Option + Left
Move right one wordCtrl + Alt + RightCmd + Option + Right

Main window and Object Explorer

Main browser window shortcuts
ActionWindows / LinuxmacOS
Open Query ToolShift + Alt + QShift + Option + Q
View dataShift + Alt + VShift + Option + V
Focus Object ExplorerShift + Alt + BShift + Option + B
Toggle (collapse) Object ExplorerCtrl + Alt + BCtrl + Option + B
Refresh Object ExplorerF5F5
Create objectShift + Alt + NShift + Option + N
Edit object propertiesShift + Alt + EShift + Option + E
Delete objectShift + Alt + DShift + Option + D
Search objectsShift + Alt + SShift + Option + S
Quick SearchShift + Ctrl + FShift + Ctrl + F
Direct debuggingShift + Alt + GShift + Option + G
Tabbed panel forward / backwardShift + Alt + ] / [Shift + Option + ] / [
Close tab panelShift + Alt + WShift + Ctrl + W
File / Object / Tools / Help menuShift + Alt + F / O / L / HShift + Option + F / O / L / H

ERD Tool shortcuts

ERD Tool shortcuts
ActionWindows / LinuxmacOS
Add tableCtrl + Alt + ACtrl + Option + A
Edit tableCtrl + Alt + ECtrl + Option + E
Clone tableCtrl + Alt + CCtrl + Option + C
Drop tableCtrl + Alt + DCtrl + Option + D
One to many linkCtrl + Alt + OCtrl + Option + O
Many to many linkCtrl + Alt + MCtrl + Option + M
Add/edit noteCtrl + Alt + NCtrl + Option + N
Auto alignCtrl + Alt + LCtrl + Option + L
Show more/fewer detailsCtrl + Alt + TCtrl + Option + T
Generate SQLCtrl + Alt + SCtrl + Option + S
Download imageCtrl + Alt + ICtrl + Option + I
Open / save / save as projectCtrl + O / Ctrl + S / Shift + Ctrl + SCtrl + O / Ctrl + S / Shift + Ctrl + S
Zoom in / zoom outShift + Alt + + / -Shift + Option + + / -
Zoom to fitShift + Alt + FShift + Option + F

Change pgAdmin shortcuts and fix conflicts

Open File > Preferences in web mode, or Preferences/settings on the pgAdmin 4 application menu in desktop mode. Each tool node (Browser, Query Tool, Debugger, ERD Tool, Editor) has its own Keyboard shortcuts panel where you pick the modifier keys and the key for each action. The Debugger has its own set (for example Alt + Shift + T to toggle a breakpoint and Alt + Shift + I to step into), listed on the same documentation page.

A few documentation pages list different defaults for the same action (for example the ERD Tool page gives Alt + Shift + D for Show details, and the Query Tool Toolbar page gives Alt + F for Filter). This sheet follows the Keyboard Shortcuts page; your Preferences show the keys your installation actually uses.

Next: create diagrams with the pgAdmin ER diagram tutorial, export results with the export guide, or read the pgAdmin review.

Frequently asked questions

How do I run a query in pgAdmin with the keyboard?

Press F5 to execute the whole script, or Alt + F5 (Option + F5 on Mac) to execute only the query where the cursor is. Highlight part of the script first to run just that selection.

What is the pgAdmin shortcut for auto-complete?

Ctrl + Space on all platforms. If auto-complete on typing is switched off in Preferences, this shortcut is the only way to open it.

How do I comment out lines in pgAdmin?

Select the lines and press Ctrl + / (Cmd + / on Mac) to comment or uncomment them.

How do I format SQL in pgAdmin?

Press Ctrl + K (Cmd + K on Mac) or choose Format SQL from the Edit menu in the Query Tool. It formats the selection, or the whole query if nothing is selected.

Can I change pgAdmin keyboard shortcuts?

Yes. Each tool has a Keyboard shortcuts panel in Preferences where you can set the modifiers and key for each action.

Sources

Checked 8 October 2026.

How we research tool guides: our editorial method. CodeWithSQL earns nothing from the vendors mentioned.

Still choosing a SQL client?

Read the full reviews, or compare tools side by side.