Left/right arrow and backspace translation confusion
This one is making me feel dumb...I've been using FreeBSD for at least six years but I can't seem to figure this out... I have two FreeBSD systems running 4.10/4.11 (these problems have plagued me through several versions though). On one system, arrows and backspace work as expected, but on the other, left/right arrows in vi cause havock (extra characters and a switch from command to insert mode), and backspace in Lynx, Mutt, etc., backs up but leaves characters intact instead of clearing them. I have verified that the following are identical on both systems: - termcap (/etc symlink and /usr/share/misc/termcap and termcap.db). - ~/.exrc. - stty settings at run time and as set in ~/.login (I use tcsh). - .screenrc (I also use screen 4.00.02 on both systems). - /usr/local/etc/screenrc I have also tried connecting to each system directly, via a serial cable and via a Telnet client; and also connecting to each system through an ssh session on the other one, inside a Screen session. The results are always the same: On one system, keys work as expected, but on the other, they always work in the same wrong way. Actually, I find that the problem only occurs when I'm inside a Screen session on the troublesome system. In other words, all variations above work properly if I'm not in Screen on the troublesome system (even if I'm connected to it through a Screen session running ssh on the other system), but all above variations involving my being in a Screen session on the troublesome system cause the problem. In case it helps, here's sort of a truth table, where s2 is the troublesome system: Serial to s1: ok Serial to s1 screen session: ok Serial to s2: ok Serial to s2 screen session: problem Telnet to s1: ok Telnet to s1 screen session: ok Telnet to s2: ok Telnet to s2 screen session: problem Serial or Telnet through s1 screen session to s2: ok Serial or Telnet through s1 screen session to s2 screen session: problem Serial or Telnet through s2 screen session to s1: ok Serial or Telnet through s2 screen session to s1 screen session: ok! Any help will be most appreciated. Please Cc me with replies. I feel like I'm missing something very basic here... -- Doug Lee [EMAIL PROTECTED]http://www.dlee.org BART Group [EMAIL PROTECTED] http://www.bartsite.com While they were saying among themselves it cannot be done, it was done. --Helen Keller ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Left/right arrow and backspace translation confusion
Doug Lee wrote: This one is making me feel dumb...I've been using FreeBSD for at least six years but I can't seem to figure this out... I have two FreeBSD systems running 4.10/4.11 (these problems have plagued me through several versions though). On one system, arrows and backspace work as expected, but on the other, left/right arrows in vi cause havock (extra characters and a switch from command to insert mode), and backspace in Lynx, Mutt, etc., backs up but leaves characters intact instead of clearing them. One thing to check is that both keyboards are actually producing the same codes for your keys. They probably are, but... Just type cat and then press the arrow keys on each system. Finish with Enter^D Also, what does echo $term show? Identical termcap files don't help if your terms are different :-) Is there anything different about the .login or .cshrc between the machines? --Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Left/right arrow and backspace translation confusion
At 04:09 AM 7/14/2005, Doug Lee wrote: This one is making me feel dumb...I've been using FreeBSD for at least six years but I can't seem to figure this out... I have two FreeBSD systems running 4.10/4.11 (these problems have plagued me through several versions though). On one system, arrows and backspace work as expected, but on the other, left/right arrows in vi cause havock (extra characters and a switch from command to insert mode), and backspace in Lynx, Mutt, etc., backs up but leaves characters intact instead of clearing them. I have verified that the following are identical on both systems: - termcap (/etc symlink and /usr/share/misc/termcap and termcap.db). - ~/.exrc. - stty settings at run time and as set in ~/.login (I use tcsh). - .screenrc (I also use screen 4.00.02 on both systems). - /usr/local/etc/screenrc Check TERM in the environment of a shell that's inside screen. It should be 'screen'. If it's not, or there's no entry for screen in termcap you'll have exactly the problem you are seeing. -Glenn I have also tried connecting to each system directly, via a serial cable and via a Telnet client; and also connecting to each system through an ssh session on the other one, inside a Screen session. The results are always the same: On one system, keys work as expected, but on the other, they always work in the same wrong way. Actually, I find that the problem only occurs when I'm inside a Screen session on the troublesome system. In other words, all variations above work properly if I'm not in Screen on the troublesome system (even if I'm connected to it through a Screen session running ssh on the other system), but all above variations involving my being in a Screen session on the troublesome system cause the problem. In case it helps, here's sort of a truth table, where s2 is the troublesome system: Serial to s1: ok Serial to s1 screen session: ok Serial to s2: ok Serial to s2 screen session: problem Telnet to s1: ok Telnet to s1 screen session: ok Telnet to s2: ok Telnet to s2 screen session: problem Serial or Telnet through s1 screen session to s2: ok Serial or Telnet through s1 screen session to s2 screen session: problem Serial or Telnet through s2 screen session to s1: ok Serial or Telnet through s2 screen session to s1 screen session: ok! Any help will be most appreciated. Please Cc me with replies. I feel like I'm missing something very basic here... -- Doug Lee [EMAIL PROTECTED]http://www.dlee.org BART Group [EMAIL PROTECTED] http://www.bartsite.com While they were saying among themselves it cannot be done, it was done. --Helen Keller ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Left/right arrow and backspace translation confusion
On Thu, Jul 14, 2005 at 12:41:33PM +0100, Alex Zbyslaw wrote: Doug Lee wrote: One thing to check is that both keyboards are actually producing the same codes for your keys. They probably are, but... Yes they are. The truth table (or approximation thereof) also shows that it doesn't matter which system (/keyboard) I start from. Also, what does echo $term show? Identical termcap files don't help if your terms are different :-) screen when in a Screen session, vt102 when not. I've also tried vt100 and even cygwin (with Cygwin being the point of origin of course). Is there anything different about the .login or .cshrc between the machines? Apart from different alias definitions, different prompts, and a couple of other unrelated things (like shell variables set to point to drives, for example), no. --Alex -- Doug Lee [EMAIL PROTECTED]http://www.dlee.org BART Group [EMAIL PROTECTED] http://www.bartsite.com Characters live to be noticed. People with character notice how they live. -- Nancy Moser ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Left/right arrow and backspace translation confusion
On Thu, Jul 14, 2005 at 04:43:32AM -0700, Glenn Dawson wrote: Check TERM in the environment of a shell that's inside screen. It should be 'screen'. If it's not, or there's no entry for screen in termcap you'll have exactly the problem you are seeing. screen it is, and here's the /etc/termcap entry for it (though I'm sure this will be severely munged by including it as text here): SC|screen|VT 100/ANSI X3.64 virtual terminal:\ :am:xn:ms:mi:G0:km:\ :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\ :cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\ :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\ :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\ :li#24:co#80:us=\E[4m:ue=\E[24m:so=\E[3m:se=\E[23m:\ :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:sr=\EM:al=\E[L:\ :AL=\E[%dL:dl=\E[M:DL=\E[%dM:cs=\E[%i%d;%dr:dc=\E[P:\ :DC=\E[%dP:im=\E[4h:ei=\E[4l:IC=\E[%d@:\ :ks=\E[?1h\E=:ke=\E[?1l\E:vb=\Eg:\ :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\ :kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:@7=\E[4~:kP=\E[5~:\ :kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\ :vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\ :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\ :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00: -- Doug Lee [EMAIL PROTECTED]http://www.dlee.org BART Group [EMAIL PROTECTED] http://www.bartsite.com While they were saying among themselves it cannot be done, it was done. --Helen Keller ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Left/right arrow and backspace translation confusion
Doug Lee [EMAIL PROTECTED] writes: characters intact instead of clearing them. I have verified that the following are identical on both systems: You didn't mention these (albeit unlikely) things: -- Different console driver (sc vs. vt) in kernel. -- Different keymap (see /etc/default/rc.conf). -- Different key bind settings in shell config files. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Left/right arrow and backspace translation confusion
On Thu, Jul 14, 2005 at 07:57:05AM -0700, Gary W. Swearingen wrote: You didn't mention these (albeit unlikely) things: -- Different console driver (sc vs. vt) in kernel. Both are the same; not using pcvt. -- Different keymap (see /etc/default/rc.conf). Not setting key maps. -- Different key bind settings in shell config files. I don't think I'm setting that up at all, seeing as how I never noticed one can. :-) Thanks for checking corner cases though; surely the devil lies in the details... --- Doug Lee [EMAIL PROTECTED]http://www.dlee.org BART Group [EMAIL PROTECTED] http://www.bartsite.com The nice thing about standards is that there are so many of them to choose from. -- Andrew Tanenbaum ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Left/right arrow and backspace translation confusion
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Doug Lee [EMAIL PROTECTED] writes: This one is making me feel dumb...I've been using FreeBSD for at least six years but I can't seem to figure this out... I have two FreeBSD systems running 4.10/4.11 (these problems have plagued me through several versions though). On one system, arrows and backspace work as expected, but on the other, left/right arrows in vi cause havock (extra characters and a switch from command to insert mode), and backspace in Lynx, Mutt, etc., backs up but leaves characters intact instead of clearing them. I have verified that the following are identical on both systems: - termcap (/etc symlink and /usr/share/misc/termcap and termcap.db). - ~/.exrc. - stty settings at run time and as set in ~/.login (I use tcsh). - .screenrc (I also use screen 4.00.02 on both systems). - /usr/local/etc/screenrc I have also tried connecting to each system directly, via a serial cable and via a Telnet client; and also connecting to each system through an ssh session on the other one, inside a Screen session. The results are always the same: On one system, keys work as expected, but on the other, they always work in the same wrong way. Did you start the screen session from within the local/telnet/ssh/serial connection you're attempting to use it from? I've found that if you start a screen session with one keyboard/OS/keymap/method of connection, and attempt to use it from another, it screws up the special keys. - -- Ben -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFC1rWypt3yYclAKVsRAoApAJwMQ25E500MVlHeisT54TGY2dMvFgCfZNYo WCJprkJoyagshZcaZxJTqIE= =kFKu -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Left/right arrow and backspace translation confusion
On Thu, Jul 14, 2005 at 11:57:51AM -0700, Ben Jencks wrote: Did you start the screen session from within the local/telnet/ssh/serial connection you're attempting to use it from? I've found that if you start a screen session with one keyboard/OS/keymap/method of connection, and attempt to use it from another, it screws up the special keys. A good question indeed, but I've actually tried that both ways too. I've even tried a few games with detaching from a screen session, changing TERM in the parent shell, and attaching again; though I don't remember results very specifically for that. -- Doug Lee [EMAIL PROTECTED]http://www.dlee.org BART Group [EMAIL PROTECTED] http://www.bartsite.com It's not easy to be crafty and winsome at the same time, and few accomplish it after the age of six. --John W. Gardner and Francesca Gardner Reese ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]