From 095ef62e381eb81f90d237059ef18f8b63b009cb Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Fri, 6 Nov 2026 22:54:11 +0100 Subject: [PATCH] Keyboard Shortcuts: one table per command prefix, the prefix in the heading and at no size in the row, so that the left column shrinks while find, search and copying still get the whole name; ide_js keymap writes the sections --- WIP.IDE.md | 7 +- WIP.md | 2 +- docs/Documentation/Tools-Defects.md | 2 +- docs/IDE/Customising/Keyboard-Shortcuts.md | 4 +- docs/IDE/Menu/Window.md | 2 +- docs/IDE/Reference/Keyboard-Shortcuts.md | 1239 +++++++++++--------- docs/_sass/custom/custom.scss | 17 + docs/assets/css/print.css | 3 + scripts/ide-js/lib.mjs | 95 +- scripts/ide_js.mjs | 23 +- test/ide-js.test.mjs | 160 ++- 11 files changed, 910 insertions(+), 644 deletions(-) diff --git a/WIP.IDE.md b/WIP.IDE.md index b388ff597..1eb1f5672 100644 --- a/WIP.IDE.md +++ b/WIP.IDE.md @@ -49,8 +49,11 @@ children. Second person ("you") is allowed here, as in tutorials. and the keyboard shortcuts, under `/tB/IDE/Reference/…`. Each entry gives the item, its shortcut, one or two sentences, and a link to the chapter that explains it. -- The keymap is a table on its own page, `Reference/Keyboard-Shortcuts.md`, generated from - `main.js` by `ide_js.mjs keymap`: never edit its rows by hand. +- The keymap is a page of its own, `Reference/Keyboard-Shortcuts.md`, one table for each prefix + of a command's name, generated from `main.js` by `ide_js.mjs keymap`: never edit a section + before its See Also by hand, and put prose above the first `## `. A section's heading is the + prefix in code, with no title in words, because a heading such as `Call Stack` would be a title + match against the pages that explain the panel (WIP.Search.md). - Webpage, the one pane that is not in a chapter, has a page of its own here. **Moving pages.** When a page moves, its old permalink goes into `redirect_from:`, and every diff --git a/WIP.md b/WIP.md index 312ddc6f8..08cb92889 100644 --- a/WIP.md +++ b/WIP.md @@ -600,7 +600,7 @@ Why the report separates the wedged task from the merely blocked ones, and why - `node scripts/vb6run.mjs ` and `node scripts/vb6run.mjs --docs [--only ]` --- build and run VB6 code, so that what a sample prints in twinBASIC can be compared with VB6: a stand-alone file of statements or a `.bas` module, or `--docs`, which builds the documentation's `check_run` fences in VB6 and says for each whether it prints what its page says (`same`, `differs`, `not VB6`, `error`, `refused`; a `projname=` group is built as a project of its own, its `slot=file` fences translated into VB6 `.cls` and `.bas` components). It has no wrapper and is outside every gate and outside CI: it needs VB6 (`--vb6`, `VB6_EXE`, or the standard install folder). **Never start `VB6.EXE` from a shell**: in Git Bash `/make` is rewritten as a path and VB6 answers with a modal box on the desktop; the tool spawns it from Node with an argument array, and a sample that calls `MsgBox` or `InputBox` or contains `End` is refused. Its `Debug.Print` rewrite and its file translation have probes in `test/example-batches.test.mjs`, and its command-line cases are in `scripts/lib/cli-cases.mjs`; both need no VB6. What it relies on is in [WIP.ExamplesBuild.md](WIP.ExamplesBuild.md). - `node scripts/errors.mjs run|generate|write` --- the run-time errors of the documented procedures, as data under `errors/` ([WIP.Errors.md](WIP.Errors.md), [Tools-Defects](docs/Documentation/Tools-Defects.md#errorsmjs)): `run` builds and runs a probe of the cases in twinBASIC 32-bit and 64-bit (`tbrun --exe`), VB6 and 64-bit VBA (in 64-bit Access, `scripts/lib/vba.mjs`) and compares each with the data, `write` writes each page's Errors section. Its gate is `check_errors.mjs`; `run` is by hand, never CI. - `node scripts/recheck_callouts.mjs [--plan] [--kinds ] [--only ] [--dry-run] [--report ] [--from ]` --- after a new BETA, checks again every callout labelled with an older one by running what its marker names (`ide_test`/`addin_test` once per suite, judging lane reproducers from the same report through `scripts/lib/lane-report.mjs`, `bug_repro verify` for the other reproducers, `check_examples --json` for samples, `errors.mjs run` for tb and win64, `test/llvm/run.mjs --only`, `test/static-linking/run.mjs --only`, `package_tests --json`), relabels what holds (a data file's `beta:` too, then `errors.mjs write`), and lists the rest. What it reads and decides is `scripts/lib/recheck.mjs`, probed by `check_callout_evidence.mjs`; every tool's output stays in `%TEMP%\recheck-callouts\\`. By hand, never CI. -- `node scripts/ide_js.mjs ` --- reads, names and patches the IDE's minified `ide/main.js` ([Tools-Defects](docs/Documentation/Tools-Defects.md#ide_jsmjs)): `survey`, `units`, `list`, `name`, `seal`, `check`, `view`, `patch`, `shape` and `keymap`, which writes the two tables of `docs/IDE/Reference/Keyboard-Shortcuts.md` from the build, each command's description coming from `scripts/ide-js/command-text.json` (`--check` fails for a command with no entry there). It reads files and starts nothing; the rules for it are under [Driving the twinBASIC compiler](#driving-the-twinbasic-compiler) (*Fixing the IDE itself*). It has no wrapper and is outside every gate and CI, since it needs an install; its tests are `test/ide-js.test.mjs`, in `test.bat`, and its command-line cases are in `scripts/lib/cli-cases.mjs`. **After a new BETA, run `check` on it**, and `seal` the map once each `review` and `lost` name has been looked at, **and `keymap --check`**, then `keymap --update` if the group changed. +- `node scripts/ide_js.mjs ` --- reads, names and patches the IDE's minified `ide/main.js` ([Tools-Defects](docs/Documentation/Tools-Defects.md#ide_jsmjs)): `survey`, `units`, `list`, `name`, `seal`, `check`, `view`, `patch`, `shape` and `keymap`, which writes the sections of `docs/IDE/Reference/Keyboard-Shortcuts.md` from the build, a table for each prefix of a command's name, each command's description coming from `scripts/ide-js/command-text.json` (`--check` fails for a command with no entry there). It reads files and starts nothing; the rules for it are under [Driving the twinBASIC compiler](#driving-the-twinbasic-compiler) (*Fixing the IDE itself*). It has no wrapper and is outside every gate and CI, since it needs an install; its tests are `test/ide-js.test.mjs`, in `test.bat`, and its command-line cases are in `scripts/lib/cli-cases.mjs`. **After a new BETA, run `check` on it**, and `seal` the map once each `review` and `lost` name has been looked at, **and `keymap --check`**, then `keymap --update` if the group changed. Three generators sit outside that loop and produce committed artifacts rather than build output — none runs during a build, and none is needed for one. `python scripts/build_fonts.py` rebuilds the subset webfaces under `docs/assets/fonts/` and needs a network connection; `node scripts/build_dot_metrics.mjs` regenerates `builder/inter-metrics.json` from those webfaces and needs only a browser. See [Typography](#typography). `node indexer/twin-index.mjs derive` regenerates `builder/package-api.json`, the packages' declared API that the build's symbol index (`tB/symbols.json`, for the IDE help add-in) is annotated from; it needs a twinBASIC install (or `--release`), so **run it when the reference is re-indexed against a newer build** and commit it with the pages and the snapshots. See [WIP.HelpAddin.md, Stage 3](WIP.HelpAddin.md#stage-3-the-symbol-index-generated-by-the-docs-build). diff --git a/docs/Documentation/Tools-Defects.md b/docs/Documentation/Tools-Defects.md index 9ee790977..08237c0e8 100644 --- a/docs/Documentation/Tools-Defects.md +++ b/docs/Documentation/Tools-Defects.md @@ -244,7 +244,7 @@ Reads, names and patches the twinBASIC IDE's own JavaScript, `ide/main.js` in th | `view ...` | The readable view: each unit with the map's names put in (only the `exact` and `carried` ones), pretty-printed by prettier, under a comment that names the build, where the unit is in `main.js`, its shape, the names applied and any not applied. `--all --out ` writes the whole file so, about 50,000 lines. | | `patch ` | Splices a fix into `main.js`. `` holds whole units in the map's names, as the view prints them: top-level functions, and a class holding each method that is fixed. For each unit, the map's names are turned back into the build's minified names, the unit's tokens are compared with the fix's (a string by its value, so the view's quotes are no difference), and each run of tokens that differs becomes one edit of the minified text. The patched file is parsed again, and each patched unit must have the fix's shape, so the patched `main.js` runs the code the fix shows. Each edit is printed before and after, in the minified text. Every difference becomes an edit, so a fix patched into a later build whose unit changed takes that change back out: run `shape` on that build first. | | `shape ` | The fix shape, as markdown for the defect's entry: for each unit of the fix, which names are the map's and what the build calls them, and a diff of the unit as the build has it against the fix, both in the map's names and printed alike. | -| `keymap` | Prints the build's commands as the two tables of [`IDE/Reference/Keyboard-Shortcuts.md`](../../tB/IDE/Reference/Keyboard-Shortcuts): the commands with a default key, with their keys, and the commands with none, each with one row by name and a line on what it does. The lines are written by hand in `scripts/ide-js/command-text.json`, which maps each command's id to its description; an id with an empty description gets an empty cell. `--check` compares the page's tables with the build, prints what differs and exits 1 if anything does, and exits 1 too, naming the ids, when a command of the build has no entry in the data file or the file has an entry for a command the build lacks; `--update` writes the tables into the page, leaves the rest of it alone, and prints the same ids without failing. Run `--check` after a new BETA, and write the descriptions it asks for. | +| `keymap` | Prints the build's commands as the sections of [`IDE/Reference/Keyboard-Shortcuts.md`](../../tB/IDE/Reference/Keyboard-Shortcuts): a heading and a table for each prefix of a command's name, and a last section for the names with no prefix, with one row for each command by name, its keys, and a line on what it does. A table with no default key in it has no **Keys** column. A row's name keeps its prefix in a `.command-prefix` span, which the site's stylesheets give no size, so the find on the page and the site's search still take the whole name. The lines are written by hand in `scripts/ide-js/command-text.json`, which maps each command's id to its description; an id with an empty description gets an empty cell. `--check` compares the page's sections with the build, prints what differs and exits 1 if anything does, and exits 1 too, naming the ids, when a command of the build has no entry in the data file or the file has an entry for a command the build lacks; `--update` writes the sections into the page, replacing everything from its first `## ` heading to its `## See Also`, leaves the rest of it alone, and prints the same ids without failing. Run `--check` after a new BETA, and write the descriptions it asks for. | **Only a copy of an install is ever patched.** `patch --copy-to ` copies the install into a folder of its own under ``, which must be under the system temp folder, without its `projects\` and `addins\` folders, writes the patched `main.js` into the copy and prints the copy's `twinBASIC.exe`. Give that to the IDE tests, `ide-test.bat --ide \twinBASIC.exe --only `, to see the defect's test report that it no longer reproduces while the controls pass; delete the folder afterwards. `patch --out ` writes the patched `main.js` alone, and refuses a file inside the repository or inside an install that is not under the temp folder. `view --out` refuses the repository too: no copy of `main.js`, whole or viewed, belongs in it. A fix is kept as `bugs//fix.js` beside the defect's reproducer. diff --git a/docs/IDE/Customising/Keyboard-Shortcuts.md b/docs/IDE/Customising/Keyboard-Shortcuts.md index 818f33e41..94e3f556c 100644 --- a/docs/IDE/Customising/Keyboard-Shortcuts.md +++ b/docs/IDE/Customising/Keyboard-Shortcuts.md @@ -65,7 +65,7 @@ Text that is not valid JSON turns red. The IDE ignores a group whose text is not ## The text of a group -A group is a JSON object. Each key names a command, and each value is a list of key strings. Any command of the IDE can be named, whether or not the default group gives it a key. The [reference](../Reference/Keyboard-Shortcuts) lists every command with a line on what it does: the commands that have a default key in one table, and [those that have none](../Reference/Keyboard-Shortcuts#commands-with-no-default-key) in another. It is the place to look up the name of a command. +A group is a JSON object. Each key names a command, and each value is a list of key strings. Any command of the IDE can be named, whether or not the default group gives it a key. The [reference](../Reference/Keyboard-Shortcuts) lists every command with its default keys and a line on what it does, in one table for each prefix of a command's name. It is the place to look up the name of a command. | Entry | Meaning | |---|---| @@ -126,7 +126,7 @@ When a command fails, the Debug Console prints `command failed:` and the command ## See Also -- [Keyboard shortcuts reference](../Reference/Keyboard-Shortcuts) -- every command the default group binds, with its keys +- [Keyboard shortcuts reference](../Reference/Keyboard-Shortcuts) -- every command of the IDE, with its default keys - [Window menu](../Reference/Menu/Window#keyboard-shortcuts) -- the **Keyboard Shortcuts** entry - [Panel layouts](Panel-Layouts) -- the commands that switch layouts - [Themes](Themes) -- the commands that switch themes diff --git a/docs/IDE/Menu/Window.md b/docs/IDE/Menu/Window.md index 15c194fcc..e3d0f6271 100644 --- a/docs/IDE/Menu/Window.md +++ b/docs/IDE/Menu/Window.md @@ -45,7 +45,7 @@ Switches groups of keyboard shortcuts on and off. See [Keyboard shortcuts](../.. Opens a dialog that lists the built-in group, which is read-only, and the groups that have been created, and shows each as JSON text. See [Manage keyboard shortcuts](../../Customising/Keyboard-Shortcuts#manage-keyboard-shortcuts) and [The text of a group](../../Customising/Keyboard-Shortcuts#the-text-of-a-group). -[Keyboard shortcuts](../Keyboard-Shortcuts) lists the built-in group as a table. +[Keyboard shortcuts](../Keyboard-Shortcuts) lists the built-in group in tables. ## Theme {: index_also="dark mode" } diff --git a/docs/IDE/Reference/Keyboard-Shortcuts.md b/docs/IDE/Reference/Keyboard-Shortcuts.md index 5ea3eb2fc..355b7e0ec 100644 --- a/docs/IDE/Reference/Keyboard-Shortcuts.md +++ b/docs/IDE/Reference/Keyboard-Shortcuts.md @@ -7,545 +7,732 @@ permalink: /tB/IDE/Reference/Keyboard-Shortcuts --- # Keyboard shortcuts +{: .no_toc } The IDE's built-in group of keyboard shortcuts, **Default Built-in Keyboard Shortcuts**. [Keyboard shortcuts](../Customising/Keyboard-Shortcuts) explains how to change them. -Every command of the IDE is on one of the two tables below, with a line that says what it does. The first table has the commands that have a default key, and gives the keys. The [second](#commands-with-no-default-key) has the commands that have none. The names are the IDE's own, and they are what a group of your own uses. The same key can be on several rows, because what a key does depends on what has the focus: Ctrl+V runs one command in the code editor and another in the form designer. Many commands apply only in some state, such as a project being loaded or a program stopped at a breakpoint; a command that does not apply does nothing. +Every command of the IDE is in one of the tables below, with a line that says what it does. Each table has the commands whose names start with the same prefix, the text up to the first underscore, and the prefix is the table's heading. A row leaves it out: `Clean` under `tbBuild_` is the command `tbBuild_Clean`. The whole name is the one a group of your own uses. On the website, copying a name from a row gives the whole name, and the browser's find on the page and the site's search both take it. The names are the IDE's own, so `tbFormDesginer_` is spelled as the IDE spells it. + +The **Keys** column gives a command's default keys, and is empty for a command that has none. A table with no **Keys** column has no command with a default key. The same key can be in several rows, because what a key does depends on what has the focus: Ctrl+V runs one command in the code editor and another in the form designer. Many commands apply only in some state, such as a project being loaded or a program stopped at a breakpoint; a command that does not apply does nothing. A key marked *on release* runs when the key is released, not when it goes down. **Window → Keyboard Shortcuts → Manage Keyboard Shortcuts...** shows the same group as text, with the exact key strings, which also say which keys repeat while they are held down. [Shortcut strings](../Customising/Keyboard-Shortcuts#shortcut-strings) explains them. +A command with no default key runs from a menu, a button or another command. Any of them can be given a key in a group of your own, by writing its name and a key string, as [Keyboard shortcuts](../Customising/Keyboard-Shortcuts#the-text-of-a-group) explains. For example, `"tbMenu_ShowFileMenu": ["{KEYDOWN}{CTRL}{ALT}F"]` opens the File menu with Ctrl+Alt+F. + +
+ +* TOC goes here +{:toc} + +
+ +## `tbBuild_` + | Command | Keys | What it does | |---|---|---| -| `tbBuild_Fusion` | Ctrl+Shift+B | Builds the Fusion host program that a project with ActiveX controls may need, without building the project. | -| `tbBuild_SwitchToWin32` | Ctrl+F2 | Sets the build target to 32-bit Windows. | -| `tbBuild_SwitchToWin64` | Ctrl+F1 | Sets the build target to 64-bit Windows. | -| `tbCallStack_ShowPanel` | Ctrl+L | Shows the Call Stack panel. | -| `tbDebug_BreakInto` | Ctrl+Break | Pauses the running program. | -| `tbDebug_BreakpointsClear` | Ctrl+Shift+F9 | Removes every breakpoint from the project. | -| `tbDebug_RunOrPreview` | F6 | Runs the procedure at the cursor, or shows a preview of the form when the active file is a form. | -| `tbDebug_SetNextExecutionStatement` | Ctrl+F9 | At a breakpoint, makes the line at the cursor the next one to run. | -| `tbDebug_StartOrContinue` | F5 | Starts the project, or continues it from a breakpoint. | -| `tbDebug_StepInto` | F8, F11 | At a breakpoint, runs the current statement and stops at the next, entering any procedure it calls. | -| `tbDebug_StepOut` | Ctrl+Shift+F8, Shift+F11 | At a breakpoint, runs on until the current procedure ends and stops in its caller. | -| `tbDebug_StepOver` | Shift+F8, F10 | At a breakpoint, runs the current statement and stops at the next, without entering any procedure it calls. | -| `tbDebug_ToggleBreakpoint` | F9 | Sets a breakpoint on the cursor's line, or removes the one that is there. | -| `tbDebugConsole_ExecuteEnteredLine` | Enter | Runs the line typed in the Debug Console's entry box, or inserts the selected entry of the completion list. | -| `tbDebugConsole_FocusPanel` | Ctrl+G | Moves the focus to the Debug Console's entry box. | -| `tbDebugConsole_GoToDefinition` | Shift+F2, F12 | Goes to the definition of the symbol selected in the Debug Console's completion list. | -| `tbDebugConsole_HistoryCycleNext` | Down | In the Debug Console's entry box, shows the next line of its history. | -| `tbDebugConsole_HistoryCyclePrevious` | Up | In the Debug Console's entry box, shows the previous line of its history. | -| `tbDebugConsole_SelectAllEntryBox` | Ctrl+A | Selects the whole text of the Debug Console's entry box. | -| `tbDebugConsole_ShowPanel` | Ctrl+G | Shows the Debug Console panel. | -| `tbEditor_ActivateNextTab` | Ctrl+Tab | Switches to the next editor tab. | -| `tbEditor_ActivatePrevTab` | Ctrl+Shift+Tab | Switches to the previous editor tab. | -| `tbEditor_AddCursorAbove` | Ctrl+Alt+Up | Adds a cursor on the line above. | -| `tbEditor_AddCursorBelow` | Ctrl+Alt+Down | Adds a cursor on the line below. | -| `tbEditor_AddCursorsAtLineEndsOfSelection` | Shift+Alt+I | Puts a cursor at the end of each line of the selection. | -| `tbEditor_AddSelectionToNextFindMatch` | Ctrl+D | Adds the next occurrence of the selected text to the selection, with a cursor at each. | -| `tbEditor_ClipboardCopy` | Ctrl+C, Ctrl+Insert | Copies the selection to the clipboard, replacing tabs with spaces. | -| `tbEditor_ClipboardCut` | Ctrl+X, Shift+Delete | Cuts the selection to the clipboard, replacing tabs with spaces. | -| `tbEditor_ClipboardCutPlain` | Ctrl+Shift+X | Cuts the selection to the clipboard as plain text, with the editor's own handling of tabs left out. | -| `tbEditor_ClipboardPaste` | Ctrl+V | Pastes the clipboard into the code editor, re-indenting the pasted text. | -| `tbEditor_ClipboardPasteAsComment` | Ctrl+Alt+V | Pastes the clipboard into the code editor as comment lines. | -| `tbEditor_ClipboardPlainCopy` | Ctrl+Shift+C | Copies the selection to the clipboard as plain text, with the editor's own handling of tabs left out. | -| `tbEditor_ClipboardPlainPaste` | Ctrl+Shift+V | Pastes the clipboard into the code editor exactly as it is, without re-indenting. | -| `tbEditor_CloseTab` | Ctrl+F4, Ctrl+W | Closes the current editor tab. | -| `tbEditor_CodeSelector1_Dropdown` | Ctrl+1 | Opens box 1 above the code editor, which lists the components of the file. | -| `tbEditor_CodeSelector2_Dropdown` | Ctrl+2 | Opens box 2 above the code editor, which lists the objects of the component. | -| `tbEditor_CodeSelector3_Dropdown` | Ctrl+3 | Opens box 3 above the code editor, which lists the procedures or events. | -| `tbEditor_CommentSelection` | Ctrl+K | Turns the selected lines into comments. | -| `tbEditor_CopyLineDown` | Shift+Alt+Down | Copies the current line, or the selected lines, below themselves. | -| `tbEditor_CopyLineUp` | Shift+Alt+Up | Copies the current line, or the selected lines, above themselves. | -| `tbEditor_CursorMoveBottom` | Ctrl+End | Moves the cursor to the end of the document. | -| `tbEditor_CursorMoveDown` | Down | Moves the cursor down one line. | -| `tbEditor_CursorMoveEndOfLine` | End | Moves the cursor to the end of the line. | -| `tbEditor_CursorMoveLeft` | Left | Moves the cursor one character to the left. | -| `tbEditor_CursorMoveLeftWord` | Ctrl+Left | Moves the cursor to the start of the previous word. | -| `tbEditor_CursorMovePageDown` | Page Down | Moves the cursor down by one page. | -| `tbEditor_CursorMovePageUp` | Page Up | Moves the cursor up by one page. | -| `tbEditor_CursorMoveRight` | Right | Moves the cursor one character to the right. | -| `tbEditor_CursorMoveRightWord` | Ctrl+Right | Moves the cursor to the start of the next word. | -| `tbEditor_CursorMoveStartOfLineHome` | Home | Moves the cursor to the first non-blank character of the line, or to the first column if it is already there. | -| `tbEditor_CursorMoveTop` | Ctrl+Home | Moves the cursor to the start of the document. | -| `tbEditor_CursorMoveUp` | Up | Moves the cursor up one line. | -| `tbEditor_CursorSelectBottom` | Ctrl+Shift+End | Extends the selection to the end of the document. | -| `tbEditor_CursorSelectDown` | Shift+Down | Extends the selection down one line. | -| `tbEditor_CursorSelectLeft` | Shift+Left | Extends the selection one character to the left. | -| `tbEditor_CursorSelectLeftWord` | Ctrl+Shift+Left | Extends the selection to the start of the previous word. | -| `tbEditor_CursorSelectLineEnd` | Shift+End | Extends the selection to the end of the line. | -| `tbEditor_CursorSelectLineStartHome` | Shift+Home | Extends the selection to the first non-blank character of the line, or to the first column if it is already there. | -| `tbEditor_CursorSelectPageDown` | Shift+Page Down | Extends the selection down by one page. | -| `tbEditor_CursorSelectPageUp` | Shift+Page Up | Extends the selection up by one page. | -| `tbEditor_CursorSelectRight` | Shift+Right | Extends the selection one character to the right. | -| `tbEditor_CursorSelectRightWord` | Ctrl+Shift+Right | Extends the selection to the start of the next word. | -| `tbEditor_CursorSelectTop` | Ctrl+Shift+Home | Extends the selection to the start of the document. | -| `tbEditor_CursorSelectUp` | Shift+Up | Extends the selection up one line. | -| `tbEditor_CursorUndo` | Ctrl+U | Undoes the last cursor movement or selection change, without undoing any text change. | -| `tbEditor_DecreaseFontSize` | Ctrl+- | Makes the code editor's font one pixel smaller, down to a size of 8 pixels, and saves the size as the Code Editor Font Size option. | -| `tbEditor_DeleteLeft` | Backspace, Shift+Backspace | Deletes the character before the cursor, or the selection. | -| `tbEditor_DeleteLeftWord` | Ctrl+Backspace | Deletes the word before the cursor. | -| `tbEditor_DeleteLines` | Ctrl+Shift+Delete | Deletes the current line, or the selected lines. | -| `tbEditor_DeleteRight` | Delete | Deletes the character after the cursor, or the selection. | -| `tbEditor_DeleteRightWord` | Ctrl+Delete | Deletes the word after the cursor. | -| `tbEditor_ExpandLineSelection` | Ctrl+L | Extends the selection to include the whole of the current line. | -| `tbEditor_ExpandSelection` | Shift+Alt+Right | Widens the selection to the next larger syntactic block. | -| `tbEditor_Find` | Ctrl+F | Opens the Find and Replace panel, searching for the selected text, or the word at the cursor. | -| `tbEditor_FindReplace` | Ctrl+H | Opens the Find and Replace panel, as the Find command does. | -| `tbEditor_FindSelectedNext` | Ctrl+F3 | Moves to the next occurrence of the selected text. | -| `tbEditor_FindSelectedPrev` | Ctrl+Shift+F3 | Moves to the previous occurrence of the selected text. | -| `tbEditor_FindWidget_Next` | Alt+F3 | Moves to the next match of the current search. | -| `tbEditor_FindWidget_Prev` | Shift+Alt+F3 | Moves to the previous match of the current search. | -| `tbEditor_FindWidget_SelectAllMatches` | Alt+A | Selects every match of the current search in the editor. | -| `tbEditor_Fold` | Ctrl+{ | Folds the block at the cursor. | -| `tbEditor_FoldProcedures` | Ctrl+Alt+Left | Folds every procedure in the file except the one the cursor is in. | -| `tbEditor_GoToDefinition` | Shift+F2, F12 | Goes to the definition of the symbol at the cursor. | -| `tbEditor_IncreaseFontSize` | Ctrl++ | Makes the code editor's font one pixel larger and saves the size as the Code Editor Font Size option. | -| `tbEditor_Indent` | Tab | Indents the line or the selected lines, or inserts a tab at the cursor. | -| `tbEditor_IndentLine` | Ctrl+] | Indents the selected lines. | -| `tbEditor_InsertAmpersand` | & | Types an ampersand. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertBackslash` | \ | Types a backslash. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertColon` | : | Types a colon. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertComma` | , | Types a comma. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertEquals` | = | Types an equals sign. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertExclamation` | ! | Types an exclamation mark. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertLineAbove` | Ctrl+Shift+Enter | Inserts an empty line above the cursor's line and moves the cursor to it. | -| `tbEditor_InsertLineBelow` | Ctrl+Enter | Inserts an empty line below the cursor's line and moves the cursor to it. | -| `tbEditor_InsertLineBreak` | Enter | Breaks the line at the cursor, as the Enter key does. This is bound to the key so that the IDE can do its own work on the new line. | -| `tbEditor_InsertMinus` | - | Types a minus sign. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertMultiply` | * | Types an asterisk. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertPeriod` | . | Types a full stop. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertPlus` | + | Types a plus sign. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertSlash` | / | Types a slash. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_InsertSpace` | Space, Shift+Space | Types a space. The key is bound to a command so that the IDE can react to it. | -| `tbEditor_JumpToNextProblem` | Alt+F8 | Moves the cursor to the next error or warning in the document. | -| `tbEditor_JumpToPrevProblem` | Shift+Alt+F8 | Moves the cursor to the previous error or warning in the document. | -| `tbEditor_LastPosition` | Ctrl+Shift+F2 | Returns to the most recently recorded position, at the start of its line, opening its file if needed. | -| `tbEditor_MoveLinesDown` | Alt+Down | Moves the current line, or the selected lines, down one line. | -| `tbEditor_MoveLinesUp` | Alt+Up | Moves the current line, or the selected lines, up one line. | -| `tbEditor_MoveToProcedureNext` | Ctrl+Down | Moves the cursor to the start of the next procedure. | -| `tbEditor_MoveToProcedurePrev` | Ctrl+Up | Moves the cursor to the start of the previous procedure. | -| `tbEditor_Outdent` | Shift+Tab | Outdents the line or the selected lines. | -| `tbEditor_OutdentLine` | Ctrl+[ | Outdents the selected lines. | -| `tbEditor_PrevBookmark` | Ctrl+M | Moves the cursor to the previous bookmark. | -| `tbEditor_Redo` | Ctrl+Y | Redoes the last change that was undone in the current document. | -| `tbEditor_RenameSymbol` | F2 | Renames the symbol at the cursor everywhere it is used. | -| `tbEditor_ReopenLastClosedTab` | Ctrl+Shift+T | Reopens the editor tab that was closed last. | -| `tbEditor_SelectAll` | Ctrl+A | Selects the whole document. | -| `tbEditor_SelectAllMatches` | Ctrl+Shift+L | Selects every occurrence of the word at the cursor, or of the selected text. | -| `tbEditor_ShowContextMenu` | Shift+F10 | Opens the code editor's context menu at the top left of the editor. | -| `tbEditor_ShrinkSelection` | Shift+Alt+Left | Narrows the selection to the next smaller syntactic block. | -| `tbEditor_SwitchToFormDesign` | Shift+F7 | Switches from the code of a file to its form designer. | -| `tbEditor_ToggleBlockComment` | Shift+Alt+A | Wraps the selection in a block comment, or removes the block comment around it. | -| `tbEditor_ToggleBookmark` | Ctrl+B | Sets a bookmark on the cursor's line, or removes the one that is there. | -| `tbEditor_ToggleLineComment` | Ctrl+/ | Comments the selected lines, or uncomments them if they are all comments already. | -| `tbEditor_ToggleWordWrap` | Alt+Z | Turns word wrap on or off in the code editor. | -| `tbEditor_TurnShowCodeHintsOff` | Ctrl, on release | Hides the inline code hints. The Ctrl key runs it when it is released. | -| `tbEditor_TurnShowCodeHintsOn` | Ctrl | Shows the inline code hints. The Ctrl key runs it when it goes down. | -| `tbEditor_UncommentSelection` | Ctrl+Shift+K | Removes the comment marker from the selected lines. | -| `tbEditor_Undo` | Ctrl+Z | Undoes the last change in the current document. | -| `tbEditor_Unfold` | Ctrl+} | Unfolds the block at the cursor. | -| `tbEditor_UnfoldProcedures` | Ctrl+Alt+Right | Unfolds every procedure in the file. | -| `tbFindReplace_Cancel` | Esc | Closes the Find and Replace panel, or hides it if it is floating. | -| `tbFindReplace_FocusCurrentModule` | Alt+M | Chooses the Current Module scope in the Find and Replace panel. | -| `tbFindReplace_FocusCurrentProcedure` | Alt+P | Chooses the Current Procedure scope in the Find and Replace panel. | -| `tbFindReplace_FocusCurrentProject` | Alt+C | Chooses the Current Project scope in the Find and Replace panel. | -| `tbFindReplace_FocusDirection` | Alt+D | Moves the focus to the Direction box of the Find and Replace panel. | -| `tbFindReplace_FocusFindWhat` | Alt+F | Moves the focus to the Find What box of the Find and Replace panel. | -| `tbFindReplace_FocusMatchCaseToggle` | Alt+S | Turns the Match Case option of the Find and Replace panel on or off. | -| `tbFindReplace_FocusNext` | Alt+N | Finds the next match in the Find and Replace panel. | -| `tbFindReplace_FocusReplaceWith` | Alt+W | Moves the focus to the Replace With box of the Find and Replace panel. | -| `tbFindReplace_FocusUsePatternMatchingToggle` | Alt+U | Turns the Use Pattern Matching option of the Find and Replace panel on or off. | -| `tbFindReplace_FocusWholeWordOnlyToggle` | Alt+O | Turns the Whole Word Only option of the Find and Replace panel on or off. | -| `tbFindReplace_Next` | F3 | Finds the next match in the Find and Replace panel, or in the editor's quick find box when only that is showing. | -| `tbFindReplace_Prev` | Shift+F3 | Finds the previous match in the Find and Replace panel. | -| `tbFindReplace_ReplaceAll` | Alt+A | Replaces every match in the scope chosen in the Find and Replace panel. | -| `tbFindReplace_ReplaceNext` | Alt+R | Replaces the current match in the Find and Replace panel and finds the next. | -| `tbFindWidget_FindNext` | Enter | In the quick find box, moves to the next match. | -| `tbFindWidget_FindNextInSelection` | Ctrl+F3 | In the quick find box, moves to the next occurrence of the selected text. | -| `tbFindWidget_FindPrevInSelection` | Ctrl+Shift+F3 | In the quick find box, moves to the previous occurrence of the selected text. | -| `tbFindWidget_FindPrevious` | Shift+Enter | Has the default key Shift+Enter, but the IDE has no command of this name. The command that moves to the previous match in the quick find box is tbFindWidget_FindPrev. | -| `tbFindWidget_Hide` | Esc | Closes the editor's quick find box. | -| `tbFindWidget_HistoryCycleNext` | Down | In the quick find box, shows the next entry of the search history. | -| `tbFindWidget_HistoryCyclePrevious` | Up | In the quick find box, shows the previous entry of the search history. | -| `tbFindWidget_ShowFind` | Alt+F | Opens the editor's quick find box. | -| `tbFindWidget_ShowReplace` | Alt+H | Opens the editor's quick find and replace box. | -| `tbFormDesigner_AlignSelectedControlsBottom` | Alt+Down | Aligns the bottom edges of the selected controls. | -| `tbFormDesigner_AlignSelectedControlsLeft` | Alt+Left | Aligns the left edges of the selected controls. | -| `tbFormDesigner_AlignSelectedControlsRight` | Alt+Right | Aligns the right edges of the selected controls. | -| `tbFormDesigner_AlignSelectedControlsTop` | Alt+Up | Aligns the top edges of the selected controls. | -| `tbFormDesigner_ClipboardCopy` | Ctrl+C, Ctrl+Insert | Copies the selected controls to the clipboard. | -| `tbFormDesigner_ClipboardCut` | Ctrl+X, Shift+Delete | Cuts the selected controls to the clipboard. | -| `tbFormDesigner_ClipboardPaste` | Ctrl+V | Pastes the controls on the clipboard into the form designer. | -| `tbFormDesigner_DeleteSelectedControls` | Delete | Deletes the selected controls. | -| `tbFormDesigner_MenuEditorDelete` | Delete | In the menu editor, deletes the selected menu item. | -| `tbFormDesigner_MenuEditorMoveDown` | Ctrl+Down | In the menu editor, moves the selected menu item down one place. | -| `tbFormDesigner_MenuEditorMoveLeft` | Ctrl+Left | In the menu editor, moves the selected top-level menu one place to the left. | -| `tbFormDesigner_MenuEditorMoveRight` | Ctrl+Right | In the menu editor, moves the selected top-level menu one place to the right. | -| `tbFormDesigner_MenuEditorMoveUp` | Ctrl+Up | In the menu editor, moves the selected menu item up one place. | -| `tbFormDesigner_MenuEditorRename` | F2 | In the menu editor, renames the selected menu item. | -| `tbFormDesigner_MenuEditorToggleChecked` | Space | In the menu editor, turns the Checked property of the selected menu item on or off. | -| `tbFormDesigner_MoveSelectedControlsDown` | Down | Moves the selected controls down by one grid step, or one pixel when the grid is off. | -| `tbFormDesigner_MoveSelectedControlsLeft` | Left | Moves the selected controls left by one grid step, or one pixel when the grid is off. | -| `tbFormDesigner_MoveSelectedControlsRight` | Right | Moves the selected controls right by one grid step, or one pixel when the grid is off. | -| `tbFormDesigner_MoveSelectedControlsUp` | Up | Moves the selected controls up by one grid step, or one pixel when the grid is off. | -| `tbFormDesigner_Redo` | Ctrl+Y | Redoes the last change that was undone in the form designer. | -| `tbFormDesigner_ResizeSelectedControlsNarrower` | Shift+Left | Makes the selected controls narrower by one grid step, or one pixel when the grid is off. | -| `tbFormDesigner_ResizeSelectedControlsNarrowest` | Ctrl+Shift+Left | Makes the selected controls as narrow as the narrowest of them. | -| `tbFormDesigner_ResizeSelectedControlsShorter` | Shift+Up | Makes the selected controls shorter by one grid step, or one pixel when the grid is off. | -| `tbFormDesigner_ResizeSelectedControlsShortest` | Ctrl+Shift+Up | Makes the selected controls as short as the shortest of them. | -| `tbFormDesigner_ResizeSelectedControlsTaller` | Shift+Down | Makes the selected controls taller by one grid step, or one pixel when the grid is off. | -| `tbFormDesigner_ResizeSelectedControlsTallest` | Ctrl+Shift+Down | Makes the selected controls as tall as the tallest of them. | -| `tbFormDesigner_ResizeSelectedControlsWider` | Shift+Right | Makes the selected controls wider by one grid step, or one pixel when the grid is off. | -| `tbFormDesigner_ResizeSelectedControlsWidest` | Ctrl+Shift+Right | Makes the selected controls as wide as the widest of them. | -| `tbFormDesigner_SelectAllControls` | Ctrl+A | Selects every control on the form. | -| `tbFormDesigner_SelectParentOfSelectedControl` | Esc | With a control selected, selects its container, or the form. | -| `tbFormDesigner_SelectToolboxPointer` | Esc | With no control selected, returns to the pointer tool in the Toolbox. | -| `tbFormDesigner_TurnShowTabIndexOff` | Ctrl, on release | Hides the tab index of each control. The Ctrl key runs it when it is released. | -| `tbFormDesigner_TurnShowTabIndexOn` | Ctrl | Shows the tab index of each control. The Ctrl key runs it when it goes down. | -| `tbFormDesigner_Undo` | Ctrl+Z | Undoes the last change in the form designer. | -| `tbHelp_ToggleExpandSignatureHelp` | F1 | Expands or collapses the signature help that is showing. | -| `tbIde_DecreaseFontSize` | Ctrl+Alt+- | Makes the IDE's font one pixel smaller, down to a size of 8 pixels. | -| `tbIde_IncreaseFontSize` | Ctrl+Alt++ | Makes the IDE's font one pixel larger. | -| `tbIdeWindow_Close` | Alt+F4 | Closes the IDE window. | -| `tbIntellisense_AcceptSelectedEntry` | Tab; Space, Enter, ,, ., +, -, &, (, ), !, *, \, /, :, =, on release | Inserts the selected entry of the completion list, then types the key that was pressed. | -| `tbIntellisense_AcceptSelectedOrFirstEntry` | Tab, Space | Inserts the selected entry of the completion list, or the first entry if none is selected. | -| `tbIntellisense_Cancel` | Esc, Left, Right, Backspace | Closes the completion list and the signature help. | -| `tbIntellisense_SelectNext` | Down | Selects the next entry of the open completion list. | -| `tbIntellisense_SelectPrevious` | Up | Selects the previous entry of the open completion list. | -| `tbIntellisense_ShowAfterKeyPress` | every key its `{ALLEXCEPT}` list does not name, on release | Opens the completion list after any key that is not one of the keys its binding excludes, according to the IntelliSense mode option. | -| `tbIntellisense_ShowNow` | Ctrl+Space | Opens the completion list at the cursor. | -| `tbMenu_Cancel` | Esc | Closes the open menu. | -| `tbMenu_ExecuteFocusedEntry` | Enter | While a menu is open, runs the focused entry. | -| `tbMenu_FocusAdjacentDown` | Down | While a menu is open, moves the focus to the entry below. | -| `tbMenu_FocusAdjacentLeft` | Left | While a menu is open, closes the open submenu, or moves to the menu on the left. | -| `tbMenu_FocusAdjacentRight` | Right | While a menu is open, opens the submenu of the focused entry, or moves to the menu on the right. | -| `tbMenu_FocusAdjacentUp` | Up | While a menu is open, moves the focus to the entry above. | -| `tbMisc_AltKeyStateDown` | Alt | Records that the Alt key is held down, so that releasing it alone can open the File menu. The IDE uses it internally. | -| `tbMisc_AltKeyStateUp` | Alt, on release | Opens the File menu when the Alt key is released without another key having been pressed, or closes a menu that is open. | -| `tbMisc_PreventDefaultKeyBehaviour` | Ctrl+A, Tab | Stops the web view's own handling of the key. The IDE binds it to keys whose default action it does not want. | -| `tbMisc_SaveProjectMetaStateInTwinproj` | Ctrl+Shift+Alt+M | Saves the project's meta state to the project file and shows a message box. | -| `tbMisc_ShiftKeyStateDown` | Shift | Records that the Shift key is held down. The IDE uses it internally. | -| `tbMisc_ShiftKeyStateUp` | Shift, on release | Records that the Shift key has been released. The IDE uses it internally. | -| `tbPanels_SetActiveLayoutDefault` | Ctrl+# | Switches to the default built-in panel layout. | -| `tbProject_Export` | Ctrl+E | Exports the project's sources to a folder. | -| `tbProject_FindInFiles` | Ctrl+Shift+F | Opens the Find and Replace panel with the Current Project scope chosen. | -| `tbProject_New` | Ctrl+N | Opens the front page on the list of templates for a new project. | -| `tbProject_Open` | Ctrl+O | Opens the dialog for choosing a project to open. | -| `tbProject_SaveAllChanges` | Ctrl+S | Saves the project and every document with unsaved changes. | -| `tbProject_ShowReferences` | Ctrl+T | Opens the project's References list. | -| `tbProjectExplorer_ClipboardPaste` | Ctrl+V | In the Project Explorer's file view, pastes the items on the clipboard. | -| `tbProjectExplorer_SelectedItemsClipboardCopy` | Ctrl+C, Ctrl+Insert | In the Project Explorer's file view, copies the selected items to the clipboard. | -| `tbProjectExplorer_SelectedItemsClipboardCut` | Ctrl+X, Shift+Delete | In the Project Explorer's file view, cuts the selected items to the clipboard. | -| `tbProjectExplorer_SelectedItemsDeletePermanently` | Delete | In the Project Explorer's file view, deletes the selected items, after asking if the Ask Before Delete Files option is on. | -| `tbProjectExplorer_SelectedItemsRename` | F2 | In the Project Explorer's file view, renames the selected item. | -| `tbProjectExplorer_ToggleFileMode` | Ctrl+R | Switches the Project Explorer between its file view and its object view. | -| `tbShowObjectBrowser` | F2, on release | Opens the Object Browser, for the text selected in the code editor. | -| `tbSignatureHelpCancel` | Esc, Up, Down | Dismisses the signature help that is showing. | -| `tbToolbox_SelectNextTool` | Down, Right | In the Toolbox, selects the next tool. | -| `tbToolbox_SelectPrevTool` | Up, Left | In the Toolbox, selects the previous tool. | -| `tbWatches_Add` | Shift+F9 | Adds a watch, starting from the text selected in the code editor. | +| tbBuild_Clean | | Cleans the project's build. | +| tbBuild_Fusion | Ctrl+Shift+B | Builds the Fusion host program that a project with ActiveX controls may need, without building the project. | +| tbBuild_Start | | Builds the project. | +| tbBuild_SwitchToWin32 | Ctrl+F2 | Sets the build target to 32-bit Windows. | +| tbBuild_SwitchToWin64 | Ctrl+F1 | Sets the build target to 64-bit Windows. | + +## `tbCallStack_` + +| Command | Keys | What it does | +|---|---|---| +| tbCallStack_FocusPanel | | Moves the focus to the Call Stack panel. | +| tbCallStack_HidePanel | | Closes the Call Stack panel. | +| tbCallStack_ShowPanel | Ctrl+L | Shows the Call Stack panel. | + +## `tbCompiler_` + +| Command | What it does | +|---|---| +| tbCompiler_Restart | Restarts the compiler. With the Alt key held down, it also empties the LLVM compiler cache. | +| tbCompiler_RestartAndFlushLlvmCache | Restarts the compiler and empties the LLVM compiler cache. | + +## `tbDebug_` + +| Command | Keys | What it does | +|---|---|---| +| tbDebug_BreakInto | Ctrl+Break | Pauses the running program. | +| tbDebug_BreakpointsClear | Ctrl+Shift+F9 | Removes every breakpoint from the project. | +| tbDebug_RunOrPreview | F6 | Runs the procedure at the cursor, or shows a preview of the form when the active file is a form. | +| tbDebug_SetNextExecutionStatement | Ctrl+F9 | At a breakpoint, makes the line at the cursor the next one to run. | +| tbDebug_StartOrContinue | F5 | Starts the project, or continues it from a breakpoint. | +| tbDebug_StepInto | F8, F11 | At a breakpoint, runs the current statement and stops at the next, entering any procedure it calls. | +| tbDebug_StepOut | Ctrl+Shift+F8, Shift+F11 | At a breakpoint, runs on until the current procedure ends and stops in its caller. | +| tbDebug_StepOver | Shift+F8, F10 | At a breakpoint, runs the current statement and stops at the next, without entering any procedure it calls. | +| tbDebug_Stop | | Ends the running program. | +| tbDebug_ToggleBreakOnAllErrors | | Turns the project's Break On All Errors setting on or off. | +| tbDebug_ToggleBreakpoint | F9 | Sets a breakpoint on the cursor's line, or removes the one that is there. | +| tbDebug_ToggleDebuggable | | Turns the project's Allow Breakpoints (Debuggable) setting on or off. | + +## `tbDebugConsole_` + +| Command | Keys | What it does | +|---|---|---| +| tbDebugConsole_Clear | | Clears the Debug Console. | +| tbDebugConsole_ClipboardCopyAll | | Copies everything in the Debug Console to the clipboard. | +| tbDebugConsole_ClipboardCopyAllWithTimestamps | | Copies everything in the Debug Console to the clipboard, each line with its time. | +| tbDebugConsole_ExecuteCode | | Runs the line of code given as its argument in the Debug Console, as in `tbDebugConsole_ExecuteCode('? 6*7')`. It does nothing without an argument. | +| tbDebugConsole_ExecuteEnteredLine | Enter | Runs the line typed in the Debug Console's entry box, or inserts the selected entry of the completion list. | +| tbDebugConsole_FocusPanel | Ctrl+G | Moves the focus to the Debug Console's entry box. | +| tbDebugConsole_GoToDefinition | Shift+F2, F12 | Goes to the definition of the symbol selected in the Debug Console's completion list. | +| tbDebugConsole_HidePanel | | Closes the Debug Console panel. | +| tbDebugConsole_HistoryCycleNext | Down | In the Debug Console's entry box, shows the next line of its history. | +| tbDebugConsole_HistoryCyclePrevious | Up | In the Debug Console's entry box, shows the previous line of its history. | +| tbDebugConsole_SelectAllEntryBox | Ctrl+A | Selects the whole text of the Debug Console's entry box. | +| tbDebugConsole_ShowPanel | Ctrl+G | Shows the Debug Console panel. | +| tbDebugConsole_ToggleAutoScroll | | Turns the Debug Console's Auto Scroll on or off. | +| tbDebugConsole_ToggleInvertOutputDirection | | Turns the Debug Console's Invert Output Direction option on or off. | +| tbDebugConsole_ToggleShowTimestamps | | Turns the Debug Console's Show Timestamps option on or off. | +| tbDebugConsole_TurnAutoScrollOff | | Turns the Debug Console's Auto Scroll off. | +| tbDebugConsole_TurnAutoScrollOn | | Turns the Debug Console's Auto Scroll on. | +| tbDebugConsole_TurnInvertOutputDirectionOff | | Turns the Debug Console's Invert Output Direction option off. | +| tbDebugConsole_TurnInvertOutputDirectionOn | | Turns the Debug Console's Invert Output Direction option on. | +| tbDebugConsole_TurnShowTimestampsOff | | Turns the Debug Console's Show Timestamps option off. | +| tbDebugConsole_TurnShowTimestampsOn | | Turns the Debug Console's Show Timestamps option on. | -## Commands with no default key +## `tbEditor_` -These commands run from a menu, a button or another command, and no key starts them. Any of them can be given a key in a group of your own, by writing its name and a key string, as [Keyboard shortcuts](../Customising/Keyboard-Shortcuts#the-text-of-a-group) explains. For example, `"tbMenu_ShowFileMenu": ["{KEYDOWN}{CTRL}{ALT}F"]` opens the File menu with Ctrl+Alt+F. +| Command | Keys | What it does | +|---|---|---| +| tbEditor_ActivateNextTab | Ctrl+Tab | Switches to the next editor tab. | +| tbEditor_ActivatePrevTab | Ctrl+Shift+Tab | Switches to the previous editor tab. | +| tbEditor_AddCursorAbove | Ctrl+Alt+Up | Adds a cursor on the line above. | +| tbEditor_AddCursorBelow | Ctrl+Alt+Down | Adds a cursor on the line below. | +| tbEditor_AddCursorsAtLineEndsOfSelection | Shift+Alt+I | Puts a cursor at the end of each line of the selection. | +| tbEditor_AddSelectionToNextFindMatch | Ctrl+D | Adds the next occurrence of the selected text to the selection, with a cursor at each. | +| tbEditor_ChangeAllOccurrences | | Selects every occurrence of the word at the cursor, for changing all at once. | +| tbEditor_ClearBookmarks | | Removes every bookmark from the current document. | +| tbEditor_ClearBookmarksProject | | Removes every bookmark from the project. | +| tbEditor_ClipboardCopy | Ctrl+C, Ctrl+Insert | Copies the selection to the clipboard, replacing tabs with spaces. | +| tbEditor_ClipboardCopyWithSyntaxHighlighting | | Copies the selection to the clipboard with its syntax colours. | +| tbEditor_ClipboardCut | Ctrl+X, Shift+Delete | Cuts the selection to the clipboard, replacing tabs with spaces. | +| tbEditor_ClipboardCutPlain | Ctrl+Shift+X | Cuts the selection to the clipboard as plain text, with the editor's own handling of tabs left out. | +| tbEditor_ClipboardPaste | Ctrl+V | Pastes the clipboard into the code editor, re-indenting the pasted text. | +| tbEditor_ClipboardPasteAsComment | Ctrl+Alt+V | Pastes the clipboard into the code editor as comment lines. | +| tbEditor_ClipboardPlainCopy | Ctrl+Shift+C | Copies the selection to the clipboard as plain text, with the editor's own handling of tabs left out. | +| tbEditor_ClipboardPlainPaste | Ctrl+Shift+V | Pastes the clipboard into the code editor exactly as it is, without re-indenting. | +| tbEditor_CloseTab | Ctrl+F4, Ctrl+W | Closes the current editor tab. | +| tbEditor_CodeSelector1_Dropdown | Ctrl+1 | Opens box 1 above the code editor, which lists the components of the file. | +| tbEditor_CodeSelector2_Dropdown | Ctrl+2 | Opens box 2 above the code editor, which lists the objects of the component. | +| tbEditor_CodeSelector3_Dropdown | Ctrl+3 | Opens box 3 above the code editor, which lists the procedures or events. | +| tbEditor_CommentSelection | Ctrl+K | Turns the selected lines into comments. | +| tbEditor_ConvertIndentationToSpaces | | Replaces the tabs that indent the document's lines with spaces. | +| tbEditor_ConvertIndentationToTabs | | Replaces the spaces that indent the document's lines with tabs. | +| tbEditor_CopyLineDown | Shift+Alt+Down | Copies the current line, or the selected lines, below themselves. | +| tbEditor_CopyLineUp | Shift+Alt+Up | Copies the current line, or the selected lines, above themselves. | +| tbEditor_CursorMoveBottom | Ctrl+End | Moves the cursor to the end of the document. | +| tbEditor_CursorMoveDown | Down | Moves the cursor down one line. | +| tbEditor_CursorMoveEndOfLine | End | Moves the cursor to the end of the line. | +| tbEditor_CursorMoveLeft | Left | Moves the cursor one character to the left. | +| tbEditor_CursorMoveLeftWord | Ctrl+Left | Moves the cursor to the start of the previous word. | +| tbEditor_CursorMovePageDown | Page Down | Moves the cursor down by one page. | +| tbEditor_CursorMovePageUp | Page Up | Moves the cursor up by one page. | +| tbEditor_CursorMoveRight | Right | Moves the cursor one character to the right. | +| tbEditor_CursorMoveRightWord | Ctrl+Right | Moves the cursor to the start of the next word. | +| tbEditor_CursorMoveStartOfLine | | Moves the cursor to the first column of the line. | +| tbEditor_CursorMoveStartOfLineHome | Home | Moves the cursor to the first non-blank character of the line, or to the first column if it is already there. | +| tbEditor_CursorMoveTop | Ctrl+Home | Moves the cursor to the start of the document. | +| tbEditor_CursorMoveUp | Up | Moves the cursor up one line. | +| tbEditor_CursorRedo | | Redoes a cursor movement or selection change that Cursor Undo undid. | +| tbEditor_CursorSelectBottom | Ctrl+Shift+End | Extends the selection to the end of the document. | +| tbEditor_CursorSelectDown | Shift+Down | Extends the selection down one line. | +| tbEditor_CursorSelectLeft | Shift+Left | Extends the selection one character to the left. | +| tbEditor_CursorSelectLeftWord | Ctrl+Shift+Left | Extends the selection to the start of the previous word. | +| tbEditor_CursorSelectLineEnd | Shift+End | Extends the selection to the end of the line. | +| tbEditor_CursorSelectLineStart | | Extends the selection to the first column of the line. | +| tbEditor_CursorSelectLineStartHome | Shift+Home | Extends the selection to the first non-blank character of the line, or to the first column if it is already there. | +| tbEditor_CursorSelectPageDown | Shift+Page Down | Extends the selection down by one page. | +| tbEditor_CursorSelectPageUp | Shift+Page Up | Extends the selection up by one page. | +| tbEditor_CursorSelectRight | Shift+Right | Extends the selection one character to the right. | +| tbEditor_CursorSelectRightWord | Ctrl+Shift+Right | Extends the selection to the start of the next word. | +| tbEditor_CursorSelectTop | Ctrl+Shift+Home | Extends the selection to the start of the document. | +| tbEditor_CursorSelectUp | Shift+Up | Extends the selection up one line. | +| tbEditor_CursorUndo | Ctrl+U | Undoes the last cursor movement or selection change, without undoing any text change. | +| tbEditor_DecreaseFontSize | Ctrl+- | Makes the code editor's font one pixel smaller, down to a size of 8 pixels, and saves the size as the Code Editor Font Size option. | +| tbEditor_DeleteLeft | Backspace, Shift+Backspace | Deletes the character before the cursor, or the selection. | +| tbEditor_DeleteLeftWord | Ctrl+Backspace | Deletes the word before the cursor. | +| tbEditor_DeleteLines | Ctrl+Shift+Delete | Deletes the current line, or the selected lines. | +| tbEditor_DeleteRight | Delete | Deletes the character after the cursor, or the selection. | +| tbEditor_DeleteRightWord | Ctrl+Delete | Deletes the word after the cursor. | +| tbEditor_ExpandLineSelection | Ctrl+L | Extends the selection to include the whole of the current line. | +| tbEditor_ExpandSelection | Shift+Alt+Right | Widens the selection to the next larger syntactic block. | +| tbEditor_Find | Ctrl+F | Opens the Find and Replace panel, searching for the selected text, or the word at the cursor. | +| tbEditor_FindReplace | Ctrl+H | Opens the Find and Replace panel, as the Find command does. | +| tbEditor_FindSelectedNext | Ctrl+F3 | Moves to the next occurrence of the selected text. | +| tbEditor_FindSelectedPrev | Ctrl+Shift+F3 | Moves to the previous occurrence of the selected text. | +| tbEditor_FindWidget_Next | Alt+F3 | Moves to the next match of the current search. | +| tbEditor_FindWidget_Prev | Shift+Alt+F3 | Moves to the previous match of the current search. | +| tbEditor_FindWidget_SelectAllMatches | Alt+A | Selects every match of the current search in the editor. | +| tbEditor_FocusPanel | | Moves the focus to the code editor. | +| tbEditor_Fold | Ctrl+{ | Folds the block at the cursor. | +| tbEditor_FoldAll | | Folds every block in the document. | +| tbEditor_FoldProcedures | Ctrl+Alt+Left | Folds every procedure in the file except the one the cursor is in. | +| tbEditor_FormatDocument | | Formats the whole document. | +| tbEditor_FormatSelection | | Formats the selected code. | +| tbEditor_GoToDefinition | Shift+F2, F12 | Goes to the definition of the symbol at the cursor. | +| tbEditor_GotoLineColumn | | Opens the box for going to a line and column. | +| tbEditor_HidePanel | | Closes the code editor panel. | +| tbEditor_IncreaseFontSize | Ctrl++ | Makes the code editor's font one pixel larger and saves the size as the Code Editor Font Size option. | +| tbEditor_Indent | Tab | Indents the line or the selected lines, or inserts a tab at the cursor. | +| tbEditor_IndentLine | Ctrl+] | Indents the selected lines. | +| tbEditor_InsertAmpersand | & | Types an ampersand. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertBackslash | \ | Types a backslash. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertBracketClose | | Types a closing parenthesis. | +| tbEditor_InsertBracketOpen | | Types an opening parenthesis, or puts the selected text in parentheses. | +| tbEditor_InsertColon | : | Types a colon. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertComma | , | Types a comma. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertEquals | = | Types an equals sign. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertExclamation | ! | Types an exclamation mark. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertLineAbove | Ctrl+Shift+Enter | Inserts an empty line above the cursor's line and moves the cursor to it. | +| tbEditor_InsertLineBelow | Ctrl+Enter | Inserts an empty line below the cursor's line and moves the cursor to it. | +| tbEditor_InsertLineBreak | Enter | Breaks the line at the cursor, as the Enter key does. This is bound to the key so that the IDE can do its own work on the new line. | +| tbEditor_InsertMinus | - | Types a minus sign. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertMultiply | * | Types an asterisk. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertPeriod | . | Types a full stop. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertPlus | + | Types a plus sign. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertSlash | / | Types a slash. The key is bound to a command so that the IDE can react to it. | +| tbEditor_InsertSpace | Space, Shift+Space | Types a space. The key is bound to a command so that the IDE can react to it. | +| tbEditor_JumpToNextProblem | Alt+F8 | Moves the cursor to the next error or warning in the document. | +| tbEditor_JumpToPrevProblem | Shift+Alt+F8 | Moves the cursor to the previous error or warning in the document. | +| tbEditor_LastPosition | Ctrl+Shift+F2 | Returns to the most recently recorded position, at the start of its line, opening its file if needed. | +| tbEditor_MoveLinesDown | Alt+Down | Moves the current line, or the selected lines, down one line. | +| tbEditor_MoveLinesUp | Alt+Up | Moves the current line, or the selected lines, up one line. | +| tbEditor_MoveToProcedureNext | Ctrl+Down | Moves the cursor to the start of the next procedure. | +| tbEditor_MoveToProcedurePrev | Ctrl+Up | Moves the cursor to the start of the previous procedure. | +| tbEditor_NextBookmark | | Moves the cursor to the next bookmark. | +| tbEditor_OpenTabsDropDown | | Opens the list of open editor tabs. | +| tbEditor_Outdent | Shift+Tab | Outdents the line or the selected lines. | +| tbEditor_OutdentLine | Ctrl+[ | Outdents the selected lines. | +| tbEditor_PrevBookmark | Ctrl+M | Moves the cursor to the previous bookmark. | +| tbEditor_Redo | Ctrl+Y | Redoes the last change that was undone in the current document. | +| tbEditor_RenameSymbol | F2 | Renames the symbol at the cursor everywhere it is used. | +| tbEditor_ReopenLastClosedTab | Ctrl+Shift+T | Reopens the editor tab that was closed last. | +| tbEditor_Save | | Never runs: saving a single document is turned off. Use the commands that save the project. | +| tbEditor_ScrollTabLeft | | Scrolls the row of editor tabs to the left. The left tab button runs it. | +| tbEditor_ScrollTabRight | | Scrolls the row of editor tabs to the right. The right tab button runs it. | +| tbEditor_SelectAll | Ctrl+A | Selects the whole document. | +| tbEditor_SelectAllMatches | Ctrl+Shift+L | Selects every occurrence of the word at the cursor, or of the selected text. | +| tbEditor_ShowContextMenu | Shift+F10 | Opens the code editor's context menu at the top left of the editor. | +| tbEditor_ShowMonacoCommandPalette | | Opens the command palette of the Monaco code editor. | +| tbEditor_ShowPanel | | Shows the code editor panel. | +| tbEditor_ShrinkSelection | Shift+Alt+Left | Narrows the selection to the next smaller syntactic block. | +| tbEditor_SortLinesAscending | | Sorts the selected lines in ascending order. | +| tbEditor_SortLinesDescending | | Sorts the selected lines in descending order. | +| tbEditor_SwitchToCode | | Switches from a form designer to the code of the same file. | +| tbEditor_SwitchToFormDesign | Shift+F7 | Switches from the code of a file to its form designer. | +| tbEditor_SwitchToggleFormDesignCode | | Switches between the form designer and the code of the same file. | +| tbEditor_ToggleAdvancedInfoOnHover | | Turns the Show Advanced Info On Hover option on or off. | +| tbEditor_ToggleAutoPrettifyCode | | Turns the project's Auto Prettify option on or off. | +| tbEditor_ToggleBlockComment | Shift+Alt+A | Wraps the selection in a block comment, or removes the block comment around it. | +| tbEditor_ToggleBookmark | Ctrl+B | Sets a bookmark on the cursor's line, or removes the one that is there. | +| tbEditor_ToggleCodeFoldingAlways | | Turns on or off showing the code folding arrows all the time, not only when the pointer is over the margin. | +| tbEditor_ToggleCodeFoldingVisibility | | Shows or hides the code folding arrows. | +| tbEditor_ToggleCodeHintsAlwaysVisible | | Turns the Code Hints Always Visible option on or off. | +| tbEditor_ToggleCodeLensShowProc | | Turns the project's Show CodeLens Run Procedure option on or off. | +| tbEditor_ToggleLineComment | Ctrl+/ | Comments the selected lines, or uncomments them if they are all comments already. | +| tbEditor_ToggleMiniMapVisibility | | Shows or hides the minimap. | +| tbEditor_ToggleShowCodeHints | | Shows or hides the inline code hints. | +| tbEditor_ToggleShowIndentGuides | | Shows or hides the indent guides. | +| tbEditor_ToggleShowLineNumbers | | Shows or hides the line numbers. | +| tbEditor_ToggleShowSingleRowOfTabs | | Turns the Show Single Row Of Tabs option on or off. | +| tbEditor_ToggleStickyScroll | | Turns the Sticky Scroll option on or off. | +| tbEditor_ToggleWordWrap | Alt+Z | Turns word wrap on or off in the code editor. | +| tbEditor_TransformToLowercase | | Changes the selected text to lower case. | +| tbEditor_TransformToSnakecase | | Changes the selected text to snake case. | +| tbEditor_TransformToTitlecase | | Changes the selected text to title case. | +| tbEditor_TransformToUppercase | | Changes the selected text to upper case. | +| tbEditor_TurnShowCodeHintsOff | Ctrl, on release | Hides the inline code hints. The Ctrl key runs it when it is released. | +| tbEditor_TurnShowCodeHintsOn | Ctrl | Shows the inline code hints. The Ctrl key runs it when it goes down. | +| tbEditor_TurnWordWrapOff | | Turns word wrap off in the code editor. | +| tbEditor_TurnWordWrapOn | | Turns word wrap on in the code editor. | +| tbEditor_UncommentSelection | Ctrl+Shift+K | Removes the comment marker from the selected lines. | +| tbEditor_Undo | Ctrl+Z | Undoes the last change in the current document. | +| tbEditor_Unfold | Ctrl+} | Unfolds the block at the cursor. | +| tbEditor_UnfoldAll | | Unfolds every block in the document. | +| tbEditor_UnfoldProcedures | Ctrl+Alt+Right | Unfolds every procedure in the file. | + +## `tbFileSystem_` | Command | What it does | |---|---| -| `tbBuild_Clean` | Cleans the project's build. | -| `tbBuild_Start` | Builds the project. | -| `tbCallStack_FocusPanel` | Moves the focus to the Call Stack panel. | -| `tbCallStack_HidePanel` | Closes the Call Stack panel. | -| `tbCompiler_Restart` | Restarts the compiler. With the Alt key held down, it also empties the LLVM compiler cache. | -| `tbCompiler_RestartAndFlushLlvmCache` | Restarts the compiler and empties the LLVM compiler cache. | -| `tbDebug_Stop` | Ends the running program. | -| `tbDebug_ToggleBreakOnAllErrors` | Turns the project's Break On All Errors setting on or off. | -| `tbDebug_ToggleDebuggable` | Turns the project's Allow Breakpoints (Debuggable) setting on or off. | -| `tbDebugConsole_Clear` | Clears the Debug Console. | -| `tbDebugConsole_ClipboardCopyAll` | Copies everything in the Debug Console to the clipboard. | -| `tbDebugConsole_ClipboardCopyAllWithTimestamps` | Copies everything in the Debug Console to the clipboard, each line with its time. | -| `tbDebugConsole_ExecuteCode` | Runs the line of code given as its argument in the Debug Console, as in `tbDebugConsole_ExecuteCode('? 6*7')`. It does nothing without an argument. | -| `tbDebugConsole_HidePanel` | Closes the Debug Console panel. | -| `tbDebugConsole_ToggleAutoScroll` | Turns the Debug Console's Auto Scroll on or off. | -| `tbDebugConsole_ToggleInvertOutputDirection` | Turns the Debug Console's Invert Output Direction option on or off. | -| `tbDebugConsole_ToggleShowTimestamps` | Turns the Debug Console's Show Timestamps option on or off. | -| `tbDebugConsole_TurnAutoScrollOff` | Turns the Debug Console's Auto Scroll off. | -| `tbDebugConsole_TurnAutoScrollOn` | Turns the Debug Console's Auto Scroll on. | -| `tbDebugConsole_TurnInvertOutputDirectionOff` | Turns the Debug Console's Invert Output Direction option off. | -| `tbDebugConsole_TurnInvertOutputDirectionOn` | Turns the Debug Console's Invert Output Direction option on. | -| `tbDebugConsole_TurnShowTimestampsOff` | Turns the Debug Console's Show Timestamps option off. | -| `tbDebugConsole_TurnShowTimestampsOn` | Turns the Debug Console's Show Timestamps option on. | -| `tbEditor_ChangeAllOccurrences` | Selects every occurrence of the word at the cursor, for changing all at once. | -| `tbEditor_ClearBookmarks` | Removes every bookmark from the current document. | -| `tbEditor_ClearBookmarksProject` | Removes every bookmark from the project. | -| `tbEditor_ClipboardCopyWithSyntaxHighlighting` | Copies the selection to the clipboard with its syntax colours. | -| `tbEditor_ConvertIndentationToSpaces` | Replaces the tabs that indent the document's lines with spaces. | -| `tbEditor_ConvertIndentationToTabs` | Replaces the spaces that indent the document's lines with tabs. | -| `tbEditor_CursorMoveStartOfLine` | Moves the cursor to the first column of the line. | -| `tbEditor_CursorRedo` | Redoes a cursor movement or selection change that Cursor Undo undid. | -| `tbEditor_CursorSelectLineStart` | Extends the selection to the first column of the line. | -| `tbEditor_FocusPanel` | Moves the focus to the code editor. | -| `tbEditor_FoldAll` | Folds every block in the document. | -| `tbEditor_FormatDocument` | Formats the whole document. | -| `tbEditor_FormatSelection` | Formats the selected code. | -| `tbEditor_GotoLineColumn` | Opens the box for going to a line and column. | -| `tbEditor_HidePanel` | Closes the code editor panel. | -| `tbEditor_InsertBracketClose` | Types a closing parenthesis. | -| `tbEditor_InsertBracketOpen` | Types an opening parenthesis, or puts the selected text in parentheses. | -| `tbEditor_NextBookmark` | Moves the cursor to the next bookmark. | -| `tbEditor_OpenTabsDropDown` | Opens the list of open editor tabs. | -| `tbEditor_Save` | Never runs: saving a single document is turned off. Use the commands that save the project. | -| `tbEditor_ScrollTabLeft` | Scrolls the row of editor tabs to the left. The left tab button runs it. | -| `tbEditor_ScrollTabRight` | Scrolls the row of editor tabs to the right. The right tab button runs it. | -| `tbEditor_ShowMonacoCommandPalette` | Opens the command palette of the Monaco code editor. | -| `tbEditor_ShowPanel` | Shows the code editor panel. | -| `tbEditor_SortLinesAscending` | Sorts the selected lines in ascending order. | -| `tbEditor_SortLinesDescending` | Sorts the selected lines in descending order. | -| `tbEditor_SwitchToCode` | Switches from a form designer to the code of the same file. | -| `tbEditor_SwitchToggleFormDesignCode` | Switches between the form designer and the code of the same file. | -| `tbEditor_ToggleAdvancedInfoOnHover` | Turns the Show Advanced Info On Hover option on or off. | -| `tbEditor_ToggleAutoPrettifyCode` | Turns the project's Auto Prettify option on or off. | -| `tbEditor_ToggleCodeFoldingAlways` | Turns on or off showing the code folding arrows all the time, not only when the pointer is over the margin. | -| `tbEditor_ToggleCodeFoldingVisibility` | Shows or hides the code folding arrows. | -| `tbEditor_ToggleCodeHintsAlwaysVisible` | Turns the Code Hints Always Visible option on or off. | -| `tbEditor_ToggleCodeLensShowProc` | Turns the project's Show CodeLens Run Procedure option on or off. | -| `tbEditor_ToggleMiniMapVisibility` | Shows or hides the minimap. | -| `tbEditor_ToggleShowCodeHints` | Shows or hides the inline code hints. | -| `tbEditor_ToggleShowIndentGuides` | Shows or hides the indent guides. | -| `tbEditor_ToggleShowLineNumbers` | Shows or hides the line numbers. | -| `tbEditor_ToggleShowSingleRowOfTabs` | Turns the Show Single Row Of Tabs option on or off. | -| `tbEditor_ToggleStickyScroll` | Turns the Sticky Scroll option on or off. | -| `tbEditor_TransformToLowercase` | Changes the selected text to lower case. | -| `tbEditor_TransformToSnakecase` | Changes the selected text to snake case. | -| `tbEditor_TransformToTitlecase` | Changes the selected text to title case. | -| `tbEditor_TransformToUppercase` | Changes the selected text to upper case. | -| `tbEditor_TurnWordWrapOff` | Turns word wrap off in the code editor. | -| `tbEditor_TurnWordWrapOn` | Turns word wrap on in the code editor. | -| `tbEditor_UnfoldAll` | Unfolds every block in the document. | -| `tbFileSystem_AddClassCLS` | Adds a class in a .cls file to the project, with a name box for its name. | -| `tbFileSystem_AddClassTWIN` | Adds a class in a .twin file to the project, with a name box for its name. | -| `tbFileSystem_AddCustomControlsForm` | Adds a CustomControls form to the project, with a name box for its name. If the project does not reference the CustomControls package, asks to add it. | -| `tbFileSystem_AddFolder` | Adds a folder to the project, with a name box for its name. | -| `tbFileSystem_AddModuleBAS` | Adds a module in a .bas file to the project, with a name box for its name. | -| `tbFileSystem_AddModuleTWIN` | Adds a module in a .twin file to the project, with a name box for its name. | -| `tbFileSystem_AddOtherFile` | Adds a file of any other type to the project, with a name box for its name. | -| `tbFileSystem_AddResourceMessageTable` | Adds a message table to the project's resources and opens it. | -| `tbFileSystem_AddResourceStringTable` | Adds a string table to the project's resources and opens it. | -| `tbFileSystem_AddResourceVisualStylesManifest` | Adds the Visual Styles manifest to the project's resources and opens it. | -| `tbFileSystem_AddWindowsForm` | Adds a Windows form to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | -| `tbFileSystem_AddWindowsMDIForm` | Adds a Windows MDI form to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | -| `tbFileSystem_AddWindowsPropertyPage` | Adds a Windows property page to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | -| `tbFileSystem_AddWindowsReport` | Adds a Windows report to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | -| `tbFileSystem_AddWindowsUserControl` | Adds a Windows user control to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | -| `tbFileSystem_ImportFile` | Opens the dialog for choosing files to import into the project. | -| `tbFindReplace_FocusPanel` | Moves the focus to the Find and Replace panel. | -| `tbFindReplace_HidePanel` | Closes the Find and Replace panel. | -| `tbFindReplace_ShowPanel` | Shows the Find and Replace panel. | -| `tbFindWidget_FindNextAlways` | In the quick find box, moves to the next match. It has no default key. | -| `tbFindWidget_FindPrev` | In the quick find box, moves to the previous match. It has no default key. | -| `tbFormDesginer_DecreaseSpacingHorizontal` | Narrows the horizontal gaps between the selected controls by one grid step. | -| `tbFormDesginer_DecreaseSpacingVertical` | Narrows the vertical gaps between the selected controls by one grid step. | -| `tbFormDesginer_IncreaseSpacingHorizontal` | Widens the horizontal gaps between the selected controls by one grid step. | -| `tbFormDesginer_IncreaseSpacingVertical` | Widens the vertical gaps between the selected controls by one grid step. | -| `tbFormDesginer_MakeEqualSpacingHorizontal` | Spaces three or more selected controls evenly from left to right. | -| `tbFormDesginer_MakeEqualSpacingVertical` | Spaces three or more selected controls evenly from top to bottom. | -| `tbFormDesginer_RemoveSpacingHorizontal` | Removes the horizontal gaps between the selected controls. | -| `tbFormDesginer_RemoveSpacingVertical` | Removes the vertical gaps between the selected controls. | -| `tbFormDesigner_AlignSelectedControlsCenterHorizontal` | Aligns the horizontal centres of the selected controls. | -| `tbFormDesigner_AlignSelectedControlsCenterVertical` | Aligns the vertical centres of the selected controls. | -| `tbFormDesigner_AlignSelectedControlsToGrid` | Moves the selected controls to the nearest grid points. | -| `tbFormDesigner_BringControlToFront` | Brings the selected controls to the front. | -| `tbFormDesigner_CenterSelectedGroupInContainerHorizontal` | Centres the selected controls as a group, from left to right, in their container. | -| `tbFormDesigner_CenterSelectedGroupInContainerVertical` | Centres the selected controls as a group, from top to bottom, in their container. | -| `tbFormDesigner_ClipboardPasteControlArray` | Pastes the controls on the clipboard with their names kept, so that they join the control arrays of the controls with those names. | -| `tbFormDesigner_DuplicateControlsIntoControlArray` | Duplicates the selected controls as members of control arrays. | -| `tbFormDesigner_DuplicateControlsWithNewNames` | Duplicates the selected controls, giving each copy a new name. | -| `tbFormDesigner_LaunchPreview` | Runs a preview of the form being designed. | -| `tbFormDesigner_LockAllControls` | Locks every control on the form. | -| `tbFormDesigner_LockSelectedControls` | Locks the selected controls. | -| `tbFormDesigner_MenuEditorCopy` | In the menu editor, copies the selected menu item to the clipboard. | -| `tbFormDesigner_MenuEditorCut` | In the menu editor, cuts the selected menu item to the clipboard. | -| `tbFormDesigner_MenuEditorInsertAbove` | In the menu editor, inserts a new item above the selected menu item. | -| `tbFormDesigner_MenuEditorInsertBelow` | In the menu editor, inserts a new item below the selected menu item. | -| `tbFormDesigner_MenuEditorInsertLeft` | In the menu editor, inserts a new menu to the left of the selected top-level menu. | -| `tbFormDesigner_MenuEditorInsertRight` | In the menu editor, inserts a new menu to the right of the selected top-level menu. | -| `tbFormDesigner_MenuEditorInsertSeperatorAfter` | In the menu editor, inserts a separator below the selected menu item. | -| `tbFormDesigner_MenuEditorInsertSeperatorBefore` | In the menu editor, inserts a separator above the selected menu item. | -| `tbFormDesigner_MenuEditorPasteAfter` | In the menu editor, pastes the clipboard after the selected menu item. | -| `tbFormDesigner_MenuEditorPasteBefore` | In the menu editor, pastes the clipboard before the selected menu item. | -| `tbFormDesigner_MenuEditorPasteInto` | In the menu editor, pastes the clipboard into the selected menu item. | -| `tbFormDesigner_MenuEditorToggleEnabled` | In the menu editor, turns the Enabled property of the selected menu item on or off. | -| `tbFormDesigner_MenuEditorToggleVisible` | In the menu editor, turns the Visible property of the selected menu item on or off. | -| `tbFormDesigner_SendControlToBack` | Sends the selected controls to the back. | -| `tbFormDesigner_ShowSelectedControlActiveXPropertyPage` | Opens the property page of the selected ActiveX control. | -| `tbFormDesigner_ToggleAlignControlsToGrid` | Turns on or off snapping controls to the grid. | -| `tbFormDesigner_ToggleControlOutlines` | Shows or hides the outlines of the controls. | -| `tbFormDesigner_ToggleGridIndicators` | Shows or hides the grid in the form designer. | -| `tbFormDesigner_ToggleInPlaceEditingToolbar` | Shows or hides the small in-place editing toolbar below a selected control. | -| `tbFormDesigner_ToggleLockAllControls` | Locks every control on the form that is unlocked, and unlocks each one that is locked. | -| `tbFormDesigner_ToggleLockSelectedControls` | Locks each selected control that is unlocked, and unlocks each one that is locked. | -| `tbFormDesigner_ToggleMultiColouredGrabbers` | Turns the multi-coloured selection handles on or off. | -| `tbFormDesigner_ToggleShowTabIndex` | Shows or hides the tab index of each control. | -| `tbFormDesigner_TurnAlignControlsToGridOff` | Turns off snapping controls to the grid. | -| `tbFormDesigner_TurnAlignControlsToGridOn` | Turns on snapping controls to the grid. | -| `tbFormDesigner_TurnControlOutlinesOff` | Hides the outlines of the controls. | -| `tbFormDesigner_TurnControlOutlinesOn` | Shows the outlines of the controls. | -| `tbFormDesigner_TurnGridIndicatorsOff` | Hides the grid in the form designer. | -| `tbFormDesigner_TurnGridIndicatorsOn` | Shows the grid in the form designer. | -| `tbFormDesigner_TurnInPlaceEditingToolbarOff` | Hides the small in-place editing toolbar below a selected control. | -| `tbFormDesigner_TurnInPlaceEditingToolbarOn` | Shows the small in-place editing toolbar below a selected control. | -| `tbFormDesigner_UnlockAllControls` | Unlocks every control on the form. | -| `tbFormDesigner_UnlockSelectedControls` | Unlocks the selected controls. | -| `tbFormDesigner_ZoomDecrease` | Moves to the next smaller zoom in the form designer's zoom list. | -| `tbFormDesigner_ZoomDropDown` | Opens the zoom list of the form designer. | -| `tbFormDesigner_ZoomIncrease` | Moves to the next larger zoom in the form designer's zoom list. | -| `tbHelp_AskErrorReporting` | Opens the dialog that asks whether the IDE may report its errors automatically. | -| `tbHelp_EnterLicenceKey` | Opens the dialog for entering a licence key. | -| `tbHelp_OpenDiscordWebsite` | Opens the twinBASIC Discord invitation in the default web browser. | -| `tbHelp_OpenGithubWebsite` | Opens the twinBASIC GitHub repository in the default web browser. | -| `tbHelp_OpenKofiWebsite` | Opens the twinBASIC Ko-fi page in the default web browser. | -| `tbHelp_OpenTwitterWebsite` | Opens the twinBASIC author's Twitter page in the default web browser. | -| `tbHelp_PurchaseALicence` | Opens the twinBASIC licence purchase page in the default web browser. | -| `tbHelp_ShowAboutWindow` | Opens the About window. | -| `tbHelp_ShowLicenceAgreement` | Shows the licence agreement. | -| `tbHelp_ToggleCompilerTraceMode` | Turns the compiler's trace mode on or off and restarts the compiler. | -| `tbHistory_FocusPanel` | Moves the focus to the History panel. | -| `tbHistory_HidePanel` | Closes the History panel. | -| `tbHistory_ShowPanel` | Shows the History panel. | -| `tbIde_ShowIDEOptions` | Opens the IDE Options dialog. | -| `tbIdeDevTools_Show` | Opens the developer tools of the IDE's web view. | -| `tbIdeWindow_MaximizeOrRestore` | Maximises the IDE window, or restores it when it is already maximised. | -| `tbIdeWindow_Minimize` | Minimises the IDE window. | -| `tbKeyboardShortcuts_ShowManageKeyboardShortcuts` | Opens the dialog for managing keyboard shortcut groups. | -| `tbKeyboardShortcuts_ShowWarningCannotDisableBuilinGroup` | Shows a message that the built-in keyboard shortcut group cannot be turned off, and says to override a command in a group of your own instead. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom1` | Turns on or off the keyboard shortcut group that is number 1 in the list of your own groups, if there is one. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom10` | Turns on or off the keyboard shortcut group that is number 10 in the list of your own groups, if there is one. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom2` | Turns on or off the keyboard shortcut group that is number 2 in the list of your own groups, if there is one. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom3` | Turns on or off the keyboard shortcut group that is number 3 in the list of your own groups, if there is one. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom4` | Turns on or off the keyboard shortcut group that is number 4 in the list of your own groups, if there is one. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom5` | Turns on or off the keyboard shortcut group that is number 5 in the list of your own groups, if there is one. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom6` | Turns on or off the keyboard shortcut group that is number 6 in the list of your own groups, if there is one. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom7` | Turns on or off the keyboard shortcut group that is number 7 in the list of your own groups, if there is one. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom8` | Turns on or off the keyboard shortcut group that is number 8 in the list of your own groups, if there is one. | -| `tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom9` | Turns on or off the keyboard shortcut group that is number 9 in the list of your own groups, if there is one. | -| `tbMenu_ShowAddinsMenu` | Opens the Addins menu. | -| `tbMenu_ShowDebugMenu` | Opens the Debug menu. | -| `tbMenu_ShowEditMenu` | Opens the Edit menu. | -| `tbMenu_ShowFileMenu` | Opens the File menu. | -| `tbMenu_ShowFormatMenu` | Opens the Format menu. | -| `tbMenu_ShowHelpMenu` | Opens the Help menu. | -| `tbMenu_ShowProjectMenu` | Opens the Project menu. | -| `tbMenu_ShowRunMenu` | Opens the Run menu. | -| `tbMenu_ShowToolsMenu` | Opens the Tools menu. | -| `tbMenu_ShowViewMenu` | Opens the View menu. | -| `tbMenu_ShowWindowMenu` | Opens the Window menu. | -| `tbMisc_ShowTestMessage` | Shows a test message box. | -| `tbOpenEditors_FocusPanel` | Moves the focus to the Open Editors panel. | -| `tbOpenEditors_HidePanel` | Closes the Open Editors panel. | -| `tbOpenEditors_ShowPanel` | Shows the Open Editors panel. | -| `tbOutline_FocusPanel` | Moves the focus to the Outline panel. | -| `tbOutline_HidePanel` | Closes the Outline panel. | -| `tbOutline_ShowPanel` | Shows the Outline panel. | -| `tbPackagePublishing_FocusPanel` | Moves the focus to the Package Publishing panel. | -| `tbPackagePublishing_HidePanel` | Closes the Package Publishing panel. | -| `tbPackagePublishing_ShowPanel` | Shows the Package Publishing panel. | -| `tbPanels_SaveCurrentPanelLayoutAs` | Asks for a name and saves the current panel layout under it. | -| `tbPanels_SetActiveLayoutCustom1` | Switches to the panel layout that is number 1 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutCustom10` | Switches to the panel layout that is number 10 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutCustom2` | Switches to the panel layout that is number 2 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutCustom3` | Switches to the panel layout that is number 3 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutCustom4` | Switches to the panel layout that is number 4 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutCustom5` | Switches to the panel layout that is number 5 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutCustom6` | Switches to the panel layout that is number 6 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutCustom7` | Switches to the panel layout that is number 7 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutCustom8` | Switches to the panel layout that is number 8 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutCustom9` | Switches to the panel layout that is number 9 in the list of saved layouts, if there is one. | -| `tbPanels_SetActiveLayoutFullScreen` | Switches to the full screen editor panel layout. | -| `tbPanels_ShowManagePanelLayouts` | Opens the dialog for managing the saved panel layouts. | -| `tbPanels_TogglePreventDockedMove` | Turns on or off the option that stops docked panels from being moved. | -| `tbPanels_TogglePreventDockedResize` | Turns on or off the option that stops docked panels from being resized. | -| `tbPanels_TogglePreventDockedTearout` | Turns on or off the option that stops docked panels from being pulled out of their dock. | -| `tbPanels_TogglePreventFloatingMove` | Turns on or off the option that stops floating panels from being moved. | -| `tbPanels_TogglePreventFloatingResize` | Turns on or off the option that stops floating panels from being resized. | -| `tbProblems_ClipboardCopyAll` | Copies everything in the Problems panel to the clipboard as a compilation error report. | -| `tbProblems_ClipboardCopyAllErrors` | Copies the errors of the Problems panel to the clipboard as a compilation error report. | -| `tbProblems_CollapseAll` | Collapses every entry in the Problems panel. | -| `tbProblems_ExpandAll` | Expands every entry in the Problems panel. | -| `tbProblems_FocusPanel` | Moves the focus to the Problems panel. | -| `tbProblems_HidePanel` | Closes the Problems panel. | -| `tbProblems_ShowPanel` | Shows the Problems panel. | -| `tbProblems_ToggleShowErrors` | Shows or hides the errors in the Problems panel. | -| `tbProblems_ToggleShowHints` | Shows or hides the hints in the Problems panel. | -| `tbProblems_ToggleShowInfos` | Shows or hides the information messages in the Problems panel. | -| `tbProblems_ToggleShowWarnings` | Shows or hides the warnings in the Problems panel. | -| `tbProblems_TurnShowErrorsOff` | Hides the errors in the Problems panel. | -| `tbProblems_TurnShowErrorsOn` | Shows the errors in the Problems panel. | -| `tbProblems_TurnShowHintsOff` | Hides the hints in the Problems panel. | -| `tbProblems_TurnShowHintsOn` | Shows the hints in the Problems panel. | -| `tbProblems_TurnShowInfosOff` | Hides the information messages in the Problems panel. | -| `tbProblems_TurnShowInfosOn` | Shows the information messages in the Problems panel. | -| `tbProblems_TurnShowWarningsOff` | Hides the warnings in the Problems panel. | -| `tbProblems_TurnShowWarningsOn` | Shows the warnings in the Problems panel. | -| `tbProject_AddCustomControlsPackage` | Adds the CustomControls package to the project. | -| `tbProject_AddWinNativeFormsPackage` | Adds the WinNativeForms package to the project. | -| `tbProject_Close` | Closes the project. | -| `tbProject_OpenBuildFolder` | Opens the project's build folder in Windows Explorer. A project that has not been saved gets a message instead. | -| `tbProject_OpenProjectFolder` | Opens the folder that holds the project file in Windows Explorer. A project that has not been saved gets a message instead. | -| `tbProject_OpenRecent` | Opens the front page on the list of recent projects. | -| `tbProject_SaveAs` | Asks for a new name and place for the project and saves it there. | -| `tbProject_ShowSettings` | Opens the project's Settings in an editor. | -| `tbProjectExplorer_FocusPanel` | Moves the focus to the Project Explorer. | -| `tbProjectExplorer_HidePanel` | Closes the Project Explorer panel. | -| `tbProjectExplorer_ObjectList_DeleteSelected` | Shows only a message box with its own name; deleting is not implemented. | -| `tbProjectExplorer_ObjectList_RenameSelected` | Shows only a message box with its own name; renaming is not implemented. | -| `tbProjectExplorer_ObjectList_ViewSelectedCode` | In the object view of the Project Explorer, opens the code of the selected object. | -| `tbProjectExplorer_ObjectList_ViewSelectedObject` | In the object view of the Project Explorer, opens the form of the selected object. | -| `tbProjectExplorer_Search` | Opens the search box of the Project Explorer's object view, or moves the focus to it. | -| `tbProjectExplorer_SelectedItemsClipboardCopyName` | In the Project Explorer's file view, copies the names of the selected items to the clipboard. | -| `tbProjectExplorer_SelectedItemsClipboardCopyPath` | In the Project Explorer's file view, copies the paths of the selected items to the clipboard. | -| `tbProjectExplorer_SelectedItemsExport` | In the Project Explorer's file view, exports the selected items to a folder. | -| `tbProjectExplorer_SelectedItemsViewAsJSON` | In the Project Explorer's file view, opens the selected file as JSON. | -| `tbProjectExplorer_SelectedItemsViewAsMarkdownPreview` | In the Project Explorer's file view, opens the selected file as a Markdown preview. | -| `tbProjectExplorer_ShowAddMenu` | Opens the menu for adding a component to the project, below the Add button of the Project Explorer. | -| `tbProjectExplorer_ShowPanel` | Shows the Project Explorer panel. | -| `tbProjectExplorer_ToggleFileModeOff` | Switches the Project Explorer to its object view. | -| `tbProjectExplorer_ToggleFileModeOn` | Switches the Project Explorer to its file view. | -| `tbProperties_FocusPanel` | Moves the focus to the Properties panel. | -| `tbProperties_HidePanel` | Closes the Properties panel. | -| `tbProperties_Search` | Opens the search box of the Properties panel, or moves the focus to it. | -| `tbProperties_ShowPanel` | Shows the Properties panel. | -| `tbTheme_SwitchToDarkMode` | Switches the IDE to the dark colour theme. | -| `tbTheme_SwitchToggle` | Switches the IDE between the dark and light colour themes. | -| `tbTheme_SwitchToLightClassicMode` | Switches the IDE to the classic light colour theme. | -| `tbTheme_SwitchToLightMode` | Switches the IDE to the light colour theme. | -| `tbThemes_Reload` | Reloads the themes from their files on disk. | -| `tbThemes_ShowList` | Opens the list of themes beside the colour mode button. | -| `tbToolbar_HidePanel` | Closes the Toolbar panel. | -| `tbToolbar_ShowPanel` | Shows the Toolbar panel. | -| `tbToolbox_FocusPanel` | Moves the focus to the Toolbox panel. | -| `tbToolbox_HidePanel` | Closes the Toolbox panel. | -| `tbToolbox_Search` | Opens the search box of the Toolbox, or moves the focus to it. | -| `tbToolbox_ShowMoreComponents` | Shows a message about adding components to the Toolbox, which says to add an ordinary COM reference to the ActiveX type library. | -| `tbToolbox_ShowPanel` | Shows the Toolbox panel. | -| `tbToolbox_ToggleShowControlNames` | Shows or hides the names of the controls in the Toolbox. | -| `tbToolbox_TurnShowControlNamesOff` | Hides the names of the controls in the Toolbox, leaving their icons. | -| `tbToolbox_TurnShowControlNamesOn` | Shows the names of the controls in the Toolbox. | -| `tbTraceOutput_Clear` | Clears the Trace Output panel. | -| `tbVariables_FocusPanel` | Moves the focus to the Variables panel. | -| `tbVariables_HidePanel` | Closes the Variables panel. | -| `tbVariables_ShowPanel` | Shows the Variables panel. | -| `tbWatches_Clear` | Removes every watch. | -| `tbWatches_FocusPanel` | Moves the focus to the Watches panel. | -| `tbWatches_HidePanel` | Closes the Watches panel. | -| `tbWatches_ShowPanel` | Shows the Watches panel. | -| `tbWebpage_FocusPanel` | Moves the focus to the Webpage panel. | -| `tbWebpage_GoBack` | Goes back one page in the Webpage panel. | -| `tbWebpage_GoForward` | Goes forward one page in the Webpage panel. | -| `tbWebpage_HidePanel` | Closes the Webpage panel. | -| `tbWebpage_Reload` | Reloads the page in the Webpage panel. | -| `tbWebpage_ShowPanel` | Shows the Webpage panel. | -| `tbWebpage_ToggleMobileMode` | Turns the Webpage panel's Use Mobile Mode option on or off. | -| `tbWebpage_TurnMobileModeOff` | Turns the Webpage panel's Use Mobile Mode option off. | -| `tbWebpage_TurnMobileModeOn` | Turns the Webpage panel's Use Mobile Mode option on. | +| tbFileSystem_AddClassCLS | Adds a class in a .cls file to the project, with a name box for its name. | +| tbFileSystem_AddClassTWIN | Adds a class in a .twin file to the project, with a name box for its name. | +| tbFileSystem_AddCustomControlsForm | Adds a CustomControls form to the project, with a name box for its name. If the project does not reference the CustomControls package, asks to add it. | +| tbFileSystem_AddFolder | Adds a folder to the project, with a name box for its name. | +| tbFileSystem_AddModuleBAS | Adds a module in a .bas file to the project, with a name box for its name. | +| tbFileSystem_AddModuleTWIN | Adds a module in a .twin file to the project, with a name box for its name. | +| tbFileSystem_AddOtherFile | Adds a file of any other type to the project, with a name box for its name. | +| tbFileSystem_AddResourceMessageTable | Adds a message table to the project's resources and opens it. | +| tbFileSystem_AddResourceStringTable | Adds a string table to the project's resources and opens it. | +| tbFileSystem_AddResourceVisualStylesManifest | Adds the Visual Styles manifest to the project's resources and opens it. | +| tbFileSystem_AddWindowsForm | Adds a Windows form to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | +| tbFileSystem_AddWindowsMDIForm | Adds a Windows MDI form to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | +| tbFileSystem_AddWindowsPropertyPage | Adds a Windows property page to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | +| tbFileSystem_AddWindowsReport | Adds a Windows report to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | +| tbFileSystem_AddWindowsUserControl | Adds a Windows user control to the project, with a name box for its name. If the project does not reference the WinNativeForms package, asks to add it. | +| tbFileSystem_ImportFile | Opens the dialog for choosing files to import into the project. | + +## `tbFindReplace_` + +| Command | Keys | What it does | +|---|---|---| +| tbFindReplace_Cancel | Esc | Closes the Find and Replace panel, or hides it if it is floating. | +| tbFindReplace_FocusCurrentModule | Alt+M | Chooses the Current Module scope in the Find and Replace panel. | +| tbFindReplace_FocusCurrentProcedure | Alt+P | Chooses the Current Procedure scope in the Find and Replace panel. | +| tbFindReplace_FocusCurrentProject | Alt+C | Chooses the Current Project scope in the Find and Replace panel. | +| tbFindReplace_FocusDirection | Alt+D | Moves the focus to the Direction box of the Find and Replace panel. | +| tbFindReplace_FocusFindWhat | Alt+F | Moves the focus to the Find What box of the Find and Replace panel. | +| tbFindReplace_FocusMatchCaseToggle | Alt+S | Turns the Match Case option of the Find and Replace panel on or off. | +| tbFindReplace_FocusNext | Alt+N | Finds the next match in the Find and Replace panel. | +| tbFindReplace_FocusPanel | | Moves the focus to the Find and Replace panel. | +| tbFindReplace_FocusReplaceWith | Alt+W | Moves the focus to the Replace With box of the Find and Replace panel. | +| tbFindReplace_FocusUsePatternMatchingToggle | Alt+U | Turns the Use Pattern Matching option of the Find and Replace panel on or off. | +| tbFindReplace_FocusWholeWordOnlyToggle | Alt+O | Turns the Whole Word Only option of the Find and Replace panel on or off. | +| tbFindReplace_HidePanel | | Closes the Find and Replace panel. | +| tbFindReplace_Next | F3 | Finds the next match in the Find and Replace panel, or in the editor's quick find box when only that is showing. | +| tbFindReplace_Prev | Shift+F3 | Finds the previous match in the Find and Replace panel. | +| tbFindReplace_ReplaceAll | Alt+A | Replaces every match in the scope chosen in the Find and Replace panel. | +| tbFindReplace_ReplaceNext | Alt+R | Replaces the current match in the Find and Replace panel and finds the next. | +| tbFindReplace_ShowPanel | | Shows the Find and Replace panel. | + +## `tbFindWidget_` + +| Command | Keys | What it does | +|---|---|---| +| tbFindWidget_FindNext | Enter | In the quick find box, moves to the next match. | +| tbFindWidget_FindNextAlways | | In the quick find box, moves to the next match. It has no default key. | +| tbFindWidget_FindNextInSelection | Ctrl+F3 | In the quick find box, moves to the next occurrence of the selected text. | +| tbFindWidget_FindPrev | | In the quick find box, moves to the previous match. It has no default key. | +| tbFindWidget_FindPrevInSelection | Ctrl+Shift+F3 | In the quick find box, moves to the previous occurrence of the selected text. | +| tbFindWidget_FindPrevious | Shift+Enter | Has the default key Shift+Enter, but the IDE has no command of this name. The command that moves to the previous match in the quick find box is tbFindWidget_FindPrev. | +| tbFindWidget_Hide | Esc | Closes the editor's quick find box. | +| tbFindWidget_HistoryCycleNext | Down | In the quick find box, shows the next entry of the search history. | +| tbFindWidget_HistoryCyclePrevious | Up | In the quick find box, shows the previous entry of the search history. | +| tbFindWidget_ShowFind | Alt+F | Opens the editor's quick find box. | +| tbFindWidget_ShowReplace | Alt+H | Opens the editor's quick find and replace box. | + +## `tbFormDesginer_` + +| Command | What it does | +|---|---| +| tbFormDesginer_DecreaseSpacingHorizontal | Narrows the horizontal gaps between the selected controls by one grid step. | +| tbFormDesginer_DecreaseSpacingVertical | Narrows the vertical gaps between the selected controls by one grid step. | +| tbFormDesginer_IncreaseSpacingHorizontal | Widens the horizontal gaps between the selected controls by one grid step. | +| tbFormDesginer_IncreaseSpacingVertical | Widens the vertical gaps between the selected controls by one grid step. | +| tbFormDesginer_MakeEqualSpacingHorizontal | Spaces three or more selected controls evenly from left to right. | +| tbFormDesginer_MakeEqualSpacingVertical | Spaces three or more selected controls evenly from top to bottom. | +| tbFormDesginer_RemoveSpacingHorizontal | Removes the horizontal gaps between the selected controls. | +| tbFormDesginer_RemoveSpacingVertical | Removes the vertical gaps between the selected controls. | + +## `tbFormDesigner_` + +| Command | Keys | What it does | +|---|---|---| +| tbFormDesigner_AlignSelectedControlsBottom | Alt+Down | Aligns the bottom edges of the selected controls. | +| tbFormDesigner_AlignSelectedControlsCenterHorizontal | | Aligns the horizontal centres of the selected controls. | +| tbFormDesigner_AlignSelectedControlsCenterVertical | | Aligns the vertical centres of the selected controls. | +| tbFormDesigner_AlignSelectedControlsLeft | Alt+Left | Aligns the left edges of the selected controls. | +| tbFormDesigner_AlignSelectedControlsRight | Alt+Right | Aligns the right edges of the selected controls. | +| tbFormDesigner_AlignSelectedControlsToGrid | | Moves the selected controls to the nearest grid points. | +| tbFormDesigner_AlignSelectedControlsTop | Alt+Up | Aligns the top edges of the selected controls. | +| tbFormDesigner_BringControlToFront | | Brings the selected controls to the front. | +| tbFormDesigner_CenterSelectedGroupInContainerHorizontal | | Centres the selected controls as a group, from left to right, in their container. | +| tbFormDesigner_CenterSelectedGroupInContainerVertical | | Centres the selected controls as a group, from top to bottom, in their container. | +| tbFormDesigner_ClipboardCopy | Ctrl+C, Ctrl+Insert | Copies the selected controls to the clipboard. | +| tbFormDesigner_ClipboardCut | Ctrl+X, Shift+Delete | Cuts the selected controls to the clipboard. | +| tbFormDesigner_ClipboardPaste | Ctrl+V | Pastes the controls on the clipboard into the form designer. | +| tbFormDesigner_ClipboardPasteControlArray | | Pastes the controls on the clipboard with their names kept, so that they join the control arrays of the controls with those names. | +| tbFormDesigner_DeleteSelectedControls | Delete | Deletes the selected controls. | +| tbFormDesigner_DuplicateControlsIntoControlArray | | Duplicates the selected controls as members of control arrays. | +| tbFormDesigner_DuplicateControlsWithNewNames | | Duplicates the selected controls, giving each copy a new name. | +| tbFormDesigner_LaunchPreview | | Runs a preview of the form being designed. | +| tbFormDesigner_LockAllControls | | Locks every control on the form. | +| tbFormDesigner_LockSelectedControls | | Locks the selected controls. | +| tbFormDesigner_MenuEditorCopy | | In the menu editor, copies the selected menu item to the clipboard. | +| tbFormDesigner_MenuEditorCut | | In the menu editor, cuts the selected menu item to the clipboard. | +| tbFormDesigner_MenuEditorDelete | Delete | In the menu editor, deletes the selected menu item. | +| tbFormDesigner_MenuEditorInsertAbove | | In the menu editor, inserts a new item above the selected menu item. | +| tbFormDesigner_MenuEditorInsertBelow | | In the menu editor, inserts a new item below the selected menu item. | +| tbFormDesigner_MenuEditorInsertLeft | | In the menu editor, inserts a new menu to the left of the selected top-level menu. | +| tbFormDesigner_MenuEditorInsertRight | | In the menu editor, inserts a new menu to the right of the selected top-level menu. | +| tbFormDesigner_MenuEditorInsertSeperatorAfter | | In the menu editor, inserts a separator below the selected menu item. | +| tbFormDesigner_MenuEditorInsertSeperatorBefore | | In the menu editor, inserts a separator above the selected menu item. | +| tbFormDesigner_MenuEditorMoveDown | Ctrl+Down | In the menu editor, moves the selected menu item down one place. | +| tbFormDesigner_MenuEditorMoveLeft | Ctrl+Left | In the menu editor, moves the selected top-level menu one place to the left. | +| tbFormDesigner_MenuEditorMoveRight | Ctrl+Right | In the menu editor, moves the selected top-level menu one place to the right. | +| tbFormDesigner_MenuEditorMoveUp | Ctrl+Up | In the menu editor, moves the selected menu item up one place. | +| tbFormDesigner_MenuEditorPasteAfter | | In the menu editor, pastes the clipboard after the selected menu item. | +| tbFormDesigner_MenuEditorPasteBefore | | In the menu editor, pastes the clipboard before the selected menu item. | +| tbFormDesigner_MenuEditorPasteInto | | In the menu editor, pastes the clipboard into the selected menu item. | +| tbFormDesigner_MenuEditorRename | F2 | In the menu editor, renames the selected menu item. | +| tbFormDesigner_MenuEditorToggleChecked | Space | In the menu editor, turns the Checked property of the selected menu item on or off. | +| tbFormDesigner_MenuEditorToggleEnabled | | In the menu editor, turns the Enabled property of the selected menu item on or off. | +| tbFormDesigner_MenuEditorToggleVisible | | In the menu editor, turns the Visible property of the selected menu item on or off. | +| tbFormDesigner_MoveSelectedControlsDown | Down | Moves the selected controls down by one grid step, or one pixel when the grid is off. | +| tbFormDesigner_MoveSelectedControlsLeft | Left | Moves the selected controls left by one grid step, or one pixel when the grid is off. | +| tbFormDesigner_MoveSelectedControlsRight | Right | Moves the selected controls right by one grid step, or one pixel when the grid is off. | +| tbFormDesigner_MoveSelectedControlsUp | Up | Moves the selected controls up by one grid step, or one pixel when the grid is off. | +| tbFormDesigner_Redo | Ctrl+Y | Redoes the last change that was undone in the form designer. | +| tbFormDesigner_ResizeSelectedControlsNarrower | Shift+Left | Makes the selected controls narrower by one grid step, or one pixel when the grid is off. | +| tbFormDesigner_ResizeSelectedControlsNarrowest | Ctrl+Shift+Left | Makes the selected controls as narrow as the narrowest of them. | +| tbFormDesigner_ResizeSelectedControlsShorter | Shift+Up | Makes the selected controls shorter by one grid step, or one pixel when the grid is off. | +| tbFormDesigner_ResizeSelectedControlsShortest | Ctrl+Shift+Up | Makes the selected controls as short as the shortest of them. | +| tbFormDesigner_ResizeSelectedControlsTaller | Shift+Down | Makes the selected controls taller by one grid step, or one pixel when the grid is off. | +| tbFormDesigner_ResizeSelectedControlsTallest | Ctrl+Shift+Down | Makes the selected controls as tall as the tallest of them. | +| tbFormDesigner_ResizeSelectedControlsWider | Shift+Right | Makes the selected controls wider by one grid step, or one pixel when the grid is off. | +| tbFormDesigner_ResizeSelectedControlsWidest | Ctrl+Shift+Right | Makes the selected controls as wide as the widest of them. | +| tbFormDesigner_SelectAllControls | Ctrl+A | Selects every control on the form. | +| tbFormDesigner_SelectParentOfSelectedControl | Esc | With a control selected, selects its container, or the form. | +| tbFormDesigner_SelectToolboxPointer | Esc | With no control selected, returns to the pointer tool in the Toolbox. | +| tbFormDesigner_SendControlToBack | | Sends the selected controls to the back. | +| tbFormDesigner_ShowSelectedControlActiveXPropertyPage | | Opens the property page of the selected ActiveX control. | +| tbFormDesigner_ToggleAlignControlsToGrid | | Turns on or off snapping controls to the grid. | +| tbFormDesigner_ToggleControlOutlines | | Shows or hides the outlines of the controls. | +| tbFormDesigner_ToggleGridIndicators | | Shows or hides the grid in the form designer. | +| tbFormDesigner_ToggleInPlaceEditingToolbar | | Shows or hides the small in-place editing toolbar below a selected control. | +| tbFormDesigner_ToggleLockAllControls | | Locks every control on the form that is unlocked, and unlocks each one that is locked. | +| tbFormDesigner_ToggleLockSelectedControls | | Locks each selected control that is unlocked, and unlocks each one that is locked. | +| tbFormDesigner_ToggleMultiColouredGrabbers | | Turns the multi-coloured selection handles on or off. | +| tbFormDesigner_ToggleShowTabIndex | | Shows or hides the tab index of each control. | +| tbFormDesigner_TurnAlignControlsToGridOff | | Turns off snapping controls to the grid. | +| tbFormDesigner_TurnAlignControlsToGridOn | | Turns on snapping controls to the grid. | +| tbFormDesigner_TurnControlOutlinesOff | | Hides the outlines of the controls. | +| tbFormDesigner_TurnControlOutlinesOn | | Shows the outlines of the controls. | +| tbFormDesigner_TurnGridIndicatorsOff | | Hides the grid in the form designer. | +| tbFormDesigner_TurnGridIndicatorsOn | | Shows the grid in the form designer. | +| tbFormDesigner_TurnInPlaceEditingToolbarOff | | Hides the small in-place editing toolbar below a selected control. | +| tbFormDesigner_TurnInPlaceEditingToolbarOn | | Shows the small in-place editing toolbar below a selected control. | +| tbFormDesigner_TurnShowTabIndexOff | Ctrl, on release | Hides the tab index of each control. The Ctrl key runs it when it is released. | +| tbFormDesigner_TurnShowTabIndexOn | Ctrl | Shows the tab index of each control. The Ctrl key runs it when it goes down. | +| tbFormDesigner_Undo | Ctrl+Z | Undoes the last change in the form designer. | +| tbFormDesigner_UnlockAllControls | | Unlocks every control on the form. | +| tbFormDesigner_UnlockSelectedControls | | Unlocks the selected controls. | +| tbFormDesigner_ZoomDecrease | | Moves to the next smaller zoom in the form designer's zoom list. | +| tbFormDesigner_ZoomDropDown | | Opens the zoom list of the form designer. | +| tbFormDesigner_ZoomIncrease | | Moves to the next larger zoom in the form designer's zoom list. | + +## `tbHelp_` + +| Command | Keys | What it does | +|---|---|---| +| tbHelp_AskErrorReporting | | Opens the dialog that asks whether the IDE may report its errors automatically. | +| tbHelp_EnterLicenceKey | | Opens the dialog for entering a licence key. | +| tbHelp_OpenDiscordWebsite | | Opens the twinBASIC Discord invitation in the default web browser. | +| tbHelp_OpenGithubWebsite | | Opens the twinBASIC GitHub repository in the default web browser. | +| tbHelp_OpenKofiWebsite | | Opens the twinBASIC Ko-fi page in the default web browser. | +| tbHelp_OpenTwitterWebsite | | Opens the twinBASIC author's Twitter page in the default web browser. | +| tbHelp_PurchaseALicence | | Opens the twinBASIC licence purchase page in the default web browser. | +| tbHelp_ShowAboutWindow | | Opens the About window. | +| tbHelp_ShowLicenceAgreement | | Shows the licence agreement. | +| tbHelp_ToggleCompilerTraceMode | | Turns the compiler's trace mode on or off and restarts the compiler. | +| tbHelp_ToggleExpandSignatureHelp | F1 | Expands or collapses the signature help that is showing. | + +## `tbHistory_` + +| Command | What it does | +|---|---| +| tbHistory_FocusPanel | Moves the focus to the History panel. | +| tbHistory_HidePanel | Closes the History panel. | +| tbHistory_ShowPanel | Shows the History panel. | + +## `tbIde_` + +| Command | Keys | What it does | +|---|---|---| +| tbIde_DecreaseFontSize | Ctrl+Alt+- | Makes the IDE's font one pixel smaller, down to a size of 8 pixels. | +| tbIde_IncreaseFontSize | Ctrl+Alt++ | Makes the IDE's font one pixel larger. | +| tbIde_ShowIDEOptions | | Opens the IDE Options dialog. | + +## `tbIdeDevTools_` + +| Command | What it does | +|---|---| +| tbIdeDevTools_Show | Opens the developer tools of the IDE's web view. | + +## `tbIdeWindow_` + +| Command | Keys | What it does | +|---|---|---| +| tbIdeWindow_Close | Alt+F4 | Closes the IDE window. | +| tbIdeWindow_MaximizeOrRestore | | Maximises the IDE window, or restores it when it is already maximised. | +| tbIdeWindow_Minimize | | Minimises the IDE window. | + +## `tbIntellisense_` + +| Command | Keys | What it does | +|---|---|---| +| tbIntellisense_AcceptSelectedEntry | Tab; Space, Enter, ,, ., +, -, &, (, ), !, *, \, /, :, =, on release | Inserts the selected entry of the completion list, then types the key that was pressed. | +| tbIntellisense_AcceptSelectedOrFirstEntry | Tab, Space | Inserts the selected entry of the completion list, or the first entry if none is selected. | +| tbIntellisense_Cancel | Esc, Left, Right, Backspace | Closes the completion list and the signature help. | +| tbIntellisense_SelectNext | Down | Selects the next entry of the open completion list. | +| tbIntellisense_SelectPrevious | Up | Selects the previous entry of the open completion list. | +| tbIntellisense_ShowAfterKeyPress | every key its `{ALLEXCEPT}` list does not name, on release | Opens the completion list after any key that is not one of the keys its binding excludes, according to the IntelliSense mode option. | +| tbIntellisense_ShowNow | Ctrl+Space | Opens the completion list at the cursor. | + +## `tbKeyboardShortcuts_` + +| Command | What it does | +|---|---| +| tbKeyboardShortcuts_ShowManageKeyboardShortcuts | Opens the dialog for managing keyboard shortcut groups. | +| tbKeyboardShortcuts_ShowWarningCannotDisableBuilinGroup | Shows a message that the built-in keyboard shortcut group cannot be turned off, and says to override a command in a group of your own instead. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom1 | Turns on or off the keyboard shortcut group that is number 1 in the list of your own groups, if there is one. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom10 | Turns on or off the keyboard shortcut group that is number 10 in the list of your own groups, if there is one. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom2 | Turns on or off the keyboard shortcut group that is number 2 in the list of your own groups, if there is one. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom3 | Turns on or off the keyboard shortcut group that is number 3 in the list of your own groups, if there is one. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom4 | Turns on or off the keyboard shortcut group that is number 4 in the list of your own groups, if there is one. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom5 | Turns on or off the keyboard shortcut group that is number 5 in the list of your own groups, if there is one. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom6 | Turns on or off the keyboard shortcut group that is number 6 in the list of your own groups, if there is one. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom7 | Turns on or off the keyboard shortcut group that is number 7 in the list of your own groups, if there is one. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom8 | Turns on or off the keyboard shortcut group that is number 8 in the list of your own groups, if there is one. | +| tbKeyboardShortcuts_ToggleActiveKeyboardShortcutGroupCustom9 | Turns on or off the keyboard shortcut group that is number 9 in the list of your own groups, if there is one. | + +## `tbMenu_` + +| Command | Keys | What it does | +|---|---|---| +| tbMenu_Cancel | Esc | Closes the open menu. | +| tbMenu_ExecuteFocusedEntry | Enter | While a menu is open, runs the focused entry. | +| tbMenu_FocusAdjacentDown | Down | While a menu is open, moves the focus to the entry below. | +| tbMenu_FocusAdjacentLeft | Left | While a menu is open, closes the open submenu, or moves to the menu on the left. | +| tbMenu_FocusAdjacentRight | Right | While a menu is open, opens the submenu of the focused entry, or moves to the menu on the right. | +| tbMenu_FocusAdjacentUp | Up | While a menu is open, moves the focus to the entry above. | +| tbMenu_ShowAddinsMenu | | Opens the Addins menu. | +| tbMenu_ShowDebugMenu | | Opens the Debug menu. | +| tbMenu_ShowEditMenu | | Opens the Edit menu. | +| tbMenu_ShowFileMenu | | Opens the File menu. | +| tbMenu_ShowFormatMenu | | Opens the Format menu. | +| tbMenu_ShowHelpMenu | | Opens the Help menu. | +| tbMenu_ShowProjectMenu | | Opens the Project menu. | +| tbMenu_ShowRunMenu | | Opens the Run menu. | +| tbMenu_ShowToolsMenu | | Opens the Tools menu. | +| tbMenu_ShowViewMenu | | Opens the View menu. | +| tbMenu_ShowWindowMenu | | Opens the Window menu. | + +## `tbMisc_` + +| Command | Keys | What it does | +|---|---|---| +| tbMisc_AltKeyStateDown | Alt | Records that the Alt key is held down, so that releasing it alone can open the File menu. The IDE uses it internally. | +| tbMisc_AltKeyStateUp | Alt, on release | Opens the File menu when the Alt key is released without another key having been pressed, or closes a menu that is open. | +| tbMisc_PreventDefaultKeyBehaviour | Ctrl+A, Tab | Stops the web view's own handling of the key. The IDE binds it to keys whose default action it does not want. | +| tbMisc_SaveProjectMetaStateInTwinproj | Ctrl+Shift+Alt+M | Saves the project's meta state to the project file and shows a message box. | +| tbMisc_ShiftKeyStateDown | Shift | Records that the Shift key is held down. The IDE uses it internally. | +| tbMisc_ShiftKeyStateUp | Shift, on release | Records that the Shift key has been released. The IDE uses it internally. | +| tbMisc_ShowTestMessage | | Shows a test message box. | + +## `tbOpenEditors_` + +| Command | What it does | +|---|---| +| tbOpenEditors_FocusPanel | Moves the focus to the Open Editors panel. | +| tbOpenEditors_HidePanel | Closes the Open Editors panel. | +| tbOpenEditors_ShowPanel | Shows the Open Editors panel. | + +## `tbOutline_` + +| Command | What it does | +|---|---| +| tbOutline_FocusPanel | Moves the focus to the Outline panel. | +| tbOutline_HidePanel | Closes the Outline panel. | +| tbOutline_ShowPanel | Shows the Outline panel. | + +## `tbPackagePublishing_` + +| Command | What it does | +|---|---| +| tbPackagePublishing_FocusPanel | Moves the focus to the Package Publishing panel. | +| tbPackagePublishing_HidePanel | Closes the Package Publishing panel. | +| tbPackagePublishing_ShowPanel | Shows the Package Publishing panel. | + +## `tbPanels_` + +| Command | Keys | What it does | +|---|---|---| +| tbPanels_SaveCurrentPanelLayoutAs | | Asks for a name and saves the current panel layout under it. | +| tbPanels_SetActiveLayoutCustom1 | | Switches to the panel layout that is number 1 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutCustom10 | | Switches to the panel layout that is number 10 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutCustom2 | | Switches to the panel layout that is number 2 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutCustom3 | | Switches to the panel layout that is number 3 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutCustom4 | | Switches to the panel layout that is number 4 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutCustom5 | | Switches to the panel layout that is number 5 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutCustom6 | | Switches to the panel layout that is number 6 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutCustom7 | | Switches to the panel layout that is number 7 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutCustom8 | | Switches to the panel layout that is number 8 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutCustom9 | | Switches to the panel layout that is number 9 in the list of saved layouts, if there is one. | +| tbPanels_SetActiveLayoutDefault | Ctrl+# | Switches to the default built-in panel layout. | +| tbPanels_SetActiveLayoutFullScreen | | Switches to the full screen editor panel layout. | +| tbPanels_ShowManagePanelLayouts | | Opens the dialog for managing the saved panel layouts. | +| tbPanels_TogglePreventDockedMove | | Turns on or off the option that stops docked panels from being moved. | +| tbPanels_TogglePreventDockedResize | | Turns on or off the option that stops docked panels from being resized. | +| tbPanels_TogglePreventDockedTearout | | Turns on or off the option that stops docked panels from being pulled out of their dock. | +| tbPanels_TogglePreventFloatingMove | | Turns on or off the option that stops floating panels from being moved. | +| tbPanels_TogglePreventFloatingResize | | Turns on or off the option that stops floating panels from being resized. | + +## `tbProblems_` + +| Command | What it does | +|---|---| +| tbProblems_ClipboardCopyAll | Copies everything in the Problems panel to the clipboard as a compilation error report. | +| tbProblems_ClipboardCopyAllErrors | Copies the errors of the Problems panel to the clipboard as a compilation error report. | +| tbProblems_CollapseAll | Collapses every entry in the Problems panel. | +| tbProblems_ExpandAll | Expands every entry in the Problems panel. | +| tbProblems_FocusPanel | Moves the focus to the Problems panel. | +| tbProblems_HidePanel | Closes the Problems panel. | +| tbProblems_ShowPanel | Shows the Problems panel. | +| tbProblems_ToggleShowErrors | Shows or hides the errors in the Problems panel. | +| tbProblems_ToggleShowHints | Shows or hides the hints in the Problems panel. | +| tbProblems_ToggleShowInfos | Shows or hides the information messages in the Problems panel. | +| tbProblems_ToggleShowWarnings | Shows or hides the warnings in the Problems panel. | +| tbProblems_TurnShowErrorsOff | Hides the errors in the Problems panel. | +| tbProblems_TurnShowErrorsOn | Shows the errors in the Problems panel. | +| tbProblems_TurnShowHintsOff | Hides the hints in the Problems panel. | +| tbProblems_TurnShowHintsOn | Shows the hints in the Problems panel. | +| tbProblems_TurnShowInfosOff | Hides the information messages in the Problems panel. | +| tbProblems_TurnShowInfosOn | Shows the information messages in the Problems panel. | +| tbProblems_TurnShowWarningsOff | Hides the warnings in the Problems panel. | +| tbProblems_TurnShowWarningsOn | Shows the warnings in the Problems panel. | + +## `tbProject_` + +| Command | Keys | What it does | +|---|---|---| +| tbProject_AddCustomControlsPackage | | Adds the CustomControls package to the project. | +| tbProject_AddWinNativeFormsPackage | | Adds the WinNativeForms package to the project. | +| tbProject_Close | | Closes the project. | +| tbProject_Export | Ctrl+E | Exports the project's sources to a folder. | +| tbProject_FindInFiles | Ctrl+Shift+F | Opens the Find and Replace panel with the Current Project scope chosen. | +| tbProject_New | Ctrl+N | Opens the front page on the list of templates for a new project. | +| tbProject_Open | Ctrl+O | Opens the dialog for choosing a project to open. | +| tbProject_OpenBuildFolder | | Opens the project's build folder in Windows Explorer. A project that has not been saved gets a message instead. | +| tbProject_OpenProjectFolder | | Opens the folder that holds the project file in Windows Explorer. A project that has not been saved gets a message instead. | +| tbProject_OpenRecent | | Opens the front page on the list of recent projects. | +| tbProject_SaveAllChanges | Ctrl+S | Saves the project and every document with unsaved changes. | +| tbProject_SaveAs | | Asks for a new name and place for the project and saves it there. | +| tbProject_ShowReferences | Ctrl+T | Opens the project's References list. | +| tbProject_ShowSettings | | Opens the project's Settings in an editor. | + +## `tbProjectExplorer_` + +| Command | Keys | What it does | +|---|---|---| +| tbProjectExplorer_ClipboardPaste | Ctrl+V | In the Project Explorer's file view, pastes the items on the clipboard. | +| tbProjectExplorer_FocusPanel | | Moves the focus to the Project Explorer. | +| tbProjectExplorer_HidePanel | | Closes the Project Explorer panel. | +| tbProjectExplorer_ObjectList_DeleteSelected | | Shows only a message box with its own name; deleting is not implemented. | +| tbProjectExplorer_ObjectList_RenameSelected | | Shows only a message box with its own name; renaming is not implemented. | +| tbProjectExplorer_ObjectList_ViewSelectedCode | | In the object view of the Project Explorer, opens the code of the selected object. | +| tbProjectExplorer_ObjectList_ViewSelectedObject | | In the object view of the Project Explorer, opens the form of the selected object. | +| tbProjectExplorer_Search | | Opens the search box of the Project Explorer's object view, or moves the focus to it. | +| tbProjectExplorer_SelectedItemsClipboardCopy | Ctrl+C, Ctrl+Insert | In the Project Explorer's file view, copies the selected items to the clipboard. | +| tbProjectExplorer_SelectedItemsClipboardCopyName | | In the Project Explorer's file view, copies the names of the selected items to the clipboard. | +| tbProjectExplorer_SelectedItemsClipboardCopyPath | | In the Project Explorer's file view, copies the paths of the selected items to the clipboard. | +| tbProjectExplorer_SelectedItemsClipboardCut | Ctrl+X, Shift+Delete | In the Project Explorer's file view, cuts the selected items to the clipboard. | +| tbProjectExplorer_SelectedItemsDeletePermanently | Delete | In the Project Explorer's file view, deletes the selected items, after asking if the Ask Before Delete Files option is on. | +| tbProjectExplorer_SelectedItemsExport | | In the Project Explorer's file view, exports the selected items to a folder. | +| tbProjectExplorer_SelectedItemsRename | F2 | In the Project Explorer's file view, renames the selected item. | +| tbProjectExplorer_SelectedItemsViewAsJSON | | In the Project Explorer's file view, opens the selected file as JSON. | +| tbProjectExplorer_SelectedItemsViewAsMarkdownPreview | | In the Project Explorer's file view, opens the selected file as a Markdown preview. | +| tbProjectExplorer_ShowAddMenu | | Opens the menu for adding a component to the project, below the Add button of the Project Explorer. | +| tbProjectExplorer_ShowPanel | | Shows the Project Explorer panel. | +| tbProjectExplorer_ToggleFileMode | Ctrl+R | Switches the Project Explorer between its file view and its object view. | +| tbProjectExplorer_ToggleFileModeOff | | Switches the Project Explorer to its object view. | +| tbProjectExplorer_ToggleFileModeOn | | Switches the Project Explorer to its file view. | + +## `tbProperties_` + +| Command | What it does | +|---|---| +| tbProperties_FocusPanel | Moves the focus to the Properties panel. | +| tbProperties_HidePanel | Closes the Properties panel. | +| tbProperties_Search | Opens the search box of the Properties panel, or moves the focus to it. | +| tbProperties_ShowPanel | Shows the Properties panel. | + +## `tbTheme_` + +| Command | What it does | +|---|---| +| tbTheme_SwitchToDarkMode | Switches the IDE to the dark colour theme. | +| tbTheme_SwitchToggle | Switches the IDE between the dark and light colour themes. | +| tbTheme_SwitchToLightClassicMode | Switches the IDE to the classic light colour theme. | +| tbTheme_SwitchToLightMode | Switches the IDE to the light colour theme. | + +## `tbThemes_` + +| Command | What it does | +|---|---| +| tbThemes_Reload | Reloads the themes from their files on disk. | +| tbThemes_ShowList | Opens the list of themes beside the colour mode button. | + +## `tbToolbar_` + +| Command | What it does | +|---|---| +| tbToolbar_HidePanel | Closes the Toolbar panel. | +| tbToolbar_ShowPanel | Shows the Toolbar panel. | + +## `tbToolbox_` + +| Command | Keys | What it does | +|---|---|---| +| tbToolbox_FocusPanel | | Moves the focus to the Toolbox panel. | +| tbToolbox_HidePanel | | Closes the Toolbox panel. | +| tbToolbox_Search | | Opens the search box of the Toolbox, or moves the focus to it. | +| tbToolbox_SelectNextTool | Down, Right | In the Toolbox, selects the next tool. | +| tbToolbox_SelectPrevTool | Up, Left | In the Toolbox, selects the previous tool. | +| tbToolbox_ShowMoreComponents | | Shows a message about adding components to the Toolbox, which says to add an ordinary COM reference to the ActiveX type library. | +| tbToolbox_ShowPanel | | Shows the Toolbox panel. | +| tbToolbox_ToggleShowControlNames | | Shows or hides the names of the controls in the Toolbox. | +| tbToolbox_TurnShowControlNamesOff | | Hides the names of the controls in the Toolbox, leaving their icons. | +| tbToolbox_TurnShowControlNamesOn | | Shows the names of the controls in the Toolbox. | + +## `tbTraceOutput_` + +| Command | What it does | +|---|---| +| tbTraceOutput_Clear | Clears the Trace Output panel. | + +## `tbVariables_` + +| Command | What it does | +|---|---| +| tbVariables_FocusPanel | Moves the focus to the Variables panel. | +| tbVariables_HidePanel | Closes the Variables panel. | +| tbVariables_ShowPanel | Shows the Variables panel. | + +## `tbWatches_` + +| Command | Keys | What it does | +|---|---|---| +| tbWatches_Add | Shift+F9 | Adds a watch, starting from the text selected in the code editor. | +| tbWatches_Clear | | Removes every watch. | +| tbWatches_FocusPanel | | Moves the focus to the Watches panel. | +| tbWatches_HidePanel | | Closes the Watches panel. | +| tbWatches_ShowPanel | | Shows the Watches panel. | + +## `tbWebpage_` + +| Command | What it does | +|---|---| +| tbWebpage_FocusPanel | Moves the focus to the Webpage panel. | +| tbWebpage_GoBack | Goes back one page in the Webpage panel. | +| tbWebpage_GoForward | Goes forward one page in the Webpage panel. | +| tbWebpage_HidePanel | Closes the Webpage panel. | +| tbWebpage_Reload | Reloads the page in the Webpage panel. | +| tbWebpage_ShowPanel | Shows the Webpage panel. | +| tbWebpage_ToggleMobileMode | Turns the Webpage panel's Use Mobile Mode option on or off. | +| tbWebpage_TurnMobileModeOff | Turns the Webpage panel's Use Mobile Mode option off. | +| tbWebpage_TurnMobileModeOn | Turns the Webpage panel's Use Mobile Mode option on. | + +## Commands with no prefix + +| Command | Keys | What it does | +|---|---|---| +| `tbShowObjectBrowser` | F2, on release | Opens the Object Browser, for the text selected in the code editor. | +| `tbSignatureHelpCancel` | Esc, Up, Down | Dismisses the signature help that is showing. | ## See Also diff --git a/docs/_sass/custom/custom.scss b/docs/_sass/custom/custom.scss index 72ee101e3..c42ae718d 100644 --- a/docs/_sass/custom/custom.scss +++ b/docs/_sass/custom/custom.scss @@ -969,3 +969,20 @@ div.highlight:focus-visible, content: " \2192" / ""; } } + +// A command's name on the Keyboard Shortcuts page. The heading above the table shows the prefix, +// so here it takes no width. It stays in the text, at no size and not hidden, so that the browser's +// find, the site's search, a double-click and a screen reader all get the whole name. +.command-prefix { + font-size: 0; +} + +// That page's contents list: a line of its own for each of its 37 short headings would fill more +// than a screen before the first table. +.command-index #markdown-toc { + columns: 12rem; + + li { + break-inside: avoid; + } +} diff --git a/docs/assets/css/print.css b/docs/assets/css/print.css index 267db380c..715f60dcb 100644 --- a/docs/assets/css/print.css +++ b/docs/assets/css/print.css @@ -766,3 +766,6 @@ blockquote { .markdown-alert-caution .markdown-alert-title { color: #cf222e; } .markdown-alert-tip { border-left-color: #1a7f37; } .markdown-alert-tip .markdown-alert-title { color: #1a7f37; } + +/* A command's name on the Keyboard Shortcuts page: custom.scss says why. */ +.command-prefix { font-size: 0; } diff --git a/scripts/ide-js/lib.mjs b/scripts/ide-js/lib.mjs index c1ecf50b3..a7c418fe9 100644 --- a/scripts/ide-js/lib.mjs +++ b/scripts/ide-js/lib.mjs @@ -685,56 +685,69 @@ export function commandTextProblems(ids, text) { }; } +/** The prefix of a command's name, its underscore included; "" for a name with no underscore. */ +const commandPrefix = (id) => id.slice(0, id.indexOf("_") + 1); + +// A section's heading shows the prefix, so `.command-prefix` gives it no width in a row. It stays +// in the text for the browser's find, the site's search, a double-click and a screen reader. +const commandCell = (id, prefix) => + prefix ? `${prefix}${id.slice(prefix.length)}` : `\`${id}\``; + +const keysCell = (strings = []) => { + const labels = strings.map(keyLabel); + const list = (release) => + labels + .filter((l) => l.release === release) + .map((l) => l.keys) + .join(", "); + return [list(false), list(true) && `${list(true)}, on release`].filter(Boolean).join("; "); +}; + /** - * The two tables of the Keyboard Shortcuts reference page, as `{ keyed, unkeyed }`: the commands - * with a default key (the command, its keys, what it does), and the others (the command, what it - * does), each with one row for each command, by name. A command is on the second table when the - * build lists it in `ideCommands` (`ids`) and the group gives it no key. `text` is the data file. + * The sections of the Keyboard Shortcuts reference page, as markdown: one for each prefix of a + * command's name, by name, each a heading and a table with one row for each command, by name, and + * last the commands with no prefix. A table has the Keys column when any command of its section + * has a key. A command is on the page when the group or the build's `ideCommands` (`ids`) lists it. + * `text` is the data file. */ -export function keymapTables(map, ids, text = {}) { - const all = [...new Set([...ids, ...Object.keys(map)])].sort(byName); - const keyed = []; - const unkeyed = []; - for (const command of all) { - const description = cellText(text[command]); - const labels = (map[command] ?? []).map(keyLabel); - if (!labels.length) { - unkeyed.push(`| \`${command}\` | ${description} |`); - continue; - } - const list = (release) => - labels - .filter((l) => l.release === release) - .map((l) => l.keys) - .join(", "); - const cell = [list(false), list(true) && `${list(true)}, on release`].filter(Boolean).join("; "); - keyed.push(`| \`${command}\` | ${cell} | ${description} |`); +export function keymapSections(map, ids, text = {}) { + const groups = new Map(); + for (const command of [...new Set([...ids, ...Object.keys(map)])].sort(byName)) { + const prefix = commandPrefix(command); + if (!groups.has(prefix)) groups.set(prefix, []); + groups.get(prefix).push(command); } - return { - keyed: ["| Command | Keys | What it does |", "|---|---|---|", ...keyed].join("\n"), - unkeyed: ["| Command | What it does |", "|---|---|", ...unkeyed].join("\n"), + const prefixes = [...groups.keys()].filter(Boolean).sort(byName); + if (groups.has("")) prefixes.push(""); + const section = (prefix) => { + const commands = groups.get(prefix); + const hasKeys = commands.some((command) => map[command]?.length); + const header = hasKeys + ? ["| Command | Keys | What it does |", "|---|---|---|"] + : ["| Command | What it does |", "|---|---|"]; + const rows = commands.map((command) => { + const keys = hasKeys ? ` ${keysCell(map[command])} |` : ""; + return `| ${commandCell(command, prefix)} |${keys} ${cellText(text[command])} |`; + }); + return [`## ${prefix ? `\`${prefix}\`` : "Commands with no prefix"}`, "", ...header, ...rows].join("\n"); }; + return prefixes.map(section).join("\n\n"); } /** - * `page` with its two keymap tables, each from its header line to its last row, replaced by - * those of `tables` (`keymapTables`'), in the page's own line endings. `.current` is the tables - * the page has and `.expected` those it was given, each the two tables with a blank line between. + * `page` with `sections` (`keymapSections`') in place of its own, in the page's own line endings. + * Every section of the page before its See Also is generated: nothing written by hand goes there. + * `.current` is the sections the page has and `.expected` those it was given. */ -export function pageKeymap(page, tables) { +export function pageKeymap(page, sections) { const eol = page.includes("\r\n") ? "\r\n" : "\n"; - let lines = page.split(eol); - const current = []; - for (const key of ["keyed", "unkeyed"]) { - const header = tables[key].split("\n")[0]; - const start = lines.indexOf(header); - if (start < 0) throw new Error(`the page has no ${header} table`); - let end = start; - while (lines[end + 1]?.startsWith("|")) end++; - current.push(lines.slice(start, end + 1).join("\n")); - lines = [...lines.slice(0, start), ...tables[key].split("\n"), ...lines.slice(end + 1)]; - } - return { current: current.join("\n\n"), expected: `${tables.keyed}\n\n${tables.unkeyed}`, text: lines.join(eol) }; + const lines = page.split(eol); + const end = lines.indexOf("## See Also"); + if (end < 0) throw new Error("the page has no See Also"); + const start = lines.findIndex((line) => line.startsWith("## ")); + const current = lines.slice(start, end).join("\n").trimEnd(); + const text = [...lines.slice(0, start), ...sections.split("\n"), "", ...lines.slice(end)].join(eol); + return { current, expected: sections, text }; } // ---- the fix shape ---- diff --git a/scripts/ide_js.mjs b/scripts/ide_js.mjs index 88165cbf2..401463c67 100644 --- a/scripts/ide_js.mjs +++ b/scripts/ide_js.mjs @@ -30,7 +30,7 @@ import { FixError, fileView, fixShapes, - keymapTables, + keymapSections, lineDiff, load, mainJsOf, @@ -83,10 +83,11 @@ Commands: its twinBASIC.exe; --out writes main.js only shape the fix shape: each unit of the fix as the build has it and as fixed, a diff in our names, as markdown - keymap --ide's commands, as the two tables of - docs/IDE/Reference/Keyboard-Shortcuts.md (those with a - default key, and those with none), each with its - description from scripts/ide-js/command-text.json; + keymap --ide's commands, as the sections of + docs/IDE/Reference/Keyboard-Shortcuts.md, a table for + each prefix of a command's name, each command with + its keys and its description from + scripts/ide-js/command-text.json; --check compares the page with them and also fails for a command with no description, or a description for a command the build lacks; --update writes the @@ -102,8 +103,8 @@ Options: --copy-to patch: the folder for the patched copy, under the temp folder --all view: the whole file --json survey, units, check: one JSON object - --check keymap: compare the page's tables and the descriptions with the build - --update keymap: write the build's tables into the page + --check keymap: compare the page's sections and the descriptions with the build + --update keymap: write the build's sections into the page -h, --help print this text and exit Exit codes: @@ -395,11 +396,9 @@ if (command === "keymap") { const keys = builtInKeymap(parsed); const ids = [...new Set([...builtInCommandIds(parsed), ...Object.keys(keys)])]; const text = JSON.parse(readFileSync(COMMAND_TEXT, "utf8")); - const tables = keymapTables(keys, ids, text); + const sections = keymapSections(keys, ids, text); if (!values.check && !values.update) { - console.log(`${tables.keyed} - -${tables.unkeyed}`); + console.log(sections); process.exit(0); } // A command with no description in the data file is a gap to fill; a description for a @@ -413,7 +412,7 @@ ${tables.unkeyed}`); if (extra.length) console.log(`${dataName}: ${extra.length} entries for commands ${build ?? "the build"} lacks: ${extra.join(", ")}`); const page = readFileSync(KEYMAP_PAGE, "utf8"); - const { current, expected, text: updated } = pageKeymap(page, tables); + const { current, expected, text: updated } = pageKeymap(page, sections); const name = path.relative(REPO_ROOT, KEYMAP_PAGE); if (values.update) { writeFileSync(KEYMAP_PAGE, updated); diff --git a/test/ide-js.test.mjs b/test/ide-js.test.mjs index e8547b72c..1c6769ca2 100644 --- a/test/ide-js.test.mjs +++ b/test/ide-js.test.mjs @@ -26,7 +26,7 @@ import { fixShapes, keyLabel, commandTextProblems, - keymapTables, + keymapSections, lineDiff, NameError, namedUnits, @@ -331,40 +331,101 @@ describe("the built-in keyboard shortcuts", () => { }); const TEXT = { tbA_One: "Does one.", tbB_Two: "Does two | with a bar\nand a break.", tbF_Free: "Does free." }; - const tables = () => { + const sections = () => { const map = builtInKeymap(parse(MAIN)); - return keymapTables(map, builtInCommandIds(parse(MAIN)), TEXT); + return keymapSections(map, builtInCommandIds(parse(MAIN)), TEXT); }; + const cell = (prefix, rest) => `${prefix}${rest}`; + const HEAD = "| Command | What it does |\n|---|---|"; + const KEYED = "| Command | Keys | What it does |\n|---|---|---|"; - test("a command with a key is on the first table, by name, and says what is odd in words", () => { - assert.deepEqual(tables().keyed.split("\n"), [ - "| Command | Keys | What it does |", - "|---|---|---|", - "| `tbA_One` | Ctrl+{; F2, on release | Does one. |", - "| `tbB_Two` | Ctrl+Shift+Left, Shift+Alt+F8 | Does two | with a bar and a break. |", - "| `tbD_Text` | &, \, *, on release | |", - "| `tbE_All` | every key its `{ALLEXCEPT}` list does not name, on release | |", - ]); + test("each prefix has a section with its keys, by name, and says what is odd in words", () => { + assert.equal( + sections(), + [ + "## `tbA_`", + "", + KEYED, + `| ${cell("tbA_", "One")} | Ctrl+{; F2, on release | Does one. |`, + "", + "## `tbB_`", + "", + KEYED, + `| ${cell("tbB_", "Two")} | Ctrl+Shift+Left, Shift+Alt+F8 | Does two | with a bar and a break. |`, + "", + "## `tbC_`", + "", + HEAD, + `| ${cell("tbC_", "None")} | |`, + "", + "## `tbD_`", + "", + KEYED, + `| ${cell("tbD_", "Text")} | &, \, *, on release | |`, + "", + "## `tbE_`", + "", + KEYED, + `| ${cell("tbE_", "All")} | every key its \`{ALLEXCEPT}\` list does not name, on release | |`, + "", + "## `tbF_`", + "", + HEAD, + `| ${cell("tbF_", "Free")} | Does free. |`, + ].join("\n"), + ); }); - test("a command with no key is on the second table, listed in the group or not, with an empty cell for no text", () => { - assert.deepEqual(tables().unkeyed.split("\n"), [ - "| Command | What it does |", - "|---|---|", - "| `tbC_None` | |", - "| `tbF_Free` | Does free. |", - ]); + test("a table has the Keys column when any command of it has a key, listed in the group or not", () => { + const map = { tbA_Keyed: ["{KEYDOWN}F2"], tbA_Listed: [], tbB_Listed: [] }; + assert.equal( + keymapSections(map, ["tbA_Free", "tbB_Free"], { tbA_Free: "Does free." }), + [ + "## `tbA_`", + "", + KEYED, + `| ${cell("tbA_", "Free")} | | Does free. |`, + `| ${cell("tbA_", "Keyed")} | F2 | |`, + `| ${cell("tbA_", "Listed")} | | |`, + "", + "## `tbB_`", + "", + HEAD, + `| ${cell("tbB_", "Free")} | |`, + `| ${cell("tbB_", "Listed")} | |`, + ].join("\n"), + ); + }); + + test("a prefix ends at the first underscore, and the names with none are last and whole", () => { + const ids = ["tbZed", "tbDebugConsole_One", "tbDebug_A_B", "tbAlone"]; + assert.equal( + keymapSections({}, ids), + [ + "## `tbDebug_`", + "", + HEAD, + `| ${cell("tbDebug_", "A_B")} | |`, + "", + "## `tbDebugConsole_`", + "", + HEAD, + `| ${cell("tbDebugConsole_", "One")} | |`, + "", + "## Commands with no prefix", + "", + HEAD, + "| `tbAlone` | |", + "| `tbZed` | |", + ].join("\n"), + ); }); - test("every command is on exactly one table", () => { - const rows = (table) => - table - .split("\n") - .slice(2) - .map((r) => r.split(" | ")[0].slice(3, -1)); - const { keyed, unkeyed } = tables(); - const all = [...rows(keyed), ...rows(unkeyed)]; - assert.deepEqual([...all].sort(), ["tbA_One", "tbB_Two", "tbC_None", "tbD_Text", "tbE_All", "tbF_Free"]); + test("every command is in exactly one row, its whole name in the row's text", () => { + const names = [...sections().matchAll(/^\| ]*>(\w+)<\/span>(\w+)<\/code>/gm)].map( + (m) => m[1] + m[2], + ); + assert.deepEqual(names.sort(), ["tbA_One", "tbB_Two", "tbC_None", "tbD_Text", "tbE_All", "tbF_Free"]); }); test("a command with no description, or a description with no command, is named", () => { @@ -376,36 +437,19 @@ describe("the built-in keyboard shortcuts", () => { assert.deepEqual(commandTextProblems(["tbA_One"], { tbA_One: "x" }), { missing: [], extra: [] }); }); - test("a page keeps everything round its tables, in its own line endings", () => { - const t1 = "| Command | Keys | What it does |\n|---|---|---|\n| `new` | y | z |"; - const t2 = "| Command | What it does |\n|---|---|\n| `other` | w |"; + test("a page keeps everything round its sections, in its own line endings", () => { + const sections = "## `new_`\n\n| Command | What it does |\n|---|---|\n| `row` | y |"; + const lines = (...body) => ["# Keys", "", "Prose.", "", ...body, "## See Also", "", "- a link", ""]; for (const eol of ["\n", "\r\n"]) { - const page = [ - "# Keys", - "", - "| Command | Keys | What it does |", - "|---|---|---|", - "| `old` | x | v |", - "", - "## None", - "", - "| Command | What it does |", - "|---|---|", - "| `gone` | u |", - "", - "## See Also", - "", - ].join(eol); - const r = pageKeymap(page, { keyed: t1, unkeyed: t2 }); - assert.equal(r.expected, t1 + "\n\n" + t2); - assert.equal(r.current.split("\n\n").length, 2); - assert.equal(r.text, page.replace("`old` | x | v", "`new` | y | z").replace("`gone` | u", "`other` | w")); - assert.equal(pageKeymap(r.text, { keyed: t1, unkeyed: t2 }).current, r.expected); + const old = "## `old_`\n\n| `gone` | u |\n\n## `older_`\n\n| `gone` | v |"; + const page = lines(...old.split("\n"), "").join(eol); + const r = pageKeymap(page, sections); + assert.equal(r.current, old); + assert.equal(r.expected, sections); + assert.equal(r.text, lines(...sections.split("\n"), "").join(eol)); + assert.equal(pageKeymap(r.text, sections).current, sections); } - assert.throws( - () => pageKeymap("# no table\n", { keyed: t1, unkeyed: t2 }), - /has no \| Command \| Keys \| What it does \| table/, - ); + assert.throws(() => pageKeymap("# no sections\n", sections), /has no See Also/); }); }); @@ -467,8 +511,8 @@ describe("the command line", () => { writeFileSync(path.join(keys, "twinBASIC.exe"), ""); const shown = run("keymap", "--ide", keys); assert.equal(shown.code, 0, shown.stderr); - assert.ok(shown.stdout.includes("| `tbQ_Keyed` | F2, on release | |")); - assert.ok(shown.stdout.includes("| `tbQ_Free` | |")); + assert.ok(shown.stdout.includes("Keyed | F2, on release | |")); + assert.ok(shown.stdout.includes("Free | | |")); const r = run("keymap", "--check", "--ide", keys); assert.equal(r.code, 1); assert.match(r.stdout, /no entry for 2 commands of BETA 3: tbQ_Free, tbQ_Keyed\n/);