This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cygwin 1.7.5-1: backspace does not work correctly when using "set -o vi" in pdksh in the console window

When using the "set -o vi" mode in pdksh, the backspace key is no longer a 
movement key - it does not make the cursor move to the left over the 
existing characters leaving them unchanged when the command line edit mode 
is entered using the ESC key.  The cursor does not move at all.

Steps to reproduce:

1) Change the startup cygwin batch file
        @echo off

        chdir C:\cygwin\bin

        pdksh -l -i
2) Once the console window is open, enter the command "stty erase ^?" 
(this is the incorrect character value (0x7f) that the backspace key is 
now sending in the console window - it should be sending ^H (0x08) like it 
has for decades in every terminal interface I have used, except for one - 
the 0x7f value is what used to be generated by the Delete key.)
3) Enter the command "set -o vi"
4) Start typing a new command (e.g., "xyzzy")
5) Press the ESC key to enter the command line edit mode (the cursor 
positions itself on the last "y")
6) Press the backspace key

Expected result:                the cursor backs up over the characters 
leaving them unchanged
Actual result:          the cursor does not move

The ability to modify the character value generated by the Backspace key 
is a logical solution rather than forcing people to accept a change to the 
0x7f value.  I have many programs that rely on the value generated by the 
Backspace key being 0x08.  The PuTTY program allows the user to choose 
which character values get generated by the Backspace and Delete keys, and 
I consider this a nice feature as it allows programs to behave as expected 
no matter what interface they are expecting.

Thank you,

- Phil
Phil Rising, Principal Consultant in the Managed Testing Practice for 
Sogeti USA, LLC
Contracted to Nationwide, Corporate Internet and Contact Center Solutions 
(Work) (614) 677-7445, (Fax) (614) 677-7046
Alternate email:

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]