View Single Post
  #3  
Old 01-01-2018, 11:10 PM
hastegag hastegag is offline
Registered User
hastegag's PC Specs
 
Join Date: Dec 2016
Location: Northeast US
Posts: 520
POST ID # = 933287
hastegag Reputation: 20
Default

not to revive an old post, but I was trying to get the register_callback.cpp example file from the latest SDK to recognize media keys. I was unable to simply add the VK_MEDIA_NEXT and STOP etc to the struct at the top of the example and in the includes and have them register within the callback example, but I'm assuming that was because the scope of that project was focused on the proprietary keys and the DLL call has something to do with it?

I realized the while loop at the bottom was a super bootleg way (once you comment out the getchar functions of the std io), of getting these to react with that same above mentioned function in windows.h of getasynchkeystate or similar.

This was my approach, but don't know if it is helpful to anyone:
http://www.smithany.com/register_callback.cpp

Very bottom being the relevant stuff. Yannicked, thank you for posting the low level keyboard hook, I will be trying that in place of what I'm doing now but I need to get a better handle on it.