您尚未登录。

#1 2024-02-23 03:20:50

HinaQwQ
会员
注册时间: 2024-02-23
帖子: 2

[已解决]JetBrains IDE内无法输入中文

已经尝试过 https://bbs.archlinuxcn.org/viewtopic.php?id=12645 以及主题中提到的其他帖子,都无法解决

目前的情况是在相关的IDE中,可以正常切换输入法。切换为中文输入法后,在光标正确的位置弹出了fcitx5的窗口,但是无法将输入法窗口中的内容输入到IDE中

尝试过了替换IDE的jbr,没有效果

以下是fcitx诊断工具的输出:

# System Info:
1.  `uname -a`:

        Linux EHina 6.7.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 17 Feb 2024 14:02:33 +0000 x86_64 GNU/Linux

2.  `lsb_release -a`:

        LSB Version:    n/a
        Distributor ID: EndeavourOS
        Description:    EndeavourOS Linux
        Release:        rolling
        Codename:       rolling

3.  `lsb_release -d`:

        Description:    EndeavourOS Linux

4.  `/etc/lsb-release`:

        DISTRIB_ID="EndeavourOS"
        DISTRIB_RELEASE="rolling"
        DISTRIB_DESCRIPTION="EndeavourOS Linux"
        DISTRIB_CODENAME="rolling"

5.  `/etc/os-release`:

        NAME="EndeavourOS"
        PRETTY_NAME="EndeavourOS"
        ID="endeavouros"
        ID_LIKE="arch"
        BUILD_ID=rolling
        ANSI_COLOR="38;2;23;147;209"
        HOME_URL="https://endeavouros.com"
        DOCUMENTATION_URL="https://discovery.endeavouros.com"
        SUPPORT_URL="https://forum.endeavouros.com"
        BUG_REPORT_URL="https://forum.endeavouros.com/c/arch-based-related-questions/bug-reports"
        PRIVACY_POLICY_URL="https://endeavouros.com/privacy-policy-2"
        LOGO="endeavouros"

6.  Desktop Environment:

    Desktop environment is `kde`.

7.  XDG SESSION TYPE:

        XDG_SESSION_TYPE='wayland'

8.  Bash Version:

        BASH_VERSION='5.2.26(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
            POSIX
            zh_CN.utf8

    2.  Current locale:

            LANG=zh_CN
            LC_CTYPE="zh_CN"
            LC_NUMERIC=zh_CN.UTF-8
            LC_TIME=zh_CN.UTF-8
            LC_COLLATE="zh_CN"
            LC_MONETARY=zh_CN.UTF-8
            LC_MESSAGES="zh_CN"
            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=

        **Error occurs when running `locale`. Please check your locale settings.**

            locale: Cannot set LC_CTYPE to default locale: No such file or directory
            locale: Cannot set LC_MESSAGES to default locale: No such file or directory
            locale: Cannot set LC_ALL to default locale: No such file or directory

4.  Directories:

    1.  Home:

            /home/hina

    2.  `${XDG_CONFIG_HOME}`:

        Environment variable `XDG_CONFIG_HOME` is not set.

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

    3.  Fcitx5 Settings Directory:

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

5.  Current user:

    The script is run as hina (1000).

# Fcitx State:
1.  executable:

    Found fcitx5 at `/usr/bin/fcitx5`.

2.  version:

    Fcitx version: `5.1.7`

