Can one use macOS's Command Key (⌘) as a separate modifier key from ctrl
and meta
?
My specific question is, is it possible to use ⌘+Q
to quit emacs without altering the existing keybindings? I have something like this in mind:
(bind-key "\⌘-q" 'save-buffers-kill-terminal)
This particular code doesn't work, of course.
I've been using emacs longer than I've been using macOS and don't want a whole-sale change like that mac-key-mode
offers. I just want a selected set of mac shortcuts to work on emacs.
The version of emacs I uses is the one from the emacs-mac
cask package of homebrew. The package description includes
railwaycat/emacsmacport/emacs-mac: stable emacs-27.2-mac-8.3, HEAD
YAMAMOTO Mitsuharu's Mac port of GNU Emacs
https://www.gnu.org/software/emacs/
Edit: I've started wonder whether my question is the same as
Carbon Emacs ⌘-shortcuts in Mituharu-Emacs?
If so, the only solution seems to be for me to use a different emacs package than emacs-mac
. . . .