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

IBUS Rework #168

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

IBUS Rework #168

wants to merge 19 commits into from

Conversation

fossfreedom
Copy link
Contributor

Description

This maybe specific to Debian/Ubuntu - so it could be construed as a FYI as to what I will be adding as a patchset for these distros. Thus please consider carefully - it does need thorough testing on your specific distro since as far as I can gather many distro's patch IBUS stuff in different ways. I don't recall seeing previous issues like this being reported by other distros hence the issues below may be specific to Debian/Ubuntu.

Over the years of budgie-desktop various ubuntu community members (and reproduced on Debian) have reported on occasions that the keyboard layout always defaulted to en_US even if it wasn't installed. Logging in and logging out may resolved. On other occasions various workaround like toggling the gsettings keyboard layouts key seem to resolve for a session.

Additionally various people have reported that ALT+Shift rarely worked as a switch layout key combination.

Finally - the IBUS popup for non-latin languages didn't appear in budgie. We resolved this a while back and have carried the fix as a distro specific patch (the ibus-daemon process needed to be called with different parameters).

Screenshot from 2022-07-26 09-44-01

This PR reworks budgie's IBUS handling to resolve all of the above.

As a FYI - I will be carrying this as a patchset for 22.10 where the first issue always seems to occur now - at least for me. Various team members and community members are testing this for 22.04 and will likely push this as a stable release update for that series. If demand warrants this I will also consider backporting to 20.04 where these issues have also been reported in the past.

Submitter Checklist

  • Squashed commits with git rebase -i (if needed)
  • Built budgie-desktop and verified that the patch worked (if needed)

Copy link
Member

@JoshStrobl JoshStrobl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to review the rest later but some initial items and question.

src/wm/ibus.vala Show resolved Hide resolved
src/wm/keyboard.vala Outdated Show resolved Hide resolved
src/wm/keyboard.vala Outdated Show resolved Hide resolved
src/wm/keyboard.vala Outdated Show resolved Hide resolved
src/wm/keyboard.vala Outdated Show resolved Hide resolved
src/wm/keyboard.vala Outdated Show resolved Hide resolved
src/wm/keyboard.vala Outdated Show resolved Hide resolved
src/wm/keyboard.vala Outdated Show resolved Hide resolved
@serebit serebit added the enhancement New feature or request label Aug 30, 2022
src/wm/ibus.vala Show resolved Hide resolved
@usergreen
Copy link

usergreen commented Nov 29, 2022

fossfreedom commented on Jul 26

For some layouts such as Japanese, if the user is NOT using a japanese keyboard with the extra keys to change the input mode, the only way to change the input mode (at least that I can find) is to re-enable the system tray icon (via ibus-setup) and change the input mode that way.

I think this problem is only specific to Ubuntu Budgie. Other distros including Debian and Fedora can change the input mode by pressing Shift + Space and/or Ctrl + Space keys besides the system tray icon.

I tested Ubuntu Budgie 22.10. I followed a usual way to introduce IBus-anthy, but the system tray icon did not appear at all, as long as I do not change the following setteing: [System Tools] > [IBus Preferences] > [Imput Method] > [Add] > [日本語] > [Anthy]
So it seems that this might be a specific issue only for Ubuntu Budgie.

Best regards.

@fossfreedom
Copy link
Contributor Author

@usergreen you will need to add the system tray applet to the panel. You then need to enable the tray icon via ibus-settings. Only then will you see the ibus icon.

@usergreen
Copy link

@fossfreedom As I mentioned above, there is no need to add the system tray applet to the panel in order to enable Japanese input. Of course, ibus tray applet is an available option to add afterwards.

In Ubuntu Budgie, you can switch input method from English to Japanese by Ctrl + j key (or 半/全 key in Japanese keyboard).

What I did to enable Japanese input was only to do the following:
apt install ibus-anthy
as root user and
im-config
as ubuntu-budgie user and choose IBus from the menu.
Then added [System Tools] > [IBus Preferences] > [Imput Method] > [Add] > [日本語] > [Anthy]

The above can be reproduced.

@fossfreedom
Copy link
Contributor Author

Indeed. You shouldnt (in theory) need ibus preferences at all.

Just use the appropriate keyboard layout in budgie-control-center

For example, for Chinese install ibus and lib-ibus-pinyin logout and login and then choose the intelligent pinyin layout in BCC - keyboard. Logout and login again.

@JoshStrobl JoshStrobl self-requested a review December 27, 2022 20:21
Copy link
Member

@JoshStrobl JoshStrobl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went ahead and did some code cleanup. LGTM. Thank you for adding the ibus icon option!

@JoshStrobl JoshStrobl self-requested a review December 27, 2022 20:49
Copy link
Member

@JoshStrobl JoshStrobl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: Cycling seems bork. It defaults to en + Finnish even though I've only specified Finnish in BCC (in ibus it seems to have en + Finnish), but I can't switch between the two. I can only switch to en US but not back. When I add Japanese (Anthy) in BCC, I can switch and it shows up in the tray, and I can switch to English, but I can't switch to Finnish. The Japanese Anthy layout doesn't appear in the popup / tooltip for IBUS either.

@usergreen
Copy link

In that case, I suggest to use "uim" (Universal Input Method) instead of IBus. uim + Anthy works fine for me and has no problem. You can test my re-spin ISO image file from https://sourceforge.net/projects/mx-respin-iso/files/budgie/

Best regards.

@fossfreedom
Copy link
Contributor Author

fossfreedom commented Dec 27, 2022

Rather than just pointing to an iso please do help with this. Raise a discussion thread and describe what is uim, how you have implemented with it with any hints and tips on setting things such as anthy et al, how you suggest the keyboard applet should flip between layouts I.e. what files/dconf key needs tweaking. Thanks in advance.

fossfreedom and others added 5 commits December 27, 2022 22:55
This commit resolves a three keyboard scenario where
German, French and Greek layouts resulted in French being
applied as US. We now connect to the GNOME keyboard schema
directly as a static instance rather than indirectly via the
constructor which is rather mangled with different vala
compiler versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] ibus input window does not display using Budgie desktop environment
4 participants