I have been comfortably using Emacs in MacOS 13.4.1 (M1 architecture) for a while. However, a few days ago, using the default keybinding of C-SPC for set-mark-command
simply stopped working. Same for C-M-SPC
which is associated to mark-sexp
. Interestingly, other commands such as M-h
for mark-paragraph
still work as expected.
This is my Emacs init file and as shown in the git log, the file has been stable for a few months. As you see, I have packages that help display which keybinding is associated with each command:
According to Ivy's buffer, C-SPC
has not been changed. Thus, I really do not know why this keybinding stopped working.
I can still use the command. But, to do it, I need to invoke M-x
and then type the command name which reduces my productivity.
Here are the steps I have tried as part of my debugging effort, but unfortunately, they did not work:
- Re-starting Emacs
- Re-starting the computer
- Tried opening default Emacs (without loading my init file with
➜ emacs -q
) - Tried using the native Macbook keyboard (instead of my keychron 2)
- Tried using Emacs without Karabiner Elements running in the background. I am a heavy user of Karabiner and it could affect keybindings.
- I tried invoking
C-h k
. After executing the command, the mini-buffer asks forPress key:". Even though I press
C-SPC`, Emacs does not acknowledge it. It behaves as if it was waiting for me to press or finish pressing something.
The problem seems to be related to commands that use the SPC
(space) key.
As a side note, the problem seems to have appeared after I added "US" as another input source on my MacOS keyboard settings. I already had "Brazilian ABNT 2" as one. Not 100% sure on the chronology of the events.
Since it was just an experiment, I added the US input source and, right after, I removed it, restoring the settings to the previous state (only Brazilian input). Not sure if this permanently affected something. This is what I have now:
Any suggestion on how to debug and/or solve this?
C-h k
to ask Emacs what is bound to the key sequence of interest. Can you add the output to your question?.emacs
file unless it's short enough. Why not cut out the code snippets that are obviously irrelevant?C-SPC
and it never gets to Emacs.Check the keyboard shortcuts section of the desktop settings (however you do that on MacOS).