What is the recommended Japanese input method for Ubuntu 18.04 and later? (I assume it is Mozc.)
The IMF is IBUS
(comes installed from Ubuntu's ISO).
The IME is MOZC
(most commented here in Askubuntu) followed by Anthy
.
But it is so subjective.
Install all of them!
And try each one!
Which packages need to be installed?
On Ubuntu 18.04, you need to install 3 kinds of packages:
Language
You need to install the japanese language (to get the base packages).
Following the instructions in Writing Japanese with Ubuntu 18.04 LTS Bionic Beaver and Japanese Input:
- In
system settings
, select Region & Language
.
- Click
Manage Installed Languages
.
- In the
Language Support
window, click on Install / Remove Languages...
.
- In the
Installed Languages
window, check Japanese
, click Apply
.
Log out
of your Ubuntu profile to get effect.
IMFs packages
You can install one (or both) IMFs.
Ubuntu comes with ibus
installed.
To install, type:
- ibus:
sudo apt install ibus
- fcitx:
sudo apt install fcitx
.
IMEs packages
You need to install japanese IME(s) for each installed IMF.
For example, Ubuntu comes with ibus
IMF.
So you can install one (or more) of these japanese IMEs:
- mozc:
sudo apt install ibus-mozc
- Anthy:
sudo apt install ibus-anthy
.
- KKC:
sudo apt install ibus-kkc
.
- SKK:
sudo apt install ibus-skk
.
And if you installed fctix
IMF, you will need to install at least one of its specific japanese IMEs:
- mozc:
sudo apt install fcitx-mozc
- Anthy:
sudo apt install fcitx-anthy
.
- KKC:
sudo apt install fcitx-kkc
.
- SKK:
sudo apt install fcitx-skk
.
How is the input method configured in Gnome? (A Windows user just downloads and installs the Google software for comparison. It just works.)
First install: japanese language, one IMF, and one japanese IME.
After that, you only need to click on GNOME Status Menu
(Gnome's top-right bar) > IBus
menu (i.e. keyboard/input language selector) > Select your desired input method.
Or use the shortcut: hold Super and press Space.
How to set up the input method itself?
Each IMF and each IME have their configurations, menus, windows and so on.
How to set up switching of input modes?
To switch between japanese input modes (e.g. hiragana, katakana etc) is a important requirement.
Each IME comes with their own:
- shortcuts or binding keys to switch japanese modes.
- plus that, has graphical submenus at
GNOME Status Menu
to switch between japanese modes and access its configurations.
Are there any conflicts with keyboard shortcuts? How to resolve?
No.
Each IME has their keymap editor.
So you can edit any conflict, if exists.
Are there any conflicts with other IMEs or software components (like UIM, IBus)? How to resolve?
I don't thing so.
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.
Only install all packages, select the IME from GNOME Status Menu
and type in any text field.
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 select the installed japanese IME, you will need to know the shortcuts to change the japanese input mode.
For example, you can see all ibus-mozc
keymap and its romaji-hiragana table.
Best Answer
TLDR
Abstract
Steps to create the Japanese Mozc key bindings, to switch the input modes:
Gnome Status
menu (Gnome's top-left bar) >IBus
menu (i.e. keyboard/input language selector) > SelectJapanese Mozc
input method.Gnome Status Menu
>IBuz
>tools
>Properties
>Mozc Settings
window.Keymap style
section > click oncustomize
button (first one).reset to defaults
button fromMozc Settings
window.That's all!
Graphical abstract
Steps to create the key bindings to toggle Japanese syllabaries input mode.
Introduction:
The problem: how to type Japanese using a non-Japanese keyboard?
In Japanese (日本語, nihongo), you need to write using a lot of different symbols-sets. A informal categorization of these sets can be like:
alphabetssyllabaries (ひらがな hiragana, かたかな katakana, 漢字 kanji, ローマ字 romaji),So, dedicated keys exists on Japanese keyboards to toggle between them. An analogy with occidental keyboard are the Capslock key to upper/lower-case or, Shift key to insert symbols. But the occidental keyboard hasn't these Japanese keys. So how to type in Japanese using a non-Japanese keyboard?
Solutions
Basically, two solutions can be listed:
Solution 1: Install a Japanese keyboard
Easiest solution so far. Acquire one Japanese keyboard, install and configure on your Operation System. But you need access to one, maybe buying one (with international credit card, taxes, waiting for shipping and so on).
Solution 2: Binding Japanese keys in your non-Japanese keyboard.
It is a cheap solution and you can use it in any keyboard you have. But you need to install software, configure, and memorize MANY key combinations. It is basically "a sea of shortcuts" to emulate the Japanese keyboard. Linux have some software to simulate a Japanese keyboard for using a non-Japanese keyboard.
Let's implement the solution 2.
Theoretical background
Linux input software layers
Our computer can receive inputs from many talked/typed languages and hardware (i.e. different keyboards and layouts). So it needs to organize the configurations and permit to the user choice between different languages. For example, a user can type one document in Italian AND English languages, at alternating times. So the software needs to show the user a way to change the language to be inputted.
The Linux user have 2 layers of software to configure the input method by keyboard:
For the Linux user, an example o IMF is IBus; an a example of IME is MOZC. The first one will switch between all installed IMEs and switch between all idioms/languages installed too. The second one, if selected, will send to the IMF only Japanese keys, even if you typed in a non-Japanese keyboard. About Japanese IMEs, you can read more about here, and visualize the states/events in these diagrams:
Diagram 1:
Diagram 2:
Japanese keyboard
Layout
The Japanese keyboard layout (キーボード) is established by Japanese International Standard (JIS). First of all, let's contemplate the Japanese keyboard! Watch an open box video. You can see the vector draw bellow, showing clearly the Japanese keys:
Finally, some real pictures bellow:
Try to identify each key, slowly.
We have:
You can have more description of these specific keys here. And read about the text frequency of hiragana, katakana e kanji and here.
Typing
How a Japanese user type on this keyboard?
For example, lets type "kakikukeko" in
romaji mode
:romaji mode
.k
.か
(ka).かk
.かき
(kaki).かきk
.かきく
(kakiku).かきくk
.かきくけ
(kakikuke).かきくけk
.かきくけこ
(kakikukeko).かきくけこ
(kakikukeko ).Another example, type "kakikukeko" in
hiragana mode
.kana mode
.か
(ka).かき
(kaki).かきく
(kakiku).かきくけ
(kakikuke).かきくけこ
(kakikukeko).かきくけこ
(kakikukeko ).And to convert to katakana or kanji is the same thing. You can toggle to
katakana mode
orkanji mode
and type on romaji or hiragana. And the computer will pop up an autocomplete window to you select your desired word.Method
Now, we will use software to type Japanese in a non-Japanese keyboard. My system when I create this text was:
Install
Ubuntu came with the IMF
IBus
(like a built in). But if you need to install IBus:Next, let's install our Japanese IME
MOZC
:Observation: look at the name of the package
ibus-mozc
. Its our IMF + IME names. So, in future we can search on APT repositories for IMF and Japanese IME alternatives, likeibus-*
, or*-mozc
.Installations completed!
Configurations
A Japanese keyboard has many different keys, to switch:
It is necessary to edit and memorize the Japanese input software's (binding) shortcut keys. Hiragana, katakana, kanji, romaji, upper/lower-case, full/half-width, Japanese symbols (period, quote, maru, tenten etc). So, you need to memorize/edit the keys to (des)activate the switches.
See the screenshots from before to get a hint of where the MOZC keymap is. To edit/read these keys on your Mozc:
IBus
(atGNOME Status Menu
) >Japanese (Mozc)
.IBus
(atGNOME Status Menu
) >Tools
>Properties
.Mozc Setting
window popped up, click on:General
tab >Keymap
section (at bottom) > Keymap Stylecustomize
button (first one).Mozc keymap editor
window popped up, click on: Scroll up and down to memorize and edit the Japanese keymap (bindings).From MOZC's source-code, see the table with all matches to the Japanese JIS special keys, as bellow:
You can consider to study/test other MOZC keys too, like:
So, we need to create new shortcuts similar with these, like bellow (these are my shortcut sugestions):
If you are interested, you can read MOZC's romaji-hiragana conversion table.
reset to defauts
button atMozc setting
window (opened in Step 3).If you edit these shortcuts, please consider conflicts with your existing shortcuts from:
With these key bindings you can type very well in a non-japanese keyboard. We didn't binding the others japanese keys to let you study the subject.
Alternative solutions
Similar softwares
Im using IBus to be my input method editor (IME). But you can switch to other IMF/IME if you desire. Others IMEs are:
sudo apt install ibus-anthy
.sudo apt install ibus-kkc
.sudo apt install ibus-skk
.The same as to input method framework (IMF), like:
sudo apt install fcitx
.sudo apt install fcitx-mozc
.sudo apt install fictx-kkc
.sudo apt install fictx-skk
.A list of IMF can be found List of input methods for Unix platforms and Linux input method framework brief summary.
Edit keymap file by a text editor
You can manage the keymap saving, editing, import/export and so on. To do that, read the file at source-code. If you wanna, you can download this file and edit it to be imported into your MOZC software.
So, to import/export the keymap file:
GNOME Status Menu
, select MOZC input method.GNOME Status Menu
, selectTools
>Properties
.Mozc Setting
window popped up, click on:General
tab >Keymap
section (at bottom) > Keymap Stylecustomize
button (first one).Mozc keymap editor
window popped up, click on:Edit
button menu (at bottom) > clickimport from file...
orexport from file...
. With that you can save (export) your keymap editions. And you can to insert a new keymap edited by importing it.That's all!
References
You may be interested in read this MOZC issue about how to switch between MOZC j-sylabaries. A good answer about MOZC inputs can be found here. A brief about MOZC input at askubuntu. A lot of questions commented about MOZC and input method. Answers to start MOZC in Hiragana mode.