Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Windows keyboard (MS natural 4K), I'm using Mac OS X, and I like to use Emacs. However, the default Mac OS X GUI build for Emacs has the Windows key mapped to Meta (meta typically is the Alt key). This is not very comfortable, and I would like to remap it. Note that in the rest of my environment, Alt is really alt, and the Windows key typically shows up as the Apple key.

share|improve this question
add comment

2 Answers

(setq mac-command-modifier 'alt) ;; Can be set to  meta, alt, super, or hyper

I'm not sure how your windows keys map, but you can evaluate that expression in a scratch buffer with C-x C-e until you find modifier you like and then copy it to your init.el or .emacs file.

share|improve this answer
    
Ah, but the problem is alt is not showing up as a meta key. –  Paul Nathan Aug 4 '09 at 16:13
    
well, I think one of the problems is that in Emacs older than version 23, Alt (Option) was not Meta on the Macintosh out of the box. I don't have a windows keyboard to test, but have you tried all of the possible values for mac-command-modifier (meta, alt, super, or hyper)? With 'alt Meta is Option (alt) on my Mac keyboard. With 'meta it is Command. With 'super it is also Option (alt). With 'hyper it is Option (alt) again. It is likely to be different on your system, but one should work. –  Richard Hoskins Aug 4 '09 at 16:26
    
Ahh, I'm using emacs 22, I'm pretty sure. –  Paul Nathan Aug 4 '09 at 17:22
add comment
up vote 1 down vote accepted

Installing Emacs 23 solved this problem. Thank you, Richard Hoskins, for giving me the push to get Emacs 23.

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.