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.
| Key | Effect |
|---|---|
| Enter | Submits the line. A command runs once BroadSQL has read its closing ; (see Entering commands). |
| Tab | Completes 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. |
| Esc | Cancels 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 / Down | Previous / next command in history. Editing a recalled command never changes the stored one. |
| Ctrl+R | Searches 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 / Right | Moves the cursor one character. |
| Home / End, Ctrl+A / Ctrl+E | Moves to the beginning / end of the line. |
| Backspace / Delete | Deletes the character before / at the cursor. |
| Ctrl+U | Deletes from the cursor back to the beginning of the line. |
| Ctrl+K | Deletes from the cursor to the end of the line. |
| Ctrl+W, Alt+Backspace | Deletes the word before the cursor. |
| Ctrl+Backspace / Ctrl+Delete | Deletes 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+L | Clears the screen and keeps what you have typed. |
| Ctrl+C | While 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+D | Deletes 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
| Key | Effect |
|---|---|
| Tab / Shift+Tab | Next / previous candidate. |
| Arrow keys | Move between candidates. |
| Enter | Keeps the highlighted candidate. |
| Esc | Closes the menu and cancels the input, as Esc does at the prompt. |
| Any other key | Keeps 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.
| Terminal | Ctrl+Backspace | Ctrl+Delete | Ctrl+Left / Right, Ctrl+Shift+Left / Right | Use instead |
|---|---|---|---|---|
| Windows console: Command Prompt, PowerShell, Windows Terminal | Word | Word | Word | Not needed |
| Linux terminals (GNOME Terminal, Konsole, xterm) | Word, when Backspace sends DEL (the usual setting) | Word | Word | Ctrl+W |
| Other terminals (for example Git Bash, or a remote session) | Depends on the terminal | Depends on the terminal | Usually word | Ctrl+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 -aaserase = ^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
| Key | Effect |
|---|---|
| Ctrl+N | New Script |
| Ctrl+S / Ctrl+Shift+S | Save / Save All |
| F5 | Run the active Script |
| Ctrl+W | Close the tab |
| Ctrl+Z / Ctrl+Y | Undo / Redo |
| Ctrl+F / Ctrl+H | Find / Find and Replace (Esc closes the dialog) |
| Ctrl+Left / Ctrl+Right | Previous / next word |
| Shift+arrows, Ctrl+Shift+Left / Right | Select by character / by word |
| Ctrl+Backspace / Ctrl+Delete | Delete the previous / next word (with a selection, Ctrl+Delete deletes the selection) |
| Ctrl+D | Delete the line |
| Ctrl+A, Ctrl+C, Ctrl+X, Ctrl+V | Select 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)
| Key | Effect |
|---|---|
| Ctrl+N | New connection, Database Group or Environment |
| Ctrl+S | Save the form of the selected tab |
| Ctrl+D | Duplicate the selected connection |
| Ctrl+Z / Ctrl+Y | Undo / Redo the typing in the text field you are in; not in password fields |
| F4 | Close 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.
Related
Found something wrong or unclear on this page? Tell us, with the page address.