From 5e7ae148fb577ac9413f1d168ce7aff17488438a Mon Sep 17 00:00:00 2001 From: NaeemBolchhi Date: Sun, 18 Aug 2024 07:53:44 +0600 Subject: [PATCH 1/3] added asset, colemak, colemak-dh, niro, soul, and workman layout --- .../fossify/keyboard/extensions/Context.kt | 6 + .../org/fossify/keyboard/helpers/Constants.kt | 12 ++ .../keyboard/services/SimpleKeyboardIME.kt | 6 + .../res/xml/keys_letters_english_asset.xml | 188 ++++++++++++++++++ .../res/xml/keys_letters_english_colemak.xml | 188 ++++++++++++++++++ .../xml/keys_letters_english_colemakdh.xml | 188 ++++++++++++++++++ .../res/xml/keys_letters_english_niro.xml | 185 +++++++++++++++++ .../res/xml/keys_letters_english_soul.xml | 188 ++++++++++++++++++ .../res/xml/keys_letters_english_workman.xml | 188 ++++++++++++++++++ 9 files changed, 1149 insertions(+) create mode 100644 app/src/main/res/xml/keys_letters_english_asset.xml create mode 100644 app/src/main/res/xml/keys_letters_english_colemak.xml create mode 100644 app/src/main/res/xml/keys_letters_english_colemakdh.xml create mode 100644 app/src/main/res/xml/keys_letters_english_niro.xml create mode 100644 app/src/main/res/xml/keys_letters_english_soul.xml create mode 100644 app/src/main/res/xml/keys_letters_english_workman.xml diff --git a/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt b/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt index c48c4279..1716faac 100644 --- a/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt +++ b/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt @@ -211,8 +211,14 @@ fun Context.getKeyboardLanguageText(language: Int): String { LANGUAGE_BULGARIAN -> getString(R.string.translation_bulgarian) LANGUAGE_CHUVASH -> getString(R.string.translation_chuvash) LANGUAGE_DANISH -> getString(R.string.translation_danish) + LANGUAGE_ENGLISH_ASSET -> "${getString(R.string.translation_english)} (Asset)" + LANGUAGE_ENGLISH_COLEMAK -> "${getString(R.string.translation_english)} (Colemak)" + LANGUAGE_ENGLISH_COLEMAKDH -> "${getString(R.string.translation_english)} (Colemak-DH)" LANGUAGE_ENGLISH_DVORAK -> "${getString(R.string.translation_english)} (DVORAK)" + LANGUAGE_ENGLISH_NIRO -> "${getString(R.string.translation_english)} (Niro)" LANGUAGE_ENGLISH_QWERTZ -> "${getString(R.string.translation_english)} (QWERTZ)" + LANGUAGE_ENGLISH_SOUL -> "${getString(R.string.translation_english)} (Soul)" + LANGUAGE_ENGLISH_Workman -> "${getString(R.string.translation_english)} (Workman)" LANGUAGE_ESPERANTO -> getString(R.string.translation_esperanto) LANGUAGE_FRENCH_AZERTY -> "${getString(R.string.translation_french)} (AZERTY)" LANGUAGE_FRENCH_BEPO -> "${getString(R.string.translation_french)} (BEPO)" diff --git a/app/src/main/kotlin/org/fossify/keyboard/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/keyboard/helpers/Constants.kt index 5b686c92..1e73f084 100644 --- a/app/src/main/kotlin/org/fossify/keyboard/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/keyboard/helpers/Constants.kt @@ -53,6 +53,12 @@ const val LANGUAGE_CHUVASH = 22 const val LANGUAGE_ESPERANTO = 23 const val LANGUAGE_HEBREW = 24 const val LANGUAGE_ARABIC = 25 +const val LANGUAGE_ENGLISH_ASSET = 26 +const val LANGUAGE_ENGLISH_COLEMAK = 27 +const val LANGUAGE_ENGLISH_COLEMAKDH = 28 +const val LANGUAGE_ENGLISH_NIRO = 29 +const val LANGUAGE_ENGLISH_SOUL = 30 +const val LANGUAGE_ENGLISH_WORKMAN = 31 // Keep this sorted val SUPPORTED_LANGUAGES = listOf( @@ -63,7 +69,13 @@ val SUPPORTED_LANGUAGES = listOf( LANGUAGE_DANISH, LANGUAGE_ENGLISH_QWERTY, LANGUAGE_ENGLISH_QWERTZ, + LANGUAGE_ENGLISH_ASSET, + LANGUAGE_ENGLISH_COLEMAK, + LANGUAGE_ENGLISH_COLEMAKDH, LANGUAGE_ENGLISH_DVORAK, + LANGUAGE_ENGLISH_NIRO, + LANGUAGE_ENGLISH_SOUL, + LANGUAGE_ENGLISH_WORKMAN, LANGUAGE_ESPERANTO, LANGUAGE_FRENCH_AZERTY, LANGUAGE_FRENCH_BEPO, diff --git a/app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt b/app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt index d90f1938..fa9c35a2 100644 --- a/app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt @@ -443,8 +443,14 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared LANGUAGE_BULGARIAN -> R.xml.keys_letters_bulgarian LANGUAGE_CHUVASH -> R.xml.keys_letters_chuvash LANGUAGE_DANISH -> R.xml.keys_letters_danish + LANGUAGE_ENGLISH_ASSET -> R.xml.keys_letters_english_asset + LANGUAGE_ENGLISH_COLEMAK -> R.xml.keys_letters_english_colemak + LANGUAGE_ENGLISH_COLEMAKDH -> R.xml.keys_letters_english_colemakdh LANGUAGE_ENGLISH_DVORAK -> R.xml.keys_letters_english_dvorak + LANGUAGE_ENGLISH_NIRO -> R.xml.keys_letters_english_niro LANGUAGE_ENGLISH_QWERTZ -> R.xml.keys_letters_english_qwertz + LANGUAGE_ENGLISH_SOUL -> R.xml.keys_letters_english_soul + LANGUAGE_ENGLISH_WORKMAN -> R.xml.keys_letters_english_workman LANGUAGE_ESPERANTO -> R.xml.keys_letters_esperanto LANGUAGE_FRENCH_AZERTY -> R.xml.keys_letters_french_azerty LANGUAGE_FRENCH_BEPO -> R.xml.keys_letters_french_bepo diff --git a/app/src/main/res/xml/keys_letters_english_asset.xml b/app/src/main/res/xml/keys_letters_english_asset.xml new file mode 100644 index 00000000..b95c4ec0 --- /dev/null +++ b/app/src/main/res/xml/keys_letters_english_asset.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/xml/keys_letters_english_colemak.xml b/app/src/main/res/xml/keys_letters_english_colemak.xml new file mode 100644 index 00000000..21ccf46b --- /dev/null +++ b/app/src/main/res/xml/keys_letters_english_colemak.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/xml/keys_letters_english_colemakdh.xml b/app/src/main/res/xml/keys_letters_english_colemakdh.xml new file mode 100644 index 00000000..7da01f26 --- /dev/null +++ b/app/src/main/res/xml/keys_letters_english_colemakdh.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/xml/keys_letters_english_niro.xml b/app/src/main/res/xml/keys_letters_english_niro.xml new file mode 100644 index 00000000..bcb14a96 --- /dev/null +++ b/app/src/main/res/xml/keys_letters_english_niro.xml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/xml/keys_letters_english_soul.xml b/app/src/main/res/xml/keys_letters_english_soul.xml new file mode 100644 index 00000000..22f3301f --- /dev/null +++ b/app/src/main/res/xml/keys_letters_english_soul.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/xml/keys_letters_english_workman.xml b/app/src/main/res/xml/keys_letters_english_workman.xml new file mode 100644 index 00000000..9d660dd4 --- /dev/null +++ b/app/src/main/res/xml/keys_letters_english_workman.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From c9a624070fa161c8d7965af10c57739d29f278db Mon Sep 17 00:00:00 2001 From: NaeemBolchhi <42773187+NaeemBolchhi@users.noreply.github.com> Date: Sun, 18 Aug 2024 10:59:27 +0600 Subject: [PATCH 2/3] Update app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt Co-authored-by: Agnieszka C <85929121+Aga-C@users.noreply.github.com> --- app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt b/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt index 1716faac..7df62cf7 100644 --- a/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt +++ b/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt @@ -218,7 +218,7 @@ fun Context.getKeyboardLanguageText(language: Int): String { LANGUAGE_ENGLISH_NIRO -> "${getString(R.string.translation_english)} (Niro)" LANGUAGE_ENGLISH_QWERTZ -> "${getString(R.string.translation_english)} (QWERTZ)" LANGUAGE_ENGLISH_SOUL -> "${getString(R.string.translation_english)} (Soul)" - LANGUAGE_ENGLISH_Workman -> "${getString(R.string.translation_english)} (Workman)" + LANGUAGE_ENGLISH_WORKMAN-> "${getString(R.string.translation_english)} (Workman)" LANGUAGE_ESPERANTO -> getString(R.string.translation_esperanto) LANGUAGE_FRENCH_AZERTY -> "${getString(R.string.translation_french)} (AZERTY)" LANGUAGE_FRENCH_BEPO -> "${getString(R.string.translation_french)} (BEPO)" From 9482840ba83028bb96742a50881aeb4aa6c1e66b Mon Sep 17 00:00:00 2001 From: NaeemBolchhi <42773187+NaeemBolchhi@users.noreply.github.com> Date: Sun, 18 Aug 2024 11:01:51 +0600 Subject: [PATCH 3/3] Added a space after WORKMAN in Context.kt --- app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt b/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt index 7df62cf7..493d52cf 100644 --- a/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt +++ b/app/src/main/kotlin/org/fossify/keyboard/extensions/Context.kt @@ -218,7 +218,7 @@ fun Context.getKeyboardLanguageText(language: Int): String { LANGUAGE_ENGLISH_NIRO -> "${getString(R.string.translation_english)} (Niro)" LANGUAGE_ENGLISH_QWERTZ -> "${getString(R.string.translation_english)} (QWERTZ)" LANGUAGE_ENGLISH_SOUL -> "${getString(R.string.translation_english)} (Soul)" - LANGUAGE_ENGLISH_WORKMAN-> "${getString(R.string.translation_english)} (Workman)" + LANGUAGE_ENGLISH_WORKMAN -> "${getString(R.string.translation_english)} (Workman)" LANGUAGE_ESPERANTO -> getString(R.string.translation_esperanto) LANGUAGE_FRENCH_AZERTY -> "${getString(R.string.translation_french)} (AZERTY)" LANGUAGE_FRENCH_BEPO -> "${getString(R.string.translation_french)} (BEPO)"