Skip to content

Wear OS: fix Enter not sending in WhatsApp and dictation not landing in Browser (#294) - #351

Closed
m5991 wants to merge 2 commits into
DevEmperor:mainfrom
m5991:wear-ime-editor-action
Closed

m5991 wants to merge 2 commits into
DevEmperor:mainfrom
m5991:wear-ime-editor-action

Conversation

@m5991

@m5991 m5991 commented Sep 9, 2026

Copy link
Copy Markdown

Fixes #294.

Hi! I really enjoy your apps. I paid for Dictate Wear and it was such a bummer when it
didn't work on my watch, I really was looking forward to have something like this. I know my way around adb tooling and had a feeling the fix might be simple,
so I vibed my way through it, and this is what I ended up with.

What was wrong

Two problems I described earlier turned out to be the same story.

Enter (from the numpad) didn't submit. performEnter committed a literal "\n". Most fields never treat that as a
submit — they declare an editor action in imeOptions and act on that instead. So in WhatsApp the
transcript landed in the box and just sat there, and in the Browser the search never ran.

Something that surprised me, and that may not be obvious without a Galaxy Watch (and logcat) in hand: the field
Dictate binds to is usually not the app's own.
On Wear OS 6 / One UI 8 Watch, WhatsApp and Keep Notes
both go through Samsung's RemoteInput text-entry activity, so the IME sees

onStartInputView: pkg=com.samsung.android.honeyboard action=DONE imeOptions=0x6 inputType=0xc041

and the app's own window only returns (with inputType=0x0, not an editor) once that DONE action
fires. That's why Keep Notes seemed to work while WhatsApp didn't. Samsung Browser is the exception —
a directly bound field declaring IME_ACTION_SEARCH.

Dictated text disappeared in the Browser. After a transcription the service commits the text and
immediately calls requestHideSelf(0). Over the browser's search field that teardown races the commit
and the text is dropped — the same field accepts keypad input fine, where no hide is involved. And even
where the text survived, hiding took away the ⏎ needed to send it.

What I changed

  1. ⏎ fires the field's declared action (SEND / SEARCH / GO / DONE …), falls back to a real
    KEYCODE_ENTER when there is none, and commits a newline only for multi-line editors.
    IME_FLAG_NO_ENTER_ACTION is respected.
  2. The post-dictation auto-hide now only happens when the field has no pending action — unchanged for
    notes-style fields — and the keyboard hides once the action has actually fired, so it isn't left
    sitting opaque over the result.

44 added lines in one file, no UI changes.

How I tested

Galaxy Watch8 (SM-L330), Wear OS 6.0 / One UI 8.0 Watch, tethered to Dictate on a Galaxy S26 Ultra
(Android 16).

before after
WhatsApp text lands, Enter does nothing Enter fires DONE, message sends
Browser dictated text never appears text lands, Enter runs the search
Keep Notes works still works, still auto-hides

Important to say, the way to send a transcripted is with the Enter button of the numpad, it is usable but maybe not ideal.

The part I can't check

I only have my own watch, so I'm blind to how this behaves elsewhere. The risk I'd flag: a field that
declares an action but expects a newline anyway would now submit instead of adding a line. I tried to
guard that with the multi-line and IME_FLAG_NO_ENTER_ACTION checks, but a device reporting things
differently could behave differently. If you'd rather shape this another way, I'm happy to re run checks in my watch.

This is my first time contributing to an open source project like this. Hope it helps.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EBBqERL2Akg9cYDXRaaK7D

m5991 and others added 2 commits September 8, 2026 21:17
The ⏎ key committed a literal "\n". Most editors never see that as a submit:
they declare an editor action in imeOptions and act on that instead, so Enter
looked dead — a WhatsApp message could be dictated but not sent, and a browser
search could be typed but not run.

Fire the declared action when the field has one, fall back to a real ENTER key
event when it does not, and keep committing a newline only for genuinely
multi-line editors.

On Wear the field is often not the app's own: Galaxy Watch routes WhatsApp and
Keep Notes through Samsung's RemoteInput activity, which declares IME_ACTION_DONE
and hands the text back to the app when that action fires.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBBqERL2Akg9cYDXRaaK7D
Hiding the keyboard the moment a dictation lands is right when the text is the
whole job, as in a note. Over a field that still has to be submitted it does two
things wrong: it takes away the ⏎ the user now needs, and its teardown races the
commit that just happened — Samsung's browser resolves that race by dropping the
transcript, so dictated text never appeared there at all.

Keep the keyboard up when the field declares a submit action, and hide once that
action has actually fired: the app is showing its result by then, and the input
view is opaque enough to cover it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBBqERL2Akg9cYDXRaaK7D
DevEmperor added a commit that referenced this pull request Oct 6, 2026
… Galaxy watch

m5991's PR #351, written for #294 on a Galaxy Watch8, showed what Jannis's watch could not: WhatsApp
and Keep hand their input to Samsung's RemoteInput screen, whose field finishes with DONE and passes
the text on only then. Auto-send from 6872eeb fired send, search and go but not done, so with it on, a
WhatsApp dictation would still have stopped at the check mark. It now fires whichever finishing action
the field declares. Done fields elsewhere close or confirm, and auto-send stays off by default.

Also from #351: once Enter has fired the field's action, the keyboard closes instead of staying opaque
over the app's result. Without an action, Enter still sends a real Enter key.

The lone X under the round button (while waiting, and under the check mark) moves 10 dp lower: about
4 dp of gap was too tight to aim at.

The PR itself is not cherry-picked: 6872eeb had already replaced the lines it changes.
@DevEmperor

Copy link
Copy Markdown
Owner

Hi @m5991, thank you, and sorry this sat for so long. Your diagnosis was spot on. By the time I got to it, the file had changed underneath it (the #363 rework), so #294 is now fixed in 6872eeb instead:

  • ⏎ fires the field's action.
  • After a dictation into a send/search/done field, the keyboard stays open and shows the recognized text with a button shaped like the action, so you no longer need the numpad to send.
  • A new watch setting, "Auto-send" (off by default), fires the action right away.

Two things from your PR made it in as a follow-up in e0a18db:

  • Your finding that WhatsApp and Keep reach the keyboard through Samsung's RemoteInput screen with DONE, which my watch never showed me. Auto-send now covers DONE too, or it would have done nothing in WhatsApp.
  • Closing the keyboard after ⏎ has fired an action.

Both ship with the next watch release, and I'd be glad to hear how WhatsApp behaves on your Watch8 then. Thanks for a first contribution this careful. Closing in favour of those two commits.

@DevEmperor DevEmperor closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wear OS: Keyboard IME action issues on Galaxy Watch8 — cannot send in WhatsApp & text not committing in Browser

2 participants