wezterm
wezterm copied to clipboard
Can not swtich input method
What Operating System(s) are you seeing this problem on?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
Distributor ID: Ubuntu Description: Ubuntu 22.04.2 LTS Release: 22.04 Codename: jammy
WezTerm version
20230217-120342-3b39aa55
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
Can not switch input method. I using fcitx
env:
GLFW_IM_MODULE=ibus GTK_IM_MODULE=fcitx LC_TIME=zh_CN.UTF-8 QT_IM_MODULE=fcitx SDL_IM_MODULE=fcitx XDG_RUNTIME_DIR=/run/user/1000 XIM=fcitx XIM_PROGRAM=fcitx
To Reproduce
No response
Configuration
local wezterm = require("wezterm")
return {
use_ime = true,
xim_im_name = "fcitx",
-- no gpu config
-- prefer_egl=true,
-- enable ctrl-space to change input method
--font = wezterm.font("FiraCode Nerd Font Mono", { weight = "Regular", italic = false }),
--font = wezterm.font("FiraCode Nerd Font Mono", { weight = "Regular", italic = false }),
--font = wezterm.font("JetBrains Mono", { weight = "Bold", italic = false }),
-- windows pwsh
-- default_prog = { "C:\\Program Files\\PowerShell\\7\\pwsh.exe" },
font = wezterm.font_with_fallback({
{ family = "JetBrains Mono", weight = "Regular", italic = false },
{ family = "FiraCode Nerd Font Mono", weight = "Regular", italic = false },
}),
font_size = 18,
color_scheme = "Dracula",
tab_bar_at_bottom = true,
use_fancy_tab_bar = true,
enable_tab_bar = true,
hide_tab_bar_if_only_one_tab = true,
window_padding = {
left = 5,
right = 2,
top = 10,
bottom = 2,
},
font_rules = {
{
intensity = "Normal",
italic = true,
font = wezterm.font_with_fallback({
{ family = "JetBrains Mono", weight = "Regular", italic = false },
{ family = "FiraCode Nerd Font Mono", weight = "Regular", italic = false },
}),
},
{
intensity = "Bold",
italic = true,
font = wezterm.font_with_fallback({
{ family = "JetBrains Mono", weight = "Bold", italic = false },
{ family = "FiraCode Nerd Font Mono", weight = "Bold", italic = false },
}),
},
},
window_frame = {
-- The font used in the tab bar.
-- Roboto Bold is the default; this font is bundled
-- with wezterm.
-- Whatever font is selected here, it will have the
-- main font setting appended to it to pick up any
-- fallback fonts you may have used there.
font = wezterm.font({ family = "FiraCode Nerd Font Mono", weight = "Regular", italic = false }),
-- The size of the font in the tab bar.
-- Default to 10. on Windows but 12.0 on other systems
font_size = 12.0,
-- The overall background color of the tab bar when
-- the window is focused
active_titlebar_bg = "#333333",
-- The overall background color of the tab bar when
-- the window is not focused
inactive_titlebar_bg = "#333333",
},
}
Expected Behavior
using CTRL+Space switch input method
Logs
No response
Anything else?
no
Same issue here under wayland
~~ Same here under Wayland. ~~
Maybe look over here: https://wezfurlong.org/wezterm/config/keys.html?highlight=ime#configuring-key-assignments
This link is from this issue: #1188
same issue here, sometimes can switch to another window and use fcitx5 IME to input some characters then switch back to wezterm to make it works again, but most of time I need to restart wezterm
any solutions?
Hi, same issue happened for me occasionally on GNOME 45 + wayland, often happen when use wezterm for hours.
switch im in fcitx work still work on others app, e.g. firefox, but switch in wzterm, no response, it just keep current status.
this issue happen on all tabs, pane, reload wezterm config no work, but reload fcitx work, any idea?
@zw963 @road2coder @suiyuex
Still facing this question in ubuntu 20.04 and latest version wezterm-20240203-110809-5046fc22.Ubuntu20.04.deb
But I found that wezterm can work with fcitx
if you do like this:
- enable this following configuration of fcitx:
- switch to other input method in any input box
- open wezterm, and the input method switch work fine.
Does't know the bug is in wezterm or fcitx currentlly, But the above operation can make wezterm work with fcitx. 😁
Thanks, this option, right? (see screenshot)
@zw963 Yes. Are you using fcitx5? (the pic you provide seems like fcitx5-qt configuration) But I tested fcitx5 in ubuntu 20.04 and work fine. (I compile fcitx5 locally in 20.04 because can't stand having to switch input methods every time I turn it wezterm)
Hi, i thought this issue should be solved now, because after set Share Input State
to All
, this issue never happen again, but when i revert my fcitx config recent days, it happen again.
So, https://github.com/wez/wezterm/issues/3221#issuecomment-1987133501 should be the correct answer.
Thank you very much.
Hi, this same issue happen frequently on my minipc, only if hibernate and then wake up.
this workaround not work too in this case.
Following is the exactly how to reproduce this:
- build wezterm use latest master. (8fa4ba9ac)
- install fcitx5, i use arch linux, install is easy with:
$: pacman -S fcitx5-chinese-addons fcitx5-gtk fcitx5-pinyin-zhwiki fcitx5-configtool gnome-shell-extension-kimpanel-git
-
config to support Chinese IM, basically, run
fcitx5-config
, uncheck the checkbox, and add pinyin into left panel. (please check following screenshot) -
Now you can always switch to input Chinese use Ctrl + Space.
-
Run
systemctl hiberante
to wait power off, this step probably hard to follow if not use Arch linux. -
power on, then login, Ctrl + Space not work.
But, good news is, input method work again after reload configuration anyway.
Here is the log i captured run with WAYLAND_DEUG=1 wezterm
after i boot my laptop from hibernate, please have a look if necessary.
https://github.com/fcitx/fcitx5/issues/1030#issuecomment-2095667021
Thanks