如何禁用特殊键盘键?

how to Disable special keyboard keys?

我正在寻找在后台运行并阻止我键盘上的特殊键(计算器、静音等)的脚本或程序我在互联网上搜索了很多,但没有找到任何有用的东西或者为我工作,我尝试了 sharpkeys 但没有在我的键盘上检测到这些键,我的键盘上的键 ID 是 173 用于静音,如果我发现任何东西可以用 ID 阻止它们,我可以获得其他 ID。

P.S。我不太了解编程,很可能不知道我在做什么,我正在寻找任何人的基本帮助。谢谢!

TL;DR 要禁用 所有“特殊键”,您可以更改 Human Interface Device Access Windows 服务启动类型从 AutomaticManual(或 Disabled,以防安装了一些其他软件导致它在设置为 Manual 时仍然启动)。 注意:这可能会破坏其他输入设备(如果存在),例如IR remote controls, or Airplane mode radio management

对于背景,那些“特殊键”在技术上称为“消费者控制按钮 (CCB)”(例如参见 [​​= 26=] 和链接的 .docx - 不要介意 CCB 早于 Windows 8).

CCB 由 Human Interface Device Access Windows 服务处理,如 Human Interface Device Access:

所述

This service provides generic access to specific functions contained within controls collections on HID (Human Interface Devices). It enables the use of predefined hot buttons on keyboards, remote controls and other multimedia devices.

If the service is stopped or disable, the buttons on USB keyboards will not function (i.e., back, forward, volume up, down, previous track, next track), nor will the volume buttons on USB speakers.

要更改 Human Interface Device Access (HidServ) 启动模式,导航到 My Computer / Manage / Services and Applications / Services,双击列表中的 Human Interface Device Access,然后更改 Startup typeManualDisabled.

通过 Windows10 上的注册表禁用特殊键盘键转到 HKLM:\SYSTEM\CurrentControlSet\Services\hidserv 并将 "Start" DWORD 值更改为 4。重新启动系统后,特殊功能键应该被禁用。