Hi,
I am under _terminal_ emacs.
I'd like to bind <esc> to a command(actually evil-motion-state) when I am under evil motion state, while keeping other binding, namely, M-0 usable.
Since M-0 sends ^[0 while "esc" simply sends ^[, that's the problem here.
I'd guess the method is the same as how "esc" binding is done under the normal state, e.g., use a time limit to test whether it's a "esc" or it's a M-0.