lua-users home
lua-l archive

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

> Is there a way to gather single keystrokes from the user in lua?
> or perhaps a way to see if any input is waiting without blocking on the 
> request?

In base Lua, no way to do this, it is highly dependent on the system you are
For example, you don't use the same way in MS-Dos, in Linux, VMS, Windows or

> I want to write a game, but I need the computer to keep working while 
> the user
> decides what key top press.

Ah, it remind me of the good old days of Basic programming on 8-bit systems

In short, depending on what system your game is running (graphical? pure
text?), you probably have to 
write a C function to call the correct API/system call, and wrap it for use
in Lua.


Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist

NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter

+++ GMX - die erste Adresse für Mail, Message, More! +++