aboutsummaryrefslogtreecommitdiff
path: root/wiki
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-03-22 09:29:48 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-03-22 00:03:33 -0700
commit0d4f0f00c0cd83a72151468bc610ce230a550027 (patch)
tree6f739ee1d617cb9fa301b8f17f1e20fdc794bdd5 /wiki
parentf2663c738c53cba1745457547afa42f18831c4a9 (diff)
downloadniri-0d4f0f00c0cd83a72151468bc610ce230a550027.tar.gz
niri-0d4f0f00c0cd83a72151468bc610ce230a550027.tar.bz2
niri-0d4f0f00c0cd83a72151468bc610ce230a550027.zip
wiki: Document mod-key, mod-key-nested
Diffstat (limited to 'wiki')
-rw-r--r--wiki/Configuration:-Input.md24
-rw-r--r--wiki/Configuration:-Key-Bindings.md2
2 files changed, 26 insertions, 0 deletions
diff --git a/wiki/Configuration:-Input.md b/wiki/Configuration:-Input.md
index 4fdfdf4f..9245583b 100644
--- a/wiki/Configuration:-Input.md
+++ b/wiki/Configuration:-Input.md
@@ -95,6 +95,9 @@ input {
// warp-mouse-to-focus
// focus-follows-mouse max-scroll-amount="0%"
// workspace-auto-back-and-forth
+
+ // mod-key "Super"
+ // mod-key-nested "Alt"
}
```
@@ -288,3 +291,24 @@ input {
workspace-auto-back-and-forth
}
```
+
+#### `mod-key`, `mod-key-nested`
+
+<sup>Since: next release</sup>
+
+Customize the `Mod` key for [key bindings](./Configuration:-Key-Bindings.md).
+Only valid modifiers are allowed, e.g. `Super`, `Alt`, `Mod3`, `Mod5`, `Ctrl`, `Shift`.
+
+By default, `Mod` is equal to `Super` when running niri on a TTY, and to `Alt` when running niri as a nested winit window.
+
+> [!NOTE]
+> There are a lot of default bindings with Mod, none of them "make it through" to the underlying window.
+> You probably don't want to set `mod-key` to Ctrl or Shift, since Ctrl is commonly used for app hotkeys, and Shift is used for, well, regular typing.
+
+```kdl
+// Switch the mod keys around: use Alt normally, and Super inside a nested window.
+input {
+ mod-key "Alt"
+ mod-key-nested "Super"
+}
+```
diff --git a/wiki/Configuration:-Key-Bindings.md b/wiki/Configuration:-Key-Bindings.md
index 11df52a2..5634bb5e 100644
--- a/wiki/Configuration:-Key-Bindings.md
+++ b/wiki/Configuration:-Key-Bindings.md
@@ -31,6 +31,8 @@ Valid modifiers are:
This way, you can test niri in a window without causing too many conflicts with the host compositor's key bindings.
For this reason, most of the default keys use the `Mod` modifier.
+<sup>Since: next release</sup> You can customize the `Mod` key [in the `input` section of the config](./Configuration:-Input.md#mod-key-mod-key-nested).
+
> [!TIP]
> To find an XKB name for a particular key, you may use a program like [`wev`](https://git.sr.ht/~sircmpwn/wev).
>