AIX, delete key

Los Angeles1
Los Angeles1 used Ask the Experts™
on
In AIX, how do I disable the delete key from being recognized in command mode

(In other words, in the default AIX configuration, if you type a command, and hit the delete key a few times to delete a typo, the command processor apparently thinks the delete character is a character (instead of erasing the previous keystroke) )

How do I disable this feature ?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Top Expert 2013

Commented:
If you really mean the "delete" key ( <DEL> ) - this key does not work in a ksh terminal, and can't be forced to work and it is not possible either to keep this key from sending a character (mostly the tilde "~") to the screen.

Sorry, no better news.

Author

Commented:
What about the 'backspace' key

(I am using skh)

# echo $0
-ksh
#

Open in new window

Most Valuable Expert 2013
Top Expert 2013

Commented:
This depends on which terminal emulator you're using.

With PuTTY and ksh/AIX you should set the Backspace key to "Control-? (127)" in

"Configuration -> Keyboard -> Options controlling the effect of  keys"

and it should work.
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Author

Commented:
I am using Putty

VT100 emulation

Backspace set to Control 127

 Standard Home

Still have a problem
Most Valuable Expert 2013
Top Expert 2013

Commented:
I always use Xterm R6 and Backspace works just fine. But vt100+ should work as well.

What exactly is your problem? What do you see with

termdef

?

Author

Commented:
In this case I simply enter 'cd /home'

# cd /home
#

Open in new window


In this situation, I enter 'cd/home<backspace><backspace><backspace><backspace>home

# cd /home
ksh: /home^?^?^?^?home:  not found.

Open in new window

Most Valuable Expert 2013
Top Expert 2013

Commented:
Sorry,

I really can't reproduce your problem.

Please let's examine your setup.

Please post the results of

termdef

and

echo $TERM

and

stty

(the "erase" setting)

What exactly are your PuTTy settings for

Terminal -> Keyboard -> Backspace key ?

Terminal -> Keyboard -> Function  keys ?

Terminal -> Features -> Disable destructive backspace ? (should not be ticked)

Commented:
stty erase ^?

ie type "stty" a space "erase" another space then press backspace and then press return - that will set the command line to do "backspace" when you press "backspace".
Most Valuable Expert 2013
Top Expert 2013

Commented:
Not quite, sjm_ee.

... type "stty" a space "erase" another space then a backslash "\" then press backspace and then press return ...

But it must work without having to run stty, that's why I keep asking for information about the current setup.

Author

Commented:
Here is the info:

# termdef
xterm
# echo $TERM
xterm

Open in new window


Finction Keys:  VT100
Backspace Key:  Control 127
Destructive backspace turned off (disabled)

The following does fix the problem:

stty + space + backspace + return

Open in new window

Most Valuable Expert 2013
Top Expert 2013
Commented:
So try setting Backspace to Control-H (although Control-? always worked for me).

If this doesn't help I've no more idea. Perhaps it's some particularity of your Windows workstation - but I'm not a Windows expert.

Add the stty statement tou your .profile then. If you're using vi type

stty erase <space><CTL-V><Backspace><Enter>

HTH

Author

Commented:
I tried it and it worked

Apparently Control H works better with VT100

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial