Just noticed this annoying emoji input ("Emoji Choice") popping up every time I press Ctrl+Shift+E in 18.04. I really need this shortcut to switch to the file explorer in Visual Studio Code but instead I only get the emoji input. Is there a way to disable this or at least change the shortcut? Don't want to change the VCS's shortcut because of this, I'm really used to it
5 Answers
Just a small hint: In case you don't find the IBus Preferences dialog, open a Terminal shell and type
ibus-setup
A dialog like this will appear on your screen:
- 119,640
- 511
Turned out it was the new ibus version that included the emoji package, I was able to change the shortcut in the ibus settings.
- 541
For VS Code if installed via Ubuntu Snap you need an input method other than ibus.
If you run VS Code from command line do:
$ GTK_IM_MODULE="xim" code
You can also add an alias for that in .bashrc: alias code='GTK_IM_MODULE="xim" code'
To configure the Dash launcher (assuming VS Code is installed using Snap):
- The launcher file is located at
/var/lib/snapd/desktop/applications/code_code.desktopor~/.local/share/applications/code_code.desktop, or both - Edit it and add
GTK_IM_MODULE="xim"toExeccommands:
[Desktop Entry]
...
Exec=env GTK_IM_MODULE="xim" BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/code_code.desktop /snap/bin/code --force-user-env --no-sandbox --unity-launch %F
...
[Desktop Action new-empty-window]
...
Exec=env GTK_IM_MODULE="xim" BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/code_code.desktop /snap/bin/code --force-user-env --no-sandbox --new-window %F
Icon=/snap/code/41/meta/gui/com.visualstudio.code.png
- 1,241
I was unable to make any fix related to ibus work, but adding
export GTK_IM_MODULE="xim"
to my ~/.profile and restarting seems to have done the trick.
TL;DR
I also ran into this issue while trying to use VSCode Ctrl + . shortcut (and some on Terminator). If you have gsettings just run:
gsettings set org.freedesktop.ibus.panel.emoji hotkey $'[\'<Control><Alt><Shift>e\']'
ibus-restart
Or replace $'[\'<Control><Alt><Shift>e\']' with "@as []" to disable it.
Elaborated
I didn't wanted to tinker too much with VSCode's config files because I have installed it using the .deb, so any changes probably would be lost on updates (I do ignore what could happen with snap pkg updates too), neither wanted to modify my profile config files nor the ibus package/ppa itself, so I went with the mere simple: restart the ibus daemon after changes.
Steps:
As many other answers have pointed out: On terminal, run
ibus-setup(no sudo required), go to Emoji tab and delete/change Emoji annotation (three dots button ...) for whatever key combo (mine was Control + Alt + Shift + E), click Apply, and close.- If you have
gsettings(GNOME, MATE and perhaps KDE), you can also change this directly from terminal withgsettings set org.freedesktop.ibus.panel.emoji hotkey $'[\'<Control><Alt><Shift>e\']', just set it up however you want.
- If you have
You'll notice that the change is not actually applied yet, so next step is to run on terminal
ibus restart(note that doesn't have dash-unlike previous command); this will prompt an alert saying something like "The IBus daemon is not running, enable it?", and click Yes.- After this, it may display another alert with further instructions -changes based on your system- for preventing
ibusto execute on start, if you need it. You can follow them if you want, but just clicking Ok to continue is enough.
- After this, it may display another alert with further instructions -changes based on your system- for preventing
Done. Using this method will allow you to keep changing the keybindings from ibus without need of restarting it on every new change (tested it!), basically it kinda fixes the bug. For me, it also fixed every other conflicting shortcuts in Terminator. I haven't tested if trying to change keybindings again after a reboot/logout will require to repeat both steps, because of the daemon.
That was the easiest way I ended up fixing this on Ubuntu 22.04.1, 24.04 and Mint Xia 22.1 (MATE+Wayland), without changing/exporting anything to my ~./profile, neither install/uninstall/reconfigure ibus again, and after trying with 3 or 4 more methods (such as the ones on this question) that implied changing config files of each individual conflicting app. Also I haven't used other D.E. recently so I'm not sure if this could help over them.
Sources:
- @johannes-metzner answer here
- @pablo-bianchi answer
- @scottkosty answer
- This post on SuperUser
- 1
