The keys used to activate commands in aptitude can be customized in the configuration file. Every command has an associated configuration variable under Aptitude::UI::Keybindings; to change the keystroke bound to a command, just set the corresponding variable to the keystroke. For instance, to make the key s perform a search, set Aptitude::UI::Keybindings::Search to “s”. You can require the Control key to be pressed by placing “C-” in front of the key: for instance, using “C-s” instead of “s” would bind Search to Control+s instead of s. Finally, you can bind a command to several keys at once using a comma-separated list: for instance, using “s,C-s” would cause both s and Control+s to perform a search.
The following commands can be bound to keys by setting the variable Aptitude::UI::Keybindings::command, where command is the name of the command to be bound:
| Command | Default | Description |
|---|---|---|
| Begin | home,C-a | Move to the beginning of the current display: to the top of a list, or to the left of a text entry field. |
| BugReport | B | Reports a bug in the currently selected package, using reportbug. |
| Cancel | C-g,escape,C-[ | Cancels the current interaction: for instance, discards a dialog box or deactivates the menu. |
| Changelog | C | Displays the changelog.Debian of the currently selected package or package version. |
| ChangePkgTreeGrouping | G | Changes the grouping policy of the currently active package list. |
| ChangePkgTreeLimit | l | Changes the limit of the currently active package list. |
| ChangePkgTreeSorting | S | Changes the sorting policy of the currently active package list. |
| ClearAuto | m | Marks the currently selected package as having been manually installed. |
| CollapseAll | ] | Collapses the selected tree and all its children in a hierarchical list. |
| CollapseTree | No binding | Collapses the selected tree in a hierarchical list. |
| Commit | N | In the hierarchy editor, stores the hierarchy location of the current package and proceeds to the next package. |
| Confirm | enter | In dialog boxes, this is equivalent to pressing “Ok”; when interacting with a status-line multiple choice question, it chooses the default option. |
| Cycle | tab | Switches the keyboard focus to the next “widget”. |
| CycleNext | f6 | Switches to the next active view. |
| CyclePrev | f7 | Switches to the previous active view. |
| DelBOL | C-u | Deletes all text between the cursor and the beginning of the line. |
| DelBack | backspace,C-h | Deletes the previous character when entering text. |
| DelEOL | C-k | Deletes all text from the cursor to the end of the line. |
| DelForward | delete,C-d | Deletes the character under the cursor when entering text. |
| Dependencies | d | Displays the dependencies of the currently selected package. |
| DescriptionCycle | i | When browsing the package list, cycles through the available views in the information area. |
| DescriptionDown | z | When browsing the package list, scrolls the information area down one line. |
| DescriptionUp | a | When browsing the package list, scrolls the information area up one line. |
| DoInstallRun | g | If not in a preview screen, display the preview screen [a]; if in a preview screen, perform an install run. |
| Down | down,j | Moves down: for instance, scrolls a text display down or selects the next item in a list. |
| DpkgReconfigure | R | Runs “dpkg-reconfigure” on the currently selected package. |
| EditHier | E | Opens the hierarchy editor. |
| End | end,C-e | Move to the end of the current display: to the bottom of a list, or to the right of a text entry field. |
| ExpandAll | [ | Expands the selected tree and all its children in a hierarchical list. |
| ExpandTree | No binding | Expands the selected tree in a hierarchical list. |
| ForbidUpgrade | F | Forbids a package from being upgraded to the currently available version (or a particular version). |
| ForgetNewPackages | f | Discards all information about which packages are “new” (causes the list of “new” packages to become empty). |
| Help | ? | Displays the on-line help screen. |
| HistoryNext | down,C-n | In a line editor with history, moves forwards in the history. |
| HistoryPrev | up,C-p | In a line editor with history, moves backwards in the history. |
| Hold | = | Places a package on hold. |
| Install | + | Flags a package for installation. |
| InstallSingle | I | Marks a single package for installation; all other packages are kept at their current version. |
| Keep | : | Cancels all installation or removal requests for a package. |
| Left | left,h | Moves left: for instance, moves one menu to the left in the menu bar, or moves the cursor to the left when editing text. |
| LevelDown | K | In a hierarchical list, selects the next sibling of the currently selected item (the next item at the same level with the same parent). |
| LevelUp | J | In a hierarchical list, selects the previous sibling of the currently selected item (the previous item at the same level with the same parent). |
| MarkUpgradable | U | Attempts to upgrade all packages which are not held back or forbidden from upgrading. |
| MineFlagSquare | f | In Minesweeper, places or removes a flag on a square. |
| MineLoadGame | L | Loads a Minesweeper game. |
| MineSaveGame | S | Saves a Minesweeper game. |
| MineSweepSquare | No binding | Sweeps around the current square in Minesweeper. |
| MineUncoverSquare | No binding | Uncovers the current square in Minesweeper |
| MineUncoverSweepSquare | enter | Uncovers the current square in Minesweeper if it is covered; otherwise, sweeps around it. |
| NextPage | pagedown,C-f | Moves the current display one page forward. |
| Parent | ^ | Selects the parent of the selected item in a hierarchical list. |
| PrevPage | pagedown,C-f | Moves the current display one page backward. |
| Purge | _ | Flags the currently selected package to be purged. |
| PushButton | space,enter | Activates the currently selected button, or toggles a checkbox. |
| Quit | q | Close the current view. |
| QuitProgram | Q | Quit the entire program. |
| Refresh | C-l | Redraws the screen from scratch. |
| Remove | - | Flags a package for removal. |
| ReInstall | L | Flags the currently selected package to be reinstalled. |
| ReSearch | \,n | Repeats the last search. |
| ReverseDependencies | r | Displays packages which depend upon the currently selected package. |
| Right | right,l | Moves right: for instance, moves one menu to the right in the menu bar, or moves the cursor to the right when editing text. |
| SaveHier | S | In the hierarchy editor, saves the current hierarchy. |
| Search | / | Activate the “search” function of whatever is currently active. |
| SetAuto | M | Marks the current package as having been automatically installed. |
| ShowHideDescription | D | In a package list, toggles whether the information area is visible. |
| ToggleExpanded | entry | Expands or collapses the currently selected tree in a hierarchical list. |
| ToggleMenuActive | f10,C-space | Activates or deactivates the main menu. |
| Undo | C-_,C-u | Cancels the last action, up to when the program was started OR the last time you update the package lists or installed packages. |
| Up | up,k | Moves up: for instance, scrolls a text display up or selects the previous item in a list. |
| UpdatePackageList | u | Updates the list of packages by fetching new lists from the Internet if necessary. |
| Versions | v | Displays the available versions of the currently selected package. |
[a] unless Aptitude::Display-Planned-Action is false. | ||
In addition to letter keys, number keys, and punctuation, the following “special” keys can be bound:
| Key name | Description |
|---|---|
| a1 | The A1 key. |
| a3 | The A3 key. |
| b2 | The B2 key. |
| backspace | The Backspace key. |
| backtab | The back-tab key |
| begin | The Begin key (not Home) |
| break | The “break” key. |
| c1 | The C1 key. |
| c3 | The C3 key. |
| cancel | The Cancel key. |
| create | The Create key. |
| comma | Comma (,) -- note that because commas are used to list keys, this is the only way to bind to a comma. |
| command | The Command key. |
| copy | The Copy key. |
| delete | The Delete key. |
| delete_line | The “delete line” key. |
| down | The “down” arrow key. |
| end | The End key. |
| entry | The Enter key. |
| exit | The Exit key. |
| f1, f2, ..., f10 | The F1 through F10 keys. |
| find | The Find key. |
| home | The Home key. |
| insert | The Insert key. |
| insert_exit | The “insert exit” key. |
| clear | The “clear” key. |
| clear_eol | The “clear to end of line” key. |
| clear_eos | The “clear to end of sceren” key. |
| insert_line | The “insert line” key. |
| left | The “left” arrow key. |
| mark | The Mark key. |
| message | The Message key. |
| move | The Move key. |
| next | The Next key. |
| open | The Open key. |
| previous | The Previous key. |
| The Print key. | |
| redo | The Redo key. |
| reference | The Reference key. |
| refresh | The Refresh key. |
| replace | The Replace key. |
| restart | The Restart key. |
| resume | The Resume key. |
| return | The Return key. |
| right | The “right” arrow key. |
| save | The Save key. |
| scrollf | The “scroll forward” key. |
| scrollr | The “scroll backwards” key. |
| select | The Select key. |
| suspend | The Suspend key. |
| pagedown | The “Page Down” key. |
| pageup | The “Page Up” key. |
| space | The Space key |
| tab | The Tab key |
| undo | The Undo key. |
| up | The “up” arrow key. |
In addition to binding keys globally, it is possible to change key bindings for one particular part (or domain) of the program: for instance, to make Tab the equivalent of the right arrow key in menu bars, set Aptitude::UI::Keybindings::Menubar::Right to “tab,right”. The following domains are available:
| Domain | Description |
|---|---|
| EditLine | Used by line-editing widgets, such as the entry field in a “search” dialog. |
| Menu | Used by drop-down menus. |
| Menubar | Used by the menu bar at the top of the screen. |
| Minesweeper | Used by the Minesweeper mode. |
| MinibufChoice | Used by the multiple-choice prompts that appear if you have chosen to have some prompts appear in the status line. |
| Pager | Used when displaying a file on disk (for instance, the help text). |
| PkgNode | Used by packages, trees of packages, package versions, and package dependencies when they appear in package lists. |
| PkgTree | Used by package lists. |
| Table | Used by tables of widgets (for instance, dialog boxes). |
| TextLayout | Used by formatted text displays, such as package descriptions. |
| Tree | Used by all tree displays (including package lists, for which it can be overridden by PkgTree). |