SQLPro Keyboard Shortcuts

Posted by Kyle Hankinson


Most of the time you spend in a database client is spent in three places: the query editor, the results grid, and the connection sidebar. Moving between them with the mouse works, but it is the slowest way to do it. This article lists every keyboard shortcut SQLPro for MySQL ships with, notes which actions deliberately arrive unassigned, and shows how to rebind any of them.

Where the shortcuts live

On macOS, open Preferences (Cmd + ,) and choose Keyboard in the sidebar. Every shortcut listed below has its own row. Click the field beside an action, press the combination you want, and it is saved immediately. There is no Apply button.

To remove a binding, click the field and press the delete button that appears at its right edge. To restore an individual shortcut, clear it and reopen the window.

On Windows, open Preferences and choose Keyboard. The Windows build currently exposes a smaller set of rebindable actions than the macOS build; the table further down lists what is configurable today.

macOS defaults

Running queries

Action Default
Query execution Shift + Cmd + E
Query execution (secondary) not assigned
Format query Shift + Cmd + K
Comment/uncomment Cmd + -

Query execution (secondary) exists so you can bind a second key to the same action. A common setup is to leave the primary at Shift + Cmd + E and add Cmd + Return as the secondary, which matches the muscle memory from a lot of other tools.

Comment/uncomment works on the current line, or on every line touched by the selection. It uses -- followed by a space, which matters for MySQL, where a comment marker without trailing whitespace is not treated as a comment.

Connections and navigation

Action Default
Connect Shift + Cmd + C
Focus database tree Ctrl + D
Focus database tree search Ctrl + F
Previous tab Shift + Cmd + [
Next tab Shift + Cmd + ]

Ctrl + F jumps straight to the sidebar filter, which is usually faster than scrolling a large schema. Note that these two use Ctrl rather than Cmd, so they do not collide with the standard macOS find and duplicate shortcuts in the editor.

Alongside the tab shortcuts above, Cmd + 1 through Cmd + 9 switch directly to a tab by position. That behaviour is on by default and can be turned off with the checkbox in the same Keyboard preferences pane, which is worth doing if you would rather those keys stay free.

Results

Action Default
Hide/show query results Cmd + K
Find column Cmd + B
Toggle results/messages not assigned
Copy selected with headers as CSV not assigned
Export full result set as CSV not assigned
Export full result set as JSON not assigned
Export full result set as XML not assigned

Find column is the one people tend to miss. On a result set that is a hundred columns wide, Cmd + B beats horizontal scrolling.

The five unassigned actions here are the ones worth setting up first, because they have no default and are easy to reach for repeatedly. If you export the same result set shape every day, giving CSV export a binding removes several clicks each time.

Text editing

Action Default
Make uppercase not assigned
Make lowercase not assigned

Both are unassigned by default. They apply to the current selection in the editor.

Multiple cursors

Multi-cursor editing has its own set of keys, and they are not configurable:

  • Hold Option and drag the mouse up or down between lines
  • Cmd + Option + ↑/↓ to add cursors above or below
  • Shift + Option + I turns a multi-line selection into one cursor per line

Once several cursors are active, the usual text-movement keys apply to all of them at once: ←/→ by character, Option + ←/→ by word, adding Shift to any of those to select rather than move. Cmd + Delete deletes to the end of the next word from every cursor, and Option + Delete deletes to the end of the line.

Windows defaults

Action Default
Query execution Ctrl + Shift + E
Format query Ctrl + K
Hide/show query results Ctrl + R
Query history Ctrl + Shift + H

The first three are rebindable from Preferences > Keyboard. Query history has a working default but no row in the preferences pane yet, so it cannot currently be changed.

If you are coming from SQL Server Management Studio, the layout will feel close but not identical. Ctrl + K is format-query here rather than the first half of a chord, so the SSMS comment pair Ctrl + K, C and Ctrl + K, U do not carry over.

Picking bindings that stick

Two things are worth knowing before you rebind much.

Shortcuts are validated as you set them. If you choose a combination the system has already claimed, or one already used by another action in SQLPro for MySQL, the field will reject it rather than silently create a conflict. Reassigning an action to the combination it already has is allowed, so you can safely re-enter the same keys.

Your choices are stored per application rather than per connection, so a binding you set while working against Postgres applies just as well when you open a SQL Server connection later.

If a shortcut you want is missing

The list above is what exists today. If there is an action you reach for constantly and it has no row in the Keyboard pane, that is worth telling us about, because the pane is straightforward to extend and requests genuinely drive what gets added. The same goes for defaults that feel wrong for your platform.


About the author - Kyle Hankinson is the founder and sole developer of SQLPro for MySQL and the Hankinsoft Development suite of database tools. He has been building native macOS and iOS applications since 2010.

Try SQLPro for MySQL - A native MySQL and MariaDB client for macOS and iOS. No Java required.

Download Free Trial View Pricing Compare