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 (EDITOR) 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+Backspace / Ctrl+DeleteDeletes the whole word before / after the cursor, never a single character: Ctrl+Backspace deletes the previous word; Ctrl+Delete deletes the next word. Pressed again, each deletes the next word along. At the beginning of the line Ctrl+Backspace deletes nothing, and at the end Ctrl+Delete deletes nothing. See Support by terminal.
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.

Left, Right, Up, Down, Home, End, Insert and Delete work in every form terminals send them, on Windows and on Linux, locally or over SSH (for End, for example, ESC [ F, ESC O F, ESC [ 4 ~ or ESC [ 8 ~): none of them ever types characters such as [F into the line. Page Up, Page Down and the function keys do nothing at the prompt.

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.
  • Alt+B / Alt+F move back / forward one word, without changing text. 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 and Ctrl+Delete delete words the same way. A word is made of letters, digits and the characters _ . * ? - [ ] ~ = / & ; ! # $ % ^ ( ) { } < >; any other character ends it: a space, a comma, a quote, +, :, a line break. So with the cursor after SALES.ORDERS, Ctrl+Backspace deletes SALES.ORDERS at once; after A, B it deletes B and keeps A, ; with the cursor before CUSTOMER in SELECT CUSTOMER NAME, Ctrl+Delete deletes CUSTOMER and keeps the spaces around it. Spaces between the cursor and the word go with the word. With the cursor inside a word, only the part of it before the cursor (Ctrl+Backspace) or after it (Ctrl+Delete) is deleted. 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 TerminalWordWordWordNot needed
Linux terminals (GNOME Terminal, Konsole, xterm)Word, when Backspace sends DEL (the usual setting)WordWordCtrl+W
Other terminals (for example Git Bash, or a remote session)Depends on the terminalDepends on the terminalUsually wordCtrl+W, Alt+Backspace

Ctrl+W and Alt+Backspace delete the previous word when Ctrl+Backspace does not reach BroadSQL. If Ctrl+Delete does not reach BroadSQL, use Delete to remove characters.

Notes:

  • The Windows console tells BroadSQL which modifier keys are held with every key, so Ctrl+Backspace and Ctrl+Delete are always told apart from Backspace and Delete there, in Command Prompt, PowerShell and Windows Terminal alike.
  • Linux terminals send Ctrl+Delete as a code of its own, which BroadSQL reads as Ctrl+Delete.
  • On a Linux 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.