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

disable middle mouse button as paste #95

Open
lilibyte opened this issue Jul 1, 2020 · 2 comments
Open

disable middle mouse button as paste #95

lilibyte opened this issue Jul 1, 2020 · 2 comments

Comments

@lilibyte
Copy link

lilibyte commented Jul 1, 2020

Prior to installing clipster I've been using xbindkeys, xsel, and xdotool to disable the middle mouse button paste functionality:

(~/.xbindkeysrc config file)
"echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys"
b:2 + Release

The reasoning is that often selections will include newlines that when pasted into a terminal, or more importantly: a terminal-based chat program, are interpreted as entering to send a message per newline. I view this as a concerning security risk, especially on a ThinkPad with a prominent middle click button, so I'm sad this hack stopped working after running clipster.

Is an option for this within the scope of clipster, or do you have any advice for a way around this?

@mrichar1
Copy link
Owner

mrichar1 commented Jul 2, 2020

I'm just thinking on how to do this from clipster - I suspect the easiest option would be to have clipster notice any updates to the selection clipboard and just empty or override the clipboard contents at that point. This means you could only use the clipboard board for copying and pasting. I think it would be relatively easy to implement this, but I'd need to review the code as it's a while since I dug into the actual selection mechanisms. Obviously this could potentially be a little racey, as you could paste before clipster had cleared the board, but it's probably not any worse than our previous workaround.

The only other alternative would be to disable/remap the middle button, but then it wouldn't be useable for anything, which probably isn't what you want!

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@stale stale bot closed this as completed Apr 28, 2022
@mrichar1 mrichar1 reopened this Apr 28, 2022
@stale stale bot removed the stale label Apr 28, 2022
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

2 participants