wezterm
wezterm copied to clipboard
Ctrl + i are interpreted as tab on MacOS
What Operating System(s) are you seeing this problem on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
Ctrl + i is interpreted as a tab (in helix for ex.).
Seem linked to https://github.com/wez/wezterm/issues/1851
To Reproduce
No response
Configuration
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This will hold the configuration.
local config = wezterm.config_builder()
local act = wezterm.action
-- This is where you actually apply your config choices
-- For example, changing the color scheme:
config.color_scheme = 'Catppuccin Mocha'
-- config.color_scheme = 'Catppuccin Macchiato'
config.font = wezterm.font {
family = 'Cascadia Code',
-- stretch = 'Expanded',
weight = 'Light',
}
config.font_size = 15.0
config.bold_brightens_ansi_colors = "BrightAndBold"
config.window_decorations = "RESIZE"
config.send_composed_key_when_left_alt_is_pressed = true
config.use_fancy_tab_bar = false
config.scrollback_lines = 3000
config.status_update_interval = 2000
config.initial_rows = 48
config.initial_cols = 150
config.max_fps = 120
config.foreground_text_hsb = {
hue = 1.0,
saturation = 1.1,
brightness = 1.5,
}
config.inactive_pane_hsb = {
saturation = 0.8,
brightness = 0.7,
}
config.mouse_bindings = {
-- Ctrl-click will open the link under the mouse cursor
{
event = { Up = { streak = 1, button = 'Left' } },
mods = 'CTRL',
action = wezterm.action.OpenLinkAtMouseCursor,
},
}
config.keys = {
-- {key = "v", mods = "CTRL", action = act.SplitVertical {domain = "CurrentPaneDomain"}},
{ key = "v", mods = "CTRL", action = act.SplitPane { direction = "Down", size = { Percent = 20 } } },
{ key = "h", mods = "CTRL", action = act.SplitHorizontal { domain = "CurrentPaneDomain" } },
{ key = "-", mods = "CTRL", action = act.DecreaseFontSize },
{ key = ")", mods = "CTRL", action = act.IncreaseFontSize },
{ key = "k", mods = "SUPER", action = act.ClearScrollback("ScrollbackAndViewport") },
{ key = "LeftArrow", mods = "CTRL|SUPER", action = act.ActivateTabRelative(-1) },
{ key = "RightArrow", mods = "CTRL|SUPER", action = act.ActivateTabRelative(1) },
{ key = "l", mods = "SUPER", action = act.ShowLauncher },
}
wezterm.on("update-status", function(window, pane)
-- Workspace name
local stat = window:active_workspace()
local stat_color = "#f7768e"
-- It's a little silly to have workspace name all the time
-- Utilize this to display LDR or current key table name
if window:active_key_table() then
stat = window:active_key_table()
stat_color = "#7dcfff"
end
if window:leader_is_active() then
stat = "LDR"
stat_color = "#bb9af7"
end
local basename = function(s)
-- Nothing a little regex can't fix
return string.gsub(s, "(.*[/\\])(.*)", "%2")
end
-- Current working directory
local cwd = pane:get_current_working_dir()
if cwd then
if type(cwd) == "userdata" then
-- Wezterm introduced the URL object in 20240127-113634-bbcac864
cwd = basename(cwd.file_path)
else
-- 20230712-072601-f4abf8fd or earlier version
cwd = basename(cwd)
end
else
cwd = ""
end
-- Current command
local cmd = pane:get_foreground_process_name()
-- CWD and CMD could be nil (e.g. viewing log using Ctrl-Alt-l)
cmd = cmd and basename(cmd) or ""
-- Time
local time = wezterm.strftime("%H:%M")
-- Left status (left of the tab line)
window:set_left_status(wezterm.format({
{ Foreground = { Color = stat_color } },
{ Text = " " },
{ Text = wezterm.nerdfonts.oct_table .. " " .. stat },
{ Text = " |" },
}))
-- Right status
window:set_right_status(wezterm.format({
-- Wezterm has a built-in nerd fonts
-- https://wezfurlong.org/wezterm/config/lua/wezterm/nerdfonts.html
{ Text = wezterm.nerdfonts.md_folder .. " " .. cwd },
{ Text = " | " },
{ Foreground = { Color = "#e0af68" } },
{ Text = wezterm.nerdfonts.fa_code .. " " .. cmd },
"ResetAttributes",
{ Text = " | " },
{ Text = wezterm.nerdfonts.md_clock .. " " .. time },
{ Text = " " },
}))
end)
return config
Expected Behavior
Ctrl + i provide a Ctrl + i
Logs
No response
Anything else?
No response
ctrl-i encodes the same as tab in the standard keyboard encoding, so this doesn't immediately sound like a bug. Most likely, this is a helix issue where it needs to request an adjusted keyboard encoding in order to disambiguate the keys.
Run through: https://wezfurlong.org/wezterm/troubleshooting.html#debugging-keyboard-related-issues
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.