wiki: Document mod-key, mod-key-nested
Browse files at this commit0d4f0f00c0cd83a72151468bc610ce230a550027Parent: f2663c72 changed files +26 -0
wiki/Configuration:-Input.mdmodified+24 -0
| @@ -95,6 +95,9 @@ input { | ||
| 95 | 95 | // warp-mouse-to-focus |
| 96 | 96 | // focus-follows-mouse max-scroll-amount="0%" |
| 97 | 97 | // workspace-auto-back-and-forth |
| 98 | + | |
| 99 | + // mod-key "Super" | |
| 100 | + // mod-key-nested "Alt" | |
| 98 | 101 | } |
| 99 | 102 | ``` |
| 100 | 103 | |
| @@ -288,3 +291,24 @@ input { | ||
| 288 | 291 | workspace-auto-back-and-forth |
| 289 | 292 | } |
| 290 | 293 | ``` |
| 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: | ||
| 31 | 31 | This way, you can test niri in a window without causing too many conflicts with the host compositor's key bindings. |
| 32 | 32 | For this reason, most of the default keys use the `Mod` modifier. |
| 33 | 33 | |
| 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 | + | |
| 34 | 36 | > [!TIP] |
| 35 | 37 | > To find an XKB name for a particular key, you may use a program like [`wev`](https://git.sr.ht/~sircmpwn/wev). |
| 36 | 38 | > |