I'm running Ubuntu 11.10 using the gnome-fallback mode with compiz.

My keyboard is the Apple metal add-on USB keyboard. My .Xmodmap file is set to swap the Alt and Command keys.

I built the key map into a .Xmodmap file, and it works successfully for the X session. (I can do Grid commands with ctrl-alt-number pad commands using the Command key as the Alt key.)

But none of the applications running under X recognize the new key mapping. (Command-F doesn't open the File menu but option-F does. Command-right-click doesn't open the panel menu, but option-right-click does.)

How do I get my apps to pick up the new mod mapping?

  • 2
    Can you please add you .Xmodmap to the question? – Bruno Pereira Dec 12 '11 at 17:16
  • Sorry, I gave up on trying to get this to work. – Mojo Dec 28 '11 at 23:24

Ubuntu uses xkb up to allowing different keyboard layout per window. Those are activated per window and here probably is the reason of xmodmap being ignored.

First play with existing options (just open keyboard preferences and click Options on your keyboard layout). There are some key swapping options there (I don't have mac so I don't know whether there is an option to swap alt and command, but it is fairly likely).

If not, /usr/share/X11/xkb directory may be of interest but here I don't feel able to explain how to add new keyboard options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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