commands: Add shortcuts_inhibitor command

Add a command to influence keyboard shortcuts inhibitors. In its current
form it can be used to activate, deactivate or toggle an existing
inhibitor on the surface currently receiving input. This can be used to
define an escape shortcut such as:

bindsym --inhibited $mod+Escape seat - shortcuts_inhibitor deactivate

It also allows the user to configure a per-seat default of whether
keyboard inhibitors are honoured by default (the default) or not. Using
the activate/toggle command they can then enable the lingering inhibitor
at a later time of their choosing.

As a side effect this allows to specifically address a named seat for
actions as well, whatever use-case that might serve.

Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
This commit is contained in:
Michael Weiser 2020-02-16 00:40:18 +01:00 committed by Brian Ashworth
parent eeac0aa170
commit 3ee5aace33
8 changed files with 150 additions and 0 deletions

View file

@ -243,6 +243,25 @@ correct seat.
by default) for the seat. This is primarily useful for video games. The
"escape" command can be used at runtime to escape from a captured client.
*seat* <name> shortcuts_inhibitor enable|disable|activate|deactivate|toggle
Enables or disables the ability of clients to inhibit keyboard
shortcuts for the seat. This is primarily useful for virtualization and
remote desktop software. Subcommands _enable_ and _disable_ affect
whether future inhibitors are honoured by default, i.e. activated
automatically, the default being _enable_. When used at runtime,
_disable_ also disables any currently active inhibitors. _activate_,
_deactivate_ and _toggle_ are only useable at runtime and change the
state of a potentially existing inhibitor on the currently focused
window. This can be used with the current seat alias (_-_) to affect
only the currently focused window of the current seat. Subcommand
_deactivate_ is particularly useful in an _--inhibited_ *bindsym* to
escape a state where shortcuts are inhibited and the client becomes
uncooperative. It is worth noting that whether disabled or deactivated
inhibitors are removed is entirely up to the client. Depending on the
client it may therefore be possible to (re-)activate them later. Any
visual indication that an inhibitor is present is currently left to the
client as well.
*seat* <name> xcursor_theme <theme> [<size>]
Override the system default XCursor theme. The default seat's
(_seat0_) theme is also used as the default cursor theme in