faq: add method to disable middle click paste

This commit is contained in:
Guillaume Lagrange 2024-04-02 21:19:59 +02:00
parent 662de3cf4e
commit 04e48f4959
No known key found for this signature in database
GPG Key ID: 1EB4D7F24F05EC3B
1 changed files with 12 additions and 7 deletions

View File

@ -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.