Help › Make Querlyn yours

Change keyboard shortcuts

Find the shortcut for any command, use the keymap of DataGrip, VS Code or TablePlus, and change the ones you want.

Querlyn 0.1.0 is not released yet. This help describes it ahead of release.

Every command in Querlyn can have a keyboard shortcut. Menus, tooltips, the command palette and this help all show the shortcut a command has on your computer, so what you read is what works.

Find a shortcut

Choose Help › Keyboard Shortcuts (⌘K ⌘S on macOS or Ctrl+K Ctrl+S on Windows and Linux), or use this link: Help › Keyboard Shortcuts.

The page lists every command with its shortcut, grouped the way the command palette names them. Commands that have no shortcut are listed too. Type in the filter to narrow the list:

TypeTo find
formatCommands with that word in their name
results gridShortcuts that work in the results grid
shift enterShortcuts that use those keys

Some shortcuts work in one place only, such as the SQL editor or the results grid, and the page says where. The same keys can do one thing in the editor and another in the results.

A shortcut in two parts, like the one for the Keyboard Shortcuts page itself, is pressed one part after the other: press the first, let go, and press the second.

Use the shortcuts of another tool

If your fingers know DataGrip, VS Code or TablePlus, choose that tool under Keyboard, Keymap in Settings. The change is immediate: shortcuts, menus, tooltips and the Keyboard Shortcuts page follow it. You can also choose from the command palette:

  • Command Palette › Preferences: Keymap: Querlyn, Querlyn's own shortcuts
  • Command Palette › Preferences: Keymap: DataGrip
  • Command Palette › Preferences: Keymap: VS Code
  • Command Palette › Preferences: Keymap: TablePlus

A keymap gives a Querlyn command the keys the tool's own published keymap gives the same action. Commands the tool has no keys for keep Querlyn's. The Keyboard Shortcuts page marks each shortcut that comes from the keymap with the tool's name. Your own shortcuts, set as described below, always win over a keymap.

DataGrip

Querlyn commandTakes the keys of DataGrip's
Edit › Format SQLReformat Code
View › Go to Tab or Saved Query…Recent Files
Query › Show DDL of the table selected in the sidebarGo to Declaration
Query › Open DataJump to Source
Query › Edit Structure…Modify Object
Query › Show ER DiagramShow Diagram
Query › RefreshRefresh
Query › Cancel QueryStop
View › Show Command PaletteFind Action
View › Focus Sidebar (macOS and Linux)Show Database Explorer
View › Toggle SidebarHide All Tool Windows
View › Show Query HistoryBrowse Query History
Edit › Replace in the editorReplace
Edit › Refactor › Rename… a name in SQLRename
Selection › Add Next OccurrenceAdd Selection for Next Occurrence
Selection › Select All OccurrencesSelect All Occurrences
Selection › Add Cursors to Line EndsAdd Caret to Each Line in Selection
Command Palette › Results: Set to NULLSet NULL
Query › Apply Pending Changes in the resultsSubmit
File › Close Tab, Window › Next Tab, Window › Previous Tab (Windows and Linux)Close, Select Next Tab, Select Previous Tab
Querlyn › Open Settings (Windows and Linux)Settings
Edit › Refactor › Refactor This… (Windows)Refactor This

Their keys were taken, and DataGrip has none for them, so with this keymap Query › Explain, Query › Toggle Auto-Commit and, on macOS, View › Focus Editor have no shortcut. They are still in the menus, the toolbars and the command palette.

VS Code

Querlyn's own shortcuts already follow VS Code's for the command palette, quick open, the sidebar, comments, multiple cursors, folding, find and replace, rename and tabs. The keymap adds:

Querlyn commandTakes the keys of VS Code's
View › Focus SidebarShow Explorer
Edit › Format SQLFormat Document
File › New QueryNew File
Selection › Add Cursor Above, Selection › Add Cursor Below (Windows)Insert Cursor Above, Insert Cursor Below

File › Export Results… has no shortcut with this keymap.

TablePlus

TablePlus lists its shortcuts for macOS only, so on Windows and Linux this keymap keeps Querlyn's own. On macOS:

Querlyn commandTakes the keys of TablePlus's
Edit › Format SQLBeautify
Query › Add Row in the resultsInsert a new row
File › New Connection…Open a new connection
View › Toggle Statement ConsoleToggle console log
Query › RefreshReload workspace
Window › Previous Tab, Window › Next TabNavigate to left tab, right tab
Query › Choose Database for This Tab…Switch database
Selection › Add Cursor Above, Selection › Add Cursor BelowAdd additional cursors above, below
Selection › Select All OccurrencesSelect all instances

Switching databases takes a key that starts several of Querlyn's two-part shortcuts, so with this keymap View › Fold All, View › Unfold All, View › Toggle Fold and Help › Keyboard Shortcuts have no shortcut.

Change a shortcut

Shortcuts are set in the settings file, settings.toml, under [keybindings]. The Settings tab says where the file is, at the bottom; see The settings file.

  1. Find the command on the Keyboard Shortcuts page. Its ID is under its name, for example view.toggle_sidebar.
  2. In settings.toml, add a line with the ID and the keys under [keybindings].
  3. Quit Querlyn and open it again. Shortcuts are read when Querlyn starts.
[keybindings]
"view.toggle_sidebar" = "primary+shift+y"
"editor.fold_all" = "primary+k primary+9"
"query.explain" = ""
  • Join the keys of a shortcut with +. Write primary for ⌘ on macOS or Ctrl on Windows and Linux, which is the main modifier key of your computer, and ctrl, alt and shift for the others.
  • For a shortcut in two parts, write both with a space between them.
  • An empty text, as in the last line, takes the shortcut away.

The Keyboard Shortcuts page marks a shortcut you changed with Changed.

To go back to a command's usual shortcut, delete its line.

When a shortcut does not work

Settings lists what is wrong with your shortcuts under Keyboard: an ID that is not a command, keys Querlyn cannot read, the same keys given to two commands, and keys that your operating system keeps for itself.

On macOS, the keys that ask the editor for suggestions (⌃Space on macOS or Ctrl+Space on Windows and Linux) may also be the keys that switch between input sources, and then macOS takes them first. Command Palette › Preferences: Show Keyboard Shortcut Conflicts says whether that is so on your computer and how to free the keys.

Help for Querlyn 0.1.0. All help topics