From owner-freebsd-questions@freebsd.org Thu Dec 31 19:12:04 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8890BA5594D for ; Thu, 31 Dec 2015 19:12:04 +0000 (UTC) (envelope-from mfv@bway.net) Received: from smtp1.bway.net (smtp1.v6.bway.net [IPv6:2607:d300:1::27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67A451C68 for ; Thu, 31 Dec 2015 19:12:04 +0000 (UTC) (envelope-from mfv@bway.net) Received: from gecko4 (host-216-220-115-221.dsl.bway.net [216.220.115.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m1316v@bway.net) by smtp1.bway.net (Postfix) with ESMTPSA id 7DE9C95854; Thu, 31 Dec 2015 14:11:53 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bway.net; s=mail; t=1451589113; bh=b/92+lb0QQbPn9p12fiKrb1Cqodf+b1sd4CNF8/jcUQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:Reply-To; b=jC9wzqByjavWHzh7ojm/4SOJ7BSnCXhoPd8A9pUqzNqaVRNFVq/7vu09CnNv2UfYU f+TbnOhuSoJYe8qvbpPzkM09eIaD0zLfcwGEzxVB8i6LRXl85uaYhAcF/mZnIO28xC r6VNulx6gxHlAjJT0UdRof51SL6ufTjjAYYIJHPU= Date: Thu, 31 Dec 2015 14:11:53 -0500 From: mfv To: Polytropon Cc: FreeBSD Questions 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> <20151230061029.ff1eb4dd.freebsd@edvax.de> Reply-To: mfv@bway.net MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2015 19:12:04 -0000 > On Wed, 2015-12-30 at 06:10 Polytropon 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