If you've recently started using Zsh as your shell of choice and have noticed that some key bindings are not working or are now outputting unusual characters, you need to update your .zshrc.
I noticed the issue on a virtual machine running Ubuntu Server, however, other systems vary and output slightly different key codes (i.e, '
;5D' and '
^[[5D') if so, you'll have to adjust the commands below to suit the output you're seeing.
If you're affected by the above example you'll likely need to amend the skip word forward behaviour as well. To amend these issues, append the following to your .zshrc (located at
bindkey '5D' emacs-backward-word bindkey '5C' emacs-forward-wordAnother tip; if your newly found shortcuts are not stopping at punctuation you'll also need to append:
Having more issues with key bindings? See the Zsh website for more information.
Like what you've read?