Skip to content

Commit

Permalink
First very rough table extension for new keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
shundhammer committed Nov 18, 2021
1 parent 2087bbd commit 1ef539d
Showing 1 changed file with 88 additions and 41 deletions.
129 changes: 88 additions & 41 deletions keyboard/src/lib/y2keyboard/keyboards.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,222 +46,268 @@ def self.always_present_keyboards
{ "description" => _("English (US)"),
"alias" => "english-us",
"code" => "us",
# No different legacy_code
"suggested_for_lang" => ["ar_eg", "en", "nl_BE"]
},
{ "description" => _("English (UK)"),
"alias" => "english-uk",
"code" => "uk"
"code" => "uk", # TO DO: No uk-*, en-*, brit*
"legacy_code" => "uk"
},
{ "description" => _("German"),
"alias" => "german",
"code" => "de-latin1-nodeadkeys",
"code" => "de-nodeadkeys",
"legacy_code" => "de-latin1-nodeadkeys",
"suggested_for_lang" => ["de"]
},
{ "description" => _("German (with deadkeys)"),
"alias" => "german-deadkey",
"code" => "de-latin1"
"code" => "de", # TO DO: Check
"legacy_code" => "de-latin1"
},
{ "description" => _("German (Switzerland)"),
"alias" => "german-ch",
"code" => "sg-latin1",
"code" => "ch", # TO DO: Very unsure - check
"legacy_code" => "sg-latin1",
"suggested_for_lang" => ["de_CH"]
},
{ "description" => _("French"),
"alias" => "french",
"code" => "fr-latin1",
"code" => "fr",
"legacy_code" => "fr-latin1",
"suggested_for_lang" => ["br_FR", "fr", "fr_BE"]
},
{ "description" => _("French (Switzerland)"),
"alias" => "french-ch",
"code" => "fr_CH-latin1",
"code" => "ch-fr",
"legacy_code" => "fr_CH-latin1",
"suggested_for_lang" => ["fr_CH"]
},
{ "description" => _("French (Canada)"),
"alias" => "french-ca",
"code" => "cf"
"code" => "ca-fr-legacy", # TO DO: Or just ca? Check!
"legacy_code" => "cf"
},
{ "description" => _("Canadian (Multilingual)"),
"alias" => "cn-latin1",
"code" => "cn-latin1",
"code" => "ca-multi", # TO DO: Check
"legacy_code" => "cn-latin1",
"suggested_for_lang" => ["fr_CA"]
},
{ "description" => _("Spanish"),
"alias" => "spanish",
"code" => "es",
# No different legacy_code
"suggested_for_lang" => ["es"]
},
{ "description" => _("Spanish (Latin America)"),
"alias" => "spanish-lat",
"code" => "la-latin1"
"code" => "latam",
"legacy_code" => "la-latin1"
},
# Check if we still need this; there may be no counterpart in the kbd package
# (is the old MS-DOS codepage 850 really still in use on Linux anywhere?)
{ "description" => _("Spanish (CP 850)"),
"alias" => "spanish-lat-cp850",
"code" => "es-cp850"
"code" => "es-winkeys", # TO DO: VERY unsure; check!
"legacy_code" => "es-cp850"
},
{ "description" => _("Spanish (Asturian variant)"),
"alias" => "spanish-ast",
"code" => "es-ast"
# No different legacy_code
},
{ "description" => _("Italian"),
"alias" => "italian",
"code" => "it",
# No different legacy_code
"suggested_for_lang" => ["it"]
},
{ "description" => _("Persian"),
"alias" => "persian",
"code" => "ir",
"code" => "ir_ku", # TO DO: Check (VERY unsure)
"legacy_code" => "ir",
"suggested_for_lang" => ["fa_IR"]
},
{ "description" => _("Portuguese"),
"alias" => "portugese",
"code" => "pt-latin1"
"code" => "pt",
"legacy_code" => "pt-latin1"
},
{ "description" => _("Portuguese (Brazil)"),
"alias" => "portugese-br",
"code" => "br-abnt2"
"code" => "br", # TO DO: Check; or is it br-nativo?
"legacy_code" => "br-abnt2"
},
{ "description" => _("Portuguese (Brazil-- US accents)"),
"alias" => "portugese-br-usa",
"code" => "us-acentos"
"code" => "br-nativo-us", # TO DO: Check; unsure
"legacy_code" => "us-acentos"
},
{ "description" => _("Greek"),
"alias" => "greek",
# Left-shift+Alt switches layouts
# Windows (Super) is a Greek-shift
"code" => "gr"
"code" => "gr" # TO DO: No gr* or he* or el* found
},
{ "description" => _("Dutch"),
"alias" => "dutch",
"code" => "nl"
"code" => "nl" # TO DO: Or is it nl-std?
},
{ "description" => _("Danish"),
"alias" => "danish",
"code" => "dk-latin1"
"code" => "dk",
"legacy_code" => "dk-latin1"
},
{ "description" => _("Norwegian"),
"alias" => "norwegian",
"code" => "no-latin1",
"code" => "no",
"legacy_code" => "no-latin1",
"suggested_for_lang" => ["no_NO", "nn_NO"]
},
{ "description" => _("Swedish"),
"alias" => "swedish",
"code" => "sv-latin1"
"code" => "se",
"legacy_code" => "sv-latin1"
},
{ "description" => _("Finnish"),
"alias" => "finnish",
"code" => "fi"
"code" => "fi-classic", # TO DO: VERY unsure; check!
"legacy_code" => "fi"
},
{ "description" => _("Czech"),
"alias" => "czech",
"code" => "cz-us-qwertz"
"code" => "cz",
"legacy_code" => "cz-us-qwertz"
},
{ "description" => _("Czech (qwerty)"),
"alias" => "czech-qwerty",
"code" => "cz-lat2-us"
# No different legacy_code
},
{ "description" => _("Slovak"),
"alias" => "slovak",
"code" => "sk-qwertz"
"code" => "sk",
"legacy_code" => "sk-qwertz"
},
{ "description" => _("Slovak (qwerty)"),
"alias" => "slovak-qwerty",
"code" => "sk-qwerty"
# No different legacy_code
},
{ "description" => _("Slovene"),
"alias" => "slovene",
"code" => "slovene"
"code" => "si",
"legacy_code" => "slovene"
},
{ "description" => _("Hungarian"),
"alias" => "hungarian",
"code" => "hu"
"code" => "hu" # TO DO: Check; there are many different ones
# No different legacy_code
},
{ "description" => _("Polish"),
"alias" => "polish",
"code" => "Pl02"
"code" => "pl",
"legacy_code" => "Pl02"
},
{ "description" => _("Russian"),
"alias" => "russian",
"code" => "ruwin_alt-UTF-8",
"code" => "ru-cv_latin", # TO DO: Check (only one for Russian?!)
"legacy_code" => "ruwin_alt-UTF-8",
"suggested_for_lang" => ["ru", "ru_RU.KOI8-R"]
},
{ "description" => _("Serbian"),
"alias" => "serbian",
"code" => "sr-cy",
"code" => "rs-latin", # TO DO: Very unsure; check! Was sr-cy cyrillic?
"legacy_code" => "sr-cy",
"suggested_for_lang" => ["sr_YU"]
},
{ "description" => _("Estonian"),
"alias" => "estonian",
"code" => "et"
"code" => "ee",
"legacy_code" => "et"
},
{ "description" => _("Lithuanian"),
"alias" => "lithuanian",
"code" => "lt.baltic"
"code" => "lt",
"legacy_code" => "lt.baltic"
},
{ "description" => _("Turkish"),
"alias" => "turkish",
"code" => "trq"
"code" => "tr",
"legacy_code" => "trq"
},
{ "description" => _("Croatian"),
"alias" => "croatian",
"code" => "croat"
"code" => "hr",
"legacy_code" => "croat"
},
{ "description" => _("Japanese"),
"alias" => "japanese",
"code" => "jp106"
"code" => "jp",
"legacy_code" => "jp106"
},
{ "description" => _("Belgian"),
"alias" => "belgian",
"code" => "be-latin1",
"code" => "be",
"legacy_code" => "be-latin1",
"suggested_for_lang" => ["be_BY"]
},
{ "description" => _("Dvorak"),
"alias" => "dvorak",
# Beware, Dvorak is completely different from QWERTY;
# see also https://en.wikipedia.org/wiki/Dvorak_keyboard_layout
"code" => "dvorak"
"code" => "us-dvorak", # TO DO: There are 30 ones with ??-dvorak, but no generic dvorak
"legacy_code" => "dvorak"
},
{ "description" => _("Icelandic"),
"alias" => "icelandic",
"code" => "is-latin1",
"code" => "is",
"legacy_code" => "is-latin1",
"suggested_for_lang" => ["is_IS"]
},
{ "description" => _("Ukrainian"),
"alias" => "ukrainian",
# AltGr or Right-Ctrl switch layouts
"code" => "ua-utf"
"code" => "ua-utf" # TO DO: no ua-* or similar
},
{ "description" => _("Khmer"),
"alias" => "khmer",
"code" => "khmer"
"code" => "khmer" # TO DO: No hk-* or khmer or similar
},
{ "description" => _("Korean"),
"alias" => "korean",
"code" => "korean"
"code" => "korean" # TO DO: No ko-* or korean or similar
},
{ "description" => _("Arabic"),
"alias" => "arabic",
"code" => "arabic"
"code" => "sy-ku", # TO DO: Check; symlink to iq-ku; but no generic arabic, no egyptian or similar
"legacy_code" => "arabic"
},
{ "description" => _("Tajik"),
"alias" => "tajik",
# AltGr switches layouts
"code" => "tj_alt-UTF8"
"code" => "tj_alt-UTF8" # TO DO: No tj-* or similar
},
{ "description" => _("Traditional Chinese"),
"alias" => "taiwanese",
"code" => "tw"
# No different legacy_code
},
{ "description" => _("Simplified Chinese"),
"alias" => "chinese",
"code" => "cn"
# No different legacy_code
},
{ "description" => _("Romanian"),
"alias" => "romanian",
"code" => "ro"
# No different legacy_code
},
{ "description" => _("US International"),
"alias" => "us-int",
"code" => "us-acentos"
"code" => "us-alt-intl", # TO DO: Check; or should it be us-altgr-intl?
"legacy_code" => "us-acentos"
}
]
end
Expand All @@ -284,6 +330,7 @@ def self.optional_keyboards
"description" => _("French (AFNOR)"),
"alias" => "french-afnor",
"code" => "fr-afnor",
# No different legacy_code
"suggested_for_lang" => ["br_FR", "fr", "fr_BE"]
}
@optional_keyboards.push(afnor) if afnor_test.call
Expand Down

0 comments on commit 1ef539d

Please sign in to comment.