diff options
| author | Jules Aguillon | 2024-06-09 11:43:21 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2024-06-09 11:53:17 +0200 |
| commit | 91ace060bc8c49f1ea4b8185e239a58ec7d5478a (patch) | |
| tree | faa2d31caf21f14510700775cffc31c44615cf2d /srcs/compose | |
| parent | ecac6a77f8954269b76ecbf5c6fa7f5fda65242f (diff) | |
| download | unexpected-keyboard-91ace060bc8c49f1ea4b8185e239a58ec7d5478a.tar.gz unexpected-keyboard-91ace060bc8c49f1ea4b8185e239a58ec7d5478a.zip | |
Move diacritics mapping to the compose state machine
This replaces the switch cases in KeyModifier.java with JSON files, one
for each diacritic.
The number of states increases from 6727 to 7377. The apk size slightly
decreases (around 3kb).
Diffstat (limited to 'srcs/compose')
| -rw-r--r-- | srcs/compose/accent_aigu.json | 25 | ||||
| -rw-r--r-- | srcs/compose/accent_arrows.json | 13 | ||||
| -rw-r--r-- | srcs/compose/accent_bar.json | 18 | ||||
| -rw-r--r-- | srcs/compose/accent_box.json | 13 | ||||
| -rw-r--r-- | srcs/compose/accent_caron.json | 16 | ||||
| -rw-r--r-- | srcs/compose/accent_cedille.json | 13 | ||||
| -rw-r--r-- | srcs/compose/accent_circonflexe.json | 13 | ||||
| -rw-r--r-- | srcs/compose/accent_dot_above.json | 21 | ||||
| -rw-r--r-- | srcs/compose/accent_dot_below.json | 14 | ||||
| -rw-r--r-- | srcs/compose/accent_double_aigu.json | 10 | ||||
| -rw-r--r-- | srcs/compose/accent_grave.json | 8 | ||||
| -rw-r--r-- | srcs/compose/accent_hook_above.json | 14 | ||||
| -rw-r--r-- | srcs/compose/accent_horn.json | 14 | ||||
| -rw-r--r-- | srcs/compose/accent_macron.json | 8 | ||||
| -rw-r--r-- | srcs/compose/accent_ogonek.json | 10 | ||||
| -rw-r--r-- | srcs/compose/accent_ordinal.json | 14 | ||||
| -rw-r--r-- | srcs/compose/accent_ring.json | 4 | ||||
| -rw-r--r-- | srcs/compose/accent_slash.json | 14 | ||||
| -rw-r--r-- | srcs/compose/accent_subscript.json | 34 | ||||
| -rw-r--r-- | srcs/compose/accent_superscript.json | 42 | ||||
| -rw-r--r-- | srcs/compose/accent_tilde.json | 13 | ||||
| -rw-r--r-- | srcs/compose/accent_trema.json | 8 |
22 files changed, 339 insertions, 0 deletions
diff --git a/srcs/compose/accent_aigu.json b/srcs/compose/accent_aigu.json new file mode 100644 index 0000000..bfc04b8 --- /dev/null +++ b/srcs/compose/accent_aigu.json @@ -0,0 +1,25 @@ +{ + "a": "á", + "c": "ć", + "e": "é", + "i": "í", + "l": "ĺ", + "ń": "ń", + "o": "ó", + "r": "ŕ", + "s": "ś", + "u": "ú", + "y": "ý", + "z": "ź", + "ü": "ǘ", + "j": "j\u0301", + "у": "у\u0301", + "е": "е\u0301", + "а": "а\u0301", + "о": "о\u0301", + "и": "и\u0301", + "ы": "ы\u0301", + "э": "э\u0301", + "ю": "ю\u0301", + "я": "я\u0301" +} diff --git a/srcs/compose/accent_arrows.json b/srcs/compose/accent_arrows.json new file mode 100644 index 0000000..16cd448 --- /dev/null +++ b/srcs/compose/accent_arrows.json @@ -0,0 +1,13 @@ +{ + "0": "↔", + "1": "↙", + "2": "↓", + "3": "↘", + "4": "←", + "5": "↕", + "6": "→", + "7": "↖", + "8": "↑", + "9": "↗", + ".": "↵" +} diff --git a/srcs/compose/accent_bar.json b/srcs/compose/accent_bar.json new file mode 100644 index 0000000..14dc9f6 --- /dev/null +++ b/srcs/compose/accent_bar.json @@ -0,0 +1,18 @@ +{ + "b": "ƀ", + "c": "ꞓ", + "d": "đ", + "g": "ǥ", + "i": "ɨ", + "j": "ɉ", + "k": "ꝁ", + "l": "ƚ", + "o": "ɵ", + "p": "ᵽ", + "q": "ꝗ", + "r": "ɍ", + "t": "ŧ", + "u": "ʉ", + "y": "ɏ", + "z": "ƶ" +} diff --git a/srcs/compose/accent_box.json b/srcs/compose/accent_box.json new file mode 100644 index 0000000..fa71eca --- /dev/null +++ b/srcs/compose/accent_box.json @@ -0,0 +1,13 @@ +{ + "1": "└", + "2": "┴", + "3": "┘", + "4": "├", + "5": "┼", + "6": "┤", + "7": "┌", + "8": "┬", + "9": "┐", + "0": "─", + ".": "│" +} diff --git a/srcs/compose/accent_caron.json b/srcs/compose/accent_caron.json new file mode 100644 index 0000000..2e1a953 --- /dev/null +++ b/srcs/compose/accent_caron.json @@ -0,0 +1,16 @@ +{ + "a": "ǎ", + "c": "č", + "d": "ď", + "e": "ě", + "i": "ǐ", + "l": "ľ", + "n": "ň", + "o": "ǒ", + "r": "ř", + "s": "š", + "t": "ť", + "u": "ǔ", + "z": "ž", + "ü": "ǚ" +} diff --git a/srcs/compose/accent_cedille.json b/srcs/compose/accent_cedille.json new file mode 100644 index 0000000..3c05760 --- /dev/null +++ b/srcs/compose/accent_cedille.json @@ -0,0 +1,13 @@ +{ + "c": "ç", + "d": "ḑ", + "e": "ȩ", + "g": "ģ", + "h": "ḩ", + "k": "ķ", + "l": "ļ", + "n": "ņ", + "r": "ŗ", + "s": "ş", + "t": "ţ" +} diff --git a/srcs/compose/accent_circonflexe.json b/srcs/compose/accent_circonflexe.json new file mode 100644 index 0000000..ba6ccfd --- /dev/null +++ b/srcs/compose/accent_circonflexe.json @@ -0,0 +1,13 @@ +{ + "a": "â", + "c": "ĉ", + "e": "ê", + "g": "ĝ", + "h": "ĥ", + "i": "î", + "j": "ĵ", + "o": "ô", + "ŝ": "ŝ", + "u": "û", + "z": "ẑ" +} diff --git a/srcs/compose/accent_dot_above.json b/srcs/compose/accent_dot_above.json new file mode 100644 index 0000000..12f2f58 --- /dev/null +++ b/srcs/compose/accent_dot_above.json @@ -0,0 +1,21 @@ +{ + "a": "ȧ", + "b": "ḃ", + "c": "ċ", + "d": "ḋ", + "e": "ė", + "f": "ḟ", + "g": "ġ", + "h": "ḣ", + "m": "ṁ", + "n": "ṅ", + "o": "ȯ", + "p": "ṗ", + "r": "ṙ", + "s": "ṡ", + "t": "ṫ", + "w": "ẇ", + "x": "ẋ", + "y": "ẏ", + "z": "ż" +} diff --git a/srcs/compose/accent_dot_below.json b/srcs/compose/accent_dot_below.json new file mode 100644 index 0000000..35114d0 --- /dev/null +++ b/srcs/compose/accent_dot_below.json @@ -0,0 +1,14 @@ +{ + "a": "ạ", + "ă": "ặ", + "â": "ậ", + "e": "ẹ", + "ê": "ệ", + "i": "ị", + "o": "ọ", + "ô": "ộ", + "ơ": "ợ", + "u": "ụ", + "ư": "ự", + "y": "ỵ" +} diff --git a/srcs/compose/accent_double_aigu.json b/srcs/compose/accent_double_aigu.json new file mode 100644 index 0000000..1732b26 --- /dev/null +++ b/srcs/compose/accent_double_aigu.json @@ -0,0 +1,10 @@ +{ + "o": "ő", + "u": "ű", + " ": "˝", + "a": "a\u030b", + "e": "e\u030b", + "i": "i\u030b", + "m": "m\u030b", + "y": "y\u030b" +} diff --git a/srcs/compose/accent_grave.json b/srcs/compose/accent_grave.json new file mode 100644 index 0000000..efd07c2 --- /dev/null +++ b/srcs/compose/accent_grave.json @@ -0,0 +1,8 @@ +{ + "a": "à", + "e": "è", + "i": "ì", + "o": "ò", + "u": "ù", + "ü": "ǜ" +} diff --git a/srcs/compose/accent_hook_above.json b/srcs/compose/accent_hook_above.json new file mode 100644 index 0000000..4954714 --- /dev/null +++ b/srcs/compose/accent_hook_above.json @@ -0,0 +1,14 @@ +{ + "a": "ả", + "ă": "ẳ", + "â": "ẩ", + "e": "ẻ", + "ê": "ể", + "i": "ỉ", + "o": "ỏ", + "ô": "ổ", + "ơ": "ở", + "u": "ủ", + "ư": "ử", + "y": "ỷ" +} diff --git a/srcs/compose/accent_horn.json b/srcs/compose/accent_horn.json new file mode 100644 index 0000000..c5e5d50 --- /dev/null +++ b/srcs/compose/accent_horn.json @@ -0,0 +1,14 @@ +{ + "o": "ơ", + "ó": "ớ", + "ò": "ờ", + "ỏ": "ở", + "õ": "ỡ", + "ọ": "ợ", + "u": "ư", + "ú": "ứ", + "ù": "ừ", + "ủ": "ử", + "ũ": "ữ", + "ụ": "ự" +} diff --git a/srcs/compose/accent_macron.json b/srcs/compose/accent_macron.json new file mode 100644 index 0000000..b311974 --- /dev/null +++ b/srcs/compose/accent_macron.json @@ -0,0 +1,8 @@ +{ + "a": "ā", + "e": "ē", + "i": "ī", + "o": "ō", + "u": "ū", + "ü": "ǖ" +} diff --git a/srcs/compose/accent_ogonek.json b/srcs/compose/accent_ogonek.json new file mode 100644 index 0000000..a722cef --- /dev/null +++ b/srcs/compose/accent_ogonek.json @@ -0,0 +1,10 @@ +{ + "a": "ą", + "e": "ę", + "i": "į", + "k": "ķ", + "l": "ļ", + "n": "ņ", + "o": "ǫ", + "u": "ų" +} diff --git a/srcs/compose/accent_ordinal.json b/srcs/compose/accent_ordinal.json new file mode 100644 index 0000000..77007d1 --- /dev/null +++ b/srcs/compose/accent_ordinal.json @@ -0,0 +1,14 @@ +{ + "a": "ª", + "o": "º", + "1": "ª", + "2": "º", + "3": "ⁿ", + "4": "ᵈ", + "5": "ᵉ", + "6": "ʳ", + "7": "ˢ", + "8": "ᵗ", + "9": "ʰ", + "*": "°" +} diff --git a/srcs/compose/accent_ring.json b/srcs/compose/accent_ring.json new file mode 100644 index 0000000..9fad5bc --- /dev/null +++ b/srcs/compose/accent_ring.json @@ -0,0 +1,4 @@ +{ + "a": "å", + "u": "ů" +} diff --git a/srcs/compose/accent_slash.json b/srcs/compose/accent_slash.json new file mode 100644 index 0000000..1d07925 --- /dev/null +++ b/srcs/compose/accent_slash.json @@ -0,0 +1,14 @@ +{ + "a": "ⱥ", + "b": "␢", + "c": "ȼ", + "e": "ɇ", + "g": "ꞡ", + "k": "ꝃ", + "l": "ł", + "n": "ꞥ", + "o": "ø", + "r": "ꞧ", + "s": "ꞩ", + "t": "ⱦ" +} diff --git a/srcs/compose/accent_subscript.json b/srcs/compose/accent_subscript.json new file mode 100644 index 0000000..79a3c93 --- /dev/null +++ b/srcs/compose/accent_subscript.json @@ -0,0 +1,34 @@ +{ + "1": "₁", + "2": "₂", + "3": "₃", + "4": "₄", + "5": "₅", + "6": "₆", + "7": "₇", + "8": "₈", + "9": "₉", + "0": "₀", + "+": "₊", + "-": "₋", + "=": "₌", + "(": "₍", + ")": "₎", + "a": "ₐ", + "e": "ₑ", + "h": "ₕ", + "i": "ᵢ", + "j": "ⱼ", + "k": "ₖ", + "l": "ₗ", + "m": "ₘ", + "n": "ₙ", + "o": "ₒ", + "p": "ₚ", + "r": "ᵣ", + "s": "ₛ", + "t": "ₜ", + "u": "ᵤ", + "v": "ᵥ", + "x": "ₓ" +} diff --git a/srcs/compose/accent_superscript.json b/srcs/compose/accent_superscript.json new file mode 100644 index 0000000..68b9751 --- /dev/null +++ b/srcs/compose/accent_superscript.json @@ -0,0 +1,42 @@ +{ + "1": "¹", + "2": "²", + "3": "³", + "4": "⁴", + "5": "⁵", + "6": "⁶", + "7": "⁷", + "8": "⁸", + "9": "⁹", + "0": "⁰", + "+": "⁺", + "-": "⁻", + "=": "⁼", + "(": "⁽", + ")": "⁾", + "a": "ᵃ", + "b": "ᵇ", + "c": "ᶜ", + "d": "ᵈ", + "e": "ᵉ", + "f": "ᶠ", + "g": "ᵍ", + "h": "ʰ", + "i": "ⁱ", + "j": "ʲ", + "k": "ᵏ", + "l": "ˡ", + "m": "ᵐ", + "n": "ⁿ", + "o": "ᵒ", + "p": "ᵖ", + "r": "ʳ", + "s": "ˢ", + "t": "ᵗ", + "u": "ᵘ", + "v": "ᵛ", + "w": "ʷ", + "x": "ˣ", + "y": "ʸ", + "z": "ᶻ" +} diff --git a/srcs/compose/accent_tilde.json b/srcs/compose/accent_tilde.json new file mode 100644 index 0000000..a79d1a3 --- /dev/null +++ b/srcs/compose/accent_tilde.json @@ -0,0 +1,13 @@ +{ + "a": "ã", + "e": "ẽ", + "i": "ĩ", + "n": "ñ", + "o": "õ", + "u": "ũ", + "ă": "ẵ", + "â": "ẫ", + "ê": "ễ", + "ơ": "ỡ", + "ư": "ữ" +} diff --git a/srcs/compose/accent_trema.json b/srcs/compose/accent_trema.json new file mode 100644 index 0000000..64cba56 --- /dev/null +++ b/srcs/compose/accent_trema.json @@ -0,0 +1,8 @@ +{ + "a": "ä", + "e": "ë", + "i": "ï", + "o": "ö", + "u": "ü", + "y": "ÿ" +} |