3.  process:

    Found 1 fcitx5 process:

           6124 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.241`.

    PID of DBus name `org.fcitx.Fcitx5` owner is `6124`.

    Debug information from dbus:

           Group [wayland:] has 7 InputContext(s)
          IC [19974f4b3d154291a079367b4c959beb] program:konsole frontend:dbus cap:e001820872 focus:1
          IC [b68b14f2e12c452a97f31ab00210d6e7] program:org.kde.konsole frontend:wayland cap:52 focus:0
          IC [0aa93ede930f470fac0f7350efd8d830] program:jetbrains-toolbox frontend:wayland cap:52 focus:0
          IC [189cc0984c8245988d7993ed81d41627] program:plasmashell frontend:dbus cap:1e001800072 focus:0
          IC [f3e68b3be3594dce9250a73c99ca3f6b] program:org.kde.plasmashell frontend:wayland cap:52 focus:0
          IC [7b8c971e91af4d9184170f0e954fcea6] program:google-chrome frontend:wayland cap:52 focus:0
          IC [24adc63fc57f483eb3df7d8bef97e8a4] program: frontend:wayland cap:52 focus:0
        Group [x11::1] has 2 InputContext(s)
          IC [fe0aa3b896634c73977c580b755aa0ce] program:jetbrains-toolbox frontend:xim cap:4000000000 focus:1
          IC [5dec0c4810934b029c989475e4752950] program:google-chrome frontend:dbus cap:6000000032 focus:0
        Input Context without group

# Fcitx Configure UI:
1.  Config Tool Wrapper:

    Found fcitx5-configtool at `/usr/bin/fcitx5-configtool`.

2.  Config GUI for qt:

    Found `fcitx5-config-qt` at `/usr/bin/fcitx5-config-qt`.

3.  Config GUI for kde:

    Found fcitx5 kcm module.

        kcm_fcitx5                     - 配置输入法

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

3.  XIM encoding:

    **Your LC_CTYPE is set to zh_CN whose encoding is not UTF-8. You may have trouble committing strings using XIM.**

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

    **`fcitx5-qt4-immodule-probing` not found.**

2.  qt5 - `${QT_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

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

        QT_QPA_PLATFORM=wayland
        QT_IM_MODULE=fcitx
        IM_MODULE_CLASSNAME=fcitx::QFcitxPlatformInputContext

3.  qt6 - `${QT_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

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

        QT_QPA_PLATFORM=wayland
        QT_IM_MODULE=fcitx
        IM_MODULE_CLASSNAME=fcitx::QFcitxPlatformInputContext

4.  Qt IM module files:

    Found unknown fcitx qt module: `/usr/lib/qt/plugins/plasma/kcms/systemsettings/kcm_fcitx5.so`.
    Found fcitx5 im module for qt: `/usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`.
    Found fcitx5 im module for qt6: `/usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.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}`:

    Environment variable GTK_IM_MODULE is set to "fcitx" correctly.

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

        GTK_IM_MODULE=fcitx

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

        GTK_IM_MODULE=fcitx

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

        GTK_IM_MODULE=fcitx

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

        Found fcitx5 im modules for gtk `2.24.33`.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

    2.  gtk 3:

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

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

        Found fcitx5 im modules for gtk `3.24.41`.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

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

        Found fcitx5 im modules for gtk `2.24.33`.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        Found immodules cache for gtk `3.24.41` 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.41

        Found fcitx5 im modules for gtk `3.24.41`.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

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 27 enabled addons:

            Simplified and Traditional Chinese Translation 5.1.3
            Classic User Interface 5.1.7
            Clipboard 5.1.7
            Cloud Pinyin 5.1.3
            DBus 5.1.7
            DBus Frontend 5.1.7
            Emoji 5.1.7
            Fcitx4 Frontend 5.1.7
            Full width character 5.1.3
            IBus Frontend 5.1.7
            Input method selector 5.1.7
            Keyboard 5.1.7
            KDE Input Method Panel 5.1.7
            Status Notifier 5.1.7
            Notification 5.1.7
            Pinyin 5.1.3
            Extra Pinyin functionality 5.1.3
            Punctuation 5.1.3
            Quick Phrase 5.1.7
            Spell 5.1.7
            Table 5.1.3
            Unicode 5.1.7
            DBus Virtual Keyboard 5.1.7
            Wayland 5.1.7
            Wayland Input method frontend 5.1.7
            XCB 5.1.7
            X Input Method Frontend 5.1.7

    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/hina/.config/fcitx5/profile`:

        [Groups/0]
        # Group Name
        Name=Default
        # Layout
        Default Layout=us
        # Default Input Method
        DefaultIM=pinyin

        [Groups/0/Items/0]
        # Name
        Name=keyboard-us
        # Layout
        Layout=

        [Groups/0/Items/1]
        # Name
        Name=pinyin
        # Layout
        Layout=

        [GroupOrder]
        0=Default

# Log:
1.  `date`:

        Fri Feb 23 03:14:51 CST 2024

2.  `/home/hina/.config/fcitx5/crash.log`:

    `/home/hina/.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.**

在搜索引擎上查了好几个小时也没有收获,还望各位大佬指点qwq

最近编辑记录 HinaQwQ (2024-02-23 13:52:34)

离线

#2 2024-02-23 11:39:33

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,470
个人网站

Re: [已解决]JetBrains IDE内无法输入中文

LANG 环境变量的值不对,缺了 '.UTF-8'。检查 ~/.config/plasma-localerc 里是不是缺的?

在线

#3 2024-02-23 13:52:07

HinaQwQ
会员
注册时间: 2024-02-23
帖子: 2

Re: [已解决]JetBrains IDE内无法输入中文

依云 说:

LANG 环境变量的值不对,缺了 '.UTF-8'。检查 ~/.config/plasma-localerc 里是不是缺的?


感谢大佬,刚刚检查了一下,确实是这个问题,KDE给设置的是 zh_CN,没有UTF-8

离线

页脚