I'm learning zsh at the moment, and configuring my ~/.zshrc. On the Archwiki, I found a snippet to change the history searching behavior:
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
[[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search
[[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search
After scouring the man pages however, I cannot find any documentation on the key keyword or what parameters it can take. grep-ing for man zshall | grep -i "key.*\[" does not show any more information, nor does the man zshzle entry for bindkey. The closest relevant match is the following from man zshcontrib:
...
source ${ZDOTDIR:-$HOME}/.zkbd/$TERM-$VENDOR-$OSTYPE
[[ -n ${key[Left]} ]] && bindkey "${key[Left]}" backward-char
[[ -n ${key[Right]} ]] && bindkey "${key[Right]}" forward-char
# etc.
...
I found more examples at zshwiki and an answer from @rayandrews on Unix.SE, although neither appear to be or claim to be the full list of parameters to key, nor describe where/how key is defined.
Where can I learn more about key[...] and how to use it?