I wonder how the "Pass Command/Control To System" options (mac-pass-command/control-to-system
) are supposed to work? In my case I would like to have Ctrl-space and Cmd-space bound in the macOS system keyboard settings (the macOS default bindings to switch keyboards and for spotlight search) but have them overridden in Emacs (among others, to be able to use the default Emacs bindings [C-space] for set-mark
).
Even if I have the above two options set to nil
(I have mac-command-modifier
set to control
, so I am actually hitting Cmd-space) a [C-SPC]
keyboard event seems to be passed directly to macOS triggering a spotligt search instead of Emacs set-mark
. (Unless I unbind the key in the macOS system settings, in which case it works.)
Is this a bug or some intended behavior? I vaguely recall that I had this working in previous version of Mac Emacs.
I am running a modified version of Emacs known as "Emacs Mac Port": GNU Emacs 26.1 (build 1, x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21) of 2018-05-30"
. Here is a link to the source code: https://github.com/fgeller/emacs-mac-port
mac-pass-command-to-system
is defined in macterm.c
and its doc-string is: "Non-nil if command key presses are passed on to the Mac Toolbox."
mac-pass-control-to-system
is defined in macterm.c
and its doc-string is: "Non-nil if control key presses are passed on to the Mac Toolbox."
C-h v
akaM-x describe-variable
to read the doc-strings; whereas, I had grep the source code that I downloaded from Github to extract that information.nil
but I still get the behavior described above.brew tap railwaycat/emacsmacport && brew install emacs-mac
.