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

bug(linux): v15.0.269 with Vietnamese keyboards not working with LibreOffice, Konsole, Firefox #7769

Closed
1 of 8 tasks
zenfas opened this issue Nov 18, 2022 · 9 comments
Closed
1 of 8 tasks
Assignees
Labels
bug compatibility Issues in interactions between Keyman and a specific app or group of apps, e.g. incorrect output linux/engine/ linux/
Milestone

Comments

@zenfas
Copy link

zenfas commented Nov 18, 2022

Describe the bug

I try Keyman on ibus-keyman and fcitx5-keyman with keyboard Vietnamese_telex or Vietnamese_vni and not work normally. (those keyboard work normal on Windows and Android). Other IM of ibus or fcitx5 work normally on my PC.
My OS: Kubuntu 22.10, install all relate keyman from official repo

On Libreoffice, Konsole, Firefox not work normally. Example:
Typed: gox tieesng Vieejt
Expect: gõ tiếng Việt
Result: goõ tieêiếng Vieêiệt

On Kate app, it works normal

Reproduce the bug

Change to keyman keyboard on ibus or fcitx5 and type

Expected behavior

Work normally like keyman on Windows or Android

Related issues

No response

Keyman apps

  • Keyman for Android
  • Keyman for iPhone and iPad
  • Keyman for Linux
  • Keyman for macOS
  • Keyman for Windows
  • Keyman Developer
  • KeymanWeb
  • Other - give details at bottom of form

Keyman version

15.0.269-1

Operating system

Kubuntu 22.10

Device

Laptop

Target application

LibreOffice, Konsole, Firefox...

Browser

Firefox 106

Keyboard name

vietnamese_telex, vietnamese_vni

Keyboard version

1.05

Language name

Vietnamese

Additional context

No response

@zenfas zenfas added the bug label Nov 18, 2022
@mcdurdin mcdurdin changed the title bug: Linux - not work normal on some applications bug(linux): v15.0.269 with Vietnamese keyboards not working with LibreOffice, Konsole, Firefox Nov 18, 2022
@ermshiperete
Copy link
Contributor

@zenfas Can you please try with ibus and the Keyman 16.0 beta version? Note that you'll also have to install the updated ibus version. You can find the beta version at the beta ppa.

@zenfas
Copy link
Author

zenfas commented Nov 21, 2022

Newest beta I just downloaded, better on Libreoffice (still error if I press backspace to delete some character), still error on Firefox, Konsole
Is keyman using surrouding technic? I see this github.com/fcitx/fcitx5-unikey#13. Someone need update on upstream GTK, QT for better support in linux

@ermshiperete
Copy link
Contributor

Yes, Keyman uses surrounding text if the application supports it.

@mcdurdin mcdurdin added this to the 17.0 milestone Nov 21, 2022
@ermshiperete
Copy link
Contributor

ermshiperete commented Nov 22, 2022

Hmm, it works for me in LO and Firefox with ibus 15.0.269. Make sure that you reboot after installing a new version of ibus, otherwise the windowing system won't use the new binaries.

Here's what I did:

  • installed Kubuntu 22.10
  • installed Keyman: sudo apt install keyman
  • reboot
  • started ibus-setup to see what keyboards are already installed. This started the ibus daemon.
  • started km-config and installed Vietnamese_telex keyboard
  • made sure that I had both English and Vietnamese keyboards available.
  • opened LO writer, switched to Vietnamese keyboard and started typing. Things work as expected. Same for Firefox and Kate.

Screenshot from 2022-11-22 19-27-25

15.0.269 doesn't work in Konsole which I wouldn't expect because I assume it doesn't support surrounding text. However, it also doesn't work in 16.0.108 where I'd expect it to work.

16.0.108 works correctly for me in LO Writer. @zenfas You mention problems with backspace - what problems are you getting exactly?

With 16.0.108 in Firefox, things work in the address bar, but not in a text field on a page. Definitely something to look into.
(With 15.0.269 I only tried in the address bar).

Thanks for reporting the problems, @zenfas.

Can you please run dpkg -l | grep ibus in a terminal window and paste the output here?

@zenfas
Copy link
Author

zenfas commented Nov 23, 2022

I see a lot of applications in linux not support surrounding text good. According to @wengxt, we have some bugs in upstream QT, GTK or compositor about surrounding text and input method support. I really like to use surrounding text in Linux to come back and can edit text that already committed like on Windows, but surrounding text is not good enough and can't daily usage at the moment.

In LO Writer, I test again, it's ok.

> ii  gir1.2-ibus-1.0:amd64                         1.5.27-2sil.2.1~kinetic                     amd64        Intelligent Input Bus - introspection data
> ii  ibus                                          1.5.27-2sil.2.1~kinetic                     amd64        Intelligent Input Bus - core
> ii  ibus-bamboo                                   0.8.2-0~202210310358~ubuntu22.10.1          amd64        A Vietnamese IME for IBus using Bamboo Engine.
> ii  ibus-clutter:amd64                            0.0+git20090728.a936bacf-7                  amd64        ibus input method framework for clutter
> ii  ibus-data                                     1.5.27-2sil.2.1~kinetic                     all          Intelligent Input Bus - data files
> ii  ibus-gtk:amd64                                1.5.27-2sil.2.1~kinetic                     amd64        Intelligent Input Bus - GTK2 support
> ii  ibus-gtk3:amd64                               1.5.27-2sil.2.1~kinetic                     amd64        Intelligent Input Bus - GTK3 support
> ii  ibus-gtk4:amd64                               1.5.27-2sil.2.1~kinetic                     amd64        Intelligent Input Bus - GTK4 support
> ii  ibus-keyman                                   16.0.107-1~sil1~kinetic                     amd64        Keyman engine for IBus
> ii  ibus-m17n                                     1.4.10-1                                    amd64        m17n engine for IBus
> ii  ibus-table                                    1.16.12-1                                   all          table engine for IBus
> ii  ibus-typing-booster                           2.18.9-1                                    all          Completion input method to speedup typing
> ii  ibus-unikey                                   0.7.0~beta1-1build2                         amd64        Vietnamese Input Method Engine for IBus using Unikey Engine
> ii  ibus-wayland                                  1.5.27-2sil.2.1~kinetic                     amd64        Intelligent Input Bus - Wayland support
> ii  libgusb2:amd64                                0.3.10-1                                    amd64        GLib wrapper around libusb1
> ii  libibus-1.0-5:amd64                           1.5.27-2sil.2.1~kinetic                     amd64        Intelligent Input Bus - shared library
> ii  libusb-1.0-0:amd64                            2:1.0.26-1                                  amd64        userspace USB programming library
> ii  libusbmuxd6:amd64                             2.0.2-3build2                               amd64        USB multiplexor daemon for iPhone and iPod Touch devices - library
> ii  python3-ibus-1.0                              1.5.27-2sil.2.1~kinetic                     all          Intelligent Input Bus - introspection overrides for Python (Python 3)

@mcdurdin
Copy link
Member

I see a lot of applications in linux not support surrounding text good. According to @wengxt, we have some bugs in upstream QT, GTK or compositor about surrounding text and input method support. I really like to use surrounding text in Linux to come back and can edit text that already committed like on Windows, but surrounding text is not good enough and can't daily usage at the moment.

Indeed, surrounding text support is mixed on all of the major desktop platforms -- Windows, macOS, and Linux. Keyman on all three of these platforms works hard to fall back to injecting backspaces to emulate editing surrounding text but it can never be quite as reliable:

  • Apps may do 'funny things' with backspace, such as deleting clusters, and we just can't detect that
  • The underlying text may have changed, e.g. autocorrect-style converting 1/3 -> ⅓.
  • It is hard to manage race conditions around backspace, user input, and text insertion. A lot of the more complicated Keyman Engine integration code deals with edge cases here. The ibus prefilter mask patch is the robust solution we've built for ibus (it isn't needed for apps that support surrounding text).
  • Interactions with modifier keys are also tricky -- we need to emit backspaces when the user has held down the Alt key, for example, without messing up!

Surrounding text support can also be somewhat tricky for apps to get right. For example, Chrome on Android for some time deleted entire clusters instead of single codepoints when replacing content.

We'll keep persevering and submitting patches to apps to support surrounding-text as best as we can.

@darcywong00 darcywong00 added the compatibility Issues in interactions between Keyman and a specific app or group of apps, e.g. incorrect output label Nov 24, 2022
@ermshiperete ermshiperete modified the milestones: 17.0, A17S2 Dec 13, 2022
@zenfas
Copy link
Author

zenfas commented Dec 29, 2022

@ermshiperete : I tested with newest beta on PPA (ibus-keyman_16.0.128-1~sil1~kinetic_arm64)

  1. If I don't install keyman package, I can't switch to keyman keyboard , keyman package is not dependent of ibus-keyman. On version 15, don't need this package still work (need ibus-keyman and libkmnkbp)
  2. On Firefox, in text field (not address line) still error, not work. This one should be fix before version 16 go to stable, I think it's critical due to Firefox is default for most of Linux distro.
  3. How about case if ibus upstream don't access your PR about "Add prefilter flag", any backup solution?

@mcdurdin mcdurdin modified the milestones: A17S2, A17S3 Jan 1, 2023
@ermshiperete
Copy link
Contributor

ermshiperete commented Jan 2, 2023

  1. If I don't install keyman package, I can't switch to keyman keyboard , keyman package is not dependent of ibus-keyman.
    On version 15, don't need this package still work (need ibus-keyman and libkmnkbp)

You should install the keyman package which depends on all the other necessary packages, among them ibus-keyman and python3-keyman-config. The latter is required to install Keyman keyboards. If you have ibus-keyman and libkmnkbp0-0 as well as a Keyman keyboard installed, you should be able to switch keyboards, if you use GTK and X11.

  1. On Firefox, in text field (not address line) still error, not work. This one should be fix before version 16 go to stable,
    I think it's critical due to Firefox is default for most of Linux distro.

By default Firefox is installed as a snap package on current Ubuntu versions. This comes with it's own version of the ibus libraries and thus doesn't have the patched ibus version. You'll have to use the non-snap version of Firefox, see e.g. https://askubuntu.com/a/1404401 for instructions.

  1. How about case if ibus upstream don't access your PR about "Add prefilter flag", any backup solution?

We'll deal with that problem in due time. There are various options, but all are not pretty since they'd involve a lot of work.

@ermshiperete
Copy link
Contributor

With 16.0.108 in Firefox, things work in the address bar, but not in a text field on a page. Definitely something to look into.

This is caused by running Firefox as a snap package. Because that brings it's own version of the ibus libraries it's missing the patched ibus version with the serialized output patch. Please remove the Firefox snap package and install the regular .deb package from the Firefox PPA - see https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compatibility Issues in interactions between Keyman and a specific app or group of apps, e.g. incorrect output linux/engine/ linux/
Projects
None yet
Development

No branches or pull requests

4 participants