From 9de28f68877bbe6fbbbab7658930e32dd6f55827 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 17 May 2018 01:22:36 +0200 Subject: [PATCH] Add some more fallback key bindings DEL (aka backspace) and the arrows. This makes fish usable without binding functions, though not pleasant. See #1256. --- src/input.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/input.cpp b/src/input.cpp index abc766ad1..b9eeec667 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -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;