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

Is any quickly way to pass utf8 text from computer to android ? #786

Closed
angelmic opened this issue Sep 5, 2019 · 4 comments
Closed

Is any quickly way to pass utf8 text from computer to android ? #786

angelmic opened this issue Sep 5, 2019 · 4 comments

Comments

@angelmic
Copy link

angelmic commented Sep 5, 2019

Hi

I need to do hundred times paste utf8 text to my android device. Is any way to speed up current way: to Ctrl + Shift + v to put text into android's clipboard then do paste.

@Plandercozeron
Copy link

Plandercozeron commented Sep 5, 2019

Try sending 'Paste' event with ADB (Android 7.0+)
adb shell input keyevent 279

but it won't use text from clipboard. You have to copy text on your phone then you can paste it

@rom1v
Copy link
Collaborator

rom1v commented May 25, 2020

Oh, that's great a great trick! Thank you 👍

adb shell input keyevent PASTE

I will probably use it to improve non-ascii support.

@rom1v
Copy link
Collaborator

rom1v commented May 25, 2020

Ref #1426

rom1v added a commit that referenced this issue May 25, 2020
Ctrl+Shift+v synchronizes the computer clipboard to the Android device
clipboard. This feature had been added to provide a way to copy UTF-8
text from the computer to the device.

To make such a paste more straightforward, if the device runs at least
Android 7, also send a PASTE keycode to paste immediately.

<https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_PASTE>

Refs <#786 (comment)>
rom1v added a commit that referenced this issue May 25, 2020
Ctrl+Shift+v synchronizes the computer clipboard to the Android device
clipboard. This feature had been added to provide a way to copy UTF-8
text from the computer to the device.

To make such a paste more straightforward, if the device runs at least
Android 7, also send a PASTE keycode to paste immediately.

<https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_PASTE>

Fixes #786 <#786>
@rom1v
Copy link
Collaborator

rom1v commented May 25, 2020

Fixed by fc1dec0.

@rom1v rom1v closed this as completed May 25, 2020
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

No branches or pull requests

3 participants