Re: [code] [textadept] MENU_KEY support

From: Mitchell <>
Date: Fri, 21 Feb 2014 12:05:24 -0500 (Eastern Standard Time)

Hi Martin,

On Fri, 21 Feb 2014, Martin \"eto\" Misuth wrote:

> [snip]
> However another annoyance popped up: I am heavy menu_key user.
> That is the key usually between right Super(Win) and right Ctrl keys.
> It is meant to be used for invoking context menu.
> With bit of playing around with xev and textadept core I got
> it to register with editor, however I am clueless on how to
> popup context menu programatically. There seem to be no such function in
> api.
> Also on linux, I found most GUI editors suck at providing proper
> support for this often underused key ( invoked from
> keyboard pops at most unexpected location and not at cursor position).
> I would love to get this working under textadept at least, with popup
> menu appearing relative to caret.
> Any hints please?

Unfortunately this is not possible at the moment. It used to be the case
that GTK bound Shift+F10 to popup the context menu, but that no longer
seems to be the case. At any rate, the popup would display at the position
of the mouse cursor, not the caret. In order to popup at the caret, you'd
have to have C code that retrieves the (x, y) GUI coordinates of the caret
(via Scintilla API), creates a fake event to popup the context menu at
said (x, y) coordinates, and then call Textadept's `lL_contextmenu()`. And
then of course to expose this to Textadept via Lua, you'd have to register
a Lua function, etc. etc. If you're feeling adventurous, feel free to
submit a patch, but I don't think this is trivial :(


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Fri 21 Feb 2014 - 12:05:24 EST

This archive was generated by hypermail 2.2.0 : Sat 22 Feb 2014 - 06:34:50 EST