Re: Intercepting 'multimedia keys'
From: Randy Aull \(MSFT\) (randyau_at_microsoft.com)
Date: 09/16/04
- Next message: Igor Tandetnik: "Re: ? Non-class typecast overloading"
- Previous message: Piccolo Pete: "Re: C++ over VB"
- In reply to: Steve McLellan: "Re: Intercepting 'multimedia keys'"
- Next in thread: Steve McLellan: "Re: Intercepting 'multimedia keys'"
- Reply: Steve McLellan: "Re: Intercepting 'multimedia keys'"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 16 Sep 2004 12:15:17 -0700
All of these devices use HID (human interface device). You can open these
devices directly (at least the multi-media buttons, the keyboard keys are
opened securely by Windows). You can then use the HidP and HidD APIs to
crack the reports.
Another option is to use WM_INPUT.
For details on using these APIs, see MSDN (look for WM_INPUT), or the
hclient sample in the DDK.
There are also several books written that include details on HID.
Randy
-- This posting is provided "AS IS" with no warranties, and confers no rights. "Steve McLellan" <sjm.NOSPAM AT fixerlabs DOT com> wrote in message news:u146rw2mEHA.3684@TK2MSFTNGP10.phx.gbl... > > "William DePalo [MVP VC++]" <willd.no.spam@mvps.org> wrote in message > news:OTkoIS2mEHA.3392@TK2MSFTNGP15.phx.gbl... >> "Steve McLellan" <sjm.NOSPAM AT fixerlabs DOT com> wrote in message >> news:udo7AH2mEHA.2096@TK2MSFTNGP15.phx.gbl... >> > Does anyone know if it's possible (and if so, how) to intercept presses > on >> > 'multimedia keys' you find on keyboards? >> >> If the vendor is playing by the rules and if the o/s in question is ME, > 2K, >> XP or 2K+3, the simple thing to do is to respond to the WM_APPCOMMAND >> message. At that point the keyboard software has mapped the keystroke >> message into an application command like "Play" for example. >> > > On further investigation, it would appear that they're not playing by the > rules (or at least I'm not getting any APPCOMMAND message)... the > bounders! > Oh well, I shall investigate further another time... > > Steve > >
- Next message: Igor Tandetnik: "Re: ? Non-class typecast overloading"
- Previous message: Piccolo Pete: "Re: C++ over VB"
- In reply to: Steve McLellan: "Re: Intercepting 'multimedia keys'"
- Next in thread: Steve McLellan: "Re: Intercepting 'multimedia keys'"
- Reply: Steve McLellan: "Re: Intercepting 'multimedia keys'"
- Messages sorted by: [ date ] [ thread ]