[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Remembering input from my keyboard
- From: Paul Bonser <misterpib@...>
- Date: Fri, 25 Mar 2011 12:07:46 -0500
On Wed, Mar 23, 2011 at 6:05 PM, Sam Roberts <vieuxtech@gmail.com> wrote:
> 2011/3/23 Mateusz Burzyński <mateuszburzynski@gmail.com>:
>> is it possible in LUA to read and remember input made from my keyboard? I
>> would like to make few commands based upon short keys combinations.
>> if yes, how to do it?
>
> If lua is bound to GNU readline, which it should be if readline exists
> on your system, you can use readline to define macros:
>
> http://tiswww.case.edu/php/chet/readline/rluserman.html
You can take readline.c from here, compile it to get a readline.so
which you can put in your LUA_CPATH to get access to it. Also, ilua
itself is pretty nice and does things like printing tables' contents,
which is handy when you're testing things from the lua commandline.
--
Paul Bonser | http://probablyprogramming.com | @pib