Thread: Key Press Event in C language for press button

  1. #1
    Registered User
    Join Date
    Dec 2012
    Posts
    37

    Key Press Event in C language for press button

    Hi all,

    Im trying to do a key press button that requires 2 different types of presses: long press and short press.

    Does anyone know how to make a key handler event or a key press event in C language?

  2. #2
    Registered User
    Join Date
    Dec 2012
    Posts
    307
    this should be a good start!

    GetAsyncKeyState() "key pressed"

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Except kim15 is doing something on some kind of dev-board.
    One button to have two values.

    I thought we did all this key press event stuff already - why is this a new thread?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program keeps shutting off when I press a button
    By Megamanenm in forum Game Programming
    Replies: 2
    Last Post: 01-11-2009, 03:21 AM
  2. Emulating button press.
    By System_159 in forum C++ Programming
    Replies: 6
    Last Post: 09-29-2006, 11:19 PM
  3. render OpenGL geomatry on dialog box button press
    By psychopath in forum Windows Programming
    Replies: 0
    Last Post: 08-20-2004, 08:49 PM
  4. Replies: 0
    Last Post: 06-26-2004, 05:59 PM
  5. MFC: Change the color of static text with button press?
    By BrianK in forum Windows Programming
    Replies: 2
    Last Post: 06-16-2004, 11:03 PM