Archived

This topic is now archived and is closed to further replies.

Quantum

Sending key presses to a DInput app possible?

Recommended Posts

I''m writing a program that intercepts keyboard combinations and then sends another key based on the combination. To intercept the keyboard presses, a windows hook works, and then the key press can be passed on with keybd_event(). But this does not work if the foreground application is using DirectInput. Does anyone know of any way of fooling a DI app into thinking that a key is down? I hope it''s possible..

Share this post


Link to post
Share on other sites
Thanks. I tried that. SendDeviceData fails, returning E_NOTIMPL - "The method is not implemented. This value might be returned if a driver does not support a feature necessary for the operation.". Any ideas why this might be? I''m running Win2k w/ DX8, and the docs don''t say anything about the function not being implemented anywhere..

Any other ideas, anyone?

Share this post


Link to post
Share on other sites
DirectX is a specification, in a way. It is up to the hardware manufacturers for each subsystem (graphics, sound, etc) to actually implement the interfaces in their drivers. A particular manufacturer may feel that certain functionality is not as important to its target demographic, and may thus eliminate that implementation or provide a very rudimentary version.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites