Re: [code] menukey keyboard context menu attempt

From: Mitchell <m.att.foicica.com>
Date: Thu, 25 Feb 2016 09:09:01 -0500 (EST)

Hi,

On Mon, 1 Feb 2016, Mitchell wrote:

> Hi Martin,
>
> On Mon, 1 Feb 2016, Martin \"eto\" Misuth wrote:
>
>> [snip]
>>
>> The idea is to have context menu popup with keyboard, leaving some hard to
>> press/remember key-chords free, and to allow user use ctx.menu more
>> efficiently from within lua modules.
>>
>> It should work with both normal navigation and virtual space enabled.
>> There is problem I am unable to solve, when menu is invoked near bottom of
>> the
>> screen, it "collapses", but this is better than nothing.
>>
>> [snip]
>>
>> Is this patch ok?
>
> Thanks for the patch. I'll see if I can work in something similar that may
> solve the bottom of the screen issue. However, I cannot promise it will be
> applied. Regardless, I am impressed and happy to see you've been able to
> accommodate the menu key on your own :)

I spent some time on this recently and thought to make it more generic: a
new `ui.popup_menu()` function that takes a menu argument (like
`ui.context_menu`). That way you can bind a key to it like the menu key to
show a menu like the context menu. However the work-in-progress patch is a
bit on the large side and pushes Textadept's core over 2000 lines. Until I
can slim down the core, I won't be working on this further. The SciTE text
editor[1] (also based on Scintilla) had some useful menu positioning code
I copied. I think it has solved the "collapsed" menu problem towards the
bottom of the screen. You might want to take a look :)

Cheers,
Mitchell

[1]: http://scintilla.org/SciTE.html

-- 
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 Thu 25 Feb 2016 - 09:09:01 EST

This archive was generated by hypermail 2.2.0 : Fri 26 Feb 2016 - 06:44:52 EST