-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(keymap): Improve xkb_type section
- Add a diagram to illustrate how key types work. - Add examples to explain the key types mappings.
- Loading branch information
Showing
3 changed files
with
230 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
digraph | ||
{ | ||
active_modifiers [ | ||
label="Active modifiers", | ||
href="@ref xkb_state::xkb_state_mod_index_is_active" | ||
]; | ||
modifiers_filter [ | ||
shape=box, | ||
label=<<b>Filter modifiers</b><br/>Keep only <i>meaningful</i> modifiers for the key type>, | ||
style=rounded | ||
]; | ||
filtered_modifiers [label="Filtered modifiers"]; | ||
level_match [ | ||
shape=box, | ||
label=<<b>Lookup modifiers combination</b><br/>Find the shift level<br/>matching <i>exactly</i> the modifiers,<br/>defaulting to the base level>, | ||
style=rounded | ||
]; | ||
shift_level [ | ||
label="Shift level", | ||
href="@ref level-def" | ||
]; | ||
consume_modifiers [ | ||
shape=box, | ||
label=<<b>Consume modifiers</b>>, | ||
style=rounded | ||
]; | ||
consumed_modifiers [ | ||
label="Consumed modifiers", | ||
href="@ref consumed-modifiers" | ||
]; | ||
|
||
key_type [shape=none, label=< | ||
<table border="2" cellborder="1" cellspacing="0" cellpadding="4"> | ||
<tr><td href="@ref the-xkb_types-section"><b>Key type</b></td></tr> | ||
<hr/> | ||
<tr><td port="modifiers" href="@ref key-type-modifiers">modifiers</td></tr> | ||
<tr><td port="map" href="@ref key-type-map">map</td></tr> | ||
<tr><td port="preserve" href="@ref key-type-preserve">preserve</td></tr> | ||
</table> | ||
>]; | ||
|
||
{ rank="same"; key_type; filtered_modifiers } | ||
{ rank="same"; level_match; consume_modifiers } | ||
|
||
active_modifiers -> modifiers_filter; | ||
key_type:modifiers -> modifiers_filter | ||
// [ | ||
// label=<<i>xkb_compat</i> section>, | ||
// labelhref="@ref the-xkb_compat-section" | ||
// ]; | ||
//active_modifiers -> filtered_modifiers [label=""]; | ||
modifiers_filter -> filtered_modifiers; | ||
filtered_modifiers -> level_match; | ||
key_type:map -> level_match; | ||
level_match -> shift_level; | ||
filtered_modifiers -> consume_modifiers; | ||
key_type:preserve -> consume_modifiers; | ||
consume_modifiers -> consumed_modifiers; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters