Customizing keybindings

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

ApplySolution

!

If packages are broken and aptitude has suggested
a solution to the problem, immediately apply the
solution.

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.

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.

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 screen” 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.

print

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 aptitude: 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.