Skip to main content
gamedev.net
🔒 Locked

Win API - VM_KEYDOWN

Started by Leadorn May 29, 2002 at 11:04 AM 5 replies 350+ views
Original Post
Leadorn
Leadorn
Hail Does anyone know how I process all keyboard messages in my Winproc? Even if my program isn't active I want it to react to the keydown messages. [edited by - leadorn on May 29, 2002 12:05:37 PM] [edited by - leadorn on May 29, 2002 12:06:58 PM]
siaspete
siaspete
I don''t think you will get WM_KEYDOWN messages in a WndProc if your app doesn''t have focus. You could try using DirectInput with a background cooperative level.

But why on earth do you need to capture the keyboard if the user isn''t using your app?


Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Leadorn
Leadorn
Using keyboard to start program. I don''t use explorer as a shell any more.


So I was planning on having a program to start them for me instead.
Leadorn
Leadorn
What do you mean with focus?
Chem0sh
Chem0sh
3 words: system wide hook.

/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/
/*=========================================// Chem0sh// Lead Software Engineer & Tech Support// http://www.eFaces.biz=========================================*/
Leadorn
Leadorn
But i dont want to use your program. The smaller the better!!
Chem0sh
Chem0sh
No, no, no. I meant look up info on system-wide hooks. Check out:

http://qsoft.ragestorm.com/tutors/windows/kbhook.html
/*=========================================// Chem0sh// Lead Software Engineer & Tech Support// http://www.eFaces.biz=========================================*/

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.