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
(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