10

In previous versions of Ubuntu, one could press Ctrl-Shift-E in any text input area to activate the “Emoji Choice” popup – see, for example, these answers to “What does [Ctrl] + [Shift] + [e] do, while typing text?” or “How to insert an emoji into a text in Ubuntu 18.04 and later?”. This has several advantages over the “Insert Emoji” (Ctrl-.) method available e. g. in gedit, the main ones being

  • It works with any text input area, not just specific programs like gedit.
  • It not only allows searching and choosing emoji, but any Unicode character.

However, when I try pressing Ctrl-Shift-E in Ubuntu 20.10 (e. g. in gedit or Firefox), nothing happens. I still see the shortcut showing up when running ibus-setup:

ibus-setup window

and in the dconf editor:

dconf-editor window

Was the keyboard shortcut for the “Emoji Choice” popup removed? And how can I get it working again?

Socob
  • 839
  • 1
  • 9
  • 18

4 Answers4

6

Simple solution inspired by @gunnar-hjalmarsson's answer that doesn't requires restarting the session:

Open a terminal (Ctrl+Shift+T), then paste this:

gsettings set org.gnome.desktop.interface gtk-im-module ibus

Now Ctrl+Shift+E, Space works. :)

muru
  • 197,895
  • 55
  • 485
  • 740
5

I found these earlier answers:

As described there, and taking into account the comment by Gunnar Hjalmarsson, adding the following line to ~/.profile brought back the “Emoji Choice” input:

export GTK_IM_MODULE=ibus
Socob
  • 839
  • 1
  • 9
  • 18
  • 1
    Well, export GTK_IM_MODULE=ibus should be sufficient. The other stuff is handled by GNOME. – Gunnar Hjalmarsson Nov 17 '20 at 17:34
  • @GunnarHjalmarsson Thanks, that also worked! I updated the answer. – Socob Nov 18 '20 at 17:54
  • 1
    Some info about the relevant change: https://discourse.ubuntu.com/t/ibus-no-more-gtk-im-module-ibus/17727 – Gunnar Hjalmarsson Nov 18 '20 at 18:58
  • @GunnarHjalmarsson Ah, that’s very interesting! Just to make sure I’m understanding this correctly: Was the intention of the change really to have ibus in the off state in some cases (like in my example)? If so, (1) the loss of Ctrl-Shift-E seems like a clear regression caused by this change, and (2) since this basically causes a huge amount of people to run with ibus off (those running without input sources requiring ibus, such as QWERTY keyboard inputs), isn’t that just the reason for seeing fewer crashes right there? I.e. reducing the number of users instead of crashes? – Socob Nov 19 '20 at 15:56
  • Yes, it can be considered a regression. As regards your theory, I have no firm opinion. It's a bit more complex: 1. Besides not setting GTK_IM_MODULE by default on Ubuntu, the command for launching ibus-daemon is a little different when done by GNOME compared what im-config does. Since both those things were changed, the causality isn't crystal clear. Also, setting GTK_IM_MODULE=ibus causes some things to not work as expected (the latter is especially true in Wayland sessions). – Gunnar Hjalmarsson Nov 19 '20 at 17:41
  • 1
    You may want to read this upstream issue and the last part of another upstream issue starting here. – Gunnar Hjalmarsson Nov 19 '20 at 17:57
3

This may be because GNOME has put IBus in the off state, sort of, since you don't have any input sources which require IBus.

$ gsettings get org.gnome.desktop.interface gtk-im-module
'gtk-im-context-simple'

A workaround to make Ctrl+Shift+E work is to:

  • install some IBus input method, for instance:

    sudo apt install ibus-libpinyin
    
  • re-login

  • Open Settings -> Region & Language and add "Intelligent Pinyin" to your list of input sources (even if you have no intention to input Chinese)

Then you'll see that the gtk-im-module dconf value has changed:

$ gsettings get org.gnome.desktop.interface gtk-im-module
'ibus'

and that Ctrl+Shift+E works as expected.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94
  • Thanks – in the meantime, I already found another answer, so I didn’t test your approach, but considering that the other solution involves manually starting ibus, what you’re saying makes a lot of sense as well. – Socob Nov 17 '20 at 16:53
  • Thanks to your answer I found a solution that doesn't require rebooting/restarting the current session: gsettings set org.gnome.desktop.interface gtk-im-module ibus. :D – Yann Dìnendal Jan 25 '21 at 10:49
  • 1
    @YannDìnendal: Right, but that way is fragile and GNOME may change it back behind the scenes later. – Gunnar Hjalmarsson Jan 25 '21 at 12:38
  • Oh ok, and I lose it after a reboot. ^^; Then I shall do both: yours for a more permanent solution; and my hack to have it right away. ^_^ Thanks! – Yann Dìnendal Feb 05 '21 at 15:38
  • 2
    @YannDìnendal: If you don't need one of the Asian input methods, one tip is to install and add ibus-typing-booster instead. That's an interesting ibus plugin which you may find useful (it also has its own tool for emojis, btw). More about it here. – Gunnar Hjalmarsson Feb 05 '21 at 16:32
2

While Yann's solution work at runtime, whenever your gnome session is restared, it is reset to whether you need ibus or not based on your input sources. See source.

To override this value for good, you can set this:

gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/IMModule': <'ibus'>}"

This will override whatever value is set for org.gnome.desktop.interface gtk-im-module. Source