Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

input

Status
Not open for further replies.

toast

Programmer
Apr 16, 2001
6
0
0
CA
how can i get a single character from the keyboard without paausing the program?
so it looks to see if a button has been pressed, and if one hasnt, then it moves on.
scanf doesnt work, getch doesnt work, bioskey(0) or (1) dont work
 
actually kbhit() works fine

but another thing is, how do i get rid of the repeat delay thing. where you hold a button, it prints one character, waits THEN begins to rapidly draw characters
i want to get rid of this delay!
 
It sounds like you may be writing a game...
For more flexable control of the keyboard, you would need to write your own keyboard handler: ie hooking the keyboard interrupt INT 9 and reading the scan codes. This will allow the user to press two or more keys at once etc...
There may be a way to get rid of, or reduce, your repeat delay (Some bioses support this and it can also be done in Windows control panel)
Good luck.



Kim_Christensen@telus.net
 
hmmm, sounds like im gonna have to learn some asm.....

and actually, i am gonna make a game, but right now im still working on my first program in C, its just a little dot that drives around and bangs off the walls(its actually fun!) im just learning the basics i'll need later

thanks for the help guys!
 
how do you make a device hander?
i havnt found anything about device handlers

i know what you mean by device handler, but ive never worked this close with the hardware before, so im completely lost
 
Status
Not open for further replies.

Similar threads

  • Locked
  • Question
Replies
4
Views
30
Replies
3
Views
33
Replies
3
Views
41
Replies
2
Views
20

Part and Inventory Search

Sponsor

Back
Top