Jump to content
  • Advertisement
Sign in to follow this  
kerplunkwhoops

Best option for exclusive access to keyboard in .NET

This topic is 3969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello Can someone help me in the right direction with a project I am doing. The application I am creating must be written in .NET 2.0 (or 3.5 when I migrate). I have a windows pc with two keyboards attached to it. One is the default keyboard for doing normal windows stuff. The other is to be used exclusively by my application for controlling the my software. I want the second keyboard to have exclusive control with my application and even when the application loses focus, all keystrokes must still be transmitted to my application. My first thoughts are to use MDX 1.1 as it contains everything I need. It allows me to enumerate all the keyboard devices, allow exclusive access to a particular keyboard and is integrated with .NET. But MDX has long been deprecated and I am uncertain of how it will perform under Vista. SlimDX is another option, but I cannot see any way to enumerate all the keyboard devices (GetDevices). It only allows me to select the default keyboard. The documentation is very slim, so can anyone confirm this? I haven't looked at 'DirectX 8 for Visual Basic Type Library' yet, but I assume it will be less supported than MDX? Can anyone recommend the best option for me? Many thanks Paul

Share this post


Link to post
Share on other sites
Advertisement
Forgot to mention XNA. Again, I cant see any way to enumerate all the keyboard devices and select a particular one. Is there an option for exclusive and background access aswell?

Share this post


Link to post
Share on other sites
You'll need to use raw input to read it. See http://blogs.msdn.com/michkap/archive/2005/11/17/492328.aspx for details.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!