From 55a1fffa206db11cea47d827101839c1c25fa014 Mon Sep 17 00:00:00 2001
From: Spike <126838489+Spike-from-NH@users.noreply.github.com>
Date: Thu, 13 Jun 2024 11:50:16 -0400
Subject: [PATCH 1/6] Modmap: Where to put it; cancelling built-in mods (#665)
---
doc/Custom-layouts.md | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/doc/Custom-layouts.md b/doc/Custom-layouts.md
index 5fcd53085..4acd86aa6 100644
--- a/doc/Custom-layouts.md
+++ b/doc/Custom-layouts.md
@@ -95,23 +95,30 @@ If the string defining a tap or a swipe is anything other than one of the built-
The string can output multiple characters, but cannot combine the built-in strings to specify a sequence of keystrokes.
## Modmap
-The ``...`` pair encloses custom mappings for modifier keys.
+The ``...`` pair encloses custom mappings for modifier keys. The modmap is placed inside the ``...`` pair, but outside any row.
A modmap can contain the following tags, each of which must have an `a` and a `b` property:
* `` —This says that, if the Shift modifier is on (or the user made a clockwise gesture on a key), and if the key would normally generate the value after "a", it must instead generate the value after "b".
* `` —This says that, if the Fn modifier is on (or the user made a round-trip gesture on a key), and if the key would normally generate the value after "a", it must instead generate the value after "b".
-The "a" and "b" values are as specified above in _Possible key values_. A `` tag modifies a gesture only if no `` tag did.
+The "a" and "b" values are as specified above in **Possible key values**. A `` tag modifies a gesture only if no `` tag did.
There can be as many of these tags inside `` as needed.
-### Example
+### Examples
Turkish keyboards use the Latin alphabet, but when "i" is shifted, it should produce "İ". This is achieved with the following modmap:
-
+
+On built-in layouts for European locales, `Fn`+`e` produces the € character. This can be inhibited with the following modmap, which maps the modified `e` key to itself:
+
+
+
+
+
+These two examples are each shown in a modmap, for completeness. Typically, however, you would have a single modmap containing all the desired `` and `` tags.
## Portrait vs. landscape
Unexpected Keyboard remembers *separately* which layout has last been used in portrait and landscape orientation. That is to say, you may have one custom layout for portrait orientation, but another custom layout for landscape orientation, and Unexpected Keyboard will switch between them without your intervention.
From b016ab0d6e6500e7f2d6f077421661c6223d0ffe Mon Sep 17 00:00:00 2001
From: Spike <126838489+Spike-from-NH@users.noreply.github.com>
Date: Thu, 20 Jun 2024 11:08:07 -0400
Subject: [PATCH 2/6] Correct per Julow: not only Euro layouts
---
doc/Custom-layouts.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/Custom-layouts.md b/doc/Custom-layouts.md
index 4acd86aa6..d49ceb849 100644
--- a/doc/Custom-layouts.md
+++ b/doc/Custom-layouts.md
@@ -112,7 +112,7 @@ Turkish keyboards use the Latin alphabet, but when "i" is shifted, it should pro
-On built-in layouts for European locales, `Fn`+`e` produces the € character. This can be inhibited with the following modmap, which maps the modified `e` key to itself:
+On the built-in layouts, `Fn`+`e` produces the € character. This can be inhibited with the following modmap, which maps the modified `e` key to itself:
From 8848b7d387b0f980a63ba1f7ffe5292246702ac6 Mon Sep 17 00:00:00 2001
From: Spike <126838489+Spike-from-NH@users.noreply.github.com>
Date: Thu, 20 Jun 2024 11:45:47 -0400
Subject: [PATCH 3/6] Post-edit: Doesn't depend on "built-in" layout
---
doc/Custom-layouts.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/Custom-layouts.md b/doc/Custom-layouts.md
index d49ceb849..0ac76dc69 100644
--- a/doc/Custom-layouts.md
+++ b/doc/Custom-layouts.md
@@ -112,7 +112,7 @@ Turkish keyboards use the Latin alphabet, but when "i" is shifted, it should pro
-On the built-in layouts, `Fn`+`e` produces the € character. This can be inhibited with the following modmap, which maps the modified `e` key to itself:
+By default, `Fn`+`e` produces the € character. This can be inhibited with the following modmap, which maps the modified `e` key to itself:
From f2eda915f2a682cfe14d4c5d558cf9cc97188cd6 Mon Sep 17 00:00:00 2001
From: Spike <126838489+Spike-from-NH@users.noreply.github.com>
Date: Thu, 20 Jun 2024 11:48:34 -0400
Subject: [PATCH 4/6] P-vs-L: Change "That is to say", sentence is not a
restatement
---
doc/Custom-layouts.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/Custom-layouts.md b/doc/Custom-layouts.md
index 0ac76dc69..7e9ffc51b 100644
--- a/doc/Custom-layouts.md
+++ b/doc/Custom-layouts.md
@@ -121,7 +121,7 @@ By default, `Fn`+`e` produces the € character. This can be inhibited with the
These two examples are each shown in a modmap, for completeness. Typically, however, you would have a single modmap containing all the desired `` and `` tags.
## Portrait vs. landscape
-Unexpected Keyboard remembers *separately* which layout has last been used in portrait and landscape orientation. That is to say, you may have one custom layout for portrait orientation, but another custom layout for landscape orientation, and Unexpected Keyboard will switch between them without your intervention.
+Unexpected Keyboard remembers *separately* which layout has last been used in portrait and landscape orientation. So you may have one custom layout for portrait orientation, but another custom layout for landscape orientation, and Unexpected Keyboard will switch between them without your intervention.
## Contributing your layout
The Unexpected Keyboard project enthusiastically accepts user contributions, including custom layouts. (See the guidance for layouts at [CONTRIBUTING.md](https://github.com/Julow/Unexpected-Keyboard/blob/master/CONTRIBUTING.md#Adding-a-layout)).
From 54e9d9c2a4e1dd606ae6e1194c733ec6c3754a00 Mon Sep 17 00:00:00 2001
From: Spike <126838489+Spike-from-NH@users.noreply.github.com>
Date: Thu, 20 Jun 2024 18:47:21 -0400
Subject: [PATCH 5/6] Discussion with Julow: Swipe graphic to HTML; at most one
modmap
---
doc/Custom-layouts.md | 42 +++++++++++++++++++++++++++---------------
1 file changed, 27 insertions(+), 15 deletions(-)
diff --git a/doc/Custom-layouts.md b/doc/Custom-layouts.md
index 7e9ffc51b..cabb5e994 100644
--- a/doc/Custom-layouts.md
+++ b/doc/Custom-layouts.md
@@ -50,25 +50,37 @@ A row's default height is 1.0 (one quarter of the keyboard height specified on t
The `` tag defines a key on the keyboard. Its position in the sequence of keys inside ``...`
` indicates its position in the row from left to right. What the key does is defined by optional properties.
### Taps
-What the key does when tapped is defined by the `key0` property. For example, `` defines the "a" key. Unexpected Keyboard provides a legend in the middle of the key.
+What the key does when tapped is defined by the optional `key0` property. For example, `` defines the "a" key. Unexpected Keyboard provides a legend in the middle of the key.
When the Shift modifier is tapped, the "a" key becomes the "A" key and the legend temporarily changes. The Fn modifier makes a different change. You can override this behavior with a modmap (see below).
### Swipes
The following optional properties define the effects of swipes:
* `n`, `ne`, `e`, `se`, `s`, `sw`, `w`, `nw`: What the key should do when it is swiped in the direction of that compass point. ("North" means upward and "East" is to the right.)
-
- nw | n | ne
-:-: | :--: | :-:
- w | key0 | e
- sw | s | se
+
+
+ nw | n | ne |
+
+
+ w | | e |
+
+
+ sw | s | se |
+
+
* `key1` through `key8` is an older way to achieve the same effects. The directions are ordered as follows:
-
-key1 | key7 | key2
-:-: | :--: | :-:
-key5 | key0 | key6
-key3 | key8 | key4
+
+
+ key1 | key7 | key2 |
+
+
+ key5 | | key6 |
+
+
+ key3 | key8 | key4 |
+
+
You can define a swipe only once with either compass-point or numeric notation. Unexpected Keyboard automatically puts a small legend in that direction from the center of the key.
@@ -95,7 +107,7 @@ If the string defining a tap or a swipe is anything other than one of the built-
The string can output multiple characters, but cannot combine the built-in strings to specify a sequence of keystrokes.
## Modmap
-The ``...`` pair encloses custom mappings for modifier keys. The modmap is placed inside the ``...`` pair, but outside any row.
+The ``...`` pair encloses custom mappings for modifier keys. The modmap is placed inside the ``...`` 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:
* `` —This says that, if the Shift modifier is on (or the user made a clockwise gesture on a key), and if the key would normally generate the value after "a", it must instead generate the value after "b".
@@ -106,19 +118,19 @@ The "a" and "b" values are as specified above in **Possible key values**. A `` as needed.
### Examples
-Turkish keyboards use the Latin alphabet, but when "i" is shifted, it should produce "İ". This is achieved with the following modmap:
+① Turkish keyboards use the Latin alphabet, but when "i" is shifted, it should produce "İ". This is achieved with the following modmap:
-By default, `Fn`+`e` produces the € character. This can be inhibited with the following modmap, which maps the modified `e` key to itself:
+② By default, `Fn`+`e` produces the € character. This can be inhibited with the following modmap, which maps the modified `e` key to itself:
-These two examples are each shown in a modmap, for completeness. Typically, however, you would have a single modmap containing all the desired `` and `` tags.
+These two examples are each shown in a modmap, for completeness. However, a layout can have at most one modmap, containing all the desired `` and `` tags.
## Portrait vs. landscape
Unexpected Keyboard remembers *separately* which layout has last been used in portrait and landscape orientation. So you may have one custom layout for portrait orientation, but another custom layout for landscape orientation, and Unexpected Keyboard will switch between them without your intervention.
From c8ab526b0ff8bad1910935e937586687fb20e801 Mon Sep 17 00:00:00 2001
From: Spike <126838489+Spike-from-NH@users.noreply.github.com>
Date: Thu, 20 Jun 2024 19:08:24 -0400
Subject: [PATCH 6/6] Swipes: Center tables
---
doc/Custom-layouts.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/Custom-layouts.md b/doc/Custom-layouts.md
index cabb5e994..e771df774 100644
--- a/doc/Custom-layouts.md
+++ b/doc/Custom-layouts.md
@@ -57,11 +57,11 @@ When the Shift modifier is tapped, the "a" key becomes the "A" key and the legen
### Swipes
The following optional properties define the effects of swipes:
* `n`, `ne`, `e`, `se`, `s`, `sw`, `w`, `nw`: What the key should do when it is swiped in the direction of that compass point. ("North" means upward and "East" is to the right.)
-
+
- nw | n | ne |
+ nw | n | ne |
-
+
w | | e |
@@ -70,7 +70,7 @@ The following optional properties define the effects of swipes:
* `key1` through `key8` is an older way to achieve the same effects. The directions are ordered as follows:
-