Re: Key Command Reference?

From: James Snyder <>
Date: Mon, 23 Mar 2009 08:16:14 -0700 (PDT)

I had found key_commands.lua and had gotten the basic key commands.
Thanks for the tip on how those definitions translate.

There is the reason, though, aside from personal programming that
makes this editor interesting, and that is as a possible IDE for an
embedded Lua platform I've recently been contributing to: Essentially the project runs full Lua on
embedded microcontrollers allowing the user to have access to a live
interpreter while working with the serial, analog-to-digital, general
purpose IO, etc.. peripherals on the device.
(a new release is coming out shortly, and the docs will be much more
complete at that stage)

The original author has been thinking about using SciTE as the basis
for an IDE, but while looking around I found Textadept, which is even
more Lua-friendly since much of it is written in Lua. Why I'm
mentioning the key bindings thing is that it would be nice to have the
editor be not only power-user friendly, but also friendly to more
novice users or ones just familiar with figuring out key bindings
through menus. Since it is all controlled by lua, it seems like all of
this could be customized fairly easily.

I don't know what the project goals are for Textadept, and so I don't
presume to know what the developers do or don't want the editor to
behave like. It does, however, seem like it would be uniquely
friendly for talking to and working with a device that is running Lua

Meanwhile, I'm also giving it a go for a bit as a primary editor :-)

Thanks for the help and comments.


On Mar 23, 7:28 am, Alex <> wrote:
> 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 <> wrote:
> > On Mar 22, 7:31 pm, mitchell <> 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 - 11:16:14 EDT

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