From 8a527c64c3fef46f2476662b689b6aff6d23bf69 Mon Sep 17 00:00:00 2001 From: MoonlightWave-12 <135532-MoonlightWave-12@users.noreply.gitlab.gnome.org> Date: Sun, 1 Sep 2024 21:09:36 +0200 Subject: [PATCH] layouts: Add Serbian layouts Part-of: --- data/keyboards/rs+latin.yaml | 87 ++++++++++++++++++++++ data/keyboards/rs+latin_wide.yaml | 95 ++++++++++++++++++++++++ data/keyboards/rs+latinunicode.yaml | 88 ++++++++++++++++++++++ data/keyboards/rs+latinunicode_wide.yaml | 90 ++++++++++++++++++++++ data/keyboards/rs.yaml | 88 ++++++++++++++++++++++ data/keyboards/rs_wide.yaml | 90 ++++++++++++++++++++++ src/resources.rs | 7 ++ tests/meson.build | 3 + 8 files changed, 548 insertions(+) create mode 100644 data/keyboards/rs+latin.yaml create mode 100644 data/keyboards/rs+latin_wide.yaml create mode 100644 data/keyboards/rs+latinunicode.yaml create mode 100644 data/keyboards/rs+latinunicode_wide.yaml create mode 100644 data/keyboards/rs.yaml create mode 100644 data/keyboards/rs_wide.yaml diff --git a/data/keyboards/rs+latin.yaml b/data/keyboards/rs+latin.yaml new file mode 100644 index 00000000..9aff7bd3 --- /dev/null +++ b/data/keyboards/rs+latin.yaml @@ -0,0 +1,87 @@ +--- +outlines: + default: { width: 32.42, height: 52 } + fill: { width: 64.84, height: 52 } + altline: { width: 32.42, height: 52 } + wide: { width: 48.63, height: 52 } + change-view: { width: 32.42, height: 52 } + change-view-2: { width: 48.63, height: 52 } + spaceline: { width: 162.1, height: 52 } + special: { width: 32.42, height: 52 } + placeholder: { width: 32.42, height: 52 } + +views: + base: + - "q w e r t z u i o p š" + - "a s d f g h j k l č ć" + - "Shift_L y x c v b n m đ ž BackSpace" + - "show_numbers preferences space , . Return" + upper: + - "Q W E R T Z U I O P Š" + - "A S D F G H J K L Č Ć" + - "Shift_L Y X C V B N M Đ Ž 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 , . Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers \\ / < > = [ ] -- BackSpace-wide" + - "show_letters preferences space , . 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: "ABC" + show_symbols: + action: + set_view: "symbols" + outline: "change-view-2" + label: "*/=" + space: + outline: "spaceline" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + --: + outline: "placeholder" + text: "" + 5: + outline: "fill" + "&": + outline: "fill" + √: + outline: "fill" + ¥: + outline: "fill" \ No newline at end of file diff --git a/data/keyboards/rs+latin_wide.yaml b/data/keyboards/rs+latin_wide.yaml new file mode 100644 index 00000000..c646e9d2 --- /dev/null +++ b/data/keyboards/rs+latin_wide.yaml @@ -0,0 +1,95 @@ +--- +outlines: + default: { width: 48.87, height: 42 } + fill: { width: 73.31, height: 42 } + altline: { width: 48.87, height: 42 } + wide: { width: 73.31, height: 42 } + change-view: { width: 48.87, height: 42 } + change-view-2: { width: 73.31, height: 42 } + spaceline: { width: 244.34, height: 42 } + special: { width: 48.87, height: 42 } + placeholder: { width: 48.87, height: 42 } + +views: + base: + - "q w e r t z u i o p š" + - "a s d f g h j k l č ć" + - "Shift_L y x c v b n m đ ž BackSpace" + - "show_numbers preferences space , . Return" + upper: + - "Q W E R T Z U I O P Š" + - "A S D F G H J K L Č Ć" + - "Shift_L Y X C V B N M Đ Ž 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 , . Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers \\ / < > = [ ] -- BackSpace-wide" + - "show_letters preferences space , . 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: "ABC" + show_symbols: + action: + set_view: "symbols" + outline: "change-view-2" + label: "*/=" + space: + outline: "spaceline" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + --: + outline: "placeholder" + text: "" + 5: + outline: "fill" + 6: + outline: "fill" + "&": + outline: "fill" + -: + outline: "fill" + √: + outline: "fill" + π: + outline: "fill" + ¥: + outline: "fill" + ^: + outline: "fill" \ No newline at end of file diff --git a/data/keyboards/rs+latinunicode.yaml b/data/keyboards/rs+latinunicode.yaml new file mode 100644 index 00000000..000e4d5f --- /dev/null +++ b/data/keyboards/rs+latinunicode.yaml @@ -0,0 +1,88 @@ +--- +outlines: + default: { width: 32.42, height: 52 } + fill: { width: 64.84, height: 52 } + altline: { width: 48.63, height: 52 } + wide: { width: 64.84, height: 52 } + change-view: { width: 48.63, height: 52 } + change-view-2: { width: 64.84, height: 52 } + spaceline: { width: 129.68, height: 52 } + special: { width: 32.42, height: 52 } + placeholder: { width: 32.42, height: 52 } + +views: + base: + - "lj nj e r t z u i o p š" + - "a s d f g h j k l č ć" + - "Shift_L ž dž c v b n m đ BackSpace" + - "show_numbers preferences space , . Return" + upper: + - "Lj Nj E R T Z U I O P Š" + - "A S D F G H J K L Č Ć" + - "Shift_L Ž Dž C V B N M Đ BackSpace" + - "show_numbers preferences space ! ? Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # $ % & - _ + ( )" + - "show_symbols , \" ' : ; ! ? -- BackSpace" + - "show_letters preferences space , . Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers_from_symbols \\ / < > = [ ] -- BackSpace" + - "show_letters preferences space , . 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" + preferences: + action: "show_prefs" + outline: "special" + icon: "keyboard-mode-symbolic" + show_numbers: + action: + set_view: "numbers" + outline: "change-view-2" + label: "123" + show_numbers_from_symbols: + action: + set_view: "numbers" + outline: "change-view" + label: "123" + show_letters: + action: + set_view: "base" + outline: "change-view-2" + label: "ABC" + show_symbols: + action: + set_view: "symbols" + outline: "change-view" + label: "*/=" + space: + outline: "spaceline" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + --: + outline: "placeholder" + text: "" + 5: + outline: "fill" + "&": + outline: "fill" + √: + outline: "fill" + ¥: + outline: "fill" diff --git a/data/keyboards/rs+latinunicode_wide.yaml b/data/keyboards/rs+latinunicode_wide.yaml new file mode 100644 index 00000000..230514f4 --- /dev/null +++ b/data/keyboards/rs+latinunicode_wide.yaml @@ -0,0 +1,90 @@ +--- +outlines: + default: { width: 48.87, height: 42 } + fill: { width: 73.31, height: 42 } + altline: { width: 73.31, height: 42 } + wide: { width: 73.31, height: 42 } + change-view: { width: 73.31, height: 42 } + spaceline: { width: 244.34, height: 42 } + special: { width: 48.87, height: 42 } + placeholder: { width: 48.87, height: 42 } + +views: + base: + - "lj nj e r t z u i o p š" + - "a s d f g h j k l č ć" + - "Shift_L ž dž c v b n m đ BackSpace" + - "show_numbers preferences space , . Return" + upper: + - "Lj Nj E R T Z U I O P Š" + - "A S D F G H J K L Č Ć" + - "Shift_L Ž Dž C V B N M Đ BackSpace" + - "show_numbers preferences space ! ? Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # $ % & - _ + ( )" + - "show_symbols , \" ' : ; ! ? -- BackSpace" + - "show_letters preferences space , . Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers \\ / < > = [ ] -- BackSpace" + - "show_letters preferences space , . 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" + preferences: + action: "show_prefs" + outline: "special" + icon: "keyboard-mode-symbolic" + show_numbers: + action: + set_view: "numbers" + outline: "change-view" + label: "123" + show_letters: + action: + set_view: "base" + outline: "change-view" + label: "ABC" + show_symbols: + action: + set_view: "symbols" + outline: "change-view" + label: "*/=" + space: + outline: "spaceline" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + --: + outline: "placeholder" + text: "" + 5: + outline: "fill" + 6: + outline: "fill" + "&": + outline: "fill" + -: + outline: "fill" + √: + outline: "fill" + π: + outline: "fill" + ¥: + outline: "fill" + ^: + outline: "fill" \ No newline at end of file diff --git a/data/keyboards/rs.yaml b/data/keyboards/rs.yaml new file mode 100644 index 00000000..cbd21aca --- /dev/null +++ b/data/keyboards/rs.yaml @@ -0,0 +1,88 @@ +--- +outlines: + default: { width: 32.12, height: 52 } + fill: { width: 64.24, height: 52 } + altline: { width: 48.18, height: 52 } + wide: { width: 64.24, height: 52 } + change-view: { width: 48.18, height: 52 } + change-view-2: { width: 64.24, height: 52 } + spaceline: { width: 128.48, height: 52 } + special: { width: 32.12, height: 52 } + placeholder: { width: 32.12, 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" + - "show_letters preferences space , . Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers_from_symbols \\ / < > = [ ] -- BackSpace" + - "show_letters preferences space , . 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" + preferences: + action: "show_prefs" + outline: "special" + icon: "keyboard-mode-symbolic" + show_numbers: + action: + set_view: "numbers" + outline: "change-view-2" + label: "123" + show_numbers_from_symbols: + action: + set_view: "numbers" + outline: "change-view" + label: "123" + show_letters: + action: + set_view: "base" + outline: "change-view-2" + label: "ABC" + show_symbols: + action: + set_view: "symbols" + outline: "change-view" + label: "*/=" + space: + outline: "spaceline" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + --: + outline: "placeholder" + text: "" + 5: + outline: "fill" + "&": + outline: "fill" + √: + outline: "fill" + ¥: + outline: "fill" \ No newline at end of file diff --git a/data/keyboards/rs_wide.yaml b/data/keyboards/rs_wide.yaml new file mode 100644 index 00000000..ddd8137e --- /dev/null +++ b/data/keyboards/rs_wide.yaml @@ -0,0 +1,90 @@ +--- +outlines: + default: { width: 48.87, height: 42 } + fill: { width: 73.31, height: 42 } + altline: { width: 73.31, height: 42 } + wide: { width: 73.31, height: 42 } + change-view: { width: 73.31, height: 42 } + spaceline: { width: 244.35, height: 42 } + special: { width: 48.87, height: 42 } + placeholder: { width: 48.87, 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" + - "show_letters preferences space , . Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers \\ / < > = [ ] -- BackSpace" + - "show_letters preferences space , . 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" + preferences: + action: "show_prefs" + outline: "special" + icon: "keyboard-mode-symbolic" + show_numbers: + action: + set_view: "numbers" + outline: "change-view" + label: "123" + show_letters: + action: + set_view: "base" + outline: "change-view" + label: "ABC" + show_symbols: + action: + set_view: "symbols" + outline: "change-view" + label: "*/=" + space: + outline: "spaceline" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + --: + outline: "placeholder" + text: "" + 5: + outline: "fill" + 6: + outline: "fill" + "&": + outline: "fill" + -: + outline: "fill" + √: + outline: "fill" + π: + outline: "fill" + ¥: + outline: "fill" + ^: + outline: "fill" \ No newline at end of file diff --git a/src/resources.rs b/src/resources.rs index c00d232f..2e90d413 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -113,6 +113,13 @@ static KEYBOARDS: &[(&'static str, &'static str)] = &[ ("ro", include_str!("../data/keyboards/ro.yaml")), ("ro_wide", include_str!("../data/keyboards/ro_wide.yaml")), + ("rs", include_str!("../data/keyboards/rs.yaml")), + ("rs_wide", include_str!("../data/keyboards/rs_wide.yaml")), + ("rs+latin", include_str!("../data/keyboards/rs+latin.yaml")), + ("rs+latin_wide", include_str!("../data/keyboards/rs+latin_wide.yaml")), + ("rs+latinunicode", include_str!("../data/keyboards/rs+latinunicode.yaml")), + ("rs+latinunicode_wide", include_str!("../data/keyboards/rs+latinunicode_wide.yaml")), + ("ru", include_str!("../data/keyboards/ru.yaml")), ("ru_wide", include_str!("../data/keyboards/ru_wide.yaml")), diff --git a/tests/meson.build b/tests/meson.build index 75a1fa9b..6fbddc7d 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -95,6 +95,9 @@ foreach layout : [ 'pt', 'pt_wide', 'pl', 'pl_wide', 'ro', 'ro_wide', + 'rs', 'rs_wide', + 'rs+latin', 'rs+latin_wide', + 'rs+latinunicode', 'rs+latinunicode_wide', 'ru', 'ru_wide', 'se', 'se_wide', 'si', 'si_wide',