{"record":{"id":"02100a9285a4ae29","repo":"kovidgoyal/kitty","slug":"the-application-is-trying-to-use-xterm-s-modifyoth","errorCode":null,"errorMessage":"The application is trying to use xterm's modifyOtherKeys. This is superseded by the kitty keyboard protocol https://sw.kovidgoyal.net/kitty/keyboard-protocol. The application should be updated to use that.","messagePattern":"The application is trying to use xterm's modifyOtherKeys\\. This is superseded by the kitty keyboard protocol https://sw\\.kovidgoyal\\.net/kitty/keyboard-protocol\\. The application should be updated to use that\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"kitty/screen.c","lineNumber":2076,"sourceCode":"}\n\nvoid\nscreen_decsace(Screen *self, unsigned int val) {\n    self->modes.mDECSACE = val == 2 ? true : false;\n}\n\nvoid\nscreen_reset_mode(Screen *self, unsigned int mode) {\n    set_mode_from_const(self, mode, false);\n}\n\nvoid\nscreen_modify_other_keys(Screen *self, unsigned val, unsigned val2) {\n    // Only report an error about modifyOtherKeys if the kitty keyboard\n    // protocol is not in effect and the application is trying to turn it on.\n    // There are some applications that try to enable both.\n    if (self->test_child == Py_None && !screen_current_key_encoding_flags(self) && val == 4 && val2 != INT_MAX && val2 != 0) {\n        log_error(\n            \"The application is trying to use xterm's modifyOtherKeys. This is superseded by the kitty keyboard protocol \"\n            \"https://sw.kovidgoyal.net/kitty/keyboard-protocol. The application should be updated to use that.\");\n    }\n}\n\nuint8_t\nscreen_current_key_encoding_flags(Screen *self) {\n    for (unsigned i = arraysz(self->main_key_encoding_flags); i-- > 0;) {\n        if (self->key_encoding_flags[i] & 0x80) return self->key_encoding_flags[i] & 0x7f;\n    }\n    return 0;\n}\n\nvoid\nscreen_report_key_encoding_flags(Screen *self) {\n    char buf[16] = {0};\n    debug_input(\"\\x1b[35mReporting key encoding flags: %u\\x1b[39m\\n\", screen_current_key_encoding_flags(self));\n    snprintf(buf, sizeof(buf), \"?%uu\", screen_current_key_encoding_flags(self));","sourceCodeStart":2058,"sourceCodeEnd":2094,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/screen.c#L2058-L2094","documentation":"The application enabled xterm's modifyOtherKeys (CSI > 4 n with a non-zero level) while the kitty keyboard protocol is not active; kitty logs an advisory that this legacy mechanism is superseded. modifyOtherKeys still works - this is only a warning.","triggerScenarios":"Program sends CSI > 4 ; 1 h or CSI > 4 ; 2 h without having negotiated the kitty keyboard protocol (and not running under kitty's debug child).","commonSituations":"ssh sessions, tmux, or vim/emacs/tui configs that enable modifyOtherKeys by default.","solutions":["Ignore - modifyOtherKeys still functions","Enable the kitty keyboard protocol in your editor/app instead of legacy modifyOtherKeys","Filter the message from kitty logs if noisy"],"exampleFix":"# vim, before\nlet &t_TI = \"\\e[>4;2m\"\n# after (use kitty protocol-aware terminal settings)\nset term=kitty","handlingStrategy":"validation","validationCode":"# detect the kitty keyboard protocol before enabling legacy modes\n# send CSI ? u, parse the reply; only fall back to modifyOtherKeys when unsupported","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer the kitty keyboard protocol when the terminal advertises it","Skip modifyOtherKeys when the modern protocol is negotiated"],"tags":["kitty","keyboard","modifyotherkeys","keyboard-protocol"],"backgroundTag":"legacy-keyboard-mode","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}