mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Port 20 layouts to new system and fix some inconsistencies
This commit is contained in:
parent
80607fc8dc
commit
0ce2c7352b
@ -1,3 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
android.enableJetifier=true
|
||||
android.enableJetifier=false
|
||||
android.useAndroidX=true
|
40
java/assets/layouts/Arabic/farsi.yaml
Normal file
40
java/assets/layouts/Arabic/farsi.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
name: Farsi
|
||||
languages: fa
|
||||
useZWNJKey: true
|
||||
rows:
|
||||
- letters: # rowkeys_farsi1.xml
|
||||
- ['ض']
|
||||
- ['ص']
|
||||
- ['ث']
|
||||
- ['ق']
|
||||
- ['ف']
|
||||
- ['غ']
|
||||
- ['ع']
|
||||
- ['ه', "ﻫ|ه\u200d", 'هٔ', 'ة', '%']
|
||||
- ['خ']
|
||||
- ['ح']
|
||||
- ['ج']
|
||||
- letters: # rowkeys_farsi2.xml
|
||||
- ['ش']
|
||||
- ['س']
|
||||
- ['ی', 'ئ', 'ي', 'ﯨ|ى']
|
||||
- ['ب']
|
||||
- ['ل']
|
||||
- ['ا', '!fixedColumnOrder!5', 'ٱ', 'ء', 'آ', 'أ', 'إ']
|
||||
- ['ت', 'ة']
|
||||
- ['ن']
|
||||
- ['م']
|
||||
- ['ک', 'ك']
|
||||
- ['گ']
|
||||
- letters: # rowkeys_farsi3.xml
|
||||
- ['ظ']
|
||||
- ['ط']
|
||||
- ['ژ']
|
||||
- ['ز']
|
||||
- ['ر']
|
||||
- ['ذ']
|
||||
- ['د']
|
||||
- ['پ']
|
||||
- ['و', 'ؤ']
|
||||
- ['چ']
|
||||
- $delete # forces no shift key
|
40
java/assets/layouts/Bengali/bengali.yaml
Normal file
40
java/assets/layouts/Bengali/bengali.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
name: bengali
|
||||
languages: bn
|
||||
rows:
|
||||
- letters: # rowkeys_bengali1.xml
|
||||
- ['ঔ', 'ৌ', '১']
|
||||
- ['ঐ', 'ৈ', '২']
|
||||
- ['আ', 'া', '৩']
|
||||
- ['ঈ', 'ী', '৪']
|
||||
- ['ঊ', 'ূ', '৫']
|
||||
- ['ব', 'ভ', '৬']
|
||||
- ['হ', '৭']
|
||||
- ['গ', 'ঘ', '৮']
|
||||
- ['দ', 'ধ', '৯']
|
||||
- ['জ', 'ঝ', 'জ্ঞ', '০']
|
||||
- ['ড', 'ড়']
|
||||
- letters: # rowkeys_bengali2.xml
|
||||
- ['ও', 'ো']
|
||||
- ['এ', 'ে']
|
||||
- ['অ', '্']
|
||||
- ['ই', 'ি']
|
||||
- ['উ', 'ু']
|
||||
- ['প', 'ফ']
|
||||
- ['র', 'ৃ', 'ঋ', 'ত্র']
|
||||
- ['ক', 'খ']
|
||||
- ['ত', 'ৎ', 'থ', 'ত্ত']
|
||||
- ['চ', 'ছ']
|
||||
- ['ট', 'ঠ']
|
||||
- letters: # rowkeys_bengali3.xml
|
||||
- ['ঁ', 'ঃ', 'ং']
|
||||
- ['ঢ', 'ঢ়']
|
||||
- ['ম']
|
||||
- ['ন', 'ণ']
|
||||
- ['ঞ', 'ঙ', 'ঞ্জ']
|
||||
- ['ল']
|
||||
- ['ষ', 'ক্ষ']
|
||||
- ['স', 'শ']
|
||||
- ['য়', 'য']
|
||||
- ['।', '॥']
|
||||
- $delete
|
||||
# detected 3 rows
|
@ -4,34 +4,34 @@ useZWNJKey: true
|
||||
rows:
|
||||
- letters:
|
||||
- type: case
|
||||
normal: [ 'ধ', 'ধ্ব', 'ধ্য', 'ধ্র' ]
|
||||
normal: [ 'ধ', '১', 'ধ্ব', 'ধ্য', 'ধ্র' ]
|
||||
shifted: [ 'ঢ' ]
|
||||
- type: case
|
||||
normal: [ 'থ', 'থ্য', 'থ্র' ]
|
||||
normal: [ 'থ', '২', 'থ্য', 'থ্র' ]
|
||||
shifted: [ 'ঠ' ]
|
||||
- type: case
|
||||
normal: [ 'ে', 'এ' ]
|
||||
normal: [ 'ে', '৩', 'এ' ]
|
||||
shifted: [ 'ৈ', 'ঐ' ]
|
||||
- type: case
|
||||
normal: [ 'র' ]
|
||||
normal: [ 'র', '৪' ]
|
||||
shifted: [ 'ড়', '়' ]
|
||||
- type: case
|
||||
normal: [ 'ত', 'ৎ', 'ত্ত', 'ত্ন', 'ত্ব', 'ত্ম' ]
|
||||
normal: [ 'ত', '৫', 'ৎ', 'ত্ত', 'ত্ন', 'ত্ব', 'ত্ম' ]
|
||||
shifted: [ 'ট', '৳', 'ট্ট', 'ট্ব', 'ট্ম' ]
|
||||
- type: case
|
||||
normal: [ 'য়' ]
|
||||
normal: [ 'য়', '৬' ]
|
||||
shifted: [ 'ঞ', 'ঞ্চ', 'ঞ্ছ', 'ঞ্জ' ]
|
||||
- type: case
|
||||
normal: [ 'ু', 'উ' ]
|
||||
normal: [ 'ু', '৭', 'উ' ]
|
||||
shifted: [ 'ূ', 'ঊ' ]
|
||||
- type: case
|
||||
normal: [ 'ি', 'ই' ]
|
||||
normal: [ 'ি', '৮', 'ই' ]
|
||||
shifted: [ 'ী', 'ঈ' ]
|
||||
- type: case
|
||||
normal: [ 'ো', 'ও' ]
|
||||
normal: [ 'ো', '৯', 'ও' ]
|
||||
shifted: [ 'ৌ', 'চ', 'ৗ' ]
|
||||
- type: case
|
||||
normal: [ 'প', 'প্ত', 'প্ন', 'প্প', 'প্য', 'প্র', 'প্ল', 'প্স' ]
|
||||
normal: [ 'প', '০', 'প্ত', 'প্ন', 'প্প', 'প্য', 'প্র', 'প্ল', 'প্স' ]
|
||||
shifted: [ 'ফ', 'ফ্ট', 'ফ্য', 'ফ্র', 'ফ্ল' ]
|
||||
- type: case
|
||||
normal: [ 'আ' ]
|
||||
|
36
java/assets/layouts/Bulgarian/bulgarian.yaml
Normal file
36
java/assets/layouts/Bulgarian/bulgarian.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
name: Bulgarian
|
||||
languages: bg
|
||||
rows:
|
||||
- letters:
|
||||
- ['я']
|
||||
- ['в']
|
||||
- ['е']
|
||||
- ['р']
|
||||
- ['т']
|
||||
- ['ъ']
|
||||
- ['у']
|
||||
- ['и', '%', 'ѝ']
|
||||
- ['о']
|
||||
- ['п']
|
||||
- ['ч']
|
||||
- letters:
|
||||
- ['а']
|
||||
- ['с']
|
||||
- ['д']
|
||||
- ['ф']
|
||||
- ['г']
|
||||
- ['х']
|
||||
- ['й']
|
||||
- ['к']
|
||||
- ['л']
|
||||
- ['ш']
|
||||
- ['щ']
|
||||
- letters:
|
||||
- ['з']
|
||||
- ['ь']
|
||||
- ['ц']
|
||||
- ['ж']
|
||||
- ['б']
|
||||
- ['н']
|
||||
- ['м']
|
||||
- ['ю']
|
37
java/assets/layouts/Bulgarian/bulgarian_bds.yaml
Normal file
37
java/assets/layouts/Bulgarian/bulgarian_bds.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
name: Bulgarian (BDS)
|
||||
languages: bg
|
||||
rows:
|
||||
- letters:
|
||||
- ['у']
|
||||
- ['е']
|
||||
- ['и', '%', 'ѝ']
|
||||
- ['ш']
|
||||
- ['щ']
|
||||
- ['к']
|
||||
- ['с']
|
||||
- ['д']
|
||||
- ['з']
|
||||
- ['ц']
|
||||
- ['б']
|
||||
- letters:
|
||||
- ['ь']
|
||||
- ['я']
|
||||
- ['а']
|
||||
- ['о']
|
||||
- ['ж']
|
||||
- ['г']
|
||||
- ['т']
|
||||
- ['н']
|
||||
- ['в']
|
||||
- ['м']
|
||||
- ['ч']
|
||||
- letters:
|
||||
- ['ю']
|
||||
- ['й']
|
||||
- ['ъ']
|
||||
- ['э']
|
||||
- ['ф']
|
||||
- ['х']
|
||||
- ['п']
|
||||
- ['р']
|
||||
- ['л']
|
@ -2,4 +2,11 @@ name: AZERTY
|
||||
rows:
|
||||
- letters: a z e r t y u i o p
|
||||
- letters: q s d f g h j k l m
|
||||
- letters: w x c v b n '
|
||||
- letters:
|
||||
- w
|
||||
- x
|
||||
- c
|
||||
- v
|
||||
- b
|
||||
- n
|
||||
- {type: case, normal: "'", shifted: "?"}
|
@ -1,5 +1,15 @@
|
||||
name: Colemak
|
||||
rows:
|
||||
- letters: q w f p g j l u y ;
|
||||
- letters:
|
||||
- q
|
||||
- w
|
||||
- f
|
||||
- p
|
||||
- g
|
||||
- j
|
||||
- l
|
||||
- u
|
||||
- y
|
||||
- {type: case, normal: ";", shifted: ":"}
|
||||
- letters: a r s t d h n e i o
|
||||
- letters: z x c v b k m
|
@ -1,6 +1,16 @@
|
||||
name: Dvorak
|
||||
rows:
|
||||
- letters: \' , . p y f g c r l
|
||||
- letters:
|
||||
- {type: case, normal: "'", shifted: "\""}
|
||||
- {type: case, normal: ",", shifted: "<"}
|
||||
- {type: case, normal: ".", shifted: ">"}
|
||||
- p
|
||||
- y
|
||||
- f
|
||||
- g
|
||||
- c
|
||||
- r
|
||||
- l
|
||||
- letters: a o e u i d h t n s
|
||||
- letters: $shift j k x b m w v $delete
|
||||
- bottom: $symbols q $action $space $contextual z $enter
|
@ -2,16 +2,16 @@ name: "PC QWERTY"
|
||||
rows:
|
||||
- numbers:
|
||||
- {type: case, normal: ["`", "~"], shifted: "~"}
|
||||
- {type: case, normal: ["1", "!", "!text/morekeys_symbols_1"], shifted: "!"}
|
||||
- {type: case, normal: ["2", "@", "!text/morekeys_symbols_2"], shifted: "@"}
|
||||
- {type: case, normal: ["3", "#", "!text/morekeys_symbols_3"], shifted: "#"}
|
||||
- {type: case, normal: ["4", "$", "!text/morekeys_symbols_4"], shifted: "$"}
|
||||
- {type: case, normal: ["5", "%", "!text/morekeys_symbols_5"], shifted: "%"}
|
||||
- {type: case, normal: ["6", "^", "!text/morekeys_symbols_6"], shifted: "^"}
|
||||
- {type: case, normal: ["7", "&", "!text/morekeys_symbols_7"], shifted: "&"}
|
||||
- {type: case, normal: ["8", "*", "!text/morekeys_symbols_8"], shifted: "*"}
|
||||
- {type: case, normal: ["9", "(", "!text/morekeys_symbols_9"], shifted: "("}
|
||||
- {type: case, normal: ["0", ")", "!text/morekeys_symbols_0"], shifted: ")"}
|
||||
- {type: case, normal: ["1", "!"], shifted: "!"}
|
||||
- {type: case, normal: ["2", "@"], shifted: "@"}
|
||||
- {type: case, normal: ["3", "#"], shifted: "#"}
|
||||
- {type: case, normal: ["4", "$"], shifted: "$"}
|
||||
- {type: case, normal: ["5", "%"], shifted: "%"}
|
||||
- {type: case, normal: ["6", "^"], shifted: "^"}
|
||||
- {type: case, normal: ["7", "&"], shifted: "&"}
|
||||
- {type: case, normal: ["8", "*"], shifted: "*"}
|
||||
- {type: case, normal: ["9", "("], shifted: "("}
|
||||
- {type: case, normal: ["0", ")"], shifted: ")"}
|
||||
- {type: case, normal: ["-", "_"], shifted: "_"}
|
||||
- {type: case, normal: ["=", "+"], shifted: "+"}
|
||||
- letters:
|
||||
|
33
java/assets/layouts/French/bepo.yaml
Normal file
33
java/assets/layouts/French/bepo.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
name: BEPO
|
||||
languages: fr
|
||||
rows:
|
||||
- letters: # rowkeys_bepo1.xml
|
||||
- ['b']
|
||||
- ['é', 'è']
|
||||
- ['p']
|
||||
- ['o']
|
||||
- ['v']
|
||||
- ['d']
|
||||
- ['l']
|
||||
- ['j']
|
||||
- ['z']
|
||||
- ['w']
|
||||
- letters: # rowkeys_bepo2.xml
|
||||
- ['a']
|
||||
- ['u']
|
||||
- ['i']
|
||||
- ['e']
|
||||
- ['c']
|
||||
- ['t']
|
||||
- ['s']
|
||||
- ['r']
|
||||
- ['n']
|
||||
- ['m']
|
||||
- letters: # rowkeys_bepo3.xml
|
||||
- ['y']
|
||||
- ['x']
|
||||
- ['k']
|
||||
- ['q']
|
||||
- ['g']
|
||||
- ['h']
|
||||
- ['f']
|
33
java/assets/layouts/Georgian/georgian.yaml
Normal file
33
java/assets/layouts/Georgian/georgian.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
name: Georgian
|
||||
languages: ka_GE
|
||||
attributes: {shiftable: false} # Automatic shifting breaks many of the characters
|
||||
rows:
|
||||
- letters:
|
||||
- 'ქ'
|
||||
- {type: case, normal: ['წ', 'ჭ'], shifted: ['ჭ']}
|
||||
- ['ე', '%', 'ჱ']
|
||||
- {type: case, normal: ['რ', 'ღ'], shifted: ['ღ']}
|
||||
- {type: case, normal: ['ტ', 'თ'], shifted: ['თ']}
|
||||
- ['ყ', '%', 'ჸ']
|
||||
- 'უ'
|
||||
- ['ი', '%', 'ჲ']
|
||||
- 'ო'
|
||||
- 'პ'
|
||||
- letters:
|
||||
- ['ა', 'ჺ']
|
||||
- {type: case, normal: ['ს', 'შ'], shifted: ['შ']}
|
||||
- 'დ'
|
||||
- ['ფ', 'ჶ']
|
||||
- ['გ', 'ჹ']
|
||||
- ['ჰ', 'ჵ']
|
||||
- {type: case, normal: ['ჯ', 'ჟ', 'ჷ'], shifted: ['ჟ']}
|
||||
- 'კ'
|
||||
- 'ლ'
|
||||
- letters:
|
||||
- {type: case, normal: ['ზ', 'ძ'], shifted: ['ძ']}
|
||||
- ['ხ', 'ჴ']
|
||||
- {type: case, normal: ['ც', 'ჩ'], shifted: ['ჩ']}
|
||||
- ['ვ', 'ჳ']
|
||||
- 'ბ'
|
||||
- ['ნ', 'ჼ']
|
||||
- 'მ'
|
33
java/assets/layouts/Greek/greek.yaml
Normal file
33
java/assets/layouts/Greek/greek.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
name: Greek
|
||||
languages: el
|
||||
rows:
|
||||
- letters: # rowkeys_greek1.xml
|
||||
- {type: case, normal: [';', '%', ':', '·'], shifted: [':', '%', ';', '·']}
|
||||
- {type: base, spec: 'ς', attributes: {shiftable: false}} # This specific character must not be shifted
|
||||
- ['ε', 'έ', '%', 'ὲ', 'ἐ', 'ἑ', 'ἔ', 'ἕ', 'ἒ', 'ἓ']
|
||||
- ['ρ', '%', 'ῥ']
|
||||
- ['τ']
|
||||
- ['υ', 'ύ', '%', 'ϋ', 'ΰ', 'ὺ', 'ῦ', 'ὐ', 'ὑ', 'ὔ', 'ὕ', 'ὒ', 'ὓ', 'ὖ', 'ὗ', 'ῢ', 'ῧ']
|
||||
- ['θ']
|
||||
- ['ι', 'ί', '%', 'ϊ', 'ΐ', 'ὶ', 'ῖ', 'ἰ', 'ἱ', 'ἴ', 'ἵ', 'ἲ', 'ἳ', 'ἶ', 'ἷ', 'ῒ', 'ῗ']
|
||||
- ['ο', 'ό', '%', 'ὸ', 'ὀ', 'ὁ', 'ὄ', 'ὅ', 'ὂ', 'ὃ']
|
||||
- ['π']
|
||||
- letters: # rowkeys_greek2.xml
|
||||
- {type: case, normal: ['α', 'ά', 'ὰ', 'ᾶ', 'ἀ', 'ἁ', 'ἄ', 'ἅ', 'ἂ', 'ἃ', 'ἆ', 'ἇ', 'ᾳ', 'ᾴ', 'ᾲ', 'ᾷ', 'ᾀ', 'ᾁ', 'ᾄ', 'ᾅ', 'ᾂ', 'ᾃ', 'ᾆ', 'ᾇ'], shifted: ['Α', 'Ά', 'Ὰ', 'Ἀ', 'Ἁ', 'ἄ', 'ἅ', 'Ἂ', 'Ἃ', 'Ἆ', 'Ἇ']}
|
||||
- ['σ']
|
||||
- ['δ']
|
||||
- ['φ']
|
||||
- ['γ']
|
||||
- {type: case, normal: ['η', 'ή', 'ὴ', 'ῆ', 'ἠ', 'ἡ', 'ἤ', 'ἥ', 'ἢ', 'ἣ', 'ἦ', 'ἧ', 'ῃ', 'ῄ', 'ῂ', 'ῇ', 'ᾐ', 'ᾑ', 'ᾔ', 'ᾕ', 'ᾒ', 'ᾓ', 'ᾖ', 'ᾗ'], shifted: ['Η', 'Ή', 'Ὴ', 'Ἠ', 'Ἡ', 'Ἤ', 'Ἥ', 'Ἢ', 'Ἣ', 'Ἦ', 'Ἧ']}
|
||||
- ['ξ']
|
||||
- ['κ']
|
||||
- ['λ']
|
||||
- letters: # rowkeys_greek3.xml
|
||||
- ['ζ']
|
||||
- ['χ']
|
||||
- ['ψ']
|
||||
- {type: case, normal: ['ω', 'ώ', 'ὼ', 'ῶ', 'ὠ', 'ὡ', 'ὤ', 'ὥ', 'ὢ', 'ὣ', 'ὦ', 'ὧ', 'ῳ', 'ῴ', 'ῲ', 'ῷ', 'ᾠ', 'ᾡ', 'ᾤ', 'ᾥ', 'ᾢ', 'ᾣ', 'ᾦ', 'ᾧ'], shifted: ['ω', 'Ώ', 'Ὼ', 'Ὠ', 'Ὡ', 'Ὤ', 'Ὥ', 'Ὢ', 'Ὣ', 'Ὦ', 'Ὧ']}
|
||||
- ['β']
|
||||
- ['ν']
|
||||
- ['μ']
|
||||
# detected 3 rows
|
38
java/assets/layouts/Hebrew/hebrew.yaml
Normal file
38
java/assets/layouts/Hebrew/hebrew.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
name: Hebrew
|
||||
languages: iw
|
||||
rows:
|
||||
- letters: # rowkeys_hebrew1.xml
|
||||
# skipped unknown case {'{http://schemas.android.com/apk/res-auto}mode': 'email|url'}
|
||||
- ["\\'", '%', '"']
|
||||
- ['-', '%', '_']
|
||||
- ['ק']
|
||||
- ['ר']
|
||||
- ['א']
|
||||
- ['ט']
|
||||
- ['ו']
|
||||
- ['ן']
|
||||
- ['ם']
|
||||
- ['פ']
|
||||
- letters: # rowkeys_hebrew2.xml
|
||||
- ['ש']
|
||||
- ['ד']
|
||||
- ['ג', 'ג׳']
|
||||
- ['כ']
|
||||
- ['ע']
|
||||
- ['י', 'ײַ']
|
||||
- ['ח', 'ח׳']
|
||||
- ['ל']
|
||||
- ['ך']
|
||||
- ['ף']
|
||||
- letters: # rowkeys_hebrew3.xml
|
||||
- ['ז', 'ז׳']
|
||||
- ['ס']
|
||||
- ['ב']
|
||||
- ['ה']
|
||||
- ['נ']
|
||||
- ['מ']
|
||||
- ['צ', 'צ׳']
|
||||
- ['ת', 'ת׳']
|
||||
- ['ץ', 'ץ׳']
|
||||
- $delete # force no shift key
|
||||
# detected 3 rows
|
40
java/assets/layouts/Kannada/kannada.yaml
Normal file
40
java/assets/layouts/Kannada/kannada.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
name: Kannada
|
||||
languages: kn-IN
|
||||
useZWNJKey: true
|
||||
rows:
|
||||
- letters: # rowkeys_kannada1.xml
|
||||
- ['ೌ', 'ಔ', '೧']
|
||||
- ['ೈ', 'ಐ', '೨']
|
||||
- ['ಾ', 'ಆ', '೩']
|
||||
- ['ೀ', 'ಈ', '೪']
|
||||
- ['ೂ', 'ಊ', '೫']
|
||||
- ['ಬ', 'ಭ', '೬']
|
||||
- ['ಹ', 'ಙ', '೭']
|
||||
- ['ಗ', 'ಘ', '೮']
|
||||
- ['ದ', 'ಧ', '೯']
|
||||
- ['ಜ', 'ಝ', '೦']
|
||||
- ['ಡ', 'ಢ']
|
||||
- letters: # rowkeys_kannada2.xml
|
||||
- ['ೋ', 'ಓ']
|
||||
- ['ೇ', 'ಏ']
|
||||
- ['್', 'ಅ']
|
||||
- ['ಿ', 'ಇ']
|
||||
- ['ು', 'ಉ']
|
||||
- ['ಪ', 'ಫ']
|
||||
- ['ರ', 'ಱ', 'ೃ']
|
||||
- ['ಕ', 'ಖ']
|
||||
- ['ತ', 'ಥ']
|
||||
- ['ಚ', 'ಛ']
|
||||
- ['ಟ', 'ಠ']
|
||||
- letters: # rowkeys_kannada3.xml
|
||||
- ['ೆ', 'ಒ']
|
||||
- ['ಂ', 'ಎ']
|
||||
- ['ಮ']
|
||||
- ['ನ', 'ಣ']
|
||||
- ['ವ']
|
||||
- ['ಲ', 'ಳ']
|
||||
- ['ಸ', 'ಶ']
|
||||
- ['ಋ', '್ರ']
|
||||
- ['ಷ', 'ಕ್ಷ']
|
||||
- ['ಯ', 'ಜ್ಞ']
|
||||
- $delete # force no shift key
|
56
java/assets/layouts/Khmer/khmer.yaml
Normal file
56
java/assets/layouts/Khmer/khmer.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
name: Khmer
|
||||
languages: km-KH
|
||||
minimumFunctionalKeyWidth: 0.0
|
||||
attributes: { moreKeyMode: OnlyExplicit }
|
||||
rows:
|
||||
- letters: # rowkeys_khmer1.xml
|
||||
- {type: case, normal: ['១', '1', '៱'], shifted: ['!', "!icon/zwj_key|\u200d"]}
|
||||
- {type: case, normal: ['២', '2', '៲'], shifted: ['ៗ', "!icon/zwnj_key|\u200c"]}
|
||||
- {type: case, normal: ['៣', '3', '៳'], shifted: ['"', '៑']}
|
||||
- {type: case, normal: ['៤', '4', '៴'], shifted: ['៛', '$', '€']}
|
||||
- {type: case, normal: ['៥', '5', '៵'], shifted: ['%', '៖']}
|
||||
- {type: case, normal: ['៦', '6', '៶'], shifted: ['៍', '៙']}
|
||||
- {type: case, normal: ['៧', '7', '៷'], shifted: ['័', '៚']}
|
||||
- {type: case, normal: ['៨', '8', '៸'], shifted: ['៏', "\u17d7", '*']}
|
||||
- {type: case, normal: ['៩', '9', '៹'], shifted: ['(', '{', '«']}
|
||||
- {type: case, normal: ['០', '0', '៰'], shifted: [')', '}', '»']}
|
||||
- {type: case, normal: ['ឥ', 'ឦ'], shifted: ['៌', '×']}
|
||||
- {type: case, normal: ['ឲ', 'ឱ'], shifted: ['៎']}
|
||||
- letters: # rowkeys_khmer2.xml
|
||||
- {type: case, normal: ['ឆ'], shifted: ['ឈ', 'ៜ']}
|
||||
- {type: case, normal: ['ឹ'], shifted: ['ឺ', '៝']}
|
||||
- {type: case, normal: ['េ'], shifted: ['ែ']}
|
||||
- {type: case, normal: ['រ'], shifted: ['ឬ', 'ឫ']}
|
||||
- {type: case, normal: ['ត'], shifted: ['ទ']}
|
||||
- {type: case, normal: ['យ'], shifted: ['ួ']}
|
||||
- {type: case, normal: ['ុ'], shifted: ['ូ']}
|
||||
- {type: case, normal: ['ិ'], shifted: ['ី']}
|
||||
- {type: case, normal: ['ោ'], shifted: ['ៅ']}
|
||||
- {type: case, normal: ['ផ'], shifted: ['ភ']}
|
||||
- {type: case, normal: ['ៀ'], shifted: ['ឿ']}
|
||||
- {type: case, normal: ['ឪ', 'ឧ', 'ឱ', 'ឳ', 'ឩ', 'ឨ'], shifted: ['ឰ']}
|
||||
- letters: # rowkeys_khmer3.xml
|
||||
- {type: case, normal: ['ា'], shifted: ['ាំ']}
|
||||
- {type: case, normal: ['ស'], shifted: ['ៃ']}
|
||||
- {type: case, normal: ['ដ'], shifted: ['ឌ']}
|
||||
- {type: case, normal: ['ថ'], shifted: ['ធ']}
|
||||
- {type: case, normal: ['ង'], shifted: ['អ']}
|
||||
- {type: case, normal: ['ហ'], shifted: ['ះ', 'ៈ']}
|
||||
- {type: case, normal: ['្'], shifted: ['ញ']}
|
||||
- {type: case, normal: ['ក'], shifted: ['គ', 'ឝ']}
|
||||
- {type: case, normal: ['ល'], shifted: ['ឡ']}
|
||||
- {type: case, normal: ['ើ'], shifted: ['ោះ']}
|
||||
- {type: case, normal: ['់'], shifted: ['៉']}
|
||||
- {type: case, normal: ['ឮ', 'ឭ', 'ឰ'], shifted: ['ឯ']}
|
||||
- letters: # rowkeys_khmer4.xml
|
||||
- {type: case, normal: ['ឋ'], shifted: ['ឍ']}
|
||||
- {type: case, normal: ['ខ'], shifted: ['ឃ']}
|
||||
- {type: case, normal: ['ច'], shifted: ['ជ']}
|
||||
- {type: case, normal: ['វ'], shifted: ['េះ']}
|
||||
- {type: case, normal: ['ប'], shifted: ['ព', 'ឞ']}
|
||||
- {type: case, normal: ['ន'], shifted: ['ណ']}
|
||||
- {type: case, normal: ['ម'], shifted: ['ំ']}
|
||||
- {type: case, normal: ['ុំ'], shifted: ['ុះ']}
|
||||
- {type: case, normal: ['។'], shifted: ['៕']}
|
||||
- {type: case, normal: ['៊', "\u17d8"], shifted: ['?']}
|
||||
# detected 4 rows
|
56
java/assets/layouts/Lao/lao.yaml
Normal file
56
java/assets/layouts/Lao/lao.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
name: Lao
|
||||
languages: lo-LA
|
||||
minimumFunctionalKeyWidth: 0.0
|
||||
attributes: { moreKeyMode: OnlyExplicit }
|
||||
rows:
|
||||
- letters: # rowkeys_lao1.xml
|
||||
- {type: case, normal: ['ຢ', '1', '໑'], shifted: ['໑']}
|
||||
- {type: case, normal: ['ຟ', '2', '໒'], shifted: ['໒']}
|
||||
- {type: case, normal: ['ໂ', '3', '໓'], shifted: ['໓']}
|
||||
- {type: case, normal: ['ຖ', '4', '໔'], shifted: ['໔']}
|
||||
- {type: case, normal: ['ຸ'], shifted: ['໌']}
|
||||
- {type: case, normal: ['ູ'], shifted: ['ຼ']}
|
||||
- {type: case, normal: ['ຄ', '5', '໕'], shifted: ['໕']}
|
||||
- {type: case, normal: ['ຕ', '6', '໖'], shifted: ['໖']}
|
||||
- {type: case, normal: ['ຈ', '7', '໗'], shifted: ['໗']}
|
||||
- {type: case, normal: ['ຂ', '8', '໘'], shifted: ['໘']}
|
||||
- {type: case, normal: ['ຊ', '9', '໙'], shifted: ['໙']}
|
||||
- {type: case, normal: ['ໍ'], shifted: ['ໍ່']}
|
||||
- letters: # rowkeys_lao2.xml
|
||||
- {type: case, normal: ['ົ'], shifted: ['ົ້']}
|
||||
- {type: case, normal: ['ໄ', '0', '໐'], shifted: ['໐']}
|
||||
- {type: case, normal: ['ຳ'], shifted: ['ຳ້']}
|
||||
- {type: case, normal: ['ພ'], shifted: ['_']}
|
||||
- {type: case, normal: ['ະ'], shifted: ['+']}
|
||||
- {type: case, normal: ['ິ'], shifted: ['ິ້']}
|
||||
- {type: case, normal: ['ີ'], shifted: ['ີ້']}
|
||||
- {type: case, normal: ['ຮ'], shifted: ['ຣ']}
|
||||
- {type: case, normal: ['ນ'], shifted: ['ໜ']}
|
||||
- {type: case, normal: ['ຍ'], shifted: ['ຽ']}
|
||||
- {type: case, normal: ['ບ'], shifted: ['ຫຼ']}
|
||||
- {type: case, normal: ['ລ'], shifted: ['”']}
|
||||
- letters: # rowkeys_lao3.xml
|
||||
- {type: case, normal: ['ັ'], shifted: ['ັ້']}
|
||||
- {type: case, normal: ['ຫ'], shifted: [';']}
|
||||
- {type: case, normal: ['ກ'], shifted: ['.']}
|
||||
- {type: case, normal: ['ດ'], shifted: [',']}
|
||||
- {type: case, normal: ['ເ'], shifted: [':']}
|
||||
- {type: case, normal: ['້'], shifted: ['໊']}
|
||||
- {type: case, normal: ['່'], shifted: ['໋']}
|
||||
- {type: case, normal: ['າ'], shifted: ['!']}
|
||||
- {type: case, normal: ['ສ'], shifted: ['?']}
|
||||
- {type: case, normal: ['ວ'], shifted: ['%']}
|
||||
- {type: case, normal: ['ງ'], shifted: ['=']}
|
||||
- {type: case, normal: ['“'], shifted: ['“']}
|
||||
- letters: # rowkeys_lao4.xml
|
||||
- {type: case, normal: ['ຜ'], shifted: ['₭']}
|
||||
- {type: case, normal: ['ປ'], shifted: ['(']}
|
||||
- {type: case, normal: ['ແ'], shifted: ['ຯ']}
|
||||
- {type: case, normal: ['ອ'], shifted: ['@']}
|
||||
- {type: case, normal: ['ຶ'], shifted: ['ຶ້']}
|
||||
- {type: case, normal: ['ື'], shifted: ['ື້']}
|
||||
- {type: case, normal: ['ທ'], shifted: ['ໆ']}
|
||||
- {type: case, normal: ['ມ'], shifted: ['ໝ']}
|
||||
- {type: case, normal: ['ໃ'], shifted: ['$']}
|
||||
- {type: case, normal: ['ຝ'], shifted: [')']}
|
||||
# detected 4 rows
|
@ -8,7 +8,7 @@ rows:
|
||||
- р
|
||||
- т
|
||||
- ы
|
||||
- у
|
||||
- [у, ю]
|
||||
- и
|
||||
- о
|
||||
- п
|
||||
|
40
java/assets/layouts/Malayalam/malayalam.yaml
Normal file
40
java/assets/layouts/Malayalam/malayalam.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
name: Malayalam
|
||||
languages: ml-IN
|
||||
rows:
|
||||
- letters: # rowkeys_malayalam1.xml
|
||||
- ['്', 'അ']
|
||||
- ['ാ', 'ആ']
|
||||
- ['ി', 'ഇ']
|
||||
- ['ീ', 'ഈ']
|
||||
- ['ു', 'ഉ']
|
||||
- ['ൂ', 'ഊ']
|
||||
- ['ൃ', 'ഋ']
|
||||
- ['െ', 'എ', 'ഐ', 'ൈ']
|
||||
- ['േ', 'ഏ']
|
||||
- ['ൊ', 'ഒ']
|
||||
- ['ോ', 'ഓ', 'ഔ', 'ൗ']
|
||||
- letters: # rowkeys_malayalam2.xml
|
||||
- ['ക', 'ഖ']
|
||||
- ['ഗ', 'ഘ']
|
||||
- ['ങ', 'ഞ']
|
||||
- ['ച', 'ഛ']
|
||||
- ['ജ', 'ഝ']
|
||||
- ['ട', 'ഠ']
|
||||
- ['ഡ', 'ഢ']
|
||||
- ['ണ', 'ൺ']
|
||||
- ['ത', 'ഥ']
|
||||
- ['ദ', 'ധ']
|
||||
- ['ന', 'ൻ']
|
||||
- letters: # rowkeys_malayalam3.xml
|
||||
- ['പ', 'ഫ']
|
||||
- ['ബ', 'ഭ']
|
||||
- ['മ', 'ം']
|
||||
- ['യ', '്യ']
|
||||
- ['ര', '്ര', 'ർ', 'റ']
|
||||
- ['ല', 'ൽ']
|
||||
- ['വ', '്വ']
|
||||
- ['ശ', 'ഷ', 'സ']
|
||||
- ['ഹ', 'ഃ']
|
||||
- ['ള', 'ൾ', 'ഴ']
|
||||
- $delete # force no shift key
|
||||
# detected 3 rows
|
6
java/assets/layouts/Serbian/serbian_qwertz.yaml
Normal file
6
java/assets/layouts/Serbian/serbian_qwertz.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
name: Serbian QWERTZ
|
||||
languages: sr-ZZ
|
||||
rows:
|
||||
- letters: q w e r t z u i o p š
|
||||
- letters: a s d f g h j k l č ć
|
||||
- letters: y x c v b n m đ ž
|
38
java/assets/layouts/Sinhala/sinhala.yaml
Normal file
38
java/assets/layouts/Sinhala/sinhala.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
name: Sinhala
|
||||
languages: si-LK
|
||||
rows:
|
||||
- letters: # rowkeys_sinhala1.xml
|
||||
- {type: case, normal: ['ු'], shifted: ['ූ']}
|
||||
- {type: case, normal: ['අ'], shifted: ['උ']}
|
||||
- {type: case, normal: ['ැ'], shifted: ['ෑ']}
|
||||
- {type: case, normal: ['ර'], shifted: ['ඍ']}
|
||||
- {type: case, normal: ['එ'], shifted: ['ඔ']}
|
||||
- {type: case, normal: ['හ'], shifted: ['ශ']}
|
||||
- {type: case, normal: ['ම'], shifted: ['ඹ']}
|
||||
- {type: case, normal: ['ස'], shifted: ['ෂ']}
|
||||
- {type: case, normal: ['ද', '%', 'ඳ'], shifted: ['ධ']}
|
||||
- {type: case, normal: ['ච'], shifted: ['ඡ']}
|
||||
- {type: case, normal: ['ඤ', '෴'], shifted: ['ඥ', '෴']}
|
||||
- letters: # rowkeys_sinhala2.xml
|
||||
- {type: case, normal: ['්'], shifted: ['ෟ']}
|
||||
- {type: case, normal: ['ි'], shifted: ['ී']}
|
||||
- {type: case, normal: ['ා'], shifted: ['ෘ']}
|
||||
- {type: case, normal: ['ෙ'], shifted: ['ෆ']}
|
||||
- {type: case, normal: ['ට'], shifted: ['ඨ']}
|
||||
- {type: case, normal: ['ය'], shifted: ["්\u200dය"]}
|
||||
- {type: case, normal: ['ව'], shifted: ['ළු']}
|
||||
- {type: case, normal: ['න'], shifted: ['ණ']}
|
||||
- {type: case, normal: ['ක'], shifted: ['ඛ']}
|
||||
- {type: case, normal: ['ත'], shifted: ['ථ']}
|
||||
- {type: case, normal: ['ඏ'], shifted: ["්\u200dර"]}
|
||||
- letters: # rowkeys_sinhala3.xml
|
||||
- {type: case, normal: ['ං', 'ඃ'], shifted: ['ඞ']}
|
||||
- {type: case, normal: ['ජ', 'ඦ'], shifted: ['ඣ']}
|
||||
- {type: case, normal: ['ඩ', 'ඬ'], shifted: ['ඪ']}
|
||||
- {type: case, normal: ['ඉ'], shifted: ['ඊ']}
|
||||
- {type: case, normal: ['බ'], shifted: ['භ']}
|
||||
- {type: case, normal: ['ප'], shifted: ['ඵ']}
|
||||
- {type: case, normal: ['ල'], shifted: ['ළ']}
|
||||
- {type: case, normal: ['ග', 'ඟ'], shifted: ['ඝ']}
|
||||
- {type: case, normal: ['ෳ'], shifted: ["ර්\u200d"]}
|
||||
# detected 3 rows
|
40
java/assets/layouts/Slavic/mongolian.yaml
Normal file
40
java/assets/layouts/Slavic/mongolian.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
name: Mongolian
|
||||
languages: mn-MN
|
||||
rows:
|
||||
- letters: # rowkeys_mongolian1.xml
|
||||
- ['ф']
|
||||
- ['ц']
|
||||
- ['у', '!text/morekeys_cyrillic_u']
|
||||
- ['ж']
|
||||
- ['э', '!text/morekeys_cyrillic_ie']
|
||||
- ['н', '!text/morekeys_cyrillic_en']
|
||||
- ['г', '!text/morekeys_cyrillic_ghe']
|
||||
- ['ш', '%', 'щ']
|
||||
- ['ү']
|
||||
- ['з']
|
||||
- ['к']
|
||||
- ['е']
|
||||
- letters: # rowkeys_mongolian2.xml
|
||||
- ['й']
|
||||
- ['ы']
|
||||
- ['б']
|
||||
- ['ө']
|
||||
- ['а']
|
||||
- ['х']
|
||||
- ['р']
|
||||
- ['о']
|
||||
- ['л']
|
||||
- ['д']
|
||||
- ['п']
|
||||
- ['ю']
|
||||
- letters: # rowkeys_mongolian3.xml
|
||||
- ['я']
|
||||
- ['ч']
|
||||
- ['ё']
|
||||
- ['с']
|
||||
- ['м']
|
||||
- ['и']
|
||||
- ['т']
|
||||
- ['ь', 'ъ']
|
||||
- ['в']
|
||||
# detected 3 rows
|
40
java/assets/layouts/Tamil/tamil.yaml
Normal file
40
java/assets/layouts/Tamil/tamil.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
name: Tamil
|
||||
languages: ta-LK ta-IN ta-SG
|
||||
rows:
|
||||
- letters: # rowkeys_tamil1.xml
|
||||
- ['ஔ', 'ௌ']
|
||||
- ['ஐ', 'ை']
|
||||
- ['ஆ', 'ா']
|
||||
- ['ஈ', 'ீ']
|
||||
- ['ஊ', 'ூ']
|
||||
- ['ம']
|
||||
- ['ன']
|
||||
- ['ந']
|
||||
- ['ங']
|
||||
- ['ண']
|
||||
- ['ஞ']
|
||||
- letters: # rowkeys_tamil2.xml
|
||||
- ['ஓ', 'ோ', 'ௐ']
|
||||
- ['ஏ', 'ே']
|
||||
- ['அ', 'ஃ']
|
||||
- ['இ', 'ி']
|
||||
- ['உ', 'ு']
|
||||
- ['ற']
|
||||
- ['ப']
|
||||
- ['க', 'ஹ', 'க்ஷ']
|
||||
- ['த']
|
||||
- ['ச', 'ஸ', 'ஶ்ரீ']
|
||||
- ['ட']
|
||||
- letters: # rowkeys_tamil3.xml
|
||||
- ['ஒ', 'ொ']
|
||||
- ['எ', 'ெ']
|
||||
- ['்']
|
||||
- ['ர']
|
||||
- ['வ']
|
||||
- ['ழ']
|
||||
- ['ல']
|
||||
- ['ள']
|
||||
- ['ய']
|
||||
- ['ஷ', 'ஜ']
|
||||
- $delete # force no shift key
|
||||
# detected 3 rows
|
41
java/assets/layouts/Telugu/telugu.yaml
Normal file
41
java/assets/layouts/Telugu/telugu.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
name: Telugu
|
||||
languages: te-IN
|
||||
useZWNJKey: true
|
||||
rows:
|
||||
- letters: # rowkeys_telugu1.xml
|
||||
- ['ౌ', 'ఔ']
|
||||
- ['ై', 'ఐ']
|
||||
- ['ా', 'ఆ']
|
||||
- ['ీ', 'ఈ']
|
||||
- ['ూ', 'ఊ']
|
||||
- ['బ', 'భ']
|
||||
- ['హ', 'ః']
|
||||
- ['గ', 'ఘ']
|
||||
- ['ద', 'ధ']
|
||||
- ['జ', 'ఝ']
|
||||
- ['డ', 'ఢ']
|
||||
- letters: # rowkeys_telugu2.xml
|
||||
- ['ో', 'ఓ']
|
||||
- ['ే', 'ఏ']
|
||||
- ['్', 'అ']
|
||||
- ['ి', 'ఇ']
|
||||
- ['ు', 'ఉ']
|
||||
- ['ప', 'ఫ']
|
||||
- ['ర', 'ఱ', '్ర']
|
||||
- ['క', 'ఖ']
|
||||
- ['త', 'థ']
|
||||
- ['చ', 'ఛ']
|
||||
- ['ట', 'ఠ']
|
||||
- letters: # rowkeys_telugu3.xml
|
||||
- ['ొ', 'ఒ']
|
||||
- ['ె', 'ఎ']
|
||||
- ['మ', 'ం', 'ఁ']
|
||||
- ['న', 'ణ', 'ఙ', 'ఞ']
|
||||
- ['వ']
|
||||
- ['ల', 'ళ']
|
||||
- ['స', 'శ']
|
||||
- ['ఋ', 'ృ']
|
||||
- ['ష', 'క్ష']
|
||||
- ['య', 'జ్ఞ']
|
||||
- $delete # force no shift key
|
||||
# detected 3 rows
|
56
java/assets/layouts/Thai/thai.yaml
Normal file
56
java/assets/layouts/Thai/thai.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
name: Thai
|
||||
languages: th
|
||||
minimumFunctionalKeyWidth: 0.0
|
||||
attributes: { moreKeyMode: OnlyExplicit }
|
||||
rows:
|
||||
- letters: # rowkeys_thai1.xml
|
||||
- {type: case, normal: ['ๅ'], shifted: ['+']}
|
||||
- {type: case, normal: ['/', '1', '๑'], shifted: ['๑']}
|
||||
- {type: case, normal: ['_', '2', '๒'], shifted: ['๒']}
|
||||
- {type: case, normal: ['ภ', '3', '๓'], shifted: ['๓']}
|
||||
- {type: case, normal: ['ถ', '4', '๔'], shifted: ['๔']}
|
||||
- {type: case, normal: [' ุ|ุ'], shifted: [' ู|ู']}
|
||||
- {type: case, normal: [' ึ|ึ'], shifted: ['฿']}
|
||||
- {type: case, normal: ['ค', '5', '๕'], shifted: ['๕']}
|
||||
- {type: case, normal: ['ต', '6', '๖'], shifted: ['๖']}
|
||||
- {type: case, normal: ['จ', '7', '๗'], shifted: ['๗']}
|
||||
- {type: case, normal: ['ข', '8', '๘'], shifted: ['๘']}
|
||||
- {type: case, normal: ['ช', '9', '๙'], shifted: ['๙']}
|
||||
- letters: # rowkeys_thai2.xml
|
||||
- {type: case, normal: ['ๆ', '0', '๐'], shifted: ['๐']}
|
||||
- {type: case, normal: ['ไ'], shifted: ['"']}
|
||||
- {type: case, normal: ['ำ'], shifted: ['ฎ']}
|
||||
- {type: case, normal: ['พ'], shifted: ['ฑ']}
|
||||
- {type: case, normal: ['ะ'], shifted: ['ธ']}
|
||||
- {type: case, normal: [' ั|ั'], shifted: [' ํ|ํ']}
|
||||
- {type: case, normal: [' ี|ี'], shifted: [' ๊|๊']}
|
||||
- {type: case, normal: ['ร'], shifted: ['ณ']}
|
||||
- {type: case, normal: ['น'], shifted: ['ฯ']}
|
||||
- {type: case, normal: ['ย'], shifted: ['ญ']}
|
||||
- {type: case, normal: ['บ'], shifted: ['ฐ']}
|
||||
- {type: case, normal: ['ล'], shifted: [',']}
|
||||
- letters: # rowkeys_thai3.xml
|
||||
- {type: case, normal: ['ฟ'], shifted: ['ฤ']}
|
||||
- {type: case, normal: ['ห'], shifted: ['ฆ']}
|
||||
- {type: case, normal: ['ก'], shifted: ['ฏ']}
|
||||
- {type: case, normal: ['ด'], shifted: ['โ']}
|
||||
- {type: case, normal: ['เ'], shifted: ['ฌ']}
|
||||
- {type: case, normal: [' ้|้'], shifted: [' ็|็']}
|
||||
- {type: case, normal: [' ่|่'], shifted: [' ๋|๋']}
|
||||
- {type: case, normal: ['า'], shifted: ['ษ']}
|
||||
- {type: case, normal: ['ส'], shifted: ['ศ']}
|
||||
- {type: case, normal: ['ว'], shifted: ['ซ']}
|
||||
- {type: case, normal: ['ง'], shifted: ['.']}
|
||||
- {type: case, normal: ['ฃ'], shifted: ['ฅ']}
|
||||
- letters: # rowkeys_thai4.xml
|
||||
- {type: case, normal: ['ผ'], shifted: ['(']}
|
||||
- {type: case, normal: ['ป'], shifted: [')']}
|
||||
- {type: case, normal: ['แ'], shifted: ['ฉ']}
|
||||
- {type: case, normal: ['อ'], shifted: ['ฮ']}
|
||||
- {type: case, normal: [' ิ|ิ'], shifted: [' ฺ|ฺ']}
|
||||
- {type: case, normal: [' ื|ื'], shifted: [' ์|์']}
|
||||
- {type: case, normal: ['ท'], shifted: ['?']}
|
||||
- {type: case, normal: ['ม'], shifted: ['ฒ']}
|
||||
- {type: case, normal: ['ใ'], shifted: ['ฬ']}
|
||||
- {type: case, normal: ['ฝ'], shifted: ['ฦ']}
|
||||
# detected 4 rows
|
39
java/assets/layouts/Turkish/turkish.yaml
Normal file
39
java/assets/layouts/Turkish/turkish.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
name: Turkish
|
||||
languages: tr
|
||||
rows:
|
||||
- letters: # rowkeys_turkish1.xml
|
||||
- ['!text/keyspec_q']
|
||||
- ['!text/keyspec_w']
|
||||
- ['e']
|
||||
- ['r']
|
||||
- ['t']
|
||||
- ['!text/keyspec_y']
|
||||
- ['u']
|
||||
- ['ı']
|
||||
- ['o']
|
||||
- ['p']
|
||||
- ['ğ']
|
||||
- ['ü']
|
||||
- letters: # rowkeys_turkish2.xml
|
||||
- a
|
||||
- s
|
||||
- d
|
||||
- f
|
||||
- g
|
||||
- h
|
||||
- j
|
||||
- k
|
||||
- l
|
||||
- ['ş']
|
||||
- ['i']
|
||||
- letters: # rowkeys_turkish3.xml
|
||||
- z
|
||||
- x
|
||||
- c
|
||||
- v
|
||||
- b
|
||||
- n
|
||||
- m
|
||||
- ['ö']
|
||||
- ['ç']
|
||||
# detected 3 rows
|
6
java/assets/layouts/Uzbek/uzbek.yaml
Normal file
6
java/assets/layouts/Uzbek/uzbek.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
name: Uzbek
|
||||
languages: uz-UZ
|
||||
rows:
|
||||
- letters: q w e r t y u i o p oʻ
|
||||
- letters: a s d f g h j k l gʻ ʼ
|
||||
- letters: z x c v b n m
|
@ -213,9 +213,7 @@ data class Key(
|
||||
|
||||
/** hint label to use, either constructor-specified or from moreKeys */
|
||||
val effectiveHintLabel = hintLabel ?: moreKeys.firstOrNull()?.let {
|
||||
val label = it.mLabel?.let {
|
||||
if(it.startsWith("\\")) it.substring(1) else it
|
||||
}
|
||||
val label = it.mLabel
|
||||
|
||||
if(it.mNeedsToUpperCase) {
|
||||
StringUtils.toTitleCaseOfKeyLabel(label, it.mLocale)
|
||||
@ -336,7 +334,7 @@ data class Key(
|
||||
KeyConsts.LABEL_FLAGS_FOLLOW_KEY_LARGE_LETTER_RATIO -> params.mLargeLetterSize
|
||||
KeyConsts.LABEL_FLAGS_FOLLOW_KEY_LABEL_RATIO -> params.mLabelSize
|
||||
KeyConsts.LABEL_FLAGS_FOLLOW_KEY_HINT_LABEL_RATIO -> params.mHintLabelSize
|
||||
else -> if (StringUtils.codePointCount(label) == 1) params.mLetterSize else params.mLabelSize
|
||||
else -> if (StringUtils.codePointCount(label) == 1 || visualStyle == KeyVisualStyle.Normal) params.mLetterSize else params.mLabelSize
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ public final class KeyPreviewChoreographer {
|
||||
final int bottomPadding = getBottomPaddingForKey(keyPreviewView.getContext(), key);
|
||||
final int topArea = Math.max(key.getHeight(), (int)(44.0f * density));
|
||||
|
||||
final int previewWidth = Math.min(Math.max(key.getWidth(), (int)(34.0f * density)), (int)(80.0f * density));
|
||||
final int previewWidth = Math.min(Math.max(key.getWidth(), (int)(34.0f * density)), (int)(64.0f * density));
|
||||
final int previewHeight = topArea + bottomPadding;
|
||||
keyPreviewView.setPadding(0, 0, 0, bottomPadding);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -103,12 +103,17 @@ fun List<LongPressKey>.toEncodedString(): String {
|
||||
class LongPressKeySettings(val context: Context) {
|
||||
private val currentSetting = context.getSettingBlocking(LongPressKeyLayoutSetting).toLongPressKeyLayoutItems()
|
||||
|
||||
fun joinMoreKeys(keys: List<String>): String =
|
||||
keys.map {
|
||||
it.replace("\\", "\\\\")
|
||||
.replace(",", "\\,")
|
||||
}.joinToString(",")
|
||||
val currentOrder: List<LongPressKey>
|
||||
get() = currentSetting
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun joinMoreKeys(keys: List<String>): String =
|
||||
keys.map {
|
||||
it.replace("\\", "\\\\")
|
||||
.replace(",", "\\,")
|
||||
}.joinToString(",")
|
||||
}
|
||||
|
||||
fun reorderMoreKeys(moreKeys: String): String =
|
||||
joinMoreKeys(reorderMoreKeys(
|
||||
|
@ -10,6 +10,7 @@ import org.futo.inputmethod.keyboard.internal.KeyboardParams
|
||||
import org.futo.inputmethod.keyboard.internal.MoreKeySpec
|
||||
import org.futo.inputmethod.latin.common.Constants
|
||||
import org.futo.inputmethod.latin.common.StringUtils
|
||||
import org.futo.inputmethod.latin.settings.LongPressKeySettings
|
||||
|
||||
/**
|
||||
* Width tokens for keys. Rather than explicitly specifying a width in percentage as is common in
|
||||
@ -76,74 +77,6 @@ enum class KeyWidth {
|
||||
Custom4,
|
||||
}
|
||||
|
||||
internal fun computeMoreKeysFlags(moreKeys: Array<String>, params: KeyboardParams): Int {
|
||||
// Get maximum column order number and set a relevant mode value.
|
||||
var moreKeysColumnAndFlags =
|
||||
(KeyConsts.MORE_KEYS_MODE_MAX_COLUMN_WITH_AUTO_ORDER
|
||||
or params.mMaxMoreKeysKeyboardColumn)
|
||||
var value: Int
|
||||
if ((MoreKeySpec.getIntValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_AUTO_COLUMN_ORDER,
|
||||
-1
|
||||
).also {
|
||||
value = it
|
||||
}) > 0
|
||||
) {
|
||||
// Override with fixed column order number and set a relevant mode value.
|
||||
moreKeysColumnAndFlags =
|
||||
(KeyConsts.MORE_KEYS_MODE_FIXED_COLUMN_WITH_AUTO_ORDER
|
||||
or (value and KeyConsts.MORE_KEYS_COLUMN_NUMBER_MASK))
|
||||
}
|
||||
if ((MoreKeySpec.getIntValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_FIXED_COLUMN_ORDER,
|
||||
-1
|
||||
).also {
|
||||
value = it
|
||||
}) > 0
|
||||
) {
|
||||
// Override with fixed column order number and set a relevant mode value.
|
||||
moreKeysColumnAndFlags =
|
||||
(KeyConsts.MORE_KEYS_MODE_FIXED_COLUMN_WITH_FIXED_ORDER
|
||||
or (value and KeyConsts.MORE_KEYS_COLUMN_NUMBER_MASK))
|
||||
}
|
||||
if (MoreKeySpec.getBooleanValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_HAS_LABELS
|
||||
)
|
||||
) {
|
||||
moreKeysColumnAndFlags =
|
||||
moreKeysColumnAndFlags or KeyConsts.MORE_KEYS_FLAGS_HAS_LABELS
|
||||
}
|
||||
if (MoreKeySpec.getBooleanValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_NEEDS_DIVIDERS
|
||||
)
|
||||
) {
|
||||
moreKeysColumnAndFlags =
|
||||
moreKeysColumnAndFlags or KeyConsts.MORE_KEYS_FLAGS_NEEDS_DIVIDERS
|
||||
}
|
||||
if (MoreKeySpec.getBooleanValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_NO_PANEL_AUTO_MORE_KEY
|
||||
)
|
||||
) {
|
||||
moreKeysColumnAndFlags =
|
||||
moreKeysColumnAndFlags or KeyConsts.MORE_KEYS_FLAGS_NO_PANEL_AUTO_MORE_KEY
|
||||
}
|
||||
return moreKeysColumnAndFlags
|
||||
}
|
||||
|
||||
internal fun filterMoreKeysFlags(moreKeys: List<String>): List<String> =
|
||||
moreKeys.filter {
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_AUTO_COLUMN_ORDER) &&
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_FIXED_COLUMN_ORDER) &&
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_HAS_LABELS) &&
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_NEEDS_DIVIDERS) &&
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_NO_PANEL_AUTO_MORE_KEY)
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies which morekeys can be automatically added to the key.
|
||||
*/
|
||||
@ -315,7 +248,7 @@ val DefaultKeyAttributes = KeyAttributes(
|
||||
moreKeyMode = null, // Default value is calculated in getEffectiveAttributes based on other attribute values
|
||||
useKeySpecShortcut = true,
|
||||
longPressEnabled = false,
|
||||
labelFlags = LabelFlags(),
|
||||
labelFlags = LabelFlags(autoXScale = true),
|
||||
repeatableEnabled = false,
|
||||
shiftable = true,
|
||||
)
|
||||
@ -394,7 +327,7 @@ data class BaseKey(
|
||||
}
|
||||
|
||||
val relevantSpecShortcut = if(attributes.useKeySpecShortcut != false || attributes.moreKeyMode?.autoFromKeyspec != false) {
|
||||
KeySpecShortcuts[spec]
|
||||
resolveSpecWithOptionalShortcut(spec, params.mTextsSet, coordinate)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
@ -402,7 +335,7 @@ data class BaseKey(
|
||||
val expandedSpec: String? = params.mTextsSet.resolveTextReference(
|
||||
if(attributes.useKeySpecShortcut != false) { relevantSpecShortcut?.get(0) } else { null }
|
||||
?: spec
|
||||
) ?: params.mTextsSet.resolveTextReference(spec)
|
||||
)
|
||||
|
||||
val label = expandedSpec?.let { KeySpecParser.getLabel(it) } ?: ""
|
||||
val icon = expandedSpec?.let { KeySpecParser.getIconId(it) } ?: ""
|
||||
@ -410,38 +343,30 @@ data class BaseKey(
|
||||
val outputText = KeySpecParser.getOutputText(expandedSpec)
|
||||
|
||||
val moreKeyMode = attributes.moreKeyMode!!
|
||||
var moreKeysBuilder = MoreKeysBuilder(code = code, mode = moreKeyMode, coordinate = coordinate, row = row, keyboard = keyboard, params = params)
|
||||
|
||||
val autoMoreKeys = listOfNotNull(
|
||||
if (moreKeyMode.autoFromKeyspec) {
|
||||
getDefaultMoreKeysForKey(code, relevantSpecShortcut)
|
||||
} else { null },
|
||||
// 1. Add layout-defined moreKeys
|
||||
moreKeysBuilder =
|
||||
moreKeysBuilder.insertMoreKeys(LongPressKeySettings.joinMoreKeys(moreKeys))
|
||||
|
||||
if (moreKeyMode.autoNumFromCoord && row.isLetterRow) {
|
||||
getNumForCoordinate(coordinate)
|
||||
} else { null },
|
||||
|
||||
if (moreKeyMode.autoSymFromCoord && row.isLetterRow) {
|
||||
getSymsForCoordinate(coordinate)
|
||||
} else { null },
|
||||
|
||||
if (moreKeyMode.autoSymFromCoord) {
|
||||
getSpecialFromRow(coordinate, row)
|
||||
} else { null }
|
||||
).joinToString(",")
|
||||
|
||||
val joinedMoreKeys = params.mId.mLongPressKeySettings.joinMoreKeys(moreKeys)
|
||||
|
||||
val moreKeys = params.mId.mLongPressKeySettings.reorderMoreKeys("$joinedMoreKeys,$autoMoreKeys").let {
|
||||
params.mTextsSet.resolveTextReference(it)
|
||||
}.let {
|
||||
MoreKeySpec.splitKeySpecs(it)?.toList() ?: listOf()
|
||||
// 2. Add moreKeys from keyspec
|
||||
if (moreKeyMode.autoFromKeyspec) {
|
||||
moreKeysBuilder =
|
||||
moreKeysBuilder.insertMoreKeys(getDefaultMoreKeysForKey(code, relevantSpecShortcut))
|
||||
}
|
||||
|
||||
val moreKeySpecs = filterMoreKeysFlags(moreKeys).map {
|
||||
MoreKeySpec(it, shifted, params.mId.locale)
|
||||
// 3. Add settings-defined moreKeys (numbers, symbols, actions, language, etc) in their order
|
||||
params.mId.mLongPressKeySettings.currentOrder.forEach {
|
||||
moreKeysBuilder = moreKeysBuilder.insertMoreKeys(it)
|
||||
}
|
||||
|
||||
val moreKeyFlags = computeMoreKeysFlags(moreKeys.toTypedArray(), params)
|
||||
// 4. Add special (period and comma)
|
||||
if (moreKeyMode.autoSymFromCoord) {
|
||||
moreKeysBuilder =
|
||||
moreKeysBuilder.insertMoreKeys(getSpecialFromRow(coordinate, row))
|
||||
}
|
||||
|
||||
val moreKeys = moreKeysBuilder.build(shifted)
|
||||
|
||||
return ComputedKeyData(
|
||||
label = if(shifted) {
|
||||
@ -460,10 +385,10 @@ data class BaseKey(
|
||||
style = attributes.style!!,
|
||||
anchored = attributes.anchored!!,
|
||||
showPopup = attributes.showPopup!!,
|
||||
moreKeys = moreKeySpecs,
|
||||
longPressEnabled = (attributes.longPressEnabled ?: false) || moreKeys.isNotEmpty(),
|
||||
moreKeys = moreKeys.specs,
|
||||
longPressEnabled = (attributes.longPressEnabled ?: false) || moreKeys.specs.isNotEmpty(),
|
||||
repeatable = attributes.repeatableEnabled ?: false,
|
||||
moreKeyFlags = moreKeyFlags,
|
||||
moreKeyFlags = moreKeys.flags,
|
||||
countsToKeyCoordinate = moreKeyMode.autoNumFromCoord && moreKeyMode.autoSymFromCoord,
|
||||
hint = hint ?: "",
|
||||
labelFlags = attributes.labelFlags?.getValue() ?: 0
|
||||
|
@ -1,62 +1,103 @@
|
||||
package org.futo.inputmethod.v2keyboard
|
||||
|
||||
val KeySpecShortcuts = mapOf(
|
||||
"q" to listOf("keyspec_q"),
|
||||
"," to listOf("keyspec_comma"),
|
||||
"." to listOf("keyspec_period"),
|
||||
"1" to listOf("keyspec_symbols_1", "additional_morekeys_symbols_1", "morekeys_symbols_1"),
|
||||
"2" to listOf("keyspec_symbols_2", "additional_morekeys_symbols_2", "morekeys_symbols_2"),
|
||||
"3" to listOf("keyspec_symbols_3", "additional_morekeys_symbols_3", "morekeys_symbols_3"),
|
||||
"4" to listOf("keyspec_symbols_4", "additional_morekeys_symbols_4", "morekeys_symbols_4"),
|
||||
"5" to listOf("keyspec_symbols_5", "additional_morekeys_symbols_5", "morekeys_symbols_5"),
|
||||
"6" to listOf("keyspec_symbols_6", "additional_morekeys_symbols_6", "morekeys_symbols_6"),
|
||||
"7" to listOf("keyspec_symbols_7", "additional_morekeys_symbols_7", "morekeys_symbols_7"),
|
||||
"8" to listOf("keyspec_symbols_8", "additional_morekeys_symbols_8", "morekeys_symbols_8"),
|
||||
"9" to listOf("keyspec_symbols_9", "additional_morekeys_symbols_9", "morekeys_symbols_9"),
|
||||
"0" to listOf("keyspec_symbols_0", "additional_morekeys_symbols_0", "morekeys_symbols_0"),
|
||||
";" to listOf("keyspec_symbols_semicolon", "morekeys_symbols_semicolon"),
|
||||
"!" to listOf("!", "morekeys_exclamation"),
|
||||
"+" to listOf("+", "morekeys_plus"),
|
||||
"?" to listOf("keyspec_symbols_question", "morekeys_question"),
|
||||
"\"" to listOf("\"", "morekeys_double_quote"),
|
||||
"\'" to listOf("\'", "morekeys_single_quote"),
|
||||
"$" to listOf("keyspec_currency", "morekeys_currency_generic"),
|
||||
"%" to listOf("keyspec_symbols_percent", "morekeys_symbols_percent"),
|
||||
"(" to listOf("keyspec_left_parenthesis", "morekeys_left_parenthesis"),
|
||||
")" to listOf("keyspec_right_parenthesis", "morekeys_right_parenthesis"),
|
||||
"<" to listOf("keyspec_less_than", "morekeys_less_than"),
|
||||
">" to listOf("keyspec_greater_than", "morekeys_greater_than"),
|
||||
"[" to listOf("keyspec_left_square_bracket"),
|
||||
"]" to listOf("keyspec_right_square_bracket"),
|
||||
"{" to listOf("keyspec_left_curly_bracket"),
|
||||
"}" to listOf("keyspec_right_curly_bracket"),
|
||||
"*" to listOf("*", "morekeys_star"),
|
||||
import org.futo.inputmethod.keyboard.internal.KeyboardLayoutKind
|
||||
import org.futo.inputmethod.keyboard.internal.KeyboardTextsSet
|
||||
|
||||
// U+2260: "≠" NOT EQUAL TO
|
||||
// U+2248: "≈" ALMOST EQUAL TO
|
||||
// U+221E: "∞" INFINITY
|
||||
"=" to listOf("=", "\u2260", "\u2248", "\u221E"),
|
||||
|
||||
// Cyrillic
|
||||
"щ" to listOf("keyspec_east_slavic_row1_9"),
|
||||
"ы" to listOf("keyspec_east_slavic_row2_2", "morekeys_east_slavic_row2_2"),
|
||||
"э" to listOf("keyspec_east_slavic_row2_11", "morekeys_east_slaiv_row2_11"),
|
||||
"и" to listOf("keyspec_east_slavic_row3_5"),
|
||||
"\u044c" to listOf("\u044c", "morekeys_cyrillic_soft_sign"),
|
||||
"\u0443" to listOf("\u0443", "morekeys_cyrillic_u"),
|
||||
"\u043a" to listOf("\u043a", "morekeys_cyrillic_ka"),
|
||||
"\u043d" to listOf("\u043d", "morekeys_cyrillic_en"),
|
||||
"\u0433" to listOf("\u0433", "morekeys_cyrillic_ghe"),
|
||||
"\u0430" to listOf("\u0430", "morekeys_cyrillic_a"),
|
||||
"\u043e" to listOf("\u043e", "morekeys_cyrillic_o"),
|
||||
"\u0438" to listOf("\u0438", "morekeys_cyrillic_i"),
|
||||
"\u0435" to listOf("\u0435", "morekeys_cyrillic_ie"),
|
||||
).mapValues {
|
||||
it.value.map { v ->
|
||||
if(v.startsWith("keyspec") || v.startsWith("morekeys") || v.startsWith("additional_")) {
|
||||
"!text/$v"
|
||||
} else {
|
||||
v
|
||||
fun shortcutsOf(vararg values: Pair<String, List<String>>): Map<String, List<String>> =
|
||||
mapOf(*values).mapValues {
|
||||
it.value.map { v ->
|
||||
if(v.startsWith("keyspec") || v.startsWith("morekeys") || v.startsWith("additional_")) {
|
||||
"!text/$v"
|
||||
} else {
|
||||
v
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val KeySpecShortcuts = listOf(
|
||||
// Symbols-only shortcuts
|
||||
listOf(KeyboardLayoutKind.Symbols) to shortcutsOf(
|
||||
";" to listOf("keyspec_symbols_semicolon", "morekeys_symbols_semicolon"),
|
||||
"!" to listOf("!", "morekeys_exclamation"),
|
||||
"+" to listOf("+", "morekeys_plus"),
|
||||
"?" to listOf("keyspec_symbols_question", "morekeys_question"),
|
||||
"\"" to listOf("\"", "morekeys_double_quote"),
|
||||
"\'" to listOf("\'", "morekeys_single_quote"),
|
||||
"$" to listOf("keyspec_currency", "morekeys_currency_generic"),
|
||||
"%" to listOf("keyspec_symbols_percent", "morekeys_symbols_percent"),
|
||||
"(" to listOf("keyspec_left_parenthesis", "morekeys_left_parenthesis"),
|
||||
")" to listOf("keyspec_right_parenthesis", "morekeys_right_parenthesis"),
|
||||
"<" to listOf("keyspec_less_than", "morekeys_less_than"),
|
||||
">" to listOf("keyspec_greater_than", "morekeys_greater_than"),
|
||||
"[" to listOf("keyspec_left_square_bracket"),
|
||||
"]" to listOf("keyspec_right_square_bracket"),
|
||||
"{" to listOf("keyspec_left_curly_bracket"),
|
||||
"}" to listOf("keyspec_right_curly_bracket"),
|
||||
"*" to listOf("*", "morekeys_star"),
|
||||
"=" to listOf("=", "≠", "≈", "∞"),
|
||||
|
||||
"1" to listOf("keyspec_symbols_1", "additional_morekeys_symbols_1", "morekeys_symbols_1"),
|
||||
"2" to listOf("keyspec_symbols_2", "additional_morekeys_symbols_2", "morekeys_symbols_2"),
|
||||
"3" to listOf("keyspec_symbols_3", "additional_morekeys_symbols_3", "morekeys_symbols_3"),
|
||||
"4" to listOf("keyspec_symbols_4", "additional_morekeys_symbols_4", "morekeys_symbols_4"),
|
||||
"5" to listOf("keyspec_symbols_5", "additional_morekeys_symbols_5", "morekeys_symbols_5"),
|
||||
"6" to listOf("keyspec_symbols_6", "additional_morekeys_symbols_6", "morekeys_symbols_6"),
|
||||
"7" to listOf("keyspec_symbols_7", "additional_morekeys_symbols_7", "morekeys_symbols_7"),
|
||||
"8" to listOf("keyspec_symbols_8", "additional_morekeys_symbols_8", "morekeys_symbols_8"),
|
||||
"9" to listOf("keyspec_symbols_9", "additional_morekeys_symbols_9", "morekeys_symbols_9"),
|
||||
"0" to listOf("keyspec_symbols_0", "additional_morekeys_symbols_0", "morekeys_symbols_0"),
|
||||
),
|
||||
|
||||
// Alphabet-only shortcuts
|
||||
listOf(KeyboardLayoutKind.Alphabet) to shortcutsOf(
|
||||
"q" to listOf("keyspec_q"),
|
||||
"w" to listOf("keyspec_w"),
|
||||
"y" to listOf("keyspec_y"),
|
||||
"x" to listOf("keyspec_x"),
|
||||
|
||||
// Cyrillic
|
||||
"щ" to listOf("keyspec_east_slavic_row1_9"),
|
||||
"ы" to listOf("keyspec_east_slavic_row2_2", "morekeys_east_slavic_row2_2"),
|
||||
"э" to listOf("keyspec_east_slavic_row2_11", "morekeys_east_slaiv_row2_11"),
|
||||
"и" to listOf("keyspec_east_slavic_row3_5"),
|
||||
"\u044c" to listOf("\u044c", "morekeys_cyrillic_soft_sign"),
|
||||
"\u0443" to listOf("\u0443", "morekeys_cyrillic_u"),
|
||||
"\u043a" to listOf("\u043a", "morekeys_cyrillic_ka"),
|
||||
"\u043d" to listOf("\u043d", "morekeys_cyrillic_en"),
|
||||
"\u0433" to listOf("\u0433", "morekeys_cyrillic_ghe"),
|
||||
"\u0430" to listOf("\u0430", "morekeys_cyrillic_a"),
|
||||
"\u043e" to listOf("\u043e", "morekeys_cyrillic_o"),
|
||||
"\u0438" to listOf("\u0438", "morekeys_cyrillic_i"),
|
||||
"\u0435" to listOf("\u0435", "morekeys_cyrillic_ie"),
|
||||
),
|
||||
|
||||
// All shortcuts
|
||||
KeyboardLayoutKind.entries to shortcutsOf(
|
||||
"," to listOf("keyspec_comma"),
|
||||
"." to listOf("keyspec_period"),
|
||||
|
||||
// Similar to the symbols shortcuts for 0-9, but without morekeys_symbols_n
|
||||
"1" to listOf("keyspec_symbols_1", "additional_morekeys_symbols_1"),
|
||||
"2" to listOf("keyspec_symbols_2", "additional_morekeys_symbols_2"),
|
||||
"3" to listOf("keyspec_symbols_3", "additional_morekeys_symbols_3"),
|
||||
"4" to listOf("keyspec_symbols_4", "additional_morekeys_symbols_4"),
|
||||
"5" to listOf("keyspec_symbols_5", "additional_morekeys_symbols_5"),
|
||||
"6" to listOf("keyspec_symbols_6", "additional_morekeys_symbols_6"),
|
||||
"7" to listOf("keyspec_symbols_7", "additional_morekeys_symbols_7"),
|
||||
"8" to listOf("keyspec_symbols_8", "additional_morekeys_symbols_8"),
|
||||
"9" to listOf("keyspec_symbols_9", "additional_morekeys_symbols_9"),
|
||||
"0" to listOf("keyspec_symbols_0", "additional_morekeys_symbols_0"),
|
||||
)
|
||||
)
|
||||
|
||||
fun resolveSpecWithOptionalShortcut(spec: String, textsSet: KeyboardTextsSet, coordinate: KeyCoordinate): List<String>? =
|
||||
KeySpecShortcuts.filter {
|
||||
// Filter to shortcut tables that are relevant for this element kind (alphabet, symbols, etc)
|
||||
it.first.contains(coordinate.element.kind)
|
||||
}.mapNotNull {
|
||||
// Map to values that exist
|
||||
it.second[spec]
|
||||
}.firstOrNull {
|
||||
// First one where the main key is resolvable in our texts set
|
||||
textsSet.resolveTextReference(it[0]) != null
|
||||
}
|
@ -128,6 +128,13 @@ enum class NumberRowMode {
|
||||
AlwaysDisabled
|
||||
}
|
||||
|
||||
fun NumberRowMode.isActive(userSetting: Boolean) =
|
||||
when(this) {
|
||||
NumberRowMode.UserConfigurable -> userSetting
|
||||
NumberRowMode.AlwaysEnabled -> true
|
||||
NumberRowMode.AlwaysDisabled -> false
|
||||
}
|
||||
|
||||
enum class BottomRowHeightMode {
|
||||
Fixed,
|
||||
Flexible
|
||||
|
@ -587,7 +587,7 @@ data class LayoutEngine(
|
||||
|
||||
params.mProximityCharsCorrectionEnabled = true
|
||||
|
||||
params.mAllowRedundantMoreKeys = false
|
||||
params.mAllowRedundantMoreKeys = true
|
||||
params.removeRedundantMoreKeys()
|
||||
|
||||
params.mMostCommonKeyWidth = regularKeyWidth.roundToInt()
|
||||
|
205
java/src/org/futo/inputmethod/v2keyboard/MoreKeysBuilder.kt
Normal file
205
java/src/org/futo/inputmethod/v2keyboard/MoreKeysBuilder.kt
Normal file
@ -0,0 +1,205 @@
|
||||
package org.futo.inputmethod.v2keyboard
|
||||
|
||||
import org.futo.inputmethod.keyboard.KeyConsts
|
||||
import org.futo.inputmethod.keyboard.internal.KeyboardLayoutKind
|
||||
import org.futo.inputmethod.keyboard.internal.KeyboardParams
|
||||
import org.futo.inputmethod.keyboard.internal.MoreKeySpec
|
||||
import org.futo.inputmethod.latin.settings.LongPressKey
|
||||
|
||||
typealias MoreKeys = List<String>
|
||||
|
||||
val QwertySymbols = listOf(
|
||||
"qwertyuiop".toList(),
|
||||
"asdfghjklw".toList(),
|
||||
"zxcvbnm".toList()
|
||||
)
|
||||
|
||||
private fun getNumForCoordinate(keyCoordinate: KeyCoordinate): String {
|
||||
if(keyCoordinate.element.kind != KeyboardLayoutKind.Alphabet) return ""
|
||||
|
||||
if(keyCoordinate.regularRow == 0) {
|
||||
val colOffset = (keyCoordinate.measurement.numColumnsByRow[keyCoordinate.regularRow] - 10) / 2
|
||||
val centeredCol = keyCoordinate.regularColumn - colOffset
|
||||
|
||||
if(centeredCol == 9) {
|
||||
return "!text/keyspec_symbols_0"
|
||||
} else if(centeredCol in 0 until 9) {
|
||||
return "!text/keyspec_symbols_${centeredCol + 1}"
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
private fun symsForCoord(keyCoordinate: KeyCoordinate): String {
|
||||
if(keyCoordinate.element.kind != KeyboardLayoutKind.Alphabet) return ""
|
||||
|
||||
val row = QwertySymbols.getOrNull(keyCoordinate.regularRow) ?: return ""
|
||||
|
||||
val colOffset = (keyCoordinate.measurement.numColumnsByRow[keyCoordinate.regularRow] - row.size) / 2
|
||||
val centeredCol = keyCoordinate.regularColumn - colOffset.coerceAtLeast(0)
|
||||
if(centeredCol < 0) return ""
|
||||
|
||||
val letter = row.getOrNull(centeredCol)
|
||||
return if(letter != null) {
|
||||
"!text/qwertysyms_$letter"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
private fun actionForCoord(keyCoordinate: KeyCoordinate): String {
|
||||
if(keyCoordinate.element.kind != KeyboardLayoutKind.Alphabet) return ""
|
||||
|
||||
val row = QwertySymbols.getOrNull(keyCoordinate.regularRow)
|
||||
val letter = row?.getOrNull(keyCoordinate.regularColumn)
|
||||
return if(letter != null) {
|
||||
"!text/actions_$letter"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
data class BuiltMoreKeys(
|
||||
val specs: List<MoreKeySpec>,
|
||||
val flags: Int
|
||||
)
|
||||
|
||||
data class MoreKeysBuilder(
|
||||
val code: Int,
|
||||
val mode: MoreKeyMode,
|
||||
val coordinate: KeyCoordinate,
|
||||
val row: Row,
|
||||
val keyboard: Keyboard,
|
||||
val params: KeyboardParams,
|
||||
val moreKeys: MoreKeys = listOf()
|
||||
) {
|
||||
private fun insertMoreKeys(resolvedMoreKeys: MoreKeys): MoreKeysBuilder {
|
||||
if(resolvedMoreKeys.isEmpty()) return this
|
||||
|
||||
val idxOfMarker = moreKeys.indexOf("%")
|
||||
val newMoreKeys = if(idxOfMarker == -1) {
|
||||
moreKeys + resolvedMoreKeys
|
||||
} else {
|
||||
moreKeys.subList(0, idxOfMarker) + resolvedMoreKeys + moreKeys.subList(idxOfMarker, moreKeys.size)
|
||||
}
|
||||
|
||||
return this.copy(moreKeys = newMoreKeys)
|
||||
}
|
||||
|
||||
fun insertMoreKeys(moreKeysToInsert: String): MoreKeysBuilder {
|
||||
val resolved = MoreKeySpec.splitKeySpecs(params.mTextsSet.resolveTextReference(moreKeysToInsert))?.toList()
|
||||
|
||||
return resolved?.let { insertMoreKeys(it) } ?: this
|
||||
}
|
||||
|
||||
private val isNumberRowActive = keyboard.numberRowMode.isActive(params.mId.mNumberRow)
|
||||
|
||||
private fun canAddMoreKey(key: LongPressKey): Boolean =
|
||||
row.isLetterRow && when(key) {
|
||||
LongPressKey.QuickActions -> mode.autoSymFromCoord
|
||||
|
||||
// Numbers added to top row requires the number row being inactive
|
||||
LongPressKey.Numbers -> (mode.autoNumFromCoord && !isNumberRowActive)
|
||||
|
||||
// Symbols for top row requires number row being active (it replaces the number long-press keys)
|
||||
LongPressKey.Symbols -> (mode.autoSymFromCoord && (coordinate.regularRow > 0 || isNumberRowActive))
|
||||
|
||||
// Language keys require a-z code
|
||||
LongPressKey.LanguageKeys, LongPressKey.MiscLetters -> (row.isLetterRow && code >= 'a'.code && code <= 'z'.code)
|
||||
}
|
||||
|
||||
private fun moreKey(key: LongPressKey): String =
|
||||
when(key) {
|
||||
LongPressKey.Numbers -> getNumForCoordinate(coordinate)
|
||||
LongPressKey.Symbols -> symsForCoord(coordinate)
|
||||
LongPressKey.QuickActions -> actionForCoord(coordinate)
|
||||
LongPressKey.LanguageKeys -> "!text/morekeys_${code.toChar()}"
|
||||
LongPressKey.MiscLetters -> "!text/morekeys_misc_${code.toChar()}"
|
||||
}
|
||||
|
||||
fun insertMoreKeys(key: LongPressKey): MoreKeysBuilder {
|
||||
if(!canAddMoreKey(key)) return this
|
||||
return insertMoreKeys(moreKey(key))
|
||||
}
|
||||
|
||||
fun build(shifted: Boolean): BuiltMoreKeys {
|
||||
return BuiltMoreKeys(
|
||||
specs = filterMoreKeysFlags(moreKeys).filter { it != "%" }.map {
|
||||
MoreKeySpec(it, shifted, params.mId.locale)
|
||||
},
|
||||
flags = computeMoreKeysFlags(moreKeys.toTypedArray(), params)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun computeMoreKeysFlags(moreKeys: Array<String>, params: KeyboardParams): Int {
|
||||
// Get maximum column order number and set a relevant mode value.
|
||||
var moreKeysColumnAndFlags =
|
||||
(KeyConsts.MORE_KEYS_MODE_MAX_COLUMN_WITH_AUTO_ORDER
|
||||
or params.mMaxMoreKeysKeyboardColumn)
|
||||
var value: Int
|
||||
if ((MoreKeySpec.getIntValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_AUTO_COLUMN_ORDER,
|
||||
-1
|
||||
).also {
|
||||
value = it
|
||||
}) > 0
|
||||
) {
|
||||
// Override with fixed column order number and set a relevant mode value.
|
||||
moreKeysColumnAndFlags =
|
||||
(KeyConsts.MORE_KEYS_MODE_FIXED_COLUMN_WITH_AUTO_ORDER
|
||||
or (value and KeyConsts.MORE_KEYS_COLUMN_NUMBER_MASK))
|
||||
}
|
||||
if ((MoreKeySpec.getIntValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_FIXED_COLUMN_ORDER,
|
||||
-1
|
||||
).also {
|
||||
value = it
|
||||
}) > 0
|
||||
) {
|
||||
// Override with fixed column order number and set a relevant mode value.
|
||||
moreKeysColumnAndFlags =
|
||||
(KeyConsts.MORE_KEYS_MODE_FIXED_COLUMN_WITH_FIXED_ORDER
|
||||
or (value and KeyConsts.MORE_KEYS_COLUMN_NUMBER_MASK))
|
||||
}
|
||||
if (MoreKeySpec.getBooleanValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_HAS_LABELS
|
||||
)
|
||||
) {
|
||||
moreKeysColumnAndFlags =
|
||||
moreKeysColumnAndFlags or KeyConsts.MORE_KEYS_FLAGS_HAS_LABELS
|
||||
}
|
||||
if (MoreKeySpec.getBooleanValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_NEEDS_DIVIDERS
|
||||
)
|
||||
) {
|
||||
moreKeysColumnAndFlags =
|
||||
moreKeysColumnAndFlags or KeyConsts.MORE_KEYS_FLAGS_NEEDS_DIVIDERS
|
||||
}
|
||||
if (MoreKeySpec.getBooleanValue(
|
||||
moreKeys,
|
||||
KeyConsts.MORE_KEYS_NO_PANEL_AUTO_MORE_KEY
|
||||
)
|
||||
) {
|
||||
moreKeysColumnAndFlags =
|
||||
moreKeysColumnAndFlags or KeyConsts.MORE_KEYS_FLAGS_NO_PANEL_AUTO_MORE_KEY
|
||||
}
|
||||
return moreKeysColumnAndFlags
|
||||
}
|
||||
|
||||
private fun filterMoreKeysFlags(moreKeys: List<String>): List<String> =
|
||||
moreKeys.filter {
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_AUTO_COLUMN_ORDER) &&
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_FIXED_COLUMN_ORDER) &&
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_HAS_LABELS) &&
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_NEEDS_DIVIDERS) &&
|
||||
!it.startsWith(KeyConsts.MORE_KEYS_NO_PANEL_AUTO_MORE_KEY)
|
||||
}
|
@ -6,8 +6,6 @@ import org.futo.inputmethod.latin.common.Constants
|
||||
fun getDefaultMoreKeysForKey(code: Int, relevantSpecShortcut: List<String>?): String {
|
||||
if(code == Constants.CODE_ENTER) {
|
||||
return "!text/keyspec_emoji_action_key"
|
||||
} else if(code >= 'a'.code && code <= 'z'.code) {
|
||||
return "!text/morekeys_${code.toChar()},!text/morekeys_misc_${code.toChar()}"
|
||||
} else if (relevantSpecShortcut != null) {
|
||||
return relevantSpecShortcut.subList(1, relevantSpecShortcut.size).joinToString(",")
|
||||
} else {
|
||||
@ -15,36 +13,6 @@ fun getDefaultMoreKeysForKey(code: Int, relevantSpecShortcut: List<String>?): St
|
||||
}
|
||||
}
|
||||
|
||||
val QwertySymbols = listOf(
|
||||
"qwertyuiop".toList(),
|
||||
"asdfghjkl".toList(),
|
||||
"zxcvbnm".toList()
|
||||
)
|
||||
|
||||
fun getSymsForCoordinate(keyCoordinate: KeyCoordinate): String {
|
||||
if(keyCoordinate.element.kind != KeyboardLayoutKind.Alphabet) return ""
|
||||
|
||||
val row = QwertySymbols.getOrNull(keyCoordinate.regularRow)
|
||||
val letter = row?.getOrNull(keyCoordinate.regularColumn)
|
||||
return if(letter != null) {
|
||||
"!text/qwertysyms_$letter,!text/actions_$letter"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
fun getNumForCoordinate(keyCoordinate: KeyCoordinate): String {
|
||||
if(keyCoordinate.element.kind != KeyboardLayoutKind.Alphabet) return ""
|
||||
|
||||
if(keyCoordinate.regularRow == 0 && keyCoordinate.regularColumn <= 9) {
|
||||
if(keyCoordinate.regularColumn == 9) {
|
||||
return "!text/keyspec_symbols_0"
|
||||
} else {
|
||||
return "!text/keyspec_symbols_${keyCoordinate.regularColumn + 1}"
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
fun getSpecialFromRow(keyCoordinate: KeyCoordinate, row: Row): String {
|
||||
if(row.isBottomRow) {
|
||||
|
@ -133,18 +133,16 @@ data class EnterKey(
|
||||
} else {
|
||||
"!text/keyspec_emoji_action_key"
|
||||
}.let {
|
||||
params.mTextsSet.resolveTextReference(it)
|
||||
}.let {
|
||||
MoreKeySpec.splitKeySpecs(it)?.toList() ?: listOf()
|
||||
MoreKeysBuilder(
|
||||
code = Constants.CODE_ENTER,
|
||||
mode = attributes.moreKeyMode!!,
|
||||
coordinate = coordinate,
|
||||
row = row,
|
||||
keyboard = keyboard,
|
||||
params = params
|
||||
).insertMoreKeys(it).build(false)
|
||||
}
|
||||
|
||||
val moreKeySpecs = filterMoreKeysFlags(moreKeys).map {
|
||||
MoreKeySpec(it, false, params.mId.locale)
|
||||
}
|
||||
|
||||
val moreKeyFlags = computeMoreKeysFlags(moreKeys.toTypedArray(), params)
|
||||
|
||||
|
||||
return ComputedKeyData(
|
||||
label = "",
|
||||
code = Constants.CODE_ENTER,
|
||||
@ -154,10 +152,10 @@ data class EnterKey(
|
||||
style = KeyVisualStyle.Action,
|
||||
anchored = true,
|
||||
showPopup = false,
|
||||
moreKeys = moreKeySpecs,
|
||||
moreKeys = moreKeys.specs,
|
||||
longPressEnabled = true,
|
||||
repeatable = false,
|
||||
moreKeyFlags = moreKeyFlags,
|
||||
moreKeyFlags = moreKeys.flags,
|
||||
countsToKeyCoordinate = false,
|
||||
hint = " ",
|
||||
labelFlags = 0
|
||||
|
@ -538,18 +538,15 @@
|
||||
"a": "@",
|
||||
"s": "#",
|
||||
"d": [
|
||||
"$",
|
||||
"€",
|
||||
"£",
|
||||
"¥",
|
||||
"¢"
|
||||
"!text/keyspec_currency",
|
||||
"$"
|
||||
],
|
||||
"f": "\\%",
|
||||
"g": ["&", "|"],
|
||||
"h": ["-", "–", "—", "_"],
|
||||
"j": ["+", "="],
|
||||
"k": ["(", "[", "{", "<"],
|
||||
"l": [")", "]", "}", ">" ],
|
||||
"l": [")", "]", "}", ">"],
|
||||
|
||||
"z": "*",
|
||||
"x": "\"",
|
||||
|
@ -16,6 +16,9 @@
|
||||
"u": [
|
||||
"ŭ"
|
||||
],
|
||||
"j": [
|
||||
"ĵ"
|
||||
],
|
||||
"misc_c": [
|
||||
"ć",
|
||||
"č",
|
||||
|
@ -2,13 +2,55 @@
|
||||
"locale": "kn",
|
||||
"morekeys": {},
|
||||
"keyspec": {
|
||||
"currency": "₹"
|
||||
"currency": "₹",
|
||||
"symbols_0": "೦",
|
||||
"symbols_1": "೧",
|
||||
"symbols_2": "೨",
|
||||
"symbols_3": "೩",
|
||||
"symbols_4": "೪",
|
||||
"symbols_5": "೫",
|
||||
"symbols_6": "೬",
|
||||
"symbols_7": "೭",
|
||||
"symbols_8": "೮",
|
||||
"symbols_9": "೯"
|
||||
},
|
||||
"label": {},
|
||||
"keylabel": {
|
||||
"to_alpha": "ಅಆಇ"
|
||||
"to_alpha": "ಅಆಇ",
|
||||
"to_symbol": "?೧೨೩"
|
||||
},
|
||||
"keyhintlabel": {},
|
||||
"additional_morekeys": {},
|
||||
"other": {}
|
||||
"other": {},
|
||||
"additional_morekeys": {
|
||||
"symbols_1": [
|
||||
"1"
|
||||
],
|
||||
"symbols_2": [
|
||||
"2"
|
||||
],
|
||||
"symbols_3": [
|
||||
"3"
|
||||
],
|
||||
"symbols_4": [
|
||||
"4"
|
||||
],
|
||||
"symbols_5": [
|
||||
"5"
|
||||
],
|
||||
"symbols_6": [
|
||||
"6"
|
||||
],
|
||||
"symbols_7": [
|
||||
"7"
|
||||
],
|
||||
"symbols_8": [
|
||||
"8"
|
||||
],
|
||||
"symbols_9": [
|
||||
"9"
|
||||
],
|
||||
"symbols_0": [
|
||||
"0"
|
||||
]
|
||||
}
|
||||
}
|
@ -41,7 +41,9 @@ public final class KeyboardTextsTable {
|
||||
public static String getText(final String name, final String[] textsTable) {
|
||||
final Integer indexObj = sNameToIndexesMap.get(name);
|
||||
if (indexObj == null) {
|
||||
if(name.startsWith("morekeys")) {
|
||||
if(name.startsWith("actions_") || name.startsWith("qwertysyms_")) {
|
||||
return "";
|
||||
} else if(name.startsWith("morekeys")) {
|
||||
Log.w("KeyboardTextsTable", "Unknown morekeys text name=" + name + " locale="
|
||||
+ sTextsTableToLocaleMap.get(textsTable));
|
||||
return "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user