Kubuntu 22.04日语输入法重音输入及Compose键失效问题咨询
Hey there, let's work through this issue together—since upgrading to Kubuntu 22.04, it's common to run into input method quirks with KDE, especially around Compose keys and multilingual setups like Japanese + accented characters. I'll break this down into actionable steps for both your Compose key fix and sorting out fcitx/ibus/mozc confusion.
First: Fix the Compose Key Not Working
The most likely culprit here is that the upgrade changed how KDE handles input frameworks, so your old Compose key settings got overridden. Let's check and reset this:
If you're using Fcitx5 (Kubuntu 22.04 default)
- Open the Fcitx5 Configuration tool (search for it in your app menu, or run
fcitx5-configtoolin terminal) - Switch to the Global Config tab
- Look for the Compose Key dropdown menu, then select your preferred key (right Alt, Menu key, or another unused key works well)
- Hit apply, then restart Fcitx5 by running
fcitx5 -rin terminal (or log out and back in if that doesn't take effect)
If you're using IBus (less common for Kubuntu 22.04, but possible if you migrated settings)
- Open the IBus settings tool by running
ibus-setupin terminal - Go to the Input Method tab, then click Global Options
- Find the Compose Key setting and pick your desired key
- Alternatively, you can set it via KDE's system settings: go to System Settings > Keyboard > Advanced, then scroll to Compose Key Position and select your key
Second: Setting Up Japanese Input (Mozc) with Accented Characters
Since you're working with a Japanese keyboard layout and need accented characters, here's the most reliable approach:
Stick with Fcitx5 for better compatibility
Fcitx5 plays nicer with KDE's desktop environment than IBus for multilingual setups, so I recommend this route:
- Install Mozc for Fcitx5: run
sudo apt install fcitx5-mozcin terminal - Open Fcitx5 Configuration, click the + button at the bottom
- Uncheck the box that says Only show current language's input methods
- Search for "Mozc" in the list, add it to your input methods
- Use your default input switch shortcut (usually Ctrl+Space) to toggle between your regular keyboard layout (for Compose key accents) and Mozc (for Japanese input)
If you prefer IBus instead
If you already have IBus set up, you can still use Mozc:
- Install IBus Mozc:
sudo apt install ibus-mozc - Open IBus settings, add Mozc the same way as above
- Note: IBus sometimes has conflicts with KDE's native Compose key settings, so if you go this route, make sure to set the Compose key via IBus's settings instead of KDE's system settings
Quick Troubleshooting Tips
- Restart your input framework: Changes won't always take effect immediately—run
fcitx5 -r(for Fcitx5) oribus restart(for IBus) to refresh things - Avoid mixing frameworks: Having both Fcitx5 and IBus installed can cause conflicts. Pick one and uninstall the other (e.g.,
sudo apt remove ibusif you go with Fcitx5) - Check keyboard layout: Sometimes upgrades reset your keyboard layout—double-check in System Settings > Keyboard > Layouts that your Japanese layout is set correctly
备注:内容来源于stack exchange,提问作者Stéphane

