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?

  • 3
    Just guessing: setxkbmap -layout us -variant mac, or setxkbmap -model macbook78 (or macbook79 for the international keyboard)
    – hhaamu
    Commented Mar 6, 2012 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
    Commented Mar 6, 2012 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
    Commented Mar 7, 2012 at 13:37

1 Answer 1


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .