lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Sep 28, 2005 at 02:44:25PM -0400, Aaron Brown wrote:
> > I plan to give my application the same kind of
> > feeling as the mutt mail user agent (for those who
> > know it).
if you need support for any weird terminal manufactured
15 years ago, then maybe ncurses is your "friend",
but it is usually also the source of much headache.

most advanced terminal controls have no use but to save bandwith
on serial lines much slower than GPRS mobile internet.

> > Are there terminal control facilitites in Lua that
> > I could use or would I have to use ncurses from
> > the C part of my program to get fine control over
> > key mappings, split windows, color, etc.?
> 
> Since Lua is written in ANSI C, it cannot do what you want,
> so you will have to use ncurses or another terminal IO
> library.
however, if you are targeting xterms and modern consoles,
you can easily do it yourself in lua without too much
special casing (all but the ioctl for stty -raw).

see http://luaforge.net/frs/download.php/471/slnspider-0.9.gz
for a very small example of a card game in a unicode xterm
including mouse wheel control in pure lua with an exec of stty.