Ssh – Delete key not working when PuTTYed in to AIX box using Korn shell

aixkshputtyssh

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.

  1. Type some text:
    root:common> ls -al
  2. Move the cursor over the dash. ([esc] hhh)
  3. Press the Delete Key. ([del])
  4. Strange things happen:
    root:common> ls -AL

Expected behavior: The character under the cursor is deleted.

Actual behavior: Following characters have their case toggled.

Best Answer

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.