If I want to bind a key-mapping to a function or widget in zsh I have learnt that I first have to hit Ctrl+v - at a prompt, then enter the key sequence I want to use, then use the output in my key-binding command.
So for example if I want to map Ctrl+xCtrl+v to the action of opening the current command line contents in an editor, I need to
- hit Ctrl+v - to enter "dump key mode"
- hit Ctrl+xCtrl+v
- In my case this produces
^X^E
- In my case this produces
- take the
^X^Eand use it in my keybinding command, e.g.
bindkey "^X^E" edit-command-line
Why is this necessary and what is actually happening "behind the scenes" when I do this?