Add Fn layer and Compose sequences for Cyrillic

This commit is contained in:
Jules Aguillon 2024-09-29 22:47:57 +02:00
parent 700ec23bd4
commit 9f0cf15d2e
4 changed files with 182 additions and 4 deletions

View File

@ -99,9 +99,12 @@ def strip_cstyle_comments(inp):
# Parse from a json file containing a dictionary sequence → result string.
def parse_sequences_file_json(fname):
with open(fname, "r") as inp:
seqs = json.loads(strip_cstyle_comments(inp))
return list(seqs.items())
try:
with open(fname, "r") as inp:
seqs = json.loads(strip_cstyle_comments(inp))
return list(seqs.items())
except Exception as e:
print("Failed parsing '%s': %s" % (fname, str(e)), file=sys.stderr)
# Format of the sequences file is determined by its extension
def parse_sequences_file(fname, xkb_char_extra_names={}):

View File

@ -0,0 +1,138 @@
{
"\"": {
"і": "ї"
},
",": {
"г": "ӻ",
"к": "ӄ",
"л": "ԓ",
"н": "ӈ",
"х": "ӽ"
},
".": {
"г": "ӷ",
"ж": "җ",
"й": "ҋ",
"к": "қ",
"м": "ӎ",
"н": "ӊ",
"і": "ї"
},
"а": {
"е": "ѣ",
"у": "ѡ",
"ъ": "ѣ",
"ы": "ѣ",
"ь": "ꙙ",
"э": "ѣ",
"є": "ѣ",
"ꙑ": "ѣ"
},
"г": {
",": "ӻ",
".": "ӷ",
"й": "ғ",
"х": "ҁ",
"ј": "ғ"
},
"д": {
"е": "ꙉ",
"ж": "џ",
"з": "ꙃ",
"й": "ꙉ",
"ј": "ꙉ"
},
"е": {
"о": "ё"
},
"ж": {
".": "җ"
},
"з": {
"ф": "ҙ"
},
"и": {
"и": "ӣ",
"й": "ӣ",
"у": "ѵ",
"ј": "ӣ"
},
"й": {
".": "ҋ"
},
"к": {
",": "ӄ",
".": "қ",
"г": "ґ",
"с": "ѯ",
"х": "ҁ",
"ш": "ѯ"
},
"л": {
",": "ԓ",
"ь": "љ"
},
"м": {
".": "ӎ"
},
"н": {
",": "ӈ",
".": "ӊ",
"ь": "њ"
},
"о": {
"т": "ѿ",
"у": "ѹ"
},
"п": {
"с": "ѱ",
"ш": "ѱ"
},
"т": {
"й": "ћ",
"ф": "ѳ",
"ј": "ћ"
},
"у": {
"у": "ӯ",
"ъ": "ў"
},
"х": {
",": "ӽ",
"й": "ҳ",
"ь": "ҳ",
"ј": "ҳ"
},
"ш": {
"ч": "щ"
},
"ы": {
"у": "ѡ",
"ъ": "ꙑ"
},
"ю": {
"а": "ꙓ",
"е": "ѥ",
"м": "ѭ",
"н": "ѩ",
"э": "ѥ"
},
"я": {
"ь": "ꙝ"
},
"і": {
"\"": "ї",
".": "ї",
"й": "ӣ",
"у": "ѵ",
"і": "ӣ",
"ј": "ӣ"
},
"ѡ": {
"т": "ѿ"
},
"ꙑ": {
"ь": "ы",
"у": "ѡ"
}
}

View File

@ -37,6 +37,7 @@
"†": "‡",
"×": "∙",
" ": "nbsp",
// arrows
"↖": "⇖",
"↑": "⇑",
@ -87,6 +88,7 @@
"⊂": "⊆",
"⊃": "⊇",
"±": "∓",
// hebrew niqqud
"ק": "qamats", // kamatz
"ר": "hataf_qamats", // reduced kamatz
@ -101,6 +103,7 @@
"ס": "segol",
"ב": "hataf_segol", // reduced segol
"צ": "tsere",
// Devanagari symbols
"ए": "ऍ",
"े": "ॅ",
@ -157,6 +160,7 @@
"ं": "ॕ",
"़": "ॎ",
"ऽ": "",
// Persian numbers
"۱": "f1",
"۲": "f2",
@ -178,5 +182,38 @@
"٧": "f7",
"٨": "f8",
"٩": "f9",
"٠": "f10"
"٠": "f10",
// Cyrillic
"ꙑ": "ы",
"ы": "ꙑ",
"ш": "ѱ",
"з": "ꙁ",
"и": "і",
"і": "и",
"я": "ꙗ",
"е": "ѥ",
"ѡ": "ꙍ",
"о": "ѻ",
"а": "ѣ",
"э": "є",
"ъ": "ь",
"ь": "ъ",
"й": "ј",
"ꙉ": "ђ",
"ч": "ћ",
"ҁ": "қ",
"қ": "ҁ",
"џ": "ҷ",
"ҷ": "џ",
"ј": "й",
"у": "ꙋ",
"м": "ѫ",
"н": "ѧ",
"с": "ѕ",
"л": "ԯ",
"ԓ": "ԯ",
"\ua67d": "\u0483",
"\u0487": "\ua66f",
"ӈ": "ԩ"
}