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

How to turn off inline completion or prediction feature on ibus input method ? #2420

Closed
Mahmudul-hasan613 opened this issue Jun 27, 2022 · 102 comments

Comments

@Mahmudul-hasan613
Copy link

Which distribution and version?:
Ubuntu 22.04 LTS

Which desktop environment and version?:
ubuntu:GNOME

Which session type?:
wayland

Which application and version?:
All of software

IBus version?:
IBus 1.5.26

Issue description:
When I typing with ibus, something like an underline that appears below the letter. Is there any option to stop it?

Steps to reproduce:
Check the screenshot

Can you reproduce your problem when you restart ibus-daemon? (yes / no):
yes

Do you see any errors when you run ibus-daemon with the verbose option?:
No

Can you reproduce your problem with a new user account instead of the current your account? (yes / no):
yes

Screenshot from 2022-06-28 00-22-07

@Mahmudul-hasan613 Mahmudul-hasan613 changed the title How to turn off inline completion or predictions feature on ibus input method ? How to turn off inline completion or prediction feature on ibus input method ? Jun 27, 2022
@mike-fabian
Copy link

Which ibus input method are you using?

I think you are most likely using either ibus-m17n or ibus-typing-booster …

Both ibus-m17n and ibus-typing-booster have options to switch off the underlining of the preedit.

But: In Wayland that doesn’t work! Currently it is not possible to style the preedit in any way in Wayland. In Wayland the whole preedit is always marked with a single underline. As a workaround, you cold use Gnome Xorg, then you can switch off the underline using options.

@Mahmudul-hasan613
Copy link
Author

I am using ibus-m17n. When I login to Gnome Xorg, how do I turn off the underline option?

@mike-fabian
Copy link

Screenshot of the ibus-m17n setup tool:

Screenshot

There are options for the underlining, one of the options is “None”.

@Mahmudul-hasan613
Copy link
Author

Sir, I apologize for bothering you again and again. But I can't find the settings you're talking about! Where can I find the ibus-m17n setup tool?

@mike-fabian
Copy link

When you select “Hindi - itrans (m17n)” (or whatever ibus-m17n input method you are using) in the Gnome panel, and then open the input menu of the Gnome panel again, you should see an entry “Setup” in that menu. Clicking on that should open the setup tool for “Hindi - itrans (m17n)”.

@mike-fabian
Copy link

mike-fabian commented Jun 30, 2022

When I look at the screenshot in your first comment, I have the impression that you are not using ibus-m17n but maybe ibus-typing-booster.

Because I see a rather long underlined text. ibus-m17n usually commits quite frequently, so you rarely see more than one or two characters underlined. ibus-typing-booster commits only at the end of words so you may see the full word underline unless you switch the underlining off.

If you see a rocket icon in the gnome panel, you are using ibus-typing-booster.

If that is the case, you should also see a “Setup” entry in that menu in the Gnome panel.

In the ibus-typing-booster setup tool, in the “Appearances” Tab, there is an option “Preedit underline” with a combobox with 4 options, one of them is for switching off the underline.

@mike-fabian
Copy link

The title of your issue also mentions “inline completion” and “prediction”. These are features only ibus-typing-booster has, ibus-m17n doesn’t have these features. This also makes me suspect that you are actually using ibus-typing-booster.

If that is the case, then look at this chapter in the ibus-typing-booster online documentation:

Simulate the behaviour of ibus-m17n: https://mike-fabian.github.io/ibus-typing-booster/docs/user/#2_2_1_1

It explains how to switch all the extra features off and how to switch the underline off.

This chapter also has a video which shows this in detail.

@mike-fabian
Copy link

Does it work for you now?

@Mahmudul-hasan613
Copy link
Author

I use OpenBangla keyboard software for typing Bangla. Which is based on ibus. But does it use ibus-typing-booster or ibus-m17n; I could not be sure. First I discuss the underline feature with OpenBangla developers. They first said it was an ibus bug, and I wanted to report it to ibus. But later I was told that the feature I wanted has not to the OpenBangla keyboard yet. However, this option will be considered later.
And the answer is : This is not work!

