keys?

This is a discussion on keys? within the C++ Programming forums, part of the General Programming Boards category; how to make a program write something? like, Code: if press f1, write blablabla...

  1. #1
    Banned
    Join Date
    May 2004
    Posts
    55

    keys?

    how to make a program write something? like,
    Code:
    if press f1,
    write blablabla

  2. #2
    Registered User ventolin's Avatar
    Join Date
    Jan 2004
    Posts
    92
    you may wish to look at the following:

    http://www.dotnet247.com/247referenc...31/158392.aspx

    basically find the mapping of the function key number in ascii

    eg F1 == 112

    and handle this appropriately eg (pseudo code)

    Code:
    if(key == 112)   // F1 key
    {
          //do something here
    }

  3. #3
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    can that be applied to C++?

    look around for kbhit()
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simulate Keys with a Keyboard Hook
    By guitarist809 in forum Windows Programming
    Replies: 3
    Last Post: 11-14-2008, 08:14 PM
  2. blocking or passing keys with global hook
    By pmouse in forum Windows Programming
    Replies: 4
    Last Post: 08-29-2007, 03:54 PM
  3. Pressed keys problem
    By Snip in forum Game Programming
    Replies: 2
    Last Post: 08-31-2005, 08:41 AM
  4. Interfacing with arrow keys...
    By adityakarnad in forum Game Programming
    Replies: 1
    Last Post: 08-30-2003, 11:25 PM
  5. Arrow Keys and Such
    By Thantos in forum Game Programming
    Replies: 5
    Last Post: 10-25-2001, 06:40 PM

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