From 0e533c5e944a112ae523884defa5da206ecd07d3 Mon Sep 17 00:00:00 2001 From: Wannaphong Phatthiyaphaibun Date: Sat, 31 Oct 2020 18:55:32 +0000 Subject: [PATCH 1/4] Add thai keyboard --- data/keyboards/th.yaml | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 data/keyboards/th.yaml diff --git a/data/keyboards/th.yaml b/data/keyboards/th.yaml new file mode 100644 index 00000000..beca660c --- /dev/null +++ b/data/keyboards/th.yaml @@ -0,0 +1,80 @@ +--- +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: + - "ๅ / _ ภ ถ ุ ึ ค ต จ ข ช" + - "ๆ ไ ำ พ ะ ั ี ร น ย บ ล" + - "ฟ ห ก ด เ ้ ่ า ส ว ง ฃ" + - "Shift_L ผ ป แ อ ิ ื ท ม ใ ฝ BackSpace" + - "show_numbers preferences space period Return" + upper: + - "+ ๑ ๒ ๓ ๔ ู ฿ ๕ ๖ ๗ ๘ ๙" + - "๐ " ฎ ฑ ธ ํ ๊ ณ ฯ ญ ฐ ," + - "ฤ ฆ ฏ โ ฌ ็ ๋ ษ ศ ซ . ฅ" + - "Shift_L ( ) ฉ ฮ ฺ ์ ? ฒ ฬ ฦ 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" + action: erase + 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: "กขค" + 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: ":" From 81fb7e0df3f09bea09ca1575c51e0ec855cc25b7 Mon Sep 17 00:00:00 2001 From: Wannaphong Phatthiyaphaibun Date: Sun, 1 Nov 2020 09:42:27 +0000 Subject: [PATCH 2/4] Update resources.rs --- src/resources.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/resources.rs b/src/resources.rs index 2d21595b..d94b9cb5 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -36,6 +36,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[ ("pl_wide", include_str!("../data/keyboards/pl_wide.yaml")), ("ru", include_str!("../data/keyboards/ru.yaml")), ("se", include_str!("../data/keyboards/se.yaml")), + ("th", include_str!("../data/keyboards/th.yaml")), ("ua", include_str!("../data/keyboards/ua.yaml")), // layout+overlay ("terminal", include_str!("../data/keyboards/terminal.yaml")), From bd6ab663c0550c6805b56ae7246ad59dc6acffdf Mon Sep 17 00:00:00 2001 From: Wannaphong Phatthiyaphaibun Date: Sun, 22 Nov 2020 19:14:21 +0000 Subject: [PATCH 3/4] Update meson.build --- tests/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/meson.build b/tests/meson.build index 96229297..9850a957 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -66,6 +66,7 @@ foreach layout : [ 'ru', 'se', 'ua', + 'th', 'terminal', 'terminal_wide', 'emoji', From c731124f7b64ae38313c9e488f87b0541d2d1210 Mon Sep 17 00:00:00 2001 From: Wannaphong Phatthiyaphaibun Date: Mon, 23 Nov 2020 03:43:49 +0000 Subject: [PATCH 4/4] escape " on thai keyboard --- data/keyboards/th.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/keyboards/th.yaml b/data/keyboards/th.yaml index beca660c..161fe273 100644 --- a/data/keyboards/th.yaml +++ b/data/keyboards/th.yaml @@ -15,7 +15,7 @@ views: - "show_numbers preferences space period Return" upper: - "+ ๑ ๒ ๓ ๔ ู ฿ ๕ ๖ ๗ ๘ ๙" - - "๐ " ฎ ฑ ธ ํ ๊ ณ ฯ ญ ฐ ," + - "๐ \" ฎ ฑ ธ ํ ๊ ณ ฯ ญ ฐ ," - "ฤ ฆ ฏ โ ฌ ็ ๋ ษ ศ ซ . ฅ" - "Shift_L ( ) ฉ ฮ ฺ ์ ? ฒ ฬ ฦ BackSpace" - "show_numbers preferences space period Return"