From c87b61d0650e8297de4fccf5d0d17411f2aca822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Fernando=20St=C3=BCrmer=20da=20Rosa?= Date: Mon, 20 Jul 2020 09:47:19 +0000 Subject: [PATCH] Brazilian Portuguese Keyboard Layout. --- data/keyboards/br.yaml | 78 ++++++++++++++++++++++++++++++++++++++++++ src/resources.rs | 4 ++- tests/meson.build | 1 + 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 data/keyboards/br.yaml diff --git a/data/keyboards/br.yaml b/data/keyboards/br.yaml new file mode 100644 index 00000000..b3ae1ac0 --- /dev/null +++ b/data/keyboards/br.yaml @@ -0,0 +1,78 @@ +--- +outlines: + default: { width: 35.33, height: 52 } + altline: { width: 52.67, height: 52 } + wide: { width: 62, height: 52 } + spaceline: { width: 142, height: 52 } + special: { width: 44, height: 52 } + +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 , 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 ê Ê í Í ó Ó ô Ô" + - "show_letters õ Õ ú Ú ü Ü period BackSpace" + symbols: + - "@ # $ % - + ÷ × = ≠" + - "( ) § & < > / * { }" + - "show_numbers_from_symbols º \" ' colon ; ! ? 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" + action: erase + preferences: + action: show_prefs + outline: "special" + icon: "keyboard-mode-symbolic" + show_numbers: + action: + set_view: "numbers" + outline: "wide" + label: "1ã" + show_numbers_from_symbols: + action: + set_view: "numbers" + outline: "altline" + label: "1ã" + show_letters: + action: + set_view: "base" + outline: "wide" + label: "ABC" + show_symbols: + action: + set_view: "symbols" + outline: "altline" + label: "*/=" + period: + outline: "special" + text: "." + space: + outline: "spaceline" + text: " " + Return: + outline: "wide" + icon: "key-enter" + keysym: "Return" + colon: + text: ":" diff --git a/src/resources.rs b/src/resources.rs index 109226bd..171a4159 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -11,9 +11,11 @@ use std::iter::FromIterator; // and what a convenience layout. "_wide" is not a layout, // neither is "number" const KEYBOARDS: &[(*const str, *const str)] = &[ - // layouts + // layouts: us must be left as first, as it is the, + // fallback layout. The others should be alphabetical. ("us", include_str!("../data/keyboards/us.yaml")), ("us_wide", include_str!("../data/keyboards/us_wide.yaml")), + ("br", include_str!("../data/keyboards/br.yaml")), ("de", include_str!("../data/keyboards/de.yaml")), ("de_wide", include_str!("../data/keyboards/de_wide.yaml")), ("dk", include_str!("../data/keyboards/dk.yaml")), diff --git a/tests/meson.build b/tests/meson.build index 67b7983b..42525aea 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -49,6 +49,7 @@ endforeach # and the need to call it manually foreach layout : [ 'us', 'us_wide', + 'br', 'de', 'de_wide', 'dk', 'es',