aboutsummaryrefslogtreecommitdiff
path: root/wiki
diff options
context:
space:
mode:
authorbbb651 <bar.ye651@gmail.com>2024-12-13 02:40:36 +0200
committerIvan Molodetskikh <yalterz@gmail.com>2025-01-02 14:59:15 +0300
commit4e33f4552226fbadb156ca16b483cda10d04b433 (patch)
tree29b2e8b79879c51af9d0a543a46bdf42d3d64dec /wiki
parentb16d7abb35ec35dba77de919ef56b9de5c4e9caf (diff)
downloadniri-4e33f4552226fbadb156ca16b483cda10d04b433.tar.gz
niri-4e33f4552226fbadb156ca16b483cda10d04b433.tar.bz2
niri-4e33f4552226fbadb156ca16b483cda10d04b433.zip
Add `Mouse{Left,Right,Middle,Back,Forward}` binds
Diffstat (limited to 'wiki')
-rw-r--r--wiki/Configuration:-Key-Bindings.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/wiki/Configuration:-Key-Bindings.md b/wiki/Configuration:-Key-Bindings.md
index 32448f5f..42208bd5 100644
--- a/wiki/Configuration:-Key-Bindings.md
+++ b/wiki/Configuration:-Key-Bindings.md
@@ -99,6 +99,26 @@ binds {
Both mouse wheel and touchpad scroll binds will prevent applications from receiving any scroll events when their modifiers are held down.
For example, if you have a `Mod+WheelScrollDown` bind, then while holding `Mod`, all mouse wheel scrolling will be consumed by niri.
+### Mouse Click Bindings
+
+<sup>Since: next release</sup>
+
+You can bind mouse clicks using the following syntax.
+
+```kdl
+binds {
+ Mod+MouseLeft { close-window; }
+ Mod+MouseRight { close-window; }
+ Mod+MouseMiddle { close-window; }
+ Mod+MouseForward { close-window; }
+ Mod+MouseBack { close-window; }
+}
+```
+
+Mouse clicks operate on the window that was focused at the time of the click, not the window you're clicking.
+
+Note that binding `Mod+MouseLeft` or `Mod+MouseRight` will override the corresponding gesture (moving or resizing the window).
+
### Actions
Every action that you can bind is also available for programmatic invocation via `niri msg action`.