The thing you're looking for is called an Input Method Editor. The only one I've ever used on Linux is Fcitx which I really liked. I haven't used it in a few years though.
Linux
A community for everything relating to the linux operating system
Also check out [email protected]
Original icon base courtesy of [email protected] and The GIMP
Install Mozc Japanese instead and then learn the keyboard shortcuts to toggle between english and japanese, and the F keys to toggle between english(direct input), hiragana, katakana with width variations. You can edit the shortcuts in settings if you like.
I use mozc in android and linux.
https://github.com/google/mozc Search the web or watch youtube videos for guides if you need help installing.
Yeah I tried that this weekend and it messed up my keyboard layout switcher.
I'll need to look at videos like you suggested.
When I switch from English (US) to Japanese (Mozc), the default option is "Direct input" meaning my US keyboard layout. Im sure if I check in settings I could change the default.
I have a dropdown menu on my Desktop Dock for Input mode. I have to change it over to Hiragana to start (I haven't figured out the keyboard shortcut yet for that step).
So I hit Super + Space to switch to Japanese Mozc Then I use my mouse to change from "Direct Input" to "Hiragana"
Not sure if that's where you were having issues, but yeah there's probably some youtube guides that'll help.
Edit:this guide here helped me. I had to set shortcuts for the muhenkan, henkan, and eisu keys, but now I don't need to use my mouse anymore to swtich.