abouttreesummaryrefslogcommitdiff
diff options
context:
space:
mode:
authorJules Aguillon2024-07-26 00:04:57 +0200
committerJules Aguillon2024-07-26 00:04:57 +0200
commit3967fb8a9fb7c407243bc15e00aa114f181ffacb (patch)
treef4bd408185527c227d6a0e1091d2d207f67dbad1
parent29b4b665dc12eb613b68e657a28d93fc5ee0f51e (diff)
downloadunexpected-keyboard-3967fb8a9fb7c407243bc15e00aa114f181ffacb.tar.gz
unexpected-keyboard-3967fb8a9fb7c407243bc15e00aa114f181ffacb.zip
doc: Document the <ctrl /> modmap
-rw-r--r--doc/Custom-layouts.md20
1 files changed, 14 insertions, 6 deletions
diff --git a/doc/Custom-layouts.md b/doc/Custom-layouts.md
index 91e89b8..0e0dd30 100644
--- a/doc/Custom-layouts.md
+++ b/doc/Custom-layouts.md
@@ -106,15 +106,23 @@ In a layout, a key value can also start with the `loc` prefix. These are place-h
## Modmap
The `<modmap>`...`</modmap>` pair encloses custom mappings for modifier keys. The modmap is placed inside the `<keyboard>`...`</keyboard>` pair, but outside any row. A layout can have at most one modmap.
-A modmap can contain the following tags, each of which must have an `a` and a `b` property:
-* `<shift a="before" b="after" />` If the Shift modifier is on, the key `before` is changed into `after`.
-* `<fn a="before" b="after" />` If the Fn modifier is on, the key `before` is changed into `after`.
-
+A `<modmap>` can contain any number of elements of the form:
+```xml
+ <shift a="before" b="after" />
+```
+This means that when the Shift modifier is on, the key `before` is changed into `after`.
Valid values for `before` and `after` are listed in [Possible key values](Possible-key-values.md).
-There can be as many of these tags inside `<modmap>` as needed.
+The supported modmaps are: `<shift />`, `<fn />` and `<ctrl />`.
+
+The `<ctrl />` modmap is special in that the built-in Ctrl modifier will then be applied to `after`.
+For example, this will map Ctrl+в to Ctrl+V (not to v):
+
+```xml
+ <ctrl a="в" b="v"/>
+```
-The clockwise circle and the round-trip gestures are affected by both Shift and Fn modmaps. The Shift mappings are used first and if that did not modify the key, the Fn mappings are used instead.
+The clockwise circle and the round-trip gestures are affected by both `<shift />` and `<fn />` modmaps. The Shift mappings are used first and if that did not modify the key, the Fn mappings are used instead.
### Example
Turkish keyboards use the Latin alphabet, but when "i" is shifted, it should produce "İ". This is achieved with the following modmap: