General
cancel
Showing results for 
Search instead for 
Did you mean: 

backspace key sends carriage return

 
SOLVED
Go to solution
Amit Agarwal_1
Trusted Contributor

backspace key sends carriage return

I am using ksh as my login shell. Pressing backspace while typing sends carriage return. I see that even command that i was typing gets killed and doesn't exist in the shell history.

$ stty
speed 9600 baud; -parity hupcl
min = 1; time = 1; erase = ^H; kill = ^P;
swtch ;
brkint -inpck -istrip icrnl onlcr tab3
-iexten echo echoe echok
-echoctl -echoke

No stty call in .profile
5 REPLIES 5
bhavin asokan
Honored Contributor

Re: backspace key sends carriage return

hi,

i think you might have entered key in a wrong way.

the stty entries may be in .profile or /etc/profile or .kshrc

when assigning stty setting for backspace insert ^H in the following way

holding ctrl key press v key.then holding ctrl key press h key.it will insert ^H .

you can test it before adding to profile
at a shell prompt
stty erase ^H (means ctrl V ctrl H)

test it.


regds,

Amit Agarwal_1
Trusted Contributor

Re: backspace key sends carriage return

I tried, doesn't help :(
VEL_1
Valued Contributor
Solution

Re: backspace key sends carriage return

Hi,

Try to use:

stty erase DEL
stty intr ^C
stty kill ^U
Amit Agarwal_1
Trusted Contributor

Re: backspace key sends carriage return

Cool, thanx...

stty intr ^C
made it work.
Amit Agarwal_1
Trusted Contributor

Re: backspace key sends carriage return

Backspace key was assigned to intr

stty intr ^C
made it work.