wiki: Document toggle-keyboard-shortcuts-inhibit and allow-inhibiting
Browse files at this commit69627bdc64d8891befff95e807869416658d36c6Parent: 3fa373c1 changed file +24 -0
wiki/Configuration:-Key-Bindings.mdmodified+24 -0
| @@ -319,3 +319,27 @@ binds { | |||
| 319 | Alt+Print { screenshot-window write-to-disk=false; } | 319 | Alt+Print { screenshot-window write-to-disk=false; } |
| 320 | } | 320 | } |
| 321 | ``` | 321 | ``` |
| 322 | + | ||
| 323 | +#### `toggle-keyboard-shortcuts-inhibit` | ||
| 324 | + | ||
| 325 | +<sup>Since: 25.02</sup> | ||
| 326 | + | ||
| 327 | +Applications such as remote-desktop clients and software KVM switches may request that niri stops processing its keyboard shortcuts so that they may, for example, forward the key presses as-is to a remote machine. | ||
| 328 | +`toggle-keyboard-shortcuts-inhibit` is an escape hatch that toggles the inhibitor. | ||
| 329 | +It's a good idea to bind it, so a buggy application can't hold your session hostage. | ||
| 330 | + | ||
| 331 | +```kdl | ||
| 332 | +binds { | ||
| 333 | + Mod+Escape { toggle-keyboard-shortcuts-inhibit; } | ||
| 334 | +} | ||
| 335 | +``` | ||
| 336 | + | ||
| 337 | +You can also make certain binds ignore inhibiting with the `allow-inhibiting=false` property. | ||
| 338 | +They will always be handled by niri and never passed to the window. | ||
| 339 | + | ||
| 340 | +```kdl | ||
| 341 | +binds { | ||
| 342 | + // This bind will always work, even when using a virtual machine. | ||
| 343 | + Super+Alt+L allow-inhibiting=false { spawn "swaylock"; } | ||
| 344 | +} | ||
| 345 | +``` | ||