3

I'm using Emacs GUI on OSX and I've remapped Cmd key to meta by adding the following to a ~/.emacs.d/personal/misc.el file on prelude:

(setq mac-command-modifier 'meta)

Whereas C-M-u works as expected, C-M-d, when using Cmd as meta key, does nothing. If using alt key though, it works as expected.

What can I do to solve this? I've tried typing C-h l to see what's being typed but when I type C-M-d, nothing appears.

Any ideas?

Cheers

Galder Zamarreño
  • 1,527
  • 2
  • 12
  • 21
  • 1
    This sounds like it might be a system level OSX keyboard shortcut that is overriding an Emacs one. I had a similar issue on Ubuntu getting `M-SPC` to work in Emacs. If you know how to change/disable the OSX binding for Ctrl + Command + d, that might do the trick. – elethan Feb 23 '16 at 19:50
  • @elethan, you are a legend!! Your clue lead to me to the answer, which is explained [here](http://apple.stackexchange.com/questions/22785/how-do-i-disable-the-command-control-d-word-definition-keyboard-shortcut-in-os-x) :D – Galder Zamarreño Feb 24 '16 at 07:51
  • nice! Happy to help! – elethan Feb 24 '16 at 12:44

1 Answers1

2

Elethan's tip lead me to the answer here, which essentially involves disabling system wide OSX Command-Control-D shortcut by calling:

defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 70 '<dict><key>enabled</key><false/></dict>'
Galder Zamarreño
  • 1,527
  • 2
  • 12
  • 21
  • @elethan et al, I've sent a [PR](https://github.com/mathiasbynens/dotfiles/pull/630) to mathiasbynens's .osx dotfiles so that it gets disabled there and many Emacs users can benefit. Vote it up! :) – Galder Zamarreño Feb 24 '16 at 08:15