From 3ee5aace33f1b5673ab372afba38480338ba8b90 Mon Sep 17 00:00:00 2001 From: Michael Weiser Date: Sun, 16 Feb 2020 00:40:18 +0100 Subject: 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 --- include/sway/config.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/sway/config.h') diff --git a/include/sway/config.h b/include/sway/config.h index fdd65efd..359f9604 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -177,6 +177,12 @@ enum seat_config_allow_constrain { CONSTRAIN_DISABLE }; +enum seat_config_shortcuts_inhibit { + SHORTCUTS_INHIBIT_DEFAULT, // the default is currently enabled + SHORTCUTS_INHIBIT_ENABLE, + SHORTCUTS_INHIBIT_DISABLE +}; + enum seat_keyboard_grouping { KEYBOARD_GROUP_DEFAULT, // the default is currently smart KEYBOARD_GROUP_NONE, @@ -201,6 +207,7 @@ struct seat_config { list_t *attachments; // list of seat_attachment configs int hide_cursor_timeout; enum seat_config_allow_constrain allow_constrain; + enum seat_config_shortcuts_inhibit shortcuts_inhibit; enum seat_keyboard_grouping keyboard_grouping; uint32_t idle_inhibit_sources, idle_wake_sources; struct { -- cgit v1.2.3-54-g00ecf