Thread: tracking keyboard press/release events

  1. #1

    tracking keyboard press/release events

    i'm coding a program that will need to keep track of when the user presses and releases a key on the keyboard. What methods could i use to keep track of these actions, is there some flag or other way to tell when the user releases a key. I plan on using ctime to keep track of the exact times but need something to alert me of the events.

  2. #2
    Registered User
    Join Date
    Aug 2001


    look up kbhit() and getch()

    while( kbhit() == 0);
    int value = getch();

    something like that .... But you should really be doing windows programming.

  3. #3
    Registered User
    Join Date
    Jul 2002
    right, "events" are really not the way DOS works. Windows get's messages for keyboard presses. DOS is just too procedural for that.
    always looking, make an offer. get me out of this place.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to handle keyboard and mouse events for all windows
    By manav-II in forum Windows Programming
    Replies: 3
    Last Post: 08-25-2008, 09:03 AM
  2. get keyboard and mouse events
    By ratte in forum Linux Programming
    Replies: 10
    Last Post: 11-17-2007, 05:42 PM
  3. simulate keyboard events on windows xp
    By xximranxx in forum Windows Programming
    Replies: 4
    Last Post: 04-26-2007, 05:43 PM
  4. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  5. Keyboard events, dialog boxes.
    By Brian in forum Windows Programming
    Replies: 1
    Last Post: 10-03-2003, 10:20 AM