在另一个程序禁用它后重新启用(Windows)键

发布于 2024-07-10 13:42:43 字数 329 浏览 7 评论 0原文

Quake3 已禁用 altwindows 键。

即使 quake3 正在运行,有什么办法可以重新启用它们吗? 即使我打开游戏,我也需要这些钥匙。

我认为它的工作方式是游戏使用 RegisterHotKey 注册一个热键,然后每次按下该键时将处理的属性设置为 true。

因此,如果您在 quake3 窗口上的这些键上使用 UnRegisterHotkey,我想这些键将再次开始工作。 问题是您不知道禁用键的热键 ID 是什么。

有没有办法枚举窗口已注册的热键以获取所有热键 ID?

Quake3 has disabled the alt and windows keys.

Is there any way to reenable them even while quake3 is running? I need those keys even while I have the game open.

They way I think it works is that the game registers a hotkey using RegisterHotKey and then sets the handled property to true every time the key is pressed.

So if you use UnRegisterHotkey on these keys on the quake3-window I guess the keys will start working again. The problem is that you have no idea what hotkey-id the disabled keys have.

Is there any way to enumerate the hotkeys that a window has registered to get all the hotkey-ids?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人│生佛魔见 2024-07-17 13:42:43

Quake3 很可能根本不使用 RegisterHotKey,而是使用 DirectInput。 在这种情况下,它很可能将键盘保持在独占模式,这解释了为什么 Windows 键不起作用 - 是操作系统禁用了它。 引用 MSDN :“在独占模式下, Windows 徽标键始终处于禁用状态。”

It's quite likely that Quake3 doesn't bother with RegisterHotKey at all, but instead uses DirectInput. In that case, it quite likely holds the keyboard in exclusive mode, which explains why the Windows key doesn't work - it's the OS which disables it. Quoting MSDN : "In exclusive mode, the Windows logo key is always disabled."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文