@mike-fabian
Copy link

No, OpenBangla keyboard does not use ibus-typing-booster or ibus-m17n.
But you could try to use ibus-typying-booster to type Bangla as well.

@mike-fabian
Copy link

With ibus-typing-booster, you could use these 5 input methods for Bangla at the moment:

[mfabian@fedora ~]$ ls /usr/share/m17n/bn*
/usr/share/m17n/bn-disha.mim      /usr/share/m17n/bn-itrans.mim
/usr/share/m17n/bn-inscript.mim   /usr/share/m17n/bn-probhat.mim
/usr/share/m17n/bn-inscript2.mim
[mfabian@fedora ~]$ 

Maybe one of them is good for you?

@Mahmudul-hasan613
Copy link
Author

Two things are very important to me.

  1. I am used to typing in National (Jatiya) keyboard layout.
  2. I need the Automatic Vowel Forming feature to type faster.

Do ibus-typing-booster have these features?

@mike-fabian
Copy link

Two things are very important to me.

1. I am used to typing in National (Jatiya) keyboard layout.

2. I need the Automatic Vowel Forming feature to type faster.

Do ibus-typing-booster have these features?

Probably not yet. I think none of the above 5 input methods currently available in m17n are “National (Jatiya)”.

It would be possible to port this to m17n though. If anyone is interested to help me doing that, that would be nice.

@mike-fabian
Copy link

I just tested https://github.com/OpenBangla/OpenBangla-Keyboard on Fedora 36 Gnome Xorg.

It does not show an underline there:

Screenshot-OpenBangla-Gnome-Xorg

@mike-fabian
Copy link

If I do exactly the same on Gnome Wayland, there is an underline:'

Screenshot-OpenBangla-Gnome-Wayland

@mike-fabian
Copy link

I.e. ibus-openbangla does already try to switch off the underlining, only that doesn’t work on Wayland.

@mike-fabian
Copy link

  1. I need the Automatic Vowel Forming feature to type faster.

Can you describe in detail what that feature does? Is there a specification somewhere?

@Mahmudul-hasan613
Copy link
Author

Mahmudul-hasan613 commented Jul 5, 2022

Probably not yet. I think none of the above 5 input methods currently available in m17n are “National (Jatiya)”.
It would be possible to port this to m17n though. If anyone is interested to help me doing that, that would be nice.

I apologize for the delay reply.

National (Jatiya) keyboard layout is installed by default in all Linux distributions.
Screenshot from 2022-07-05 21-30-15
Screenshot from 2022-07-05 21-21-07

The keyboard option in the settings is the keyboard layout of the first Bangla name inside Bangla (Bangladesh); That is the National (Jatiya) keyboard layout.
Screenshot from 2022-07-05 21-17-56

@Mahmudul-hasan613
Copy link
Author

I just tested https://github.com/OpenBangla/OpenBangla-Keyboard on Fedora 36 Gnome Xorg.

It does not show an underline there:

I logged in to Gnome Xorg according to your suggestion. But then the underline was showing while writing. I'm guessing, I may not have installed the operating system properly; Or an error has occurred in the system due to constant updates. I will completely reinstall the operating system and try again according to your suggestions; Then maybe work.

Thanks for your advice.

@Mahmudul-hasan613
Copy link
Author

Can you describe in detail what that feature does? Is there a specification somewhere?

Since I have no knowledge of coding; So I can't tell you anything technical about that feature. But I can give you an idea of ​​what this feature does.

The letters of Bengali and Hindi are generally divided into two parts. Consonants and vowels. There is another abbreviated form of the vowel. Which is called Dependent vowel signs in English. Which is very similar to Arabic Tashkil from ISO 8859-6. I have attached the PDF file of the Bengali Unicode list and the PDF file of the Arabic Unicode list.

U0600 (Arabic Unicode list).pdf
U0980 (Bangla Unicode list).pdf

