`C-SPC` bindings do not work on macOS as it conflicts with the input source switching shortcut
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### 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:
https://github.com/doomemacs/core/blob/4f4911fed96739aebbb6d1dbadf0cadbd418fb9a/modules/completion/vertico/config.el#L46
https://github.com/doomemacs/core/blob/4f4911fed96739aebbb6d1dbadf0cadbd418fb9a/modules/completion/vertico/config.el#L141-L145
https://github.com/doomemacs/core/blob/4f4911fed96739aebbb6d1dbadf0cadbd418fb9a/modules/lang/org/config.el#L965
### 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`:
```elisp
(when (featurep :system 'macos)
(keymap-set key-translation-map "C-:" [?\C-\ ])
)
```
### Steps to reproduce
1. On macOS, enable a CJK input source (e.g. Japanese, Chinese, or Korean) in System Settings → Keyboard → Input Sources. [^mac-input]
1. Confirm that `Control + Space` is assigned as the input source switching shortcut in System Settings → Keyboard → Keyboard Shortcuts → Input Sources.
1. Open Doom Emacs and try pressing `C-SPC` (e.g. in a vertico buffer to preview).
1. The key combination is intercepted by macOS and never reaches Emacs.
[^mac-input]: https://support.apple.com/guide/mac-help/mchlp1406/mac
### System information
https://pastebin.com/D91vKSzA
### Disclosures
- [ ] ~~This issue was written with/by AI.~~
Contributor guide
Assessment
This issue has not been assessed yet.