Problem
On macOS, Control + Space is reserved by the system as a shortcut for switching input sources (IME).
This affects users who type in languages that require an IME, such as Japanese, Chinese, and Korean.
Because this key combination is intercepted at the OS level, it never reaches Emacs, making all of Doom's C-SPC bindings inaccessible.
Affected bindings
Doom Emacs maps C-SPC in several places , including:
|
"C-SPC" #'+vertico/embark-preview |
|
(consult-customize |
|
consult-ripgrep consult-git-grep consult-grep |
|
consult-bookmark consult-recent-file |
|
consult-source-recent-file consult-source-project-recent-file consult-source-bookmark |
|
:preview-key "C-SPC") |
|
:m "C-SPC" #'org-agenda-show-and-scroll-up |
Question
Is there an officially recommended way to work around this conflict,
or would it be possible to provide an alternative default binding for macOS users?
As a stopgap, I found that adding the following to the config remaps another key to C-SPC:
(when (featurep :system 'macos)
(keymap-set key-translation-map "C-:" [?\C-\ ])
)
Steps to reproduce
- On macOS, enable a CJK input source (e.g. Japanese, Chinese, or Korean) in System Settings → Keyboard → Input Sources.
- Confirm that
Control + Space is assigned as the input source switching shortcut in System Settings → Keyboard → Keyboard Shortcuts → Input Sources.
- Open Doom Emacs and try pressing
C-SPC (e.g. in a vertico buffer to preview).
- The key combination is intercepted by macOS and never reaches Emacs.
System information
https://pastebin.com/D91vKSzA
Disclosures
Problem
On macOS,
Control + Spaceis reserved by the system as a shortcut for switching input sources (IME).This affects users who type in languages that require an IME, such as Japanese, Chinese, and Korean.
Because this key combination is intercepted at the OS level, it never reaches Emacs, making all of Doom's
C-SPCbindings inaccessible.Affected bindings
Doom Emacs maps
C-SPCin several places , including:doomemacs/modules/completion/vertico/config.el
Line 46 in 4f4911f
doomemacs/modules/completion/vertico/config.el
Lines 141 to 145 in 4f4911f
doomemacs/modules/lang/org/config.el
Line 965 in 4f4911f
Question
Is there an officially recommended way to work around this conflict,
or would it be possible to provide an alternative default binding for macOS users?
As a stopgap, I found that adding the following to the config remaps another key to
C-SPC:Steps to reproduce
Control + Spaceis assigned as the input source switching shortcut in System Settings → Keyboard → Keyboard Shortcuts → Input Sources.C-SPC(e.g. in a vertico buffer to preview).System information
https://pastebin.com/D91vKSzA
Disclosures
This issue was written with/by AI.