This answer has tips on how to do it on Gnome or Vim, but these don't work on KDE. This bug shows that KDE don't support the ISO notation with Ctrl+Shift plus the character's hex code. Is there any other way I can do this with a keyboard (that is, without copying and pasting)?
Memorising hexcodes is madness. Use the compose key instead. It lets you combine characters in a mnemonic way. This is a feature of X, not just KDE, thus works everywhere. Some examples:
- Compose, v, C → Č
- Compose, ´, E → É
- Compose, _, u → ū
- Compose, ^, i → î
- Compose, ,, S → Ş
- Compose, +, o → ơ
- Compose, ;, a → ą
- Compose, U, g → ğ
- Compose, ", u → ü
- Compose, °, A → Å
- Compose, ~, N → Ñ
- Compose, +, - → ±
- Compose, ., > → ›
- Compose, ., . → …
- Compose, ., = → •
- Compose, P, ! → ¶
- Compose, !, ^ → ¦
- Compose, !, ! → ¡
- Compose, ?, ? → ¿
- Compose, s, s → ß
- Compose, o, e → œ
- Compose, O, E → Œ
- Compose, a, e → æ
- Compose, A, E → Æ
Each key is typed sequentially without holding down. See the file
/usr/share/X11/locale/en_US.UTF-8/Compose (online, 124 KiB) for the whole list. You can define your own compose sequences in your
~/.XCompose file (example).
Since I do not have a Sun keyboard, I do not have a physical Compose key. I remap the useless Caps Lock key as logical Compose key. Change this in System Settings → Region/Language → Keyboard Layout (kxkb applet) → tab Advanced → section Compose key position, or run the command
setxkbmap -option compose:caps.
Here is the KDE bug on the issue: https://bugs.kde.org/show_bug.cgi?id=103788
I addressed this issue in an article that deals with typing RTL text. Although in most common desktop environments Unicode symbols can be typed by holding the Alt key and pressing the numeric keypad plus sign then the Unicode value in hex, KDE users cannot use this method as KDE relegates responsibility for implementing this feature to Xorg, and Xorg relegates to Qt, and Qt relegates back to Xorg.
Have a look at this article: Unicode Easy Keyboard Layout for XKB
Install ibus-gtk3 (other input method frameworks, and certainly other ibus UIs may provide similar features, but this is what I tested).
This provides a unicode input dialog under the label of "Emoji choice". The default shortcut to bring this up is
You may have been hoping for a dialog-less solution, but it can still be used, efficiently, with the keyboard alone, i.e.
Enter. This method also seems to work across apps of different toolkits, including KDE / Qt apps, Libreoffice, Chromium, Firefox, xterm, etc.
For the editors Kate and Kwrite or Kdevelop, I have found a solution in a blog post: one can type F7, or alternately in the menu "View -> Switch to Command Line", then in the command line, one can type eg
char x2208 and this inserts the character ∈ or U+2208 in the editor window.
There's a systemic bug there. I have 2 workarounds, using xdotool
- install xdotool (
apt install xdotool).
- Create a custom shortcut with the script as action (New > Global Shortcut > Command/URL; Trigger: (your key combo)
Workaround #1 - sleep
sleep command before calling xdotool:
sleep 0.6 xdotool type "¯\\_(ツ)_/¯"
Release the shortcut keys before calling xdotool:
xdotool keyup Super+n xdotool type "¯\\_(ツ)_/¯"
in my case, the script can be called by multiple shortcut keys. So I call
xdotool keyupmultiple time, for each key-combo.
use double quotes. Don't ask me why. Not required for a single key.
Escape the single backslash, i.e.
The reason for the workarounds, is that the key combo is using the meta key. If the meta key is pressed while the unicode code is sent to the current app, then Plasma is sending garbage to the current app / to the window management. With a small delay, it doesn't happen.
xdotool sends it to the currently active window by default.
This is obviously a big, ugly and fragile hack, NOT a rock solid feature. YMMV.
There are numerous KDE bugs around this feature, one of them is about reusing old shortcuts. If it doesn't work immediately, I recommend logout / restart.
Reading the bug data its said GTK2+ windows still allow this resource to be used and I can confirm that using something like "gedit" allowed to use again unicode chars on KDE plasma.
I know this is an old thread but it seems no one mentioned this earlier so decided to leave here my very first update on superuser.
It's not ideal but it helps a ton .. I use both unicode and also the compose key (mapped to my right alt key) but I definitely prefer unicode as it has a huge amount of chars available and easy to use (IMO).