Interpret zsh bindkey escaped sequences

I usually find interesting zsh keybinding settings (through bindkey command) around the web. My question is how do I interpret what these escaped sequences mapped to? For instance, here is a snippet from oh-my-zsh's key-bindings.zsh

bindkey "^[[H" beginning-of-line
bindkey "^[[1~" beginning-of-line
bindkey "^[[F"  end-of-line
bindkey "^[[4~" end-of-line

Is there a reference on how do these keymaps represented? Also, is it zsh-specific or platform specific at all?

I am aware that I can use either cat or Ctrl-V to find the corresponding escaped sequence for certain keys. Given that I could brute force to find the reverse match, but this would not work for the keys that do not exist on my keyboard (e.g. Home/End on Mac laptops). Thus, I'd prefer methods that could determine the keys regardless of the physical keyboard.

11
задан Community 23 May 2017 в 11:53
поделиться