Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2014 01:10:38 +0100
From:      Polytropon <freebsd@edvax.de>
To:        jungleboogie0 <jungleboogie0@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How do you make delete key work?
Message-ID:  <20140114011038.595803f7.freebsd@edvax.de>
In-Reply-To: <CAKE2PDvsAsUetbGYR46g8nVBSzJboCUECC1cFFfULaOnFgQ2pQ@mail.gmail.com>
References:  <CAKE2PDvsAsUetbGYR46g8nVBSzJboCUECC1cFFfULaOnFgQ2pQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
> 
> Connecting via ssh with Zoc [0] 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
        endif
        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.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140114011038.595803f7.freebsd>