Run cat
then press keys to see the codes your shortcut send.
(Press Ctrl+C
to kill the cat
when you're done.)
For me, (ubuntu, konsole, xterm) pressing Alt + <-
sends ^[[1;3D
, so i would put in my .zshrc
bindkey "^[[1;3C" forward-word
bindkey "^[[1;3D" backward-word
(Actually I prefer to use Ctrl + arrow to move word by word, like in a normal textbox under windows or linux gui.)
Related question: http://stackoverflow.com/questions/8638012