Closed Revess closed 6 months ago
Android blocks background clipboard access so it is not possible to get clipboard change notification when app is not focused. But it is possible to paste text using text input. To access it you should swipe extra keys bar to the left.
I've been able to do copy/paste from/to Android using VNC. Sometimes it needs autocutsel. Is AVNC any different than termux-x11 in the way they listen for Android clipboard?
Maybe it is relevant for old Androids, but starting from Android 10 listening to Android Clipboard is restricted
@twaik Do we even need background clipboard access? When the X11 is brought to foreground and when a special key combination like CTRLSHIFTALTV is pressed, Is it possible to enable force clipboard syncing from android to termux x11?
EDIT: Apparently, there's a PASTE key, which isn't documented in the wiki
This is much better, but still sync on "brought to foreground"( Special key combinations, especially for external keyboards) would be even better.
@twaik Ok for some reason, PASTE doesn't work when clicking with a mouse, but it works when touching with finger(the same is true for all input in extra keys).
Even swiping extra keys to left, entering data and pressing enter doesn't send input data to x11. I'm testing this on firefox/x11 URL input, search input and text input in GitHub issues.
Currently I'm using a complex workaround in termux app using
echo "Clipboard Data to x11" | xclip -sel clipboard
Just xclip
to PRIMARY
clipboard doesn't work. You have to use xclip -sel clipboard
Consider reopening this issue. Even android chrome will detect clipboard urls when open, in the latest androids
Hi I don't understand, how do I use this "paste" key? It doesn't seem to appear on any soft keyboards
@JeremyViehland sorry, deleted your message by mistake
@twaik No problem, was still editing. Hopefully the screen shots help elucidate the workaround.
@JeremyViehland Please, use <details>
tag for screenshots.
It seems like I found acceptable design for this. I even can make system toast "Termux:X11 accessed clipboard" appear only when user uses "Paste" or "Ctrl+V" in desktop session. It will take some time.
Check the https://github.com/termux/termux-x11/actions/runs/8281260198 artifact.
Currently it is not possible to paste anything from the clipboard of android to any application running in termux-x11 (tested in proot).