#4381·yazi

Kitty Keyboard Protocol broken on Wezterm

Author: NSPC911Created Sep 28, 2026Updated Sep 29, 2026
Labelsbug

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

wezterm 20260820-095106-770d8e1a

yazi env output

bash
Yazi
    Version: 26.9.1 (0ea4c5d 2026-09-21)
    Debug  : false
    Triple : x86_64-unknown-linux-gnu (linux-x86_64)
    Rustc  : 1.98.1 (48a229ce 2026-09-01)
    Backtrace: None

Ya
    Version: 26.9.1 (0ea4c5d 2026-09-21)
    Debug  : false
    Triple : x86_64-unknown-linux-gnu (linux-x86_64)
    Rustc  : 1.98.1 (48a229ce 2026-09-01)

Config
    Init             : /home/nspc911/.config/yazi/init.lua (No such file or directory (os error 2))
    Yazi             : /home/nspc911/.config/yazi/yazi.toml (No such file or directory (os error 2))
    Keymap           : /home/nspc911/.config/yazi/keymap.toml (No such file or directory (os error 2))
    Theme            : /home/nspc911/.config/yazi/theme.toml (No such file or directory (os error 2))
    VFS              : /home/nspc911/.config/yazi/vfs.toml (No such file or directory (os error 2))
    Package          : /home/nspc911/.config/yazi/package.toml (No such file or directory (os error 2))
    Dark/light flavor: ArcSwapAny("") / ArcSwapAny("")

Emulator
    TERM                : Some("xterm-256color")
    TERM_PROGRAM        : Some("WezTerm")
    TERM_PROGRAM_VERSION: Some("20260820-095106-770d8e1a")
    Brand.from_env      : Some(WezTerm)
    Emulator.probe      : Emulator { brand: WezTerm, version: ArcSwapAny("WezTerm 20260820-095106-770d8e1a"), csi_u: Some(0), kgp: true, kgp_shm: true, sixel: true, background: Some([11822, 13364, 16448]), color_scheme: None, csi_16t: (9, 18), force_16t: false, osc_5522: false, cursor_blink: false, cursor_shape: None, mux: None, probe: Probe { id: Id(0), completed: false }, started: false }

Adapter
    Drivers.matches: Iip
    TERM.dimension : Dimension { cols: 185, rows: 57, width: 1665, height: 1026 }

Desktop
    XDG_SESSION_TYPE           : Some("wayland")
    WAYLAND_DISPLAY            : Some("wayland-1")
    DISPLAY                    : Some(":1")
    NIRI_SOCKET                : Some("/run/user/1000/niri.wayland-1.1109.sock")
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : Some("/bin/bash")
    EDITOR             : Some("/home/nspc911/.cargo/bin/hx")
    VISUAL             : None
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None
    YAZI_ZOXIDE_OPTS   : None
    SSH_AUTH_SOCK      : Some("/run/user/1000/wezterm/agent.1463")
    FZF_DEFAULT_OPTS   : None
    FZF_DEFAULT_COMMAND: None

Text Opener
    default     : Some(OpenerRuleArc(OpenerRule { id: Id(3), run: "${EDITOR:-vi} %s", block: true, orphan: false, desc: "$EDITOR", for: Unix, spread: true }))
    block-create: Some(OpenerRuleArc(OpenerRule { id: Id(3), run: "${EDITOR:-vi} %s", block: true, orphan: false, desc: "$EDITOR", for: Unix, spread: true }))
    block-rename: Some(OpenerRuleArc(OpenerRule { id: Id(3), run: "${EDITOR:-vi} %s", block: true, orphan: false, desc: "$EDITOR", for: Unix, spread: true }))

Multiplexers
    tmux version       : No such file or directory (os error 2)
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: None
    Zellij version     : 0.45.1

Dependencies
    file          : 5.48
    ueberzugpp    : No such file or directory (os error 2)
    ffmpeg/ffprobe: 9.0.1 / 9.0.1
    pdftoppm      : 26.08.0
    magick        : 7.1.2-31
    fzf           : 0.74.4
    fd/fdfind     : 10.5.0 / No such file or directory (os error 2)
    rg            : 15.2.0
    chafa         : No such file or directory (os error 2)
    zoxide        : 0.10.0
    7zz/7z        : No such file or directory (os error 2) / 26.03
    resvg         : No such file or directory (os error 2)
    jq            : 1.8.2

Clipboard
    wl-copy/paste: 2.3.0 / 2.3.0
    xclip        : 0.13
    xsel         : No such file or directory (os error 2)

Routine
    `file -bL --mime-type`: text/plain

Describe the bug

https://github.com/sxyazi/yazi/pull/4370 may have broken the Kitty Keyboard Protocol on Wezterm.

Pressing esc, backspace and enter do not work.

Minimal reproducer

  1. Enable KKP with
lua
local wezterm = require("wezterm")
local config = wezterm.config_builder()
config.enable_kitty_keyboard = true
return config
  1. Open yazi
  2. Open a modal (with f, s, etc)
  3. Try pressing esc or the other two I mentioned

Anything else?

Wezterm's Kitty Keyboard implementation is weird, because https://github.com/wezterm/wezterm/issues/8149 seems to happen for the fun of it

Every other terminal sends ESC [ 97 ; 5 u for ctrl + a, but wezterm sends ESC [ 97 ; 5 ; 97 u, an additional a character, leading to frameworks accidentally mis-interpreting the key press as one without modifiers

This is a bug NOT on stable, only on nightly.

Checklist

  • I tried the latest nightly build, and the issue is still reproducible
  • I updated the environment information (ya env) field to the nightly that I tried
  • I can reproduce it after disabling all custom configs/plugins (mv ~/.config/yazi ~/.config/yazi-backup)