From 4177e26a8cee1f6709c774a30e58bfb9aee0d9b9 Mon Sep 17 00:00:00 2001 From: Amy Date: Sat, 5 Feb 2022 13:37:15 +0100 Subject: [PATCH] Add all keyboard layouts and their variants --- lib/Keymaps/keymaps.dart | 1047 ++++++++++++++++++++++++++ lib/classes/keymap.dart | 11 + lib/functions/keyboard.dart | 23 + lib/functions/location/location.dart | 5 + lib/main.dart | 18 +- 5 files changed, 1094 insertions(+), 10 deletions(-) create mode 100644 lib/Keymaps/keymaps.dart create mode 100644 lib/classes/keymap.dart create mode 100644 lib/functions/keyboard.dart diff --git a/lib/Keymaps/keymaps.dart b/lib/Keymaps/keymaps.dart new file mode 100644 index 0000000..3f3a484 --- /dev/null +++ b/lib/Keymaps/keymaps.dart @@ -0,0 +1,1047 @@ +import 'package:flutter/cupertino.dart'; +import 'package:jade_gui/classes/keymap.dart'; + +List keymaps = [ + Keymap( + layout: "Afghanistan", + backLayout: "Af", + variant: [ + "fa-olpc", + "olpc-ps", + "ps", + "uz", + "uz-olpc", + ], + ), + Keymap( + layout: "Albania", + backLayout: "al", + variant: [ + "plisi", + "veqilharxhi", + ], + ), + Keymap( + layout: "Armenia", + backLayout: "am", + variant: [ + "eastern", + "eastern-alt", + "phonetic", + "phonetic-alt", + "western", + ], + ), + Keymap( + layout: "Arabic", + backLayout: "ara", + variant: [ + "azerty", + "azerty_digits", + "buckwalter", + "digits", + "mac", + "olpc", + "qwerty", + "qwerty_digits", + ], + ), + Keymap( + layout: "Austria", + backLayout: "at", + variant: [ + "mac", + "nodeadkeyrs", + ], + ), + Keymap( + layout: "Australia", + backLayout: "au", + variant: [ + "", + ], + ), + Keymap( + layout: "Azerbaijan", + backLayout: "az", + variant: [ + "cyrillic", + ], + ), + Keymap( + layout: "Bosnia and Herzegovina", + backLayout: "ba", + variant: [ + "alternatequotes", + "unicode", + "unicodeus", + "us", + ], + ), + Keymap( + layout: "Bangladesh", + backLayout: "bd", + variant: [ + "probhat", + ], + ), + Keymap( + layout: "Belgium", + backLayout: "be", + variant: [ + "iso-alternate", + "nodeadkeys", + "oss", + "oss_latin9", + "wang", + ], + ), + Keymap( + layout: "Bulgaria", + backLayout: "bg", + variant: [ + "bas_phonetic", + "bekl", + "phonetic", + ], + ), + Keymap( + layout: "Brazil", + backLayout: "br", + variant: [ + "dvorak", + "nativo", + "nativo-epo", + "nativo-us", + "nodeadkeys", + "thinkpad", + ], + ), + Keymap( + layout: "Bhutan", + backLayout: "bt", + variant: [ + "latin", + ], + ), + Keymap( + layout: "Botswana", + backLayout: "bw", + variant: [ + "", + ], + ), + Keymap( + layout: "Belarus", + backLayout: "by", + variant: [ + "intl", + "latin", + "legacy", + "ru", + ], + ), + Keymap( + layout: "Canada", + backLayout: "ca", + variant: [ + "eng", + "fr-dvorak", + "fr-legacy", + "ike", + "multi", + "multi-2gr", + "multix", + ], + ), + Keymap( + layout: "Democratic Republic of Congo", + backLayout: "cd", + variant: [ + "", + ], + ), + Keymap( + layout: "Switzerland", + backLayout: "ch", + variant: [ + "de_mac", + "de_nodeadkeys", + "fr", + "fr_mac", + "fr_nodeadkeys", + "legacy", + ], + ), + Keymap( + layout: "Cameroon", + backLayout: "cm", + variant: [ + "azerty", + "dvorak", + "french", + "mmuock", + "qwerty", + ], + ), + Keymap( + layout: "China", + backLayout: "cn", + variant: [ + "altgr-pinyin", + "mon_manchu_galik", + "mon_todo_galik", + "mon_trad", + "mon_trad_galik", + "mon_trad_manchu", + "mon_trad_todo", + "mon_trad_xibe", + "tib", + "tib_asciinum", + "ug", + ], + ), + Keymap( + layout: "Czechia", + backLayout: "cz", + variant: [ + "bksl", + "dvorak-ucw", + "qwerty", + "qwerty-mac", + "qwerty_bksl", + "rus", + "ucw", + ], + ), + Keymap( + layout: "Germany", + backLayout: "de", + variant: [ + "T3", + "deadacute", + "deadgraveacute", + "deadtilde", + "dsb", + "dsb_qwertz", + "dvorak", + "e1", + "e2", + "mac", + "mac_nodeadkeys", + "neo", + "nodeadkeys", + "qwerty", + "ro", + "ro_nodeadkeys", + "ru", + "tr", + "us", + ], + ), + Keymap( + layout: "Denmark", + backLayout: "dk", + variant: [ + "dvorak", + "mac", + "mac_nodeadkeys", + "nodeadkeys", + "winkeys", + ], + ), + Keymap( + layout: "Algeria", + backLayout: "dz", + variant: [ + "ar", + "azerty-deadkeys", + "ber", + "qwerty-gb-deadkeys", + "qwerty-us-deadkeys", + ], + ), + Keymap( + layout: "Estonia", + backLayout: "ee", + variant: [ + "dvorak", + "nodeadkeys", + "us", + ], + ), + Keymap( + layout: "Spain", + backLayout: "es", + variant: [ + "ast", + "cat", + "deadtilde", + "dvorak", + "mac", + "nodeadkeys", + "winkeys", + ], + ), + Keymap( + layout: "Ethiopia", + backLayout: "et", + variant: [ + "", + ], + ), + Keymap( + layout: "finland", + backLayout: "fi", + variant: [ + "classic", + "mac", + "nodeadkeys", + "smi", + "winkeys", + ], + ), + Keymap( + layout: "Faroe Islands", + backLayout: "fo", + variant: [ + "nodeadkeys", + ], + ), + Keymap( + layout: "France", + backLayout: "fr", + variant: [ + "afnor", + "azerty", + "bepo", + "bepo_afnor", + "bepo_latin9", + "bre", + "dvorak", + "geo", + "latin9", + "latin9_nodeadkeys", + "mac", + "nodeadkeys", + "oci", + "oss", + "oss_latin9", + "oss_nodeadkeys", + "us", + ], + ), + Keymap( + layout: "Great Britian", + backLayout: "gb", + variant: [ + "colemak", + "colemak_dh", + "dvorak", + "dvorakukp", + "extd", + "intl", + "mac", + "mac_intl", + "pl", + ], + ), + Keymap( + layout: "Georgia", + backLayout: "ge", + variant: [ + "ergonomic", + "mess", + "os", + "ru", + ], + ), + Keymap( + layout: "Ghana", + backLayout: "gh", + variant: [ + "akan", + "avn", + "ewe", + "fula", + "ga", + "generic", + "gillbt", + "hausa", + ], + ), + Keymap( + layout: "Guinea", + backLayout: "gn", + variant: [ + "", + ], + ), + Keymap( + layout: "Greece", + backLayout: "gr", + variant: [ + "extended", + "nodeadkeys", + "polytonic", + "simple", + ], + ), + Keymap( + layout: "Croatia", + backLayout: "hr", + variant: [ + "alternatequotes", + "unicode", + "unicodeus", + "us", + ], + ), + Keymap( + layout: "Hungary", + backLayout: "hu", + variant: [ + "101_qwerty_comma_dead", + "101_qwerty_comma_nodead", + "101_qwerty_dot_dead", + "101_qwerty_dot_nodead", + "101_qwertz_comma_dead", + "101_qwertz_comma_nodead", + "101_qwertz_dot_dead", + "101_qwertz_dot_nodead", + "102_qwerty_comma_dead", + "102_qwerty_comma_nodead", + "102_qwerty_dot_dead", + "102_qwerty_dot_nodead", + "102_qwertz_comma_dead", + "102_qwertz_comma_nodead", + "102_qwertz_dot_dead", + "102_qwertz_dot_nodead", + "nodeadkeys", + "qwerty", + "standard", + ], + ), + Keymap( + layout: "Indonesia", + backLayout: "id", + variant: [ + "phoneticx", + ], + ), + Keymap( + layout: "Ireland", + backLayout: "ie", + variant: [ + "CloGaelach", + "UnicodeExpert", + "ogam", + "ogam_is434", + ], + ), + Keymap( + layout: "Israel", + backLayout: "il", + variant: [ + "biblical", + "lyx", + "phonetic", + ], + ), + Keymap( + layout: "India", + backLayout: "in", + variant: [ + "ben", + "ben_baishakhi", + "ben_bornona", + "ben_gitanjali", + "ben_inscript", + "ben_probhat", + "bolnagri", + "eeyek", + "eng", + "guj", + "guru", + "hin-kagapa", + "hin-wx", + "iipa", + "jhelum", + "kan", + "kan-kagapa", + "mal", + "mal_enhanced", + "mal_lalitha", + "mar-kagapa", + "marathi", + "olck", + "ori", + "ori-bolnagri", + "ori-wx", + "san-kagapa", + "tam", + "tam_tamilnet", + "tam_tamilnet_TAB", + "tam_tamilnet_TSCII", + "tam_tamilnet_with_tam_nums", + "tel", + "tel-kagapa", + "tel-sarala", + "urd-phonetic", + "urd-phonetic3", + "urd-winkeys", + ], + ), + Keymap( + layout: "Iraq", + backLayout: "iq", + variant: [ + "ku", + "ku_alt", + "ku_ara", + "ku_f", + ], + ), + Keymap( + layout: "Iran", + backLayout: "ir", + variant: [ + "ku", + "ku_alt", + "ku_ara", + "ku_f", + "pes_keypad", + ], + ), + Keymap( + layout: "Iceland", + backLayout: "is", + variant: [ + "ku", + "ku_alt", + "ku_ara", + "ku_f", + "pes_keypad", + ], + ), + Keymap( + layout: "Italy", + backLayout: "it", + variant: [ + "fur", + "geo", + "ibm", + "intl", + "mac", + "nodeadkeys", + "scn", + "us", + "winkeys", + ], + ), + Keymap( + layout: "Japan", + backLayout: "jp", + variant: [ + "OADG109A", + "dvorak", + "kana", + "kana86", + "mac", + ], + ), + Keymap( + layout: "Kenya", + backLayout: "ke", + variant: [ + "kik", + ], + ), + Keymap( + layout: "Kyrgyzstan", + backLayout: "kg", + variant: [ + "phonetic", + ], + ), + Keymap( + layout: "Cambodia", + backLayout: "kh", + variant: [ + "", + ], + ), + Keymap( + layout: "The Republic of Korea", + backLayout: "kr", + variant: [ + "kr104", + ], + ), + Keymap( + layout: "Kazakhstan", + backLayout: "kz", + variant: [ + "ext", + "kazrus", + "latin", + "ruskaz", + ], + ), + Keymap( + layout: "Laos", + backLayout: "la", + variant: [ + "stea", + ], + ), + Keymap( + layout: "Sri Lanka", + backLayout: "lk", + variant: [ + "tam_TAB", + "tam_unicode", + "us", + ], + ), + Keymap( + layout: "Lithuania", + backLayout: "lt", + variant: [ + "ibm", + "lekp", + "lekpa", + "ratise", + "sgs", + "std", + "us", + ], + ), + Keymap( + layout: "Lativa", + backLayout: "lv", + variant: [ + "adapted", + "apostrophe", + "ergonomic", + "fkey", + "modern", + "tilde", + ], + ), + Keymap( + layout: "Morocco", + backLayout: "ma", + variant: [ + "french", + "tifinagh", + "tifinagh-alt", + "tifinagh-alt-phonetic", + "tifinagh-extended", + "tifinagh-extended-phonetic", + "tifinagh-phonetic", + ], + ), + Keymap( + layout: "Moldova", + backLayout: "md", + variant: [ + "gag", + ], + ), + Keymap( + layout: "Montenegro", + backLayout: "me", + variant: [ + "cyrillic", + "cyrillicalternatequotes", + "cyrillicyz", + "latinalternatequotes", + "latinunicode", + "latinunicodeyz", + "latinyz", + ], + ), + Keymap( + layout: "Republic of North Macedonia", + backLayout: "mk", + variant: [ + "nodeadkeys", + ], + ), + Keymap( + layout: "Mali", + backLayout: "ml", + variant: [ + "fr-oss", + "us-intl", + "us-mac", + ], + ), + Keymap( + layout: "Myanmar", + backLayout: "mm", + variant: [ + "zawgyi", + ], + ), + Keymap( + layout: "Mongolia", + backLayout: "mn", + variant: [ + "", + ], + ), + Keymap( + layout: "Malta", + backLayout: "mt", + variant: [ + "alt-gb", + "alt-us", + "us", + ], + ), + Keymap( + layout: "Maldives", + backLayout: "mv", + variant: [ + "", + ], + ), + Keymap( + layout: "Malaysia", + backLayout: "my", + variant: [ + "phonetic", + ], + ), + Keymap( + layout: "Nigeria", + backLayout: "ng", + variant: [ + "hausa", + "igbo", + "yoruba", + ], + ), + Keymap( + layout: "Netherlands", + backLayout: "nl", + variant: [ + "mac", + "std", + "us", + ], + ), + Keymap( + layout: "Norway", + backLayout: "no", + variant: [ + "colemak", + "dvorak", + "mac", + "mac_nodeadkeys", + "nodeadkeys", + "smi", + "smi_nodeadkeys", + "winkeys", + ], + ), + Keymap( + layout: "Nepal", + backLayout: "np", + variant: [ + "", + ], + ), + Keymap( + layout: "Philippines", + backLayout: "ph", + variant: [ + "capewell-dvorak", + "capewell-dvorak-bay", + "capewell-qwerf2k6", + "capewell-qwerf2k6-bay", + "colemak", + "colemak-bay", + "dvorak", + "dvorak-bay", + "qwerty-bay", + ], + ), + Keymap( + layout: "Pakistan", + backLayout: "pk", + variant: [ + "ara", + "snd", + "urd-crulp", + "urd-nla", + ], + ), + Keymap( + layout: "Poland", + backLayout: "pl", + variant: [ + "csb", + "dvorak", + "dvorak_altquotes", + "dvorak_quotes", + "dvp", + "legacy", + "qwertz", + "ru_phonetic_dvorak", + "szl", + ], + ), + Keymap( + layout: "Portugal", + backLayout: "pt", + variant: [ + "mac", + "mac_nodeadkeys", + "nativo", + "nativo-epo", + "nativo-us", + "nodeadkeys", + ], + ), + Keymap( + layout: "Romania", + backLayout: "ro", + variant: [ + "std", + "winkeys", + ], + ), + Keymap( + layout: "Serbia", + backLayout: "rs", + variant: [ + "alternatequotes", + "latin", + "latinalternatequotes", + "latinunicode", + "latinunicodeyz", + "latinyz", + "rue", + "yz", + ], + ), + Keymap( + layout: "Russia", + backLayout: "ru", + variant: [ + "bak", + "chm", + "cv", + "cv_latin", + "dos", + "kom", + "legacy", + "mac", + "os_legacy", + "os_winkeys", + "phonetic", + "phonetic_YAZHERTY", + "phonetic_azerty", + "phonetic_dvorak", + "phonetic_fr", + "phonetic_winkeys", + "sah", + "srp", + "tt", + "typewriter", + "typewriter-legacy", + "udm", + "xal", + ], + ), + Keymap( + layout: "Sweden", + backLayout: "se", + variant: [ + "dvorak", + "mac", + "nodeadkeys", + "rus", + "rus_nodeadkeys", + "smi", + "svdvorak", + "swl", + "us", + "us_dvorak", + ], + ), + Keymap( + layout: "Slovenia", + backLayout: "si", + variant: [ + "alternatequotes", + "us", + ], + ), + Keymap( + layout: "Slovakia", + backLayout: "sk", + variant: [ + "bksl", + "qwerty", + "qwerty_bksl", + ], + ), + Keymap( + layout: "Senegal", + backLayout: "sn", + variant: [ + "", + ], + ), + Keymap( + layout: "Sierra Leone", + backLayout: "sl", + variant: [ + "", + ], + ), + Keymap( + layout: "Syria", + backLayout: "sy", + variant: [ + "ku", + "ku_alt", + "ku_f", + "syc", + "syc_phonetic", + ], + ), + Keymap( + layout: "Togo", + backLayout: "tg", + variant: [ + "", + ], + ), + Keymap( + layout: "Thailand", + backLayout: "th", + variant: [ + "pat", + "tis", + ], + ), + Keymap( + layout: "Tajikistan", + backLayout: "tj", + variant: [ + "legacy", + ], + ), + Keymap( + layout: "Turkmenistan", + backLayout: "tm", + variant: [ + "alt", + ], + ), + Keymap( + layout: "Turkey", + backLayout: "tr", + variant: [ + "alt", + "crh", + "crh_alt", + "crh_f", + "f", + "intl", + "ku", + "ku_alt", + "ku_f", + "ot", + "otf", + "otk", + "otkf", + ], + ), + Keymap( + layout: "Taiwan", + backLayout: "tw", + variant: [ + "indigenous", + "saisiyat", + ], + ), + Keymap( + layout: "Tanzania", + backLayout: "tz", + variant: [ + "", + ], + ), + Keymap( + layout: "Ukraine", + backLayout: "ua", + variant: [ + "homophonic", + "legacy", + "phonetic", + "rstu", + "rstu_ru", + "typewriter", + "winkeys", + ], + ), + Keymap( + layout: "United States of America", + backLayout: "us", + variant: [ + "alt-intl", + "altgr-intl", + "chr", + "colemak", + "colemak_dh", + "colemak_dh_iso", + "dvorak", + "dvorak-alt-intl", + "dvorak-classic", + "dvorak-intl", + "dvorak-l", + "dvorak-mac", + "dvorak-r", + "dvp", + "euro", + "haw", + "hbs", + "intl", + "mac", + "norman", + "olpc2", + "rus", + "symbolic", + "workman", + "workman-intl", + ], + ), + Keymap( + layout: "Uzbekistan", + backLayout: "uz", + variant: [ + "latin", + ], + ), + Keymap( + layout: "Vietnam", + backLayout: "vn", + variant: [ + "fr", + "us", + ], + ), + Keymap( + layout: "South Africa", + backLayout: "za", + variant: [ + "", + ], + ) +]; diff --git a/lib/classes/keymap.dart b/lib/classes/keymap.dart new file mode 100644 index 0000000..1146c30 --- /dev/null +++ b/lib/classes/keymap.dart @@ -0,0 +1,11 @@ +class Keymap { + String layout = ""; + List variant = []; + String backLayout = ""; + + Keymap({ + this.layout = "", + this.variant = const [""], + this.backLayout = "", + }); +} diff --git a/lib/functions/keyboard.dart b/lib/functions/keyboard.dart new file mode 100644 index 0000000..a83b63b --- /dev/null +++ b/lib/functions/keyboard.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:jade_gui/Keymaps/keymaps.dart'; + +Widget keyboard(next) { + return Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + 'Please select a keyboard layout', + style: TextStyle( + fontSize: 50, + fontWeight: FontWeight.bold, + color: Color.fromARGB(255, 169, 0, 255)), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [], + ), + ], + ), + ); +} diff --git a/lib/functions/location/location.dart b/lib/functions/location/location.dart index 94f7632..fa98a77 100644 --- a/lib/functions/location/location.dart +++ b/lib/functions/location/location.dart @@ -11,6 +11,11 @@ Widget locationTemplate(location, nextSlide) { nextSlide(); choosenLocPack = location; }, + style: TextButton.styleFrom( + primary: Colors.white, + backgroundColor: const Color.fromARGB(100, 169, 0, 255), + padding: const EdgeInsets.all(10), + ), child: Column( children: [ Image( diff --git a/lib/main.dart b/lib/main.dart index c405744..f933f3d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,7 +1,8 @@ import 'package:flutter/material.dart'; import 'package:jade_gui/functions/location/location.dart'; -import 'functions/welcome.dart'; -import 'functions/locale.dart'; +import 'package:jade_gui/functions/welcome.dart'; +import 'package:jade_gui/functions/locale.dart'; +import 'package:jade_gui/functions/keyboard.dart'; void main() => runApp( const MaterialApp( @@ -257,14 +258,11 @@ class _JadeguiState extends State { print( "${getSelectedLocPack().region}/${getSelectedLocPack().location}"); print(getSelectedLocPack().locale); - widget = const Text( - 'Showing Keymap screen', - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - color: Color.fromARGB(255, 169, 0, 255), - ), - ); + widget = keyboard(() { + setState(() { + _selectedIndex = _selectedIndex + 1; + }); + }); break; case 3: widget = const Text(