lua-users home
lua-l archive

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


Hi all,

I wrote a picklist program and a filepicker in C. See this for why I
did it:

http://www.troubleshooters.com/lpm/200801/200801.htm

http://www.troubleshooters.com/lpm/200802/200802.htm

Yes, it's deliberately written *without* ncurses. Ideally I'd like to
keep ncurses out of it -- ncurses has some memory leaks that aren't
cumulative or important but mess up valgrind, plus ncurses key
detection isn't much better than C's standard libraries.

My C versions have some bugs and lack some features. Writing them in C
was difficult. I'm going to try rewriting them in Lua. Now this may be
an exercise in futility because Lua might not be fast enough to
continuously scroll a list of items. But maybe it will be, especially
if I use LuaJIT.

Anyway, as long as I'm rewriting it in Lua, I might as well use any
keystroke detection available with Lua. Specifically, I need a module
that reliably detects cursor keys and can tell the difference between
Ctrl+F5 and Ctrl+Alt+F5, and in general sanely handle keypresses that
generate multiple codes. Anyone know of such a thing already existing
in Lua, or available for Lua?

Thanks

SteveT