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

Add flag to disable automatic clipboard updates #2228

Closed
1 task done
aidik opened this issue Apr 1, 2021 · 3 comments
Closed
1 task done

Add flag to disable automatic clipboard updates #2228

aidik opened this issue Apr 1, 2021 · 3 comments

Comments

@aidik
Copy link

aidik commented Apr 1, 2021

Describe the solution you'd like
It would be nice to have control over the automatic clipboard population on the host.
scrcpy -s abcd1234 --clipboard-copy false

Describe alternatives you've considered
Running scrcpy in a VM. Doable, but seems like overkill for something that can be potentially just one if clause.

Additional context
It will improve quality of life during passive control over the scripted tasks. Limiting disturbations to other work.

@ssmlc
Copy link

ssmlc commented Jul 26, 2021

I would also like this feature.

Is your feature request related to a problem? Please describe.
I am currently running the following setup:
computer A <-- Barrier --> computer B <-- scrcpy--> phone
with the phone and computers also connected via KDEConnect.

Attempting to copy (ctrl+c) on the computer often fails unless I spam the command.

Describe the solution you'd like
I would like to disable clipboard copy in scrcpy via command line to avoid the conflict.

Describe alternatives you've considered
Disabling clipboard sync on KDEConnect or disconnecting the phone from scrcpy solves the issue. Disabling clipboard sync via KDEConnect needs to be done by hand for each synced computer, which is more work to do each time I connect/disconnect my phone from scrcpy. Barrier clipboard sync needs to remain for other computers.

rom1v added a commit that referenced this issue Nov 22, 2021
By default, scrcpy automatically synchronizes the computer clipboard to
the device clipboard before injecting Ctrl+v, and the device clipboard
to the computer clipboard whenever it changes.

This new option --no-clipboard-autosync disables this automatic
synchronization.

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

rom1v commented Nov 22, 2021

#2817 adds an option --no-clipboard-autosync. Please test it 😉

rom1v added a commit that referenced this issue Nov 24, 2021
By default, scrcpy automatically synchronizes the computer clipboard to
the device clipboard before injecting Ctrl+v, and the device clipboard
to the computer clipboard whenever it changes.

This new option --no-clipboard-autosync disables this automatic
synchronization.

Fixes #2228 <#2228>
PR #2817 <#2817>
@rom1v
Copy link
Collaborator

rom1v commented Nov 24, 2021

Implemented by #2817.

@rom1v rom1v closed this as completed Nov 24, 2021
rom1v added a commit that referenced this issue Nov 29, 2021
If --no-clipboard-autosync is enabled, the automatic clipboard
synchronization whenever the device clipboard changes is disabled.

But on explicit copy and cut scrcpy shortcuts (MOD+c and MOD+x), the
clipboard should be synchronized, so that it is still possible to
copy-paste from the device to the computer.

This is consistent with the behavior of MOD+v, which pastes the computer
clipboard to the device.

Refs #2228 <#2228>
Refs #2817 <#2817>
rom1v added a commit that referenced this issue Nov 29, 2021
If --no-clipboard-autosync is enabled, the automatic clipboard
synchronization whenever the device clipboard changes is disabled.

But on explicit COPY and CUT scrcpy shortcuts (MOD+c and MOD+x), the
clipboard should still be synchronized, so that it remains possible to
copy-paste from the device to the computer.

This is consistent with the behavior of MOD+v, which pastes the computer
clipboard to the device.

Refs #2228 <#2228>
Refs #2817 <#2817>
rom1v added a commit that referenced this issue Nov 29, 2021
If --no-clipboard-autosync is enabled, the automatic clipboard
synchronization performed whenever the device clipboard changes is
disabled.

But on explicit COPY and CUT scrcpy shortcuts (MOD+c and MOD+x), the
clipboard should still be synchronized, so that it remains possible to
copy-paste from the device to the computer.

This is consistent with the behavior of MOD+v, which pastes the computer
clipboard to the device.

Refs #2228 <#2228>
Refs #2817 <#2817>
PR #2834 <#2834>
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