On this page

Keyboard shortcuts

Every key BroadSQL responds to, in the three places you type: the interactive console (the WORLD> prompt), the BroadSQL Editor (EDIT) and the configuration window (CONFIG). Type HELP SHORTCUTS; at the prompt to see the console keys without leaving BroadSQL.

A console runs inside a terminal, and a terminal decides which codes reach BroadSQL. A few keys therefore work in some terminals and not in others: they are listed apart, and Support by terminal says what to use instead.

Interactive console

Type HELP SHORTCUTS; inside BroadSQL to display these shortcuts in the console. It works with or without a database connection.

KeyEffect
EnterSubmits the line. A command runs once BroadSQL has read its closing ; (see Entering commands).
TabCompletes the word being typed (see TAB completion). With several candidates, opens a menu: Tab moves to the next candidate, Shift+Tab to the previous one. At the start of a line it inserts a TAB, for indentation.
EscCancels everything you are typing and leaves an empty prompt: the whole line wherever the cursor is, and also the earlier lines of a statement you have not yet ended with ;. Nothing runs and nothing is added to history. Also works while the completion menu is open, after recalling a command with Up, and during a Ctrl+R search.
Up / DownPrevious / next command in history. Editing a recalled command never changes the stored one.
Ctrl+RSearches history backward: type part of an earlier command to show the most recent match; Ctrl+R again finds an older one. Enter runs the match, End keeps it on the line for editing, Esc cancels.
Left / RightMoves the cursor one character.
Home / End, Ctrl+A / Ctrl+EMoves to the beginning / end of the line.
Backspace / DeleteDeletes the character before / at the cursor.
Ctrl+UDeletes from the cursor back to the beginning of the line.
Ctrl+KDeletes from the cursor to the end of the line.
Ctrl+W, Alt+BackspaceDeletes the word before the cursor.
Ctrl+LClears the screen and keeps what you have typed.
Ctrl+CWhile a command is running: stops it and keeps the connection open (see Ctrl+C during a command). While typing: abandons the current line only; earlier lines of an unfinished statement stay pending (Esc abandons them too). Ctrl+C is never a way to end BroadSQL: use exit.
Ctrl+DDeletes the character at the cursor. On an empty line, ends BroadSQL the same way exit does.

These depend on what your terminal sends, so they are not guaranteed:

  • Ctrl+Left / Ctrl+Right move to the previous / next word in the Windows console and in most terminals. With Shift or Alt added (Ctrl+Shift+Left, Alt+Right, and so on) they move by word too: a terminal prompt has no text selection, so Shift selects nothing. Shift+Left / Shift+Right move one character, and Up, Down, Home and End do with any modifier what they do alone. None of these keys clears the line or types characters.
  • Ctrl+Backspace deletes the previous word in terminals that send it differently from Backspace: most Linux and macOS terminals. The Windows console sends the same code as Backspace, so there it deletes one character: use Ctrl+W or Alt+Backspace.
  • Ctrl+Delete deletes the next word in terminals that send a distinct code for it. The Windows console sends the same code as Delete, so there it deletes one character: use Alt+D.
  • Alt+B / Alt+F move back / forward one word, and Alt+D deletes the next word. Other Alt+letter editing commands may work too, depending on the terminal. A terminal sends Alt+key as Esc followed by the key, so pressing Esc and another key less than about a tenth of a second apart can be read as Alt+that key.

What a word is

Ctrl+W, Alt+Backspace, Ctrl+Backspace, Alt+D and Ctrl+Delete delete words the same way. A word ends at a space, a comma or a quote; dots, underscores and parentheses belong to it. With the cursor after SALES.ORDERS, Ctrl+W deletes SALES.ORDERS at once; after A, B it deletes B and keeps A, . Spaces just before the cursor go with the word before them. The deleted text can be put back with Ctrl+Y.

Statements on several lines

  • Enter on a line without a closing ; keeps the statement open; the next line continues it.
  • Esc abandons the whole statement, every line of it; Ctrl+C abandons only the line being typed.
  • Every editing key above works on the line being typed. A line already submitted cannot be edited again: press Esc and type the statement again, or recall it with Up.

Completion menu

KeyEffect
Tab / Shift+TabNext / previous candidate.
Arrow keysMove between candidates.
EnterKeeps the highlighted candidate.
EscCloses the menu and cancels the input, as Esc does at the prompt.
Any other keyKeeps the highlighted candidate and types the key.

Support by terminal

What reaches BroadSQL for the keys that differ. "Word" means the key works on words as described above; the last column gives the keys that work everywhere.

TerminalCtrl+BackspaceCtrl+DeleteCtrl+Left / Right, Ctrl+Shift+Left / RightUse instead
Windows console: Command Prompt, PowerShell, Windows TerminalOne characterOne characterWordCtrl+W or Alt+Backspace; Alt+D
Linux and macOS terminals (GNOME Terminal, Konsole, xterm, macOS Terminal, iTerm2)Word, when Backspace sends DEL (the usual setting)WordWordCtrl+W, Alt+D
Other terminals (for example Git Bash, or a remote session)Depends on the terminalDepends on the terminalUsually wordCtrl+W, Alt+Backspace, Alt+D

Notes:

  • In the Windows console, BroadSQL receives Ctrl+Backspace and Ctrl+Delete exactly as Backspace and Delete: no setting of BroadSQL can tell them apart.
  • On a Linux or macOS terminal, Ctrl+Backspace and Ctrl+H send the same code, so Ctrl+H also deletes the previous word there. When Backspace itself sends that code (an unusual setting, shown by stty -a as erase = ^H), BroadSQL keeps it as Backspace and Ctrl+Backspace deletes one character.
  • Some systems use Ctrl+Left / Ctrl+Right for themselves (switching desktops on macOS, for example): the key then never reaches BroadSQL. Alt+B / Alt+F do the same.

BroadSQL Editor

KeyEffect
Ctrl+NNew Script
Ctrl+S / Ctrl+Shift+SSave / Save All
F5Run the active Script
Ctrl+WClose the tab
Ctrl+Z / Ctrl+YUndo / Redo
Ctrl+F / Ctrl+HFind / Find and Replace (Esc closes the dialog)
Ctrl+Left / Ctrl+RightPrevious / next word
Shift+arrows, Ctrl+Shift+Left / RightSelect by character / by word
Ctrl+Backspace / Ctrl+DeleteDelete the previous / next word (with a selection, Ctrl+Delete deletes the selection)
Ctrl+DDelete the line
Ctrl+A, Ctrl+C, Ctrl+X, Ctrl+VSelect all, copy, cut, paste

The Editor is a window of its own, so every key above works the same whatever the terminal BroadSQL runs in. More on the Editor: BroadSQL Editor.

Configuration window (CONFIG)

KeyEffect
Ctrl+NNew connection, Database Group or Environment
Ctrl+SSave the form of the selected tab
Ctrl+DDuplicate the selected connection
Ctrl+Z / Ctrl+YUndo / Redo the typing in the text field you are in; not in password fields
F4Close the window (asks first about changes not saved)

Edit > Revert changes puts back the values last loaded or saved; it has no shortcut, so that Ctrl+Z stays the undo of the field you are typing in. Delete permanently has no shortcut either: it is always a menu or button click, followed by a confirmation. See CONFIG.

Found something wrong or unclear on this page? , with the page address.