Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected language switch when typing a specific sequence #1289

Open
Mivik opened this issue Mar 1, 2025 · 0 comments
Open

Unexpected language switch when typing a specific sequence #1289

Mivik opened this issue Mar 1, 2025 · 0 comments

Comments

@Mivik
Copy link

Mivik commented Mar 1, 2025

Summary

In Rust development its common to type xx::Xx, however this occasionally triggers a language switch right before X is inputted (which is normally done by Lshift) and it's annoying.

Steps to Reproduce

After some digging I found this key sequence can reproduce the problem steadily:

# Rshift Colon Colon Lshift Rshift-up R Lshift-up
ydotool key 54:1 39:1 39:0 39:1 39:0 42:1 54:0 19:1 19:0 42:0

Outcome:

Image

Expected Behavior

fcitx5 should not switch language

Output of fcitx5-diagnose command

System Info:

  1. uname -a:

    Linux mivik-arch 6.13.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 22 Feb 2025 00:37:05 +0000 x86_64 GNU/Linux
    
  2. lsb_release -a:

    LSB Version:	n/a
    Distributor ID:	Arch
    Description:	Arch Linux
    Release:	rolling
    Codename:	n/a
    
  3. lsb_release -d:

    Description:	Arch Linux
    
  4. /etc/lsb-release:

    DISTRIB_ID="Arch"
    DISTRIB_RELEASE="rolling"
    DISTRIB_DESCRIPTION="Arch Linux"
    
  5. /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
    
  6. Desktop Environment:

    Desktop environment is kde.

  7. XDG SESSION TYPE:

    XDG_SESSION_TYPE='wayland'
    
  8. Bash Version:

    BASH_VERSION='5.2.37(1)-release'
    

Environment:

  1. DISPLAY:

    DISPLAY=':1'
    
    
    WAYLAND_DISPLAY='wayland-0'
    
  2. Keyboard Layout:

    1. setxkbmap:

      WARNING: Running setxkbmap against an Xwayland server
      xkb_keymap {
      	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
      	xkb_types     { include "complete"	};
      	xkb_compat    { include "complete"	};
      	xkb_symbols   { include "pc+us+inet(evdev)"	};
      	xkb_geometry  { include "pc(pc105)"	};
      };
      
    2. xprop:

      _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", ""
      
  3. Locale:

    1. All locales:

      C
      C.utf8
      en_US.utf8
      POSIX
      zh_CN.utf8
      zh_SG.utf8
      
    2. Current locale:

      LANG=zh_CN.UTF-8
      LC_CTYPE="zh_CN.UTF-8"
      LC_NUMERIC="zh_CN.UTF-8"
      LC_TIME="zh_CN.UTF-8"
      LC_COLLATE="zh_CN.UTF-8"
      LC_MONETARY="zh_CN.UTF-8"
      LC_MESSAGES="zh_CN.UTF-8"
      LC_PAPER="zh_CN.UTF-8"
      LC_NAME="zh_CN.UTF-8"
      LC_ADDRESS="zh_CN.UTF-8"
      LC_TELEPHONE="zh_CN.UTF-8"
      LC_MEASUREMENT="zh_CN.UTF-8"
      LC_IDENTIFICATION="zh_CN.UTF-8"
      LC_ALL=
      
  4. Directories:

    1. Home:

      /home/mivik
      
    2. ${XDG_CONFIG_HOME}:

      Environment variable XDG_CONFIG_HOME is not set.

      Current value of XDG_CONFIG_HOME is ~/.config (/home/mivik/.config).

    3. Fcitx5 Settings Directory:

      Current fcitx5 settings directory is ~/.config/fcitx5 (/home/mivik/.config/fcitx5).

  5. Current user:

    The script is run as mivik (1000).

