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 support for clearing the clipboard #23

Open
renatoathaydes opened this issue Dec 27, 2017 · 3 comments
Open

Add support for clearing the clipboard #23

renatoathaydes opened this issue Dec 27, 2017 · 3 comments

Comments

@renatoathaydes
Copy link

Hi! I've used this little lib in one of my projects and it works great! Thanks for creating this :)

But I would like to make a feature request: add support for clearing the clipboard.

For example, in Linux with xsel you just need to call xsel -c.

Not sure about Mac/Windows, but hope it's easy to do as well.

My usecase is that I want to copy sensitive information to the clipboard for a short period of time.

@renatoathaydes
Copy link
Author

I don't know if that's possible, but do you know if there's a way to just clear the clipboard everytime the user pastes something? Password Managers do that, I wonder how...

@dmitshur
Copy link

I'm not sure either, but what happens if you place the empty string into the clipboard?

@renatoathaydes
Copy link
Author

Pasting the empty string and not pasting anything is not really the same, but it does solve my problem :)

I just need to remove sensitive data from the clipboard... looks like xsel never persists anything , so just writing an empty String is fine... but I think the Mac version keeps a list?

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

2 participants