Date: Tue, 29 Dec 2015 14:53:32 -0553.75 From: "William A. Mahaffey III" <wam@hiwaay.net> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: delete button in console Message-ID: <5682F182.7080603@hiwaay.net> In-Reply-To: <20151229180750.187ed7c9.freebsd@edvax.de> References: <56825701.30908@gmail.com> <20151229180750.187ed7c9.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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 . . . <try 'vi' on an ASCII file, BS key still doesn't work> .... . . . [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 = <undef>; eol2 = <undef>; 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5682F182.7080603>