Re: [code] [textadept] '\n' in curses

From: Mitchell <>
Date: Sun, 12 May 2013 13:38:44 -0400 (EDT)


On Sat, 11 May 2013, Robert wrote:

> Hi Mitchell,
> On Fri, May 10, 2013 at 1:19 AM, Mitchell <> wrote:
> [..]
>>> It does not matter if I add [13] = '\n' to KEYSYMS (this is the value
>>> of the 'code' variable in the curses version). I noticed that this
>>> replacement was removed from 'core/keys.lua' a while ago, so I thought
>>> it could be a solution.
>>> In Textredux I had the same problem (and ended up hardcoding 13 to
>>> '\n') and hoped to be able to replace the 'keys'-hack in Textredux
>>> with Textadept's new key modes.
>>> Any ideas? Is 'Return' handled by curses before it reaches Textadept
>>> keys module?
>> Sorry for the delay in responding. I think you'll have to `return false`
>> from your '\n' key. `_M.textadept.command_entry.finish_mode()` does this
>> especially for curses behind the scenes.
> Didn't change the behaviour unfortunately.
> I tried assigning this 'Backspace' and 'Tab' and these work when I add
> 'return true' at the end of the key command.

Silly me, your key sequence should be '\r', not '\n' because the key code
for return is SCK_RETURN (13, not 10). For some reason, I also thought you
were using key modes for the command entry. I recognize the inconsistency
here though and need to work on rectifying it.

Thanks for the report,

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sun 12 May 2013 - 13:38:44 EDT

This archive was generated by hypermail 2.2.0 : Mon 13 May 2013 - 06:51:53 EDT