Subject: bug#75586: 31.0.50; Cannot bind <C-m> with keymap-global-set

From: Manuel Uberti <[email-masked]>
Date: Thu, 16 Jan 2025 15:57:02 +0100

On 16/01/25 09:34, Robert Pluim wrote:
> C-m will always be RET. If you want "the return key" to do something
> different from RET, then you can bind "<return>", eg:
> 
> (keymap-global-set "<return>" (lambda () (interactive) (message "return")))
> (keymap-global-set "C-m" (lambda () (interactive) (message "Control-m")))
> 
> (although if the `input-decode-map' thing works for you, who am I to
> deny it? 😸)

Yes, I think I prefer my approach in this case, but thanks for sharing
another option. :)

> More importantly: which bit of the documentation can we improve so
> that itʼs clear that "RET" is spelled "C-m" for the purposes of
> `keymap-global-set'?

Maybe the `key-valid-p` documentation?

-- 
Manuel Uberti
https://manueluberti.eu