Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 569454

Summary: No "Insert Emoji" context menu option for editors
Product: [Eclipse Project] Platform Reporter: Mat Booth <mat.booth>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, loskutov, mistria, sdamrong
Version: 4.18   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=569455
https://bugs.eclipse.org/bugs/show_bug.cgi?id=569456
Whiteboard:

Description Mat Booth CLA 2020-12-04 05:04:36 EST
When you right click any text input widget, you get an "Insert emoji" option, except for in the editor.

The editor is the largest (by screen area) and arguably the most important text input widget that Eclipse has, but I can't insert emoji there.
Comment 1 Andrey Loskutov CLA 2020-12-04 05:18:07 EST
-2 from me.

If you wisch, you can contribute this to any editor in a plugin, but this is not what SWT should ever do.

"Insert emoji" is added by Gnome *unconditionally* to each and every text field without a possibility to disable that at all.

It is a PITA for every serious application on Linux because NO ONE understands that a text field that should specify for example scientific/engineering data allows to insert emoji (!?!) and there is no way to remove the menu (!?!?!?!).

This is the worst UI feature I've ever seen, and this is Gnome specific.

See also https://stackoverflow.com/questions/59576708/swt-text-remove-default-context-menu-item-in-linux

We have RH bug case running to get this crap *conditionally* removed like in this patch: 
https://github.com/krumelmonster/gtk3-mushrooms/blob/master/other__hide-insert-emoji.patch

The orignal code is here:
https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gtk/gtktextview.c#L8532

The crap seem to be added in this commit: https://gitlab.gnome.org/GNOME/gtk/-/commit/037e205da0f4162ddb519add91c9c14cc206e40b
Comment 2 Mickael Istria CLA 2020-12-04 05:33:19 EST
While I'm an emoji aficionado, I can agree with Andrey that the context-menu is too much.
For this, I'd expect a better OS integrated approach. For example, using the screen keyboard of the OS, or some OS specific shortcut (Gnome actually lists emoji when using the general search menu, but doesn't insert them upon selection).
At this point, I didn't manage to get the on-screen keyboard working with SWT in text fields and editor. It seems like a bug, and fixing it could be one good way of getting a bit more support for emojis in editor.
Comment 3 Mickael Istria CLA 2020-12-04 05:44:23 EST
Bug 569456 could be fixed and would enable less intrusive yet efficient and native support for emoji insertion
Bug 569455 should be fixed (for other reasons) and would improve the story of inserting emojis in some cases.
Comment 4 Mat Booth CLA 2020-12-04 06:43:56 EST
Getting support for the gnome onscreen keyboard would be perfect actually