- The five to learn first: Ctrl+Enter (run), F4 (open data or source), Ctrl+Shift+F10 (query console), Ctrl+Alt+Shift+S (data source settings) and double Shift (Search Everywhere). On macOS, Cmd replaces Ctrl for most of them.
- In a data editor, Ctrl+Enter submits your edits; Ctrl+Alt+Shift+Enter submits and commits in manual transaction mode.
- Shortcuts are for the default Windows and macOS keymaps. On Linux, check which keymap DataGrip selected in Settings | Keymap.
- Find Action (Ctrl+Shift+A, Cmd+Shift+A on macOS) finds any command by name and shows its current shortcut.
How to read these DataGrip shortcuts
These DataGrip shortcuts use the default keymaps that JetBrains documents: Windows and macOS. On macOS, Option is the Alt key. JetBrains publishes predefined keymap references for Windows and macOS only. On Linux, DataGrip suggests a keymap based on your environment, and GNOME and KDE keymaps are available as plugins, so confirm yours under Settings | Keymap.
All default shortcuts can be changed, and JetBrains warns that with a non-English keyboard layout some shortcuts may not be detected correctly. A PDF reference card for the default keymap is also available in DataGrip under Help | Keyboard Shortcuts PDF.
Run SQL and work with query consoles
| Action | Windows | macOS |
|---|---|---|
| Execute statement (in a query console) | Ctrl+Enter | Cmd+Enter |
| Cancel a running statement | Ctrl+F2 | Cmd+F2 |
| Open a query console for the selected data source | Ctrl+Shift+F10 | Cmd+Shift+F10 |
| New query console for the selected data source | Ctrl+Shift+Q | Cmd+Shift+L |
| Browse query history | Ctrl+Alt+E | Cmd+Option+E |
| Jump to source or edit data (opens a console on a data source) | F4 | Cmd+Down |
| Recent files and consoles | Ctrl+E | Cmd+E |
| Find Action (any command by name) | Ctrl+Shift+A | Cmd+Shift+A |
Data editor and query results
| Action | Windows | macOS |
|---|---|---|
| Submit changes to the database | Ctrl+Enter | Cmd+Enter |
| Submit and commit (manual transaction mode) | Ctrl+Alt+Shift+Enter | Cmd+Option+Shift+Enter |
| Open the cell in the value editor | Shift+Enter | Shift+Enter |
| Edit the cell | Enter | Enter |
| Set cell to NULL | Ctrl+Alt+N | Cmd+Option+N |
| Set cell to DEFAULT | Ctrl+Alt+D | Cmd+Option+D |
| Next page of results | Ctrl+Alt+Down | Cmd+Option+Down |
| Previous page of results | Ctrl+Alt+Up | Cmd+Option+Up |
| Reload page | Ctrl+F5 | Cmd+R |
| Column list | Ctrl+F12 | Cmd+F12 |
| Copy aggregation result (SUM by default) | Ctrl+Shift+C | Cmd+Shift+C |
| Copy selection | Ctrl+C | Cmd+C |
| Full-text search in a database | Ctrl+Alt+Shift+F | Cmd+Option+Shift+F |
Database Explorer and database objects
| Action | Windows | macOS |
|---|---|---|
| Data source properties (Data Sources and Drivers dialog) | Ctrl+Alt+Shift+S | Cmd+; |
| Refresh the selected element | Ctrl+F5 | Cmd+R |
| Force refresh (clear cached metadata and reload) | Ctrl+Shift+F5 | Cmd+Option+Shift+R |
| SQL Generator (DDL for an object) | Ctrl+Alt+G | Cmd+Option+G |
| Generate DDL to clipboard | Ctrl+Alt+Shift+G | Cmd+Option+Shift+G |
| Generate DDL to query console | Ctrl+Alt+Shift+B | Cmd+Option+Shift+B |
| Go to DDL of the object at the caret | Ctrl+B | Cmd+B |
| Modify object (opens the Modify dialog) | Ctrl+F6 | Cmd+F6 |
| Select the object in the Database Explorer | Alt+Shift+B | Option+Shift+B |
| Compare schema structure of two objects | Ctrl+D | Cmd+D |
| Show diagram in an editor tab | Ctrl+Alt+Shift+U | Cmd+Option+Shift+U |
| Show diagram in a popup | Ctrl+Alt+U | Cmd+Option+U |
| New object (table, schema, routine and so on) | Alt+Insert | Cmd+N |
| Rename | Shift+F6 | Shift+F6 |
| Copy reference (qualified name) | Ctrl+Alt+Shift+C | Cmd+Option+Shift+C |
Editing SQL
On Windows, the first time you press Ctrl+Y DataGrip asks whether it should delete the line or redo; you can change the choice later in Settings | Keymap.
| Action | Windows | macOS |
|---|---|---|
| Basic completion | Ctrl+Space | Ctrl+Space |
| Show context actions and quick-fixes | Alt+Enter | Option+Enter |
| Reformat code | Ctrl+Alt+L | Cmd+Option+L |
| Comment or uncomment line | Ctrl+/ | Cmd+/ |
| Block comment | Ctrl+Shift+/ | Cmd+Option+/ |
| Duplicate line or selection | Ctrl+D | Cmd+D |
| Delete line | Ctrl+Y | Cmd+Backspace |
| Extend selection | Ctrl+W | Option+Up |
| Shrink selection | Ctrl+Shift+W | Option+Down |
| Move line up / down | Alt+Shift+Up / Down | Option+Shift+Up / Down |
| Add selection for next occurrence | Alt+J | Ctrl+G |
| Select all occurrences | Ctrl+Alt+Shift+J | Cmd+Ctrl+G |
| Quick documentation | Ctrl+Q | F1 |
| Parameter info | Ctrl+P | Cmd+P |
| Undo / redo | Ctrl+Z / Ctrl+Shift+Z | Cmd+Z / Cmd+Shift+Z |
Search, navigation and tool windows
| Action | Windows | macOS |
|---|---|---|
| Search Everywhere | Double Shift | Double Shift |
| Find in the current file | Ctrl+F | Cmd+F |
| Replace | Ctrl+R | Cmd+R |
| Find in files | Ctrl+Shift+F | Cmd+Shift+F |
| Go to line | Ctrl+G | Cmd+L |
| Find usages | Alt+F7 | Option+F7 |
| Next / previous highlighted error | F2 / Shift+F2 | F2 / Shift+F2 |
| Back / forward | Ctrl+Alt+Left / Right | Cmd+[ / Cmd+] |
| Settings | Ctrl+Alt+S | Cmd+, |
| Database Explorer tool window | No default shortcut | Cmd+1 |
| Files tool window | Alt+2 | Cmd+2 |
| Services tool window (query results) | Alt+8 | Cmd+8 |
| Hide all tool windows | Ctrl+Shift+F12 | Cmd+Shift+F12 |
Frequently asked questions
What is the shortcut to run a query in DataGrip?
Ctrl+Enter on Windows and Cmd+Enter on macOS. If several statements are present, DataGrip asks which one to run and always offers an option to run them all. Ctrl+F2 (Cmd+F2) cancels a running statement.
How do I open a new query console in DataGrip?
Select a data source and press Ctrl+Shift+F10 (Cmd+Shift+F10 on macOS) and choose New Query Console, or press Ctrl+Shift+Q on Windows.
How do I change a DataGrip shortcut?
Open Settings | Keymap (Ctrl+Alt+S, Cmd+, on macOS). You can also press Alt+Enter on an action in the Find Action list to add or change its shortcut.
Is there a printable DataGrip shortcuts PDF?
Yes. JetBrains provides a default keymap reference card, available in DataGrip under Help | Keyboard Shortcuts PDF. This page also has a print button.
Can I use shortcuts from another editor in DataGrip?
DataGrip can switch to keymaps that match other editors, such as Eclipse or NetBeans, and more keymaps are available as plugins. Choose one in Settings | Keymap.
Sources
- DataGrip documentation: Keyboard shortcuts
- DataGrip documentation: Predefined Windows keymap
- DataGrip documentation: Predefined macOS keymap
- DataGrip documentation: Run queries
- DataGrip documentation: Query consoles
- DataGrip documentation: Data editor and viewer
- DataGrip documentation: Database Explorer
Checked 8 October 2026.
How we research tool guides: our editorial method. CodeWithSQL earns nothing from the vendors mentioned.