You are not logged in.

#1 2010-06-22 12:43:48

framas
Member
Registered: 2009-07-24
Posts: 50

German keyboard layout in X like german "de" console keymap

Hi there,

I think this is mostly a question for german archers using a german keymap...

The console keymap in

/usr/share/kbd/keymaps/i386/qwertz/de.map.gz

maps the german umlaut keys to symbols like on the us keyboard layout (braces and brackets for example).

Does the same keymap exists for Xorg, too? Currently I haven' found one.

Regards Frank

Last edited by framas (2010-06-22 20:17:30)

Offline

#2 2010-06-22 14:18:21

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: German keyboard layout in X like german "de" console keymap

I'm not entirely certain if this is what you're looking for, but in Xorg 1.8, you can change the keymap like this (change in bold):
/etc/X11/xorg.conf.d/10-evdev.conf

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option                 "XkbLayout" "de"
        Option  "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

This will map the keyboard layout to de regardless of the physical keyboard layout, and works in the newest version of xorg that uses udev for input hotplugging.  If you're still on the previous version of Xorg that uses hal and fdi policies, a similar change can be made in the evdev configuration file (in the HAL wiki entry I believe).

Hope that answers your question,
Lswest


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#3 2010-06-22 15:09:13

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: German keyboard layout in X like german "de" console keymap

In fact you shouldn't change "/etc/X11/xorg.conf.d/10-evdev.conf" because this file will most probably be replaced whith the next xorg update. Just put your changed settings in the usual "/etc/X11/xorg.conf". The settings there take precedence.

Also, there appears to be no need to use evdev in many cases. At least this InputClass definition (in xorg.conf) works fine here:

Section "InputClass"
    Identifier      "Keyboard Defaults"
    MatchIsKeyboard "yes"
    Option          "XkbModel" "pc105"
    Option          "XkbLayout" "de"
EndSection

To know or not to know ...
... the questions remain forever.

Offline

#4 2010-06-22 15:14:00

Ogion
Member
From: Germany
Registered: 2007-12-11
Posts: 367

Re: German keyboard layout in X like german "de" console keymap

I just have this in my .xinitrc:

setxkbmap de

Ogion


(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant

Offline

#5 2010-06-22 16:01:11

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: German keyboard layout in X like german "de" console keymap

bernarcher wrote:

In fact you shouldn't change "/etc/X11/xorg.conf.d/10-evdev.conf" because this file will most probably be replaced whith the next xorg update. Just put your changed settings in the usual "/etc/X11/xorg.conf". The settings there take precedence.

Also, there appears to be no need to use evdev in many cases. At least this InputClass definition (in xorg.conf) works fine here:

You're right, but I don't use an xorg.conf (don't think one was created after the 1.8 install either), and I was aiming to just have the right layout using the defaults provided with the update.


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#6 2010-06-22 20:11:06

framas
Member
Registered: 2009-07-24
Posts: 50

Re: German keyboard layout in X like german "de" console keymap

Hi there,

thanks for your answers.

The xkblayout de maps the fully german keymap, so the german umlaut keys are  mapped to the umlauts (as they should).
The keymap on the console which I mentioned,  translates the keys ü,ä to [] and Ö,Ä to {} and ü,Ü to @,\ and ß to \.

You can test it when you enter on the konsole

loadkeys de

the xkblayout de is the same as the de_de keymap

loadkeys de_de

My idea was to use the keymap as described above  for programming and configure a key to toggle to the normal de xkblayout for writing email and other stuff.

So my question is: Does a keymap like the "de" console  kbd keymap exits for xkb as a layout, variant or whatever.

The german linux magazin has also published an artice about in the year 2003 (see the link below).
I tried this out but I could'nt get it to work. I admit, that I'm not very familiar in writing xmodmaps so I tried this by copy / paste.

http://www.linux-magazin.de/Heft-Abo/Au … eundschaft

I also think such a keymap already exists in X but I unfortunatelly haven't found it...

So again, thanks for any suggestions..

Cheers  Frank

Offline

#7 2010-06-23 09:52:09

Andrwe
Member
From: Leipzig/Germany
Registered: 2009-06-17
Posts: 322
Website

Re: German keyboard layout in X like german "de" console keymap

To change keyboard layout using a key have a look into the wiki:
http://wiki.archlinux.org/index.php/Xorg

Section keyboard settings.
There you'll find an example for changing layout.
I also suggest that you have a look into /usr/share/X11/xkb/rules/xorg.lst because there are many many possible settings you can set up.
I've e.g. modified caps lock to be escape.

Offline

#8 2010-06-24 19:52:27

framas
Member
Registered: 2009-07-24
Posts: 50

Re: German keyboard layout in X like german "de" console keymap

At least I read some howtos and manuals and wrote this keymap on my own...

Here is the result:

I created two files in

/usr/share/X11/xkb/symbols

The first  I named de_us

default partial 
xkb_symbols "basic" {
    include "de(basic)"
    include "de_us_diff"
    name[Group1]="Germany with us mapping of the umlaut keys";
};

xkb_symbols "nodeadkeys" {
    include "de(nodeadkeys)"
    include "de_us_diff"
};

and the second  I named de_us_diff

default partial 
xkb_symbols "basic" {
    key <AD11> {    [  at,             backslash,     udiaeresis, Udiaeresis ] };
    key <AC10> {    [  bracketleft,        braceleft,     odiaeresis, Odiaeresis ] };
    key <AC11> {    [  bracketright,    braceright,     adiaeresis, Adiaeresis ] };
    key <AE11> {    [  backslash,        question,     ssharp ]    };
};

my  10-input.conf looks like

Section "InputClass"
        Identifier "Keyboard Defaults"
        MatchIsKeyboard        "yes"
        Option "XkbOptions" "grp:caps_toggle"
        Option  "XkbLayout" "de, de_us"
        Option "XkbOptions" "nodeadkeys"
        Option  "XkbOptions" "terminate:ctrl_alt_bksp" 
EndSection

I can toogle my keyboard from de to my mapping with the caps lock key.
The german umlaut keys and Sharp S are accessible with AltGr .
Maybe it would be  more cosmetic to merge this 2 files into one but this solution works for me.

Last edited by framas (2010-06-24 21:00:05)

Offline

Board footer

Powered by FluxBB