feedback: when reporting an unbound function key, mention its number

This makes it easier to figure out what to put in their nanorc file
when the user wants to bind the key.
master
Benno Schulenberg 2021-11-28 15:35:22 +01:00
parent b87722ab2d
commit abd4c47acf
1 changed files with 5 additions and 0 deletions

View File

@ -1283,6 +1283,11 @@ void unbound_key(int code)
/* TRANSLATORS: This refers to a sequence of escape codes
* (from the keyboard) that nano does not recognize. */
statusline(AHEM, _("Unknown sequence"));
#ifndef NANO_TINY
/* TRANSLATORS: This refers to an unbound function key. */
else if (code > KEY_F0 && code < KEY_F0 + 25)
statusline(AHEM, _("Unbound key: F%i"), code - KEY_F0);
#endif
else if (code > 0x7F)
statusline(AHEM, _("Unbound key"));
else if (meta_key) {