I use a Solaris 2.8 Ultra 10 at work and a Linux 2.2.19 Pentium
at home. I routinely run xterms on the local machine that's
logged in to the remote machine -- at any given time the machine
defined as "local" could be either, and the remote one would be
the other. It's important if the backspace and delete keys
behave the same way on the Solaris and Linux machines regardless
of which one is local or remote. Up through when I was running
Redhat 5.2 I never had to think about this, since everything
worked fine. Then I upgraded to Mandrake 7.02 and Vim has never
been the same since. On both machines the backspace and delete
keys work locally for all applications, including Vim. On both
machines the backspace and delete keys are swapped in Vim when
running remotely, but only when running vim, gvim is fine.
Remote shells behave just fine as do other remote app's.
I got a lot in good information from these two documents
<http://www.ibb.net/~anne/keyboard.html>
<http://www.ibb.net/~anne/keyboard/keyboardprev.html>
Initial undesired behavior is that in remote Vim sessions the
backspace key deletes the character under the cursor, instead of
the character preceding the cursor, and the delete key deletes
the character preceding the cursor, instead of the character
under the cursor.
The Vim help files suggested adding ":fixdel" to my ~/.vimrc so
I did this on both machines. This renders acceptable behavior
on the Solaris machine. That is the local Solaris behavior and
remote Linux behavior are fine like this. The Linux machine is
terrible like this. The local Linux behavior has the backspace
and delete key affects swapped in Vim (again gvim is fine). The
remote Solaris behavior is that neither the backspace nor delete
keys work, but ^H works alright.
Below the lines of "====" is some configuration information for
each machine when running locally and remotely. One observation
I have is that editing the /etc/sysconfig/keyboard file changing
"BACKSPACE=Delete" to "BACKSPACE=BackSpace" has no effect.
Another observation I have is that the Linux local backspace key
sends ^?, the local stty erase character is set to ^H and yet
backspacing still works. This seems odd to me.
Can anyone suggest a way to get uniform behavior on both
machines, whether operated remotely or locally?
Thanks very much for any aid....
===========================================================================
Linux local console & xterm
infocmp | grep kbs --> kbs=\177
infocmp | grep kdch1 --> kdch1=\E[3~
Linux xterm with remote login (ssh) to Solaris machine
Linux local console & Linux xterm
stty erase ^H
Linux local shell & vi
backspace key ^?
del key ^[[3~
Linux local X11
physical "backspace" key generates keycode 22
physical "delete" key generates keycode 107
backspace key
KeyPress event, serial 21, synthetic NO, window 0x4000001,
root 0x26, subw 0x0, time 597234493, (25,74),
root:(776,96), state 0x10, keycode 22 (keysym 0xff08, BackSpace),
same_screen YES, XLookupString gives 1 characters: "
del key
KeyPress event, serial 24, synthetic NO, window 0x4000001,
root 0x26, subw 0x0, time 597197233, (90,114),
root:(841,136), state 0x10, keycode 107 (keysym 0xffff, Delete),
same_screen YES, XLookupString gives 1 characters: ""
===========================================================================
Solaris local console & xterm
infocmp | grep kbs --> kbs=\b
infocmp | grep kdch1 --> <nothing>
Solaris xterm with remote login (ssh) to Linux machine
Solaris local console & Linux xterm
stty erase ^H
Solaris local shell & vi
backspace key ^H
del key ^?
Solaris local X11
physical "backspace" key generates keycode 50
physical "delete" key generates keycode 73
backspace key
KeyPress event, serial 23, synthetic NO, window 0xa400001,
root 0x2a, subw 0x0, time 568685318, (116,26),
root:(182,136), state 0x0, keycode 50 (keysym 0xff08, BackSpace),
same_screen YES, XLookupString gives 1 characters: "
del key
KeyPress event, serial 21, synthetic NO, window 0xa400001,
root 0x2a, subw 0x0, time 568743838, (127,73),
root:(215,205), state 0x0, keycode 73 (keysym 0xffff, Delete),
same_screen YES, XLookupString gives 1 characters: ""
===========================================================================
--
Unless otherwise noted, the statements herein reflect my personal
opinions and not those of any organization with which I may be
affiliated.
--
Unless otherwise noted, the statements herein reflect my personal
opinions and not those of any organization with which I may be affiliated.