- Alt + Shift switch between languages (IMEs)
- Ctrl + Caps Lock switch to Hiragana
- Alt + Caps Lock if in alphanumeric mode change to Hiragana, then switch to Katakana
- Shift + Caps Lock switch between full-width Hiragana ↔ full-width alphanumeric (romaji)
- Alt + ` (Grave Accent) switch between kana ↔ half-width alphanumeric (romaji)
- Alt + ~ (Tilde) toggle kana/direct input
These keyboard shortcuts do not work in Gnome. I have to select the modes manually from the menu.
I understand that Alt + ` interferes with the application switcher shortcut but I doubt that I'm the only user using Gnome and trying to get it to work like an average user would do on any other platform. If there was a serious issue with the existing keyboard mappings there should at least be some kind of best practice or recommendation how to create a useful mapping instead of everyone starting from scratch rolling her/his own? I'm not convinced by existing answers (1, 2) and I could not find any good resources how a Linux user is supposed to configure and use Mozc (1, 2) efficiently.
So my question I'd like to have a complete answer here is:
- What is the recommended Japanese input method for Ubuntu 18.04 and later? (I assume it is Mozc.)
- Which packages need to be installed?
- How is the input method configured in Gnome? (A Windows user just downloads and installs the Google software for comparison. It just works.)
- How to set up the input method itself?
- How to set up switching of input modes?
- Are there any conflicts with keyboard shortcuts? How to resolve?
- Are there any conflicts with other IMEs or software components (like UIM, IBus)? How to resolve?
- Is there any useful documentation how to use the IME? (Or typical Japanese IME in general.)
- Would be useful to verify that it is working correctly.
- Understanding how the software is supposed to be used by average users. There seem to be a lot of shortcuts and additional functionality to tweak but also to make your experience worse than instead of going with the default where possible.
After a few reboots I find that fcitx does not work when I set the mode to Hiragana and type in Gedit. Trying to reconstruct the behavior I must have been using Ibus at the time. When I try Ibus it works.
I had reset my keyboard shortcuts on this computer when I moved from Unity to Gnome, thus running the defaults except for the take screenshot key which I have disabled. I previously had setup custom compose keys (1, 2), but I disabled
export GTK_IM_MODULE="uim" and
export QT_IM_MODULE="uim" in my
.profile when moving to Gnome with Wayland due to a bug. Sequences like Compose+.+. and Compose+→+→ do work though.
When running fcitx I get the following output:
$ printenv | grep -i im_module CLUTTER_IM_MODULE=xim QT4_IM_MODULE=fcitx QT_IM_MODULE=fcitx GTK_IM_MODULE=fcitx
When running ibus I get the following output:
$ printenv | grep -i im_module CLUTTER_IM_MODULE=xim QT4_IM_MODULE=xim QT_IM_MODULE=ibus GTK_IM_MODULE=ibus
Okay as far as I understand fcitx does not integrate well with Gnome at the moment. I try to go with IBus since I don't want fcitx to interfere with keyboards and configure keyboards in Gnome and fcitx (across several desktops and laptops). While I have no problems using Ctrl + Caps Lock and Alt + Caps Lock in Windows, Mozc on Linux has the Japanese keys in it's mapping and the Alt and Eisu keys don't seem to be supported. There is an entry on the Arch Wiki regarding X tools (I'm not sure about Wayland) and some Japanese users seem to have found their ways, but this is way too much for me right now.
While users on Arch use a custom AUR package I found a simple quilt patch for easy applying and recompiling to the latest version. I hope this can be included in Ubuntu one way or another while the Linux version has no documented way of making the quoted shortcuts work like on other OSes. With this annoyance gone I consider my issue almost solved. Lets see what happens with the bug report or upstream in the mean time.