0

I am trying to bind S-RET to something, but it's getting ignored. If I do C-h k S-RET, I see RET (translated from <S-return>) runs... - which seems to suggest that Emacs sees the S- in S-RET just fine, but then decides to drop the S- part for some reason. How do I find that reason and, preferably, remove it?

This is a macOS GUI build from https://emacsformacosx.com. Googling finds multiple instances of similar issue of Emacs on terminals, but in this case it is not a terminal. I have also tried looking at the translation keymap variables, I don't fully understand their contents, but at least they don't grep for anything starting with S-R... or S-r....

1

1 Answer 1

2

You didn't show us how you're attempting to bind S-RET, but one way is:

(local-set-key (kbd "S-<return>") (lambda () (interactive)
                                    (message "hello")))
1
  • It does work. My fault - I was debugging a certain minor mode and thought that I removed it from scenario when in fact I didn't. Thanks! Sep 23, 2019 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.