Thread: Key Movement

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    20

    Exclamation Key Movement

    I'm using Borland C++. I'm going to make a game without graphics. Using the arrow keys. How do you get the program to sense the arrow keys are being pushed?

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    If you are making it using the Windows API you can use the WM_KEYDOWN message and check for the wParam for the key. The arrow keys are: VK_LEFT, VK_UP, VK_RIGHT, and VK_DOWN.
    If you are doing console or else, then I am not sure, sorry.

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