# setxkbmap for macbook pro (US)

I recently installed awesome on my ubuntu oneiric, a nice window manager. This doesn't seem to inherit the keyboard settings that were set in the Unity settings.

Now, the problem is, I can't seem to find the correct keyboard layout to set (using setxkbmap). The control panel in Unity just states "US", bet with

setxkbmap -layout us


some keys don't work correctly on my macbook pro 8,2. Does anyone here know the correct settings?

-
Just guessing: setxkbmap -layout us -variant mac, or setxkbmap -model macbook78 (or macbook79 for the international keyboard) –  hhaamu Mar 6 '12 at 8:06
none of the above work. The problem is that the ~ key should be left to the z key, but instead it is left to the 1 key. –  romeovs Mar 6 '12 at 11:51
ok I just edited the files, and it works using setxkbmap. How do I make this permanent (e.g. call setxkbmap on ubuntu, using awesome wm)? –  romeovs Mar 7 '12 at 13:37

The point was that the mac us keymap (setxkbmap -layout us -variant mac) had some keys at the wrong spot.
I edited /usr/share/X11/xkb/symbols/us, where it seemed that the TLDE and LSGT key are switched in the mac section. Loading setxkbmap -layout us -variant mac does the trick now.