Compare commits

...

4 Commits

Author SHA1 Message Date
cknight828
6940e308f1 Add Kana JIS Japanese layout 2024-09-10 21:42:47 +02:00
Jules Aguillon
49944a743e Add Japanese dakuten and handakuten 2024-09-10 21:41:09 +02:00
Jules Aguillon
8339a1b480 Update generated code 2024-09-10 21:29:53 +02:00
cknight828
bb92b465d0 Add dakuon compose sequence 2024-09-09 00:19:18 +09:00
9 changed files with 236 additions and 2 deletions

View File

@ -59,6 +59,8 @@ Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {
# hebr_2_il # hebr_2_il
Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {, } Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {, }
1 warnings 1 warnings
# kana_jis_jp
0 warnings
# latn_azerty_fr # latn_azerty_fr
0 warnings 0 warnings
# latn_bepo_fr # latn_bepo_fr

View File

@ -27,6 +27,7 @@
<item>hang_dubeolsik_kr</item> <item>hang_dubeolsik_kr</item>
<item>hebr_1_il</item> <item>hebr_1_il</item>
<item>hebr_2_il</item> <item>hebr_2_il</item>
<item>kana_jis_jp</item>
<item>latn_azerty_fr</item> <item>latn_azerty_fr</item>
<item>latn_bepo_fr</item> <item>latn_bepo_fr</item>
<item>latn_bone</item> <item>latn_bone</item>
@ -85,6 +86,7 @@
<item>두벌식 (Korean)</item> <item>두벌식 (Korean)</item>
<item>Hebrew 1</item> <item>Hebrew 1</item>
<item>Hebrew 2</item> <item>Hebrew 2</item>
<item>かな入力 (日本)</item>
<item>AZERTY (Français)</item> <item>AZERTY (Français)</item>
<item>BEPO (Français)</item> <item>BEPO (Français)</item>
<item>Bone</item> <item>Bone</item>
@ -143,6 +145,7 @@
<item>@xml/hang_dubeolsik_kr</item> <item>@xml/hang_dubeolsik_kr</item>
<item>@xml/hebr_1_il</item> <item>@xml/hebr_1_il</item>
<item>@xml/hebr_2_il</item> <item>@xml/hebr_2_il</item>
<item>@xml/kana_jis_jp</item>
<item>@xml/latn_azerty_fr</item> <item>@xml/latn_azerty_fr</item>
<item>@xml/latn_bepo_fr</item> <item>@xml/latn_bepo_fr</item>
<item>@xml/latn_bone</item> <item>@xml/latn_bone</item>

View File

@ -0,0 +1,44 @@
{
"う": { "゛": "ゔ" },
"か": { "゛": "が" },
"き": { "゛": "ぎ" },
"く": { "゛": "ぐ" },
"け": { "゛": "げ" },
"こ": { "゛": "ご" },
"さ": { "゛": "ざ" },
"し": { "゛": "じ" },
"す": { "゛": "ず" },
"せ": { "゛": "ぜ" },
"そ": { "゛": "ぞ" },
"た": { "゛": "だ" },
"ち": { "゛": "ぢ" },
"つ": { "゛": "づ" },
"て": { "゛": "で" },
"と": { "゛": "ど" },
"は": { "゛": "ば", "゜": "ぱ" },
"ひ": { "゛": "び", "゜": "ぴ" },
"ふ": { "゛": "ぶ", "゜": "ぷ" },
"へ": { "゛": "べ", "゜": "ぺ" },
"ほ": { "゛": "ぼ", "゜": "ぽ" },
"ウ": { "゛": "ヴ" },
"カ": { "゛": "ガ" },
"キ": { "゛": "ギ" },
"ク": { "゛": "グ" },
"ケ": { "゛": "ゲ" },
"コ": { "゛": "ゴ" },
"サ": { "゛": "ザ" },
"シ": { "゛": "ジ" },
"ス": { "゛": "ズ" },
"セ": { "゛": "ゼ" },
"ソ": { "゛": "ゾ" },
"タ": { "゛": "ダ" },
"チ": { "゛": "ヂ" },
"ツ": { "゛": "ヅ" },
"テ": { "゛": "デ" },
"ト": { "゛": "ド" },
"ハ": { "゛": "バ", "゜": "パ" },
"ヒ": { "゛": "ビ", "゜": "ピ" },
"フ": { "゛": "ブ", "゜": "プ" },
"ヘ": { "゛": "ベ", "゜": "ペ" },
"ホ": { "゛": "ボ", "゜": "ポ" }
}

44
srcs/compose/dakuten.json Normal file
View File

@ -0,0 +1,44 @@
{
"う": "ゔ",
"か": "が",
"き": "ぎ",
"く": "ぐ",
"け": "げ",
"こ": "ご",
"さ": "ざ",
"し": "じ",
"す": "ず",
"せ": "ぜ",
"そ": "ぞ",
"た": "だ",
"ち": "ぢ",
"つ": "づ",
"て": "で",
"と": "ど",
"は": "ば",
"ひ": "び",
"ふ": "ぶ",
"へ": "べ",
"ほ": "ぼ",
"ウ": "ヴ",
"カ": "ガ",
"キ": "ギ",
"ク": "グ",
"ケ": "ゲ",
"コ": "ゴ",
"サ": "ザ",
"シ": "ジ",
"ス": "ズ",
"セ": "ゼ",
"ソ": "ゾ",
"タ": "ダ",
"チ": "ヂ",
"ツ": "ヅ",
"テ": "デ",
"ト": "ド",
"ハ": "バ",
"ヒ": "ビ",
"フ": "ブ",
"ヘ": "ベ",
"ホ": "ボ"
}

View File

@ -0,0 +1,12 @@
{
"は": "ぱ",
"ひ": "ぴ",
"ふ": "ぷ",
"へ": "ぺ",
"ほ": "ぽ",
"ハ": "パ",
"ヒ": "ピ",
"フ": "プ",
"ヘ": "ペ",
"ホ": "ポ"
}

View File

@ -81,6 +81,8 @@ public final class KeyModifier
case HORN: return apply_compose(k, ComposeKeyData.accent_horn); case HORN: return apply_compose(k, ComposeKeyData.accent_horn);
case HOOK_ABOVE: return apply_compose(k, ComposeKeyData.accent_hook_above); case HOOK_ABOVE: return apply_compose(k, ComposeKeyData.accent_hook_above);
case ARROW_RIGHT: return apply_map_char(k, map_char_arrow_right); case ARROW_RIGHT: return apply_map_char(k, map_char_arrow_right);
case DAKUTEN: return apply_compose(k, ComposeKeyData.dakuten);
case HANDAKUTEN: return apply_compose(k, ComposeKeyData.handakuten);
default: return k; default: return k;
} }
} }

