I am trying to map Command key to Control key, and Option key to Meta key in Emacs for mac. I installed using macports.
I located the init file using describe-variable
and user-init-file
. I copied into the init file the text
(when (eq system-type 'darwin) ;; mac specific settings
(setq mac-option-modifier 'meta)
(setq mac-command-modifier 'control))
as suggested in this link.
But Command key still does not appear to work as a Control key. I don't know if the reason is because I am using Emacs in the terminal. I suspect this is not the issue because when I delete the line (when (eq system-type 'darwin)
from the init file, I get an error that the line (setq mac-option-modifier 'meta)
is not valid (this also of course seems to imply that the init file is in fact being found and read by Emacs).
I know there are several stack exchange questions on this topic already, but my solution described above is my attempt to implement those answers, and it is not working.
I am running a high sierra operating system, so, fairly old.