Here is the way to have your AZERTY macbook or macbook pro keyboard on your favorite linux distribution (I tried on a Debian, it's great!).
It's very easy to do :
1/ Edit the /usr/share/X11/xkb/rules/base :
Replace the line :
$macbooks = macintosh+macintosh(badmap)
with
$macbooks = macintosh+macintosh(goodmap)
Replace the line :
$maclaptop = +inet(apple)+level3(enter_switch)
with
$maclaptop = +inet(apple)+level3(win_switch)
2/ Now, in the /etc/X11/xorg.conf file, edit the InputDevice Section :
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "macbook79"
Option "XkbLayout" "fr"
EndSection
You have just to restart X (reboot if you don't know how), and it works !!!
Hint : many caracters like the pipe have to be done with the Apple key (Pomme) (pipe = apple + shift + l)
Enjoy !

