abouttreesummaryrefslogcommitdiff
diff options
context:
space:
mode:
authorJules Aguillon2024-05-26 00:49:15 +0200
committerJules Aguillon2024-05-26 00:49:15 +0200
commit46f3b41393545790b8a7be87cc0e97bcdecc30f9 (patch)
treee254ab7926d82c08248258eb299b4ab83d302ba1
parentbea2e6cd1fc41da085416c9778ed1ab6d81767c8 (diff)
downloadunexpected-keyboard-46f3b41393545790b8a7be87cc0e97bcdecc30f9.tar.gz
unexpected-keyboard-46f3b41393545790b8a7be87cc0e97bcdecc30f9.zip
Support the nnbsp character
-rw-r--r--doc/Possible-key-values.md3
-rw-r--r--srcs/juloo.keyboard2/KeyValue.java1
2 files changed, 3 insertions, 1 deletions
diff --git a/doc/Possible-key-values.md b/doc/Possible-key-values.md
index 89b5020..b59bc7e 100644
--- a/doc/Possible-key-values.md
+++ b/doc/Possible-key-values.md
@@ -53,7 +53,8 @@ These keys are sent to apps, which are free to ignore them. The keyboard do not
Value | Meaning
:------ | :------
`space` | Space bar.
-`nbsp` | No-break space. Note: To input the narrow no-break space recommended for French, use `\u202F`.
+`nbsp` | Non-breaking space.
+`nnbsp` | Narrow non-breaking space.
`zwj` | Zero-width joiner.
`zwnj` | Zero-width non-joiner.
diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java
index e9e66cc..bb83623 100644
--- a/srcs/juloo.keyboard2/KeyValue.java
+++ b/srcs/juloo.keyboard2/KeyValue.java
@@ -503,6 +503,7 @@ public final class KeyValue implements Comparable<KeyValue>
case "\\n": return charKey("\\n", '\n', 0); // Send the newline character
case "space": return charKey(0xE00D, ' ', FLAG_KEY_FONT | FLAG_SMALLER_FONT | FLAG_GREYED);
case "nbsp": return charKey("\u237d", '\u00a0', FLAG_SMALLER_FONT);
+ case "nnbsp": return charKey("\u2423", '\u202F', FLAG_SMALLER_FONT);
/* bidi */
case "lrm": return charKey("↱", '\u200e', 0); // Send left-to-right mark