[Bug] On-screen keyboard Enter shortcut (`controlify:pause`) never triggers on screens

未关闭
#1,034 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@isXander 已经在做这个了。

开始于 2026年12月1日。

评估

这个 Issue 还没有评估数据。

描述

bug
Current Behaviour

When typing with the on-screen keyboard (e.g. in ChatScreen), the Enter key displays the Menu/Start button shortcut icon, but pressing Menu/Start does nothing. You have to manually move focus onto the Enter key and press Confirm to submit.

Expected Behaviour

Pressing the Menu/Start shortcut while the on-screen keyboard is open should trigger the Enter key (e.g. send the chat message and close chat) without opening the pause menu on button release.

Screenshots

No response

Reproduction Steps
  1. Join a world with a controller connected.
  2. Open chat (or another screen with the on-screen keyboard) and type a message.
  3. Press the Menu/Start button shown as the Enter key shortcut.
  4. Observe that nothing happens; Enter only works when manually focused and pressed.
Logs

Mod Version

4.0.0-beta.1+mc26.3 (Fabric)

Controller

Xbox

Bluetooth
  • Yes
Operating System

Windows

ARM
  • Yes
Additional Information

Root cause:
All three built-in keyboard layouts (full/en_us.json, simple/en_us.json, server_ip/en_us.json) set Enter's "shortcut" to "controlify:pause".
However, ControlifyActions.PAUSE is registered only in BuiltinActionLayers.IN_GAME, which is blocked by BuiltinActionLayers.ANY_SCREEN (BLOCKING) whenever any screen is open, so the shortcut can never fire on screens.

Adding REGULAR_SCREEN directly to controlify:pause looks risky as well: pause uses a pulse (tap) activator, and unconsumed pulses queued on non-keyboard screens could trigger pauseGame once the screen closes.

Suggested fix:
Point the keyboard layouts (and FallbackKeyboardLayout) to a span action on REGULAR_SCREEN default-bound to controlify:button/start — either a dedicated action (e.g. controlify:gui_keyboard_enter) or a new gui_abstract_action_4 (matching Backspace/Space/Shift which use gui_abstract_action_1/2/3).

I tested the dedicated REGULAR_SCREEN action locally on 26.3 and confirmed Enter works properly without leaking button release to controlify:pause. Let me know which approach you prefer — happy to open a PR if you'd like.

Just to make sure...
  • I have made sure I am using the latest version of Controlify for the latest version of Minecraft.
  • I have made sure there are no other issues describing the same problem on the issue tracker.
主要语言
Java
星标
361
派生
112
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

isXander/Controlify 的其他 Issue

查看 isXander/Controlify 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。