Be sure that your shell and terminal are sending the appropriate escape sequences to one-another to indicate non-alphanumeric keys. For example, I use tmux
with zsh
in urxvt
. I had quite a few problems with keys acting inappropriately (like enter insert mode and adding [3~
) until I made sure my shell was communicating the appropriate key-bindings with:
# .zshrc
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
bindkey '\e[6~' down-line-or-search
bindkey '\e[5~' up-line-or-search
bindkey '\e[3~' delete-char
If this is your problem, yours are not likely to be the same, but you should be able to find resources specific to your shell and terminal emulator.