PDA

View Full Version : DXInput key up?



mitch
11-04-2003, 06:35 PM
hard to explain form me but can you make somthing when you let lose of key up you can add something?

with the use of DXInput.

i wanna make something like if the key is pressed then timer1.enabled:=true

and when you let lose of the key then timer1.enabled:=false;

Clootie
12-04-2003, 12:23 PM
Are you sure you want to handle this with DirectInput?
Probably it's better to watch for standart Windows messages WM_KEYDOWN WM_KEYUP?

DInput way to work with keyboard is:
1) Keyboard is BIG 101+ key keypad
2) Programmer should poll keyboard device for presed keys
So you (in cycle) poll keyboard device for 256 byte array containing information is key pressed, comparing to previous poll you decide what key is released an fire your "timer1.enabled:=false;" command.