diff --git a/docs/keyboard-protocol.rst b/docs/keyboard-protocol.rst index c0a32b49c..ac19ef8d7 100644 --- a/docs/keyboard-protocol.rst +++ b/docs/keyboard-protocol.rst @@ -441,6 +441,7 @@ mode* (the ``smkx/rmkx`` terminfo capabilities). This form is used only in "F10", "kf10", "CSI 21 ~" "F11", "kf11", "CSI 23 ~" "F12", "kf12", "CSI 24 ~" + "MENU", "kf16", "CSI 29 ~" There are a few more functional keys that have special cased legacy encodings. These are present because they are commonly used and for the sake of legacy diff --git a/kitty/key_encoding.c b/kitty/key_encoding.c index 363db5379..d9d24ce30 100644 --- a/kitty/key_encoding.c +++ b/kitty/key_encoding.c @@ -234,6 +234,7 @@ encode_function_key(const KeyEvent *ev, char *output) { case GLFW_FKEY_F11: S(23, '~'); case GLFW_FKEY_F12: S(24, '~'); case GLFW_FKEY_MENU: + // use the same encoding as xterm for this key in legacy mode (F16) if (legacy_mode) { S(29, '~'); } break; /* end special numbers */