From 0584dd2f1e82417bdabcc0d8cb20fddc2e8cc5e7 Mon Sep 17 00:00:00 2001 From: sodiboo <37938646+sodiboo@users.noreply.github.com> Date: Sat, 18 Jan 2025 15:26:42 +0100 Subject: implement `keyboard-shortcuts-inhibit` and `wlr-virtual-pointer` (#630) * stub keyboard-shortcuts-inhibit and virtual-pointer impls * implement keyboard-shortcuts-inhibit * implement virtual-pointer * deal with supressed key release edge-case; add allow-inhibiting property * add toggle-keyboard-shortcuts-inhibit bind * add InputBackend extensions; use Device::output() for absolute pos events * add a `State` parameter to the backend exts and better document future intent * Add some tests for is_inhibiting_shortcuts --------- Co-authored-by: Ivan Molodetskikh --- resources/default-config.kdl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'resources') diff --git a/resources/default-config.kdl b/resources/default-config.kdl index 5936a80e..a3560ab8 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -536,6 +536,16 @@ binds { Ctrl+Print { screenshot-screen; } Alt+Print { screenshot-window; } + // Applications such as remote-desktop clients and software KVM switches may + // request that niri stops processing the keyboard shortcuts defined here + // so they may, for example, forward the key presses as-is to a remote machine. + // It's a good idea to bind an escape hatch to toggle the inhibitor, + // so a buggy application can't hold your session hostage. + // + // The allow-inhibiting=false property can be applied to other binds as well, + // which ensures niri always processes them, even when an inhibitor is active. + Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + // The quit action will show a confirmation dialog to avoid accidental exits. Mod+Shift+E { quit; } Ctrl+Alt+Delete { quit; } -- cgit