LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   please help to make delete key work (https://www.linuxquestions.org/questions/solaris-opensolaris-20/please-help-to-make-delete-key-work-423468/)

thtr2k 03-10-2006 06:56 AM

please help to make delete key work
 
can someone please help me? i want to use the backspace key to work as delete in vi, but i've never got it working. I use the "stty erase ^?" to set it but it only does as to backspace. I'm using SunOS.
Thanks in advance

jlliagre 03-10-2006 07:18 AM

What do you want exactly to do with delete and/or backspace ?
- under the shell and under vi ?
- with the standard vi or vim ?
- in vi insert-mode or command-mode ?

thtr2k 03-10-2006 07:55 AM

in vi insert-mode. like typing error and able to delete the errors by just pressing the backspace key. thanks

jlliagre 03-10-2006 08:44 AM

I just tried and both backspace and delete do remove previously entered characters under vi, with your stty setting.

Are you remotely connected from a linux box ?

thtr2k 03-10-2006 08:47 AM

i'm using SunOs, I know that Linux works but with SunOS i'm having this problem

jlliagre 03-10-2006 10:05 AM

That wasn't my question.

My question is: are you connecting to the Solaris box remotely from a Linux box ?

By the way SunOS is a bit vague, its first version was launched about 24 years ago.

cheesypretzel 03-27-2006 01:33 PM

I have a similar problem running SunOS. I'm running on a Linux box so in my user.cshrch I have
stty sane erase '^H' >& /dev/null

So backspace works on Linux. But if I rsh over to a SunOS box my backspace does not work.

jlliagre 03-27-2006 01:39 PM

Did you try the same stty command on Solaris ?
The redirection seems to me unnecessary, but doesn't hurt either.

cheesypretzel 03-27-2006 03:48 PM

Yep after I rsh over I source the user.cshrc
Also tried just typing that line in at the prompt and it seems to have no effect.

jlliagre 03-27-2006 06:07 PM

What happens when you use the backspace key in the command line (shell) ?
Does it displays "^H" ?
If true, is the delete key erasing characters or displaying "^?" ?

cheesypretzel 03-28-2006 08:54 AM

You just made me answer my own question, sorry for my retardedness!!
Over on Sun I was getting the ^? instead of ^H, so obviously the same line won't fix it for both. I put an if/else statement in my user.cshrc to change the ^H to ^? if system is Sun.
Thanks ;)

jlliagre 03-28-2006 11:23 AM

Okay, I understand now, you are using JDS gnome-terminal which has an obnoxious option that allows to fool the system:
Terminal / Current Profile / Compatibility
default value of:
"Backspace" send "Delete", and
"Delete" send "<esc>[3~" :confused:

I don't know who had the stange idea to mess with these keys, but anyway, it's easy to set the key to their regular behaviour and fix the problem.

After that, you can bring your .cshrc back to its previous settings, which is better, as other terminals like xterm, dtterm, rxvt, kterm and others are not affected.

cheesypretzel 03-28-2006 04:10 PM

Well, I'm actually using Konsole (I have rather limited system control as this is a company computer) as I am running KDE on an archaic version of Redhat. I guess it has a similar type of option?

jlliagre 03-29-2006 12:21 AM

I'm confused, I was thinking you were experiencing this problem only when on Solaris.
Is your kconsole running on Linux or Solaris ?
Try launching "/usr/openwin/bin/xterm&" when connected on Solaris, and see how the keys behave.
Run too:
Code:

xmodmap -pk | egrep "(Delete|BackSpace)"
to see what X11 sends.

cheesypretzel 03-30-2006 08:37 AM

I'm on Linux, but using rlogin to get to a Solaris box.
It's ok I fixed up my user.cshrc so the backspace works in both environments now.

I was just curious if Konsole had that similar "obnoxious option that allows to fool the system"

No worries though, thanks for your help :)


All times are GMT -5. The time now is 04:19 PM.