C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 03-11-2008, 12:39 AM   #1
Registered User
 
Join Date: Jan 2008
Posts: 66
kbhit() and getch() Equivalent..

I'm trying to create a control function for my program that can simulate the kbhit() and getch() combination, it should be using standard C and windows API without using any external libraries. Can anyone give me suggestions how to do this?

I tried using GetAsyncKeyState() and ReadConsoleInput() but it doesn't work like exactly as I want them.
ThLstN is offline   Reply With Quote
Old 03-11-2008, 02:44 AM   #2
CSharpener
 
vart's Avatar
 
Join Date: Oct 2006
Posts: 5,242
Because it is windows specific - It should be in Windows forum

You should post your code, explain what it does and how it is different from what you expect
__________________
If I have eight hours for cutting wood, I spend six sharpening my axe.
vart is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
kbhit() for enter key? not working yahn C++ Programming 4 04-03-2006 02:44 AM
is there a DOS/UNIX/ANSI C compatible getch() like function? Unreg C++ Programming 5 11-26-2002 10:34 PM
Pausing for input, with kbhit() still detecting keys Da-Spit C++ Programming 5 05-23-2002 05:04 AM
Getting the char from kbhit() CodeMonkey C++ Programming 5 03-24-2002 11:10 AM
Making a getch and kbhit function? Brian C Programming 2 03-03-2002 11:50 AM


All times are GMT -6. The time now is 01:21 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22