From ef858235286b698ce72a68c7a3952ed0290b575a Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 20 May 2020 17:59:22 +0000 Subject: [PATCH] Fresh Russian layout --- data/keyboards/ru.yaml | 94 ++++++++++++++++++++++++++++++++++++++++++ data/langs/ru-RU.txt | 11 +++++ src/resources.rs | 2 + tests/meson.build | 1 + 4 files changed, 108 insertions(+) create mode 100644 data/keyboards/ru.yaml create mode 100644 data/langs/ru-RU.txt diff --git a/data/keyboards/ru.yaml b/data/keyboards/ru.yaml new file mode 100644 index 00000000..599292ae --- /dev/null +++ b/data/keyboards/ru.yaml @@ -0,0 +1,94 @@ +--- +outlines: + default: { width: 32, height: 52 } + altline: { width: 32, height: 52 } + wide: { width: 57, height: 52 } + narrow: { width: 26, height: 52 } + spaceline: { width: 107, height: 52 } + fill: { width: 159, height: 52 } + special: { width: 42, height: 52 } + +views: + base: + - "й ц у к е н г ш щ з х" + - "ф ы в а п р о л д ж э" + - "Shift_L я ч с м и т ь б ю BackSpace" + - "show_numbers preferences ё space ъ period Return" + upper: + - "Й Ц У К Е Н Г Ш Щ З Х" + - "Ф Ы В А П Р О Л Д Ж Э" + - "Shift_L Я Ч С М И Т Ь Б Ю BackSpace" + - "show_numbers preferences Ё space Ъ comma Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # $ % & - _ + ( )" + - "show_symbols , \" ' colon ; ! ? BackSpace" + - "show_letters preferences space_fill period Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers_from_symbols \\ / < > = [ ] BackSpace" + - "show_letters preferences space_fill period Return" + +buttons: + Shift_L: + action: + locking: + lock_view: "upper" + unlock_view: "base" + outline: "altline" + 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: "wide" + label: "123" + show_numbers_from_symbols: + action: + set_view: "numbers" + outline: "wide" + label: "123" + show_letters: + action: + set_view: "base" + outline: "wide" + label: "АБВ" + show_symbols: + action: + set_view: "symbols" + outline: "wide" + label: "*/=" + period: + outline: "special" + text: "." + comma: + outline: "special" + text: "," + space: + outline: "spaceline" + text: " " + space_fill: + outline: "fill" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + colon: + text: ":" + ё: + outline: "narrow" + Ё: + outline: "narrow" + ъ: + outline: "narrow" + Ъ: + outline: "narrow" diff --git a/data/langs/ru-RU.txt b/data/langs/ru-RU.txt new file mode 100644 index 00000000..23b131e0 --- /dev/null +++ b/data/langs/ru-RU.txt @@ -0,0 +1,11 @@ +de Немецкий +es Испанский +fi Финский +gr Греческий +it Итальянский +no Норвежский +pl Польский +ru Русский +se Шведский +terminal Терминал +us Английский (США) diff --git a/src/resources.rs b/src/resources.rs index 6267adf0..c3fa411c 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -27,6 +27,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[ ("number", include_str!("../data/keyboards/number.yaml")), ("pl", include_str!("../data/keyboards/pl.yaml")), ("pl_wide", include_str!("../data/keyboards/pl_wide.yaml")), + ("ru", include_str!("../data/keyboards/ru.yaml")), ("se", include_str!("../data/keyboards/se.yaml")), // layout+overlay ("terminal", include_str!("../data/keyboards/terminal.yaml")), @@ -68,6 +69,7 @@ const LAYOUT_NAMES: &[(*const str, *const str)] = &[ ("es-ES", include_str!("../data/langs/es-ES.txt")), ("ja-JP", include_str!("../data/langs/ja-JP.txt")), ("pl-PL", include_str!("../data/langs/pl-PL.txt")), + ("ru-RU", include_str!("../data/langs/ru-RU.txt")), ]; pub fn get_layout_names(lang: &str) diff --git a/tests/meson.build b/tests/meson.build index 977acdaf..c05f7f5b 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -59,6 +59,7 @@ foreach layout : [ 'no', 'number', 'pl', 'pl_wide', + 'ru', 'se', 'terminal',