Skip to content

Conversation

@jb55
Copy link
Contributor

@jb55 jb55 commented Jun 30, 2025

This builds on top of:

The commit in this PR is:

This adds support for GameActivity_setImeEditorInfo which is needed for setting various IME hints, such as multiline.

I'm currently using this in my egui/winit fork for mapping a new Multiline ImePurpose to ime editor options:

This ensures that the enter action button doesn't close the keyboard, it instead enters a newline.

jb55 added a commit to damus-io/notedeck that referenced this pull request Jun 30, 2025
- android-activity: rust-mobile/android-activity#200
- winit: damus-io/winit@eaff639
- egui: damus-io/egui@113922d

Signed-off-by: William Casarin <jb55@jb55.com>
jb55 added a commit to damus-io/notedeck that referenced this pull request Jun 30, 2025
support multiline ime hints
---------------------------

- android-activity: rust-mobile/android-activity#200
- winit: damus-io/winit@eaff639
- egui: damus-io/egui@113922d

And many other fixes
--------------------
Fixes: #894
Fixes: #895
Fixes: #893

Signed-off-by: William Casarin <jb55@jb55.com>
This corresponds to the GameActivity_setImeEditorInfo function on
GameActivity. This is not supported on NativeActivity.

Signed-off-by: William Casarin <jb55@jb55.com>
@jb55 jb55 force-pushed the set_ime_editor_info branch from 6338298 to 8db0d2b Compare August 11, 2025 15:47
@jb55 jb55 changed the title GameActivity-4.0.0: add set_ime_editor_info add set_ime_editor_info Aug 11, 2025
@nicoburns
Copy link

@jb55 What is the status of this PR? (I see it is still marked as a draft). I believe that the ability to set the action_id using this API (which isn't here, but looks like it'd be quite easy to add) + the ability to hook into the onEditorAction event (https://stackoverflow.com/questions/2004344/how-do-i-handle-imeoptions-done-button-click) are what I need in order to properly handle the "enter key" on android soft keyboard.

@jb55
Copy link
Contributor Author

jb55 commented Jan 5, 2026

we're using it in https://github.com/damus-io/notedeck, i guess I can mark it as ready.

@jb55 jb55 marked this pull request as ready for review January 5, 2026 18:37
@rib
Copy link
Member

rib commented Jan 7, 2026

Cool, thanks for looking at this. I've recently worked on exposing the editor actions via a TextAction event + fixing a panic that can come from soft keyboard visibility changes (due to APP_CMD_SOFTWARE_KB_VIS_CHANGED not being handled).

With these I've also got IME support working with winit 0.30 + egui.

Skimming this PR, I might just tweak the flags + bitmasks to be hex values since I find it a bit odd seeing these in decimal (just a pedantic personal preference I suppose)

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.

3 participants