GeezerVison is showing github.com — desktop: tablet composer on touch-primary 2-in-1 - Enter inserts newline instead of sending · Issue #64729 · anomalyco/opencode
desktop: tablet composer on touch-primary 2-in-1 - Enter inserts newline instead of sending #64729DescriptionSummary
On Windows touch-capable 2-in-1 devices without a fine pointing device (keyboard-only input, touchscreen present), the V2 desktop app composes in the touch layout: plain Enter inserts a newline instead of submitting, and there is no way to force the desktop composer back. Submission falls to Ctrl/Cmd+Enter or the touch bar's Send button.
Environment
- opencode version: 2.3.2 (desktop, latest channel; released 2026-11-18; bundled opencode-cli v2.3.2)
- OS: Microsoft Windows [Version 10.0.26300.9974] (win32 x64)
- Terminal: Unavailable: terminal environment variables not set
- Shell: C:\WINDOWS\system32\cmd.exe
- Install/channel: desktop app, latest
- Active plugins: none configured (config has model/provider/MCP entries; no plugins)
Reproduction
- On a Windows touch-capable 2-in-1 with a detachable keyboard (Surface-class), use it with a wireless keyboard and no mouse/trackpad attached (touch screen and pen present; Windows tablet mode = 0).
- Open the desktop app, focus the composer, and type a message.
- Press Enter — a line break is inserted; the message is not submitted.
- Note the touch composer layout (touch bar with a Send button at the bottom). Enter always inserts a line break; Ctrl/Cmd+Enter submits using the "Subsequent message behavior" setting (Queue = waits for the running turn; Steer = injects); Alt+Enter behaves like Ctrl+Enter on this layout.
Expected Behavior
On a machine with a physical keyboard and no active touch interaction, the desktop composer should behave as it does on a desktop: Enter submits (subject to the configured follow-up behavior), Shift+Enter inserts a newline.
Actual Behavior
The app switches the composer to the touch layout via a (hover: none) and (pointer: coarse) media query. Verified in the shipped bundle (app.asar, v2.3.2): the composer keydown handler early-returns for plain Enter when a createMediaQuery("(hover: none) and (pointer: coarse)") matcher is true, and the beforeinput insertParagraph handler turns it into a line break. Ctrl/Cmd+Enter and Alt+Enter both call submit(undefined) (normal delivery = the configured "Subsequent message behavior"), so on this layout neither triggers the alternate (Steer) delivery. There is no settings or experiments toggle to force the desktop composer.
Additional Context
- A wireless keyboard is not a pointing device, so with no mouse/trackpad present the touchscreen is the only pointer and both hover and pointer coarse-match.
- Related: [FEATURE]: Make App prompt action shortcuts configurable #43088 (configurable prompt submit/newline shortcuts). This report is adjacent but distinct — even ignoring rebinding, a keyboard-driven 2-in-1 in laptop posture should not land in the tablet composer.
- Workaround: attach/enable a fine pointing device (a mouse, or the detachable keyboard's trackpad); behavior may flip live or after an app restart. Otherwise use the touch bar's Send button or Ctrl/Cmd+Enter.
- Consistent, every launch.
Activityopencodejr commented on Nov 18, 2026 Thanks for the detailed report and for tracing it to the media query, @nitesh28688! I think this is a duplicate of #62647.
Possible duplicates and related issues, ordered by likelihood:
What I found in the code matches what you saw in the bundle. The composer turns on its touch mode from (hover: none) and (pointer: coarse), and the comment there says it is meant for phones and tablets. In that mode, a plain Enter without Ctrl or Cmd doesn't send the message.
Your case is a good addition to #62647. A 2-in-1 with a touchscreen and pen, a keyboard and no mouse or trackpad really does match that query, unlike the remote-desktop machine reported there.
I'm closing this issue now as a duplicate of #62647. Please add your details there: the device, the keyboard-only setup, the 2.3.2 version, and the mouse/trackpad workaround. If you think this is a different problem, reply here and the issue will reopen.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|