keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
372 stars 102 forks source link

bug(linux): extra consonant inserted when concatenate consonant with vowel with Vedic Sanskrit Devanagari Phonetic(ITRANS) keymap #6803

Closed mkm65535 closed 1 year ago

mkm65535 commented 1 year ago

Describe the bug Vedic Sanskrit Devanagari Phonetic(ITRANS) keymap on linux ibus extra consonant inserted when concatenate consonant with vowel

To Reproduce activate keyman Sanskrit engine with ibus [Super + Space] type "ka(क)" > ‌ "kka(क्क)" is produced type "kta(क्त) > "ktta(क्त्त)" is produced type "tra(त्र) > "trra(त्र्र)" is produced and so on. I tried Hindi Devanagari Phonetic (ITRANS) too. and encountered same problem.

Expected behavior explained above.

Screenshots

Keyman for Windows/macOS/Linux:

Keyboard

ermshiperete commented 1 year ago

Hi @mkm65535, in what application do you try to type?

And I don't quite understand: what keys do you press? 'k' followed by 'a' in your first example?

And what's the result you get? Maybe you can attach a screenshot.

Also, what's the output you get if you run the following command in a terminal: echo $XDG_SESSION_TYPE?

Thanks!

mkm65535 commented 1 year ago

hi ermshiperete. thanks for your reply. I'm sorry I'm not so good at explaining, so please be patient.

what keys do you press? 'k' followed by 'a' in your first example? type 'k' followed by 'a' and expected to get "ka"(क) but result in "kka"(क्क) type 'k' followed by 't' then 'a' and expected "kta"(क्त) but result in "ktta"(क्त्त) and so on.

this happens any typing conbination of [consonant + vowel(a, i, u, r, e, ai, o, au)] more examples: ki > kki bo > bbo hu > hhu and so on. this behaivour affect every application which can input letters with ibus engines.

what's the result you get? Maybe you can attach a screenshot. below is an example with libreoffce writer. Screenshot_20220621_201145

what's the output you get if you run the following command in a terminal: echo $XDG_SESSION_TYPE? result of "echo $XDG_SESSION_TYPE" in terminal is "x11"

If this explanation is not enough, please inquire everything what you need. regards.

ermshiperete commented 1 year ago

Thanks, that makes it clearer :smile:

Unfortunately I'm still not able to reproduce your problem. I had a similar effect at one point in gedit when running on Wayland after playing around and I think restarting ibus, but that was solved by restarting gedit.

A few further questions trying to shed some light why it's not working for you:

mkm65535 commented 1 year ago

sorry for my delayed reply.

Does ibus get started automatically when you boot/login?

for xorg(x11) session, you can edit .xprofile file in your home directory like containing below lines

export XMODIFIERS=@im=ibus export GTK_IM_MODULE=ibus export QT_IM_MODULE=ibus ibus-daemon -drx

and you can autostart ibus on x11.

after desktop environment launch type "km-config" in terminal to add keyman keymaps.

then to add input method to ibus for ubuntu default desktop environment, click icon on upper right corner of screen, proceed to "configuration" > "keyboard" > "input source"

pressing "super"(windows key) + space bar simultaniously you can select input methods.

Did you try and reboot since installing the Keyman keyboard?

yes.

I assume you are using the "Ubuntu with Xorg" option in the login screen?

I am using "plasma desktop(kde)" on x11. but I can switch to ubuntu default gnome whenever I want to do so.

Where do the keyboard icons at the bottom of your screenshot come from? What system/extension/? do you use there?

this is a panel for switching input methods for ibus, on default ubuntu desktop, this panel seems to be overrided/superseded by the ubuntu's im switching panel.

I switched to gnome(ubuntu default), then I tried wayland, but this erroneous behaviour persist.

ermshiperete commented 1 year ago

I can reproduce this if I change the UI language in Ubuntu to Japanese (Settings / Language and Region).

@mkm65535 To verify that this is really the cause, could you please change the Ubuntu UI language to English and see if it works then?

ermshiperete commented 1 year ago

@mkm65535 In addition to the test above, please do the following to narrow down the problem:

The debug output file might allow me to see where things are going wrong.

mkm65535 commented 1 year ago

hi ermshiperete. thanks for your reply.

now I will check my environment as you have instructed. please wait for a more couple of hours or so.

regards.

mkm65535 commented 1 year ago

sorry i' m late.

file /tmp/keyman-debug.log with some debug output. Please attach this file to a comment.

I typed some letters क(ka) त्र(tra) हु(hu) and collected debug log. seemingly nothing wrong with keyman? keyman-debug.log

I noticed some applications are not affected and can input letters properly. namely gedit(gnome text editor) kate(kde text editor) libreoffice_writer.

please change the Ubuntu UI language to English and see if it works

I switched language setting to en_US and tried to see if the behavior changed. seems no change.

I have no idea what is the cause of problem, seems difficult to identify.

ermshiperete commented 1 year ago

seemingly nothing wrong with keyman?

Yes, according to the log file things seem to work on Keyman's side.

I noticed some applications are not affected and can input letters properly. namely gedit(gnome text editor) kate(kde text editor) libreoffice_writer.

It does work in libreoffice_writer? That would be progress since it didn't work in the screenshot above. Which applications do still not work correctly?

mkm65535 commented 1 year ago

Well, let me explain. I have another linux machine (installed gentoo linux). and I have installed keyman on that gentoo machine too from git pulled github source. On ubuntu machine, libreoffice writer works fine with keyman. but on gentoo machine, I cannot input text on libreoffice writer with keyman.

Which applications do still not work correctly?

