How do you make delete key work?
freebsd at edvax.de
Tue Jan 14 00:11:10 UTC 2014
On Mon, 13 Jan 2014 12:02:06 -0800, jungleboogie0 wrote:
> Hi All,
> Pretty simple question but I'm stumped.
> FreeBSD version:
> FreeBSD lylielion 10.0-RC5 FreeBSD 10.0-RC5 #0 r260430: Wed Jan 8 08:19:02
> UTC 2014 root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
> Connecting via ssh with Zoc  and I'm trying to use the delete key in
> place of the backspace key with xterm emulation, but it displays ~
> characters and doesn't delete any characters.
> What terminal emulation do I need to use to make the delete key work?
I've been using the following approach for many years (last two
lines are important):
if ( $?tcsh ) then
bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
bindkey ^? delete-char # for console
bindkey ^[[3~ delete-char # for xterm
To make this setting work globally, I've added it to /etc/csh.cshrc
in the interactive section - "if ($?prompt) then ... endif". This
should work across all terminal emulations. I've seen that FreeBSD 10
defaults to "xterm" in /etc/ttys. I don't know if this also works
in text mode where "cons25l1" has been the setting for my region...
The delete key now works as expected. :-)
This of course applies to the C shell (csh, tcsh).
If you're using bash, you might need other settings. But I'm
quite confident that the default settings should work.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions