I came across this snippet which stops emacs from converting C-i
and C-m
into <tab>
and <ret>
respectively:
(dolist (k '("C-i" "C-m"))
(define-key input-decode-map (kbd k) (kbd (concat "<" k ">"))))
Given that I always use emacs in a graphical environment where this remapping works, and I don't want to use C-i
and C-m
for <tab>
and <ret>
, is there any reason not to do this and reclaim two keys? E.g. would C-i
or C-m
ever be specifically bound? Or would this translation affect key combinations? Or anything else? Thanks.
TAB
(not the same thing astab
) is how Ctrl+I is displayed, and it's what modes bind. Same withRET
vsreturn
. It's possible but a bit more complicated, see the answer to the duplicate question.C-i
cannot be different fromTAB
, but it can be different fromtab
. The only downside of binding them differently is that you have to understand how to work with that subtlety.