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

no clipboard sharing? #35

Open
emacsomancer opened this issue Dec 9, 2017 · 2 comments
Open

no clipboard sharing? #35

emacsomancer opened this issue Dec 9, 2017 · 2 comments

Comments

@emacsomancer
Copy link

So I got mconnect working on my machine, and can get everything working it seems (well, no indicator) except for clipboard sharing. I can manually do this (from laptop to phone) via 'share-text' (though nothing the other direction) but it doesn't actually sync clipboards otherwise.

@bboozzoo
Copy link
Owner

Thanks for reporting this. Indeed, there's some thing fishy going on. Here's the log from selecting and copying some text on Android:

** (mconnect:20429): DEBUG: received line: {"id":1512908938339,"type":"kdeconnect.clipboard","body":{"content":" programs creates lots of trivial changes, which makes"}}
** (mconnect:20429): DEBUG: packet type: kdeconnect.clipboard
** (mconnect:20429): DEBUG: got packet
** (mconnect:20429): DEBUG: devicechannel.vala:282: check for IO, conditions: 0x1
** (mconnect:20429): DEBUG: received line: {"id":1512908945880,"type":"kdeconnect.clipboard","body":{"content":"machine-to-machine communication"}}
** (mconnect:20429): DEBUG: packet type: kdeconnect.clipboard
** (mconnect:20429): DEBUG: got packet
** (mconnect:20429): DEBUG: devicechannel.vala:282: check for IO, conditions: 0x1
** (mconnect:20429): DEBUG: received line: {"id":1512908945878,"type":"kdeconnect.clipboard","body":{"content":""}}
** (mconnect:20429): DEBUG: packet type: kdeconnect.clipboard
** (mconnect:20429): DEBUG: got packet

No clue why it's sending the kdeconnect.clipboard packet with content set to "". The simplest fix would be to ignore such packet. Would you like to open a PR?

@donRaphaco
Copy link
Contributor

I think the problem is that clipboard events are not handled by the the server.
As you can see in the log right after the server starts (also I searched through the code):

** (mconnect:19790): DEBUG: device.vala:579: added: kdeconnect.clipboard
** INFO: devicemanager.vala:205: capability kdeconnect.clipboard added to device xxxxxxxxxxxxxxxx-X-phone-X

** (mconnect:19790): WARNING **: devicemanager.vala:218: no handler for capability kdeconnect.clipboard

But there is another way to share text from phone to laptop:
If you share simple text with the kde-connect app, the text will be copied into the clipboard of your laptop.
On Android for example you can click on share when text is selected (by tap-holding).
screenshot_20180104-210957

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