Thread: Gp142--help getting kybrd input

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    4

    Question Gp142--help getting kybrd input

    Ok, the program I'm working on is a small game using the gp142 graphics library. I have the entire program done, and working except for the user input that contols the movment of their character on the screen. I need help getting the program to register a user key press at anypoint while the program is running.

    I'll be up all night, so message back or AIM me at xxxManCheesexxx

    ~Alucard~

  2. #2
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    You might try some sort of loop that scans the keyboard for values (eg values of the arrow keys) . I think an if loop would work for determining the keypress and resolving it.

    if (keypress=='X') { //execute} where X is the code gernerated by the key

    or if it is windows (winapi) code, you could borrow some of the DirectX functions, i cant remember them of the top of my head as i have not done dx for so long, but there are the DirectInput routines which can also accomadate for mouse, joystick, ffeedback etc..

    hth
    Monday - what a way to spend a seventh of your life

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Input statement problem
    By une in forum C Programming
    Replies: 3
    Last Post: 05-29-2007, 11:16 PM
  2. For loop problems, input please.
    By xIcyx in forum C Programming
    Replies: 2
    Last Post: 04-22-2007, 03:54 AM
  3. I would love some input on my BST tree.
    By StevenGarcia in forum C++ Programming
    Replies: 4
    Last Post: 01-15-2007, 01:22 AM
  4. Stupid Question
    By digdug4life in forum C++ Programming
    Replies: 22
    Last Post: 05-17-2005, 11:43 AM
  5. Help with Input Checking
    By Derek in forum C Programming
    Replies: 7
    Last Post: 06-17-2003, 03:07 AM