View File

@ -44,6 +44,8 @@ public final class KeyValue implements Comparable<KeyValue>
TREMA, TREMA,
HORN, HORN,
HOOK_ABOVE, HOOK_ABOVE,
DAKUTEN,
HANDAKUTEN,
SUPERSCRIPT, SUPERSCRIPT,
SUBSCRIPT, SUBSCRIPT,
RING, RING,
@ -298,10 +300,15 @@ public final class KeyValue implements Comparable<KeyValue>
return modifierKey(String.valueOf((char)symbol), m, flags | FLAG_KEY_FONT); return modifierKey(String.valueOf((char)symbol), m, flags | FLAG_KEY_FONT);
} }
private static KeyValue diacritic(String symbol, Modifier m, int flags)
{
return new KeyValue(symbol, Kind.Modifier, m.ordinal(),
FLAG_LATCH | FLAG_SPECIAL | flags);
}
private static KeyValue diacritic(int symbol, Modifier m) private static KeyValue diacritic(int symbol, Modifier m)
{ {
return new KeyValue(String.valueOf((char)symbol), Kind.Modifier, m.ordinal(), return diacritic(String.valueOf((char)symbol), m, FLAG_KEY_FONT);
FLAG_LATCH | FLAG_SPECIAL | FLAG_KEY_FONT);
} }
private static KeyValue eventKey(String symbol, Event e, int flags) private static KeyValue eventKey(String symbol, Event e, int flags)
@ -448,6 +455,8 @@ public final class KeyValue implements Comparable<KeyValue>
case "accent_dot_below": return diacritic(0xE060, Modifier.DOT_BELOW); case "accent_dot_below": return diacritic(0xE060, Modifier.DOT_BELOW);
case "accent_horn": return diacritic(0xE061, Modifier.HORN); case "accent_horn": return diacritic(0xE061, Modifier.HORN);
case "accent_hook_above": return diacritic(0xE062, Modifier.HOOK_ABOVE); case "accent_hook_above": return diacritic(0xE062, Modifier.HOOK_ABOVE);
case "dakuten": return diacritic("", Modifier.DAKUTEN, 0);
case "handakuten": return diacritic("", Modifier.HANDAKUTEN, 0);
case "superscript": return modifierKey("Sup", Modifier.SUPERSCRIPT, 0); case "superscript": return modifierKey("Sup", Modifier.SUPERSCRIPT, 0);
case "subscript": return modifierKey("Sub", Modifier.SUBSCRIPT, 0); case "subscript": return modifierKey("Sub", Modifier.SUBSCRIPT, 0);
case "ordinal": return modifierKey("Ord", Modifier.ORDINAL, 0); case "ordinal": return modifierKey("Ord", Modifier.ORDINAL, 0);

