From 323d89e4cb5df9c534acddbe6c2fc276f4483f62 Mon Sep 17 00:00:00 2001 From: uzanto Date: Mon, 4 Nov 2019 22:06:58 +0000 Subject: [PATCH 1/8] Add new file --- data/keyboards/fr.yaml | 98 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 data/keyboards/fr.yaml diff --git a/data/keyboards/fr.yaml b/data/keyboards/fr.yaml new file mode 100644 index 00000000..c6af188f --- /dev/null +++ b/data/keyboards/fr.yaml @@ -0,0 +1,98 @@ +--- +bounds: { x: 0, y: 1, width: 360, height: 210 } + +outlines: + default: + bounds: { x: 0, y: 0, width: 35.33, height: 52 } + altline: + bounds: { x: 0, y: 0, width: 52.67, height: 52 } + wide: + bounds: { x: 0, y: 0, width: 62, height: 52 } + spaceline: + bounds: { x: 0, y: 0, width: 99.67, height: 52 } + special: + bounds: { x: 0, y: 0, width: 44, height: 52 } + + + +views: + base: + - "a z e r t y u i o p" + - "q s d f g h j k l m" + - "Shift_L w x c v b n ç BackSpace" + - "show_numbers show_eschars preferences space , period Return" + upper: + - "A Z E R T Y U I O P" + - "Q S D F G H J K L M" + - "Shift_L W X C V B N Ç BackSpace" + - "show_numbers show_eschars preferences space ? period Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # € % & - _ + ( )" + - "show_symbols , \" ' colon ; ! ? BackSpace" + - "show_letters show_eschars preferences space ? period Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ $ ¥ ^ ° * { }" + - "show_numbers \\ / < > = [ ] BackSpace" + - "show_letters show_eschars preferences space ? period Return" + eschars: + - "â  à À æ Æ ä î Î ï" + - "ê Ê è È œ Œ ë é É ö" + - "show_numbers ÿ ç Ç ù û ü ô Ô BackSpace" + - "show_letters show_eschars 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" + Delete: + outline: "altline" + icon: "edit-clear-symbolic" + preferences: + action: "show_prefs" + outline: "default" + 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_symbols: + action: + locking: + lock_view: "eschars" + unlock_view: "base" + outline: "altline" + label: "âÂ" + + period: + outline: "default" + label: "." + space: + outline: "spaceline" + label: " " + Return: + outline: "altline" + icon: "key-enter" + colon: + label: ":" + "\"": + keysym: "quotedbl" \ No newline at end of file From 7de7dc1b33817e42c3514b0e3b9bff5fc9c30682 Mon Sep 17 00:00:00 2001 From: uzanto Date: Tue, 12 Nov 2019 21:35:21 +0000 Subject: [PATCH 2/8] Replace duplicated show_symbols by show_eschars and removed "Delete" button that it's doing nothing --- data/keyboards/fr.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/data/keyboards/fr.yaml b/data/keyboards/fr.yaml index c6af188f..01984981 100644 --- a/data/keyboards/fr.yaml +++ b/data/keyboards/fr.yaml @@ -53,9 +53,6 @@ buttons: BackSpace: outline: "altline" icon: "edit-clear-symbolic" - Delete: - outline: "altline" - icon: "edit-clear-symbolic" preferences: action: "show_prefs" outline: "default" @@ -75,7 +72,7 @@ buttons: set_view: "symbols" outline: "altline" label: "*/=" - show_symbols: + show_eschars: action: locking: lock_view: "eschars" From 09c78da7a709075c1785275054503be44271c599 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Tue, 21 Apr 2020 19:22:16 +0200 Subject: [PATCH 3/8] keyboards: fr: fix keyboard layout A number of keys would not give the expected result, due to the lack of a `text` of `action` property. Additionally, the layout wouldn't load because of an old file format (it seems `bounds` are not supported anymore). This patch makes sure this layout can be loaded and used by squeekboard v0.1.9. --- data/keyboards/fr.yaml | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/data/keyboards/fr.yaml b/data/keyboards/fr.yaml index 01984981..10d7489e 100644 --- a/data/keyboards/fr.yaml +++ b/data/keyboards/fr.yaml @@ -1,19 +1,10 @@ --- -bounds: { x: 0, y: 1, width: 360, height: 210 } - outlines: - default: - bounds: { x: 0, y: 0, width: 35.33, height: 52 } - altline: - bounds: { x: 0, y: 0, width: 52.67, height: 52 } - wide: - bounds: { x: 0, y: 0, width: 62, height: 52 } - spaceline: - bounds: { x: 0, y: 0, width: 99.67, height: 52 } - special: - bounds: { x: 0, y: 0, width: 44, height: 52 } - - + default: { width: 35.33, height: 52 } + altline: { width: 52.67, height: 52 } + wide: { width: 62, height: 52 } + spaceline: { width: 99.67, height: 52 } + special: { width: 44, height: 52 } views: base: @@ -53,6 +44,7 @@ buttons: BackSpace: outline: "altline" icon: "edit-clear-symbolic" + action: "erase" preferences: action: "show_prefs" outline: "default" @@ -79,17 +71,17 @@ buttons: unlock_view: "base" outline: "altline" label: "âÂ" - period: outline: "default" - label: "." + text: "." space: outline: "spaceline" - label: " " + text: " " Return: outline: "altline" icon: "key-enter" + keysym: "Return" colon: - label: ":" + text: ":" "\"": - keysym: "quotedbl" \ No newline at end of file + keysym: "quotedbl" From b631817896419494474381dc07a5a6223dfa54cb Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Tue, 21 Apr 2020 19:24:57 +0200 Subject: [PATCH 4/8] keyboards: fr: make sure the layout fits the screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to an excessive amount of keys in the `eschars` view, one of the rows would overflow the screen. This commit removes the `Ç` key, which is already present in the `upper` view. --- data/keyboards/fr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/keyboards/fr.yaml b/data/keyboards/fr.yaml index 10d7489e..efaf7739 100644 --- a/data/keyboards/fr.yaml +++ b/data/keyboards/fr.yaml @@ -30,7 +30,7 @@ views: eschars: - "â  à À æ Æ ä î Î ï" - "ê Ê è È œ Œ ë é É ö" - - "show_numbers ÿ ç Ç ù û ü ô Ô BackSpace" + - "show_numbers ÿ ç ù û ü ô Ô BackSpace" - "show_letters show_eschars preferences space « » Return" buttons: From 0bdb5f1f33212737b33b4d368fc5ce60ff7abc3f Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Thu, 23 Apr 2020 13:07:33 +0200 Subject: [PATCH 5/8] resources: include French keyboard layout --- src/resources.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/resources.rs b/src/resources.rs index 3871174a..6267adf0 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -18,6 +18,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[ ("de_wide", include_str!("../data/keyboards/de_wide.yaml")), ("es", include_str!("../data/keyboards/es.yaml")), ("fi", include_str!("../data/keyboards/fi.yaml")), + ("fr", include_str!("../data/keyboards/fr.yaml")), ("gr", include_str!("../data/keyboards/gr.yaml")), ("it", include_str!("../data/keyboards/it.yaml")), ("jp+kana", include_str!("../data/keyboards/jp+kana.yaml")), From fa8449eb1e62c7442376addbb4fe48efd620211f Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Thu, 23 Apr 2020 14:48:58 +0200 Subject: [PATCH 6/8] keyboards: fr: improve consistency with other layouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to stay consistent with other layouts, the bottom line has been re-arranged and keys dimensions have been optimized (based on the `terminal` layout, which has similar features). Furthermore, the ç/Ç keys in the 'normal' views have been replaced with ./, so that all diacritics are on the same view. This commit also fixes the Backspace key behavior. --- data/keyboards/fr.yaml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/data/keyboards/fr.yaml b/data/keyboards/fr.yaml index efaf7739..5788bc4e 100644 --- a/data/keyboards/fr.yaml +++ b/data/keyboards/fr.yaml @@ -2,36 +2,36 @@ outlines: default: { width: 35.33, height: 52 } altline: { width: 52.67, height: 52 } - wide: { width: 62, height: 52 } - spaceline: { width: 99.67, height: 52 } + wide: { width: 59, height: 52 } + spaceline: { width: 140, height: 52 } special: { width: 44, height: 52 } views: base: - "a z e r t y u i o p" - "q s d f g h j k l m" - - "Shift_L w x c v b n ç BackSpace" - - "show_numbers show_eschars preferences space , period Return" + - "Shift_L w x c v b n . BackSpace" + - "show_numbers preferences space show_eschars Return" upper: - "A Z E R T Y U I O P" - "Q S D F G H J K L M" - - "Shift_L W X C V B N Ç BackSpace" - - "show_numbers show_eschars preferences space ? period Return" + - "Shift_L W X C V B N , BackSpace" + - "show_numbers preferences space show_eschars Return" numbers: - "1 2 3 4 5 6 7 8 9 0" - "@ # € % & - _ + ( )" - "show_symbols , \" ' colon ; ! ? BackSpace" - - "show_letters show_eschars preferences space ? period Return" + - "show_letters preferences space show_eschars Return" symbols: - "~ ` | · √ π τ ÷ × ¶" - "© ® £ $ ¥ ^ ° * { }" - - "show_numbers \\ / < > = [ ] BackSpace" - - "show_letters show_eschars preferences space ? period Return" + - "show_numbers_from_symbols \\ / < > = [ ] BackSpace" + - "show_letters preferences space show_eschars Return" eschars: - "â  à À æ Æ ä î Î ï" - "ê Ê è È œ Œ ë é É ö" - "show_numbers ÿ ç ù û ü ô Ô BackSpace" - - "show_letters show_eschars preferences space « » Return" + - "show_letters preferences space show_eschars Return" buttons: Shift_L: @@ -44,12 +44,17 @@ buttons: BackSpace: outline: "altline" icon: "edit-clear-symbolic" - action: "erase" + action: erase preferences: action: "show_prefs" - outline: "default" + 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: "altline" @@ -57,7 +62,7 @@ buttons: show_letters: action: set_view: "base" - outline: "altline" + outline: "wide" label: "abc" show_symbols: action: @@ -71,14 +76,11 @@ buttons: unlock_view: "base" outline: "altline" label: "âÂ" - period: - outline: "default" - text: "." space: outline: "spaceline" text: " " Return: - outline: "altline" + outline: "wide" icon: "key-enter" keysym: "Return" colon: From 13ebf9449facfc82a27eb1938ee20ba7c35ca132 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Thu, 23 Apr 2020 14:49:34 +0200 Subject: [PATCH 7/8] keyboards: fr: improve diacritics layout This commit changes the layout of the `eschars` view, in an attempt at making it more logical and optimized to reach more frequent symbols more easily. --- data/keyboards/fr.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/keyboards/fr.yaml b/data/keyboards/fr.yaml index 5788bc4e..ab43116f 100644 --- a/data/keyboards/fr.yaml +++ b/data/keyboards/fr.yaml @@ -28,9 +28,9 @@ views: - "show_numbers_from_symbols \\ / < > = [ ] BackSpace" - "show_letters preferences space show_eschars Return" eschars: - - "â  à À æ Æ ä î Î ï" - - "ê Ê è È œ Œ ë é É ö" - - "show_numbers ÿ ç ù û ü ô Ô BackSpace" + - "à â ç é è ê î ô ù û" + - "À Â Ç É È Ê Î Ô Ù Û" + - "show_numbers_from_symbols æ œ ä ë ï ö ü BackSpace" - "show_letters preferences space show_eschars Return" buttons: From 2a20bbbf2a77d4206874aaa0be50edad97fec9e2 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Mon, 27 Apr 2020 09:51:40 +0200 Subject: [PATCH 8/8] tests: add french layout --- tests/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/meson.build b/tests/meson.build index 179cb52d..977acdaf 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -52,6 +52,7 @@ foreach layout : [ 'de', 'de_wide', 'es', 'fi', + 'fr', 'gr', 'it', 'jp+kana','jp+kana_wide',