1

I want to assign some actions to key bindnigs in Midnight Commander like Alt+[ or Alt+].
Where can I find "code names" for this (and other) keys?
For example I already found some keys:
` = "prime"
{ = "lbrace"
} = "rbrace"
< = "lt"
> = "gt"

Thanks.

1

grep'ing the Midnight Commander source code, the file you want to look over is 'lib/tty/keys.c', with the relevant section commented "Alternative label"

Here is the relevant section, followed by a link to the file at the project's official repo.

/* Alternative label */
{ESC_CHAR, "esc", N_("Escape"), "Esc"},
{KEY_BACKSPACE, "bs", N_("Backspace"), "Bakspace"},
{KEY_IC, "ins", N_("Insert"), "Ins"},
{KEY_DC, "del", N_("Delete"), "Del"},
{(int) '*', "asterisk", N_("Asterisk"), "*"},
{(int) '-', "minus", N_("Minus"), "-"},
{(int) '+', "plus", N_("Plus"), "+"},
{(int) '.', "dot", N_("Dot"), "."},
{(int) '<', "lt", N_("Less than"), "<"},
{(int) '>', "gt", N_("Great than"), ">"},
{(int) '=', "equal", N_("Equal"), "="},
{(int) ',', "comma", N_("Comma"), ","},
{(int) '\'', "apostrophe", N_("Apostrophe"), "\'"},
{(int) ':', "colon", N_("Colon"), ":"},
{(int) ';', "semicolon", N_("Semicolon"), ";"},
{(int) '!', "exclamation", N_("Exclamation mark"), "!"},
{(int) '?', "question", N_("Question mark"), "?"},
{(int) '&', "ampersand", N_("Ampersand"), "&"},
{(int) '$', "dollar", N_("Dollar sign"), "$"},
{(int) '"', "quota", N_("Quotation mark"), "\""},
{(int) '%', "percent", N_("Percent sign"), "%"},
{(int) '^', "caret", N_("Caret"), "^"},
{(int) '~', "tilda", N_("Tilda"), "~"},
{(int) '`', "prime", N_("Prime"), "`"},
{(int) '_', "underline", N_("Underline"), "_"},
{(int) '_', "understrike", N_("Understrike"), "_"},
{(int) '|', "pipe", N_("Pipe"), "|"},
{(int) '(', "lparenthesis", N_("Left parenthesis"), "("},
{(int) ')', "rparenthesis", N_("Right parenthesis"), ")"},
{(int) '[', "lbracket", N_("Left bracket"), "["},
{(int) ']', "rbracket", N_("Right bracket"), "]"},
{(int) '{', "lbrace", N_("Left brace"), "{"},
{(int) '}', "rbrace", N_("Right brace"), "}"},
{(int) '\n', "enter", N_("Enter"), "Enter"},
{(int) '\t', "tab", N_("Tab key"), "Tab"},
{(int) ' ', "space", N_("Space key"), "Space"},
{(int) '/', "slash", N_("Slash key"), "/"},
{(int) '\\', "backslash", N_("Backslash key"), "\\"},
{(int) '#', "number", N_("Number sign #"), "#"},
{(int) '#', "hash", N_("Number sign #"), "#"},
/* TRANSLATORS: Please translate as in "at sign" (@). */
{(int) '@', "at", N_("At sign"), "@"},

http://repo.or.cz/midnight-commander.git/blob/HEAD:/lib/tty/key.c

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.