In windows there is possibility to type from keyboard special signs by holding alt key and typing a few numbers, that depends on with sign you want to use. Does it work with linux in the same way?

link|improve this question

feedback

3 Answers

up vote 6 down vote accepted

You can use Ctrl + Shift + u followed by the code in hex. (You only need to hold down Ctrl and Shift while typing the code)

link|improve this answer
john, do you know what supplies this functionality? i haven't heard of it before. where does it work, on the console? Ubuntu's defaults in GNOME? thx. – quack quixote Oct 23 '09 at 13:37
found a similar source (minus the u, just hold down Ctrl+Shift) for "works in GNOME", and a method for VIM that uses the u but not the Shift. – quack quixote Oct 23 '09 at 13:58
feedback

X uses something called the compose key. By pressing Compose, some key, some key… in sequence, you can input characters. I have my compose key set to Menu; to type a © (copyright symbol), I would use Menu, o, c.

A full list of X compose key combinations can be found online (200 KiB), or locally in /usr/share/X11/locale/en_US.UTF-8/Compose.

In Gnome, the compose key can be set by going to Preferences → Keyboard → Layouts tab → Layout Options → Compose key position.

link|improve this answer
feedback

Inputting Unicode characters in Linux varies. The UTF-8 and Unicode FAQ has a section containing different input methods:

  • Ctrl+Shift+[unicode in hex] is defined in ISO 14755 and implemented by GTK+2, and works in GNOME-Terminal and other applications.
  • Ctrl+V u [unicode in hex] works in VIM.
  • Alt-[numpad digits] is reported to work at the console, assuming your environment is properly configured to expect UTF-8 (via LOCALE or LANG environment variables). I can't find a specific source confirming this, however.

Other methods you could use:

  • Cut-n-paste characters from a small input file containing the characters you want.
  • Use xmodmap to remap keys in X (see the FAQ link above for examples).
link|improve this answer
(I removed the UTF8 tag you added to the question, as that is actually an encoding, which is not used when typing a character.) – Arjan Oct 23 '09 at 14:33
@arjan: fair enough. – quack quixote Oct 23 '09 at 14:56
+1 for including VIM. I was curious how to do this in Intellij with VIM keybindings. – new123456 Feb 18 at 3:35
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.