Thread: kbhit() and getch() Equivalent..

  1. #1
    Registered User
    Join Date
    Jan 2008

    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.

  2. #2
    "I Win!" by U. Lose vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    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
    To be or not to be == true

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. kbhit() for enter key? not working
    By yahn in forum C++ Programming
    Replies: 4
    Last Post: 04-03-2006, 02:44 AM
  2. Replies: 5
    Last Post: 11-26-2002, 10:34 PM
  3. Pausing for input, with kbhit() still detecting keys
    By Da-Spit in forum C++ Programming
    Replies: 5
    Last Post: 05-23-2002, 05:04 AM
  4. Getting the char from kbhit()
    By CodeMonkey in forum C++ Programming
    Replies: 5
    Last Post: 03-24-2002, 11:10 AM
  5. Making a getch and kbhit function?
    By Brian in forum C Programming
    Replies: 2
    Last Post: 03-03-2002, 11:50 AM