Key Bindings

Harlequin can only react to key presses that are sent to it from the Terminal it is running in. Some common key presses, like ctrl+enter, aren’t forwarded correctly by some terminals, or may be aliased to a different key or even a different sort of event.

If you don’t want to upgrade your terminal, you can use the following aliases, which should be supported everywhere (if not, open an issue):

  • Run query: use ctrl+j, not ctrl+enter.
  • Comment line: use ctrl+_ (underscore), not ctrl+/.
  • On a Mac: For all bindings, use ^ Control, not ⌘ Command.

See here for copy and paste.

Finally, Harlequin’s footer, which lists some of the currently-active key bindings, is clickable. If a binding isn’t working, you can click it in the footer to take the same action.

Enabling Key Bindings in VS Code Terminal

VS Code intercepts a large number of key presses before they make it to the terminal, even when the terminal is focused. This includes ctrl+j (which hides or shows the VS Code terminal!). Fortunately, you can change this behavior in the VS Code settings. If you use a settings.json file, you can add this snippet:

{
    "terminal.integrated.allowChords": false,
    "terminal.integrated.sendKeybindingsToShell": true,
}

Otherwise, you can press F1 to open the command palette, then type and select “Terminal: Configure Terminal Settings”. Then make the following changes:

  1. Uncheck the option “Terminal > Integrated: Allow Chords”
  2. Check the option “Terminal > Integrated: Send Keybindings to Shell” (you may have to scroll down nearly all the way).