If you look at these two files well, you can understand a lot. So the Automatic Vowel Forming feature works, where the vowel will be and Dependent vowel signs will be decided by the keyboard software itself.

Mehdi Hasan Khan has worked with this feature. If you contact him, I hope you know the details.

He has created open source Bangla keyboard software for Windows operating system. Its name is Avro keyboard. The GitHub link is: https://github.com/omicronlab. The Linux version is the Open Bangla keyboard.

This feature is also available in the Gboard app of Android operating system.

@mike-fabian
Copy link

I just tested https://github.com/OpenBangla/OpenBangla-Keyboard on Fedora 36 Gnome Xorg.
It does not show an underline there:

I logged in to Gnome Xorg according to your suggestion. But then the underline was showing while writing. I'm guessing, I may not have installed the operating system properly; Or an error has occurred in the system due to constant updates. I will completely reinstall the operating system and try again according to your suggestions; Then maybe work.

I don’t think completely reinstalling will help for whether the underline shows in Gnome Xorg or not, that might be just a waste of time.

@mike-fabian
Copy link

Could it be that you are using an older version of OpenBangla? When I tried it in Gnome Xorg and did not see the underline, I was using OpenBangla from current git master.

@Mahmudul-hasan613
Copy link
Author

I don’t think completely reinstalling will help for whether the underline shows in Gnome Xorg or not, that might be just a waste of time.

I totally agree with you. But I can't find the problem! Besides the underline, there is another problem when I using Open Bangla keyboard. That is, the Ctrl + Backspace keyboard shortcut does not work when I am typing. After typing a word, I have to finish the text by pressing space button or arrow key or end button. Otherwise, when I move the cursor by mouse from the place where I was writing last, if I move the cursor elsewhere; Then that word also disappears, then wherever I put the mouse cursor, that word goes.

@mike-fabian
Copy link

I have created a “National Jatiya” keyboard layout now which can be used with ibus-typing-booster or ibus-m17n, see:

https://github.com/mike-fabian/m17n-db-bn-national-jatiya

The README.md has instructions on how to install it.

This is a simple keyboard layout, just like /usr/share/X11/xkb/symbol/bd. It does not do any automatic vowel forming. Maybe I can add such an improvement later.

@Mahmudul-hasan613
Copy link
Author

I have created a “National Jatiya” keyboard layout now which can be used with ibus-typing-booster or ibus-m17n, see:

https://github.com/mike-fabian/m17n-db-bn-national-jatiya

The README.md has instructions on how to install it.

This is a simple keyboard layout, just like /usr/share/X11/xkb/symbol/bd. It does not do any automatic vowel forming. Maybe I can add such an improvement later.

Thank you so much for adding the National (Jatiya) keyboard layout. I will definitely try it.

@mike-fabian
Copy link

mike-fabian commented Jul 6, 2022

Besides the underline, there is another problem when I using Open Bangla keyboard. That is, the Ctrl + Backspace keyboard shortcut does not work when I am typing.

You mean that Ctrl+Backspace does not delete the last word?

I can reproduce that. That is a bug in OpenBangla.

This works in ibus-typing-booster.

See this video how to use National Jatiya in ibus-typing-booster:

(The video also shows how to switch off the underline, works only in Xorg, not in Wayland)

(At the end of the video I type Ctrl+Backspace deleting the last word)

Peek.2022-07-06.17-57.mp4

@mike-fabian
Copy link

Otherwise, when I move the cursor by mouse from the place where I was writing last, if I move the cursor elsewhere; Then that word also disappears, then wherever I put the mouse cursor, that word goes.

That is also a bug in OpenBangla:

https://github.com/OpenBangla/OpenBangla-Keyboard/blob/master/src/engine/ibus/main.cpp#L46

uses:

ibus_engine_update_preedit_text(engine, text, ibus_text_get_length(text), TRUE);

It should instead use:

ibus_engine_update_preedit_text_with_mode(engine, text, ibus_text_get_length(text), TRUE, IBUS_ENGINE_PREEDIT_COMMIT)

