This s the explanation how i installed Gentoo Linux on my Apple MacBook Pro (3rd generation).
is the xorg.conf i use. I copied it from somewhere, don't know exactly where i get it from but
X11 configuration to use with Xmodmap.
The keyboard is supported by USB-HID. but there seem to be no good keymaps for it.
One possible solution (for an X environment) is to use a xmodmap, my first try looks like this:
!! xmodmap for Apple MacBook - German layout
! Let the left apple key act as mode switch
keycode 115 = Mode_switch
! Use the right apple switch as "ALT_GR" key, provides the additional
! characters you find on a tradition pc keyboard (example @)
! !! Also this key acts as right mouse button when used with left apple key
keycode 116 = ISO_Level3_Shift NoSymbol Pointer_Button3
! Use the Delete key correctly
! Maps to center mouse if used with left apple key
keycode 108 = Delete Delete Pointer_Button2
! Page Up/Down
keycode 98 = 0xff52 NoSymbol 0xff55
keycode 104 = 0xff54 NoSymbol 0xff56
keycode 100 = 0xff51 NoSymbol 0xff50
keycode 102 = 0xff53 NoSymbol 0xff57
! Switch keys ( lt/gt <-> circle/accent )
keycode 94 = 0xfe52 0x00b0 0x00ac 0x00ac 0x00ac 0x00ac
keycode 49 = 0x003c 0x003e 0x007c 0x00a6 0x007c 0x00a6
This .xmodmap file is for the german keyboard layout, the last two lines will probably not apply to other versions. This .xmodmap file has to go to the user homedirectory.
Note: This might apply only to german keyboard layouts.
First select your desired keyboard layout by editing /etc/conf.d/keymaps. For german this is "de".
A little tweaking is necessary to get ALT-GR and to swap the "^" and "<" key.
Do a dumpkeys > /etc/default.kmap
then in /etc/default.kmap replace all occurrences of the number "86" with "41" and vice versa, and be sure to have a line
keycode 126 = AltGr
This maps the right "Apple"-Key to AltGr. otherwise you don't get all the specil characters.
After creating the new keymap choose /etc/default.kmap as KEYMAP in /etc/conf.d/keymaps.
- 19 Feb 2008