Thread: Response to a key

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    37

    Response to a key

    I need to give the look of 'pages' in a console app, eg Right arrow key will show the next object, Left will show the previous object etc. Basically, I just need to know how to get that kind of a key response from the user.
    EDIT - Im sure it can be of even greater application, say, a menu where, for once, you dont have to enter a number for what option you want to take, you simply press the corresponding key! O_O I've seen it in another project, but couldn't see the source...
    Please help.
    -regards,
    ultrabot90
    Last edited by ultrabot90; 10-31-2007 at 12:48 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    37
    Thanks o_o
    But what if I need response for, say, an alphabet or a numerical key?
    Edit - Googled around for 'keyboard code map', no go, no index of keyboard codes...sigh.
    Last edited by ultrabot90; 10-31-2007 at 02:01 AM.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Maybe carry on reading the MSDN help pages for some of the functions listed in the FAQ.
    This will inevitably lead you to related functions and perhaps the answer you seek.
    Along the way, you may discover some other stuff you can use.
    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. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM