Keyboard Shortcuts & Productivity Guide

Guides
Last updated: February 16, 2026

Welcome to the HarborDB keyboard shortcuts guide. Mastering these shortcuts will transform your PostgreSQL workflow, allowing you to work faster, reduce mouse dependency, and increase your overall productivity. Whether you're writing complex queries or managing multiple database connections, these shortcuts will help you work like a pro.

Why Use Keyboard Shortcuts?

Keyboard shortcuts offer several advantages:

  • Speed: Execute actions 2-5x faster than using menus
  • Focus: Keep your hands on the keyboard while writing queries
  • Reduced Fatigue: Minimize repetitive mouse movements
  • Professional Workflow: Work more efficiently like experienced database professionals

Quick Reference Cheat Sheet

| Category | Shortcut | Action | Frequency | | ------------------- | ------------- | ------------------ | --------- | | Query Execution | ⌘ + R | Run query | ★★★★★ | | Query Execution | ⌘ + . | Cancel query | ★★★★☆ | | Navigation | ⌘ + T | New query tab | ★★★★★ | | Navigation | ⌘ + W | Close current tab | ★★★★★ | | Navigation | ⌘ + B | Toggle sidebar | ★★★★☆ | | Editing | ⌘ + / | Toggle comment | ★★★★★ | | Editing | Tab | Indent selection | ★★★★★ | | Editing | Shift + Tab | Unindent selection | ★★★★★ | | File Operations | ⌘ + S | Save query | ★★★★☆ | | File Operations | ⌘ + E | Export results | ★★★★☆ | | Search | ⌘ + F | Find in query | ★★★★★ | | Search | ⌘ + G | Find next | ★★★★☆ |

Navigation Shortcuts

Query Editor Navigation

| Shortcut | Action | Description | | ----------------------- | ------------------- | ------------------------------------- | | ⌘ + T | New Query Tab | Open a fresh SQL editor tab | | ⌘ + W | Close Tab | Close current query tab | | ⌘ + Shift + T | Reopen Closed Tab | Restore most recently closed tab | | ⌘ + 1 through ⌘ + 9 | Switch to Tab | Jump to specific tab number | | ⌘ + Option + ←/→ | Previous/Next Tab | Navigate between tabs | | ⌘ + B | Toggle Sidebar | Show/hide database navigation sidebar | | ⌘ + Option + S | Toggle Results Pane | Show/hide query results area |

Database Navigation

| Shortcut | Action | Description | | -------------------- | ------------------- | ----------------------------------------------- | | ⌘ + F (in sidebar) | Search Objects | Filter database objects in sidebar | | ↑/↓ | Navigate Objects | Move through database objects | | | Expand Object | Expand database/schema/table | | | Collapse Object | Collapse expanded object | | Space | Quick Preview | Preview table structure without expanding | | ⌘ + Click (table) | Select Top 100 | Open query with SELECT * FROM table LIMIT 100 | | ⌥ + Click (table) | Open Structure View | View detailed table structure |

Query Execution Shortcuts

Basic Execution

| Shortcut | Action | When to Use | | --------------- | ------------- | ----------------------------------- | | ⌘ + R | Run Query | Execute entire query in editor | | ⌘ + Shift + R | Run Selection | Execute only highlighted text | | ⌘ + . | Cancel Query | Stop long-running query | | ⌘ + K | Clear Editor | Remove all text from current editor | | ⌘ + L | Focus Results | Switch focus to results pane |

Advanced Execution

| Shortcut | Action | Description | | ---------------- | --------------- | ------------------------------------- | | ⌘ + Shift + E | Explain Query | Show execution plan without running | | ⌘ + Option + R | Run and Explain | Execute query and show execution plan | | ⌘ + Shift + A | Run All Tabs | Execute queries in all open tabs | | ⌘ + Option + . | Cancel All | Cancel all running queries |

Text Editing Shortcuts

Basic Text Manipulation

