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

From: Mitchell <m.att.foicica.com>
Date: Thu, 14 Aug 2014 08:39:20 -0400 (Eastern Daylight Time)

Niklas,

On Thu, 14 Aug 2014, Niklas W wrote:

> 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?

Yes, I don't know why I cannot reproduce your case. Maybe it's a locale
or keyboard issue.

> 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, ...

Thank you for your efforts. I will make this change.

Cheers,
Mitchell

-- 
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:39:20 EDT

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