lua-users home
lua-l archive

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


On Sun, Jun 18, 2006 at 02:29:37PM +0300, Asko Kauppi wrote:
> The reason, again, is that such a feature is not ANSI C, so... you'll  
> need an OS specific C binding.
OS specific yes, C binding not necessarily.

On *nix you may get by with:
os.execute("stty raw -echo") -- on startup
...
local k = io.read(1) -- this may buffer more than one key,
	-- however returns as soon as one key is available
...
os.execute("stty sane") -- restore terminal befor exit


regards