From 9decd5bd74612cb263e5ccd9ead3e683e7747077 Mon Sep 17 00:00:00 2001 From: MoonlightWave-12 <135532-MoonlightWave-12@users.noreply.gitlab.gnome.org> Date: Thu, 5 Sep 2024 23:32:17 +0200 Subject: [PATCH] Layouts: Add Belarusian layout Part-of: --- data/keyboards/by.yaml | 91 +++++++++++++++++++++++++++++++++++++ data/keyboards/by_wide.yaml | 88 +++++++++++++++++++++++++++++++++++ src/resources.rs | 3 ++ tests/meson.build | 1 + 4 files changed, 183 insertions(+) create mode 100644 data/keyboards/by.yaml create mode 100644 data/keyboards/by_wide.yaml diff --git a/data/keyboards/by.yaml b/data/keyboards/by.yaml new file mode 100644 index 00000000..f84d608e --- /dev/null +++ b/data/keyboards/by.yaml @@ -0,0 +1,91 @@ +# Language: Belarusian +--- +outlines: + default: { width: 32.45, height: 52 } + altline: { width: 32, height: 52 } + wide: { width: 64.55, height: 52 } + change-view: { width: 32, height: 52 } + change-view-2: { width: 64.55, height: 52 } + spaceline: { width: 91.96, height: 52 } + fill: { width: 156.86, height: 52 } + fill-2: { width: 64.9, height: 52 } + special: { width: 35.67, height: 52 } + large: { width: 35.67, height: 52 } + +views: + base: + - "й ц у к е н г ш ў з х" + - "ф ы в а п р о л д ж э" + - "Shift_L я ч с м і т ь б ю BackSpace" + - "show_numbers preferences ё space , . Return" + upper: + - "Й Ц У К Е Н Г Ш Ў З Х" + - "Ф Ы В А П Р О Л Д Ж Э" + - "Shift_L Я Ч С М І Т Ь Б Ю BackSpace" + - "show_numbers preferences Ё space , . Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # $ % & - _ + ( )" + - "show_symbols , \" ' : ; ! ? BackSpace-wide" + - "show_letters preferences space-fill . Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers \\ / < > = [ ] BackSpace-wide" + - "show_letters preferences space-fill . Return" + +buttons: + Shift_L: + action: + locking: + lock_view: "upper" + unlock_view: "base" + outline: "change-view" + icon: "key-shift" + BackSpace: + outline: "altline" + icon: "edit-clear-symbolic" + action: "erase" + BackSpace-wide: + outline: "wide" + icon: "edit-clear-symbolic" + action: "erase" + preferences: + action: "show_prefs" + outline: "special" + icon: "keyboard-mode-symbolic" + show_numbers: + action: + set_view: "numbers" + outline: "change-view-2" + label: "123" + show_letters: + action: + set_view: "base" + outline: "change-view-2" + label: "АБВ" + show_symbols: + action: + set_view: "symbols" + outline: "change-view-2" + label: "*/=" + .: + outline: "large" + space: + outline: "spaceline" + text: " " + space-fill: + outline: "fill" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + 5: + outline: "fill-2" + "&": + outline: "fill-2" + √: + outline: "fill-2" + ¥: + outline: "fill-2" \ No newline at end of file diff --git a/data/keyboards/by_wide.yaml b/data/keyboards/by_wide.yaml new file mode 100644 index 00000000..f03f1f22 --- /dev/null +++ b/data/keyboards/by_wide.yaml @@ -0,0 +1,88 @@ +# Language: Belarusian +--- +outlines: + default: { width: 48.75, height: 42 } + altline: { width: 48.75, height: 42 } + wide: { width: 97.5, height: 42 } + change-view: { width: 48.75, height: 42 } + change-view-2: { width: 97.5, height: 42 } + spaceline: { width: 146.5, height: 42 } + fill: { width: 244, height: 42 } + fill-2: { width: 97.5, height: 42 } + special: { width: 48.75, height: 42 } + +views: + base: + - "й ц у к е н г ш ў з х" + - "ф ы в а п р о л д ж э" + - "Shift_L я ч с м і т ь б ю BackSpace" + - "show_numbers preferences ё space , . Return" + upper: + - "Й Ц У К Е Н Г Ш Ў З Х" + - "Ф Ы В А П Р О Л Д Ж Э" + - "Shift_L Я Ч С М І Т Ь Б Ю BackSpace" + - "show_numbers preferences Ё space , . Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # $ % & - _ + ( )" + - "show_symbols , \" ' : ; ! ? BackSpace-wide" + - "show_letters preferences space-fill . Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers \\ / < > = [ ] BackSpace-wide" + - "show_letters preferences space-fill . Return" + +buttons: + Shift_L: + action: + locking: + lock_view: "upper" + unlock_view: "base" + outline: "change-view" + icon: "key-shift" + BackSpace: + outline: "altline" + icon: "edit-clear-symbolic" + action: "erase" + BackSpace-wide: + outline: "wide" + icon: "edit-clear-symbolic" + action: "erase" + preferences: + action: "show_prefs" + outline: "special" + icon: "keyboard-mode-symbolic" + show_numbers: + action: + set_view: "numbers" + outline: "change-view-2" + label: "123" + show_letters: + action: + set_view: "base" + outline: "change-view-2" + label: "АБВ" + show_symbols: + action: + set_view: "symbols" + outline: "change-view-2" + label: "*/=" + space: + outline: "spaceline" + text: " " + space-fill: + outline: "fill" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + 5: + outline: "fill-2" + "&": + outline: "fill-2" + √: + outline: "fill-2" + ¥: + outline: "fill-2" \ No newline at end of file diff --git a/src/resources.rs b/src/resources.rs index 2e90d413..a74a9d78 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -32,6 +32,9 @@ static KEYBOARDS: &[(&'static str, &'static str)] = &[ ("br", include_str!("../data/keyboards/br.yaml")), ("br_wide", include_str!("../data/keyboards/br_wide.yaml")), + ("by", include_str!("../data/keyboards/by.yaml")), + ("by_wide", include_str!("../data/keyboards/by_wide.yaml")), + ("ca", include_str!("../data/keyboards/ca.yaml")), ("ca_wide", include_str!("../data/keyboards/ca_wide.yaml")), diff --git a/tests/meson.build b/tests/meson.build index 6fbddc7d..9c1c55b4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -65,6 +65,7 @@ foreach layout : [ 'bg', 'bg_wide', 'bg+phonetic', 'bg+phonetic_wide', 'br', 'br_wide', + 'by', 'by_wide', 'ca', 'ca_wide', 'ch+fr', 'ch+fr_wide', 'ch+de', 'ch+de_wide',