You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 16.04 LTS中Compose键设置无效问题求助

Fixing Unresponsive Compose Key on Ubuntu 16.04 LTS

Hey there, let's work through this Compose key issue together—those small desktop quirks can be frustrating, but we’ve got a few solid angles to try:

1. Verify and Correct gsettings Configuration

You mentioned needing to specify a path for gsettings, which makes total sense for Ubuntu 16.04’s Unity desktop. The Compose key settings live under the org.gnome.desktop.input-sources schema, specifically in the xkb-options key.

First, check your current XKB options with this command:

gsettings get org.gnome.desktop.input-sources xkb-options

If the output doesn’t include a compose:* entry (like compose:caps for Caps Lock, compose:rctrl for Right Ctrl, or compose:menu for the Menu key), that’s probably why your setting isn’t taking effect. The Keyboard app might be saving the UI state, but not updating the actual XKB configuration under the hood.

To manually set it (replace compose:caps with your preferred key):

gsettings set org.gnome.desktop.input-sources xkb-options "['compose:caps']"

Log out and back in, then test the Compose key—try pressing it followed by + and = to see if you get ±.

2. Check for Conflicting Xmodmap Configs

If you’ve ever used Xmodmap to tweak keybindings in the past, old config files could be overriding your Compose key setting.

Temporarily rename any existing Xmodmap files to rule this out:

mv ~/.Xmodmap ~/.Xmodmap.bak
sudo mv /etc/X11/Xmodmap /etc/X11/Xmodmap.bak

Log out and test again. If this fixes the issue, you can adjust your Xmodmap file to include the Compose key rule instead of relying on the Keyboard app.

3. Restart the Unity Settings Daemon

Sometimes the Unity settings daemon fails to pick up new keyboard config changes. Restart it with:

killall unity-settings-daemon

It will automatically restart in the background. Wait a few seconds, then test your Compose key without logging out.

4. Global System Configuration (Fallback)

If the above methods don’t stick, try setting the Compose key globally via the system keyboard config file:

  1. Open /etc/default/keyboard in a text editor with sudo:
sudo nano /etc/default/keyboard
  1. Find the XKBOPTIONS line and modify it to include your preferred Compose key. For example:
XKBOPTIONS="compose:caps"
  1. Save the file, then run:
sudo dpkg-reconfigure keyboard-configuration
  1. Restart your system—this setting will apply globally and persist through logins.

The reason you need to specify a path for gsettings is that Ubuntu 16.04’s Unity desktop ties keyboard layout settings to the org.gnome.desktop.input-sources schema, which isn’t the default context for gsettings. The core issue here is likely that the Keyboard app isn’t properly syncing its UI settings to the underlying XKB options, so manually updating the gsettings or system config should resolve it.

内容的提问来源于stack exchange,提问作者Jonathan A. Gross

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:04:43