# Reference: keyboard > Complete list of the keys Turbo Python answers to, grouped by what has the focus. Where two spellings exist, both work: the Turbo C one and the modern one. ## Global Handled wherever the focus is, unless a dialog or the completion popup is open. | Key | Action | | --- | --- | | `F1` | Describe the symbol under the cursor; with no file open, show the keyboard help | | `F2` | Save | | `F3` | Open | | `F4` | New | | `F6` | Next window | | `F7` | Find next | | `Shift-F7` | Find previous | | `F8` | Open a terminal window | | `F9` | Open the project tree | | `F10` | Open the menu bar | | `F12` | Go to definition | | `Shift-F12` | Find references | | `Ctrl-T` | Find a symbol anywhere in the project | | `Ctrl-F` | Find | | `Ctrl-G` | Go to line | | `Ctrl-W` | Close the current window | | `Alt-X` | Exit | | `Alt-1` … `Alt-9` | Bring window 1…9 forward | | `Alt-0` | List the open windows | | `Alt-N` | Open the Snippets menu | | `Alt-P` | Open the Python menu | | `Alt-` | Open the menu whose title carries that letter | 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). ## Editing Handled by the window that has the focus. ### Movement | Key | Action | | --- | --- | | `←` `→` `↑` `↓` | One character or one line | | `Ctrl-←` `Ctrl-→` | Start of the previous / next word | | `Home` `End` | Start / end of the line | | `Ctrl-Home` `Ctrl-End` | Start / end of the file | | `PgUp` `PgDn` | One screenful | | `Shift` + any of the above | The same movement, extending the selection | ### Changing the text | Key | Action | | --- | --- | | any printable character | Insert it, replacing the selection | | `Enter` | Split the line, copying the current line's indentation | | `Backspace` | Delete the selection, or the character before the cursor | | `Delete` | Delete the selection, or the character under the cursor | | `Tab` | Insert a tab; with a selection, indent every line it touches | | `Shift-Tab` | Remove one level of indentation from every line the selection touches | ### Clipboard and history | Key | Also | Action | | --- | --- | --- | | `Ctrl-C` | `Ctrl-Ins` | Copy the selection | | `Ctrl-X` | `Shift-Del` | Cut the selection | | `Ctrl-V` | `Shift-Ins` | Paste | | `Ctrl-A` | | Select the whole file | | `Ctrl-Z` | | Undo | | `Ctrl-R` | | Redo | | `Ctrl-N` | | Insert a blank line above the cursor | | `Ctrl-Y` | | Delete the line the cursor is on | A run of typed characters, or a run of backspaces, is a **single** undo step. Moving the cursor ends the run. ### Language server | Key | Action | | --- | --- | | `Ctrl-Space` | Ask for a completion list | | `.` | Ask for a completion list, as a side effect of typing it | | `F1` | Describe the symbol under the cursor | | `F12` | Go to the declaration | ## Menu bar Once a menu is open. | Key | Action | | --- | --- | | `←` `→` | Previous / next menu | | `↑` `↓` | Previous / next item, skipping separators and disabled items | | `Enter` | Run the highlighted item | | `` | Run the item whose label carries that letter | | `Escape` | Close the menu | An item marked `▶` opens a submenu instead of running: | Key | Action | | --- | --- | | `→`, `Enter` | Open the highlighted submenu; `→` on an item without one moves to the next menu | | `←` | Step back out to the parent menu | | `Escape` | Close the whole menu, wherever you are | | `↑` `↓` | Walk the submenu | | `` | Run the submenu item whose label carries that letter | Any other key is swallowed, so stray typing never reaches the file behind. ## Dialogs | Key | Action | | --- | --- | | `Tab` / `Shift-Tab` | Next / previous control | | `↑` `↓` | Walk the focused list; when the focused control has no use for them, the next / previous control | | `Enter` | Press the default button, from wherever the focus is | | `Escape` | Cancel | | `Alt-` | Press the button whose label carries that letter | | `Ctrl-U` | Clear the focused input field | A dialog is modal: every key it does not use is swallowed rather than passed to the editor behind it. ### The Open and Save As box | | | | --- | --- | | 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. | | 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. | | `Enter` on the list | Opens the highlighted file, or browses into the highlighted directory | | **OK** | Acts on the **Name** field; when the field is empty, acts on whatever the list has highlighted | | A name that is a directory | Browses into it rather than closing the dialog | | Double click | The same as `Enter` on that entry | Dot-files are not listed. Directories come before files, each group sorted, with `../` first. ## Completion popup | Key | Action | | --- | --- | | `↑` `↓` | Previous / next suggestion | | `PgUp` `PgDn` | Eight at a time | | `Enter`, `Tab` | Accept the highlighted suggestion | | `Escape` | Dismiss the list | | any printable character | Passed through to the editor; the list narrows to what still matches | ## Terminal windows 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-` therefore reach the shell rather than the editor. | Key | Action | | --- | --- | | `Shift-PgUp` `Shift-PgDn` | Read back / forward one screenful through the history | | anything else not reserved above | Sent to the shell, returning the view to the live screen | The exact byte each key sends is in [Terminal windows](terminal.md). ## Project tree Handled when the tree window has the focus. The full rules are in [Project tree](project-tree.md). | Key | Action | | --- | --- | | `↑` `↓` `PgUp` `PgDn` `Home` `End` | Move the highlight | | `→` | Expand a closed directory, else step to the next row | | `←` | Collapse an open directory, else step out to its directory | | `Enter` | Open a file; expand or collapse a directory | | `F5`, `Ctrl-R` | Re-read the project | ## Mouse | Action | Effect | | --- | --- | | Click in the text | Place the cursor | | Drag in the text | Select | | Wheel | Scroll three lines | | Click a menu title | Open or close that menu | | Click a status-bar hint | Run it | | Click a window | Bring it forward | | Drag a title bar | Move the window | | Drag the bottom-right corner | Resize the window | | Click `[x]` | Close the window | | Click `[■]` | Fill the desktop with the window | | Click `[▬]` | Put a filled window back where it was | | Wheel over a terminal | Scroll three lines through its history | | Click a tree row | Highlight it; a second click opens it |