Re: [code] [textadept] issue with keypress event in command entry

From: Mitchell <>
Date: Sat, 13 Jun 2020 13:30:22 -0400 (EDT)

Hi Ophelia,

On Sat, 13 Jun 2020, Ophelia Bhuletova wrote:

> Hi, Mitchell!
> I have a keypress event handler that consumes Enter, Space, brackets, and double-quotes.
> When the command entry is active, the keypress event is triggered and my handler
> renders the command entry unusable, as the above keys are never received.
> (And some damage to the actual buffer occurs, as that's where the handler does its thing.)
> I hoped I could do an early return based on ui.command_entry.height, but its value doesn't seem to reflect the visibility of the command entry - it's never 0 or nil.
> Is it a deliberate choice that the keypress event is triggered from the command entry? If so, what can I do to tell that the command entry is active?

There is not currently an API for this. For now, I think you can test `keys.mode == '_command_entry'`. If that test is true, the command entry should be active.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sat 13 Jun 2020 - 13:30:22 EDT

This archive was generated by hypermail 2.2.0 : Sun 14 Jun 2020 - 06:41:16 EDT