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

From: Robert <rob.g.att.web.de>
Date: Tue, 7 May 2013 16:46:02 +0200

Hi,

the following key mode
keys.test = {
  ['\n'] = function() gui.statusbar_text = 'ENTER' end,
  ['esc'] = function() keys.MODE = nil end
}

keys['cp'] = function() gui.statusbar_text = 'Test'; keys.MODE = 'test' end

works in the GUI version but not in the curses version. Using curses a
new line is added.
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?
Robert

-- 
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 Tue 07 May 2013 - 10:46:02 EDT

This archive was generated by hypermail 2.2.0 : Wed 08 May 2013 - 06:53:22 EDT