docs: improve keyboard layout documentation

- Remove recommendation of XKB_* environment variables in river(1) as we
  now have a dedicated riverctl keyboard-layout command.

- Give an example of how to use and switch between multiple layouts in
  the riverctl(1) man page.
This commit is contained in:
Isaac Freund 2022-12-28 20:43:54 +01:00
parent 0cb6b3f81d
commit eed7d94557
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11
2 changed files with 9 additions and 23 deletions

View File

@ -50,23 +50,6 @@ Usually this executable is a shell script invoking *riverctl*(1) to create
mappings, start programs such as a layout generator or status bar, and mappings, start programs such as a layout generator or status bar, and
perform other configuration. perform other configuration.
# ENVIRONMENT
The following environment variables are used to configure the keyboard. See
*xkeyboard-config*(7) for possible values.
- XKB_DEFAULT_MODEL
- XKB_DEFAULT_LAYOUT
- XKB_DEFAULT_VARIANT
- XKB_DEFAULT_OPTIONS
- XKB_DEFAULT_RULES
# EXAMPLES
Set the keyboard layout to colemak:
XKB_DEFAULT_LAYOUT="us(colemak)" river
# AUTHORS # AUTHORS
Maintained by Isaac Freund <mail@isaacfreund.com> who is assisted by open Maintained by Isaac Freund <mail@isaacfreund.com> who is assisted by open

View File

@ -203,9 +203,9 @@ A complete list may be found in _/usr/include/linux/input-event-codes.h_
- _-layout_: if passed, a specific layout is pinned to the mapping. - _-layout_: if passed, a specific layout is pinned to the mapping.
When the mapping is checked against a pressed key, this layout is When the mapping is checked against a pressed key, this layout is
used to translate the key independent of the active layout used to translate the key independent of the active layout
- _index_: zero-based index of a layout set with the environment - _index_: zero-based index of a layout set with the *keyboard-layout*
variable *XKB_DEFAULT_LAYOUT*; see *river*(1) for an example; if command. If the index is out of range, the _-layout_ option will
the index is out of range, the _-layout_ option will have no effect have no effect
- _mode_: name of the mode for which to create the mapping - _mode_: name of the mode for which to create the mapping
- _modifiers_: one or more of the modifiers listed above, separated - _modifiers_: one or more of the modifiers listed above, separated
by a plus sign (+). by a plus sign (+).
@ -336,9 +336,12 @@ A complete list may be found in _/usr/include/linux/input-event-codes.h_
*keyboard-layout* [-rules _rules_] [-model _model_] [-variant _variant_] \ *keyboard-layout* [-rules _rules_] [-model _model_] [-variant _variant_] \
[-options _options_] _layout_ [-options _options_] _layout_
Set the XKB layout for all keyboards. Defaults from libxkbcommon are used Set the XKB layout for all keyboards. Defaults from libxkbcommon are used for
for everything left unspecified. See *xkeyboard-config*(7) for everything left unspecified. Note that *layout* may be a comma separated list
possible values and more information. of layouts (e.g. "us,de") which may be switched between using various key
combinations configured through the options argument (e.g. -options
"grp:ctrl_space_toggle"). See *xkeyboard-config*(7) for possible values and
more information.
*keyboard-group-create* _group_name_ *keyboard-group-create* _group_name_
Create a keyboard group. A keyboard group collects multiple keyboards in Create a keyboard group. A keyboard group collects multiple keyboards in