EscFix
一个轻量级的客户端模组,修复了在 MojoLauncher 和 PojavLauncher 等移动端 Minecraft 启动器中无法关闭图形用户界面(GUI)的问题。
问题所在
像 MojoLauncher 和 PojavLauncher 这样的移动端启动器在系统层面拦截了 Android 的 返回 按钮,并不将其作为 ESC 键传递给游戏。此外,这两个启动器都不允许你将 ESC 键绑定到屏幕按钮上——任何尝试都会自动被替换为 返回。这使得无法关闭任何依赖 ESC 键退出的模组 GUI,例如物品径向菜单、自定义配置界面,或者任何没有提供自身关闭按钮的模组。
解决方案
EscFix 直接在打开的 GUI 内部监听键盘事件,并在检测到 0 + 返回 组合键时关闭界面——在启动器进行干预之前完成操作。
使用方法
- 在你的启动器的屏幕按钮设置中,创建一个同时发送 返回 和 0 的 组合按钮
- 在游戏中打开任意 GUI
- 点击该按钮——GUI 将会关闭
在移动端使用此模组最方便的方式是创建屏幕上的组合按钮,因为在游戏过程中同时按住两个单独的按钮会显得不太方便。
兼容性
- ✅ Minecraft 任意版本
- ✅ MojoLauncher
- ✅ PojavLauncher
- ✅ 任何其他将返回键映射为按键 1 的启动器
- ✅ 仅适用于客户端——无需安装服务端
- ✅ 兼容所有使用标准 Forge GUI 系统的模组
技术细节
该模组钩入了 GuiScreenEvent.KeyboardInputEvent.Pre —— 这是一个在 GUI 处理输入之前触发的 Forge 事件。当检测到组合键时,该事件会被取消(阻止其他任何动作),并通过反射机制关闭当前界面,使其即使在混淆构建版本中也能保持兼容。
EscFix
A lightweight client-side mod that fixes the inability to close GUIs on mobile Minecraft launchers such as MojoLauncher and PojavLauncher.
The problem
Mobile launchers like MojoLauncher and PojavLauncher intercept the Android Back button at the system level and never pass it to the game as ESC. On top of that, both launchers don't allow you to bind the ESC key to an on-screen button - any attempt to assign it automatically gets replaced with Back. This makes it impossible to close any mod GUI that relies on ESC to exit, such as item radial menus, custom config screens, or any mod that doesn't provide its own close button.
The fix
EscFix listens to keyboard events directly inside open GUIs and closes the screen when it detects the 0 + Back combo - before the launcher can interfere.
How to use
- In your launcher's on-screen button settings, create a combo button that sends both Back and 0 simultaneously
- Open any GUI in-game
- Tap that button - the GUI will close
Creating a combo on-screen button is the most convenient way to use this mod on mobile, since holding two separate buttons while playing can be awkward.
Compatibility
- ✅ Minecraft Any version
- ✅ MojoLauncher
- ✅ PojavLauncher
- ✅ Any other launcher that remaps Back to key 1
- ✅ Client-side only - no server installation needed
- ✅ Compatible with all mods that use standard Forge GUI system
Technical details
The mod hooks into GuiScreenEvent.KeyboardInputEvent.Pre - a Forge event that fires before the GUI processes input. When the combo is detected, the event is cancelled (preventing any other action) and the current screen is closed via reflection, making it compatible even with obfuscated builds.
评论 0
登录后参与评分
还没有评论,来抢沙发吧