delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/04/19/18:52:58

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,TW_PD,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Subject: Cygwin 1.7.5-1: backspace does not work correctly when using "set -o vi" in pdksh in the console window
X-KeepSent: DDF534D7:00AB98DE-8525770A:007D4441; type=4; name=$KeepSent
Message-ID: <OFDDF534D7.00AB98DE-ON8525770A.007D4441-8525770A.007DAE21@lnotes-gw.ent.nwie.net>
From: RISINGP1 AT nationwide DOT com
Date: Mon, 19 Apr 2010 18:52:45 -0400
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

        C:
        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 
Team
(Work) (614) 677-7445, (Fax) (614) 677-7046
Alternate email: Phil DOT Rising AT us DOT sogeti DOT com



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019