Score:0

On Ubuntu 22.04 LTS how to set a keyboard layout that matches a Japanese keyboard but inputs English characters?

br flag
msc

I have a Japanese keyboard and am running Ubuntu 22.04.2 LTS (Arm64). I cannot find a matching keyboard layout for typing English. All the English keyboard options I've tried have much of the punctuation in incorrect places for the Japanese keyboard. I tried the "Japanese (Macintosh)" layout but it only inputs the kana characters printed on the key caps.

Windows has a "Japanese (QWERTY)" layout which matches the keyboard and produces English characters. What is the equivalent on Ubuntu?

Note, this question has nothing to do with Japanese input, i.e the IME (mozc). I am suffering there too. mozc is using the layout of the last keyboard selected before mozc so I still can't type the punctuation. I applied the fix suggested in Japanese (Mozc) Wrong Keyboard Layout but it has made no difference.

monkut avatar
in flag
Seems like ubuntu (22.04) strongly links the keyboard layout with the input method. I previously had a US keyboard (laptop) [default?] using Japanese Input, and was able to input Japanese with the US keyboard layout. I recently changed to a laptop with Japanese Keyboard layout, and use an external keyboard with a US keyboard layout. In this configuration I can add the US keyboard layout, but it won't allow me to use the Japanese input (mozc) with the US keyboard layout...
Score:2
br flag
msc

I found the answer. Select the "Japanese" keyboard from the list.

Since "Japanese (Macintosh) did not work, it didn't occur to me before to try "Japanese".

"Japanese (Macintosh) looks to be identical to the "Japanese (Kana)" layout which matches what's on my Windows laptop and also inputs only kana characters.

Score:0
uz flag

Let me address your sub question.

Note, this question has nothing to do with Japanese input, i.e the IME (mozc). I am suffering there too. mozc is using the layout of the last keyboard selected before mozc

The method for setting a specific layout is different in later ibus-mozc versions compared to the solution in the question you linked to. In Ubuntu 22.04 there is the ~/.config/mozc/ibus_config.textproto file where you can replace "default" with something else.

Edit:

This is what the file looks like on my system:

$ cat ~/.config/mozc/ibus_config.textproto
engines {
  name : "mozc-jp"
  longname : "Mozc"
  layout : "default"
}
msc avatar
br flag
msc
I did edit `~/config/mozc/ibus_config.textpro`, changing "default" to "jp". It didn't help. I did log out and in before as is required before I tested. When it didn't work, tried a restart. It didn't work after the restart either.
Gunnar Hjalmarsson avatar
uz flag
@msc: Exactly what do you mean when you say "didn't help". If you select "Show Keyboard Layout" when Japanese (Mozc) is active, which layout is shown?
msc avatar
br flag
msc
I mean it didn't change the behaviour. mozc still uses the layout that was selected before mozc is selected. That layout is what is shown when I select "Show Keyboard Layout" with "mozc" as the active input source.
Gunnar Hjalmarsson avatar
uz flag
@msc: I see. Wonder why, since we are both on 22.04. I edited my answer to show what the file looks like.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.