Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Dec 2015 14:11:53 -0500
From:      mfv <mfv@bway.net>
To:        Polytropon <freebsd@edvax.de>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: delete button in console
Message-ID:  <20151231141153.62eb3d0d@gecko4>
In-Reply-To: <20151230061029.ff1eb4dd.freebsd@edvax.de>
References:  <56825701.30908@gmail.com> <20151229180750.187ed7c9.freebsd@edvax.de> <5682F182.7080603@hiwaay.net> <20151229222622.GA18290@becker.bs.l> <CAFLLzCMdGnQXMFBo1wJexg1x7wJOnrL4bCK%2Bg10surB_aV-e1Q@mail.gmail.com> <20151230061029.ff1eb4dd.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Wed, 2015-12-30 at 06:10 Polytropon <freebsd@edvax.de> wrote:
>
>On Tue, 29 Dec 2015 15:16:50 -0800, Sergei G wrote:
>> Thanks all
>> 
>> I have added bindkey "\e[3~" delete-char to my ~/.cshrc file and
>> Delete, Home and End buttons work now.
>> 
>> The file content is very close to the default, so I am providing
>> portion of .cshrc for your reference:
>> 
>> if ( $?tcsh ) then
>>    #
>> http://stackoverflow.com/questions/1912328/how-to-map-delete-and-end-keys-on-tcsh-shell
>>    # Delete
>>    bindkey "\e[3~" delete-char
>>    # Home
>>    bindkey "\e[1~" beginning-of-line
>>    # End
>>    bindkey "\e[4~" end-of-line
>>    bindkey "^W" backward-delete-word
>>    bindkey -k up history-search-backward
>>    bindkey -k down history-search-forward
>> endif  
>
>Yes, I have almost the same - and for longer than 6 years when the
>Stack Overflow article originates from, even though the notation of
>the Esc character is a little different (but valid). :-)
>
>Oh, by the way: Let me add a suggestion for ~/.inputrc which might
>be useful for programs which use the readline mechanism:
>
>	"\e[A": history-search-backward
>	"\e[B": history-search-forward
>	"\e[C": forward-char
>	"\e[D": backward-char
>	set show-all-if-ambiguous on
>	set completion-ignore-case off
>
>See "man 3 readline" for details.
>
>
>
>

Hello,

I have similar keybindings that operate as expected for both the
tty console and virtual console using xterm or urxvt.

However, the following keybindings (Ctrl+right_key_pad_arrow and
Crtrl+left_key_pad_arrow) do not work on the tty console:

    bindkey "\e[1;5C"   forward-word
    bindkey "\e[1;5D"   backward-word

Even though the environment variable for the terminal is identical:

# printenv | grep TERM
TERM=xterm

Csh is my preferred shell for both console and virutal terminal.

Any suggestions for a key binding that works on the tty console similar
to the virtual terminal would be appreciated.  Alternatively, an
explanation of why it will not work will also be appreciated.

Cheers to all who celebrate the New Year using the Gregorian calendar!

And thanks to all who contributed to this mailing list.  Your tips and
insights have been very useful.

Marek



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