MongoDB Compass and mongosh keyboard shortcuts
Compass has keys for its tabs, its aggregation focus mode and the shell built into it, and mongosh, MongoDB's command-line shell, has a handful of its own. Where MongoDB's shortcuts page and the shipping app disagree, the keys here are the ones Compass 1.51 uses and shows, and the notes say which. mongosh runs in a terminal, so its keys are the same on Windows and a Mac.
Checked against MongoDB Docs — Compass: Keyboard Shortcuts, MongoDB Docs — Compass release notes, Compass repository, v1.51.0 — application menu, Compass repository, v1.51.0 — workspace tab keys, Compass repository, v1.51.0 — aggregation focus mode keys, Compass repository, v1.51.0 — the embedded shell's keyboard shortcuts list, Compass repository, v1.51.0 — editor keys, MongoDB Docs — mongosh: Run Commands, MongoDB Docs — mongosh: Use an Editor for Commands and MongoDB Docs — mongosh: Configure Settings. Version: MongoDB Compass 1.51.0 and mongosh 2.12.0, default keys.
Showing the Windows keyboard. Showing the Mac keyboard.
The top 16 are the MongoDB shortcuts this page marks as the ones to learn first, in the order they appear here. The drill asks the marked ones first too, shuffled. Or tick your own and print those.
The 16 to learn first: the shortcuts the MongoDB page marks as the ones to learn first, in the order they appear on it.
Your own sheet: the MongoDB shortcuts you ticked.
Compass: windows, views and settings
Practise theseCompass tabs
Queries, pipelines and focus mode
The four focus-mode keys work while an aggregation stage is open in focus mode, and Compass shows each one beside its button.
Practise theseThe shell inside Compass
Compass has mongosh built in. These are the editing keys its own shell help lists; Ctrl stays Ctrl on a Mac except for clearing the screen.
Practise thesemongosh in a terminal
The MongoDB Shell on its own, in any terminal. Ctrl is Ctrl on a Mac.
Practise these.editoreditNext
Terminal
Almost everything here comes from readline, the line editor that bash and zsh both use.
VS Code
VS Code has more shortcuts than anyone can hold in their head, so this page is ordered by how often you would actually reach for one.
Jupyter
A Jupyter notebook has two modes: in edit mode your keys type into a cell, and in command mode single letters such as A, B and D then D act on whole cells.
RStudio
In RStudio the keys that matter most send code to R: a line, a chunk, a section or the whole file, each with its own shortcut.
MongoDB Compass and mongosh keyboard shortcuts — comboshelf.com. Checked 27 September 2026 against MongoDB Docs — Compass: Keyboard Shortcuts.