You can try setting TERM to xterm-color, xterm-xfree86, or screen ... I don't know what the correct one is, since I don't know which terminal emulator you're using.
Here is the relevant section of my tcshrc. I use xterm with tmux.
Code:
# Do the $TERM dance; these options seem to work best on various systems...
if (($?TMUX)) then
setenv TERM screen
else if ($uname == OpenBSD) then
setenv TERM xterm-xfree86
else if ($uname == FreeBSD) then
if ($tty =~ ttyv*) then
setenv TERM cons25
else
setenv TERM xterm-color
endif
else if ($uname == Linux) then
setenv TERM xterm-color
else
setenv TERM vt220
endif
It might also be a problem with the key binds in your shell sending 'wrong' codes...