My finger tends to linger on the Ctrl key and I happen to hit C-RET quite often. I also use cua-mode which binds this to cua-clear-rectangle-mark
. I don't want C-RET bound to anything while in this mode.
I can't seem to unbind it though. I've tried:
(global-unset-key (kbd "C-RET"))
(global-unset-key (kbd "<C-return>"))
(global-unset-key [(control return)])
(define-key global-map (kbd "C-RET") 'ignore)
(define-key global-map (kbd "<C-return>") 'ignore)
(define-key global-map [(control return)] 'ignore)
I also tried the following in my .inputrc with no success:
"\C-RET": "\n"
There also doesn't seem to be a cua-mode-map:
;; Doesn't work
(define-key cua-mode-map "C-RET" nil)
(define-key cua-mode-map (kbd "C-<return>") nil) (define-key cua-mode-map (kbd "C-RET") nil)
?