Variables and Binds: Document input:drag_threshold and related bind f… (#1023)

* Variables and Binds: Document input:drag_threshold and related bind flags

* more verbose on c/g, clearer language

---------

Co-authored-by: Leeman <lstrout@enlj.com>
This commit is contained in:
alaricljs 2025-04-12 10:43:17 -04:00 committed by GitHub
parent 948259bc11
commit ba2605e279
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View file

@ -203,6 +203,8 @@ Flags:
```plain
l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.
r -> release, will trigger on release of a key.
c -> click, will trigger on release of a key or button as long as the mouse cursor stays inside input:drag_threshold.
g -> drag, will trigger on release of a key or button as long as the mouse cursor moves outside input:drag_threshold.
o -> longPress, will trigger on long press of a key.
e -> repeat, will repeat when held.
n -> non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher.
@ -236,15 +238,19 @@ bind = SUPER, XF86AudioNext, exec, playerctl position +5
## Mouse Binds
Mouse binds are binds that rely on mouse movement. They
will have one less arg, and may look like this:
Mouse binds are binds that rely on mouse movement. They will have one less arg.
`input:drag_threshold` can be used to differentiate between clicks and drags with the same button:
```ini
input {
drag_threshold = 10
}
bindm = ALT, mouse:272, movewindow
bindc = ALT, mouse:272, togglefloating
```
This will create a bind with <key>ALT</key> + <key>LMB</key> to move the window
with your mouse.
by dragging more than 10px or float it by clicking.
_Available mouse binds_:

View file

@ -213,6 +213,7 @@ _[More about Animations](../Animations)._
| special_fallthrough | if enabled, having only floating windows in the special workspace will not block focusing windows in the regular workspace. | bool | false |
| off_window_axis_events | Handles axis events around (gaps/border for tiled, dragarea/border for floated) a focused window. `0` ignores axis events `1` sends out-of-bound coordinates `2` fakes pointer coordinates to the closest point inside the window `3` warps the cursor to the closest point inside the window | int | 1 |
| emulate_discrete_scroll | Emulates discrete scrolling from high resolution scrolling events. `0` disables it, `1` enables handling of non-standard events only, and `2` force enables all scroll wheel events to be handled | int | 1 |
| drag_threshold | Movement threshold in pixels for window dragging and c/g bind flags. 0 to disable and grab on mousedown. | int | 0 |
{{< callout type=info >}}