| Shortcut | Action | Equivalent Menu Item | | ----------------- | ------------------ | ------------------------ | | ⌘ + / | Toggle Comment | Format → Toggle Comment | | Tab | Indent Selection | Format → Increase Indent | | Shift + Tab | Unindent Selection | Format → Decrease Indent | | ⌘ + ] | Increase Indent | Format → Increase Indent | | ⌘ + [ | Decrease Indent | Format → Decrease Indent | | ⌘ + D | Duplicate Line | Edit → Duplicate Line | | ⌘ + Shift + D | Delete Line | Edit → Delete Line | | ⌘ + Shift + ↑/↓ | Move Line Up/Down | Edit → Move Line Up/Down |

Advanced Editing

| Shortcut | Action | Description | | ---------------- | ---------------------- | ------------------------------------------------ | | ⌘ + Option + L | Format SQL | Auto-format SQL query | | ⌘ + Shift + F | Find in Files | Search across all saved queries | | ⌘ + Option + F | Replace in Query | Find and replace text | | ⌘ + Shift + L | Select All Occurrences | Select all instances of current word | | F2 | Rename Symbol | Rename table/column reference (with refactoring) |

Selection and Movement

| Shortcut | Action | Description | | ----------------- | --------------------- | ------------------------------------ | | ⌘ + ←/→ | Beginning/End of Line | Jump to start or end of line | | ⌘ + ↑/↓ | Top/Bottom of Editor | Jump to first or last line | | ⌥ + ←/→ | Previous/Next Word | Move by word instead of character | | ⌘ + Shift + ←/→ | Select to Line End | Select text to beginning/end of line | | ⌥ + Shift + ←/→ | Select by Word | Select text word by word | | ⌘ + L | Select Line | Select entire current line |

Results and Data Manipulation

Results Navigation

| Shortcut | Action | Description | | --------------------- | -------------------- | -------------------------------------- | | Tab / Shift + Tab | Cell Navigation | Move between cells in results | | ↑/↓/←/→ | Cell Navigation | Arrow key navigation in results | | ⌘ + A | Select All Rows | Select all rows in results | | Space | Toggle Row Selection | Select/deselect current row | | ⌘ + C | Copy Cell | Copy selected cell to clipboard | | ⌘ + Shift + C | Copy Row as JSON | Copy entire row as JSON format | | Enter | Edit Cell | Enter cell edit mode (for local edits) |

Data Export

| Shortcut | Action | Description | | ---------------- | -------------- | -------------------------------------- | | ⌘ + E | Export Results | Open export dialog for current results | | ⌘ + Shift + E | Quick Export | Export with last used settings | | ⌘ + Option + C | Copy as CSV | Copy results as CSV to clipboard | | ⌘ + Option + J | Copy as JSON | Copy results as JSON to clipboard |

File and Connection Management

File Operations

| Shortcut | Action | Description | | --------------- | --------------- | ---------------------------------- | | ⌘ + S | Save Query | Save current query to file | | ⌘ + Shift + S | Save Query As | Save query with new name | | ⌘ + O | Open Query File | Open saved query from disk | | ⌘ + N | New Query | Create new query (same as ⌘ + T) | | ⌘ + P | Print Results | Print current results | | ⌘ + Shift + P | Quick Print | Print with default settings |

Connection Management

| Shortcut | Action | Description | | ---------------- | ------------------ | ------------------------------------- | | ⌘ + Shift + N | New Connection | Open new connection dialog | | ⌘ + Option + C | Connect/Disconnect | Toggle connection for current tab | | ⌘ + Shift + C | Copy Connection | Duplicate current connection settings | | ⌘ + , | Preferences | Open HarborDB preferences |

Window and Interface Management

Window Control

| Shortcut | Action | Description | | ---------------- | ----------------- | ---------------------------------- | | ⌘ + M | Minimize Window | Minimize HarborDB window | | ⌘ + Option + M | Minimize All | Minimize all HarborDB windows | | ⌘ + H | Hide HarborDB | Hide HarborDB application | | ⌘ + Option + H | Hide Others | Hide all other applications | | ⌘ + Q | Quit HarborDB | Exit application (prompts to save) | | ⌘ + Option + W | Close All Windows | Close all open windows |

Layout Management

| Shortcut | Action | Description | | ---------------- | -------------- | ------------------------------ | | ⌘ + Option + 1 | Default Layout | Reset to default window layout | | ⌘ + Option + 2 | Editor Focus | Maximize editor pane | | ⌘ + Option + 3 | Results Focus | Maximize results pane | | ⌘ + Option + 4 | Sidebar Focus | Maximize navigation sidebar | | ⌘ + 0 | Zoom Reset | Reset zoom level to 100% | | ⌘ + = | Zoom In | Increase editor font size | | ⌘ + - | Zoom Out | Decrease editor font size |

Touch Bar Shortcuts (MacBook Pro)

If your Mac has a Touch Bar, HarborDB provides contextual shortcuts:

Editor Mode Touch Bar

  • Run Button: Execute current query
  • Cancel Button: Stop running query
  • Format Button: Auto-format SQL
  • Save Button: Save current query
  • Tab Switcher: Switch between query tabs

Results Mode Touch Bar

  • Export Button: Quick export options
  • Copy Button: Copy selection
  • Filter Button: Apply filters to results
  • Sort Buttons: Sort ascending/descending

Connection Mode Touch Bar

  • Connect/Disconnect: Toggle connection
  • Test Connection: Test current connection
  • New Query: Create new query for connection

Customizing Shortcuts

Viewing Current Shortcuts

To see all available shortcuts:

  1. Go to HarborDB → Preferences → Keyboard
  2. View categorized list of all shortcuts
  3. Search for specific actions

Creating Custom Shortcuts

  1. Open System Settings → Keyboard → Keyboard Shortcuts
  2. Select App Shortcuts from sidebar
  3. Click + to add new shortcut
  4. Choose HarborDB from application list
  5. Enter exact menu item name
  6. Assign your preferred shortcut

Recommended Custom Shortcuts

| Action | Recommended Shortcut | Why It's Useful | | ------------------------- | -------------------- | ------------------------------- | | Format SQL | ⌘ + Shift + F | Matches other editors | | Switch Connection | ⌘ + Shift + C | Quick connection changes | | Toggle Line Numbers | ⌘ + Shift + L | Show/hide line numbers | | Execute Current Statement | ⌘ + Enter | Execute SQL statement at cursor |

Productivity Tips and Workflows

Efficient Query Writing Workflow

  1. Start with ⌘ + N - New query tab
  2. Write query - Use auto-complete (Tab to accept)
  3. Format with ⌘ + Option + L - Clean up SQL
  4. Test with ⌘ + Shift + R - Run selection first
  5. Execute with ⌘ + R - Run full query
  6. Export with ⌘ + E - Save results
  7. Save with ⌘ + S - Preserve query

Multi-Connection Workflow

  1. ⌘ + Shift + N - Create new connection
  2. ⌘ + T - New tab for each database
  3. ⌘ + 1/⌘ + 2 - Switch between environments
  4. ⌘ + Option + C - Toggle connections as needed

Data Analysis Workflow

  1. ⌘ + Click table - Quick SELECT
  2. ⌘ + R - Execute to see data
  3. ⌘ + F in results - Find specific values
  4. ⌘ + E - Export for further analysis
  5. ⌘ + Shift + S - Save analysis query

Troubleshooting Shortcut Issues

Common Problems and Solutions

Shortcut not working

  1. Check for conflicts in System Settings → Keyboard
  2. Restart HarborDB
  3. Verify shortcut in Preferences → Keyboard
  4. Check if modifier keys are working (test in TextEdit)

Touch Bar not showing HarborDB controls

  1. Ensure Touch Bar is enabled in System Settings
  2. Restart HarborDB
  3. Check "Touch Bar shows" setting in System Settings

International keyboard layout issues

  1. Some layouts map keys differently
  2. Use character viewer (⌘ + Control + Space) to see actual keys
  3. Consider using US keyboard layout for development

Resetting to Defaults

To restore all shortcuts to factory defaults:

  1. Go to HarborDB → Preferences → Keyboard
  2. Click Restore Defaults button
  3. Restart HarborDB for changes to take effect

Learning and Practice Tips

Start Small

Begin with 5 essential shortcuts:

  1. ⌘ + R - Run query
  2. ⌘ + T - New tab
  3. ⌘ + W - Close tab
  4. ⌘ + / - Toggle comment
  5. ⌘ + F - Find in query

Use Gradually

  • Week 1: Master query execution shortcuts
  • Week 2: Add editing shortcuts
  • Week 3: Incorporate navigation shortcuts
  • Week 4: Learn advanced productivity shortcuts

Create Cheat Sheets

  1. Print the quick reference table
  2. Keep it near your workstation
  3. Use sticky notes for your most-used shortcuts
  4. Gradually remove references as you memorize

Practice Exercises

  1. Write a query using only keyboard navigation
  2. Format a messy SQL query using only shortcuts
  3. Export results without touching the mouse
  4. Manage 3 query tabs using only keyboard

Advanced Power User Tips

Voice Control Integration

For accessibility or hands-free operation:

  1. Enable Voice Control in System Settings
  2. Create custom commands for HarborDB actions
  3. Use phrases like "Run query" or "New tab"

Automator Workflows

Create automated sequences:

  1. Open Automator
  2. Create "Quick Action" for HarborDB
  3. Record common shortcut sequences
  4. Assign to global shortcut

Third-Party Tools

Enhance keyboard functionality with:

  • Karabiner-Elements: Remap keys globally
  • BetterTouchTool: Custom Touch Bar controls
  • Alfred: Quick HarborDB actions via keyboard

Getting Help

Finding More Shortcuts

  1. Hover over menu items to see shortcuts
  2. Check HarborDB → Preferences → Keyboard
  3. Visit HarborDB Documentation for updates
  4. Check release notes for new shortcuts

Reporting Issues

If a shortcut doesn't work as expected:

  1. Note the exact steps to reproduce
  2. Check HarborDB version (HarborDB → About HarborDB)
  3. Check macOS version (Apple menu → About This Mac)
  4. Contact support with details

Requesting New Shortcuts

Have an idea for a useful shortcut?

  1. Check if it already exists in Preferences
  2. Use System Settings to create custom shortcut
  3. Suggest new shortcuts via Contact Support

Was this helpful?

Help us improve this documentation by providing feedback.