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

faq: add method to disable middle click paste #571

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions pages/FAQ/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,18 @@ env = XDG_CURRENT_DESKTOP,Hyprland

### How to disable middle-click paste?

You can simply intercept the middle-click action all together, via hyprland
binds for example. The drawbacks to this solution are that 1. it disables the
rest of the functionality of the middle-click action, such as auto scroll,
closing browser tabs, etc., and 2. many applications (such as kitty) manually
intercept the middle-click events and bind them to paste from the primary buffer
themselves, bypassing the solution altogether. For this solution, add this bind
to your config:
You can intercept the bind to empty the primary buffer with wl-copy before
forwarding the input to the focused application by adding this to your config:

`bindn = , mouse:274, exec, wl-copy -pc`

Alternatively, you can simply intercept the middle-click action all together,
via hyprland binds for example. The drawbacks to this solution are that 1. it
disables the rest of the functionality of the middle-click action, such as auto
scroll, closing browser tabs, etc., and 2. many applications (such as kitty)
manually intercept the middle-click events and bind them to paste from the
primary buffer themselves, bypassing the solution altogether. For this solution,
add this bind to your config:

`bind = , mouse:274, exec, ;`. Note that the exact bindcode may vary, so you may
want to check it with `wev` first.
Expand Down