I have a mac-book-air. I swapped my Alt & Win with xmodmap as per linux post like so:

keycode 64 = Alt_L
keycode 133 = Super_L
remove Mod1 = Alt_L
remove Mod4 = Super_L
add Mod1 = Super_L
add Mod4 = Alt_L

Then I apply it via:

xmodmap xmodmap.file

Now my Alt+tab works properly, but in Emacs meta(alt) and Super(cmd) are not swapped. I.e, s-x and M-x are not swapped. After 3 hours of googling around I've not made more progress.

Do you have any tips/advise/things to try? (I'm very desperate). Is it possible to re-map these from inside emacs itself?

- I'm using MATE Desktop. - I tried Gnome Tweak Tool to swap alt & cmd, but it doesn't seem to function under MATE Desktop.

- This issue occurs only in GUI version of emacs. In terminal it get's the right keys.
- I have tried re-starting emacs, restarting system, applying the change then start emacs. No Luck.

  • Something very similar works for me, although I'm using KDE. One thing that may help narrow the issue: are you using Emacs with graphical interface or the console version? – wvxvw Apr 11 '15 at 18:11
  • Did you restart Emacs? IIRC some things in the X11 library are initialized once and for all and this sometimes causes modifier remappings to behave oddly. – Gilles 'SO- stop being evil' Apr 11 '15 at 20:52
  • This happens only in GUI version. (good question btw, doesn't happen in terminal verison). I did do a hard-kill of emacs (pkill emacs) and restarted it, but no luck :-/. – Leo Ufimtsev Apr 11 '15 at 21:52
  • Hello! Running the same issue.. Did you manage to solve it? – zarkone Dec 10 '16 at 5:52

Your Answer

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

Browse other questions tagged or ask your own question.