DirectInput Help
Hi,
I have a gateway keyboard with special keys like play/pause, stop, forward, and backward for CD stuff. I trying to use Direct Input to control the keys to allow me to stop or pause my CD. It''s not working and I was wondering if it required any special initialization or something? I works for everything else.
Thanks
// code to check if key pressed
if (key.cKey [DIK_PLAYPAUSE] & 0x80)
c_Mp3->pauseMp3 ();
if (key.cKey [DIK_STOP] & 0x80)
c_Mp3->stopMp3 ();
Have you defined DIK_PLAYPAUSE as a value from 0 to 255. Direct
Input only gets the value of the extended ASCII character set.
If your keyboard can be set up so that those ''special'' keys are
bound to a value (from 129-255 say) then DI should be able to
identify them. Although DI is low level and might (??) bypass
any windows drivers.
If you plan to distribute your app/game then don''t forget that most computers without Gateway keyboards will need another method to indicate play/stop/pause.
,Jay
Input only gets the value of the extended ASCII character set.
If your keyboard can be set up so that those ''special'' keys are
bound to a value (from 129-255 say) then DI should be able to
identify them. Although DI is low level and might (??) bypass
any windows drivers.
If you plan to distribute your app/game then don''t forget that most computers without Gateway keyboards will need another method to indicate play/stop/pause.
,Jay
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement