river: refactor keyboard groups implementation

This reduces the impact of keyboard groups on the Keyboard.zig
implementation and otherwise improves consistency with patterns used
elsewhere in rivers code.

There are also two small changes to the riverctl interface:

- keyboard-group-add-keyboard is renamed to keyboard-group-add
- keyboard-group-remove is added to support removing keyboards from a
group.
This commit is contained in:
Isaac Freund
2022-09-17 11:26:45 +02:00
parent 01f49bbbc1
commit e35c147cd5
10 changed files with 179 additions and 172 deletions

View File

@ -330,26 +330,30 @@ A complete list may be found in _/usr/include/linux/input-event-codes.h_
*list-input-configs*
List all input configurations.
*keyboard-group-create* _keyboard_group_name_
*keyboard-group-create* _group_name_
Create a keyboard group. A keyboard group collects multiple keyboards in
a single logical keyboard. This means that all state, like the active
modifiers, is shared between the keyboards in a group.
*keyboard-group-destroy* _keyboard_group_name_
Destroy the keyboard group of the given name. All attached keyboards
*keyboard-group-destroy* _group_name_
Destroy the keyboard group with the given name. All attached keyboards
will be released, making them act as seperate devices again.
*keyboard-group-add-keyboard* _keyboard_group_name_ _input_device_identifier_
Add a keyboard to a keyboard group, identified by the keyboards input
device identifier. Any currently connected and future keyboards matching
the identifier will be added to the group.
*keyboard-group-add* _group_name_ _input_device_name_
Add a keyboard to a keyboard group, identified by the keyboard's
input device name. Any currently connected and future keyboards with
the given name will be added to the group.
*keyboard-group-remove* _group_name_ _input_device_name_
Remove a keyboard from a keyboard group, identified by the keyboard's
input device name.
The _input_ command can be used to create a configuration rule for an input
device identified by its _name_.
The _name_ of an input device consists of its type, its numerical vendor id,
its numerical product id and finally its self-advertised name, separated by -.
A list of all device properties that can be configured maybe found below.
A list of all device properties that can be configured may be found below.
However note that not every input device supports every property.
*input* _name_ *events* *enabled*|*disabled*|*disabled-on-external-mouse*