Thread: Keyboard

  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
    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
    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.

    http://cboard.cprogramming.com/showt...threadid=25946

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, 04: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, 10: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, 03:47 PM