# Keyboard shortcuts Every key Atlas reacts to, by where the keyboard focus is. On a Mac, {kbd}`Cmd` works wherever {kbd}`Ctrl` is listed with "or {kbd}`Cmd`". :::{note} Dialogs (Add mapping, Delete, Pull, Restore and the others) don't close with {kbd}`Esc`. Close them with their **×** or **Cancel** button, or by clicking the dimmed area around them. ::: (shortcuts-workspace)= ## Workspace | Keys | What it does | |---|---| | {kbd}`Ctrl+S` or {kbd}`Cmd+S` | Saves the open model when **Auto save** is off and there are unsaved edits. With nothing to save, Atlas shows "No unsaved changes". With **Auto save** on, a pending save runs at once and Atlas shows "Auto-save is on — edits save automatically". Works anywhere on the Workspace page. | | {kbd}`Esc` | Closes the editing sheet of the selected mapping, and the keyboard moves to the outline. It doesn't close the sheet while a text field, a select or the code editor has the focus (there {kbd}`Esc` belongs to the field, for example to close its suggestions): click the mapping in the outline first, or use the sheet's **✕**. | (shortcuts-outline)= ## Outline (the mapping list) Click a mapping in the outline to give it the keyboard. The hint under the outline sums this up: "Select a mapping to edit it · {kbd}`↑`{kbd}`↓` then {kbd}`Enter` · drag or {kbd}`Alt`+arrows to move". | Keys | What it does | |---|---| | {kbd}`↓` / {kbd}`↑` | Selects the next / previous visible mapping (and opens its editing sheet). | | {kbd}`→` | Expands the selected mapping; if it is already expanded, selects its first child. | | {kbd}`←` | Collapses the selected mapping; if it is already collapsed, selects its parent. | | {kbd}`Home` / {kbd}`End` | Selects the first / last visible mapping. | | {kbd}`Enter` | Puts the cursor in the selected mapping's **name** field with the name selected, so you can rename it. | | {kbd}`Delete` or {kbd}`Backspace` | Deletes the selected mapping. A toast offers **Undo**. | | {kbd}`Ctrl+D` or {kbd}`Cmd+D` | Duplicates the selected mapping (the browser's bookmark shortcut is suppressed). A toast offers **Undo**. | | {kbd}`Alt+↑` / {kbd}`Alt+↓` | Moves the selected mapping one place up / down among its siblings. | | {kbd}`Alt+→` | Indents: the mapping becomes the last child (**Followed by**) of the sibling above it. | | {kbd}`Alt+←` | Outdents: the mapping moves out of its parent and lands right after it. | :::{warning} Moving ({kbd}`Alt`+arrows and dragging) is switched off while the outline is filtered. Clear the filter first. {kbd}`Alt+←` never takes you back a page in the browser while the outline has the focus. ::: **Undo** covers only the last delete, move or duplicate, and only while its toast is shown. There is no keyboard shortcut for it; click **Undo** in the toast. (shortcuts-filter)= ## Outline filter ("Filter by name or path") | Keys | What it does | |---|---| | {kbd}`Esc` | Clears the filter. | | {kbd}`↓` | Moves the keyboard from the filter into the outline. | (shortcuts-row-menu)= ## The ⋯ menu of a mapping and "Move to…" | Keys | What it does | |---|---| | {kbd}`Esc` (menu) | Closes the ⋯ menu. | | {kbd}`↓` / {kbd}`↑` (Move to…) | Moves through the destinations. | | {kbd}`Enter` (Move to…) | Moves the mapping to the highlighted destination. | | {kbd}`Esc` (Move to…) | Goes back to the ⋯ menu (the back arrow says "Back (Esc)"). | (shortcuts-path-inputs)= ## Path fields with suggestions These keys work in every field that offers suggestions: FHIR and openEHR paths, manual paths, a condition's **Where**, field and type criteria, and **Slot archetype**. | Keys | What it does | |---|---| | {kbd}`Ctrl+Space` or {kbd}`Cmd+Space` | Opens the suggestions for what the cursor is on. An empty field opens them as soon as it gets the focus. | | {kbd}`↓` / {kbd}`↑` | Moves through the suggestions (wraps around at the ends). | | {kbd}`Enter` or {kbd}`Tab` | Takes the highlighted suggestion. | | {kbd}`Esc` | Closes the suggestions. | :::{tip} Suggestions that create something, such as "Create “” for …" or "New model for …" in **Slot archetype**, run only on {kbd}`Enter` or a click. {kbd}`Tab` on one of them just closes the list and moves on, so tabbing through a form never opens the **Create a model** wizard by accident. ::: (shortcuts-pickers)= ## Pickers and popovers | Where | Keys | What it does | |---|---|---| | **+ Property** menu of a mapping | {kbd}`Esc` | Closes the menu. | | Extension picker (**+ Ext** in the Profile view) | {kbd}`↓` / {kbd}`↑` | Moves through the extensions. | | | {kbd}`Enter` | Takes the highlighted extension. | | | {kbd}`Esc` | Cancels the picker. | | A translated value in the values preview (focus it with {kbd}`Tab`) | {kbd}`Enter` | Opens how the code was translated, as a click does. | | The translation peek | {kbd}`Esc` | Closes it. | | Name prompt ("Name the mapping" / "Add mapping") | {kbd}`Enter` | Confirms the name. | (shortcuts-code-view)= ## Code view and the other code editors The YAML editor of the Code view, the **Context mapper** editor and the raw YAML dialog of the Engine state page all use the same editor; the two example panes use it too. Besides the usual editing keys: | Keys | What it does | |---|---| | {kbd}`Ctrl+Space` | Opens the completions (in YAML: what the FHIR Connect schema allows at that spot). They also open as you type. | | {kbd}`Enter` | Takes the highlighted completion. | | {kbd}`Tab` / {kbd}`Shift+Tab` | Indents / unindents the line by two spaces. YAML doesn't allow tab characters, so the editor never inserts one. | | {kbd}`Ctrl+Z` / {kbd}`Ctrl+Y` (Mac: {kbd}`Cmd+Shift+Z`) | Undo / redo inside the editor. | | {kbd}`Ctrl+F` | Search (and replace) in the editor. | | {kbd}`Ctrl+/` | Comments the line in or out. | | {kbd}`Alt+↑` / {kbd}`Alt+↓` | Moves the line up / down. | | {kbd}`Ctrl+Shift+[` / {kbd}`Ctrl+Shift+]` (Mac: {kbd}`Cmd+Alt+[` / {kbd}`Cmd+Alt+]`) | Folds / unfolds the block at the cursor. | | {kbd}`Ctrl+Shift+M` | Opens the list of problems the editor found in the YAML; {kbd}`F8` jumps to the next one. | On a Mac use {kbd}`Cmd` instead of {kbd}`Ctrl` for the other keys; {kbd}`Ctrl+Space` stays {kbd}`Ctrl+Space`. :::{note} {kbd}`Ctrl+S` inside the Code view saves the model, like anywhere else on the Workspace page. ::: (shortcuts-state)= ## Engine state page | Where | Keys | What it does | |---|---|---| | Search box ("Search templates, model mappers, archetypes...") | {kbd}`Esc` | Clears the search. | | A template row (focus it with {kbd}`Tab`) | {kbd}`Enter` | Selects the template, as a click does. | | A model mapper row | {kbd}`Enter` | Opens the model mapper. | | A template's **⋯** menu | {kbd}`Esc` | Closes the menu. | ## Related - {doc}`/map/edit-in-workspace` - {doc}`/map/paths` - {doc}`/reference/screens/workspace`