"ctrl+space" has been bound to invoke some input method and does not work in Emacs or Eclipse auto-complete

In Emacs run in terminal, ctrl+space is a standard shortcut key to select region. But under Ubuntu 12.04, it will invoke some input method for non-English language. I was wondering if I can reserve it for Emacs only?

Under System Settings -> Keyboard -> Shortcuts, I couldn't find to what ctrl+space has been bound. Strange.

Other programs, especially auto-complete in Eclipse, also seem to have a problem handling ctrl+space.


Solution 1:

It sounds like you have Ibus running, which uses Ctrl + Space by default to enable/disable the input editor.

You can change the shortcut key assigned to it in Ibus Preferences.

enter image description here

If Ibus is running in the menubar, you can right-click to choose Preference from the menu. If Ibus is not running in the menubar, you can start the Preferences dialog from the Dash by running Keyboard Input Methods or from the terminal with ibus-setup.

Update for 14.04

ibus-setup is no longer available for 14.04. Functions from the former ibus-setup are instead integrated into System Settings >> Text Entry.

Input switching is now set by default to Super + Space, but Ibus may still steal focus from the Control + Space keybinding and cause other system problems, most notably the auto-complete in Eclipse.

Integration of Ibus input switching into the new Text Entry settings is still a work in progress, and this is causing the problem since the older setting still exists behind the scenes.

If you have upgraded from 12.04, ibus-settings should still be available.

In 14.04, you can edit the settings directly is dconf-editor.

If it is not installed:

sudo apt install dconf-editor

Then browse to Desktop >> ibus >> general >> hotkey. The trigger and triggers setting will still show 'control+space'. Edit these settings out, being careful to leave empty brackets [] in triggers.

Solution 2:

Disable the IBUS trigger using the commandline:

gsettings set org.freedesktop.ibus.general.hotkey triggers @as []

Or if this does not work try if the first one produces an error:

gsettings set org.freedesktop.ibus.general.hotkey triggers []