How can i input German with my US keyboard?

Du kommst mit der Installation nicht voran oder willst noch was nachfragen? Schau auch in den "Tipps und Tricks"-Bereich.
Antworten
wenheping
Beiträge: 6
Registriert: 05.09.2004 04:10:16

How can i input German with my US keyboard?

Beitrag von wenheping » 05.09.2004 04:24:58

Sorry for i can only write English here.

I have no German keyboard and have only a US keyboard, now i have install Sarge, and i set the language to German and set the locale to German too. But how can i input some special German charactors such as English charactor "o" with two little dot on the top when i use nano or vim to edit my file?

Thanks advance.

Benutzeravatar
Joghurt
Beiträge: 5244
Registriert: 30.01.2003 15:27:31
Wohnort: Hamburg
Kontaktdaten:

Beitrag von Joghurt » 05.09.2004 05:25:42

Well, there are several ways to achieve this, depending on whether you want to use the linux console or an xterm in X:
  • Linux Console
    One possibility is entering "loadkeys de" to load the german keymap, edit the file, and do a "loadkeys us" to re-load the US layout. This, of course, takes some getting used to; but at least the alphabet letters are in the same places as with the US keyboard - except that "y" and "z" are swapped.

    A better possibility (if you do not use emacs, which has a similar feature) is this: re-define the caps-lock key to be the "compose" key. This way, you can get the "ä" by pressing Caps Lock(=Compose), followed by ", followed by a. And if you want to write french you can get ú with Compose ' u and ç with Compose , c

    Do re-map the key do the following:
    (as root, as you need write-permissions to /usr/share)

    Code: Alles auswählen

    # cd /usr/share/keymaps/i386/qwerty
    # cp us.kmap.gz usc.kmap.gz
    # gunzip usc.kmap.gz
    now, in usc.kmap replace "keycode 58 = Caps_Lock" with "keycode 58 = Compose", now you have a new keymap called usc with a compose-key (load it with loadkeys usc)
  • X-Window
    If you are using GNOME, you can set Caps Lock to compose via GUI, under Applications/Desktop-Settings/Keyboard (translated from german, might not be called exactly that), in the last tab you should be able to choose Caps Lock is Compose, and you are done.

    Otherwise, you could write the following in your .xsession

    Code: Alles auswählen

    xmodmap -e 'clear lock'
    xmodmap -e 'keycode 66 = Multi_key'
    (or enter it by hand each time you need it)
HTH

(You can get the Es-Zett (ß) with compose s s)

PS: Under Emacs, you can simulate the compose-method by pressing C-x 8.
e.g. C-x 8 " u ==> ü

PPS: The "two little dots" are called "umlauts" ( = Umlaute in german. In Germany, the äöü are also called umlaute)

PPPS: If the umlauts are not available, it is possible to replace them by writing the letter without umlauts followed by an e (e.g. ä=>ae), the ß is written ss (If (and only if) this would lead to an ambigous wording, it can be written as sz; the only example I know of is "in Massen (=galore)" contrary to "in Maßen (=in moderation)")

Antworten