kovidgoyal/kitty · info
The application is trying to use xterm's modifyOtherKeys. Th
Error message
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.
What it means
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.
Source
Thrown at kitty/screen.c:2076
}
void
screen_decsace(Screen *self, unsigned int val) {
self->modes.mDECSACE = val == 2 ? true : false;
}
void
screen_reset_mode(Screen *self, unsigned int mode) {
set_mode_from_const(self, mode, false);
}
void
screen_modify_other_keys(Screen *self, unsigned val, unsigned val2) {
// Only report an error about modifyOtherKeys if the kitty keyboard
// protocol is not in effect and the application is trying to turn it on.
// There are some applications that try to enable both.
if (self->test_child == Py_None && !screen_current_key_encoding_flags(self) && val == 4 && val2 != INT_MAX && val2 != 0) {
log_error(
"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.");
}
}
uint8_t
screen_current_key_encoding_flags(Screen *self) {
for (unsigned i = arraysz(self->main_key_encoding_flags); i-- > 0;) {
if (self->key_encoding_flags[i] & 0x80) return self->key_encoding_flags[i] & 0x7f;
}
return 0;
}
void
screen_report_key_encoding_flags(Screen *self) {
char buf[16] = {0};
debug_input("\x1b[35mReporting key encoding flags: %u\x1b[39m\n", screen_current_key_encoding_flags(self));
snprintf(buf, sizeof(buf), "?%uu", screen_current_key_encoding_flags(self));View on GitHub (pinned to 6d5d0c4406)
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
Example fix
# vim, before let &t_TI = "\e[>4;2m" # after (use kitty protocol-aware terminal settings) set term=kitty
Defensive patterns
Strategy: validation
Validate before calling
# detect the kitty keyboard protocol before enabling legacy modes # send CSI ? u, parse the reply; only fall back to modifyOtherKeys when unsupported
Prevention
- Prefer the kitty keyboard protocol when the terminal advertises it
- Skip modifyOtherKeys when the modern protocol is negotiated
When it happens
Trigger: 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).
Common situations: ssh sessions, tmux, or vim/emacs/tui configs that enable modifyOtherKeys by default.
Related errors
- Invalid shortcut
- This terminal does not support the kitty keyboard protocol,
- Shortcut: {sc} has unknown modifier, ignoring
- Ignoring invalid remap_modifiers "{val}": {msg}
- Application escape mode is not supported, the extended keybo
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/02100a9285a4ae29.
Report an issue: GitHub.