If that is used and you move the cursor elsewhere, the word currently in preedit will not disappear but it will be committed instead. And therefore also not reappear elsewhere.

@Mahmudul-hasan613
Copy link
Author

Preedit disappears and appears elsewhere when the cursor is moved with a mouse.
OpenBangla/OpenBangla-Keyboard#298

Many thanks for working on that issue.

@mike-fabian
Copy link

Maybe I am beginning to understand what automatic vowel forming should do.

"ৃ" U+09C3 BENGALI VOWEL SIGN VOCALIC R

can probably be used to “apply” that vowel on something which came before. A consonant?

But if there is nothing before "ৃ" U+09C3 BENGALI VOWEL SIGN VOCALIC R it could apply to, either there is nothing at all as when I just type a where nothing else exists yet, or there is something but "ৃ" U+09C3 BENGALI VOWEL SIGN VOCALIC R cannot be applied to that something.

Then the "ৃ" U+09C3 BENGALI VOWEL SIGN VOCALIC R transforms into a ঋ U+098B BENGALI LETTER VOCALIC R

Do I understand that right?

Should any BENGALI VOWEL SIGN transform into BENGALI LETTER if there is nothing to the left it could be applied to?

@Mahmudul-hasan613
Copy link
Author

I have updated bn-national-jatiya.mim to support this:

I re-downloaded and checked your updated layout. It is now working "g + C = ঐ".

@Mahmudul-hasan613
Copy link
Author

Should any BENGALI VOWEL SIGN transform into BENGALI LETTER if there is nothing to the left it could be applied to?

Yes.

@Mahmudul-hasan613
Copy link
Author

can probably be used to “apply” that vowel on something which came before. A consonant?

Yes, consonants. To get a better idea about BENGALI VOWEL SIGN or VOWEL DIACRITICS, you can visit the link.

@Mahmudul-hasan613
Copy link
Author

Then the "ৃ" U+09C3 BENGALI VOWEL SIGN VOCALIC R transforms into a ঋ U+098B BENGALI LETTER VOCALIC R

Do I understand that right?

Yes, you got it right.

@mike-fabian
Copy link

Ah, nice. I try whether I can improve bn-national-jatiya.mim further to support that.

@Mahmudul-hasan613
Copy link
Author

Preedit disappears and appears elsewhere when the cursor is moved with a mouse. This bug is still ibus-typing-booster and OpenBangla Keyboard!

Screencast.from.13-7-22.09.32.47.+06.webm

@mike-fabian
Copy link

It seems to me the behaviour for ibus-typing-booster and OpenBangla keyboard is different in your video. I think the difference is because OpenBangla does not support committing on focus change yet. So for OpenBangla, the preedit disappears and reappears elsewhere. For ibus-typing-booster, the preedit disappears in libreoffice, but does not reappear elsewhere. See my test video here:

Peek.2022-07-13.12-57.mp4

@mike-fabian
Copy link

That the preedit disappears for ibus-tying-booster as well, even though ibus-typing-booster supports commit on focus change, is probably a libreoffice bug.

@mike-fabian
Copy link

See this video using gedit for comparison:

In this video, when using OpenBangla, the preedit disappears and reappears at the new position, newly typed characters are added to the existing preedit at the new position.

But for ibus-typing-booster, clicking with the mouse to move the cursor to a different position commits the preedit at the old position (the underline disappears) and at the new position it does not reappear, only the newly typed character is seen at the new position:

Peek.2022-07-13.13-00.mp4

@mike-fabian
Copy link

So this video using gedit shows that ibus-typing-booster supports committing on focus change whereas OpenBangla does not.

(At least not yet, OpenBangla 3.0.0 will support it apparently).

In Libreoffice there are additional problems which are probably Libreoffice bugs.

@Mahmudul-hasan613
Copy link
Author

(At least not yet, OpenBangla 3.0.0 will support it apparently).

