UTF-8 Characters – Best Way to Type Special UTF-8 Characters

inputkeyboardunicodevirtual-interface

Everything on my system (that needs it) supports UTF-8 just fine.
That's all nice when you want output…
But what if you want easy input ?

At the moment the only non-ASCII chars I can easily type are chars like é by using AtlGr.
But for chars like ₂ ² ≈ √ π ? at the moment I have to:

  1. Open a browser
  2. Surf to https://www.utf8icons.com or a similar site
  3. Click, type and search a lot on the site to get to a page that contains the symbol i want
  4. Copy it
  5. Paste it in the program where I need it
  6. (Optionally) close the browser

What I'm looking for is a program that can do something like this:

  • Run in the background in a modern desktop environment (in my case Cinnamon)
  • Jump to the foreground to show a whole list of reasonably popular UTF-8 symbols after pressing something like F1
  • Let me click a symbol after which it will be sent to the program I was last using as if it was a keypress
  • Give me the option to configure it to either stay visible after this "fake keypress" or jump back to background

In short: Are there virtual keyboard programs with support for non-ASCII UTF-8 ?

Actually… I am already happy with any method that improves mine.

Edit: For others ending up here and don't want to read all the answers themselves (or add a answer that's already given):
These are the options already mentioned + links to the answers + pro's and contra's.
Feel free to add extra solutions below (after providing them as detailed answer)
:

  • ibus (usually with CtrlShiftE) → Can't get it to work on Cinnamon
  • onboardpro: Seems to do everything I need + has support for snippets, con: Only (by default) included non-latin layout is for math, other layouts with popular UTF-8 chars have to be created manually
  • gucharmappro: Lots of chars and easy to search con: Doesn't easily jump between foreground/background (can probably be handled with a workaround in Cinnamon itself)
  • kcharselect→ Same pro/con as gucharmap
  • Solutions from the programs themselves (e.g. Ctrl. for a couple of them) → pro: Ideal for that exact program con: Most programs, including the ones where it's needed the most, don't have one + it's not uniform
  • https://www.unicodeit.net/pro: Good for long math formula's. con: Same problem as the one I originally stated + useless for non-math symbols
  • Keyboard with extra symbolspro: Easy con: Small amount of chars + extra keyboard needed for each system
  • Shortcuts for the most used chars with xcomposepro: Easy con: Depending on your memory (as human, not as computer) it only works for a limited amount of chars
  • HTML entities to composepro/con: Too much of each, see answer
  • Use CtrlShiftU, Hexcode,Space: pro/con: Same as above

Best Answer

You could use Onboard Onscreen Keyboard which is available in most distros.

It allows to create a custom layout with the characters you need, e.g.

Onboard Onscreen Keyboard Custom Layout and Settings

In case you don't want to create a new layout it offers a feature called "Snippets" where you have the choice of entering different characters or even text.

Onboard Snippets

In order to show it just create a shortcut in your desktop environment which will simply execute onboard or dbus-send --type=method_call --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Show

In order to hide it create a shortcut for dbus-send --type=method_call --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Hide

Or you could toggle visibility with dbus-send --type=method_call --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible