Windows Keyboard Fixes 会在 Minecraft 运行时禁用粘滞键对话框,并在使用快捷键 GUI 时或无 GUI 打开/当你控制角色时使 Windows 键不显示开始屏幕,从而使其能够真正用于游戏输入。如果你已经禁用了粘滞键热键设置,该模组将不会更改它。
常见问题解答
问:这是如何实现的?
粘滞键:在标题画面/当游戏加载完成时,模组通过 Windows API 设置一个系统级标志以禁用粘滞键热键设置。关闭游戏时,该设置会被重置。
Windows 键:我基本上使用了一个低级 Windows 键盘钩子,让除了 Windows 键之外的所有其他按键自动通过。仅当打开除快捷键屏幕以外的 GUI 屏幕时,Windows 键才会正常放行。
问:为什么要全局禁用粘滞键?
因为即使是微软自己的文档也建议这样做,而且据我所知没有其他方法可以做到这一点,即使我尝试过的几款其他游戏禁用它也是全局禁用的。
问:当游戏崩溃时,粘滞键设置会发生什么?如果我运行多个带有该模组的实例会怎样?
模组会将信息写入 Windows 注册表(HKEY_CURRENT_USER\SOFTWARE\Minecraft\Sticky Keys),以便在关闭游戏时记住要重置的设置值,以及当前正在运行的其他带有该模组的进程。第一个启动的实例可以更改粘滞键设置,最后一个退出的实例负责重置它。
如果发生崩溃,还有一个休眠线程会在 Java VM 关闭时执行以重置设置。当从任务管理器中终止 Java 时也会执行此操作。
然而,如果崩溃非常严重(例如可能崩溃整个 VM,但我不认为这种情况经常发生)或者发生停电,那么在下次启动和关闭带有该模组的 Minecraft 时,设置将会被重置。
问:既然可以直接更改粘滞键设置,那么模组的一半功能不是多余的吗?
是的。但是有些人,包括我自己,会自动点击“否”,并且总是忘记随后更改设置。
问:使用 Windows 键的 Windows 快捷键会发生什么?
当按键未转发到整个系统时,大多数快捷键将失效。然而,有一些快捷键,如 Win+L 锁定桌面,似乎已经深深嵌入到 Windows 中,因此它们仍然会被放行。
问:我可以在整合包中使用这个模组吗?
可以。
Windows Keyboard Fixes disables the sticky keys dialog while Minecraft is running and also makes the Windows key not show the Windows startscreen when having the keybindings GUI open or when there is no GUI open / when you control your character, so it can actually be used for gameplay input. If you already have the sticky keys hotkey setting disabled the mod will not change it.
FAQ
Q: How was this done?
Sticky keys: When at the title screen / when the game is finished loading the mod sets a system wide flag to disable the sticky keys hotkey setting through Windows' APIs. When closing the game the setting is then reset.
Windows key: I basically use a low-level Windows keyboard hook to let every other key automatically through other than the Windows keys. The Windows key is only let through normally when a GUI screen is open other than the keybindings screen.
Q: Why disable sticky keys system-wide?
Because even Microsoft's own documentation says to do so and as far as I know there is no other way to do it, even a few other games I tried that disable it all disable it system-wide.
Q: What happens to the sticky keys setting when the game crashes? What happens if I run multiple instances with the mod?
The mod writes information to the Windows registry (HKEY_CURRENT_USER\SOFTWARE\Minecraft\Sticky Keys) to remember what to reset the setting to when closing the game and what other processes with the mod are currently running. The first one to start get's to change the sticky keys setting and the last one to exit get's to reset it.
In the case of a crash there is also a dormant thread that get's executed to reset the setting on the shutdown of the Java VM. This is also executed when Java is killed from Task-Manager.
If the crash is however very severe (as in probably crashing the entire VM, but I don't think that happens often) or if a power outage occurs the setting will be reset the next time Minecraft is started & closed with the mod.
Q: Isn't 1/2 of the mod kind of pointless, when one can just change the sticky keys setting?
Yes. However some people, including me, automatically just hit "No" and always forget to change the setting afterwards.
Q: What happens to Windows shortcuts that use the Windows key?
Most are none functional when the key is not forwarded to the entire system. A few however, like Win+L to lock the desktop, seem to be so engraved into Windows that they are still let through.
Q: Can I use this in a modpack?
Yes.
下载 Windows Keyboard Fixes - 修复粘滞键问题
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Windows Keyboard Fixes - 修复粘滞键问题
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Windows Keyboard Fixes - 修复粘滞键问题
下载 Windows Keyboard Fixes - 修复粘滞键问题
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Windows Keyboard Fixes - 修复粘滞键问题
下载 Windows Keyboard Fixes - 修复粘滞键问题
下载 Windows Keyboard Fixes - 修复粘滞键问题
下载 Windows Keyboard Fixes - 修复粘滞键问题
下载 Windows Keyboard Fixes - 修复粘滞键问题
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Windows Keyboard Fixes - 修复粘滞键问题
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
此次更新主要是为了迎合 CurseForge 的要求,因为他们可以理解地不喜欢该模组获取其他运行进程的方式。 通过 JNA 而非 tasklist.exe 来获取其他进程
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