Skip to content

Commit

Permalink
Add some more fallback key bindings
Browse files Browse the repository at this point in the history
DEL (aka backspace) and the arrows.

This makes fish usable without binding functions, though not pleasant.

See #1256.
  • Loading branch information
faho committed May 17, 2018
1 parent 0dd2607 commit 9de28f6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,15 @@ void init_input() {
input_mapping_add(L"\n", L"execute");
input_mapping_add(L"\r", L"execute");
input_mapping_add(L"\t", L"complete");
input_mapping_add(L"\x3", L"commandline \"\"");
input_mapping_add(L"\x3", L"commandline ''");
input_mapping_add(L"\x4", L"exit");
input_mapping_add(L"\x5", L"bind");
input_mapping_add(L"\x7f", L"backward-delete-char");
// Arrows - can't have functions, so *-or-search isn't available.
input_mapping_add(L"\e[A", L"up-line");
input_mapping_add(L"\e[B", L"down-line");
input_mapping_add(L"\e[C", L"forward-char");
input_mapping_add(L"\e[D", L"backward-char");
}

input_initialized = true;
Expand Down

0 comments on commit 9de28f6

Please sign in to comment.