From 46f3b41393545790b8a7be87cc0e97bcdecc30f9 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 26 May 2024 00:49:15 +0200 Subject: [PATCH] Support the nnbsp character --- doc/Possible-key-values.md | 3 ++- srcs/juloo.keyboard2/KeyValue.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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 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