Legacy web pages of Axel Beckert

Since I'm no more active at the Fachschaftsrat Informatik of the University of Saarland anymore, I have transferred all my university time legacy web pages from http://fsinfo.cs.uni-sb.de/~abe/ to this interim host at http://fsinfo.noone.org/~abe/ with only minimal modifications, mainly e-mail addresses.

Most pages on this interim host won't be updated anymore until they are moved (and redirected) step by step to their future home somewhere under http://noone.org/.

Please also note that my former e-mail address abe@fsinfo.cs.uni-sb.de is no more valid. Use abe@deuxchevaux.org instead.

Axel Beckert, Zürich, 23rd of September 2007


Because I ofter get asked, how I type umlauts so easily although I mainly use keyboards with US-English layout, I decided to set up this little page. (This piece of information first appeared at "Introducing the Dvorak Keyboard: Non-English Layouts" as my reply on a request mentioned on that page.)


How to Type Special Characters and Umlauts under X


How to...

Most computers with X (usually X11R6 :-), I work on have US-english layout and therefore no keys for most special characters. On all those machines I can type those 8-bit special characters by pressing (and holding down) Meta (sometimes also Alt) and then pressing the character which would result if I strip of the eighth bit of the special character, I'd like to type. This seems to work on every 8-bit-capable tty (or application), if passing 8-bit character is enabled (mostly via the "stty" command with parameter "pass8").

Yes, I know, it is completely weird to type umlauts that way, but it works even if you're not able to configure the compose key in your X environment. (And I also know, that I'm not the only one who types his umlauts like this... Greetings to Roquas, who recently admitted, that he started typing umlauts that way, too. ;-)

Example

ä is M-d* because ä has value 228 and d has value 100. For luck Ä ist M-D... :-)

Escaping

Those keybindings aren't very ergonomical and you often need to type some escape character first because of your application using the Meta key for some commands, e.g. in Emacs (under X) and some other emacs-like editors you have to escape with C-q* before typing a special character. And in bash, csh and tcsh need a C-v for the same purpose.

But in the case of running in an terminal emulator like xterm, Emacs usually needs no escaping because the character is passed to emacs as a single character. And this also counts for most emacs-like console-only editors, e.g. MicroEmacs, zile, jove and jed.

Vi and all vi-like editors (like e.g. vim and elvis) of course need no escpaing in the input mode. Pico and joe also don't need escaping, although joe doesn't always display the umlauts but sometimes displays the typed key inverse. (Other editors and some shells may display a backslash and the character code in octal, if they aren't able to display the character.)

Common Characters

Here is a list of the most common special characters I use and also type fluently.

ä - M-d
Ä - M-D
ë - M-k
Ë - M-K
ï - M-o
Ï - M-O
ö - M-v
Ö - M-V
ü - M-| (*argh*, I've to use shift for the non-capitals and vice versa)
Ü - M-\ (dito.)
ß - M-_ (dito.)
é - M-i
É - M-I
è - M-h
È - M-H
à = M-`
À = M-@

Script for generating all combinations

The following little piece of PERL code gives you the whole list:

for ($i = 32; $i < 128; $i++) {
  printf("%c = M-%c (values %d and %d)\n", ($i+128, $i) x 2);
}

It can be invoked by typing (or better: cut & paste) the following code into you command line:

perl -e'for($i=32;$i<128;$i++){printf("%c = M-%c (values %d and %d)\n",($i+128,$i)x2)}'

(Of course, binary OR-ing ("|") or binary XOR-ing ("^") instead of adding ("+") 128 would also work. ;-)

Where it does not work...

... at least not out of the box. See implementations below.

Actually I only noticed that I haven't any graphical web browser, which does accept 8bit characters that way, probably because they're all (Netscape Navigator 3.x, 4.x and 6.x, Mozilla, Galeon, Opera 5.x, Konqueror 2.x.y) lacking some escape character...
There you really need some kind of compose key to generate umlauts etc. You really want to use XKeyCaps for configuring them and for generating the appropriate xmodmap configuration files.

It also doesn't work on Linux or FreeBSD consoles, but with the wscons console driver of NetBSD, MirBSD and OpenBSD. (Thanks to Thorsten Glaser for this information.)

From where do I know this?

I haven't done any RTFM on this, I just use it all the time. So I can't be sure, that it works everywhere, especially with other encodings then ISO-Latin-1... :-)

Implementations

Thorsten Glaser from MirBSD has implemented this way of input as an charset independent (i.e. also works with UTF-8) keyboard layout for X (as Xmodmap) and for Windows (EXE file for NT4, 2000, XP, 2003 and Vista). It works with any application including web browsers like Mozilla or Opera.

Footnotes

*
M-x and C-x are (at least in the emacs world usual :-) abbreviations for Meta-x and Ctrl-x and mean to hold the Meta resp. Ctrl key down and then press x.

Copyright © 2001 - 2024 by Axel Beckert (abe@deuxchevaux.org)
Last modification:
Requests since 15-Jun-2001: