1

I've got an Acer Aspire 5740G and I want to intercept the hardware buttons. I wrote a C# application using SetWindowsHookEx().

For the volume buttons, for example, I receive VolumeUp and VolumeDown messages, all are fine. But for the wifi button and bluetooth button, I only receive LBUTTON, OEMCLEAR(KeyCode 255). So how can I differentiate between those two?

I've also read, that this, buttons may inaccessible because they would be treated like Fn-Keys which are below the OS. But there's an Acer software, called Launch Manager, which shows OSD messages and show a bluetooth/wifi logo. So it must be possible(at least in theory) to differentiate these buttons at the OS level.

So, how to hook these keys?

Ken Kin
  • 4,503
  • 3
  • 38
  • 76
netblognet
  • 1,951
  • 2
  • 20
  • 46

1 Answers1

2

Here is a related question

Don't know if you ever wrote Windows drivers.

Windows drivers, well, it's a long history.

Modern Windows has two mode of device drivers:

Since you've found that those two buttons have identical windows message, it is possibly controled by the kernel mode drivers.

Some hardware singals might not have a WM_ messages definition, sometimes they simply mapping to one identical windows message, but the kernel mode driver can distinguish them. There are tons of, for example, Ke bla bla and IRP_ bla bla stuffs; some even can only wrote in C/C++, that is, native code; and you would possibly have no way except look into the driver.

If you are really interested in Windows drivers, take a look of Windows Driver Development, and WDK(Windows Driver Kit) is free for download.

Finally, if you STRONGLY want the technical support from the manufacturer(Acer), leave a comment to let me know if we shall get in contact and I'll reply with my email.

Community
  • 1
  • 1
Ken Kin
  • 4,503
  • 3
  • 38
  • 76
  • This answer is for a direction of your question, but it's too long to put in a comment. I'm considering to delete it later. – Ken Kin Feb 24 '13 at 10:53
  • At first - thank you for your answer. Second - please don't delete it. I think it may help other users who face the same problem. ;) – netblognet Feb 24 '13 at 19:16