From 2aa58186e46ac1eda8207c45dc680c424bd5c2ec Mon Sep 17 00:00:00 2001 From: MoonlightWave-12 <135532-MoonlightWave-12@users.noreply.gitlab.gnome.org> Date: Tue, 23 Apr 2024 00:26:43 +0200 Subject: [PATCH] Add Turkish [tr] and [tr+f] layouts Part-of: --- data/keyboards/tr+f.yaml | 139 ++++++++++++++++++++++++++++++ data/keyboards/tr+f_wide.yaml | 157 ++++++++++++++++++++++++++++++++++ data/keyboards/tr.yaml | 101 ++++++++++++++++++++++ data/keyboards/tr_wide.yaml | 157 ++++++++++++++++++++++++++++++++++ src/resources.rs | 5 ++ tests/meson.build | 2 + 6 files changed, 561 insertions(+) create mode 100644 data/keyboards/tr+f.yaml create mode 100644 data/keyboards/tr+f_wide.yaml create mode 100644 data/keyboards/tr.yaml create mode 100644 data/keyboards/tr_wide.yaml diff --git a/data/keyboards/tr+f.yaml b/data/keyboards/tr+f.yaml new file mode 100644 index 00000000..4c676421 --- /dev/null +++ b/data/keyboards/tr+f.yaml @@ -0,0 +1,139 @@ +--- +outlines: + default: { width: 29.44, height: 52 } + subtle-highlight: { width: 29.44, height: 52 } + subtle-highlight-2: { width: 58.88, height: 52 } + fill: { width: 58.88, height: 52 } + altline: { width: 58.88, height: 52 } + change-view: { width: 58.88, height: 52 } + spaceline: { width: 88.32, height: 52 } + special: { width: 29.44, height: 52 } + placeholder: { width: 29.44, height: 52 } + +views: + base: + - "f g ğ i o d r n h p q w" + - "u i e a ü t k m l y ş x" + - "Shift_L j ö v c ç z s b BackSpace" + - "show_numbers show_eschars preferences space , . Return" + upper: + - "F G Ğ I O D R N H P Q W" + - "U I E A Ü T K M L Y Ş X" + - "Shift_L J Ö V C Ç Z S B BackSpace" + - "show_numbers show_eschars preferences space ! ? Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # ₺ % & - _ + ( )" + - "show_symbols ; \" ' : = < > -- BackSpace" + - "show_letters show_eschars preferences space , . Return" + symbols: + - "~ ` € | · √ µ ÷ × ¶" + - "© ® £ $ ¥ ^ ° * { }" + - "show_numbers \\ / § π τ [ ] -- BackSpace" + - "show_letters show_eschars preferences space , . Return" + eschars: + - "ä æ é ö-subtle-highlight ü-subtle-highlight Ä Æ É Ö-subtle-highlight Ü-subtle-highlight" + - "à â ê î ô À Â Ê Î Ô" + - "show_numbers ğ-subtle-highlight ç-subtle-highlight ş-subtle-highlight Ğ-subtle-highlight Ç-subtle-highlight Ş-subtle-highlight ß -- BackSpace" + - "show_letters show_eschars 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: "*/=" + show_eschars: + action: + locking: + lock_view: "eschars" + unlock_view: "base" + outline: "change-view" + label: "Çğ" + space: + outline: "spaceline" + text: " " + Return: + outline: "altline" + icon: "key-enter" + keysym: "Return" + ğ-subtle-highlight: + outline: "subtle-highlight" + text: "ğ" + Ğ-subtle-highlight: + outline: "subtle-highlight" + text: "Ğ" + ü-subtle-highlight: + outline: "subtle-highlight-2" + text: "ü" + Ü-subtle-highlight: + outline: "subtle-highlight" + text: "Ü" + ş-subtle-highlight: + outline: "subtle-highlight" + text: "ş" + Ş-subtle-highlight: + outline: "subtle-highlight" + text: "Ş" + ç-subtle-highlight: + outline: "subtle-highlight" + text: "ç" + Ç-subtle-highlight: + outline: "subtle-highlight" + text: "Ç" + ö-subtle-highlight: + outline: "subtle-highlight" + text: "ö" + Ö-subtle-highlight: + outline: "subtle-highlight" + text: "Ö" + --: + outline: "placeholder" + text: "" + 5: + outline: "fill" + "&": + outline: "fill" + ·: + outline: "fill" + ¥: + outline: "fill" + ô: + outline: "fill" + Ä: + outline: "fill" + À: + outline: "fill" + √: + outline: "fill" + 6: + outline: "fill" + -: + outline: "fill" + ^: + outline: "fill" \ No newline at end of file diff --git a/data/keyboards/tr+f_wide.yaml b/data/keyboards/tr+f_wide.yaml new file mode 100644 index 00000000..65be051b --- /dev/null +++ b/data/keyboards/tr+f_wide.yaml @@ -0,0 +1,157 @@ +--- +outlines: + default: { width: 45.11, height: 42 } + subtle-highlight: { width: 45.11, height: 42 } + halfwidth: { width: 24, height: 42 } + narrow: { width: 40.5, height: 42 } + altline: { width: 67.67, height: 42 } + change-view: { width: 67.67, height: 42 } + fill: { width: 90.22, height: 42 } + subtle-highlight-2: { width: 90.22, height: 42 } + spaceline: { width: 212.2, height: 42 } + special: { width: 45.11, height: 42 } + placeholder: { width: 45.11, height: 42 } + +views: + base: + - "f g ğ i o d r n h p q w" + - "u i e a ü t k m l y ş x" + - "Shift_L j ö v c ç z s b -- BackSpace" + - "show_numbers show_eschars preferences space ,-narrow .-narrow Return" + upper: + - "F G Ğ I O D R N H P Q W" + - "U I E A Ü T K M L Y Ş X" + - "Shift_L J Ö V C Ç Z S B -- BackSpace" + - "show_numbers show_eschars preferences space !-narrow ?-narrow Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # ₺ % & - _ + ( )" + - "show_symbols -- ; \" ' : = < > -- BackSpace" + - "show_letters show_eschars preferences space ,-narrow .-narrow Return" + symbols: + - "~ ` € | · √ µ ÷ × ¶" + - "© ® £ $ ¥ ^ ° * { }" + - "show_numbers -- \\ / § π τ [ ] -- BackSpace" + - "show_letters show_eschars preferences space ,-narrow .-narrow Return" + eschars: + - "ä æ é ö-subtle-highlight ü-subtle-highlight Ä Æ É Ö-subtle-highlight Ü-subtle-highlight" + - "à â ê î ô À Â Ê Î Ô" + - "show_numbers -- ğ-subtle-highlight ç-subtle-highlight ş-subtle-highlight Ğ-subtle-highlight Ç-subtle-highlight Ş-subtle-highlight ß -- BackSpace" + - "show_letters show_eschars 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: "*/=" + show_eschars: + action: + locking: + lock_view: "eschars" + unlock_view: "base" + outline: "change-view" + label: "Çğ" + space: + outline: "spaceline" + text: " " + Return: + outline: "altline" + icon: "key-enter" + keysym: "Return" + û: + outline: "narrow" + Û: + outline: "narrow" + ",-narrow": + outline: "narrow" + text: "," + .-narrow: + outline: "narrow" + text: "." + "!-narrow": + outline: "narrow" + text: "!" + ?-narrow: + outline: "narrow" + text: "?" + --: + outline: "placeholder" + text: "" + 5: + outline: "fill" + "&": + outline: "fill" + ·: + outline: "fill" + ¥: + outline: "fill" + ô: + outline: "fill" + Ä: + outline: "fill" + À: + outline: "fill" + √: + outline: "fill" + 6: + outline: "fill" + -: + outline: "fill" + ^: + outline: "fill" + ğ-subtle-highlight: + outline: "subtle-highlight" + text: "ğ" + Ğ-subtle-highlight: + outline: "subtle-highlight" + text: "Ğ" + ü-subtle-highlight: + outline: "subtle-highlight-2" + text: "ü" + Ü-subtle-highlight: + outline: "subtle-highlight" + text: "Ü" + ş-subtle-highlight: + outline: "subtle-highlight" + text: "ş" + Ş-subtle-highlight: + outline: "subtle-highlight" + text: "Ş" + ç-subtle-highlight: + outline: "subtle-highlight" + text: "ç" + Ç-subtle-highlight: + outline: "subtle-highlight" + text: "Ç" + ö-subtle-highlight: + outline: "subtle-highlight" + text: "ö" + Ö-subtle-highlight: + outline: "subtle-highlight" + text: "Ö" \ No newline at end of file diff --git a/data/keyboards/tr.yaml b/data/keyboards/tr.yaml new file mode 100644 index 00000000..65ff080f --- /dev/null +++ b/data/keyboards/tr.yaml @@ -0,0 +1,101 @@ +--- +outlines: + default: { width: 35.33, height: 52 } + subtle-highlight: { width: 35.33, height: 52 } + altline: { width: 52.67, height: 52 } + change-view: { width: 52.67, height: 52 } + spaceline: { width: 89.3, height: 52 } + special: { width: 35.33, height: 52 } + +views: + base: + - "q w e r t y u ı o p" + - "a s d f g h j k l i" + - "Shift_L z x c v b n m BackSpace" + - "show_numbers show_eschars preferences space , . Return" + upper: + - "Q W E R T Y U I O P" + - "A S D F G H J K L İ" + - "Shift_L Z X C V B N M BackSpace" + - "show_numbers show_eschars preferences space ! ? Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # ₺ % & - _ + ( )" + - "show_symbols ; \" ' : = < > BackSpace" + - "show_letters show_eschars preferences space , . Return" + symbols: + - "~ ` € | · √ µ ÷ × ¶" + - "© ® £ $ ¥ ^ ° * { }" + - "show_numbers \\ / § π τ [ ] BackSpace" + - "show_letters show_eschars preferences space , . Return" + eschars: + - "ä æ é ö ü Ä Æ É Ö Ü" + - "à â ê î ô À Â Ê Î Ô" + - "show_numbers ğ ç ş Ğ Ç Ş ß BackSpace" + - "show_letters show_eschars 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: "*/=" + show_eschars: + action: + locking: + lock_view: "eschars" + unlock_view: "base" + outline: "change-view" + label: "Çğ" + space: + outline: "spaceline" + text: " " + Return: + outline: "altline" + icon: "key-enter" + keysym: "Return" + ğ: + outline: "subtle-highlight" + Ğ: + outline: "subtle-highlight" + ü: + outline: "subtle-highlight" + Ü: + outline: "subtle-highlight" + ş: + outline: "subtle-highlight" + Ş: + outline: "subtle-highlight" + ç: + outline: "subtle-highlight" + Ç: + outline: "subtle-highlight" + ö: + outline: "subtle-highlight" + Ö: + outline: "subtle-highlight" \ No newline at end of file diff --git a/data/keyboards/tr_wide.yaml b/data/keyboards/tr_wide.yaml new file mode 100644 index 00000000..d3369fc3 --- /dev/null +++ b/data/keyboards/tr_wide.yaml @@ -0,0 +1,157 @@ +--- +outlines: + default: { width: 45.11, height: 42 } + subtle-highlight: { width: 45.11, height: 42 } + halfwidth: { width: 24, height: 42 } + narrow: { width: 40.5, height: 42 } + altline: { width: 67.67, height: 42 } + change-view: { width: 67.67, height: 42 } + fill: { width: 90.22, height: 42 } + subtle-highlight-2: { width: 90.22, height: 42 } + spaceline: { width: 212.2, height: 42 } + special: { width: 45.11, height: 42 } + placeholder: { width: 45.11, height: 42 } + +views: + base: + - "q w e r t y u ı o p ğ ü" + - "a s d f g h j k l ş i --" + - "Shift_L z x c v b n m ö ç BackSpace" + - "show_numbers show_eschars preferences space ,-narrow .-narrow Return" + upper: + - "Q W E R T Y U I O P Ğ Ü" + - "A S D F G H J K L Ş İ --" + - "Shift_L Z X C V B N M Ö Ç BackSpace" + - "show_numbers show_eschars preferences space !-narrow ?-narrow Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # ₺ % & - _ + ( )" + - "show_symbols -- ; \" ' : = < > -- BackSpace" + - "show_letters show_eschars preferences space ,-narrow .-narrow Return" + symbols: + - "~ ` € | · √ µ ÷ × ¶" + - "© ® £ $ ¥ ^ ° * { }" + - "show_numbers -- \\ / § π τ [ ] -- BackSpace" + - "show_letters show_eschars preferences space ,-narrow .-narrow Return" + eschars: + - "ä æ é ö-subtle-highlight ü-subtle-highlight Ä Æ É Ö-subtle-highlight Ü-subtle-highlight" + - "à â ê î ô À Â Ê Î Ô" + - "show_numbers -- ğ-subtle-highlight ç-subtle-highlight ş-subtle-highlight Ğ-subtle-highlight Ç-subtle-highlight Ş-subtle-highlight ß -- BackSpace" + - "show_letters show_eschars 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: "*/=" + show_eschars: + action: + locking: + lock_view: "eschars" + unlock_view: "base" + outline: "change-view" + label: "Çğ" + space: + outline: "spaceline" + text: " " + Return: + outline: "altline" + icon: "key-enter" + keysym: "Return" + û: + outline: "narrow" + Û: + outline: "narrow" + ",-narrow": + outline: "narrow" + text: "," + .-narrow: + outline: "narrow" + text: "." + "!-narrow": + outline: "narrow" + text: "!" + ?-narrow: + outline: "narrow" + text: "?" + --: + outline: "placeholder" + text: "" + 5: + outline: "fill" + "&": + outline: "fill" + ·: + outline: "fill" + ¥: + outline: "fill" + ô: + outline: "fill" + Ä: + outline: "fill" + À: + outline: "fill" + √: + outline: "fill" + 6: + outline: "fill" + -: + outline: "fill" + ^: + outline: "fill" + ğ-subtle-highlight: + outline: "subtle-highlight" + text: "ğ" + Ğ-subtle-highlight: + outline: "subtle-highlight" + text: "Ğ" + ü-subtle-highlight: + outline: "subtle-highlight-2" + text: "ü" + Ü-subtle-highlight: + outline: "subtle-highlight" + text: "Ü" + ş-subtle-highlight: + outline: "subtle-highlight" + text: "ş" + Ş-subtle-highlight: + outline: "subtle-highlight" + text: "Ş" + ç-subtle-highlight: + outline: "subtle-highlight" + text: "ç" + Ç-subtle-highlight: + outline: "subtle-highlight" + text: "Ç" + ö-subtle-highlight: + outline: "subtle-highlight" + text: "ö" + Ö-subtle-highlight: + outline: "subtle-highlight" + text: "Ö" \ No newline at end of file diff --git a/src/resources.rs b/src/resources.rs index d9a183f5..acb82cb4 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -116,6 +116,11 @@ static KEYBOARDS: &[(&'static str, &'static str)] = &[ ("th", include_str!("../data/keyboards/th.yaml")), ("th_wide", include_str!("../data/keyboards/th_wide.yaml")), + ("tr", include_str!("../data/keyboards/tr.yaml")), + ("tr_wide", include_str!("../data/keyboards/tr_wide.yaml")), + ("tr+f", include_str!("../data/keyboards/tr+f.yaml")), + ("tr+f_wide", include_str!("../data/keyboards/tr+f_wide.yaml")), + ("ua", include_str!("../data/keyboards/ua.yaml")), ("ua_wide", include_str!("../data/keyboards/ua_wide.yaml")), diff --git a/tests/meson.build b/tests/meson.build index d965f561..4d5811a5 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -95,6 +95,8 @@ foreach layout : [ 'ru', 'ru_wide', 'se', 'se_wide', 'th', 'th_wide', + 'tr', 'tr_wide', + 'tr+f', 'tr+f_wide', 'ua', 'ua_wide', 'us+colemak', 'us+colemak_wide', 'us+dvorak', 'us+dvorak_wide',