From owner-freebsd-questions@freebsd.org Tue Dec 29 20:50:36 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 7002CA55133 for ; Tue, 29 Dec 2015 20:50:36 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (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 420D119F4 for ; Tue, 29 Dec 2015 20:50:35 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from kabini1.local (dynamic-216-186-213-32.knology.net [216.186.213.32] (may be forged)) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id tBTKm220011930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Tue, 29 Dec 2015 14:48:03 -0600 Subject: Re: delete button in console References: <56825701.30908@gmail.com> <20151229180750.187ed7c9.freebsd@edvax.de> Cc: FreeBSD Questions From: "William A. Mahaffey III" Message-ID: <5682F182.7080603@hiwaay.net> Date: Tue, 29 Dec 2015 14:53:32 -0553.75 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151229180750.187ed7c9.freebsd@edvax.de> Content-Type: text/plain; charset=windows-1252; format=flowed 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: Tue, 29 Dec 2015 20:50:36 -0000 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. When I try the above, then 'stty -a', I see no setting. [wam@devbox, pre, 2:48:10pm] 2029 % bindkey '^?' delete-char . . . .... . . . [wam@devbox, pre, 2:48:10pm] 2031 % stty -a speed 38400 baud; 52 rows; 166 columns; lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany imaxbel -ignbrk brkint -inpck ignpar -parmrk oflags: opost onlcr -ocrnl tab3 -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; eol2 = ; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^@; stop = ^S; susp = ^Z; time = 0; werase = ^W; [wam@devbox, pre, 2:48:13pm] 2032 % set _ stty -a addsuffix anyerror argv () autoexpand autolist ambiguous autorehash csubstnonl cwd /home/wam/V8/Cnx/test/junk/cart/unstaggered/bfc/pre cwdcmd echo -n "^[]2;${HOST}:$cwd^G^[]1;${HOST}^G" dirstack (/home/wam/V8/Cnx/test/junk/cart/unstaggered/bfc/pre /home/wam/V8/Cnx/test/junk/cart/unstaggered/bfc/utils) dirw /home/wam/V8/Cnx/test/junk/cart/unstaggered dunique echo_style both edit euid 1110 euser wam fignore (.o .obj .u) filec gid 1110 group unknown histdup prev history 1000 home /home/wam killring 30 loginsh mail /var/mail/wam owd /home/wam/V8/Cnx/test/junk/cart/unstaggered/bfc/utils path (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /home/wam/bin) prompt %B%{\e]2\;%n@%m %l %~%#^g\e]1\;%n@%m^g\r%}[%n@%m, %c, %p] ! %% %b prompt2 %R? prompt3 CORRECT>%R (y|n|e|a)? savehist (300 merge) shell /bin/tcsh shlvl 1 status 0 tcsh 6.18.01 term xterm time (10 whew !!!! that took (%U cpu + %S sys) sec., %E elapsed time tot, %P CPU efficiency (%X text, %D data, %M max) KB, (%I+%O) io, %F pfs + %W swaps) tty pts/2 uid 1110 user wam version tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-amd-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec [wam@devbox, pre, 2:50:11pm] 2033 % uname -a FreeBSD devbox 9.3-RELEASE-p30 FreeBSD 9.3-RELEASE-p30 #0: Mon Nov 2 10:11:50 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 [wam@devbox, pre, 2:50:24pm] 2034 % I am actually using rxvt, logged into another box, but it apparently advertises as xterm .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.