# German umlauts in X



## eyebone (Dec 18, 2011)

Hello community,

I try to get German umlauts running on my FreeBSD machine. I have found tips like here:

http://de.answers.yahoo.com/question/index?qid=20060926041754AAVx4W3

To do this via the Alt Key. But this is not working. My current configuration in .cshrc is 
	
	



```
setenv LANG=en_GB-UTF-8
```
 and I use in my /etc/login.conf

```
:charset=UTF-8:\
:lang=en_GB.UTF-8:
```

I do not want to miss the English keyboard setup, but I need the umlauts as well. How can I use them?

Best regards,
eyebone


----------



## jrm@ (Dec 18, 2011)

I never need a semicolon with a non-whitespace character after it, so I make that key dead_horn and use it to compose accents.  When you want a semi-colon hit the key twice or hit it followed by spacebar or enter.  To get this functionality:

~/.Xmodmap

```
keycode 47 = dead_horn colon
```

/.XCompose (my additions/modifications to UTF-8 (Unicode) compose sequence by David.Monniaux@ens.fr)

```
<dead_horn> <space> : "; "
<dead_horn> <Return> : ";\n"
<dead_horn> <dead_horn> : ";"

# accents

# acute
<dead_horn> <a> <e> : "Ã©"
<dead_horn> <a> <E> : "Ã‰"

# cedilla
<dead_horn> <d> : "Ã§"
<dead_horn> <D> : "Ã‡"

# circumflex
<dead_horn> <c> <a> : "Ã¢"
<dead_horn> <c> <A> : "Ã‚"
<dead_horn> <c> <e> : "Ãª"
<dead_horn> <c> <E> : "ÃŠ"
<dead_horn> <c> <i> : "Ã®"
<dead_horn> <c> <I> : "ÃŽ"
<dead_horn> <c> <o> : "Ã´"
<dead_horn> <c> <O> : "Ã”"
<dead_horn> <c> <u> : "Ã»"
<dead_horn> <c> <U> : "Ã›"

# grave
<dead_horn> <g> <a> : "Ã "
<dead_horn> <g> <A> : "Ã€"
<dead_horn> <g> <e> : "Ã¨"
<dead_horn> <g> <E> : "Ãˆ"
<dead_horn> <g> <u> : "Ã¹"
<dead_horn> <g> <U> : "Ã™"

#
<dead_horn> <s> : "ÃŸ"

# diaeresis (trÃ©ma, Ã¼mlaut)
<dead_horn> <t> <a> : "Ã¤"
<dead_horn> <t> <A> : "Ã„"
<dead_horn> <t> <e> : "Ã«"
<dead_horn> <t> <E> : "Ã‹"
<dead_horn> <t> <i> : "Ã¯"
<dead_horn> <t> <I> : "Ã"
<dead_horn> <t> <o> : "Ã¶"
<dead_horn> <t> <O> : "Ã–"
<dead_horn> <t> <u> : "Ã¼"
<dead_horn> <t> <U> : "Ãœ"

# currency
<dead_horn> <u> <1> : "Â¢"
<dead_horn> <u> <2> : "â‚¬"
<dead_horn> <u> <3> : "Â£"
<dead_horn> <u> <4> : "Â¥"

# math / science symbols

<dead_horn> <minus> : "Ã·"
<dead_horn> <equal> : "Ã—"
<dead_horn> <underscore> : "Â±"
<dead_horn> <8> : "â€¢"
<dead_horn> <0> : "Â°"
<dead_horn> <5> : "â€°"
<dead_horn> <p> : "Â¶"
```


----------



## chris1381 (Dec 19, 2011)

For Xorg, I wrote myself this extension for the us keymap to get access to German umlauts and other special characters:


```
// Layout file for programmers in Germany typing on US keyboards.
// German Umlauts and the Eszett are available on <rAlt>+<a>, <rAlt>+<o>,
// <rAlt>+<u> and <rAlt>+<s>. All deadkeys are on the rAlt layer, no
// deadkeys for symbols used on the shell or in programming languages.

partial alphanumeric_keys
xkb_symbols "dev-de" {
  name[Group1]= "USA - German developers";
  include "us(basic)"
  include "ctrl(nocaps)"

  key <TLDE> { [      grave, asciitilde,    dead_grave,       dead_tilde        ] };
  key <AE01> { [          1, exclam,        onesuperior,      exclamdown        ] };
  key <AE02> { [          2, at,            twosuperior,      twosuperior       ] };
  key <AE03> { [          3, numbersign,    threesuperior,    paragraph	        ] };
  key <AE05> { [          5, percent,       EuroSign                            ] };
  key <AE06> { [          6, asciicircum,   dead_circumflex,  onequarter        ] };
  key <AE07> { [          7, ampersand,     dead_horn,        onehalf           ] };
  key <AE08> { [          8, asterisk,      degree,           threequarters     ] };
  key <AE09> { [          9, parenleft,   leftsinglequotemark,  dead_breve      ] };
  key <AE10> { [          0, parenright,  rightsinglequotemark, dead_abovering  ] };
  key <AE11> { [      minus, underscore,    dead_macron,      dead_belowdot     ] };
  key <AE12> { [      equal, plus,          dead_doubleacute, dead_horn         ] };

  key <AD03> { [          e, E,             EuroSign,         cent              ] };
  key <AD07> { [          u, U,             udiaeresis,       Udiaeresis        ] };
  key <AD09> { [          o, O,             odiaeresis,       Odiaeresis        ] };

  key <AC01> { [          a, A,             adiaeresis,       Adiaeresis        ] };
  key <AC02> { [          s, S,             ssharp,           S                 ] };
  key <AC10> { [  semicolon, colon,         dead_ogonek,      dead_diaeresis    ] };
  key <AC11> { [ apostrophe, quotedbl,      dead_acute,       dead_diaeresis    ] };

  key <AB01> { [          z, Z,             ae,               AE                ] };
  key <AB02> { [          x, X,             oe,               OE                ] };
  key <AB07> { [          m, M,             mu,               mu                ] };
  key <AB08> { [      comma, less,          dead_cedilla,     dead_caron        ] };
  key <AB09> { [     period, greater,       dead_abovedot,    dead_circumflex   ] };
  key <AB10> { [      slash, question,      dead_hook,        U2E2E             ] };

  include "level3(ralt_switch)"
};
```

Add this at the end of the file /usr/share/X11/xkb/symbols/us (please make a backup copy first).

To activate while X is running, type this in an xterm:
`$ setxkbmap us dev-de`

If this fits your needs, either put the above command in your .xinitrc or make it default for all users by modifying /etc/X11/xorg.conf.


----------



## Nukama (Dec 20, 2011)

I'm switching between layouts with my unused windows key.

My ~/.xinitrc looks like this:

```
[pman]setxkbmap[/pman] -model pc105 -layout de,us -variant latin9 -option grp:lwin_toggle
```


----------

