X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_63,J_CHICKENPOX_83,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <20090530055318.GA4569@ednor.casa.cgf.cx> References: <4A1C9952 DOT 8040100 AT cornell DOT edu> <4A1D9D05 DOT 40407 AT cornell DOT edu> <838wkhsm5e DOT fsf AT gnu DOT org> <4A1E7C50 DOT 8020505 AT cornell DOT edu> <416096c60905280702m6e4cb748ic305be3592d81c70 AT mail DOT gmail DOT com> <83ws8042o2 DOT fsf AT gnu DOT org> <4A1FD2B7 DOT 90506 AT cornell DOT edu> <416096c60905290538t1989ba8cq4987a0197c2b61cd AT mail DOT gmail DOT com> <416096c60905291459y37ac57a2le64d451d8c5e640a AT mail DOT gmail DOT com> <20090530055318 DOT GA4569 AT ednor DOT casa DOT cgf DOT cx> Date: Sat, 30 May 2009 08:33:55 +0100 Message-ID: <416096c60905300033g105ddd7elf96812b0d000f731@mail.gmail.com> Subject: Re: emacs -nw keypad, tpu-edt.el, and C-h From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Christopher Faylor wrote: >>Now of course if emacs can translate low-level console I/O as it sees >>fit, then the Cygwin DLL could also be able to translate Backspace into >>^? =C2=A0characters rather than ^H, in CYGWIN=3Dtty mode anyway. =C2=A0So= I had a >>look at fhandler_console.cc. =C2=A0It already uses ReadConsoleInput(), so >>mapping from VK_BACK to ^? =C2=A0might be fairly straightforward actually. > > And a patch would have been appreciated... Sorry, I didn't think I understood the code enough for that. > However, I have made the change to Cygwin to translate backspace to ^?. > It will be in the next snapshot. Great, thanks! Does this apply both with and without CYGWIN=3Dtty? And I guess native console applications won't be affected by this? The relevant termios default setting will need to change accordingly, either by changing the definition of CERASE in include/sys/termios.h: -#define CERASE CTRL('H') +#define CERASE CDEL Or by changing the initialisation in fhandler_termios.c: - tc->ti.c_cc[VERASE] =3D CERASE; + tc->ti.c_cc[VERASE] =3D CDEL; The cygwin section in /etc/termcap doesn't have a kb entry, so luckily no change needed there. terminfo has an entry for backspace though: $ tput -T cygwin kbs | cat -v ^H So this has to to change as well: +++ terminfo.src 2009-05-30 07:50:44.893933600 +0100 @@ -5221,7 +5221,7 @@ - kbs=3D^H, kcub1=3D\E[D, kcud1=3D\E[B, kcuf1=3D\E[C, kcuu1=3D\E[A, + kbs=3D^?, kcub1=3D\E[D, kcud1=3D\E[B, kcuf1=3D\E[C, kcuu1=3D\E[A, And then there are rxvt and xterm and their termcap and terminfo entries as well ... One more thing: with your change, Alt can be used to override ^? and get ^H instead. Usually though, Ctrl is used as the modifier for this, whereas Alt acts as Meta (i.e. it sends a ^[ prefix). Andy -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/