1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 18:23:13 +02:00

core: use new key name in command /key and configuration file

Legacy keys are automatically converted to new names when loading configuration
file `weechat.conf`.

Examples:

  "ctrl-I" => "tab"
  "meta2-1;3A" => "meta-up"
  "meta2-Z" => "shift-tab"
  "meta-wmeta-meta2-A" => "meta-w,meta-up"
  "ctrl-Cb" => "ctrl-c,b"
This commit is contained in:
Sébastien Helleu
2023-02-22 21:18:22 +01:00
parent 5b5ccb236f
commit 1f5c791c37
22 changed files with 654 additions and 552 deletions
+15 -16
View File
@@ -1417,29 +1417,28 @@ void
fset_buffer_set_keys ()
{
char *keys[][2] = {
{ "meta2-A", "/fset -up" },
{ "meta2-B", "/fset -down" },
{ "meta-meta2-1~", "/fset -go 0" },
{ "meta-meta2-4~", "/fset -go end" },
{ "meta2-23~", "/fset -left" },
{ "meta2-24~", "/fset -right" },
{ "up", "/fset -up" },
{ "down", "/fset -down" },
{ "meta-home", "/fset -go 0" },
{ "meta-end", "/fset -go end" },
{ "f11", "/fset -left" },
{ "f12", "/fset -right" },
{ "meta-space", "/fset -toggle" },
{ "meta--", "/fset -add -1" },
{ "meta-+", "/fset -add 1" },
{ "meta-fmeta-r", "/fset -reset" },
{ "meta-fmeta-u", "/fset -unset" },
{ "meta-ctrl-j", "/fset -set" },
{ "meta-ctrl-m", "/fset -set" },
{ "meta-fmeta-n", "/fset -setnew" },
{ "meta-fmeta-a", "/fset -append" },
{ "meta-,", "/fset -mark" },
{ "meta2-a", "/fset -up; /fset -mark" },
{ "meta2-b", "/fset -mark; /fset -down" },
{ "meta-f,meta-r", "/fset -reset" },
{ "meta-f,meta-u", "/fset -unset" },
{ "meta-return", "/fset -set" },
{ "meta-f,meta-n", "/fset -setnew" },
{ "meta-f,meta-a", "/fset -append" },
{ "meta-comma", "/fset -mark" },
{ "shift-up", "/fset -up; /fset -mark" },
{ "shift-down", "/fset -mark; /fset -down" },
{ "ctrl-l", "/fset -refresh" },
{ "meta-p", "/mute /set fset.look.show_plugins_desc toggle" },
{ "meta-v", "/bar toggle " FSET_BAR_NAME },
{ "ctrl-x", "/fset -format" },
{ NULL, NULL },
{ NULL, NULL },
};
char str_key[64];
int i;