Re: Key Command Reference?

From: Alex <alex.bep....at.gmail.com>
Date: Mon, 23 Mar 2009 05:28:11 -0700 (PDT)

James,

have you already looked at the file core/ext/key_commands.lua in the
Textadept directory? I find it very readable. So much so that I think
any other reference would be a waste of time.

Some things to be aware of:
* keys.css stands for Ctrl+Shift+S
* The command
   { 'goto_buffer', v, 1, false }
means that
   view:goto_buffer(1, false)
is invoked when the key combination is pressed. Other commands for the
current view and the current buffer are defined in a similar way.

- Alex

On Mar 23, 6:52 am, James Snyder <jbsny....at.gmail.com> wrote:
> On Mar 22, 7:31 pm, mitchell <mforal.n....at.gmail.com> wrote:
>
> > Hi James,
>
> > > I have a few questions/comments based on using the editor for a short
> > > period of time:
> > > 1. Is there a built-in way to list key combinations associated with
> > > menu commands along with the menu commands?
>
> > You could modify core/locale.lua for menu items and add key shortcuts,
> > but there is no automated way to do this. I thought about adding menu
> > accelerators, but since key commands are dynamic (and chained), that
> > would not work well at all.
>
> OK, this is what I figured. Regarding the latter part, presumably
> since the menus and the bindings are dynamic it should be possible to
> to update the binding listings in the menus if necessary?  Regarding
> chaining, I'm not suggesting that they'd really need to be registered
> as accelerators through the GTK menuing system, I'm considering them
> more as a reference.
>
>
>
> > > 2. Is there a way to generate a quick-reference for commands defined?
>
> > I'm not sure what you mean by commands. Every Lua function is
> > documented in LuaDoc, but 'core/ext/menu.lua's 'actions' table uses
> > pretty much every module-level function available; that might be a
> > good place to look.
>
> Sorry, I wasn't clear, this was an extension of the first question, I
> meant key commands when I just said commands.
>
> Thanks for the answers :-)
>
>
>
> > Hopefully that helps,
Received on Mon 23 Mar 2009 - 08:28:11 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:37:43 EST