Re: [code] Re: backspace again + translated strings

From: Mitchell <m.att.foicica.com>
Date: Wed, 13 Aug 2014 21:03:52 -0400 (EDT)

Hi,

On Wed, 13 Aug 2014, Joshua Krämer wrote:

> On 2014-08-13, 11:35, Niklas W wrote:
>
>> On Tue, 12 Aug 2014 08:33:52 -0400 (Eastern Daylight Time)
>> Mitchell <m.att.foicica.com> wrote:
>>
>>> On Sun, 10 Aug 2014, Niklas W wrote:
>>>> The keycode in keypress() becomes 0, not 127...
>>>
>>> I'm honestly not sure what the problem is. I would think if the
>>> terminal is set up to emit 127 for backspace, then libtermkey (the
>>> library that interprets keypresses) should recognize it. How did
>>> you do the remapping? Perhaps I can try what you did and figure out
>>> the problem.
>>
>> I tried every terminal emulator I have installed. All of them use 127
>> by default, except maybe for xterm.
>
> I use xterm, and it sends DEL = ASCII 127 (default configuration).
> Ctrl-v backspace shows ^?, accordingly.
>
> To check what code textadept receives, I have done the following, as
> suggested in http://foicica.com/lists/code/201312/1454.html:
>
> | uncomment line 250 in `core/keys.lua` and change it to read:
> | if CURSES then ui.statusbar_text = code end
>
> 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'). I've committed a change that segregates
these two keys. ^H is now reported as 'ch', while ^? is still reported as
'\b'. It's not perfect, but at least one can distinguish between Backspace
and ^H now.

(By the way, I tried to also segregate Tab from ^I, Enter from ^M, and Esc
from ^[ with no success; those keys will remain coupled.)

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 Wed 13 Aug 2014 - 21:03:52 EDT

This archive was generated by hypermail 2.2.0 : Thu 14 Aug 2014 - 06:42:20 EDT