Conversation
ReviewReading Code referenceThe patched branch at if(e.key==='Enter'){
if(_isImeEnter(e)){return;}
const isNumpadEnter=_isNumpadEnter(e);
const _mobileDefault=matchMedia('(pointer:coarse)').matches&&window._sendKey==='enter'&&_isVirtualKeyboardLikelyOpen();
if(window._sendKey==='ctrl+enter'||_mobileDefault){
if(isNumpadEnter||e.ctrlKey||e.metaKey){e.preventDefault();send();}
} else {
if(!e.shiftKey){e.preventDefault();send();}
}
}The IME guard runs first, the numpad detection runs second, and the actual submit is gated inside the Points
Cross-repo checkNo agent contract touched. VerdictLGTM. Small surface, targeted fix, IME-safe ordering, location fallback for browser quirks. The only nit is calling out the touch+virtualKB+numpad-bluetooth edge case in the CHANGELOG entry so users on tablets with external keyboards understand the change. Ready to merge as-is. |
# Conflicts: # CHANGELOG.md # static/boot.js
|
Shipped in v0.51.159 (Release EE, stage-batch41) via release PR #3144 — thank you, @dso2ng! 🎉 Your change (Numpad Enter submit shortcut) is now on Two PRs in this batch needed a small semantic merge against code that landed in v0.51.158:
GitHub didn't auto-close this PR because the release merged resolved/reparented commits rather than your branch's exact head SHA, so closing manually. The full diff and tests are verified present on |
# Conflicts: # CHANGELOG.md # static/boot.js
# Conflicts: # CHANGELOG.md # static/boot.js
Thinking Path
e.key === 'Enter', so Ctrl/Cmd+Enter mode treats both regular Enter and Numpad Enter as newline unless Ctrl/Cmd is held.What Changed
_isNumpadEnter(e)instatic/boot.js, usinge.code === 'NumpadEnter'with a numpad-location fallback.Why It Matters
Users who prefer regular Enter for newlines can still submit quickly from a numeric keypad without changing the global send-key setting or breaking IME composition flows.
Verification
python -m pytest tests/test_numpad_enter_submit.py tests/test_mobile_layout.py tests/test_ime_composition.py tests/test_issue1443_ime_helper_promotion.py tests/test_1003_preferences_autosave.py -q→ 80 passed, 1 warningnode --check static/boot.jsgit diff --checkRisks / Follow-ups
KeyboardEvent.codeasNumpadEnterorKeyboardEvent.locationasDOM_KEY_LOCATION_NUMPAD. If an unusual remote desktop/browser collapses keypad Enter into regular Enter with no numpad metadata, it will keep the existing regular Enter behavior.Contract Routing
Task type: small composer keyboard interaction fix.
Touched areas:
static/boot.js, composer keyboard contract tests, changelog.Relevant public docs:
AGENTS.mdCONTRIBUTING.mddocs/CONTRACTS.mddocs/UIUX-GUIDE.mdDESIGN.mdScope boundaries: no layout, theme, streaming, runtime-state, or persistence contract changes.
Evidence needed before claiming done: targeted keyboard/static tests plus JS syntax and diff hygiene.
Model Used
OpenAI Codex GPT-5.5 via Hermes Agent WebUI, with repository inspection and local shell/test tooling.