From 55cb5f5315c9183f6e4821daa26997e329e30fd8 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Fri, 28 Feb 2025 00:35:43 +0100 Subject: Make key symbol smaller when 2 characters long or more This was the case for string keys but not for macros or keys with custom symbols. --- test/juloo.keyboard2/KeyValueParserTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/juloo.keyboard2/KeyValueParserTest.java') diff --git a/test/juloo.keyboard2/KeyValueParserTest.java b/test/juloo.keyboard2/KeyValueParserTest.java index b7abbef..d56b6b5 100644 --- a/test/juloo.keyboard2/KeyValueParserTest.java +++ b/test/juloo.keyboard2/KeyValueParserTest.java @@ -93,7 +93,7 @@ public class KeyValueParserTest public void parse_key_event() throws Exception { Utils.parse("a:keyevent:85", KeyValue.keyeventKey("a", 85, 0)); - Utils.parse("symbol:keyevent:85", KeyValue.keyeventKey("symbol", 85, 0)); + Utils.parse("symbol:keyevent:85", KeyValue.keyeventKey("symbol", 85, KeyValue.FLAG_SMALLER_FONT)); Utils.parse("macro:keyevent:85,abc", KeyValue.makeMacro("macro", new KeyValue[]{ KeyValue.keyeventKey("", 85, 0), KeyValue.makeStringKey("abc") @@ -112,7 +112,7 @@ public class KeyValueParserTest Utils.parse(":str:'Foo'", KeyValue.makeStringKey("Foo")); Utils.parse(":str flags='dim':'Foo'", KeyValue.makeStringKey("Foo", KeyValue.FLAG_SECONDARY)); Utils.parse(":str symbol='Symbol':'Foo'", KeyValue.makeStringKey("Foo").withSymbol("Symbol")); - Utils.parse(":str symbol='Symbol' flags='dim':'f'", KeyValue.makeStringKey("f").withSymbol("Symbol").withFlags(KeyValue.FLAG_SECONDARY)); + Utils.parse(":str symbol='Symbol' flags='dim':'f'", KeyValue.makeStringKey("f").withSymbol("Symbol").withFlags(KeyValue.FLAG_SECONDARY | KeyValue.FLAG_SMALLER_FONT)); Utils.parse(":str flags='dim,small':'Foo'", KeyValue.makeStringKey("Foo", KeyValue.FLAG_SECONDARY | KeyValue.FLAG_SMALLER_FONT)); Utils.parse(":str flags=',,':'Foo'", KeyValue.makeStringKey("Foo")); // Unintentional Utils.expect_error(":unknown:Foo"); // Unknown kind -- cgit v1.2.3