Fcitx State:

  1. executable:

    Found fcitx5 at /usr/bin/fcitx5.

  2. version:

    Fcitx version: 5.1.12

  3. process:

    Found 1 fcitx5 process:

     126894 fcitx5
    
  4. fcitx5-remote:

    fcitx5-remote works properly.

  5. DBus interface:

    Using dbus-send to check dbus.

    Owner of DBus name org.fcitx.Fcitx5 is :1.290.

    PID of DBus name org.fcitx.Fcitx5 owner is 126894.

    Debug information from dbus:

       Group [wayland:] has 7 InputContext(s)
      IC [ea2b31024b0f46088c482fe052a3a0fa] program:org.kde.konsole frontend:wayland cap:60 focus:1
      IC [eff15dd6eb004cd2bdcd02f49aaad8f3] program:com.obsproject.Studio frontend:wayland cap:d0060 focus:0
      IC [7b7af4f275e04298a4fb13cf988f711b] program:com.obsproject.Studio frontend:wayland cap:80060 focus:0
      IC [79f25a464a75485385e201b839fbe44d] program:org.kde.dolphin frontend:wayland cap:80060 focus:0
      IC [9003815681c443c69238b21a500338e0] program:vivaldi-stable frontend:wayland cap:80060 focus:0
      IC [8b02067852f14aec8a62b0f550e448c2] program:org.kde.konsole frontend:wayland cap:60 focus:0
      IC [5aaaf04727b04c6db4b16620fc10169b] program: frontend:wayland cap:60 focus:0
    Group [x11::1] has 0 InputContext(s)
    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:

  1. ${XMODIFIERS}:

    Environment variable XMODIFIERS is set to "@im=fcitx" correctly.
    Xim Server Name from Environment variable is fcitx.

  2. XIM_SERVERS on root window:

    Xim server name is the same with that set in the environment variable.

Qt:

  1. 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.

    fcitx5-qt4-immodule-probing not found.

  2. 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.

    It is OK to use qt5 built-in Wayland im module if your compositor fully supports text-input protocol used by qt5.

    Using fcitx5-qt5-immodule-probing to check the actual im module to be used under current environment:

    QT_QPA_PLATFORM=wayland
    QT_IM_MODULE=
    IM_MODULE_CLASSNAME=QtWaylandClient::QWaylandInputContext
    
  3. 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.

    It is OK to use qt6 built-in Wayland im module if your compositor fully supports text-input protocol used by qt6.

    Using fcitx5-qt6-immodule-probing to check the actual im module to be used under current environment:

    QT_QPA_PLATFORM=wayland
    QT_IM_MODULE=
    IM_MODULE_CLASSNAME=QtWaylandClient::QWaylandInputContext
    
  4. Qt IM module files:

    Found fcitx5 im module for qt6: /usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so.
    Found unknown fcitx qt module: /usr/lib/qt6/plugins/plasma/kcms/systemsettings/kcm_fcitx5.so.
    Found fcitx5 im module for qt: /usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so.
    Found unknown fcitx qt module: /usr/lib/office6/qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so.
    Found fcitx5 qt5 module: /usr/lib/fcitx5/qt5/libfcitx-quickphrase-editor5.so.
    Found fcitx5 qt6 module: /usr/lib/fcitx5/qt6/libfcitx-quickphrase-editor5.so.

    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.

Gtk:

  1. 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.

    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.

    fcitx5-gtk3-immodule-probing not found.

    fcitx5-gtk4-immodule-probing not found.

  2. gtk-query-immodules:

    1. gtk 2:

      Found gtk-query-immodules for gtk 2.24.33 at /usr/bin/gtk-query-immodules-2.0.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33
      

      Failed to find fcitx5 in the output of /usr/bin/gtk-query-immodules-2.0

      Cannot find fcitx5 im module for gtk 2.

    2. gtk 3:

      Found gtk-query-immodules for gtk 3.24.48 at /usr/bin/gtk-query-immodules-3.0.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.48
      

      Failed to find fcitx5 in the output of /usr/bin/gtk-query-immodules-3.0

      Cannot find fcitx5 im module for gtk 3.

  3. Gtk IM module cache:

    1. gtk 2:

      Found immodules cache for gtk 2.24.33 at /usr/lib/gtk-2.0/2.10.0/immodules.cache.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33
      

      Failed to find fcitx5 in immodule cache at /usr/lib/gtk-2.0/2.10.0/immodules.cache

      Cannot find fcitx5 im module for gtk 2 in cache.

    2. gtk 3:

      Found immodules cache for gtk 3.24.48 at /usr/lib/gtk-3.0/3.0.0/immodules.cache.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.48
      

      Failed to find fcitx5 in immodule cache at /usr/lib/gtk-3.0/3.0.0/immodules.cache

      Cannot find fcitx5 im module for gtk 3 in cache.

  4. Gtk IM module files:

    1. gtk 2:

      All found Gtk 2 immodule files exist.

    2. gtk 3:

      All found Gtk 3 immodule files exist.

    3. gtk 4:

      All found Gtk 4 immodule files exist.

