Re: [code] Key Chains

From: Michael Richter <ttmrichter.att.gmail.com>
Date: Fri, 1 Feb 2013 10:27:28 +0800

Thanks Robert and Mitchell. The whole keychain thing is much clearer now.

On 1 February 2013 00:31, Mitchell <m.att.foicica.com> wrote:

> Michael,
>
> On Thu, 31 Jan 2013, Michael Richter wrote:
>
> Well, I guess the first problem I'm having is that I can't see anything in
>> the lua/init.lua at or near line 153 that does anything with any keys.
>> This is what I'm seeing (149-159):
>>
>> ---
>> -- Container for Lua-specific key bindings.
>> -- @class table
>> -- @name _G.keys.lua
>> keys.lua = {
>> [keys.LANGUAGE_MODULE_PREFIX] = {
>> m = {io.open_file,
>> (_HOME..'/modules/lua/init.**lua'):iconv('UTF-8', _CHARSET)},
>> },
>> ['s\n'] = M.try_to_autocomplete_end,
>> }
>>
>> Where is anything being bound to anything? And when I try Ctrl+L,M ...
>> nothing happens. I think I'm just not understanding the whole premise
>> here.
>>
>
> Sorry for the confusion. As Robert pointed out,
> "keys.LANGUAGE_MODULE_PREFIX" is the beginning of a keychain. For GUIs,
> LANGUAGE_MODULE_PREFIX is 'cl' (Ctrl+L on non-OSX and Cmd+L on OSX). Since
> the table assigned to the key is an assignment table, the key is recognized
> to be the prefix of a keychain. When Ctrl+L is typed, Textadept waits for
> the next key to perform an action. If the key is M (not Shift+M), then it
> opens the Lua module. Otherwise, it doesn't recognize the chain and resets.
>
> I hope that clears up the confusion.
>
> Cheers,
>
> Mitchell
> --
> 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.
>
>

-- 
"Perhaps people don't believe this, but throughout all of the discussions
of entering China our focus has really been what's best for the Chinese
people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-- 
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 31 Jan 2013 - 21:27:28 EST

This archive was generated by hypermail 2.2.0 : Fri 01 Feb 2013 - 06:40:26 EST