Control Keys

This is a discussion on Control Keys within the C++ Programming forums, part of the General Programming Boards category; ok i wanna build a little menu program that will allow the user to hit "Esc" to exit the program, ...

  1. #1
    Fallen AndyBomstad's Avatar
    Join Date
    Jan 2005
    Posts
    52

    Control Keys

    ok i wanna build a little menu program that will allow the user to hit "Esc" to exit the program, hit "F1" to get help, and stuff like that but i dont know what the code for those keys are, do you know a site that like tutorials this? anyhelp would be great

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    escape produces 27 i think from memory and function keys are 59-68
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Fallen AndyBomstad's Avatar
    Join Date
    Jan 2005
    Posts
    52
    yeah...im still where i began lol, im trying to look around at ASCII charts but im not getting anything for the F1-F12 keys, and my second problem is i dont know how to make it initialize the command as SOON as its pressed and not need a return symbol

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,701
    The "code" depends on what API you're using the read keyboard input. If you don't know what API to use - that depends on what compiler/OS you're using.

    In the meantime: FAQ: How can I get input without the user hitting Enter?

    gg

  5. #5
    Fallen AndyBomstad's Avatar
    Join Date
    Jan 2005
    Posts
    52
    im using Windows Xp, and Dev-C++ complile

  6. #6
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,701

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. (Multiline) Edit Control Limit
    By P4R4N01D in forum Windows Programming
    Replies: 9
    Last Post: 05-17-2008, 12:56 PM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  3. Edit control in dialog picking up keys too fast
    By The Wazaa in forum Windows Programming
    Replies: 10
    Last Post: 03-08-2006, 01:39 AM
  4. Control keys
    By GaPe in forum C Programming
    Replies: 0
    Last Post: 03-03-2003, 08:54 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 10:44 AM

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