| 📦 Turbo Python 6fc62ea k33g 11h ago | 1 | # Reference: keyboard |
| 2 | |
| 3 | > Complete list of the keys Turbo Python answers to, grouped by what has the focus. |
| 4 | |
| 5 | Where two spellings exist, both work: the Turbo C one and the modern one. |
| 6 | |
| 7 | ## Global |
| 8 | |
| 9 | Handled wherever the focus is, unless a dialog or the completion popup is open. |
| 10 | |
| 11 | | Key | Action | |
| 12 | | --- | --- | |
| 13 | | `F1` | Describe the symbol under the cursor; with no file open, show the keyboard help | |
| 14 | | `F2` | Save | |
| 15 | | `F3` | Open | |
| 16 | | `F4` | New | |
| 17 | | `F6` | Next window | |
| 18 | | `F7` | Find next | |
| 19 | | `Shift-F7` | Find previous | |
| 20 | | `F8` | Open a terminal window | |
| 21 | | `F9` | Open the project tree | |
| 22 | | `F10` | Open the menu bar | |
| 23 | | `F12` | Go to definition | |
| 24 | | `Shift-F12` | Find references | |
| 25 | | `Ctrl-T` | Find a symbol anywhere in the project | |
| 26 | | `Ctrl-F` | Find | |
| 27 | | `Ctrl-G` | Go to line | |
| 28 | | `Ctrl-W` | Close the current window | |
| 29 | | `Alt-X` | Exit | |
| 30 | | `Alt-1` … `Alt-9` | Bring window 1…9 forward | |
| 31 | | `Alt-0` | List the open windows | |
| 32 | | `Alt-N` | Open the Snippets menu | |
| 33 | | `Alt-P` | Open the Python menu | |
| 34 | | `Alt-<letter>` | Open the menu whose title carries that letter | |
| 35 | |
| 36 | A menu the project's tools file adds gets its letter assigned rather than fixed, so it is never one of the above. The rules are in [Python tools](python-tools.md#hot-keys). |
| 37 | |
| 38 | ## Editing |
| 39 | |
| 40 | Handled by the window that has the focus. |
| 41 | |
| 42 | ### Movement |
| 43 | |
| 44 | | Key | Action | |
| 45 | | --- | --- | |
| 46 | | `←` `→` `↑` `↓` | One character or one line | |
| 47 | | `Ctrl-←` `Ctrl-→` | Start of the previous / next word | |
| 48 | | `Home` `End` | Start / end of the line | |
| 49 | | `Ctrl-Home` `Ctrl-End` | Start / end of the file | |
| 50 | | `PgUp` `PgDn` | One screenful | |
| 51 | | `Shift` + any of the above | The same movement, extending the selection | |
| 52 | |
| 53 | ### Changing the text |
| 54 | |
| 55 | | Key | Action | |
| 56 | | --- | --- | |
| 57 | | any printable character | Insert it, replacing the selection | |
| 58 | | `Enter` | Split the line, copying the current line's indentation | |
| 59 | | `Backspace` | Delete the selection, or the character before the cursor | |
| 60 | | `Delete` | Delete the selection, or the character under the cursor | |
| 61 | | `Tab` | Insert a tab; with a selection, indent every line it touches | |
| 62 | | `Shift-Tab` | Remove one level of indentation from every line the selection touches | |
| 63 | |
| 64 | ### Clipboard and history |
| 65 | |
| 66 | | Key | Also | Action | |
| 67 | | --- | --- | --- | |
| 68 | | `Ctrl-C` | `Ctrl-Ins` | Copy the selection | |
| 69 | | `Ctrl-X` | `Shift-Del` | Cut the selection | |
| 70 | | `Ctrl-V` | `Shift-Ins` | Paste | |
| 71 | | `Ctrl-A` | | Select the whole file | |
| 72 | | `Ctrl-Z` | | Undo | |
| 73 | | `Ctrl-R` | | Redo | |
| 74 | | `Ctrl-N` | | Insert a blank line above the cursor | |
| 75 | | `Ctrl-Y` | | Delete the line the cursor is on | |
| 76 | |
| 77 | A run of typed characters, or a run of backspaces, is a **single** undo step. Moving the cursor ends the run. |
| 78 | |
| 79 | ### Language server |
| 80 | |
| 81 | | Key | Action | |
| 82 | | --- | --- | |
| 83 | | `Ctrl-Space` | Ask for a completion list | |
| 84 | | `.` | Ask for a completion list, as a side effect of typing it | |
| 85 | | `F1` | Describe the symbol under the cursor | |
| 86 | | `F12` | Go to the declaration | |
| 87 | |
| 88 | ## Menu bar |
| 89 | |
| 90 | Once a menu is open. |
| 91 | |
| 92 | | Key | Action | |
| 93 | | --- | --- | |
| 94 | | `←` `→` | Previous / next menu | |
| 95 | | `↑` `↓` | Previous / next item, skipping separators and disabled items | |
| 96 | | `Enter` | Run the highlighted item | |
| 97 | | `<letter>` | Run the item whose label carries that letter | |
| 98 | | `Escape` | Close the menu | |
| 99 | |
| 100 | An item marked `▶` opens a submenu instead of running: |
| 101 | |
| 102 | | Key | Action | |
| 103 | | --- | --- | |
| 104 | | `→`, `Enter` | Open the highlighted submenu; `→` on an item without one moves to the next menu | |
| 105 | | `←` | Step back out to the parent menu | |
| 106 | | `Escape` | Close the whole menu, wherever you are | |
| 107 | | `↑` `↓` | Walk the submenu | |
| 108 | | `<letter>` | Run the submenu item whose label carries that letter | |
| 109 | |
| 110 | Any other key is swallowed, so stray typing never reaches the file behind. |
| 111 | |
| 112 | ## Dialogs |
| 113 | |
| 114 | | Key | Action | |
| 115 | | --- | --- | |
| 116 | | `Tab` / `Shift-Tab` | Next / previous control | |
| 117 | | `↑` `↓` | Walk the focused list; when the focused control has no use for them, the next / previous control | |
| 118 | | `Enter` | Press the default button, from wherever the focus is | |
| 119 | | `Escape` | Cancel | |
| 120 | | `Alt-<letter>` | Press the button whose label carries that letter | |
| 121 | | `Ctrl-U` | Clear the focused input field | |
| 122 | |
| 123 | A dialog is modal: every key it does not use is swallowed rather than passed to the editor behind it. |
| 124 | |
| 125 | ### The Open and Save As box |
| 126 | |
| 127 | | | | |
| 128 | | --- | --- | |
| 129 | | Focus on opening | The **Name** field, so a name can be typed straight away. The first `↓` therefore moves the focus to the list; the second moves the highlight. | |
| 130 | | Moving the highlight | Puts that entry's name into the **Name** field, so the field always says what **OK** will act on. Highlighting `../` clears it. | |
| 131 | | `Enter` on the list | Opens the highlighted file, or browses into the highlighted directory | |
| 132 | | **OK** | Acts on the **Name** field; when the field is empty, acts on whatever the list has highlighted | |
| 133 | | A name that is a directory | Browses into it rather than closing the dialog | |
| 134 | | Double click | The same as `Enter` on that entry | |
| 135 | |
| 136 | Dot-files are not listed. Directories come before files, each group sorted, with `../` first. |
| 137 | |
| 138 | ## Completion popup |
| 139 | |
| 140 | | Key | Action | |
| 141 | | --- | --- | |
| 142 | | `↑` `↓` | Previous / next suggestion | |
| 143 | | `PgUp` `PgDn` | Eight at a time | |
| 144 | | `Enter`, `Tab` | Accept the highlighted suggestion | |
| 145 | | `Escape` | Dismiss the list | |
| 146 | | any printable character | Passed through to the editor; the list narrows to what still matches | |
| 147 | |
| 148 | ## Terminal windows |
| 149 | |
| 150 | A terminal window in front gets **every key except** the function keys, `Alt-X` and `Alt-0`…`Alt-9`, which stay with the editor so there is always a way out of a full-screen program. `Ctrl-C`, `Ctrl-W`, `Ctrl-F` and `Alt-<letter>` therefore reach the shell rather than the editor. |
| 151 | |
| 152 | | Key | Action | |
| 153 | | --- | --- | |
| 154 | | `Shift-PgUp` `Shift-PgDn` | Read back / forward one screenful through the history | |
| 155 | | anything else not reserved above | Sent to the shell, returning the view to the live screen | |
| 156 | |
| 157 | The exact byte each key sends is in [Terminal windows](terminal.md). |
| 158 | |
| 159 | ## Project tree |
| 160 | |
| 161 | Handled when the tree window has the focus. The full rules are in [Project tree](project-tree.md). |
| 162 | |
| 163 | | Key | Action | |
| 164 | | --- | --- | |
| 165 | | `↑` `↓` `PgUp` `PgDn` `Home` `End` | Move the highlight | |
| 166 | | `→` | Expand a closed directory, else step to the next row | |
| 167 | | `←` | Collapse an open directory, else step out to its directory | |
| 168 | | `Enter` | Open a file; expand or collapse a directory | |
| 169 | | `F5`, `Ctrl-R` | Re-read the project | |
| 170 | |
| 171 | ## Mouse |
| 172 | |
| 173 | | Action | Effect | |
| 174 | | --- | --- | |
| 175 | | Click in the text | Place the cursor | |
| 176 | | Drag in the text | Select | |
| 177 | | Wheel | Scroll three lines | |
| 178 | | Click a menu title | Open or close that menu | |
| 179 | | Click a status-bar hint | Run it | |
| 180 | | Click a window | Bring it forward | |
| 181 | | Drag a title bar | Move the window | |
| 182 | | Drag the bottom-right corner | Resize the window | |
| 183 | | Click `[x]` | Close the window | |
| 184 | | Click `[■]` | Fill the desktop with the window | |
| 185 | | Click `[▬]` | Put a filled window back where it was | |
| 186 | | Wheel over a terminal | Scroll three lines through its history | |
| 187 | | Click a tree row | Highlight it; a second click opens it | |