Yellow Dog Linux General

TOPIC: How to create a German keyboard layout on an iBook(2001)



Introduction:
This documents covers the configuration of the console and XFree86 to activate a german keyboard layout. Especially how to get an "AltGr" key working for "@{[]}\|"-characters.

Though it was tested by myself on an iBook(late 2001) it could work also for most recent/new generation Apple Computers. For mostly all of the following steps you'll need superuser-prvileges and a console.


Step 1: The Console
If you did not already select the "de-latin1-nodeadkeys" layout upon installation, you can do it by starting
/usr/sbin/kbdconfig
(this application runs in console-mode as well in an X-Window environment) Now we have mostly a German keyboard layout except for the "AltGr"-key, we'll change that now. Got to the keymaps directory by typing
cd /lib/kbd/keymaps/i386/qwertz
(it might be confusing using an i386 keymap on a macintosh - but hey, it works) unpack the keymap with gunzip de-latin1-nodeadkeys.kmap.gz

Then we can add the mapping of "AltGr" to the "Apple"-key:
echo "keycode 125 = AltGr" >> de-latin1-nodeadkeys.kmap
Now repack the keymap-file
gzip de-latin1-nodeadkeys.kmap
Then activate the new mapping by running
/us/sbin/kbdconfig
and select "de-latin1-nodeadkeys" [ENTER].
Now you should have the "Apple"-key (left and right of spacebar) as "AltGr"-key. If you want to have the "@" character rather on "AltGr"+"L" (Macintosh style) than "AltGr"+"Q" (PC style) you can perform the following:
cd /lib/kbd/keymaps/i386/qwertz
gunzip de-latin1.kmap.gz
pico de-latin1.kmap
Find the line where it says "altgr keycode 16 = at" in the first couple of lines. Now change the value "16" there to "38". Save the file ("Ctrl"+"O") and exit the editor ("Ctrl"+"X"). Now repack the keymap with gzip de-latin1.kmap.

Apply settings by running
/usr/sbin/kbdconfig
Select "de-latin1-nodeadkeys" and press "ok". Now you should be able to generate the "@" character by pressing "Apple-key"+"L".


Step 2: XFree86
First we need to edit the XFree86 configuration-file
pico /etc/X11/XF86Config-4
Navigate down to the "InputDevice"-section where the Driver is named "Keyboard". At the end of this section we'll find the options we need to change. Change the value of the "XkbLayout" option to "de". Now add 'Option "XkbVariant" "nodeadkeys"' in a new line below.


Attention:
There shouldn't be any other "Xkb..." options in this section. Save the file and exit the editor. On the console:
cd /usr/X11R6/lib/X11/xkb
pico keycodes/xfree86
Find the line " <RALT> = 113" and change the value "113" to "115", save and exit.
pico symbols/de
There is a block starting with "// Fuer Pismo" and ending with "// End of Fuer Pismo". Find and remove it! Save the file and exit.
./xkbcomp symbols/de
If xkbcomp doesn't spit out an error message, erverything is fine. If you want to get "@" by pressing "Apple"+"L" (that means "AltGr"+"L") we have to go on:
pico symbols/de
Find the line starting with "key <AD01>". Make the expression in the curly brackets ( "{", "}" ) read "[ q, Q]". Add a line below reading " key <AC09> { [ l, L], [ at ] };". Save and exit. Check for errors with
./xkbcomp symbols/de
No errors? Congratulation you have now a complete german keyboard layout on your ppc-Linux-System. Enjoy.


Update
.../keycodes/xfree86" contains a line "(LWIN)=115". This line revials with the changed line "(RALT)=115" resp. "(RALT)=113". You need to comment the line "(LWIN)=115".
This HOWTO was written by Christoph Ertelt update by Thomas Ley



 
          Copyright ® 1999-2010. Fixstars Corporation. All rights reserved.
YDL.net Fixstars Corporation