fish_key_reader: Don't translate things to "\v" and friends

This translated ctrl-k to "\v", which is a "vertical tab", and ctrl-l
to "\f" and ctrl-g to "\a".

There is no "vertical tab" or "alarm" or "\f" *key*, so these
shouldn't be translated. Just drop these and call them `\ck` and such.

(vertical tab specifically is utterly useless and I would be okay with
dropping it entirely, I have never seen it used anywhere)
This commit is contained in:
Fabian Boehm 2023-01-27 17:02:02 +01:00
parent befa240756
commit 7f2cb47437
2 changed files with 3 additions and 3 deletions

View File

@ -36,8 +36,8 @@
struct config_paths_t determine_config_directory_paths(const char *argv0); struct config_paths_t determine_config_directory_paths(const char *argv0);
static const wchar_t *ctrl_symbolic_names[] = { static const wchar_t *ctrl_symbolic_names[] = {
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, L"\\a", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
L"\\b", L"\\t", L"\\n", L"\\v", L"\\f", L"\\r", nullptr, nullptr, L"\\b", L"\\t", L"\\n", nullptr, nullptr, L"\\r", nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, L"\\e", L"\\x1c", nullptr, nullptr, nullptr}; nullptr, nullptr, nullptr, L"\\e", L"\\x1c", nullptr, nullptr, nullptr};

View File

@ -25,7 +25,7 @@ expect_str("Press a key:")
# Is a single control char echoed correctly? # Is a single control char echoed correctly?
send("\x07") send("\x07")
expect_str("char: \\cG (or \\a)\r\nbind \\a 'do something'\r\n") expect_str("char: \\cG\r\nbind \\cG 'do something'\r\n")
# Is a non-ASCII UTF-8 sequence prefaced by an escape char handled correctly? # Is a non-ASCII UTF-8 sequence prefaced by an escape char handled correctly?
sleep(0.020) sleep(0.020)