Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Macbook Pro 7.1 with a French keyboard. I'm trying to install a Debian 6 guest OS using VirtualBox on it and I can't configure the keyboard as it is in OS X.

I tried dpkg-reconfigure console-data and selected the mac-usb-fr layout. Everything works well... besides the special characters (pound and arobase signs for example - first key under Esc).

When I select the Apple Macintosh Int'l layout using the keyboard settings in Gnome, I get an error dialog.

I also tried to edit /etc/default/console-setup and add these lines:

XKBMODEL="pc105"
XKBLAYOUT="fr"
XKBVARIANT="mac"
XKBOPTIONS="lv3:switch,compose:lwin"

And these in /etc/X11/xorg.conf:

Driver          "kbd"
Option          "CoreKeyboard"
Option          "XkbRules"      "xorg"
Option      "XkbVariant"    "mac"
Option          "XkbModel"      "pc105"
Option          "XkbLayout"     "fr"
Option          "XkbOptions"    "lv3:rwin_switch,apple:badmap"

Same error dialog when I reboot.

One surprising thing is that it works perfectly out of the box with Ubuntu, so I guess the problem has been solved. Maybe I am missing a specific package?

share|improve this question
    
If you have a solution, post it as an answer below ("Answer your Question"), then you can mark it as accepted in two days. That way, everybody will see the answer right away and the question is marked as answered. –  slhck Jul 24 '11 at 18:36
    
I confirm that the latest solution worked for me too, thanks for sharing. –  this.lau_ Sep 28 '13 at 3:55
add comment

1 Answer

Following the steps here worked for me: http://wiki.debian.org/MacBook#Keyboard.

I simply edited this file:

# /etc/default/keyboard
XKBMODEL="pc105"
XKBLAYOUT="fr"
XKBVARIANT="mac"
XKBOPTIONS="lv3:switch,compose:lwin"

And after a reboot, the mappings were good.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.