# Keyboard shortcuts > The shortcuts worth learning, grouped by what you're doing. ⌘ on Mac is Ctrl on Windows and Linux unless a row says otherwise. Source: https://docs.querylab.io/getting-started/keyboard-shortcuts/ ## Running SQL | Action | Mac | Windows / Linux | | ------------------------ | ------------------------------------ | ------------------------------------------- | | Run query | `⌘ Enter` | `Ctrl Enter` | | Format SQL | `⇧ ⌘ F` | `Ctrl Shift F` | | Run diagnostics | `⇧ ⌘ D` | `Ctrl Shift D` | | Convert to pipe syntax | `⌥ ⌘ P` | `Ctrl Alt P` | | Convert from pipe syntax | `⌥ ⌘ S` | `Ctrl Alt S` | ## Getting around | Action | Mac | Windows / Linux | | ---------------- | ----------------------------------------- | -------------------------------------------- | | Command palette | `⌘ K` or `F1` | `Ctrl K` or `F1` | | Query history | `⇧ ⌘ H` | `Ctrl Shift H` | | Compare queries | `⇧ ⌘ C` | `Ctrl Shift C` | | Go to definition | `F12` | `F12` | | Peek definition | `⌘ F12` | `Ctrl F12` | | Find references | `⇧ F12` | `Shift F12` | | Rename symbol | `F2` | `F2` | ## Talking to Prism AI | Action | Mac | Windows / Linux | | ------------------------- | ------------------------------------ | ----------------------------------------- | | Toggle the Prism AI panel | `⌘ I` | `Ctrl I` | | Edit selected SQL with AI | `⌃ ⌘ I` | `Ctrl Win I` | ## Editing | Action | Mac | Windows / Linux | | ---------------------------- | ------------------------------------ | ------------------------------------------- | | Trigger completions | `⌃ Space` | `Ctrl Space` | | Accept ghost text | `Tab` | `Tab` | | Expand `SELECT *` to columns | `Tab` | `Tab` | | Toggle comment | `⌘ /` | `Ctrl /` | | lowercase selection | `⌥ ⌘ L` | `Ctrl Alt L` | | UPPERCASE selection | `⇧ ⌘ U` | `Ctrl Shift U` | `Tab` expands `SELECT *` (or `SELECT t.*`) when the caret is on the `*` and the query already has a `FROM` clause; elsewhere it indents. The same expansion is on the right-click menu. ## Managing tabs | Action | Mac | Windows / Linux | | ---------------- | ---------------------------------------------------- | --------------------------------------------------------- | | New query tab | `⌘ E` | `Ctrl E` | | New notebook tab | `⇧ ⌘ E` | `Ctrl Shift E` | | Close tab | `⌥ ⌘ W` or middle-click | `Ctrl Alt W` or middle-click | ## Exporting results | Action | Mac | Windows / Linux | | ---------------------------------------------------------------------------------------------------------- | ------------------------------------ | ------------------------------------------- | | Export to Sheets (update) | `⇧ ⌘ G` | `Ctrl Shift G` | | Export to Sheets (append) | `⇧ ⌘ A` | `Ctrl Shift A` | | Export dialog (_Export to Google Sheets..._; asks for Google Drive access first if it hasn't been granted) | `⇧ ⌘ X` | `Ctrl Shift X` | ## Zooming the desktop app Desktop app only. These are the View menu's accelerators; in the browser, use the browser's own zoom. | Action | Shortcut | | ---------- | ------------------------ | | Zoom in | `⌘ =` | | Zoom out | `⌘ −` | | Reset zoom | `⌘ 0` | > Every shortcut is also in the command palette: press `⌘` `K`, then type the action.