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).