Configuration:

Fcitx Addons:

  1. Addon Config Dir:

    Found fcitx5 addon config directory: /usr/share/fcitx5/addon.

  2. Addon List:

    1. Found 21 enabled addons:

      Classic User Interface 5.1.12
      Clipboard 5.1.12
      DBus 5.1.12
      DBus Frontend 5.1.12
      Emoji 5.1.12
      Fcitx4 Frontend 5.1.12
      IBus Frontend 5.1.12
      Input method selector 5.1.12
      Keyboard 5.1.12
      KDE Input Method Panel 5.1.12
      Status Notifier 5.1.12
      Notification 5.1.12
      Quick Phrase 5.1.12
      Rime 5.1.10
      Spell 5.1.12
      Unicode 5.1.12
      DBus Virtual Keyboard 5.1.12
      Wayland 5.1.12
      Wayland Input method frontend 5.1.12
      XCB 5.1.12
      X Input Method Frontend 5.1.12
      
    2. Found 0 disabled addons:

  3. Addon Libraries:

    All libraries for all addons are found.

  4. User Interface:

    Found 3 enabled user interface addons:

    Classic User Interface
    KDE Input Method Panel
    DBus Virtual Keyboard
    

Input Methods:

  1. /home/mivik/.config/fcitx5/profile:

    [Groups/0]
    # Group Name
    Name=Default
    # Layout
    Default Layout=us
    # Default Input Method
    DefaultIM=rime
    
    [Groups/0/Items/0]
    # Name
    Name=keyboard-us
    # Layout
    Layout=
    
    [Groups/0/Items/1]
    # Name
    Name=rime
    # Layout
    Layout=
    
    [GroupOrder]
    0=Default
    

Log:

  1. date:

    2025年 03月 01日 星期六 14:35:24 CST
    
  2. /home/mivik/.config/fcitx5/crash.log:

    =========================
    Fcitx 5.1.8 -- Get Signal No.: 11
    Date: try "date -d @1713794121" if you are using GNU date ***
    ProcessID: 20978
    fcitx5(+0xe26c)[0x61e5a2b8226c]
    /usr/lib/libc.so.6(+0x3c770)[0x733d9ba5a770]
    /usr/lib/fcitx5/libcpis-module-im-sogou-ime-ng-fcitx5-kylin-desktop.so(_ZNKSt14default_deleteIN6apache6thrift11concurrency5MutexEEclEPS3_+0x22)[0x733d6ba6db46]
    /usr/lib/fcitx5/libcpis-module-im-sogou-ime-ng-fcitx5-kylin-desktop.so(_ZNSt10unique_ptrIN6apache6thrift11concurrency5MutexESt14default_deleteIS3_EED1Ev+0x47)[0x733d6ba6d4f5]
    /usr/lib/fcitx5/libcpis-module-im-sogou-ime-ng-fcitx5-kylin-desktop.so(_ZN6apache6thrift11concurrency7Monitor4ImplD1Ev+0x28)[0x733d6ba6d232]
    /usr/lib/fcitx5/libcpis-module-im-sogou-ime-ng-fcitx5-kylin-desktop.so(_ZN6apache6thrift11concurrency7MonitorD1Ev+0x34)[0x733d6ba6c6c4]
    /usr/lib/libc.so.6(+0x3eb36)[0x733d9ba5cb36]
    /usr/lib/libc.so.6(+0x3ec80)[0x733d9ba5cc80]
    /usr/lib/libc.so.6(+0x25cd7)[0x733d9ba43cd7]
    /usr/lib/libc.so.6(__libc_start_main+0x8a)[0x733d9ba43d8a]
    fcitx5(+0xdaf5)[0x61e5a2b81af5]
    

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant