Jump to content
  • Advertisement
Sign in to follow this  
n0ob

Windows message hook..

This topic is 4270 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

Hey there! I recently got a laptop, but there is no windows key on the bottom where I like it :( Instead, there's the 'Fn' key, so what I'm trying to do is write a message hook to intercept the message. From there I can emulate a windows key event. I've used Spy++ to watch messages, and I've determined that there's a WM_USER+4097 message that's sent to certain programs (such as a program called "Fn-esse" installed on my laptop which lets you configure function key combos to execute commands). I want to get this message! I've used low-level keyboard hooks before, and I've been trying to use it again, or the WH_CALLWNDPROC hook... but I'm having no luck. In fact, I keep crashing explorer and visual studio.. At one time I couldn't get the keyboard hook to work because it would crash, but then I switched the project back to ASCII single-byte shizzle (thanks 2005..) and it worked. Buuut, it's still crashing for the other hooks I've been trying. Does anyone have any tips on how I can determine when the Fn key is pressed? If hooks are the answer, why do you suppose I'm crashing? I'm calling CallNextHookEx when nCode is less than 0 like they say you should.. Thanks for your time!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Ctrl + Esc = Windows Key.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!