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

Not work normal on some applications #1

Open
zenfas opened this issue Nov 18, 2022 · 3 comments
Open

Not work normal on some applications #1

zenfas opened this issue Nov 18, 2022 · 3 comments

Comments

@zenfas
Copy link

zenfas commented Nov 18, 2022

I try keyman with keyboard Vietnamese_telex or Vietnamese_vni and see some points. I don't know error belong to fcitx or keyman

  1. On Libreoffice, Konsole, Firefox not work normally. Example:
    Type: gox tieesng Vieejt
    Expect: gõ tiếng Việt
    Result: goõ tieêiếng Vieêiệt
  2. Sometime fcitx auto switch to another keyboard
  3. Icon for each Keyman IMs are the same

Good point: with Kate app, work normally. Specially, I can comeback to edit word after press spacebar (I don't know why keyman can do this)

System Info:

  1. uname -a:

    Linux vKubuntu 5.19.0-23-generic #24-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 14 15:39:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
    
  2. lsb_release -a:

    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 22.10
    Release:        22.10
    Codename:       kinetic
    
  3. lsb_release -d:

    Description:    Ubuntu 22.10
    
  4. /etc/lsb-release:

    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=22.10
    DISTRIB_CODENAME=kinetic
    DISTRIB_DESCRIPTION="Ubuntu 22.10"
    
  5. /etc/os-release:

    PRETTY_NAME="Ubuntu 22.10"
    NAME="Ubuntu"
    VERSION_ID="22.10"
    VERSION="22.10 (Kinetic Kudu)"
    VERSION_CODENAME=kinetic
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=kinetic
    LOGO=ubuntu-logo
    
  6. Desktop Environment:

    Desktop environment is kde.

  7. XDG SESSION TYPE:

    XDG_SESSION_TYPE='x11'
    
  8. Bash Version:

    BASH_VERSION='5.2.2(1)-release'
    

Environment:

  1. DISPLAY:

    DISPLAY=':0'
    
    
    WAYLAND_DISPLAY=''
    
  2. Keyboard Layout:

    1. setxkbmap:

      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(pc104)"     };
      };
      
    2. xprop:

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

    1. All locales:

      C
      C.utf8
      en_AG
      en_AG.utf8
      en_AU.utf8
      en_BW.utf8
      en_CA.utf8
      en_DK.utf8
      en_GB.utf8
      en_HK.utf8
      en_IE.utf8
      en_IL
      en_IL.utf8
      en_IN
      en_IN.utf8
      en_NG
      en_NG.utf8
      en_NZ.utf8
      en_PH.utf8
      en_SG.utf8
      en_US.utf8
      en_ZA.utf8
      en_ZM
      en_ZM.utf8
      en_ZW.utf8
      POSIX
      vi_VN
      vi_VN.utf8
      
    2. Current locale:

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

    1. Home:

      /home/kubuntu
      
    2. ${XDG_CONFIG_HOME}:

      Environment variable XDG_CONFIG_HOME is not set.

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

    3. Fcitx5 Settings Directory:

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

  5. Current user:

    The script is run as kubuntu (1000).

Fcitx State:

  1. executable:

    Found fcitx5 at /usr/bin/fcitx5.

  2. version:

    Fcitx version: 5.0.18

  3. process:

    Found 1 fcitx5 process:

       4716 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.10.

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

    Debug information from dbus:

       Group [x11::0] has 10 InputContext(s)
      IC [022d9ec86cf54cb88204cb2e977c375f] program:firefox frontend:fcitx4 cap:12 focus:0
      IC [9741427ac596466a8fe1923d29a1e2a0] program:firefox frontend:fcitx4 cap:52 focus:0
      IC [5da1fe4a98ad4b0f8a8ec81173952bc2] program:kate frontend:dbus cap:6000800072 focus:0
      IC [3ce41efa9297489fa8801cc7d0277e00] program:soffice.bin frontend:dbus cap:6000800072 focus:0
      IC [52e9e5bce2e5414aa53265c14ea5ca91] program:konsole frontend:dbus cap:6000800072 focus:1
      IC [397b0c7c31444f3781aa85138ec5b7c4] program:plasmashell frontend:dbus cap:6000820072 focus:0
      IC [f96336fbccf7411c8099d759c8338535] program:plasmashell frontend:dbus cap:6000800072 focus:0
      IC [6f7ee9568287460692b11e03fd623918] program:firefox frontend:fcitx4 cap:12 focus:0
      IC [52a6659a2ceb406ca6c25b2939472152] program:firefox frontend:fcitx4 cap:12 focus:0
      IC [c1425a79f5974ddab19e803ed4e2911e] program:plasmashell frontend:dbus cap:6000800072 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:

