wezterm sends a weird key sequence after quitting yazi over ssh
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
I installed yazi (a terminal file manager written in Rust) on my ubuntu server. I used wezterm in my windows system and connected to my ubuntu server over ssh. I started yazi and then quitted it. But a weird key sequence showed in wezterm.
I also have yazi installed in my windows system. When I started and quitted yazi in windows using wezterm, no weird key sequence showed.
To Reproduce
No response
Configuration
local wezterm = require("wezterm") local config = { font_size = 10, font = wezterm.font("JetBrainsMono NF", { weight = "Bold" }),
color_scheme = "Everforest Dark (Gogh)",
initial_cols = 120,
initial_rows = 30,
enable_tab_bar = true,
tab_bar_at_bottom = true,
use_fancy_tab_bar = false,
hide_tab_bar_if_only_one_tab = true,
show_tab_index_in_tab_bar = false,
window_decorations = "RESIZE",
window_background_opacity = 0.9,
adjust_window_size_when_changing_font_size = false,
window_padding = {
left = 15,
right = 15,
top = 15,
bottom = 10,
},
inactive_pane_hsb = {
saturation = 0.7,
brightness = 0.5,
},
text_background_opacity = 0.9,
default_cursor_style = "BlinkingBar",
cursor_blink_ease_in = "Constant",
cursor_blink_ease_out = "Constant",
cursor_blink_rate = 700,
default_prog = { "pwsh" },
}
local function process_name(s) local a = string.gsub(s, "(.[/\])(.)", "%2") return a:gsub("%.exe$", "") end
local shell_icon = wezterm.nerdfonts.linux_apple wezterm.on("format-tab-title", function(tab, tabs, panes, configuration, hover, max_width) local background = "#24578C" local foreground = "#0F2536" if tab.is_active then background = "#8C246F" foreground = "#0F2536" elseif hover then background = "#786D22" foreground = "#0F2536" end
local proc_name = process_name(tab.active_pane.foreground_process_name)
return {
-- { Background = { Color = background } },
-- { Foreground = { Color = foreground } },
{ Text = " " .. shell_icon .. " " .. proc_name .. " " },
}
end)
local act = wezterm.action config.keys = { { key = "w", mods = "CTRL|SHIFT", action = act.CloseCurrentTab({ confirm = true }), }, { key = "t", mods = "CTRL", action = act.SpawnTab("CurrentPaneDomain"), }, { key = "\", mods = "ALT", action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }), }, { key = "/", mods = "ALT", action = act.SplitVertical({ domain = "CurrentPaneDomain" }), }, { key = "q", mods = "ALT", action = act.CloseCurrentPane({ confirm = true }), }, { key = "UpArrow", mods = "ALT", action = act.ActivatePaneDirection("Up"), }, { key = "DownArrow", mods = "ALT", action = act.ActivatePaneDirection("Down"), }, { key = "LeftArrow", mods = "ALT", action = act.ActivatePaneDirection("Left"), }, { key = "RightArrow", mods = "ALT", action = act.ActivatePaneDirection("Right"), }, { key = "Tab", mods = "CTRL", action = act.ActivateTabRelative(1), }, { key = "Tab", mods = "CTRL|SHIFT", action = act.ActivateTabRelative(-1), }, { key = "c", mods = "CTRL|SHIFT", action = act.CopyTo("Clipboard"), }, { key = "v", mods = "CTRL", action = act.PasteFrom("Clipboard"), }, { key = "UpArrow", mods = "SHIFT", action = act.ScrollByPage(-0.3), }, { key = "DownArrow", mods = "SHIFT", action = act.ScrollByPage(0.3), }, }
config.mouse_bindings = { { event = { Drag = { streak = 1, button = "Left" } }, mods = "ALT", action = wezterm.action.StartWindowDrag, }, }
return config
Expected Behavior
No response
Logs
No response
Anything else?
No response
Just tried neovim v0.11.0 and v0.10.3 on my ubuntu server. No strange sequence.
I had a similar problem, solved by installing the nightly version of WezTerm. Nightly is not on any package managers, only on the wezterm website.
Has a simular problem, fixed by swithing to nightly, but my yazi was also entirly blank until i did a key input then the ui updated to show yazi.
Has a simular problem, fixed by swithing to nightly, but my yazi was also entirly blank until i did a key input then the ui updated to show yazi.
Interesting, I've also been having similar UI problems with yazi, but I didn't consider they were Terminal issues. The fix for me is also to send any keyboard input. Let me know if you identify the cause please!