From 78f85e52a2d2afdb9a466b2c27fbe1699a2a15c1 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Wed, 3 Apr 2024 23:55:38 +0200 Subject: [PATCH] Fix space key without a symbol The symbol on the space key was accidentally lost in be97364 when the string "\r" (Java's only way to write "\x0D") was not replaced by "\xE00D". --- srcs/juloo.keyboard2/KeyValue.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index 2a00a59..4462edf 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -265,6 +265,11 @@ public final class KeyValue implements Comparable return new KeyValue(symbol, Kind.Char, c, flags); } + private static KeyValue charKey(int symbol, char c, int flags) + { + return charKey(String.valueOf((char)symbol), c, flags); + } + private static KeyValue modifierKey(String symbol, Modifier m, int flags) { if (symbol.length() > 1) @@ -447,7 +452,7 @@ public final class KeyValue implements Comparable /* Spaces */ case "\\t": return charKey("\\t", '\t', 0); // Send the tab character - case "space": return charKey("\r", ' ', FLAG_KEY_FONT | FLAG_SECONDARY); + case "space": return charKey(0xE00D, ' ', FLAG_KEY_FONT | FLAG_SMALLER_FONT | FLAG_GREYED); case "nbsp": return charKey("\u237d", '\u00a0', FLAG_SMALLER_FONT); /* bidi */