Frontends setup:

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}:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

  2. qt5 - ${QT_IM_MODULE}:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

  3. Qt IM module files:

    Found fcitx5 qt5 module: /lib/x86_64-linux-gnu/fcitx5/qt5/libfcitx5-unikey-macro-editor.so.
    Found fcitx5 qt5 module: /lib/x86_64-linux-gnu/fcitx5/qt5/libfcitx5-unikey-keymap-editor.so.
    Found fcitx5 qt5 module: /lib/x86_64-linux-gnu/fcitx5/qt5/libfcitx-quickphrase-editor5.so.
    Found fcitx5 im module for qt6: /lib/x86_64-linux-gnu/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so.
    Found fcitx5 im module for qt5: /lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so.
    Cannot find fcitx5 input method module for Qt4.

Gtk:

  1. gtk - ${GTK_IM_MODULE}:

    Environment variable GTK_IM_MODULE is set to "fcitx" correctly.

  2. gtk-query-immodules:

    1. gtk 2:

      Cannot find gtk-query-immodules for gtk 2

      Cannot find fcitx5 im module for gtk 2.

    2. gtk 3:

      Cannot find gtk-query-immodules for gtk 3

      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 /lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache.
      Version Line:

      # Created by /usr/lib/x86_64-linux-gnu/libgtk2.0-0/gtk-query-immodules-2.0 from gtk+-2.24.33
      

      Failed to find fcitx5 in immodule cache at /lib/x86_64-linux-gnu/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.34 at /lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache.
      Version Line:

      # Created by /usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 from gtk+-3.24.34
      

      Found fcitx5 im modules for gtk 3.24.34.

      "/usr/lib/x86_64-linux-gnu/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 4:

      Cannot find immodules cache for gtk 4

      Cannot find fcitx5 im module for gtk 4 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 23 enabled addons:

      Bamboo Wrapper For Fcitx 1.0.0
      Classic User Interface 5.0.18
      Clipboard 5.0.18
      DBus 5.0.18
      DBus Frontend 5.0.18
      Emoji 5.0.18
      Fcitx4 Frontend 5.0.18
      IBus Frontend 5.0.18
      Input method selector 5.0.18
      Keyboard 5.0.18
      Keyman 1.0.5
      KDE Input Method Panel 5.0.18
      M17N 5.0.10
      Status Notifier 5.0.18
      Notification 5.0.18
      Quick Phrase 5.0.18
      Spell 5.0.18
      Unicode 5.0.18
      Unikey Wrapper For Fcitx 5.0.11
      Wayland 5.0.18
      Wayland Input method frontend 5.0.18
      XCB 5.0.18
      X Input Method Frontend 5.0.18
      
    2. Found 0 disabled addons:

  3. Addon Libraries:

    All libraries for all addons are found.

  4. User Interface:

    Found 2 enabled user interface addons:

    Classic User Interface
    KDE Input Method Panel
    

Input Methods:

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

    [Groups/0]
    # Group Name
    Name=Default
    # Layout
    Default Layout=us
    # Default Input Method
    DefaultIM=keyman:vietnamese_telex
    
    [Groups/0/Items/0]
    # Name
    Name=keyboard-us
    # Layout
    Layout=
    
    [Groups/0/Items/1]
    # Name
    Name=unikey
    # Layout
    Layout=
    
    [Groups/0/Items/2]
    # Name
    Name=m17n_vi_telex
    # Layout
    Layout=
    
    [Groups/0/Items/3]
    # Name
    Name=bamboo
    # Layout
    Layout=
    
    [Groups/0/Items/4]
    # Name
    Name=keyman:vietnamese_telex
    # Layout
    Layout=
    
    [Groups/0/Items/5]
    # Name
    Name=keyman:vietnamese_vni
    # Layout
    Layout=
    
    [GroupOrder]
    0=Default
    

Log:

  1. date:

    Thứ sáu, 18 Tháng 11 năm 2022 16:33:34 +07
    
  2. /home/kubuntu/.config/fcitx5/crash.log:

    /home/kubuntu/.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.

@ermshiperete
Copy link
Contributor

See also keymanapp/keyman#7770 and keymanapp/keyman#7769

wengxt added a commit that referenced this issue Nov 19, 2022
@wengxt
Copy link
Member

wengxt commented Nov 19, 2022

I guess the reason is pretty simple, those app doesn't support surrounding properly.

Actually the way that how keyman work would be pretty poor, especially on wayland due to pretty broken surrounding and forwarding key support.

If not using surrounding, on x11 continously do things like continously forward 4 backspace also won't get stable result.

@wengxt
Copy link
Member

wengxt commented Nov 19, 2022

Given the poor state of surrounding text two potential workaround can be done.

Either, 1. Change the implementation entirely to preedit based ones
2. if we still want to simulate forward key backspace (Not even work for all cases, especially Gtk4), add delay between every event sending from input method.

Qt doesn't have ability to declare whether a client can support surrounding (e.g konsole case), only option for selective filter the surrounding support is also impossible without having specific app name (not possible under wayland too).

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

3 participants