I am currently using 3.0.0 develop version of OpenBangla Keyboard. I mean, the new version is having this problem.

@mike-fabian
Copy link

Are you sure you are using 3.0.0? Does it display 3.0.0 when you open the “About OpenBangla Keyboard”?

When I use

bash -c "$(wget -q https://raw.githubusercontent.com/OpenBangla/OpenBangla-Keyboard/master/tools/install.sh -O -)"

or

bash -c "$(wget -q https://raw.githubusercontent.com/OpenBangla/OpenBangla-Keyboard/develop/tools/install.sh -O -)"

it installs the 2.0.0 version for me.

@mike-fabian
Copy link

And when I try to build the version from the “develop” branch from source it fails for me as I describe here:

OpenBangla/OpenBangla-Keyboard#307

@Mahmudul-hasan613
Copy link
Author

Mahmudul-hasan613 commented Jul 16, 2022

Are you sure you are using 3.0.0? Does it display 3.0.0 when you open the “About OpenBangla Keyboard”?

I'm sure, I'm using version 3.0.0
Screenshot from 2022-07-16 07-34-56

@Mahmudul-hasan613
Copy link
Author

And when I try to build the version from the “develop” branch from source it fails for me as I describe here:

OpenBangla/OpenBangla-Keyboard#307

You can follow the method if you want.

git clone --recursive https://github.com/OpenBangla/OpenBangla-Keyboard.git
cd OpenBangla-Keyboard
git checkout develop
git submodule update
mkdir build && cd build
cmake .. -DENABLE_IBUS=ON
make
sudo make install

@mike-fabian
Copy link

OK, thank you, I was missing the git submodule update

@mike-fabian
Copy link

Here is a video using OpenBangla 3.0.0.

There is an improvement:

when I type into gedit (above) an switch the focus to gnome-text-editor (below) the preedit is committed (i.e. does not disappear in gedit) and the input does not reappear. When I type into gnome-texteditor, and switch back to gedit, the preedit in gnome-text-editor is committed and does not disappear.

But the following problem remains.

When I typing into gedit and move the focus with the mouse to a different position inside gedit (i.e. inside the same window), the preedit is correctly commited (with 2.0.0 it disappeared). So a slight improvement here as well.

But the following problems remain:

  • the candidate list does not close
  • the text reappears when typing at the new position, the newly typed text is added to the old preedit

See this video:

Peek.2022-07-16.15-06.mp4

@mike-fabian
Copy link

New issue reported here:

OpenBangla/OpenBangla-Keyboard#308

@Mahmudul-hasan613
Copy link
Author

New issue reported here:

OpenBangla/OpenBangla-Keyboard#308

Thank you very much for working on the issue.

@mike-fabian
Copy link

I made a pull request for OpenBangla to fix the reappearing preedit when moving the cursor with the mouse to a different position in the same window:

OpenBangla/OpenBangla-Keyboard#308 (comment)

@Mahmudul-hasan613
Copy link
Author

Thank you very much for working on the issue.
When the pull request is done, will the problem be solved if I do a fresh install again...?

@mike-fabian
Copy link

When the pull request is done, will the problem be solved if I do a fresh install again...?

Yes, when the pull request has been merged, the issue should be solved if you do a fresh install from the develop branch.

@Mahmudul-hasan613
Copy link
Author

When the pull request is done, will the problem be solved if I do a fresh install again...?

Yes, when the pull request has been merged, the issue should be solved if you do a fresh install from the develop branch.

Although the pull request has not been approved yet. But I have the same file as the develop branch; Added the code you suggested and did a fresh install. It is working very well. That problem no longer exists. Thank you very much.

@fujiwarat
Copy link
Member

Seems not ibus issue.

@fujiwarat fujiwarat closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 2022
@mike-fabian
Copy link

Seems not ibus issue.

Yes!

@mike-fabian
Copy link

@Mahmudul-hasan613
Can you please open a new issue at for the automatic vowel forming support?:
https://github.com/mike-fabian/m17n-db-bn-national-jatiya/issues

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