forge
Explore
Log in

Don't you dare go Hollow

wiki: Document mod-key, mod-key-nested

Browse files at this commit

0d4f0f00c0cd83a72151468bc610ce230a550027Ivan MolodetskikhParent: f2663c7
wiki/Configuration:-Input.mdmodified+24 -0
@@ -95,6 +95,9 @@ input {
9595 // warp-mouse-to-focus
9696 // focus-follows-mouse max-scroll-amount="0%"
9797 // workspace-auto-back-and-forth
98+
99+ // mod-key "Super"
100+ // mod-key-nested "Alt"
98101 }
99102 ```
100103
@@ -288,3 +291,24 @@ input {
288291 workspace-auto-back-and-forth
289292 }
290293 ```
294+
295+#### `mod-key`, `mod-key-nested`
296+
297+<sup>Since: next release</sup>
298+
299+Customize the `Mod` key for [key bindings](./Configuration:-Key-Bindings.md).
300+Only valid modifiers are allowed, e.g. `Super`, `Alt`, `Mod3`, `Mod5`, `Ctrl`, `Shift`.
301+
302+By default, `Mod` is equal to `Super` when running niri on a TTY, and to `Alt` when running niri as a nested winit window.
303+
304+> [!NOTE]
305+> There are a lot of default bindings with Mod, none of them "make it through" to the underlying window.
306+> 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.
307+
308+```kdl
309+// Switch the mod keys around: use Alt normally, and Super inside a nested window.
310+input {
311+ mod-key "Alt"
312+ mod-key-nested "Super"
313+}
314+```
wiki/Configuration:-Key-Bindings.mdmodified+2 -0
@@ -31,6 +31,8 @@ Valid modifiers are:
3131 This way, you can test niri in a window without causing too many conflicts with the host compositor's key bindings.
3232 For this reason, most of the default keys use the `Mod` modifier.
3333
34+<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).
35+
3436 > [!TIP]
3537 > To find an XKB name for a particular key, you may use a program like [`wev`](https://git.sr.ht/~sircmpwn/wev).
3638 >