From 4e33f4552226fbadb156ca16b483cda10d04b433 Mon Sep 17 00:00:00 2001 From: bbb651 Date: Fri, 13 Dec 2024 02:40:36 +0200 Subject: Add `Mouse{Left,Right,Middle,Back,Forward}` binds --- wiki/Configuration:-Key-Bindings.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'wiki') 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 + +Since: next release + +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`. -- cgit