From 7f0749483e347240c125e1d61905cf9d29aba076 Mon Sep 17 00:00:00 2001 From: Jordi Date: Sun, 23 May 2021 17:06:26 +0200 Subject: [PATCH 1/2] Introduce Swiss French keyboard layout --- data/keyboards/ch+fr.yaml | 84 +++++++++++++++++++++++++++++++++++++++ src/resources.rs | 2 + tests/meson.build | 1 + 3 files changed, 87 insertions(+) create mode 100644 data/keyboards/ch+fr.yaml diff --git a/data/keyboards/ch+fr.yaml b/data/keyboards/ch+fr.yaml new file mode 100644 index 00000000..3ec73a3f --- /dev/null +++ b/data/keyboards/ch+fr.yaml @@ -0,0 +1,84 @@ +# Maintained by: Jordi Bossy . No Copyright, enjoy! +--- +outlines: + default: { width: 35.33, height: 52 } + altline: { width: 48, height: 52 } + wide: { width: 59, height: 52 } + spaceline: { width: 70, height: 52 } + special: { width: 28, 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 show_eschars 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 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 preferences ñ Ñ space ° ß 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: "altline" + label: "123" + show_letters: + action: + set_view: "base" + outline: "altline" + label: "abc" + show_symbols: + action: + set_view: "symbols" + outline: "altline" + label: "*/=" + show_eschars: + action: + locking: + lock_view: "eschars" + unlock_view: "base" + outline: "altline" + label: "âÂ" + space: + outline: "spaceline" + label: " " + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + "\"": + keysym: "quotedbl" diff --git a/src/resources.rs b/src/resources.rs index 61b4f45a..3daf453f 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -27,6 +27,8 @@ static KEYBOARDS: &[(&'static str, &'static str)] = &[ ("bg", include_str!("../data/keyboards/bg.yaml")), ("br", include_str!("../data/keyboards/br.yaml")), + + ("ch+fr", include_str!("../data/keyboards/ch+fr.yaml")), ("de", include_str!("../data/keyboards/de.yaml")), ("de_wide", include_str!("../data/keyboards/de_wide.yaml")), diff --git a/tests/meson.build b/tests/meson.build index dae7c9ec..2079d55f 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -62,6 +62,7 @@ foreach layout : [ 'be', 'be_wide', 'bg', 'br', + 'ch+fr', 'cz', 'cz_wide', 'cz+qwerty', 'cz+qwerty_wide', 'de', 'de_wide', From 080186c18b59cd09147b41a268466e576af67512 Mon Sep 17 00:00:00 2001 From: Jordi Date: Mon, 24 May 2021 13:42:11 +0200 Subject: [PATCH 2/2] improve accents layout behavior and code cleaning --- data/keyboards/ch+fr.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/data/keyboards/ch+fr.yaml b/data/keyboards/ch+fr.yaml index 3ec73a3f..28323e6e 100644 --- a/data/keyboards/ch+fr.yaml +++ b/data/keyboards/ch+fr.yaml @@ -22,17 +22,17 @@ views: - "1 2 3 4 5 6 7 8 9 0" - "@ * + - = ( ) ~ < >" - "show_symbols # & / \\ √ ; : BackSpace" - - "show_letters show_eschars preferences _ space , . Return" + - "show_letters show_eschars preferences _ space , . Return" symbols: - "€ $ £ ¥ % | § µ [ ]" - "© ® § ` ^ { } · ¡ ¿" - "show_numbers « » ÷ × “ ” „ BackSpace" - - "show_letters show_eschars preferences - space , . Return" + - "show_letters show_eschars preferences - space , . Return" eschars: - "à â ç é è ê î ô ù û" - "À Â Ç É È Ê Î Ô Ù Û" - "show_numbers æ œ ä ë ï ö ü BackSpace" - - "show_letters preferences ñ Ñ space ° ß Return" + - "show_letters_from_accents preferences ñ Ñ space ° ß Return" buttons: Shift_L: @@ -72,6 +72,13 @@ buttons: unlock_view: "base" outline: "altline" label: "âÂ" + show_letters_from_accents: + action: + locking: + lock_view: "eschars" + unlock_view: "base" + outline: "altline" + label: "âÂ" space: outline: "spaceline" label: " "