From 5d882cb5fc2d9d9fd68439021e48a90aa2e50e79 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sun, 3 Nov 2019 14:20:05 -0500 Subject: Add support for wlr_keyboard_group A wlr_keyboard_group allows for multiple keyboard devices to be combined into one logical keyboard. This is useful for keyboards that are split into multiple input devices despite appearing as one physical keyboard in the user's mind. This adds support for wlr_keyboard_groups to sway. There are two keyboard groupings currently supported, which can be set on a per-seat basis. The first keyboard grouping is none, which disables all grouping and provides no functional change. The second is keymap, which groups the keyboard devices in the seat by their keymap. With this grouping, the effective layout and repeat info is also synced across keyboard devices in the seat. Device specific bindings will still be executed as normal, but everything else related to key and modifier events will be handled by the keyboard group's keyboard. --- 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 457e0a98..ed542790 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -176,6 +176,12 @@ enum seat_config_allow_constrain { CONSTRAIN_DISABLE }; +enum seat_keyboard_grouping { + KEYBOARD_GROUP_DEFAULT, // the default is currently keymap + KEYBOARD_GROUP_NONE, + KEYBOARD_GROUP_KEYMAP +}; + /** * Options for multiseat and other misc device configurations */ @@ -185,6 +191,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_keyboard_grouping keyboard_grouping; struct { char *name; int size; -- cgit v1.2.3