Escape is too far away on modern keyboards and Tab could be easily typed as Ctrl+i in terminal applications. So I found it convenient to replace them in my alacritty terminal key bindings. I am used to these replacements and want them for Emacs also. What should I do, to replace Esc with Tab and vice versa in all buffers, modes, context etc allover Emacs(including evil-mode ofc)?
I've tried this in my init.el
(define-key input-decode-map [tab] [?\e])
(define-key input-decode-map [escape] [?\t])
But this doesn't trigger insert-to-normal transition in evil mode: I am pressing tab, I am seeng ESC ESC ESC
in bottom bar, but evil state remains <I>
.
ESC
key bindings in Emacs is problematic.ESC
is used in more ways than you might expect, including some sort of behind-the-scenes ways. You can try doing it, but you are likely to find that it's not a great idea.