Keyboard

This is a discussion on Keyboard within the C++ Programming forums, part of the General Programming Boards category; HI! I want to chanfe my way of using the keyboard in C++. I have always written my script this ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    17

    Keyboard

    HI!

    I want to chanfe my way of using the keyboard in C++. I have always written my script this way:

    int a;

    for(;{
    a=getch();
    if(a==13) // it's ENTER
    {
    func(); // the do it so...
    }

    }//for

    but it's a very primitive way...

    Can somebody help me?
    (I would also like to use a script which does not interrup one operation like:
    when U are pressing arrows to move and than U want to shoot but without interrupting the moving operation...)

    THX in advance...
    I use Borland 5.02

  2. #2
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    look up virtual keys by searching the boards and/or the web.

  3. #3
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Heres a section on virtual keys from the FAQ, theres much more on here if you look for it.

    FAQ: Directional Keys - Useing in Console

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Detecting keyboard and mouse in linux
    By sameer.nalwade in forum C Programming
    Replies: 3
    Last Post: 11-22-2008, 03:24 AM
  2. Keyboard port using other that a keyboard
    By antoinelac in forum C++ Programming
    Replies: 4
    Last Post: 06-12-2008, 02:46 PM
  3. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 09:00 AM
  4. Game Design Topic #2 - Keyboard or Mouse?
    By TechWins in forum Game Programming
    Replies: 4
    Last Post: 10-08-2002, 03:34 PM
  5. : Difference between message queue and keyboard buffer...
    By Unregistered in forum Windows Programming
    Replies: 0
    Last Post: 02-21-2002, 02:47 PM

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