Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intent for clipboard #413

Closed
amosbird opened this issue Jan 27, 2019 · 4 comments
Closed

intent for clipboard #413

amosbird opened this issue Jan 27, 2019 · 4 comments

Comments

@amosbird
Copy link

Hi, shall we have scrcpy handle some intent to get/set android clipboard directly instead of using keyboard event to copy/paste? https://stackoverflow.com/questions/14243427/set-clipboard-text-via-adb-shell-as-of-api-level-11

It also makes copy from android possible.

@rom1v
Copy link
Collaborator

rom1v commented Jan 29, 2019

IIUC, this allows to read from and write to the clipboard, not to actually generate the events (e.g. write text to the focused text field)?

It also makes copy from android possible.

ping #145

@npes87184
Copy link
Contributor

IIUC, this allows to read from and write to the clipboard, not to actually generate the events (e.g. write text to the focused text field)?

IMO, it is a good idea to transfer keysym to android, where the keysym cannot be simply decomposed. Such as Chinese words.

It also makes copy from android possible.

ping #145

@amosbird
Copy link
Author

amosbird commented Feb 7, 2019

pasting into android is easy and works as expected. However I haven't figured out a way to automatically copy the text from android when the clipboard is changed. Currently I use Ctrl-c to grab the content directly. The intents are injected into the gnirehtet project for PoC only...

https://github.com/amosbird/gnirehtet
https://github.com/amosbird/scrcpy

@amosbird amosbird closed this as completed Feb 7, 2019
rom1v added a commit that referenced this issue May 30, 2019
It was already possible to _paste_ (with Ctrl+v) the content of the
computer clipboard on the device. Technically, it injects a sequence of
events to generate the text.

Add a new feature (Ctrl+Shift+v) to copy to the device clipboard
instead, without injecting the content. Contrary to events injection,
this preserves the UTF-8 content exactly, so the text is not broken by
special characters.

<#413>
@rom1v
Copy link
Collaborator

rom1v commented May 30, 2019

Implemented on dev branch. See #145 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants