Re: [code] [textadept] Key mapping in command_entry

From: Mitchell <>
Date: Wed, 18 Dec 2013 16:30:27 -0500 (Eastern Standard Time)

Hi Chris,

On Tue, 10 Sep 2013, Chris Emerson wrote:

> [snip]
> Another annoyance I've noticed is that I think keys can get lost when
> swapping between normal input and command_entry. For example, I have ':'
> mapped to start a command_entry mode - if I type the sequence ':b foo' too
> quickly, the 'b foo' won't end up in the command_entry. I think the same
> happens on the way out. I can reproduce this easily by pasting a string in,
> but it happens fairly regularly with my normal typing too, causing me to have
> to break my frenzied flow to backspace and start again more slowly.
> Anyway, I think (I haven't proved it, but it seems plausible and likely) that
> this is due to termkey and the curses input (used by CDKEntry) having separate
> input buffers. So in the example above, termkey's read the whole ':b foo'
> sequence (or in real life, maybe ':b f') from stdin, so curses never sees it.
> So my conclusion is that both textadept's main loop and the CDKEntry need to
> have common key input.

I've had some time to look into this and will implement some of your work
from your branch to fix the problem. I'm going to have CDK use libtermkey
directly (via a global "ta_tk" instance of libtermkey) instead of using an
analog to your "ta_wgetch". I'm a bit nervous about the async stuff (and
there are not enough lines of code available to implement it anyway!). It
probably won't be of much use to you, but I just wanted to say "thanks"
for your efforts and example code.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 18 Dec 2013 - 16:30:27 EST

This archive was generated by hypermail 2.2.0 : Thu 19 Dec 2013 - 06:43:25 EST