View File

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keyboard name="かな入力 (日本)" script="kana">
<modmap>
<shift a="あ" b="ア"/>
<shift a="い" b="イ"/>
<shift a="う" b="ウ"/>
<shift a="え" b="エ"/>
<shift a="お" b="オ"/>
<shift a="か" b="カ"/>
<shift a="き" b="キ"/>
<shift a="く" b="ク"/>
<shift a="け" b="ケ"/>
<shift a="こ" b="コ"/>
<shift a="さ" b="サ"/>
<shift a="し" b="シ"/>
<shift a="す" b="ス"/>
<shift a="せ" b="セ"/>
<shift a="そ" b="ソ"/>
<shift a="た" b="タ"/>
<shift a="ち" b="チ"/>
<shift a="つ" b="ツ"/>
<shift a="て" b="テ"/>
<shift a="と" b="ト"/>
<shift a="な" b="ナ"/>
<shift a="に" b="ニ"/>
<shift a="ぬ" b="ヌ"/>
<shift a="ね" b="ネ"/>
<shift a="の" b=""/>
<shift a="は" b="ハ"/>
<shift a="ひ" b="ヒ"/>
<shift a="ふ" b="フ"/>
<shift a="へ" b="ヘ"/>
<shift a="ほ" b="ホ"/>
<shift a="ま" b="マ"/>
<shift a="み" b="ミ"/>
<shift a="む" b="ム"/>
<shift a="め" b="メ"/>
<shift a="も" b="モ"/>
<shift a="や" b="ヤ"/>
<shift a="ゆ" b="ユ"/>
<shift a="よ" b="ヨ"/>
<shift a="ら" b="ラ"/>
<shift a="り" b="リ"/>
<shift a="る" b="ル"/>
<shift a="れ" b="レ"/>
<shift a="ろ" b="ロ"/>
<shift a="わ" b="ワ"/>
<shift a="を" b="ヲ"/>
<shift a="ん" b="ン"/>
<shift a="ぁ" b="ァ"/>
<shift a="ぃ" b="ィ"/>
<shift a="ぅ" b="ゥ"/>
<shift a="ぇ" b="ェ"/>
<shift a="ぉ" b="ォ"/>
<shift a="っ" b="ッ"/>
<shift a="ゃ" b="ャ"/>
<shift a="ゅ" b="ュ"/>
<shift a="ょ" b="ョ"/>
</modmap>
<row>
<key key0="ぬ" key1="!" key3="1" key4="loc esc"/>
<key key0="ふ" key1="&quot;" key3="2"/>
<key key0="あ" key1="\#" key2="ぁ" key3="3"/>
<key key0="う" key1="$" key2="ぅ" key3="4"/>
<key key0="え" key1="%" key2="ぇ" key3="5"/>
<key key0="お" key1="&amp;" key2="ぉ" key3="6"/>
<key key0="や" key1="'" key2="ゃ" key3="7"/>
<key key0="ゆ" key1="(" key2="ゅ" key3="8"/>
<key key0="よ" key1=")" key2="ょ" key3="9"/>
<key key0="わ" key2="を" key3="0"/>
<key key0="ほ" key1="=" key3="-"/>
<key key0="へ" key1="~" key3="^"/>
<key key0="ー" key1="|" key3="¥"/>
</row>
<row>
<key shift="0.5" key0="た" key1="q" key3="loc tab"/>
<key key0="て" key1="w"/>
<key key0="い" key1="e" key2="ぃ"/>
<key key0="す" key1="r"/>
<key key0="か" key1="t"/>
<key key0="ん" key1="y"/>
<key key0="な" key1="u"/>
<key key0="に" key1="i"/>
<key key0="ら" key1="o"/>
<key key0="せ" key1="p"/>
<key key0="dakuten" key1="`" key3="\@"/>
<key key0="handakuten" key1="{" key2="「" key3="["/>
</row>
<row>
<key shift="0.5" key0="ち" key1="a"/>
<key key0="と" key1="s"/>
<key key0="し" key1="d"/>
<key key0="は" key1="f"/>
<key key0="き" key1="g"/>
<key key0="く" key1="h"/>
<key key0="ま" key1="j"/>
<key key0="の" key1="k"/>
<key key0="り" key1="l"/>
<key key0="れ" key1="+" key3=";"/>
<key key0="け" key1="*" key3=":"/>
<key key0="む" key1="}" key2="」" key3="]"/>
</row>
<row>
<key key0="shift" key2="loc capslock"/>
<key key0="つ" key1="z" key2="っ"/>
<key key0="さ" key1="x"/>
<key key0="そ" key1="c"/>
<key key0="ひ" key1="v"/>
<key key0="こ" key1="b"/>
<key key0="み" key1="n"/>
<key key0="も" key1="m"/>
<key key0="ね" key1="&lt;" key2="、" key3=","/>
<key key0="る" key1=">" key2="。" key3="."/>
<key key0="め" key1="\?" key2="・" key3="/"/>
<key key0="ろ" key1="_" key3="\\"/>
<key key0="backspace" key2="delete"/>
</row>
</keyboard>