Summary
There is no issues tab for fcitx5-fbterm, so filing it here:
Issue: Control Sequence Leakage (C1 Injection) in Fcitx5-FbTerm
TL;DR
I'm seeing two "diamond characters" when pressing "ctrl+space", and it's not "bad fonts".
Environment
- OS: Arch Linux (TTY/Framebuffer only, no X11/Wayland).
- Terminal:
fbterm (Version: Latest from repos).
- Input Stack:
fcitx5 (daemon), fcitx5-fbterm (bridge), fcitx5-mozc (engine).
- Locale: UTF-8 (e.g.,
en_US.UTF-8).
- Permissions:
setcap 'cap_sys_tty_config+ep' /usr/bin/fbterm is verified.
- Terminfo: Both
fbterm and fbterm-256color are present via toe -a.
Versions:
(Arch, full update few days ago)
fbterm: 1.7
fcitx5: 5.1.19
Launch Method
- Launch daemon:
fcitx5 -d
- Launch terminal with bridge:
fbterm -i fcitx5-fbterm
Observed Symptoms
- Input Buffer Pollution (Ghost Characters):
When toggling modes via Ctrl+Space (specifically when switching from Hiragana back to Latin/Direct mode), literal control characters are injected into the input buffer.
- In Shell (Bash): Appears as diamond-shaped glyphs.
- In Vim: Appears as
<9d> (Hex 0x9D) and ¹ (Hex 0xB9).
- Persistence: These are physical characters in the
STDIN queue; they can be deleted with Backspace and are saved into files if not removed.
- Terminal Handshake Failure:
Launching vim immediately inserts pp characters into the start of the buffer. This suggests the bridge is failing to handle or transparently pass terminal query/response sequences (e.g., background color or terminal feature queries).
- Incorrect Switching Scope:
Ctrl+Space triggers an internal engine sub-mode toggle (e.g., Mozc's "Hiragana" vs. "Latin") rather than a global Fcitx5 switch between Input Method items. fcitx5-remote confirms the global input method name does not change, even though the character output and the fcitx5 overlay change.
Technical Diagnosis
The bridge fcitx5-fbterm is generating C1 Control Characters (specifically 0x9D) to update or hide its visual status overlay. Because the bridge is failing to properly hook the terminal's IO stream, fbterm is not intercepting these as "UI commands." Instead, they "leak" into the application's standard input. The persistent TERM=linux default (even inside fbterm) suggests the terminal is operating in a limited compatibility mode that cannot process these private escape sequences.
Attempted Troubleshooting (No Change)
- Verified
fcitx5-remote -t renders the overlay correctly (visuals work, but the transition causes the leak).
- Manually set
TERM=fbterm and TERM=fbterm-256color.
- Explicitly defined
TriggerKeys=Control+space in ~/.config/fcitx5/config.
- Confirmed
cap_sys_tty_config is active.
Steps to Reproduce
- Run Arch with no X/Wayland
- Install fbterm, fcitx5 (/-fbterm), mozc (same issue with anthy)
- Press ctrl+space, few times, observe diamonds printed every other time.
Expected Behavior
Switching between Input Methods defined in fctix5 profile:
Profile
[Groups/0]
# Group Name
Name=Default
# Layout
Default Layout=us
# Default Input Method
DefaultIM=
[Groups/0/Items/0]
# Name
Name=keyboard-us
# Layout
Layout=
[Groups/0/Items/1]
# Name
Name=mozc
# Layout
Layout=
[GroupOrder]
0=Default
Output of fcitx5-diagnose command
System Info:
-
uname -a:
Linux arch 6.19.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 19 Mar 2026 16:33:17 +0000 x86_64 GNU/Linux
-
lsb_release:
lsb_release not found.
-
/etc/lsb-release:
/etc/lsb-release not found.
-
/etc/os-release:
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
-
Desktop Environment:
Cannot determine desktop environment.
-
XDG SESSION TYPE:
-
Bash Version:
BASH_VERSION='5.3.9(1)-release'
Environment:
-
DISPLAY:
DISPLAY=''
WAYLAND_DISPLAY=''
-
Keyboard Layout:
-
setxkbmap:
setxkbmap not found.
-
xprop:
xprop not found.
-
Locale:
-
All locales:
C
C.utf8
en_US.utf8
ja_JP.utf8
POSIX
-
Current locale:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
-
Directories:
-
Home:
-
${XDG_CONFIG_HOME}:
Environment variable XDG_CONFIG_HOME is not set.
Current value of XDG_CONFIG_HOME is ~/.config (/home/user/.config).
-
Fcitx5 Settings Directory:
Current fcitx5 settings directory is ~/.config/fcitx5 (/home/user/.config/fcitx5).
-
Current user:
The script is run as user (1000).
Fcitx State:
-
executable:
Found fcitx5 at /usr/bin/fcitx5.
-
version:
Fcitx version: 5.1.19
-
process:
Found 1 fcitx5 process:
-
fcitx5-remote:
fcitx5-remote works properly.
-
DBus interface:
Using dbus-send to check dbus.
Owner of DBus name org.fcitx.Fcitx5 is :1.291.
PID of DBus name org.fcitx.Fcitx5 owner is 13294.
Debug information from dbus:
Input Context without group
Frontends setup:
The environment variable checked by this script only shows the environment under current shell. It is still possible that you did not set the environment to the whole graphic desktop session. You may inspect the actual environment variable of a certain process by using xargs -0 -L1 /proc/$PID/environ for a certain process that you find not working.
Xim:
-
${XMODIFIERS}:
XMODIFIERS is not set
Please set environment variable XMODIFIERS to "@im=fcitx" using the tool your distribution provides or add export XMODIFIERS=@im=fcitx to your ~/.xprofile. See [Input Method Related Environment Variables: XMODIFIERS](http://fcitx-im.org/wiki/Input_method_related_environment_variables#XMODIFIERS).
Xim Server Name from Environment variable is fcitx.
-
XIM_SERVERS on root window:
xprop not found.
Qt:
-
qt4 - ${QT4_IM_MODULE}:
Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add export QT_IM_MODULE=fcitx to your ~/.xprofile. See [Input Method Related Environment Variables: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#QT_IM_MODULE).
fcitx5-qt4-immodule-probing not found.
-
qt5 - ${QT_IM_MODULE}:
Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add export QT_IM_MODULE=fcitx to your ~/.xprofile. See [Input Method Related Environment Variables: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#QT_IM_MODULE).
It is OK to use qt5 built-in Wayland im module if your compositor fully supports text-input protocol used by qt5.
fcitx5-qt5-immodule-probing not found.
-
qt6 - ${QT_IM_MODULE}:
Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add export QT_IM_MODULE=fcitx to your ~/.xprofile. See [Input Method Related Environment Variables: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#QT_IM_MODULE).
It is OK to use qt6 built-in Wayland im module if your compositor fully supports text-input protocol used by qt6.
fcitx5-qt6-immodule-probing not found.
-
Qt IM module files:
Following error may not be accurate because guessing Qt version from path depends on how your distribution packages Qt. It is not a critical error if you do not use any Qt application with certain version of Qt or you are using text-input support by Qt under Wayland.
Cannot find fcitx5 input method module for Qt4.
Cannot find fcitx5 input method module for Qt5.
Cannot find fcitx5 input method module for Qt6.
Gtk:
-
gtk - ${GTK_IM_MODULE}:
Please set environment variable GTK_IM_MODULE to "fcitx" using the tool your distribution provides or add export GTK_IM_MODULE=fcitx to your ~/.xprofile. See [Input Method Related Environment Variables: GTK_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#GTK_IM_MODULE).
It is OK to use gtk built-in Wayland im module if your compositor fully supports text-input protocol used by gtk.
fcitx5-gtk2-immodule-probing not found.
Using fcitx5-gtk3-immodule-probing to check the actual im module to be used under current environment:
Using fcitx5-gtk4-immodule-probing to check the actual im module to be used under current environment:
-
gtk-query-immodules:
-
gtk 2:
Cannot find gtk-query-immodules for gtk 2
Cannot find fcitx5 im module for gtk 2.
-
gtk 3:
Cannot find gtk-query-immodules for gtk 3
Cannot find fcitx5 im module for gtk 3.
-
Gtk IM module cache:
-
gtk 2:
Cannot find immodules cache for gtk 2
Cannot find fcitx5 im module for gtk 2 in cache.
-
gtk 3:
Cannot find immodules cache for gtk 3
Cannot find fcitx5 im module for gtk 3 in cache.
-
Gtk IM module files:
-
gtk 2:
All found Gtk 2 immodule files exist.
-
gtk 3:
All found Gtk 3 immodule files exist.
-
gtk 4:
All found Gtk 4 immodule files exist.
Configuration:
Fcitx Addons:
-
Addon Config Dir:
Found fcitx5 addon config directory: /usr/share/fcitx5/addon.
-
Addon List:
-
Found 21 enabled addons:
Classic User Interface 5.1.19
Clipboard 5.1.19
DBus 5.1.19
DBus Frontend 5.1.19
Emoji 5.1.19
Fcitx4 Frontend 5.1.19
IBus Frontend 5.1.19
Input method selector 5.1.19
Keyboard 5.1.19
KDE Input Method Panel 5.1.19
Mozc
Status Notifier 5.1.19
Notification 5.1.19
Quick Phrase 5.1.19
Spell 5.1.19
Unicode 5.1.19
DBus Virtual Keyboard 5.1.19
Wayland 5.1.19
Wayland Input method frontend 5.1.19
XCB 5.1.19
X Input Method Frontend 5.1.19
-
Found 0 disabled addons:
-
Addon Libraries:
All libraries for all addons are found.
-
User Interface:
Found 3 enabled user interface addons:
Classic User Interface
KDE Input Method Panel
DBus Virtual Keyboard
Input Methods:
-
/home/user/.config/fcitx5/profile:
[Groups/0]
# Group Name
Name=Default
# Layout
Default Layout=us
# Default Input Method
DefaultIM=mozc
[Groups/0/Items/0]
# Name
Name=keyboard-us
# Layout
Layout=
[Groups/0/Items/1]
# Name
Name=mozc
# Layout
Layout=
[GroupOrder]
0=Default
Log:
-
date:
-
/home/user/.config/fcitx5/crash.log:
/home/user/.config/fcitx5/crash.log not found.
Warning: the output of fcitx5-diagnose contains sensitive information, including the distribution name, kernel version, name of currently running programs, etc.
Though such information can be helpful to developers for diagnostic purpose, please double check and remove as necessary before posting it online publicly.
Summary
There is no issues tab for fcitx5-fbterm, so filing it here:
Issue: Control Sequence Leakage (C1 Injection) in Fcitx5-FbTerm
TL;DR
I'm seeing two "diamond characters" when pressing "ctrl+space", and it's not "bad fonts".
Environment
fbterm(Version: Latest from repos).fcitx5(daemon),fcitx5-fbterm(bridge),fcitx5-mozc(engine).en_US.UTF-8).setcap 'cap_sys_tty_config+ep' /usr/bin/fbtermis verified.fbtermandfbterm-256colorare present viatoe -a.Versions:
(Arch, full update few days ago)
fbterm: 1.7
fcitx5: 5.1.19
Launch Method
fcitx5 -dfbterm -i fcitx5-fbtermObserved Symptoms
When toggling modes via
Ctrl+Space(specifically when switching from Hiragana back to Latin/Direct mode), literal control characters are injected into the input buffer.<9d>(Hex0x9D) and¹(Hex0xB9).STDINqueue; they can be deleted with Backspace and are saved into files if not removed.Launching
vimimmediately insertsppcharacters into the start of the buffer. This suggests the bridge is failing to handle or transparently pass terminal query/response sequences (e.g., background color or terminal feature queries).Ctrl+Spacetriggers an internal engine sub-mode toggle (e.g., Mozc's "Hiragana" vs. "Latin") rather than a global Fcitx5 switch between Input Method items.fcitx5-remoteconfirms the global input method name does not change, even though the character output and the fcitx5 overlay change.Technical Diagnosis
The bridge
fcitx5-fbtermis generating C1 Control Characters (specifically0x9D) to update or hide its visual status overlay. Because the bridge is failing to properly hook the terminal's IO stream,fbtermis not intercepting these as "UI commands." Instead, they "leak" into the application's standard input. The persistentTERM=linuxdefault (even insidefbterm) suggests the terminal is operating in a limited compatibility mode that cannot process these private escape sequences.Attempted Troubleshooting (No Change)
fcitx5-remote -trenders the overlay correctly (visuals work, but the transition causes the leak).TERM=fbtermandTERM=fbterm-256color.TriggerKeys=Control+spacein~/.config/fcitx5/config.cap_sys_tty_configis active.Steps to Reproduce
Expected Behavior
Switching between Input Methods defined in fctix5 profile:
Profile
Output of fcitx5-diagnose command
System Info:
uname -a:lsb_release:lsb_releasenot found./etc/lsb-release:/etc/lsb-releasenot found./etc/os-release:Desktop Environment:
Cannot determine desktop environment.
XDG SESSION TYPE:
Bash Version:
Environment:
DISPLAY:
Keyboard Layout:
setxkbmap:setxkbmapnot found.xprop:xpropnot found.Locale:
All locales:
Current locale:
Directories:
Home:
${XDG_CONFIG_HOME}:Environment variable
XDG_CONFIG_HOMEis not set.Current value of
XDG_CONFIG_HOMEis~/.config(/home/user/.config).Fcitx5 Settings Directory:
Current fcitx5 settings directory is
~/.config/fcitx5(/home/user/.config/fcitx5).Current user:
The script is run as user (1000).
Fcitx State:
executable:
Found fcitx5 at
/usr/bin/fcitx5.version:
Fcitx version:
5.1.19process:
Found 1 fcitx5 process:
fcitx5-remote:fcitx5-remoteworks properly.DBus interface:
Using
dbus-sendto check dbus.Owner of DBus name
org.fcitx.Fcitx5is:1.291.PID of DBus name
org.fcitx.Fcitx5owner is13294.Debug information from dbus:
Frontends setup:
The environment variable checked by this script only shows the environment under current shell. It is still possible that you did not set the environment to the whole graphic desktop session. You may inspect the actual environment variable of a certain process by using
xargs -0 -L1 /proc/$PID/environfor a certain process that you find not working.Xim:
${XMODIFIERS}:XMODIFIERS is not set
Please set environment variable XMODIFIERS to "@im=fcitx" using the tool your distribution provides or add
export XMODIFIERS=@im=fcitxto your~/.xprofile. See [Input Method Related Environment Variables: XMODIFIERS](http://fcitx-im.org/wiki/Input_method_related_environment_variables#XMODIFIERS).Xim Server Name from Environment variable is fcitx.
XIM_SERVERS on root window:
xpropnot found.Qt:
qt4 -
${QT4_IM_MODULE}:Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add
export QT_IM_MODULE=fcitxto your~/.xprofile. See [Input Method Related Environment Variables: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#QT_IM_MODULE).fcitx5-qt4-immodule-probingnot found.qt5 -
${QT_IM_MODULE}:Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add
export QT_IM_MODULE=fcitxto your~/.xprofile. See [Input Method Related Environment Variables: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#QT_IM_MODULE).It is OK to use qt5 built-in Wayland im module if your compositor fully supports text-input protocol used by qt5.
fcitx5-qt5-immodule-probingnot found.qt6 -
${QT_IM_MODULE}:Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add
export QT_IM_MODULE=fcitxto your~/.xprofile. See [Input Method Related Environment Variables: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#QT_IM_MODULE).It is OK to use qt6 built-in Wayland im module if your compositor fully supports text-input protocol used by qt6.
fcitx5-qt6-immodule-probingnot found.Qt IM module files:
Following error may not be accurate because guessing Qt version from path depends on how your distribution packages Qt. It is not a critical error if you do not use any Qt application with certain version of Qt or you are using text-input support by Qt under Wayland.
Cannot find fcitx5 input method module for Qt4.
Cannot find fcitx5 input method module for Qt5.
Cannot find fcitx5 input method module for Qt6.
Gtk:
gtk -
${GTK_IM_MODULE}:Please set environment variable GTK_IM_MODULE to "fcitx" using the tool your distribution provides or add
export GTK_IM_MODULE=fcitxto your~/.xprofile. See [Input Method Related Environment Variables: GTK_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables#GTK_IM_MODULE).It is OK to use gtk built-in Wayland im module if your compositor fully supports text-input protocol used by gtk.
fcitx5-gtk2-immodule-probingnot found.Using fcitx5-gtk3-immodule-probing to check the actual im module to be used under current environment:
Using fcitx5-gtk4-immodule-probing to check the actual im module to be used under current environment:
gtk-query-immodules:gtk 2:
Cannot find
gtk-query-immodulesfor gtk 2Cannot find fcitx5 im module for gtk 2.
gtk 3:
Cannot find
gtk-query-immodulesfor gtk 3Cannot find fcitx5 im module for gtk 3.
Gtk IM module cache:
gtk 2:
Cannot find immodules cache for gtk 2
Cannot find fcitx5 im module for gtk 2 in cache.
gtk 3:
Cannot find immodules cache for gtk 3
Cannot find fcitx5 im module for gtk 3 in cache.
Gtk IM module files:
gtk 2:
All found Gtk 2 immodule files exist.
gtk 3:
All found Gtk 3 immodule files exist.
gtk 4:
All found Gtk 4 immodule files exist.
Configuration:
Fcitx Addons:
Addon Config Dir:
Found fcitx5 addon config directory:
/usr/share/fcitx5/addon.Addon List:
Found 21 enabled addons:
Found 0 disabled addons:
Addon Libraries:
All libraries for all addons are found.
User Interface:
Found 3 enabled user interface addons:
Input Methods:
/home/user/.config/fcitx5/profile:Log:
date:/home/user/.config/fcitx5/crash.log:/home/user/.config/fcitx5/crash.lognot found.Warning: the output of fcitx5-diagnose contains sensitive information, including the distribution name, kernel version, name of currently running programs, etc.
Though such information can be helpful to developers for diagnostic purpose, please double check and remove as necessary before posting it online publicly.