Re: [code] Re: backspace again (solved)

From: Niklas W <nikw.att.gmx.com>
Date: Thu, 14 Aug 2014 14:07:16 +0200

On Wed, 13 Aug 2014, Mitchell wrote:

> Hi,
>
> On Wed, 13 Aug 2014, Joshua Krämer wrote:
> ...
> > Strangely, both backspace and Ctrl-h are shown as "8", although xterm
> > sends ASCII 127. Moreover, in the mentioned thread, it was also
> > reported that backspace is shown as "" in putty, although it should
> > send ASCII 127, too.
> >
> > Maybe there is a bug in libtermkey?
>
> Okay I've spent some time looking into this and discovered that libtermkey
> likes to combine ^H and ^? into a backspace symbol (which Textadept then
> interprets as ASCII 8, or '\b').

You both get 8, on linux?

This is what happens here after a ^?:

textadept.c:2513: c = keysyms[key.code.sym]; // = 0

where
  key.code.sym = TERMKEY_SYM_DEL = 6 (termkey.h)
    This is correct since DEL is 127.
  int keysyms[] = {0,SCK_BACK,SCK_TAB,SCK_RETURN,SCK_ESCAPE,0,0,SCK_UP,SCK_DOWN, ...
    Here, keysyms[6] is 0! The win32 keysyms has it though...

So, I changed this on line 2506 and it works:

int keysyms[] = {0,SCK_BACK,SCK_TAB,SCK_RETURN,SCK_ESCAPE,0,SCK_BACK, ...

Regards
Niklas

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 14 Aug 2014 - 08:07:16 EDT

This archive was generated by hypermail 2.2.0 : Fri 15 Aug 2014 - 06:28:05 EDT