strange keyboard delay

This is a discussion on strange keyboard delay within the Game Programming forums, part of the General Programming Boards category; Hello! I'm programming a game and I use keyboard input... I have an object on the screen and when an ...

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

    Cool strange keyboard delay

    Hello!

    I'm programming a game and I use keyboard input...
    I have an object on the screen and when an arrow key is pressed the object is moving to that direction while the key is pressed...
    When I press an arrow the object is moving to that direction the distance it should, than it delays, and than it moves correctly as it should...
    I can't figure out why the delay accours...
    I thought maybe it's the keyboard delay rate or repeate rate so I tried to change it but it didn't work!

    Please help me!
    I included the source so you can find the "symptoms"...

    I use Borland Turbo C++ 3.0

    Thank you for helping me!
    Attached Files Attached Files
    Last edited by zhopon; 12-27-2001 at 12:46 PM.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    reply

    What you mention is caused by the "windows keyboard handler", which makes a "delay" after the first press. It is possible to make your own hanler if you use DOS, or use DirectInput (Direct X). I don't know which platform you use...
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 07:26 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 09:00 AM
  3. Strange Keyboard
    By MadCow257 in forum Tech Board
    Replies: 5
    Last Post: 05-12-2005, 10:54 PM
  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. Strange keyboard??
    By ripper079 in forum C Programming
    Replies: 4
    Last Post: 08-20-2002, 07:27 PM

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