From 0b5aa1ba7ca9ee82ac4fd6dfa7076913b443209c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20M=C3=BCller?= Date: Thu, 24 Oct 2019 18:03:23 +0000 Subject: [PATCH] layouts: Add German keyboard layout --- data/keyboards/de.yaml | 95 ++++++++++++++++++++++++++++++++++++++++++ src/resources.rs | 1 + tests/meson.build | 2 +- 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 data/keyboards/de.yaml diff --git a/data/keyboards/de.yaml b/data/keyboards/de.yaml new file mode 100644 index 00000000..81b4d2de --- /dev/null +++ b/data/keyboards/de.yaml @@ -0,0 +1,95 @@ +# German layout by Mark Müller +# Version 2019101900 +--- +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: 35.33, 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_dechars preferences space , period 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_dechars preferences space ! ? Return" + numbers: + - "1 2 3 4 5 6 7 8 9 0" + - "@ # € % & - _ + ( )" + - "show_symbols , \" ' colon = < > BackSpace" + - "show_letters show_dechars preferences space , period Return" + symbols: + - "~ ` ´ | · √ µ ÷ × ¶" + - "© ® £ $ ¥ ^ ° * { }" + - "show_numbers \\ / § π τ [ ] BackSpace" + - "show_letters show_dechars preferences space , period Return" + dechars: + - "ä è é ö ü Ä È É Ö Ü" + - "à â ê î ô À Â È Î Ô" + - "show_numbers « » ç Ç æ œ ß BackSpace" + - "show_letters show_dechars 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" + 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_dechars: + action: + locking: + lock_view: "dechars" + unlock_view: "base" + outline: "altline" + label: "äÄ" + + period: + outline: "default" + label: "." + space: + outline: "spaceline" + label: " " + Return: + outline: "altline" + icon: "key-enter" + colon: + label: ":" + "\"": + keysym: "quotedbl" diff --git a/src/resources.rs b/src/resources.rs index 66721579..5d645a49 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")), + ("de", include_str!("../data/keyboards/de.yaml")), ("el", include_str!("../data/keyboards/el.yaml")), ("es", include_str!("../data/keyboards/es.yaml")), ("it", include_str!("../data/keyboards/it.yaml")), diff --git a/tests/meson.build b/tests/meson.build index a5b4def0..3cfd16e1 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -47,7 +47,7 @@ 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', 'el', 'es', 'it', 'nb', 'number'] +foreach layout : ['us', 'de', 'el', 'es', 'it', 'nb', 'number'] test( 'test_layout_' + layout, cargo_script,