diff options
| author | Jules Aguillon | 2025-02-28 00:35:43 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2025-02-28 00:36:14 +0100 |
| commit | 55cb5f5315c9183f6e4821daa26997e329e30fd8 (patch) | |
| tree | c17500664e69a78b5b9231704a1473bccc4a5523 /test/juloo.keyboard2/KeyValueTest.java | |
| parent | b7d1508d7b74b3d634b8f3a547d56c27e10f80c8 (diff) | |
| download | unexpected-keyboard-55cb5f5315c9183f6e4821daa26997e329e30fd8.tar.gz unexpected-keyboard-55cb5f5315c9183f6e4821daa26997e329e30fd8.zip | |
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.
Diffstat (limited to 'test/juloo.keyboard2/KeyValueTest.java')
| -rw-r--r-- | test/juloo.keyboard2/KeyValueTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/juloo.keyboard2/KeyValueTest.java b/test/juloo.keyboard2/KeyValueTest.java index 8b1bfeb..6226d39 100644 --- a/test/juloo.keyboard2/KeyValueTest.java +++ b/test/juloo.keyboard2/KeyValueTest.java @@ -1,5 +1,6 @@ package juloo.keyboard2; +import android.view.KeyEvent; import juloo.keyboard2.KeyValue; import org.junit.Test; import static org.junit.Assert.*; @@ -13,6 +14,12 @@ public class KeyValueTest { assertEquals(KeyValue.makeStringKey("Foo").withSymbol("Symbol"), KeyValue.makeMacro("Symbol", new KeyValue[] { KeyValue.makeStringKey("Foo") }, 0)); + assertEquals(KeyValue.getSpecialKeyByName("tab"), + KeyValue.keyeventKey(0xE00F, KeyEvent.KEYCODE_TAB, KeyValue.FLAG_KEY_FONT | KeyValue.FLAG_SMALLER_FONT)); + assertEquals(KeyValue.getSpecialKeyByName("tab").withSymbol("t"), + KeyValue.keyeventKey("t", KeyEvent.KEYCODE_TAB, 0)); + assertEquals(KeyValue.getSpecialKeyByName("tab").withSymbol("tab"), + KeyValue.keyeventKey("tab", KeyEvent.KEYCODE_TAB, KeyValue.FLAG_SMALLER_FONT)); } @Test |
