aboutsummaryrefslogtreecommitdiff
path: root/include/sway/input/keyboard.h
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-11-03 14:20:05 -0500
committerDrew DeVault <sir@cmpwn.com>2019-11-21 10:42:10 -0500
commit5d882cb5fc2d9d9fd68439021e48a90aa2e50e79 (patch)
treec519449aebb2fa15406407eee5af3cd4164e1b62 /include/sway/input/keyboard.h
parent2f858a1adaef17241ca6fda973f2b867b25e1971 (diff)
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.
Diffstat (limited to 'include/sway/input/keyboard.h')
-rw-r--r--include/sway/input/keyboard.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sway/input/keyboard.h b/include/sway/input/keyboard.h
index 4aa0d8f4..72a29ba6 100644
--- a/include/sway/input/keyboard.h
+++ b/include/sway/input/keyboard.h
@@ -67,6 +67,14 @@ struct sway_keyboard {
struct sway_binding *repeat_binding;
};
+struct sway_keyboard_group {
+ struct wlr_keyboard_group *wlr_group;
+ struct sway_seat_device *seat_device;
+ struct wl_listener keyboard_key;
+ struct wl_listener keyboard_modifiers;
+ struct wl_list link; // sway_seat::keyboard_groups
+};
+
struct xkb_keymap *sway_keyboard_compile_keymap(struct input_config *ic,
char **error);