Linux – How to type unicode characters in KDE

input-devicekdekeyboardlinuxunicode

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

Best Answer

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.

Related Question