From owner-freebsd-questions@freebsd.org Wed Dec 30 05:05:34 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 6F0EBA5673E for ; Wed, 30 Dec 2015 05:05:34 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 369A01880 for ; Wed, 30 Dec 2015 05:05:33 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-17-9.dynamic.qsc.de [92.195.17.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 5DA8A3CEDB; Wed, 30 Dec 2015 06:05:30 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id tBU55TKb002074; Wed, 30 Dec 2015 06:05:29 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Wed, 30 Dec 2015 06:05:29 +0100 From: Polytropon To: "William A. Mahaffey III" Cc: FreeBSD Questions Subject: Re: delete button in console Message-Id: <20151230060529.67a4c714.freebsd@edvax.de> In-Reply-To: <5682F182.7080603@hiwaay.net> References: <56825701.30908@gmail.com> <20151229180750.187ed7c9.freebsd@edvax.de> <5682F182.7080603@hiwaay.net> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) 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: Wed, 30 Dec 2015 05:05:34 -0000 On Tue, 29 Dec 2015 14:53:32 -0553.75, William A. Mahaffey III wrote: > On 12/29/15 11:14, Polytropon wrote: > > On Tue, 29 Dec 2015 01:48:49 -0800, Sergei G wrote: > >> When I ssh to a FreeBSD machine and press 'Delete' button in csh prompt > >> I get character '~' printed on screen. Backspace works just fine. > >> > >> I think even an actual console behaves the same way. > >> > >> Is there a way to "map" the Delete button to work appropriately? Would > >> it be my SSH client application or FreeBSD itself? > > This is a thing that can be configured for the shell. I assume > > you're using FreeBSD's default dialog shell, the C shell. In > > this case, add to ~/.cshrc: > > > > bindkey ^? delete-char # for console > > bindkey ^[[3~ delete-char # for xterm > > > > Or to /etc/csh.cshrc, if you want to make it a global setting. > > > > You can check the success with the "stty -a" command. > > > Is this keyboard dependent ? My keyboard apparently sends '^?' for its > backspace key. No, this is a matter of terminal emulation. The keyboard usually sends the same position code (or ASCII code) everywhere in the world. If I remember correctly, Backspace is 0x08, and Delete is something else. > When I try the above, then 'stty -a', I see no setting. > > > [wam@devbox, pre, 2:48:10pm] 2029 % bindkey '^?' delete-char > > . > . > . > > .... > > . > . > . > That may be a vi thing - I've tried it here, and backspace does not do what it usually does in vi (neither in "insert" or "vi" mode). At the regular console prompt, it works as intended (and in all other text mode editors, like ee, too). > I am actually using rxvt, logged into another box, but it apparently > advertises as xterm .... Is the .cshrc setting being made on _that_ box (the target box)? If the rxvt is configured "xterm-compatible", make sure you also have the xterm setting. Compare: bindkey ^? delete-char # for console bindkey ^[[3~ delete-char # for xterm It's helpful to define both. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...