Home » Questions » Computers [ Ask a new question ]

How to type unicode characters in KDE?

How to type unicode characters in KDE?

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)?

Asked by: Guest | Views: 164
Total answers/comments: 3
Guest [Entry]

Have a look at this article: Unicode Easy Keyboard Layout for XKB
Guest [Entry]

"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
Add a sleep command before calling xdotool:
sleep 0.6
xdotool type ""¯\\_(ツ)_/¯""

Woraround #2
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 keyup multiple 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."
Guest [Entry]

"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)."