View Full Version : How to scan for keypresses?
Unregistered
07-08-2002, 06:27 AM
All I need to explore a plethora of possibilities is to know how on earth to scan for keypresses?
I mean sort of like
while(1) {
if (keypressed)
move(UP);
}
...so I can make realtime games/apps.
Is this included in ncurses?
Chronom1
07-08-2002, 09:36 PM
It says that STDIN_FILENO is undeclared function. HELP
Im using G++ compiler
shaik786
07-08-2002, 11:38 PM
STDIN_FILENO is the file descriptor of your terminal you are manipulating. This is usually 0 for your terminal.
Chronom1
07-09-2002, 10:02 AM
Ok Im using this kbhit function that was made here, but there is one problem. Rather than just returning true or false if a key was hit it just stays there and waits in the function freezing up the program until a key is pressed. HELP PLEASE
Chronom1
07-09-2002, 01:18 PM
Ive determined I want to use forks. How do I use them. I am having trouble finding information on them. Fork()
Please help
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.