简体   繁体   English

通过Windows应用程序管理蓝牙远程快门键

[英]Manage Bluetooth remote shutter keys from my Windows application

I have developed an application in C++ that runs on Windows 7, 8.x and 10. I would like to use a Bluetooth remote shutter to control the application. 我已经开发了在Windows 7、8.x和10上运行的C ++应用程序。我想使用蓝牙远程快门来控制该应用程序。

The remote shutter seems to be a HID device that sends keypresses to Windows. 远程快门似乎是将按键发送到Windows的HID设备。 The default behavior of those keypresses is Volume Up, Volume Down, Play/Pause, Next and Previous. 这些按键的默认行为是提高音量,降低音量,播放/暂停,下一个和上一个。

While I can detect those keypresses from my application and act on them, I have not managed to disable Windows acting on them. 虽然我可以从应用程序中检测到这些按键并对其进行操作,但我还没有设法禁用Windows对它们的操作。 E. g. 例如 currently, when someone presses the Volume Up key on the remote shutter, two things happen: 当前,当有人按下遥控器上的“调高音量”键时,会发生两件事:

  • Whatever I tell my application to do on that keypress 无论我告诉我的应用程序在该按键上做什么
  • Also, volume goes up on Windows 而且,在Windows上音量会增加

How can I tell Windows not to act on those keypresses for this particular device? 我怎样才能告诉Windows不要对该特定设备的按键进行操作?

Thank you 谢谢

I have not tried it but i think it may be possible by disabling the Human Interface Device Access Service on Windows. 我没有尝试过,但是我认为可以通过在Windows上禁用人机界面设备访问服务来实现。

There may be some side effects along with that like for example: 可能会有一些副作用,例如:

If the service is stopped or disable, the buttons on USB keyboards will not function (ie, back, forward, volume up, down, previous track, next track), nor will the volume buttons on USB speakers. 如果停止或禁用该服务,USB键盘上的按钮将不起作用(即,后退,前进,提高音量,降低音量,上一曲,下一曲),USB扬声器上的音量按钮也将不起作用。

but you can still try :) 但您仍然可以尝试:)

here is how to disable it 这是如何禁用它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM