Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
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
add comment

1 Answer

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.

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.