From 69627bdc64d8891befff95e807869416658d36c6 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 1 Mar 2025 09:45:57 +0300 Subject: wiki: Document toggle-keyboard-shortcuts-inhibit and allow-inhibiting --- wiki/Configuration:-Key-Bindings.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/wiki/Configuration:-Key-Bindings.md b/wiki/Configuration:-Key-Bindings.md index 8a05b853..24efa839 100644 --- a/wiki/Configuration:-Key-Bindings.md +++ b/wiki/Configuration:-Key-Bindings.md @@ -319,3 +319,27 @@ binds { Alt+Print { screenshot-window write-to-disk=false; } } ``` + +#### `toggle-keyboard-shortcuts-inhibit` + +Since: 25.02 + +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. +`toggle-keyboard-shortcuts-inhibit` is an escape hatch that toggles the inhibitor. +It's a good idea to bind it, so a buggy application can't hold your session hostage. + +```kdl +binds { + Mod+Escape { toggle-keyboard-shortcuts-inhibit; } +} +``` + +You can also make certain binds ignore inhibiting with the `allow-inhibiting=false` property. +They will always be handled by niri and never passed to the window. + +```kdl +binds { + // This bind will always work, even when using a virtual machine. + Super+Alt+L allow-inhibiting=false { spawn "swaylock"; } +} +``` -- cgit