Response to a key

This is a discussion on Response to a key within the C++ Programming forums, part of the General Programming Boards category; I need to give the look of 'pages' in a console app, eg Right arrow key will show the next ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,674
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,674
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 12:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 09: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

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