I checked arbitary applications. NG on google chrome, konsole, gnome-terminal, geary mail client firefox(OK on address bar, but NG on text field on webpage.) OK on gimp, shotwell, qpdfview, krdc, remmina, xournalpp [netbeans ide 14], [search bar of kde system settings]

mm, I'm a little coufused.

ermshiperete commented 1 year ago

See https://community.software.sil.org/t/problems-using-a-hindi-keyboard-on-ubuntu/6302/26 for a related problem.

ermshiperete commented 1 year ago

This will probably be fixed by #7079. Note that this will need a new ibus version. Unfortunately the upstream PR isn't merged yet, so you'll have to build from https://github.com/keymanapp/ibus/tree/feature-keyman.

MakaraSok commented 1 year ago

Installed Keyman for Linux alpha and get 16.0.82-alpha and there was an error message popped up right after the installation was done.

image

And the issues mentioned above persist. These behaviors are observed when testing in LibreOffice (v7.3.6.2) and gedit (v41.0):

Describe the bug Vedic Sanskrit Devanagari Phonetic(ITRANS) keymap on linux ibus extra consonant inserted when concatenate consonant with vowel

To Reproduce activate keyman Sanskrit engine with ibus [Super + Space] type "ka(क)" > ‌ "kka(क्क)" is produced type "kta(क्त) > "ktta(क्त्त)" is produced type "tra(त्र) > "trra(त्र्र)" is produced and so on.

image
MakaraSok commented 1 year ago

Tested Khmer Angkor keyboard and similar issue is found:

Type xEjmr output ខែ្មែរ, the expected output is ខ្មែរ.

related: https://github.com/keymanapp/keyman/issues/6639, yet the IPA (SIL) keyboard works fine.

image
MakaraSok commented 1 year ago

Note that the behaviors above are also observed after enabling Hindi and Asian from the Language Settings under Tools > Options.

ermshiperete commented 1 year ago

@MakaraSok What version of ibus do you have installed (dpkg -l ibus)?

And what's the content of /etc/apt/sources.list and what files do you have in /etc/apt/sources.list.d ?

MakaraSok commented 1 year ago
keyman@keyman-VirtualBox:~$ dpkg -l ibus
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  ibus           1.5.26-4     amd64        Intelligent Input Bus - core
MakaraSok commented 1 year ago
keyman@keyman-VirtualBox:~$ cd /etc/apt/sources.list
bash: cd: /etc/apt/sources.list: Not a directory
keyman@keyman-VirtualBox:~$ cd /etc/apt/sources.list.d
keyman@keyman-VirtualBox:/etc/apt/sources.list.d$ ls
keymanapp-ubuntu-keyman-alpha-jammy.list
ermshiperete commented 1 year ago

Ahh, sorry, I wasn't specific enough. Please run cat /etc/apt/sources.list instead of cd /etc/apt/sources.list.

You're running an ibus version that doesn't have the necessary patches (should be 1.5.26-4sil2.1.1~jammy - or another version ending in *sil2.1* if running on a different Ubuntu version).

I see you have the file keymanapp-ubuntu-keyman-alpha-jammy.list, so you might be able to run: sudo apt update && sudo apt upgrade. After running that command, run dpkg -l ibus again to see if that updated the ibus version. If so, things should work now.

Otherwise, paste the output of running cat /etc/apt/sources.list.d/keymanapp-ubuntu-keyman-alpha-jammy.list.

MakaraSok commented 1 year ago
keyman@keyman-VirtualBox:~$ cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 22.04 LTS _Jammy Jellyfish_ - Release amd64 (20220419)]/ jammy main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://kh.archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://kh.archive.ubuntu.com/ubuntu/ jammy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://kh.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
# deb-src http://kh.archive.ubuntu.com/ubuntu/ jammy-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://kh.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://kh.archive.ubuntu.com/ubuntu/ jammy universe
deb http://kh.archive.ubuntu.com/ubuntu/ jammy-updates universe
# deb-src http://kh.archive.ubuntu.com/ubuntu/ jammy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://kh.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://kh.archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://kh.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
# deb-src http://kh.archive.ubuntu.com/ubuntu/ jammy-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://kh.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://kh.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu jammy-security main restricted
# deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted
deb http://security.ubuntu.com/ubuntu jammy-security universe
# deb-src http://security.ubuntu.com/ubuntu jammy-security universe
deb http://security.ubuntu.com/ubuntu jammy-security multiverse
# deb-src http://security.ubuntu.com/ubuntu jammy-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
MakaraSok commented 1 year ago

The problem persists, hence the commands were run. Here are the returns:

keyman@keyman-VirtualBox:~$ dpkg -l ibus
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version                Architecture Description
+++-==============-======================-============-========================>
ii  ibus           1.5.26-4sil2.1.1~jammy amd64        Intelligent Input Bus - >
lines 1-6/6 (END)
[1]+  Stopped                 dpkg -l ibus
keyman@keyman-VirtualBox:~$ cat /etc/apt/sources.list.d/keymanapp-ubuntu-keyman-alpha-jammy.list
deb https://ppa.launchpadcontent.net/keymanapp/keyman-alpha/ubuntu/ jammy main
# deb-src https://ppa.launchpadcontent.net/keymanapp/keyman-alpha/ubuntu/ jammy main
keyman@keyman-VirtualBox:~$ 
ermshiperete commented 1 year ago

Did you reboot after updating ibus? (part of the change in ibus is a library that gets loaded by Gnome. This means that Gnome needs to be restarted in order to use the new ibus version.)

MakaraSok commented 1 year ago

I've checked the system again, and it shows that I've previously had been running on Wayland.

When trying it out on X11 the issue is fixed for the Vedic Sanskrit Devanagari Phonetic (ITRANS). A little now though, the installation of Keyman seems to take a little longer.

Thanks a lot for the fix.