Alt Gr Problem with German Keyboards and XFree86

Forum: User Feedback
Topic: Alt Gr Problem with German Keyboards and XFree86
started by: Knusper

Posted by Knusper on July 07 2005,02:17
Okay, first It took me several hours to figure this out... Assuming you have a german keyboard, you may have noticed that the @ key will not work in firefox, even just after you have booted into the default DSL Setup, without XFree86... This IS NOT a problem of the firefox browser, although some guys in this forum thought.

Open a terminal and type the following two lines:

Code Sample

xmodmap -e "remove mod4 = Mode_switch"
xmodmap -e "add mod5 = Mode_switch"

Now you will notice that the @ Key works in Firefox... thanks for this tip to the forum member jls legalize

Ok, now for the more difficult part (just kidding, it is easy for you, was difficult for me). When you install XFree86 via MyDSL and configure it so that it works, you will notice that the Alt Gr Key is not working anymore... Assuming You have a German Windows Keyboard create a file in your home directory called .xmodmap-box

Copy & Paste this into the file (use a editor of your choice):
Code Sample

keycode 0x09 =  Escape
keycode 0x43 =  F1              F11
keycode 0x44 =  F2              F12
keycode 0x45 =  F3              F13
keycode 0x46 =  F4              F14
keycode 0x47 =  F5              F15
keycode 0x48 =  F6              F16
keycode 0x49 =  F7              F17
keycode 0x4A =  F8              F18
keycode 0x4B =  F9              F19
keycode 0x4C =  F10             F20
keycode 0x5F =  F11
keycode 0x60 =  F12
keycode 0x6F =  Print
keycode 0x4E =  Mode_switch     0x1007FF01
keycode 0x6E =  Pause
keycode 0x31 =  asciicircum     degree
keycode 0x0A =  1               exclam
keycode 0x0B =  2               quotedbl        twosuperior
keycode 0x0C =  3               section         threesuperior
keycode 0x0D =  4               dollar
keycode 0x0E =  5               percent
keycode 0x0F =  6               ampersand
keycode 0x10 =  7               slash           braceleft
keycode 0x11 =  8               parenleft       bracketleft
keycode 0x12 =  9               parenright      bracketright
keycode 0x13 =  0               equal           braceright
keycode 0x14 =  ssharp          question        backslash
keycode 0x15 =  apostrophe      grave
keycode 0x16 =  BackSpace
keycode 0x6A =  Insert
keycode 0x61 =  Home
keycode 0x63 =  Prior
keycode 0x4D =  Num_Lock
keycode 0x70 =  KP_Divide
keycode 0x3F =  KP_Multiply
keycode 0x52 =  KP_Subtract
keycode 0x17 =  Tab
keycode 0x18 =  q               Q               at
keycode 0x19 =  w               W               w
keycode 0x1A =  e               E               e
keycode 0x1B =  r               R               r
keycode 0x1C =  t               T               t
keycode 0x1D =  z               Z               z
keycode 0x1E =  u               U               u
keycode 0x1F =  i               I               i
keycode 0x20 =  o               O               o
keycode 0x21 =  p               P               p
keycode 0x22 =  udiaeresis      Udiaeresis
keycode 0x23 =  plus            asterisk        asciitilde
keycode 0x24 =  Return
keycode 0x6B =  Delete
keycode 0x67 =  End
keycode 0x69 =  Next
keycode 0x4F =  KP_7
keycode 0x50 =  KP_8
keycode 0x51 =  KP_9
keycode 0x56 =  KP_Add
keycode 0x42 =  Caps_Lock
keycode 0x26 =  a               A               a
keycode 0x27 =  s               S               s
keycode 0x28 =  d               D               d
keycode 0x29 =  f               F               f
keycode 0x2A =  g               G               g
keycode 0x2B =  h               H               h
keycode 0x2C =  j               J               j
keycode 0x2D =  k               K               k
keycode 0x2E =  l               L               l
keycode 0x2F =  odiaeresis      Odiaeresis
keycode 0x30 =  adiaeresis      Adiaeresis
keycode 0x33 =  numbersign      apostrophe
keycode 0x53 =  KP_4
keycode 0x54 =  KP_5
keycode 0x55 =  KP_6
keycode 0x32 =  Shift_L
keycode 0x5E =  less            greater         bar
keycode 0x34 =  y               Y               y
keycode 0x35 =  x               X               x
keycode 0x36 =  c               C               c
keycode 0x37 =  v               V               v
keycode 0x38 =  b               B               b
keycode 0x39 =  n               N               n
keycode 0x3A =  m               M               mu
keycode 0x3B =  comma           semicolon
keycode 0x3C =  period          colon
keycode 0x3D =  minus           underscore
keycode 0x3E =  Shift_R
keycode 0x62 =  Up
keycode 0x57 =  KP_1
keycode 0x58 =  KP_2
keycode 0x59 =  KP_3
keycode 0x6C =  KP_Enter
keycode 0x25 =  Control_L
keycode 0x73 =  NoSymbol
keycode 0x40 =  Alt_L           Meta_L
keycode 0x41 =  space
keycode 0x71 =  Mode_switch
keycode 0x74 =  NoSymbol
keycode 0x75 =  NoSymbol
keycode 0x6D =  Multi_key
keycode 0x64 =  Left
keycode 0x68 =  Down
keycode 0x66 =  Right
keycode 0x5A =  KP_0
keycode 0x5B =  KP_Separator

clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5

add    Shift   = Shift_L Shift_R
add    Lock    = Caps_Lock
add    Control = Control_L
add    Mod1    = Alt_L
add    Mod2    = Num_Lock
add    Mod5    = Mode_switch Mode_switch

I made this above with the wonderfull programm xkeycaps, which I installed via apt-get... But thats not the topic... Save the file x and then open a terminal again and type:

Code Sample
xmodmap .xmodmap-box

Now everything should work fine... Or did I have overseen something... I am not a Linux Freak or so, but the above solution did it for me...

Posted by Xehupatl on Sep. 03 2005,09:23
Sorry to resurrect this thread, but I tried this, and I'm happy the Umlaute work (yay!), but my "Alt Gr" key now seems to work as "Enter"!

EDIT: Oh, and on the "up, down, left, right" keys, only the "right" one works!

Posted by Jörg Reuter on Jan. 08 2006,01:55
And the Umlaute dosen't work in the Email-Client Sylpheed.
Posted by Jörg Reuter on Jan. 08 2006,02:23
it is a little difficult. If I type lang=de-latin1-nodeadkeys in the Console the german Umlaute works . Except in Mozilla the @ :( and very complicated is it in the Emailprogramm Sylpheed. I can see the german Umlaute if I read new mails, I can type it in the Adress and Subject and I see them :). But if i write the text I can not see the german unlaute but if I send the text the german Umlaute was correctly in the Email. (DSL 2.0)
Posted by Udo on Jan. 25 2006,07:50
Hello Jörg,

I have the same probleme mit the "ö","ä","ü" in the text, do you solve the problem?


Posted by MoonMind on Jan. 29 2006,10:15
I truely admire this kind of thorough fix, but wouldn't it be easier to get the de-latin1-nodeadkeys.kmap.gz from another system (like a Debian system) and just copy it into /usr/share/keymaps/i386/qwertz/ ?

Tried it - it's not the point. The map loaded at bootup is "de" instead of "de-latin1-nodeadkeys". That seems to be it - but I've yet to locate the file from which the KEYBOARD variable is read in order to change that...

Loading "de-latin1-nodeadkeys" fails altogether:
Code Sample
$ loadkeys de-latin1-nodeadkeys
Loading de-latin1-nodeadkeys.kmap.gz
loadkeys: de-latin1-nodeadkeys:4: cannot open include file de-latin1.kmap

Isn't the include supposed to include de-latin1.kmap.gz?

Okay, but anyway, the idea doesn't seem to have been a good one...

loadkeys doesn't work on the live CD either - so there must be something else to load and set keymaps... I've seen a somewhere - is that it?

Okay, I've found /etc/sysconfig/knoppix and changed settings there - about to reboot, hopefully see you soon with some good news...

Nope, no joy. I consider this a but or at least a flaw in the system - even isn't able to set the keymap to de-latin1-nodeadkeys (it employing loadkeys, in fact, so that's bound to happen).

Closing in on the issue... I tried sudo dpkg-reconfigure locales, was told that locales wasn't installed, tried sudo apt-get install locales and found broken dependencies - glibc-2.2.5-11.8 is missing. Having known DSL for a while (and loving it for its size as well as for its functionality), I guess this is intentional - any ideas on how to change this? I coulnd't get any version of glibc via apt-get using the default repositories...

Posted by freeze on Jan. 30 2006,08:40
I just found the file that you maybe need. /opt/
thats my /opt/
Code Sample
# put other system startup command here
loadkeys de-latin1-nodeadkeys

Posted by Jurgen272 on Jan. 31 2006,14:03
Anyone tried "xkeycaps.dsl" ?
For me it did solve a lot off problems on an azerty/Belgian keyboard.
Maybe the app will do the same for other (eg DE-keyboards)

Just find jour keyboard in the list and save.

Add "xmodmap ~/.xmodmap-`uname-n`" to your .xinitrc file to preserve the keyboard after booting.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.