I manage an AIX box at work using PuTTY. I'm using ksh in vi-mode. When I press the Delete key (not backspace) the case of following characters is toggled instead of the character under the cursor being deleted. I'm not necessarily looking to change the behavior, as this is a very important server and I just don't want to make unnecessary changes, but I would like to understand why it's happening.
Steps to reproduce.
- Type some text:
root:common> ls -al
- Move the cursor over the dash. ([esc] hhh)
- Press the Delete Key. ([del])
- Strange things happen:
root:common> ls -AL
Expected behavior: The character under the cursor is deleted.
Actual behavior: Following characters have their case toggled.
That's the default behavior in ksh vi-mode. I suggest that if you want to erase try "x" key, as this is the correct key to delete a character in vi-mode. Also "X" will delete a key just before the one selected.
It sounds like the AIX server has different definitions for scancodes from the computer you are running putty from, and when you type delete it sees it as caps lock. If you "fix" this on the server you may find the local keyboard doesn't operate as expected. However, you can experiment with the putty keyboard settings (maybe change the home and end keys to rxvt, or the function keys and keypad to VT400).
If you are connecting to AIX 6 or AIX 7 check the following under your putty connection settings:
Category ==> Terminal ==> Keyboard
Set:
The Backspace key to the "Control-H" option
The Function keys and keypad to "XtermR6"
The "term" definitions & mapping used by AIX changed from AIX 5 to AIX 6+.
I am using these putty session on AIX 6.1 TL7 & AIX 7.1 TL1. I use the default settings for AIX 5.3.