In bash, I press ctrl+v to start verbatim insert. In the verbatim mode, I press the Esc key and bash shows ^[. I redirect it to file esc.
Also in the verbatim mode, I press ctrl key with [ key, and bash shows ^[. I redirect it to file ctrl.
Next, I compare the two files, and they are the same!
$ echo '^[' > esc
$ echo '^[' > ctrl
$ diff esc ctrl
$
Why do Ctrl+[ and Esc produce the same content?
Is ^[ here the C0 and C1 control codes? If so, the wiki article says ^[ is Escape, so why is ctrl+[ also Escape?
The root problem is that I want to check and create a key binding.
(zsh)$ bindkey -L
...
bindkey "^['" quote-line
...
So do I need to type ESC+' or ctrl+[+'?