From 35ad61890e6f4961e61d0e26f58cd663754139ea Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Wed, 16 Oct 2019 10:32:26 +0000 Subject: [PATCH] layouts: Add us_wide --- data/keyboards/us_wide.yaml | 85 +++++++++++++++++++++++++++++++++++++ src/resources.rs | 1 + tests/meson.build | 11 ++++- 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 data/keyboards/us_wide.yaml diff --git a/data/keyboards/us_wide.yaml b/data/keyboards/us_wide.yaml new file mode 100644 index 00000000..67bdc189 --- /dev/null +++ b/data/keyboards/us_wide.yaml @@ -0,0 +1,85 @@ +--- +bounds: { x: 0, y: 1, width: 540, height: 168 } + +outlines: + default: + bounds: { x: 0, y: 0, width: 54, height: 42 } + altline: + bounds: { x: 0, y: 0, width: 73, height: 42 } + wide: + bounds: { x: 0, y: 0, width: 108, height: 42 } + spaceline: + bounds: { x: 0, y: 0, width: 216, height: 42 } + special: + bounds: { x: 0, y: 0, width: 54, height: 42 } + +views: + base: + - "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 preferences space period 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 preferences space period Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # $ % & - _ + ( )" + - "show_symbols , \" ' colon ; ! ? BackSpace" + - "show_letters preferences space period Return" + symbols: + - "~ ` | · √ π τ ÷ × ¶" + - "© ® £ € ¥ ^ ° * { }" + - "show_numbers_from_symbols \\ / < > = [ ] BackSpace" + - "show_letters preferences space 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" + 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: "altline" + label: "123" + show_letters: + action: + set_view: "base" + outline: "wide" + label: "ABC" + show_symbols: + action: + set_view: "symbols" + outline: "altline" + label: "*/=" + period: + outline: "special" + label: "." + space: + outline: "spaceline" + label: " " + Return: + outline: "wide" + icon: "key-enter" + colon: + label: ":" + "\"": + keysym: "quotedbl" diff --git a/src/resources.rs b/src/resources.rs index df9a14ca..dfb27863 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -5,6 +5,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[ ("us", include_str!("../data/keyboards/us.yaml")), + ("us_wide", include_str!("../data/keyboards/us_wide.yaml")), ("de", include_str!("../data/keyboards/de.yaml")), ("el", include_str!("../data/keyboards/el.yaml")), ("es", include_str!("../data/keyboards/es.yaml")), diff --git a/tests/meson.build b/tests/meson.build index b30cefb8..2e3074b4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -47,7 +47,16 @@ endforeach # The layout test is in the examples directory # due to the way Cargo builds executables # and the need to call it manually -foreach layout : ['us', 'de', 'el', 'es', 'it', 'ja+kana', 'nb', 'number'] +foreach layout : [ + 'us', 'us_wide', + 'de', + 'el', + 'es', + 'it', + 'ja+kana', + 'nb', + 'number', +] test( 'test_layout_' + layout, cargo_script,