Skip to content

secure paste: add Paste actions to LatinIME - #41

Open
inthewaves wants to merge 1 commit into
GrapheneOS:17from
inthewaves:secure-paste
Open

secure paste: add Paste actions to LatinIME#41
inthewaves wants to merge 1 commit into
GrapheneOS:17from
inthewaves:secure-paste

Conversation

@inthewaves

Copy link
Copy Markdown
Member

Some apps do not expose a toolbar Paste action compatible with secure paste. Apps built with Flutter are a common example: Flutter renders its own selection toolbar, and its Paste button asks the Flutter engine to read the clipboard directly instead of dispatching Android's standard editor Paste action. Without that trusted Paste event, secure paste blocks the read when the app is set to Paste only.

Add Paste to LatinIME so users can authorize the focused app directly from the keyboard. Preferably when this AOSP clipboard gets replaced in the future by another IME app, it should also implement paste actions.

Automatically offer a Paste chip for a clip set less than two minutes ago when the editor is empty or no candidates are visible. When candidates take priority or the clip is older, show a clipboard button that opens the chip on demand. The age limit is intentionally applied lazily without an expiry timer. Editing, receiving new candidates, changing focus, or closing the temporary mode returns the strip to its normal state. LatinIME never reads or displays clipboard contents. Password fields can therefore use the same generic Paste chip as other editors.

The chip dispatches Android's standard Paste action. The focused app reads and handles the clip, preserving generic Paste support for text, images, and other content. Remember only the platform timestamp for the last clip dispatched through the chip so the same clip is not repeatedly advertised across focus or process changes.

Enable the feature by default, provide a preference to disable it, and let editors opt out for individual fields.

Some apps do not expose a toolbar Paste action compatible with secure paste. Apps built with Flutter
are a common example: Flutter renders its own selection toolbar, and its Paste button asks the
Flutter engine to read the clipboard directly instead of dispatching Android's standard editor Paste
action. Without that trusted Paste event, secure paste blocks the read when the app is set to Paste
only.

Add Paste to LatinIME so users can authorize the focused app directly from the keyboard. Preferably
when this AOSP clipboard gets replaced in the future by another IME app, it should also implement
paste actions.

Automatically offer a Paste chip for a clip set less than two minutes ago when the editor is empty
or no candidates are visible. When candidates take priority or the clip is older, show a clipboard
button that opens the chip on demand. The age limit is intentionally applied lazily without an
expiry timer. Editing, receiving new candidates, changing focus, or closing the temporary mode
returns the strip to its normal state. LatinIME never reads or displays clipboard contents. Password
fields can therefore use the same generic Paste chip as other editors.

The chip dispatches Android's standard Paste action. The focused app reads and handles the clip,
preserving generic Paste support for text, images, and other content. Remember only the platform
timestamp for the last clip dispatched through the chip so the same clip is not repeatedly
advertised across focus or process changes.

Enable the feature by default, provide a preference to disable it, and let editors opt out for
individual fields.
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.

1 participant