Compare commits
	
		
			55 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| fefebf7f6e | |||
| 21c3a74019 | |||
| 47a483da2a | |||
| 0c179560b3 | |||
| 6e7c0e6f67 | |||
| 0e83697b61 | |||
| 66c3926eb2 | |||
| 1856e7023d | |||
| 976f0a6e37 | |||
| 4d24af4e1a | |||
| 422d06d582 | |||
| 4890c86b4e | |||
| b72c6b53e4 | |||
| 701168c32b | |||
| 658df98e18 | |||
| 6f7252ec7c | |||
| 558a2568e3 | |||
| 9517c347b6 | |||
| 8dd92c81e7 | |||
| 03ccfe77ad | |||
| c103b84fa6 | |||
| 9a72db2fcc | |||
| 61a84c47f1 | |||
| a9ecc13185 | |||
| 7143fb2497 | |||
| dfee95430d | |||
| fcd0eaddf2 | |||
| ba2e191918 | |||
| cc4f14e8c6 | |||
| 103e64b96c | |||
| 2796362d34 | |||
| af00d74f71 | |||
| 02d579d757 | |||
| 01d06d0f5f | |||
| 1d1c98c27a | |||
| 696d77293e | |||
| 225c204e37 | |||
| c3b428e517 | |||
| 1fe6d65525 | |||
| 39a3c40d67 | |||
| 963f52bbc3 | |||
| 9dcc4c9868 | |||
| df8e885983 | |||
| 540c4d9c05 | |||
| 42483234e3 | |||
| c9f9a3b577 | |||
| 81041b8035 | |||
| c731124f7b | |||
| fca8984225 | |||
| bd6ab663c0 | |||
| 17db3db296 | |||
| cf09d1b3bc | |||
| 81fb7e0df3 | |||
| 0e533c5e94 | |||
| 5d81cf78f8 | 
							
								
								
									
										44
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										44
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							@ -59,9 +59,9 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "cc"
 | 
			
		||||
version = "1.0.65"
 | 
			
		||||
version = "1.0.66"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15"
 | 
			
		||||
checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "clap"
 | 
			
		||||
@ -76,9 +76,9 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "dtoa"
 | 
			
		||||
version = "0.4.6"
 | 
			
		||||
version = "0.4.7"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b"
 | 
			
		||||
checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "fragile"
 | 
			
		||||
@ -265,15 +265,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "libc"
 | 
			
		||||
version = "0.2.80"
 | 
			
		||||
version = "0.2.82"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614"
 | 
			
		||||
checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "linked-hash-map"
 | 
			
		||||
version = "0.5.3"
 | 
			
		||||
version = "0.5.4"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a"
 | 
			
		||||
checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "maplit"
 | 
			
		||||
@ -335,9 +335,9 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "quote"
 | 
			
		||||
version = "1.0.7"
 | 
			
		||||
version = "1.0.8"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
 | 
			
		||||
checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "proc-macro2",
 | 
			
		||||
]
 | 
			
		||||
@ -353,9 +353,9 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "regex-syntax"
 | 
			
		||||
version = "0.6.21"
 | 
			
		||||
version = "0.6.22"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189"
 | 
			
		||||
checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "rs"
 | 
			
		||||
@ -380,18 +380,18 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "serde"
 | 
			
		||||
version = "1.0.117"
 | 
			
		||||
version = "1.0.118"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a"
 | 
			
		||||
checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "serde_derive",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "serde_derive"
 | 
			
		||||
version = "1.0.117"
 | 
			
		||||
version = "1.0.118"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e"
 | 
			
		||||
checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "proc-macro2",
 | 
			
		||||
 "quote",
 | 
			
		||||
@ -400,9 +400,9 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "serde_yaml"
 | 
			
		||||
version = "0.8.14"
 | 
			
		||||
version = "0.8.15"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "f7baae0a99f1a324984bcdc5f0718384c1f69775f1c7eec8b859b71b443e3fd7"
 | 
			
		||||
checksum = "971be8f6e4d4a47163b405a3df70d14359186f9ab0f3a3ec37df144ca1ce089f"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "dtoa",
 | 
			
		||||
 "linked-hash-map",
 | 
			
		||||
@ -412,9 +412,9 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "syn"
 | 
			
		||||
version = "1.0.48"
 | 
			
		||||
version = "1.0.58"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac"
 | 
			
		||||
checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "proc-macro2",
 | 
			
		||||
 "quote",
 | 
			
		||||
@ -476,9 +476,9 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "yaml-rust"
 | 
			
		||||
version = "0.4.4"
 | 
			
		||||
version = "0.4.5"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d"
 | 
			
		||||
checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "linked-hash-map",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										49
									
								
								cargo_build.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								cargo_build.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,49 @@
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
 | 
			
		||||
"""This script manages Cargo builds
 | 
			
		||||
while keeping the artifact directory within the build tree
 | 
			
		||||
instead of the source tree.
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
from pathlib import Path
 | 
			
		||||
import shlex
 | 
			
		||||
import subprocess
 | 
			
		||||
import sys
 | 
			
		||||
 | 
			
		||||
source_dir = Path(__file__).absolute().parent
 | 
			
		||||
 | 
			
		||||
args = sys.argv[1:]
 | 
			
		||||
binary_dir = "debug"
 | 
			
		||||
 | 
			
		||||
if '--release' in args:
 | 
			
		||||
    binary_dir = "release"
 | 
			
		||||
 | 
			
		||||
# The file produced by Cargo will have a special name
 | 
			
		||||
try:
 | 
			
		||||
    i = args.index('--rename')
 | 
			
		||||
except ValueError:
 | 
			
		||||
    filename = None
 | 
			
		||||
else:
 | 
			
		||||
    args.pop(i)
 | 
			
		||||
    filename = args.pop(i)
 | 
			
		||||
 | 
			
		||||
# The target destination of the produced file is a positional argument
 | 
			
		||||
out_path = [arg for arg in args if not arg.startswith('--')]
 | 
			
		||||
if out_path:
 | 
			
		||||
    out_path = out_path[0]
 | 
			
		||||
    i = args.index(out_path)
 | 
			
		||||
    args.pop(i)    
 | 
			
		||||
 | 
			
		||||
subprocess.run(['sh', "{}/cargo.sh".format(shlex.quote(source_dir.as_posix())), 'build']
 | 
			
		||||
    + args,
 | 
			
		||||
    check=True)
 | 
			
		||||
 | 
			
		||||
if out_path:
 | 
			
		||||
    out_path = Path(out_path).absolute()
 | 
			
		||||
    out_basename = out_path.name
 | 
			
		||||
    filename = filename or out_basename
 | 
			
		||||
    subprocess.run(['cp', '-a',
 | 
			
		||||
        './{}/{}'.format(shlex.quote(binary_dir), shlex.quote(filename)),
 | 
			
		||||
        out_path],
 | 
			
		||||
        check=True)
 | 
			
		||||
 | 
			
		||||
@ -1,34 +0,0 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
# This script manages Cargo builds
 | 
			
		||||
# while keeping the artifact directory within the build tree
 | 
			
		||||
# instead of the source tree
 | 
			
		||||
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
SCRIPT_PATH="$(realpath "$0")"
 | 
			
		||||
SOURCE_DIR="$(dirname "$SCRIPT_PATH")"
 | 
			
		||||
 | 
			
		||||
RELEASE=""
 | 
			
		||||
BINARY_DIR="debug"
 | 
			
		||||
if [ "${1}" = "--release" ]; then
 | 
			
		||||
    shift
 | 
			
		||||
    BINARY_DIR="release"
 | 
			
		||||
    RELEASE="--release"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "${1}" = "--rename" ]; then
 | 
			
		||||
    shift
 | 
			
		||||
    FILENAME="${1}"
 | 
			
		||||
    shift
 | 
			
		||||
fi
 | 
			
		||||
OUT_PATH="$(realpath "${1}")"
 | 
			
		||||
shift
 | 
			
		||||
OUT_BASENAME="$(basename "${OUT_PATH}")"
 | 
			
		||||
FILENAME="${FILENAME:-"${OUT_BASENAME}"}"
 | 
			
		||||
 | 
			
		||||
sh "$SOURCE_DIR"/cargo.sh build $RELEASE "$@"
 | 
			
		||||
 | 
			
		||||
if [ -n "${OUT_PATH}" ]; then
 | 
			
		||||
    cp -a ./"${BINARY_DIR}"/"${FILENAME}" "${OUT_PATH}"
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										78
									
								
								data/keyboards/bg.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								data/keyboards/bg.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,78 @@
 | 
			
		||||
---
 | 
			
		||||
outlines:
 | 
			
		||||
    default: { width: 32.72, height: 52 }
 | 
			
		||||
    altline: { width: 47, height: 52 }
 | 
			
		||||
    wide: { width: 49.09, height: 52 }
 | 
			
		||||
    spaceline: { width: 185, height: 52 }
 | 
			
		||||
    special: { width: 44, height: 52 }
 | 
			
		||||
 | 
			
		||||
views:
 | 
			
		||||
    base:
 | 
			
		||||
        - "я в е р т ъ у и о п ю"
 | 
			
		||||
        - "а с д ф г х й к л ш щ"
 | 
			
		||||
        - "Shift_L з ь ц ж б н м ч BackSpace"
 | 
			
		||||
        - "show_numbers preferences         space   .    Return"
 | 
			
		||||
    upper:
 | 
			
		||||
        - "Я В Е Р Т Ъ У И О П Ю"
 | 
			
		||||
        - "А С Д Ф Г Х Й К Л Ш Щ"
 | 
			
		||||
        - "Shift_L З Ь Ц Ж Б Н М Ч BackSpace"
 | 
			
		||||
        - "show_numbers preferences         space   ,    Return"
 | 
			
		||||
    numbers:
 | 
			
		||||
        - "1 2 3 4 5 6 7 8 9 0"
 | 
			
		||||
        - "@ # € % & - _ + ( )"
 | 
			
		||||
        - "show_symbols   , \" ' colon ; ! ?  BackSpace"
 | 
			
		||||
        - "show_letters preferences         space        Return"
 | 
			
		||||
    symbols:
 | 
			
		||||
        - "~ ` | · √ π τ ÷ × ¶"
 | 
			
		||||
        - "© ® £ $ ¥ ^ ° * { }"
 | 
			
		||||
        - "show_numbers_from_symbols   \\ / < > = [ ]  BackSpace"
 | 
			
		||||
        - "show_letters 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"
 | 
			
		||||
        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: "abc"
 | 
			
		||||
    show_symbols:
 | 
			
		||||
        action:
 | 
			
		||||
            set_view: "symbols"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        label: "*/="
 | 
			
		||||
    space:
 | 
			
		||||
        outline: "spaceline"
 | 
			
		||||
        text: " "
 | 
			
		||||
    Return:
 | 
			
		||||
        outline: "wide"
 | 
			
		||||
        icon: "key-enter"
 | 
			
		||||
        keysym: "Return"
 | 
			
		||||
    colon:
 | 
			
		||||
        text: ":"
 | 
			
		||||
    "\"":
 | 
			
		||||
        keysym: "quotedbl"
 | 
			
		||||
							
								
								
									
										106
									
								
								data/keyboards/cz+qwerty.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								data/keyboards/cz+qwerty.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,106 @@
 | 
			
		||||
---
 | 
			
		||||
outlines:
 | 
			
		||||
    default: { width: 35.33, height: 52 }
 | 
			
		||||
    altline: { width: 52.67, height: 52 }
 | 
			
		||||
    wide: { width: 52.67, height: 52 }
 | 
			
		||||
    spaceline: { width: 106, height: 52 }
 | 
			
		||||
    special: { width: 35.33, 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 show_accents    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 show_upper_accents    space    ! ? Return"
 | 
			
		||||
    numbers:
 | 
			
		||||
        - "1 2 3 4 5 6 7 8 9 0"
 | 
			
		||||
        - "@ # $ % & - _ + ( )"
 | 
			
		||||
        - "show_symbols    , \" ' colon ; ! ?    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    symbols:
 | 
			
		||||
        - "~ ` | · √ π τ ÷ × ¶"
 | 
			
		||||
        - "© ® £ € ¥ ^ ° * { }"
 | 
			
		||||
        - "show_numbers_from_symbols    \\ / < > = [ ]    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    accents:
 | 
			
		||||
        - "ä ě é ř ť ý ů í ó ö"
 | 
			
		||||
        - "á š ď ë ŕ ú ü ô ľ"
 | 
			
		||||
        - "accents_Shift_L    ž ß č ç ñ ň ĺ    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    upper_accents:
 | 
			
		||||
        - "Ä Ě É Ř Ť Ý Ů Í Ó Ö"
 | 
			
		||||
        - "Á Š Ď Ë Ŕ Ú Ü Ô Ľ"
 | 
			
		||||
        - "accents_Shift_L    Ž ẞ Č Ç Ñ Ň Ĺ    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_upper_accents    space    , . Return"
 | 
			
		||||
 | 
			
		||||
buttons:
 | 
			
		||||
    Shift_L:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        icon: "key-shift"
 | 
			
		||||
    accents_Shift_L:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper_accents"
 | 
			
		||||
                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: "abc"
 | 
			
		||||
    show_symbols:
 | 
			
		||||
        action:
 | 
			
		||||
            set_view: "symbols"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        label: "*/="
 | 
			
		||||
    show_accents:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "accents"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        label: "á"
 | 
			
		||||
    show_upper_accents:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper_accents"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        label: "Á"
 | 
			
		||||
    space:
 | 
			
		||||
        outline: "spaceline"
 | 
			
		||||
        text: " "
 | 
			
		||||
    Return:
 | 
			
		||||
        outline: "wide"
 | 
			
		||||
        icon: "key-enter"
 | 
			
		||||
        keysym: "Return"
 | 
			
		||||
    colon:
 | 
			
		||||
        text: ":"
 | 
			
		||||
							
								
								
									
										106
									
								
								data/keyboards/cz+qwerty_wide.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								data/keyboards/cz+qwerty_wide.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,106 @@
 | 
			
		||||
---
 | 
			
		||||
outlines:
 | 
			
		||||
    default: { width: 54, height: 42 }
 | 
			
		||||
    altline: { width: 81, height: 42 }
 | 
			
		||||
    wide: { width: 81, height: 42 }
 | 
			
		||||
    spaceline: { width: 162, height: 42 }
 | 
			
		||||
    special: { 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 show_accents    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 show_upper_accents    space    ! ? Return"
 | 
			
		||||
    numbers:
 | 
			
		||||
        - "1 2 3 4 5 6 7 8 9 0"
 | 
			
		||||
        - "@ # $ % & - _ + ( )"
 | 
			
		||||
        - "show_symbols    , \" ' colon ; ! ?    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    symbols:
 | 
			
		||||
        - "~ ` | · √ π τ ÷ × ¶"
 | 
			
		||||
        - "© ® £ € ¥ ^ ° * { }"
 | 
			
		||||
        - "show_numbers_from_symbols    \\ / < > = [ ]    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    accents:
 | 
			
		||||
        - "ä ě é ř ť ý ů í ó ö"
 | 
			
		||||
        - "á š ď ë ŕ ú ü ô ľ"
 | 
			
		||||
        - "accents_Shift_L    ž ß č ç ñ ň ĺ    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    upper_accents:
 | 
			
		||||
        - "Ä Ě É Ř Ť Ý Ů Í Ó Ö"
 | 
			
		||||
        - "Á Š Ď Ë Ŕ Ú Ü Ô Ľ"
 | 
			
		||||
        - "accents_Shift_L    Ž ẞ Č Ç Ñ Ň Ĺ    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_upper_accents    space    , . Return"
 | 
			
		||||
 | 
			
		||||
buttons:
 | 
			
		||||
    Shift_L:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        icon: "key-shift"
 | 
			
		||||
    accents_Shift_L:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper_accents"
 | 
			
		||||
                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: "abc"
 | 
			
		||||
    show_symbols:
 | 
			
		||||
        action:
 | 
			
		||||
            set_view: "symbols"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        label: "*/="
 | 
			
		||||
    show_accents:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "accents"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        label: "á"
 | 
			
		||||
    show_upper_accents:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper_accents"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        label: "Á"
 | 
			
		||||
    space:
 | 
			
		||||
        outline: "spaceline"
 | 
			
		||||
        text: " "
 | 
			
		||||
    Return:
 | 
			
		||||
        outline: "wide"
 | 
			
		||||
        icon: "key-enter"
 | 
			
		||||
        keysym: "Return"
 | 
			
		||||
    colon:
 | 
			
		||||
        text: ":"
 | 
			
		||||
							
								
								
									
										106
									
								
								data/keyboards/cz.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								data/keyboards/cz.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,106 @@
 | 
			
		||||
---
 | 
			
		||||
outlines:
 | 
			
		||||
    default: { width: 35.33, height: 52 }
 | 
			
		||||
    altline: { width: 52.67, height: 52 }
 | 
			
		||||
    wide: { width: 52.67, height: 52 }
 | 
			
		||||
    spaceline: { width: 106, height: 52 }
 | 
			
		||||
    special: { 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 preferences show_accents    space    , . 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 preferences show_upper_accents    space    ! ? Return"
 | 
			
		||||
    numbers:
 | 
			
		||||
        - "1 2 3 4 5 6 7 8 9 0"
 | 
			
		||||
        - "@ # $ % & - _ + ( )"
 | 
			
		||||
        - "show_symbols    , \" ' colon ; ! ?    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    symbols:
 | 
			
		||||
        - "~ ` | · √ π τ ÷ × ¶"
 | 
			
		||||
        - "© ® £ € ¥ ^ ° * { }"
 | 
			
		||||
        - "show_numbers_from_symbols    \\ / < > = [ ]    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    accents:
 | 
			
		||||
        - "ä ě é ř ť ž ů í ó ö"
 | 
			
		||||
        - "á š ď ë ŕ ú ü ô ľ"
 | 
			
		||||
        - "accents_Shift_L    ý ß č ç ñ ň ĺ    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    upper_accents:
 | 
			
		||||
        - "Ä Ě É Ř Ť Ž Ů Í Ó Ö"
 | 
			
		||||
        - "Á Š Ď Ë Ŕ Ú Ü Ô Ľ"
 | 
			
		||||
        - "accents_Shift_L    Ý ẞ Č Ç Ñ Ň Ĺ    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_upper_accents    space    , . Return"
 | 
			
		||||
 | 
			
		||||
buttons:
 | 
			
		||||
    Shift_L:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        icon: "key-shift"
 | 
			
		||||
    accents_Shift_L:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper_accents"
 | 
			
		||||
                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: "abc"
 | 
			
		||||
    show_symbols:
 | 
			
		||||
        action:
 | 
			
		||||
            set_view: "symbols"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        label: "*/="
 | 
			
		||||
    show_accents:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "accents"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        label: "á"
 | 
			
		||||
    show_upper_accents:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper_accents"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        label: "Á"
 | 
			
		||||
    space:
 | 
			
		||||
        outline: "spaceline"
 | 
			
		||||
        text: " "
 | 
			
		||||
    Return:
 | 
			
		||||
        outline: "wide"
 | 
			
		||||
        icon: "key-enter"
 | 
			
		||||
        keysym: "Return"
 | 
			
		||||
    colon:
 | 
			
		||||
        text: ":"
 | 
			
		||||
							
								
								
									
										106
									
								
								data/keyboards/cz_wide.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								data/keyboards/cz_wide.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,106 @@
 | 
			
		||||
---
 | 
			
		||||
outlines:
 | 
			
		||||
    default: { width: 54, height: 42 }
 | 
			
		||||
    altline: { width: 81, height: 42 }
 | 
			
		||||
    wide: { width: 81, height: 42 }
 | 
			
		||||
    spaceline: { width: 162, height: 42 }
 | 
			
		||||
    special: { width: 54, height: 42 }
 | 
			
		||||
 | 
			
		||||
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 preferences show_accents    space    , . 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 preferences show_upper_accents    space    ! ? Return"
 | 
			
		||||
    numbers:
 | 
			
		||||
        - "1 2 3 4 5 6 7 8 9 0"
 | 
			
		||||
        - "@ # $ % & - _ + ( )"
 | 
			
		||||
        - "show_symbols    , \" ' colon ; ! ?    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    symbols:
 | 
			
		||||
        - "~ ` | · √ π τ ÷ × ¶"
 | 
			
		||||
        - "© ® £ € ¥ ^ ° * { }"
 | 
			
		||||
        - "show_numbers_from_symbols    \\ / < > = [ ]    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    accents:
 | 
			
		||||
        - "ä ě é ř ť ž ů í ó ö"
 | 
			
		||||
        - "á š ď ë ŕ ú ü ô ľ"
 | 
			
		||||
        - "accents_Shift_L    ý ß č ç ñ ň ĺ    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_accents    space    , . Return"
 | 
			
		||||
    upper_accents:
 | 
			
		||||
        - "Ä Ě É Ř Ť Ž Ů Í Ó Ö"
 | 
			
		||||
        - "Á Š Ď Ë Ŕ Ú Ü Ô Ľ"
 | 
			
		||||
        - "accents_Shift_L    Ý ẞ Č Ç Ñ Ň Ĺ    BackSpace"
 | 
			
		||||
        - "show_letters preferences show_upper_accents    space    , . Return"
 | 
			
		||||
 | 
			
		||||
buttons:
 | 
			
		||||
    Shift_L:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        icon: "key-shift"
 | 
			
		||||
    accents_Shift_L:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper_accents"
 | 
			
		||||
                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: "abc"
 | 
			
		||||
    show_symbols:
 | 
			
		||||
        action:
 | 
			
		||||
            set_view: "symbols"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        label: "*/="
 | 
			
		||||
    show_accents:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "accents"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        label: "á"
 | 
			
		||||
    show_upper_accents:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "upper_accents"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        label: "Á"
 | 
			
		||||
    space:
 | 
			
		||||
        outline: "spaceline"
 | 
			
		||||
        text: " "
 | 
			
		||||
    Return:
 | 
			
		||||
        outline: "wide"
 | 
			
		||||
        icon: "key-enter"
 | 
			
		||||
        keysym: "Return"
 | 
			
		||||
    colon:
 | 
			
		||||
        text: ":"
 | 
			
		||||
							
								
								
									
										81
									
								
								data/keyboards/epo.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								data/keyboards/epo.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,81 @@
 | 
			
		||||
---
 | 
			
		||||
outlines:
 | 
			
		||||
    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: 35.33, 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 show_eschars 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 show_eschars preferences         space        ! ? Return"
 | 
			
		||||
    numbers:
 | 
			
		||||
        - "1 2 3 4 5 6 7 8 9 0"
 | 
			
		||||
        - "@ # $ % & - _ + ( )"
 | 
			
		||||
        - "show_symbols   , \" ' : ; ! ?  BackSpace"
 | 
			
		||||
        - "show_letters preferences         space        . Return"
 | 
			
		||||
    symbols:
 | 
			
		||||
        - "~ ` | · √ π τ ÷ × ¶"
 | 
			
		||||
        - "© ® £ € ¥ ^ ° * { }"
 | 
			
		||||
        - "show_numbers_from_symbols   \\ / < > = [ ]  BackSpace"
 | 
			
		||||
        - "show_letters preferences         space        . 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"
 | 
			
		||||
        action: "erase"
 | 
			
		||||
    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_eschars:
 | 
			
		||||
        action:
 | 
			
		||||
            locking:
 | 
			
		||||
                lock_view: "eschars"
 | 
			
		||||
                unlock_view: "base"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        label: "ŭŜ"
 | 
			
		||||
    space:
 | 
			
		||||
        outline: "spaceline"
 | 
			
		||||
        label: " "
 | 
			
		||||
        text: " "
 | 
			
		||||
    Return:
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        icon: "key-enter"
 | 
			
		||||
        keysym: "Return"
 | 
			
		||||
							
								
								
									
										78
									
								
								data/keyboards/ir.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								data/keyboards/ir.yaml
									
									
									
									
									
										Normal file
									
								
							@ -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:
 | 
			
		||||
        - "ض ص ق ف غ ع ه خ ح ج"
 | 
			
		||||
        - "ش س ی ب ل ا ت ن م ک"
 | 
			
		||||
        - "Shift_L   ظ ط ز ر ذ د و  BackSpace"
 | 
			
		||||
        - "show_numbers preferences         space        period Return"
 | 
			
		||||
    upper:
 | 
			
		||||
        - "پ { } [ ] ّ   َ   ِ  ُ چ"
 | 
			
		||||
        - "ؤ ئ ي إ أ آ ة » « گ"
 | 
			
		||||
        - "Shift_L  ك ٓ ژ ء > < ؟  BackSpace"
 | 
			
		||||
        - "show_numbers preferences         space        period Return"
 | 
			
		||||
    numbers:
 | 
			
		||||
        - "۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰"
 | 
			
		||||
        - "@ # ﷼ % & - _ + ( )"
 | 
			
		||||
        - "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: "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: ":"
 | 
			
		||||
							
								
								
									
										78
									
								
								data/keyboards/ir_wide.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								data/keyboards/ir_wide.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,78 @@
 | 
			
		||||
---
 | 
			
		||||
outlines:
 | 
			
		||||
    default: { width: 54, height: 42 }
 | 
			
		||||
    altline: { width: 81, height: 42 }
 | 
			
		||||
    wide: { width: 108, height: 42 }
 | 
			
		||||
    spaceline: { width: 216, height: 42 }
 | 
			
		||||
    special: { width: 54, height: 42 }
 | 
			
		||||
 | 
			
		||||
views:
 | 
			
		||||
    base:
 | 
			
		||||
        - "ض ص ق ف غ ع ه خ ح ج"
 | 
			
		||||
        - "ش س ی ب ل ا ت ن م ک"
 | 
			
		||||
        - "Shift_L   ظ ط ز ر ذ د و  BackSpace"
 | 
			
		||||
        - "show_numbers preferences         space        period Return"
 | 
			
		||||
    upper:
 | 
			
		||||
        - "پ { } [ ] ّ   َ   ِ  ُ چ"
 | 
			
		||||
        - "ؤ ئ ي إ أ آ ة » « گ"
 | 
			
		||||
        - "Shift_L  ك ٓ ژ ء > < ؟  BackSpace"
 | 
			
		||||
        - "show_numbers preferences         space        period Return"
 | 
			
		||||
    numbers:
 | 
			
		||||
        - "۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰"
 | 
			
		||||
        - "@ # ﷼ % & - _ + ( )"
 | 
			
		||||
        - "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: "ABC"
 | 
			
		||||
    show_symbols:
 | 
			
		||||
        action:
 | 
			
		||||
            set_view: "symbols"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        label: "*/="
 | 
			
		||||
    ".":
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        text: "."
 | 
			
		||||
    space:
 | 
			
		||||
        outline: "spaceline"
 | 
			
		||||
        text: " "
 | 
			
		||||
    Return:
 | 
			
		||||
        outline: "wide"
 | 
			
		||||
        icon: "key-enter"
 | 
			
		||||
        keysym: "Return"
 | 
			
		||||
    colon:
 | 
			
		||||
        text: ":"
 | 
			
		||||
@ -2,9 +2,9 @@
 | 
			
		||||
outlines:
 | 
			
		||||
    default: { width: 32, height: 52 }
 | 
			
		||||
    altline: { width: 48.39024, height: 52 }
 | 
			
		||||
    wide: { width: 62, height: 52 }
 | 
			
		||||
    outline7: { width: 88.97561, height: 52 }
 | 
			
		||||
    spaceline: { width: 150.5853, height: 52 }
 | 
			
		||||
    wide: { width: 64, height: 52 }
 | 
			
		||||
    spaceline: { width: 142, height: 52 }
 | 
			
		||||
    special: { width: 44, height: 52 }
 | 
			
		||||
 | 
			
		||||
views:
 | 
			
		||||
    base:
 | 
			
		||||
@ -25,7 +25,7 @@ views:
 | 
			
		||||
    symbols:
 | 
			
		||||
        - "~ ` | U00B7 squareroot Greek_pi Greek_tau division multiply paragraph"
 | 
			
		||||
        - "copyright U00AE U00A3 EuroSign U00A5 asciicircum degree * { }"
 | 
			
		||||
        - "show_numbers   \\ / < > = [ ]  BackSpace"
 | 
			
		||||
        - "show_numbers_from_symbols   \\ / < > = [ ]  BackSpace"
 | 
			
		||||
        - "show_letters preferences         space        .    Return"
 | 
			
		||||
 | 
			
		||||
buttons:
 | 
			
		||||
@ -42,17 +42,22 @@ buttons:
 | 
			
		||||
        action: erase
 | 
			
		||||
    preferences:
 | 
			
		||||
        action: "show_prefs"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        outline: "special"
 | 
			
		||||
        icon: "keyboard-mode-symbolic"
 | 
			
		||||
    show_numbers:
 | 
			
		||||
        action:
 | 
			
		||||
            set_view: "numbers"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        outline: "wide"
 | 
			
		||||
        label: "123"
 | 
			
		||||
    show_numbers_from_symbols:
 | 
			
		||||
        action:
 | 
			
		||||
            set_view: "numbers"
 | 
			
		||||
        outline: altline
 | 
			
		||||
        label: "123"
 | 
			
		||||
    show_letters:
 | 
			
		||||
        action:
 | 
			
		||||
            set_view: "base"
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        outline: "wide"
 | 
			
		||||
        label: "ABC"
 | 
			
		||||
    show_symbols:
 | 
			
		||||
        action:
 | 
			
		||||
@ -60,7 +65,7 @@ buttons:
 | 
			
		||||
        outline: "altline"
 | 
			
		||||
        label: "*/="
 | 
			
		||||
    ".":
 | 
			
		||||
        outline: altline
 | 
			
		||||
        outline: "special"
 | 
			
		||||
    space:
 | 
			
		||||
        outline: spaceline
 | 
			
		||||
        text: " "
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										80
									
								
								data/keyboards/th.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								data/keyboards/th.yaml
									
									
									
									
									
										Normal file
									
								
							@ -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: ":"
 | 
			
		||||
							
								
								
									
										78
									
								
								data/keyboards/us+colemak.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								data/keyboards/us+colemak.yaml
									
									
									
									
									
										Normal file
									
								
							@ -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 f p g j l u y"
 | 
			
		||||
        - "a r s t d h n e i o"
 | 
			
		||||
        - "Shift_L   z x c v b k m  BackSpace"
 | 
			
		||||
        - "show_numbers preferences         space        period Return"
 | 
			
		||||
    upper:
 | 
			
		||||
        - "Q W F P G J L U Y"
 | 
			
		||||
        - "A R S T D H N E I O"
 | 
			
		||||
        - "Shift_L   Z X C V B K 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"
 | 
			
		||||
        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: "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: ":"
 | 
			
		||||
							
								
								
									
										13
									
								
								data/langs/bg-BG.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								data/langs/bg-BG.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
bg Български
 | 
			
		||||
de Немски
 | 
			
		||||
es Испански
 | 
			
		||||
emoji Емоджи
 | 
			
		||||
fi Френски
 | 
			
		||||
gr Гръцки
 | 
			
		||||
it Италянски
 | 
			
		||||
no Норевежки
 | 
			
		||||
pl Полски
 | 
			
		||||
ru Руски
 | 
			
		||||
se Шведски
 | 
			
		||||
terminal Терминал
 | 
			
		||||
us Английски (САЩ)
 | 
			
		||||
							
								
								
									
										21
									
								
								data/langs/cs-CZ.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								data/langs/cs-CZ.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
			
		||||
be Belgická
 | 
			
		||||
cz Česká
 | 
			
		||||
cz+qwerty Česká (QWERTY)
 | 
			
		||||
de Německá
 | 
			
		||||
dk Dánská
 | 
			
		||||
emoji Emoji
 | 
			
		||||
es Španělská
 | 
			
		||||
fi Finská
 | 
			
		||||
fr Francouzská
 | 
			
		||||
gr Řecká
 | 
			
		||||
it Italská
 | 
			
		||||
jp Japonská
 | 
			
		||||
jp+kana Japonská (Kana)
 | 
			
		||||
no Norská
 | 
			
		||||
pl Polská
 | 
			
		||||
ru Ruská
 | 
			
		||||
se Švédská
 | 
			
		||||
terminal Terminál
 | 
			
		||||
th Thajská
 | 
			
		||||
ua Ukrajinská
 | 
			
		||||
us Anglická (USA)
 | 
			
		||||
							
								
								
									
										2
									
								
								data/langs/fa-IR.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								data/langs/fa-IR.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
			
		||||
emoji ایموجی
 | 
			
		||||
terminal ترمینال
 | 
			
		||||
							
								
								
									
										60
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										60
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							@ -1,3 +1,63 @@
 | 
			
		||||
squeekboard (1.12.0pureos0~amber0) amber-phone; urgency=medium
 | 
			
		||||
 | 
			
		||||
  [ Dorota Czaplejewicz ]
 | 
			
		||||
  * docs: Correct Cargo update instructions
 | 
			
		||||
  * visibility: Centralize keyboard panel visibility policy and handling
 | 
			
		||||
  * build: Fix release
 | 
			
		||||
  * tests: Prefer the env var for finding test layouts
 | 
			
		||||
  * tests: Explicitly pass source directory to tests
 | 
			
		||||
  * debian: Build reproducibly
 | 
			
		||||
  * tests: Allow legacy mode to have much longer tests.
 | 
			
		||||
  * build: Enable unused warnings in C
 | 
			
		||||
  * build: Enable wformat to remove warnings about missing wformat
 | 
			
		||||
  * build: Fail on any C warnings when strict
 | 
			
		||||
  * data: Made data flow in fallback clearer
 | 
			
		||||
  * data: Flattened layout fallback function
 | 
			
		||||
  * layouts: Use base as fallback for alternative layouts
 | 
			
		||||
  * layouts: Simplify the main flow of source list
 | 
			
		||||
  * tests: Add some description to the list of tested layouts
 | 
			
		||||
  * layout_names: Unmess the list of builtin layouts
 | 
			
		||||
  * dbus: Reset hints if text input missing
 | 
			
		||||
  * visibility: Stop calling GTK functions from the visibility manager
 | 
			
		||||
 | 
			
		||||
  [ Wannaphong Phatthiyaphaibun ]
 | 
			
		||||
  * Add thai keyboard
 | 
			
		||||
  * Update resources.rs
 | 
			
		||||
  * Update meson.build
 | 
			
		||||
  * escape " on thai keyboard
 | 
			
		||||
 | 
			
		||||
  [ clonex10100 ]
 | 
			
		||||
  * Added US Colemak Keyboard Layout
 | 
			
		||||
 | 
			
		||||
  [ Henry-Nicolas Tourneur ]
 | 
			
		||||
  * d/rules: fix an FTBFS on mips64el with GOT > 64kb
 | 
			
		||||
  * d/rules: export RUSTFLAGS only on architecture that needs it
 | 
			
		||||
  * d/rules: export RUSTFLAGS only on architecture that needs it
 | 
			
		||||
 | 
			
		||||
  [ Jiří Stránský ]
 | 
			
		||||
  * Add Czech keyboard layouts
 | 
			
		||||
 | 
			
		||||
  [ Stefan Grotz ]
 | 
			
		||||
  * Esperanto keyboard
 | 
			
		||||
 | 
			
		||||
  [ Vladimir ]
 | 
			
		||||
  * Bulgarian language keyboard layout
 | 
			
		||||
 | 
			
		||||
  [ Vladimir Stoilov ]
 | 
			
		||||
  * bulgarian add translation and to needed lists
 | 
			
		||||
  * Fix bulgarian layout size
 | 
			
		||||
 | 
			
		||||
  [ Andreas Rönnquist ]
 | 
			
		||||
  * no: Use wide button switching between numbers, symbols and base
 | 
			
		||||
 | 
			
		||||
  [ jranaraki ]
 | 
			
		||||
  * Farsi/Persian keyboard layout
 | 
			
		||||
  * Farsi/Persian keyboard layout
 | 
			
		||||
  * Added requirements to resources.rs and meson.build
 | 
			
		||||
  * Updated the layout to provide more convenient and faster typing experience
 | 
			
		||||
 | 
			
		||||
 -- Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>  Sun, 10 Jan 2021 09:43:42 +0000
 | 
			
		||||
 | 
			
		||||
squeekboard (1.11.1) amber-phone; urgency=medium
 | 
			
		||||
 | 
			
		||||
  [ Mark Müller ]
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							@ -26,6 +26,7 @@ Build-Depends:
 | 
			
		||||
 librust-xkbcommon-0.4+wayland-dev (>= 0.4),
 | 
			
		||||
 libwayland-dev (>= 1.16),
 | 
			
		||||
 lsb-release,
 | 
			
		||||
 python3,
 | 
			
		||||
 rustc,
 | 
			
		||||
 wayland-protocols (>= 1.14),
 | 
			
		||||
Standards-Version: 4.1.3
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										21
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							@ -2,6 +2,27 @@
 | 
			
		||||
 | 
			
		||||
export CARGO_HOME = $(CURDIR)/debian/cargo
 | 
			
		||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 | 
			
		||||
# the below avoids an FTBFS on mips64el with a GOT > 64kb
 | 
			
		||||
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 | 
			
		||||
ifeq ($(DEB_HOST_ARCH),mips64el)
 | 
			
		||||
 export RUSTFLAGS = -Ctarget-feature=+xgot
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# the below avoids an FTBFS on mips64el with a GOT > 64kb
 | 
			
		||||
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 | 
			
		||||
ifeq ($(DEB_HOST_ARCH),mips64el)
 | 
			
		||||
 xgot = -Ctarget-feature=+xgot
 | 
			
		||||
else
 | 
			
		||||
 xgot = 
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# Don't use paths that may change between builds.
 | 
			
		||||
# No need to care about $HOME
 | 
			
		||||
# because Cargo will not place any source in ~/.cargo.
 | 
			
		||||
# The build directory is a subdirectory of the source directory,
 | 
			
		||||
# so it doesn't need to be explicitly taken care of.
 | 
			
		||||
export RUSTFLAGS = --remap-path-prefix=$(CURDIR)=/remap-pwd $(xgot)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
distrel := $(shell lsb_release --codename --short)
 | 
			
		||||
ifneq (,$(filter $(distrel),buster amber))
 | 
			
		||||
 | 
			
		||||
@ -179,7 +179,10 @@ Dependencies must be specified in `Cargo.toml` with 2 numbers: "major.minor". Si
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
cd build_dir
 | 
			
		||||
ninja build src/Cargo.toml
 | 
			
		||||
ninja ./Cargo.toml
 | 
			
		||||
sh /source_path/cargo.sh update
 | 
			
		||||
ninja test
 | 
			
		||||
cp ./Cargo.lock /source_path/
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Since version 1.9.3, `Cargo.lock` is not actually used by the build system, due to `Cargo.toml` being generated at every build.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										18
									
								
								meson.build
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								meson.build
									
									
									
									
									
								
							@ -1,7 +1,7 @@
 | 
			
		||||
project(
 | 
			
		||||
    'squeekboard',
 | 
			
		||||
    'c', 'rust',
 | 
			
		||||
    version: '1.10.0',
 | 
			
		||||
    version: '1.12.0',
 | 
			
		||||
    license: 'GPLv3',
 | 
			
		||||
    meson_version: '>=0.51.0',
 | 
			
		||||
    default_options: [
 | 
			
		||||
@ -23,12 +23,13 @@ add_project_arguments(
 | 
			
		||||
    '-Werror=parentheses',
 | 
			
		||||
    '-Wformat-nonliteral',
 | 
			
		||||
    '-Wformat-security',
 | 
			
		||||
    '-Wformat',
 | 
			
		||||
    '-Winit-self',
 | 
			
		||||
    '-Wmaybe-uninitialized',
 | 
			
		||||
    '-Wold-style-definition',
 | 
			
		||||
    '-Wredundant-decls',
 | 
			
		||||
    '-Wstrict-prototypes',
 | 
			
		||||
    '-Wunused-function',
 | 
			
		||||
    '-Wunused',
 | 
			
		||||
  ],
 | 
			
		||||
  language: 'c'
 | 
			
		||||
)
 | 
			
		||||
@ -40,6 +41,16 @@ conf_data = configuration_data()
 | 
			
		||||
if get_option('buildtype').startswith('debug')
 | 
			
		||||
    add_project_arguments('-DDEBUG=1', language : 'c')
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if get_option('strict')
 | 
			
		||||
    add_project_arguments(
 | 
			
		||||
        [
 | 
			
		||||
            '-Werror',
 | 
			
		||||
        ],
 | 
			
		||||
        language: 'c'
 | 
			
		||||
    )
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if get_option('buildtype') != 'plain'
 | 
			
		||||
    add_project_arguments('-fstack-protector-strong', language: 'c')
 | 
			
		||||
endif
 | 
			
		||||
@ -72,6 +83,7 @@ summary = [
 | 
			
		||||
message('\n'.join(summary))
 | 
			
		||||
 | 
			
		||||
# Rust deps are changing, depending on compile flags. Cargo can't handle it alone.
 | 
			
		||||
# As a side effect, Cargo.toml never gets used.
 | 
			
		||||
cargo_toml_in = files('Cargo.toml.in')
 | 
			
		||||
path_data = configuration_data()
 | 
			
		||||
path_data.set('path', meson.source_root())
 | 
			
		||||
@ -99,7 +111,7 @@ cargo_toml = custom_target(
 | 
			
		||||
 | 
			
		||||
dep_cargo = find_program('cargo')
 | 
			
		||||
cargo_script = find_program('cargo.sh')
 | 
			
		||||
cargo_build = find_program('cargo_build.sh')
 | 
			
		||||
cargo_build = find_program('cargo_build.py')
 | 
			
		||||
 | 
			
		||||
subdir('data')
 | 
			
		||||
subdir('protocols')
 | 
			
		||||
 | 
			
		||||
@ -10,3 +10,7 @@ option('tests',
 | 
			
		||||
option('legacy',
 | 
			
		||||
       type: 'boolean', value: false,
 | 
			
		||||
       description: 'Build with Deban Buster versions of dependencies')
 | 
			
		||||
 | 
			
		||||
option('strict',
 | 
			
		||||
       type: 'boolean', value: true,
 | 
			
		||||
       description: 'Turn more warnings into errors')
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										142
									
								
								src/data.rs
									
									
									
									
									
								
							
							
						
						
									
										142
									
								
								src/data.rs
									
									
									
									
									
								
							@ -97,6 +97,8 @@ impl fmt::Display for DataSource {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type LayoutSource = (ArrangementKind, DataSource);
 | 
			
		||||
 | 
			
		||||
/// Lists possible sources, with 0 as the most preferred one
 | 
			
		||||
/// Trying order: native lang of the right kind, native base,
 | 
			
		||||
/// fallback lang of the right kind, fallback base
 | 
			
		||||
@ -104,55 +106,76 @@ fn list_layout_sources(
 | 
			
		||||
    name: &str,
 | 
			
		||||
    kind: ArrangementKind,
 | 
			
		||||
    keyboards_path: Option<PathBuf>,
 | 
			
		||||
) -> Vec<(ArrangementKind, DataSource)> {
 | 
			
		||||
    let mut ret = Vec::new();
 | 
			
		||||
    {
 | 
			
		||||
        fn name_with_arrangement(name: String, kind: &ArrangementKind)
 | 
			
		||||
            -> String
 | 
			
		||||
        {
 | 
			
		||||
            match kind {    
 | 
			
		||||
                ArrangementKind::Base => name,
 | 
			
		||||
                ArrangementKind::Wide => name + "_wide",
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        let mut add_by_name = |name: &str, kind: &ArrangementKind| {
 | 
			
		||||
            if let Some(path) = keyboards_path.clone() {
 | 
			
		||||
                ret.push((
 | 
			
		||||
                    kind.clone(),
 | 
			
		||||
                    DataSource::File(
 | 
			
		||||
                        path.join(name.to_owned()).with_extension("yaml")
 | 
			
		||||
                    )
 | 
			
		||||
                ))
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
) -> Vec<LayoutSource> {
 | 
			
		||||
    // Just a simplification of often called code.
 | 
			
		||||
    let add_by_name = |
 | 
			
		||||
        mut ret: Vec<LayoutSource>,
 | 
			
		||||
        name: &str,
 | 
			
		||||
        kind: &ArrangementKind,
 | 
			
		||||
    | -> Vec<LayoutSource> {
 | 
			
		||||
        if let Some(path) = keyboards_path.clone() {
 | 
			
		||||
            ret.push((
 | 
			
		||||
                kind.clone(),
 | 
			
		||||
                DataSource::Resource(name.into())
 | 
			
		||||
            ));
 | 
			
		||||
        };
 | 
			
		||||
                DataSource::File(
 | 
			
		||||
                    path.join(name.to_owned()).with_extension("yaml")
 | 
			
		||||
                )
 | 
			
		||||
            ))
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        match &kind {
 | 
			
		||||
            ArrangementKind::Base => {},
 | 
			
		||||
        ret.push((
 | 
			
		||||
            kind.clone(),
 | 
			
		||||
            DataSource::Resource(name.into())
 | 
			
		||||
        ));
 | 
			
		||||
        ret
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    // Another grouping.
 | 
			
		||||
    let add_by_kind = |ret, name: &str, kind| {
 | 
			
		||||
        let ret = match kind {
 | 
			
		||||
            &ArrangementKind::Base => ret,
 | 
			
		||||
            kind => add_by_name(
 | 
			
		||||
                &name_with_arrangement(name.into(), &kind),
 | 
			
		||||
                &kind,
 | 
			
		||||
                ret,
 | 
			
		||||
                &name_with_arrangement(name.into(), kind),
 | 
			
		||||
                kind,
 | 
			
		||||
            ),
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        add_by_name(name, &ArrangementKind::Base);
 | 
			
		||||
        add_by_name(ret, name, &ArrangementKind::Base)
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
        match &kind {
 | 
			
		||||
            ArrangementKind::Base => {},
 | 
			
		||||
            kind => add_by_name(
 | 
			
		||||
                &name_with_arrangement(FALLBACK_LAYOUT_NAME.into(), &kind),
 | 
			
		||||
                &kind,
 | 
			
		||||
            ),
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        add_by_name(FALLBACK_LAYOUT_NAME, &ArrangementKind::Base);
 | 
			
		||||
    fn name_with_arrangement(name: String, kind: &ArrangementKind) -> String {
 | 
			
		||||
        match kind {    
 | 
			
		||||
            ArrangementKind::Base => name,
 | 
			
		||||
            ArrangementKind::Wide => name + "_wide",
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    ret
 | 
			
		||||
 | 
			
		||||
    let ret = Vec::new();
 | 
			
		||||
 | 
			
		||||
    // Name as given takes priority.
 | 
			
		||||
    let ret = add_by_kind(ret, name, &kind);
 | 
			
		||||
 | 
			
		||||
    // Then try non-alternative name if applicable (`us` for `us+colemak`).
 | 
			
		||||
    let ret = {
 | 
			
		||||
        let mut parts = name.splitn(2, '+');
 | 
			
		||||
        match parts.next() {
 | 
			
		||||
            Some(base) => {
 | 
			
		||||
                // The name is already equal to base, so it was already added.
 | 
			
		||||
                if base == name { ret }
 | 
			
		||||
                else {
 | 
			
		||||
                    add_by_kind(ret, base, &kind)
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            // The layout's base name starts with a "+". Weird but OK.
 | 
			
		||||
            None => {
 | 
			
		||||
                log_print!(logging::Level::Surprise, "Base layout name is empty: {}", name);
 | 
			
		||||
                ret
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    // No other choices left, so give anything.
 | 
			
		||||
    add_by_kind(ret, FALLBACK_LAYOUT_NAME.into(), &kind)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
fn load_layout_data(source: DataSource)
 | 
			
		||||
@ -746,13 +769,21 @@ mod tests {
 | 
			
		||||
 | 
			
		||||
    use ::logging::ProblemPanic;
 | 
			
		||||
 | 
			
		||||
    const THIS_FILE: &str = file!();
 | 
			
		||||
 | 
			
		||||
    fn path_from_root(file: &'static str) -> PathBuf {
 | 
			
		||||
        PathBuf::from(THIS_FILE)
 | 
			
		||||
            .parent().unwrap()
 | 
			
		||||
            .parent().unwrap()
 | 
			
		||||
            .join(file)
 | 
			
		||||
        let source_dir = env::var("SOURCE_DIR")
 | 
			
		||||
            .map(PathBuf::from)
 | 
			
		||||
            .unwrap_or_else(|e| {
 | 
			
		||||
                if let env::VarError::NotPresent = e {
 | 
			
		||||
                    let this_file = file!();
 | 
			
		||||
                    PathBuf::from(this_file)
 | 
			
		||||
                        .parent().unwrap()
 | 
			
		||||
                        .parent().unwrap()
 | 
			
		||||
                        .into()
 | 
			
		||||
                } else {
 | 
			
		||||
                    panic!("{:?}", e);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        source_dir.join(file)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[test]
 | 
			
		||||
@ -909,7 +940,26 @@ mod tests {
 | 
			
		||||
            )
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// If layout contains a "+", it should reach for what's in front of it too.
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn fallbacks_order_base() {
 | 
			
		||||
        let sources = list_layout_sources("nb+aliens", ArrangementKind::Base, None);
 | 
			
		||||
 | 
			
		||||
        assert_eq!(
 | 
			
		||||
            sources,
 | 
			
		||||
            vec!(
 | 
			
		||||
                (ArrangementKind::Base, DataSource::Resource("nb+aliens".into())),
 | 
			
		||||
                (ArrangementKind::Base, DataSource::Resource("nb".into())),
 | 
			
		||||
                (
 | 
			
		||||
                    ArrangementKind::Base,
 | 
			
		||||
                    DataSource::Resource(FALLBACK_LAYOUT_NAME.into())
 | 
			
		||||
                ),
 | 
			
		||||
            )
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn unicode_keysym() {
 | 
			
		||||
        let keysym = xkb::keysym_from_name(
 | 
			
		||||
 | 
			
		||||
@ -59,7 +59,7 @@ handle_set_visible(SmPuriOSK0 *object, GDBusMethodInvocation *invocation,
 | 
			
		||||
 | 
			
		||||
    if (service->context) {
 | 
			
		||||
        if (arg_visible) {
 | 
			
		||||
            server_context_service_show_keyboard (service->context);
 | 
			
		||||
            server_context_service_force_show_keyboard (service->context);
 | 
			
		||||
        } else {
 | 
			
		||||
            server_context_service_hide_keyboard (service->context);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -25,6 +25,7 @@ static const struct zwp_input_method_v2_listener input_method_listener = {
 | 
			
		||||
 | 
			
		||||
struct submission* get_submission(struct zwp_input_method_manager_v2 *immanager,
 | 
			
		||||
                                  struct zwp_virtual_keyboard_manager_v1 *vkmanager,
 | 
			
		||||
                                  struct vis_manager *vis_manager,
 | 
			
		||||
                                  struct wl_seat *seat,
 | 
			
		||||
                                  EekboardContextService *state) {
 | 
			
		||||
    struct zwp_input_method_v2 *im = NULL;
 | 
			
		||||
@ -35,7 +36,7 @@ struct submission* get_submission(struct zwp_input_method_manager_v2 *immanager,
 | 
			
		||||
    if (vkmanager) {
 | 
			
		||||
        vk = zwp_virtual_keyboard_manager_v1_create_virtual_keyboard(vkmanager, seat);
 | 
			
		||||
    }
 | 
			
		||||
    return submission_new(im, vk, state);
 | 
			
		||||
    return submission_new(im, vk, state, vis_manager);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Un-inlined
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,6 @@
 | 
			
		||||
use std::boxed::Box;
 | 
			
		||||
use std::ffi::CString;
 | 
			
		||||
use std::fmt;
 | 
			
		||||
use std::mem;
 | 
			
		||||
use std::num::Wrapping;
 | 
			
		||||
use std::string::String;
 | 
			
		||||
 | 
			
		||||
@ -24,7 +23,7 @@ pub mod c {
 | 
			
		||||
 | 
			
		||||
    use std::os::raw::{c_char, c_void};
 | 
			
		||||
 | 
			
		||||
    pub use ::submission::c::UIManager;
 | 
			
		||||
    pub use ::ui_manager::c::UIManager;
 | 
			
		||||
    pub use ::submission::c::StateManager;
 | 
			
		||||
 | 
			
		||||
    // The following defined in C
 | 
			
		||||
@ -42,8 +41,6 @@ pub mod c {
 | 
			
		||||
        pub fn eek_input_method_delete_surrounding_text(im: *mut InputMethod, before: u32, after: u32);
 | 
			
		||||
        pub fn eek_input_method_commit(im: *mut InputMethod, serial: u32);
 | 
			
		||||
        fn eekboard_context_service_set_hint_purpose(state: *const StateManager, hint: u32, purpose: u32);
 | 
			
		||||
        pub fn server_context_service_set_im_active(imservice: *const UIManager, active: u32);
 | 
			
		||||
        pub fn server_context_service_keyboard_release_visibility(imservice: *const UIManager);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    // The following defined in Rust. TODO: wrap naked pointers to Rust data inside RefCells to prevent multiple writers
 | 
			
		||||
@ -153,7 +150,7 @@ pub mod c {
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        if active_changed {
 | 
			
		||||
            imservice.apply_active_to_ui();
 | 
			
		||||
            (imservice.active_callback)(imservice.current.active);
 | 
			
		||||
            if imservice.current.active {
 | 
			
		||||
                unsafe {
 | 
			
		||||
                    eekboard_context_service_set_hint_purpose(
 | 
			
		||||
@ -179,9 +176,7 @@ pub mod c {
 | 
			
		||||
        // the keyboard is already decommissioned
 | 
			
		||||
        imservice.current.active = false;
 | 
			
		||||
 | 
			
		||||
        if let Some(ui) = imservice.ui_manager {
 | 
			
		||||
            unsafe { server_context_service_keyboard_release_visibility(ui); }
 | 
			
		||||
        }
 | 
			
		||||
        (imservice.active_callback)(imservice.current.active);
 | 
			
		||||
    }    
 | 
			
		||||
 | 
			
		||||
    // FIXME: destroy and deallocate
 | 
			
		||||
@ -334,8 +329,7 @@ pub struct IMService {
 | 
			
		||||
    pub im: *mut c::InputMethod,
 | 
			
		||||
    /// Unowned reference. Be careful, it's shared with C at large
 | 
			
		||||
    state_manager: *const c::StateManager,
 | 
			
		||||
    /// Unowned reference. Be careful, it's shared with C at large
 | 
			
		||||
    ui_manager: Option<*const c::UIManager>,
 | 
			
		||||
    active_callback: Box<dyn Fn(bool)>,
 | 
			
		||||
 | 
			
		||||
    pending: IMProtocolState,
 | 
			
		||||
    current: IMProtocolState, // turn current into an idiomatic representation?
 | 
			
		||||
@ -352,12 +346,13 @@ impl IMService {
 | 
			
		||||
    pub fn new(
 | 
			
		||||
        im: *mut c::InputMethod,
 | 
			
		||||
        state_manager: *const c::StateManager,
 | 
			
		||||
        active_callback: Box<dyn Fn(bool)>,
 | 
			
		||||
    ) -> Box<IMService> {
 | 
			
		||||
        // IMService will be referenced to by C,
 | 
			
		||||
        // so it needs to stay in the same place in memory via Box
 | 
			
		||||
        let imservice = Box::new(IMService {
 | 
			
		||||
            im,
 | 
			
		||||
            ui_manager: None,
 | 
			
		||||
            active_callback,
 | 
			
		||||
            state_manager,
 | 
			
		||||
            pending: IMProtocolState::default(),
 | 
			
		||||
            current: IMProtocolState::default(),
 | 
			
		||||
@ -373,26 +368,6 @@ impl IMService {
 | 
			
		||||
        imservice
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pub fn set_ui_manager(&mut self, mut ui_manager: Option<*const c::UIManager>) {
 | 
			
		||||
        mem::swap(&mut self.ui_manager, &mut ui_manager);
 | 
			
		||||
        // Now ui_manager is what was previously self.ui_manager.
 | 
			
		||||
        // If there wasn't any, we need to consider if UI was requested.
 | 
			
		||||
        if let None = ui_manager {
 | 
			
		||||
            self.apply_active_to_ui();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fn apply_active_to_ui(&self) {
 | 
			
		||||
        if let Some(ui) = self.ui_manager {
 | 
			
		||||
            unsafe {
 | 
			
		||||
                c::server_context_service_set_im_active(
 | 
			
		||||
                    ui,
 | 
			
		||||
                    self.is_active() as u32,
 | 
			
		||||
                );
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pub fn commit_string(&self, text: &CString) -> Result<(), SubmitError> {
 | 
			
		||||
        match self.current.active {
 | 
			
		||||
            true => {
 | 
			
		||||
 | 
			
		||||
@ -80,6 +80,7 @@ test(
 | 
			
		||||
    'rstest',
 | 
			
		||||
    cargo_script,
 | 
			
		||||
    args: ['test'] + cargo_build_flags,
 | 
			
		||||
    env: ['SOURCE_DIR=' + meson.source_root()],
 | 
			
		||||
    # this is a whole Carg-based test suite, let it run for a while
 | 
			
		||||
    timeout: 900,
 | 
			
		||||
    depends: [build_rstests, cargo_toml],
 | 
			
		||||
 | 
			
		||||
@ -10,33 +10,70 @@ use std::iter::FromIterator;
 | 
			
		||||
// TODO: keep a list of what is a language layout,
 | 
			
		||||
// and what a convenience layout. "_wide" is not a layout,
 | 
			
		||||
// neither is "number"
 | 
			
		||||
/// List of builtin layouts
 | 
			
		||||
const KEYBOARDS: &[(*const str, *const str)] = &[
 | 
			
		||||
    // layouts: us must be left as first, as it is the,
 | 
			
		||||
    // fallback layout. The others should be alphabetical.
 | 
			
		||||
    // fallback layout.
 | 
			
		||||
    ("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")),
 | 
			
		||||
 | 
			
		||||
    // Language layouts: keep alphabetical.
 | 
			
		||||
    ("be", include_str!("../data/keyboards/be.yaml")),
 | 
			
		||||
    ("be_wide", include_str!("../data/keyboards/be_wide.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("bg", include_str!("../data/keyboards/bg.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("br", include_str!("../data/keyboards/br.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("de", include_str!("../data/keyboards/de.yaml")),
 | 
			
		||||
    ("de_wide", include_str!("../data/keyboards/de_wide.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("cz", include_str!("../data/keyboards/cz.yaml")),
 | 
			
		||||
    ("cz_wide", include_str!("../data/keyboards/cz_wide.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("cz+qwerty", include_str!("../data/keyboards/cz+qwerty.yaml")),
 | 
			
		||||
    ("cz+qwerty_wide", include_str!("../data/keyboards/cz+qwerty_wide.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("dk", include_str!("../data/keyboards/dk.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("epo", include_str!("../data/keyboards/epo.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("es", include_str!("../data/keyboards/es.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("fi", include_str!("../data/keyboards/fi.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("fr", include_str!("../data/keyboards/fr.yaml")),
 | 
			
		||||
    ("fr_wide", include_str!("../data/keyboards/fr_wide.yaml")),
 | 
			
		||||
    ("it+fur", include_str!("../data/keyboards/it+fur.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("gr", include_str!("../data/keyboards/gr.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("ir", include_str!("../data/keyboards/ir.yaml")),
 | 
			
		||||
    ("ir_wide", include_str!("../data/keyboards/ir_wide.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("it", include_str!("../data/keyboards/it.yaml")),
 | 
			
		||||
    ("it+fur", include_str!("../data/keyboards/it+fur.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("jp+kana", include_str!("../data/keyboards/jp+kana.yaml")),
 | 
			
		||||
    ("jp+kana_wide", include_str!("../data/keyboards/jp+kana_wide.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("no", include_str!("../data/keyboards/no.yaml")),
 | 
			
		||||
    ("number", include_str!("../data/keyboards/number.yaml")),
 | 
			
		||||
 | 
			
		||||
    ("pl", include_str!("../data/keyboards/pl.yaml")),
 | 
			
		||||
    ("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")),
 | 
			
		||||
 | 
			
		||||
    ("us+colemak", include_str!("../data/keyboards/us+colemak.yaml")),
 | 
			
		||||
 | 
			
		||||
    // Others
 | 
			
		||||
    ("number", include_str!("../data/keyboards/number.yaml")),
 | 
			
		||||
 | 
			
		||||
    // layout+overlay
 | 
			
		||||
    ("terminal", include_str!("../data/keyboards/terminal.yaml")),
 | 
			
		||||
    ("terminal_wide", include_str!("../data/keyboards/terminal_wide.yaml")),
 | 
			
		||||
 | 
			
		||||
@ -43,10 +43,9 @@ struct _ServerContextService {
 | 
			
		||||
    struct submission *submission; // unowned
 | 
			
		||||
    struct squeek_layout_state *layout;
 | 
			
		||||
    struct ui_manager *manager; // unowned
 | 
			
		||||
    struct vis_manager *vis_manager; // owned
 | 
			
		||||
 | 
			
		||||
    gboolean visible;
 | 
			
		||||
    gboolean enabled;
 | 
			
		||||
    gboolean im_active;
 | 
			
		||||
    PhoshLayerSurface *window;
 | 
			
		||||
    GtkWidget *widget; // nullable
 | 
			
		||||
    guint hiding;
 | 
			
		||||
@ -240,6 +239,13 @@ server_context_service_real_show_keyboard (ServerContextService *self)
 | 
			
		||||
    gtk_widget_show (GTK_WIDGET(self->window));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static gboolean
 | 
			
		||||
show_keyboard_source_func(ServerContextService *context)
 | 
			
		||||
{
 | 
			
		||||
    server_context_service_real_show_keyboard(context);
 | 
			
		||||
    return G_SOURCE_REMOVE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
server_context_service_real_hide_keyboard (ServerContextService *self)
 | 
			
		||||
{
 | 
			
		||||
@ -247,6 +253,13 @@ server_context_service_real_hide_keyboard (ServerContextService *self)
 | 
			
		||||
    self->visible = FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static gboolean
 | 
			
		||||
hide_keyboard_source_func(ServerContextService *context)
 | 
			
		||||
{
 | 
			
		||||
    server_context_service_real_hide_keyboard(context);
 | 
			
		||||
    return G_SOURCE_REMOVE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static gboolean
 | 
			
		||||
on_hide (ServerContextService *self)
 | 
			
		||||
{
 | 
			
		||||
@ -256,7 +269,7 @@ on_hide (ServerContextService *self)
 | 
			
		||||
    return G_SOURCE_REMOVE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
server_context_service_show_keyboard (ServerContextService *self)
 | 
			
		||||
{
 | 
			
		||||
    g_return_if_fail (SERVER_IS_CONTEXT_SERVICE(self));
 | 
			
		||||
@ -267,17 +280,30 @@ server_context_service_show_keyboard (ServerContextService *self)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!self->visible) {
 | 
			
		||||
        server_context_service_real_show_keyboard (self);
 | 
			
		||||
        g_idle_add((GSourceFunc)show_keyboard_source_func, self);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
server_context_service_force_show_keyboard (ServerContextService *self)
 | 
			
		||||
{
 | 
			
		||||
    if (!submission_hint_available(self->submission)) {
 | 
			
		||||
        eekboard_context_service_set_hint_purpose(
 | 
			
		||||
            self->state,
 | 
			
		||||
            ZWP_TEXT_INPUT_V3_CONTENT_HINT_NONE,
 | 
			
		||||
            ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NORMAL
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
    server_context_service_show_keyboard(self);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
server_context_service_hide_keyboard (ServerContextService *self)
 | 
			
		||||
{
 | 
			
		||||
    g_return_if_fail (SERVER_IS_CONTEXT_SERVICE(self));
 | 
			
		||||
 | 
			
		||||
    if (self->visible) {
 | 
			
		||||
        server_context_service_real_hide_keyboard (self);
 | 
			
		||||
        g_idle_add((GSourceFunc)hide_keyboard_source_func, self);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -288,7 +314,7 @@ server_context_service_hide_keyboard (ServerContextService *self)
 | 
			
		||||
/// In this case, the user doesn't really need the keyboard surface
 | 
			
		||||
/// to disappear completely.
 | 
			
		||||
void
 | 
			
		||||
server_context_service_keyboard_release_visibility (ServerContextService *self)
 | 
			
		||||
server_context_service_release_visibility (ServerContextService *self)
 | 
			
		||||
{
 | 
			
		||||
    g_return_if_fail (SERVER_IS_CONTEXT_SERVICE(self));
 | 
			
		||||
 | 
			
		||||
@ -297,6 +323,13 @@ server_context_service_keyboard_release_visibility (ServerContextService *self)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
server_context_service_set_physical_keyboard_present (ServerContextService *self, gboolean physical_keyboard_present)
 | 
			
		||||
{
 | 
			
		||||
    g_return_if_fail (SERVER_IS_CONTEXT_SERVICE (self));
 | 
			
		||||
    squeek_visman_set_keyboard_present(self->vis_manager, physical_keyboard_present);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
server_context_service_set_property (GObject      *object,
 | 
			
		||||
                                     guint         prop_id,
 | 
			
		||||
@ -310,7 +343,7 @@ server_context_service_set_property (GObject      *object,
 | 
			
		||||
        self->visible = g_value_get_boolean (value);
 | 
			
		||||
        break;
 | 
			
		||||
    case PROP_ENABLED:
 | 
			
		||||
        server_context_service_set_enabled (self, g_value_get_boolean (value));
 | 
			
		||||
        server_context_service_set_physical_keyboard_present (self, !g_value_get_boolean (value));
 | 
			
		||||
        break;
 | 
			
		||||
    default:
 | 
			
		||||
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 | 
			
		||||
@ -385,12 +418,14 @@ server_context_service_class_init (ServerContextServiceClass *klass)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
server_context_service_init (ServerContextService *self) {
 | 
			
		||||
server_context_service_init (ServerContextService *self) {}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init (ServerContextService *self) {
 | 
			
		||||
    const char *schema_name = "org.gnome.desktop.a11y.applications";
 | 
			
		||||
    GSettingsSchemaSource *ssrc = g_settings_schema_source_get_default();
 | 
			
		||||
    g_autoptr(GSettingsSchema) schema = NULL;
 | 
			
		||||
 | 
			
		||||
    self->enabled = TRUE;
 | 
			
		||||
    if (!ssrc) {
 | 
			
		||||
        g_warning("No gsettings schemas installed.");
 | 
			
		||||
        return;
 | 
			
		||||
@ -407,37 +442,24 @@ server_context_service_init (ServerContextService *self) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ServerContextService *
 | 
			
		||||
server_context_service_new (EekboardContextService *self, struct submission *submission, struct squeek_layout_state *layout, struct ui_manager *uiman)
 | 
			
		||||
server_context_service_new (EekboardContextService *self, struct submission *submission, struct squeek_layout_state *layout, struct ui_manager *uiman, struct vis_manager *visman)
 | 
			
		||||
{
 | 
			
		||||
    ServerContextService *ui = g_object_new (SERVER_TYPE_CONTEXT_SERVICE, NULL);
 | 
			
		||||
    ui->submission = submission;
 | 
			
		||||
    ui->state = self;
 | 
			
		||||
    ui->layout = layout;
 | 
			
		||||
    ui->manager = uiman;
 | 
			
		||||
    ui->vis_manager = visman;
 | 
			
		||||
    init(ui);
 | 
			
		||||
    return ui;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
server_context_service_update_visible (ServerContextService *self, gboolean delay) {
 | 
			
		||||
    if (self->enabled && self->im_active) {
 | 
			
		||||
server_context_service_update_visible (ServerContextService *self, gboolean visible) {
 | 
			
		||||
    if (visible) {
 | 
			
		||||
        server_context_service_show_keyboard(self);
 | 
			
		||||
    } else if (delay) {
 | 
			
		||||
        server_context_service_keyboard_release_visibility(self);
 | 
			
		||||
    } else {
 | 
			
		||||
        server_context_service_hide_keyboard(self);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
server_context_service_set_enabled (ServerContextService *self, gboolean enabled)
 | 
			
		||||
{
 | 
			
		||||
    g_return_if_fail (SERVER_IS_CONTEXT_SERVICE (self));
 | 
			
		||||
    self->enabled = enabled;
 | 
			
		||||
    server_context_service_update_visible(self, FALSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
server_context_service_set_im_active(ServerContextService *self, uint32_t active) {
 | 
			
		||||
    self->im_active = active;
 | 
			
		||||
    server_context_service_update_visible(self, TRUE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -29,11 +29,10 @@ G_BEGIN_DECLS
 | 
			
		||||
/** Manages the lifecycle of the window displaying layouts. */
 | 
			
		||||
G_DECLARE_FINAL_TYPE (ServerContextService, server_context_service, SERVER, CONTEXT_SERVICE, GObject)
 | 
			
		||||
 | 
			
		||||
ServerContextService *server_context_service_new(EekboardContextService *self, struct submission *submission, struct squeek_layout_state *layout, struct ui_manager *uiman);
 | 
			
		||||
ServerContextService *server_context_service_new(EekboardContextService *self, struct submission *submission, struct squeek_layout_state *layout, struct ui_manager *uiman, struct vis_manager *visman);
 | 
			
		||||
enum squeek_arrangement_kind server_context_service_get_layout_type(ServerContextService *);
 | 
			
		||||
void server_context_service_show_keyboard (ServerContextService *self);
 | 
			
		||||
void server_context_service_force_show_keyboard (ServerContextService *self);
 | 
			
		||||
void server_context_service_hide_keyboard (ServerContextService *self);
 | 
			
		||||
void server_context_service_set_enabled (ServerContextService *self, gboolean enabled);
 | 
			
		||||
G_END_DECLS
 | 
			
		||||
#endif  /* SERVER_CONTEXT_SERVICE_H */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -277,8 +277,11 @@ main (int argc, char **argv)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    struct vis_manager *vis_manager = squeek_visman_new();
 | 
			
		||||
 | 
			
		||||
    instance.submission = get_submission(instance.wayland.input_method_manager,
 | 
			
		||||
                                         instance.wayland.virtual_keyboard_manager,
 | 
			
		||||
                                         vis_manager,
 | 
			
		||||
                                         instance.wayland.seat,
 | 
			
		||||
                                         instance.settings_context);
 | 
			
		||||
 | 
			
		||||
@ -288,15 +291,15 @@ main (int argc, char **argv)
 | 
			
		||||
                instance.settings_context,
 | 
			
		||||
                instance.submission,
 | 
			
		||||
                &instance.layout_choice,
 | 
			
		||||
                instance.ui_manager);
 | 
			
		||||
                instance.ui_manager,
 | 
			
		||||
                vis_manager);
 | 
			
		||||
    if (!ui_context) {
 | 
			
		||||
        g_error("Could not initialize GUI");
 | 
			
		||||
        exit(1);
 | 
			
		||||
    }
 | 
			
		||||
    instance.ui_context = ui_context;
 | 
			
		||||
    if (instance.submission) {
 | 
			
		||||
        submission_set_ui(instance.submission, instance.ui_context);
 | 
			
		||||
    }
 | 
			
		||||
    squeek_visman_set_ui(vis_manager, instance.ui_context);
 | 
			
		||||
 | 
			
		||||
    if (instance.dbus_handler) {
 | 
			
		||||
        dbus_handler_set_ui_context(instance.dbus_handler, instance.ui_context);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -4,17 +4,20 @@
 | 
			
		||||
#include "input-method-unstable-v2-client-protocol.h"
 | 
			
		||||
#include "virtual-keyboard-unstable-v1-client-protocol.h"
 | 
			
		||||
#include "eek/eek-types.h"
 | 
			
		||||
#include "src/ui_manager.h"
 | 
			
		||||
 | 
			
		||||
struct submission;
 | 
			
		||||
struct squeek_layout;
 | 
			
		||||
 | 
			
		||||
struct submission* get_submission(struct zwp_input_method_manager_v2 *immanager,
 | 
			
		||||
                                  struct zwp_virtual_keyboard_manager_v1 *vkmanager,
 | 
			
		||||
                                  struct vis_manager *vis_manager,
 | 
			
		||||
                                  struct wl_seat *seat,
 | 
			
		||||
                                  EekboardContextService *state);
 | 
			
		||||
 | 
			
		||||
// Defined in Rust
 | 
			
		||||
struct submission* submission_new(struct zwp_input_method_v2 *im, struct zwp_virtual_keyboard_v1 *vk, EekboardContextService *state);
 | 
			
		||||
struct submission* submission_new(struct zwp_input_method_v2 *im, struct zwp_virtual_keyboard_v1 *vk, EekboardContextService *state, struct vis_manager *vis_manager);
 | 
			
		||||
uint8_t submission_hint_available(struct submission *self);
 | 
			
		||||
void submission_set_ui(struct submission *self, ServerContextService *ui_context);
 | 
			
		||||
void submission_use_layout(struct submission *self, struct squeek_layout *layout, uint32_t time);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -24,6 +24,7 @@ use ::imservice;
 | 
			
		||||
use ::imservice::IMService;
 | 
			
		||||
use ::keyboard::{ KeyCode, KeyStateId, Modifiers, PressType };
 | 
			
		||||
use ::layout;
 | 
			
		||||
use ::ui_manager::VisibilityManager;
 | 
			
		||||
use ::util::vec_remove;
 | 
			
		||||
use ::vkeyboard;
 | 
			
		||||
use ::vkeyboard::VirtualKeyboard;
 | 
			
		||||
@ -38,14 +39,11 @@ pub mod c {
 | 
			
		||||
    use std::os::raw::c_void;
 | 
			
		||||
 | 
			
		||||
    use ::imservice::c::InputMethod;
 | 
			
		||||
    use ::util::c::Wrapped;
 | 
			
		||||
    use ::vkeyboard::c::ZwpVirtualKeyboardV1;
 | 
			
		||||
 | 
			
		||||
    // The following defined in C
 | 
			
		||||
 | 
			
		||||
    /// ServerContextService*
 | 
			
		||||
    #[repr(transparent)]
 | 
			
		||||
    pub struct UIManager(*const c_void);
 | 
			
		||||
 | 
			
		||||
    /// EekboardContextService*
 | 
			
		||||
    #[repr(transparent)]
 | 
			
		||||
    pub struct StateManager(*const c_void);
 | 
			
		||||
@ -55,12 +53,18 @@ pub mod c {
 | 
			
		||||
    fn submission_new(
 | 
			
		||||
        im: *mut InputMethod,
 | 
			
		||||
        vk: ZwpVirtualKeyboardV1,
 | 
			
		||||
        state_manager: *const StateManager
 | 
			
		||||
        state_manager: *const StateManager,
 | 
			
		||||
        visibility_manager: Wrapped<VisibilityManager>,
 | 
			
		||||
    ) -> *mut Submission {
 | 
			
		||||
        let imservice = if im.is_null() {
 | 
			
		||||
            None
 | 
			
		||||
        } else {
 | 
			
		||||
            Some(IMService::new(im, state_manager))
 | 
			
		||||
            let visibility_manager = visibility_manager.clone_ref();
 | 
			
		||||
            Some(IMService::new(
 | 
			
		||||
                im,
 | 
			
		||||
                state_manager,
 | 
			
		||||
                Box::new(move |active| visibility_manager.borrow_mut().set_im_active(active)),
 | 
			
		||||
            ))
 | 
			
		||||
        };
 | 
			
		||||
        // TODO: add vkeyboard too
 | 
			
		||||
        Box::<Submission>::into_raw(Box::new(
 | 
			
		||||
@ -75,23 +79,6 @@ pub mod c {
 | 
			
		||||
        ))
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Use to initialize the UI reference
 | 
			
		||||
    #[no_mangle]
 | 
			
		||||
    pub extern "C"
 | 
			
		||||
    fn submission_set_ui(submission: *mut Submission, ui_manager: *const UIManager) {
 | 
			
		||||
        if submission.is_null() {
 | 
			
		||||
            panic!("Null submission pointer");
 | 
			
		||||
        }
 | 
			
		||||
        let submission: &mut Submission = unsafe { &mut *submission };
 | 
			
		||||
        if let Some(ref mut imservice) = &mut submission.imservice {
 | 
			
		||||
            imservice.set_ui_manager(if ui_manager.is_null() {
 | 
			
		||||
                None
 | 
			
		||||
            } else {
 | 
			
		||||
                Some(ui_manager)
 | 
			
		||||
            })
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[no_mangle]
 | 
			
		||||
    pub extern "C"
 | 
			
		||||
    fn submission_use_layout(
 | 
			
		||||
@ -106,6 +93,18 @@ pub mod c {
 | 
			
		||||
        let layout = unsafe { &*layout };
 | 
			
		||||
        submission.use_layout(layout, Timestamp(time));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[no_mangle]
 | 
			
		||||
    pub extern "C"
 | 
			
		||||
    fn submission_hint_available(submission: *mut Submission) -> u8 {
 | 
			
		||||
        if submission.is_null() {
 | 
			
		||||
            panic!("Null submission pointer");
 | 
			
		||||
        }
 | 
			
		||||
        let submission: &mut Submission = unsafe { &mut *submission };
 | 
			
		||||
        let active = submission.imservice.as_ref()
 | 
			
		||||
            .map(|imservice| imservice.is_active());
 | 
			
		||||
        (Some(true) == active) as u8
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[derive(Clone, Copy)]
 | 
			
		||||
 | 
			
		||||
@ -3,6 +3,7 @@
 | 
			
		||||
 | 
			
		||||
#include <inttypes.h>
 | 
			
		||||
 | 
			
		||||
#include "eek/eek-types.h"
 | 
			
		||||
#include "outputs.h"
 | 
			
		||||
 | 
			
		||||
struct ui_manager;
 | 
			
		||||
@ -11,4 +12,9 @@ struct ui_manager *squeek_uiman_new(void);
 | 
			
		||||
void squeek_uiman_set_output(struct ui_manager *uiman, struct squeek_output_handle output);
 | 
			
		||||
uint32_t squeek_uiman_get_perceptual_height(struct ui_manager *uiman);
 | 
			
		||||
 | 
			
		||||
struct vis_manager;
 | 
			
		||||
 | 
			
		||||
struct vis_manager *squeek_visman_new(void);
 | 
			
		||||
void squeek_visman_set_ui(struct vis_manager *visman, ServerContextService *ui_context);
 | 
			
		||||
void squeek_visman_set_keyboard_present(struct vis_manager *visman, uint32_t keyboard_present);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -10,9 +10,49 @@
 | 
			
		||||
use std::cmp::min;
 | 
			
		||||
use ::outputs::c::OutputHandle;
 | 
			
		||||
 | 
			
		||||
mod c {
 | 
			
		||||
pub mod c {
 | 
			
		||||
    use super::*;
 | 
			
		||||
    use std::os::raw::c_void;
 | 
			
		||||
    use ::util::c::Wrapped;
 | 
			
		||||
    
 | 
			
		||||
    /// ServerContextService*
 | 
			
		||||
    #[repr(transparent)]
 | 
			
		||||
    pub struct UIManager(*const c_void);
 | 
			
		||||
 | 
			
		||||
    #[no_mangle]
 | 
			
		||||
    extern "C" {
 | 
			
		||||
        pub fn server_context_service_update_visible(imservice: *const UIManager, active: u32);
 | 
			
		||||
        pub fn server_context_service_release_visibility(imservice: *const UIManager);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[no_mangle]
 | 
			
		||||
    pub extern "C"
 | 
			
		||||
    fn squeek_visman_new() -> Wrapped<VisibilityManager> {
 | 
			
		||||
        Wrapped::new(VisibilityManager {
 | 
			
		||||
            ui_manager: None,
 | 
			
		||||
            visibility_state: VisibilityFactors {
 | 
			
		||||
                im_active: false,
 | 
			
		||||
                physical_keyboard_present: false,
 | 
			
		||||
            }
 | 
			
		||||
        })
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    /// Use to initialize the UI reference
 | 
			
		||||
    #[no_mangle]
 | 
			
		||||
    pub extern "C"
 | 
			
		||||
    fn squeek_visman_set_ui(visman: Wrapped<VisibilityManager>, ui_manager: *const UIManager) {
 | 
			
		||||
        let visman = visman.clone_ref();
 | 
			
		||||
        let mut visman = visman.borrow_mut();
 | 
			
		||||
        visman.set_ui_manager(Some(ui_manager))
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[no_mangle]
 | 
			
		||||
    pub extern "C"
 | 
			
		||||
    fn squeek_visman_set_keyboard_present(visman: Wrapped<VisibilityManager>, present: u32) {
 | 
			
		||||
        let visman = visman.clone_ref();
 | 
			
		||||
        let mut visman = visman.borrow_mut();
 | 
			
		||||
        visman.set_keyboard_present(present != 0)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[no_mangle]
 | 
			
		||||
    pub extern "C"
 | 
			
		||||
@ -79,3 +119,131 @@ impl Manager {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[derive(PartialEq, Debug)]
 | 
			
		||||
enum Visibility {
 | 
			
		||||
    Hidden,
 | 
			
		||||
    Visible,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[derive(Debug)]
 | 
			
		||||
enum VisibilityTransition {
 | 
			
		||||
    /// Hide immediately
 | 
			
		||||
    Hide,
 | 
			
		||||
    /// Hide if no show request comes soon
 | 
			
		||||
    Release,
 | 
			
		||||
    /// Show instantly
 | 
			
		||||
    Show,
 | 
			
		||||
    /// Don't do anything
 | 
			
		||||
    NoTransition,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Contains visibility policy
 | 
			
		||||
#[derive(Clone, Debug)]
 | 
			
		||||
struct VisibilityFactors {
 | 
			
		||||
    im_active: bool,
 | 
			
		||||
    physical_keyboard_present: bool,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl VisibilityFactors {
 | 
			
		||||
    /// Static policy.
 | 
			
		||||
    /// Use when transitioning from an undefined state (e.g. no UI before).
 | 
			
		||||
    fn desired(&self) -> Visibility {
 | 
			
		||||
        match self {
 | 
			
		||||
            VisibilityFactors {
 | 
			
		||||
                im_active: true,
 | 
			
		||||
                physical_keyboard_present: false,
 | 
			
		||||
            } => Visibility::Visible,
 | 
			
		||||
            _ => Visibility::Hidden,
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    /// Stateful policy
 | 
			
		||||
    fn transition_to(&self, next: &Self) -> VisibilityTransition {
 | 
			
		||||
        use self::Visibility::*;
 | 
			
		||||
        let im_deactivation = self.im_active && !next.im_active;
 | 
			
		||||
        match (self.desired(), next.desired(), im_deactivation) {
 | 
			
		||||
            (Visible, Hidden, true) => VisibilityTransition::Release,
 | 
			
		||||
            (Visible, Hidden, _) => VisibilityTransition::Hide,
 | 
			
		||||
            (Hidden, Visible, _) => VisibilityTransition::Show,
 | 
			
		||||
            _ => VisibilityTransition::NoTransition,
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Temporary struct for migration. Should be integrated with Manager eventually.
 | 
			
		||||
pub struct VisibilityManager {
 | 
			
		||||
    /// Owned reference. Be careful, it's shared with C at large
 | 
			
		||||
    ui_manager: Option<*const c::UIManager>,
 | 
			
		||||
    visibility_state: VisibilityFactors,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl VisibilityManager {
 | 
			
		||||
    fn set_ui_manager(&mut self, ui_manager: Option<*const c::UIManager>) {
 | 
			
		||||
        let new = VisibilityManager {
 | 
			
		||||
            ui_manager,
 | 
			
		||||
            ..unsafe { self.clone() }
 | 
			
		||||
        };
 | 
			
		||||
        self.apply_changes(new);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fn apply_changes(&mut self, new: Self) {
 | 
			
		||||
        if let Some(ui) = &new.ui_manager {
 | 
			
		||||
            if self.ui_manager.is_none() {
 | 
			
		||||
                // Previous state was never applied, so effectively undefined.
 | 
			
		||||
                // Just apply the new one.
 | 
			
		||||
                let new_state = new.visibility_state.desired();
 | 
			
		||||
                unsafe {
 | 
			
		||||
                    c::server_context_service_update_visible(
 | 
			
		||||
                        *ui,
 | 
			
		||||
                        (new_state == Visibility::Visible) as u32,
 | 
			
		||||
                    );
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                match self.visibility_state.transition_to(&new.visibility_state) {
 | 
			
		||||
                    VisibilityTransition::Hide => unsafe {
 | 
			
		||||
                        c::server_context_service_update_visible(*ui, 0);
 | 
			
		||||
                    },
 | 
			
		||||
                    VisibilityTransition::Show => unsafe {
 | 
			
		||||
                        c::server_context_service_update_visible(*ui, 1);
 | 
			
		||||
                    },
 | 
			
		||||
                    VisibilityTransition::Release => unsafe {
 | 
			
		||||
                        c::server_context_service_release_visibility(*ui);
 | 
			
		||||
                    },
 | 
			
		||||
                    VisibilityTransition::NoTransition => {}
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        *self = new;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pub fn set_im_active(&mut self, im_active: bool) {
 | 
			
		||||
        let new = VisibilityManager {
 | 
			
		||||
            visibility_state: VisibilityFactors {
 | 
			
		||||
                im_active,
 | 
			
		||||
                ..self.visibility_state.clone()
 | 
			
		||||
            },
 | 
			
		||||
            ..unsafe { self.clone() }
 | 
			
		||||
        };
 | 
			
		||||
        self.apply_changes(new);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pub fn set_keyboard_present(&mut self, keyboard_present: bool) {
 | 
			
		||||
        let new = VisibilityManager {
 | 
			
		||||
            visibility_state: VisibilityFactors {
 | 
			
		||||
                physical_keyboard_present: keyboard_present,
 | 
			
		||||
                ..self.visibility_state.clone()
 | 
			
		||||
            },
 | 
			
		||||
            ..unsafe { self.clone() }
 | 
			
		||||
        };
 | 
			
		||||
        self.apply_changes(new);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// The struct is not really safe to clone due to the ui_manager reference.
 | 
			
		||||
    /// This is only a helper for getting desired visibility.
 | 
			
		||||
    unsafe fn clone(&self) -> Self {
 | 
			
		||||
        VisibilityManager {
 | 
			
		||||
            ui_manager: self.ui_manager.clone(),
 | 
			
		||||
            visibility_state: self.visibility_state.clone(),
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -46,41 +46,68 @@ endforeach
 | 
			
		||||
 | 
			
		||||
# The layout test is in the examples directory
 | 
			
		||||
# due to the way Cargo builds executables
 | 
			
		||||
# and the need to call it manually
 | 
			
		||||
# and the need to call it manually.
 | 
			
		||||
 | 
			
		||||
# This is the list of tested builtin layouts.
 | 
			
		||||
# Please keep each block alphabetical!
 | 
			
		||||
# Please keep shapes (with _) on the same line,
 | 
			
		||||
# variants (with +) on separate lines.
 | 
			
		||||
foreach layout : [
 | 
			
		||||
    # This is the fallback layout,
 | 
			
		||||
    # so stays first to make sure it never goes missing.
 | 
			
		||||
    'us', 'us_wide',
 | 
			
		||||
    'br',
 | 
			
		||||
 | 
			
		||||
    # Block: Languages
 | 
			
		||||
    'be', 'be_wide',
 | 
			
		||||
    'bg',
 | 
			
		||||
    'br',
 | 
			
		||||
    'cz', 'cz_wide',
 | 
			
		||||
    'cz+qwerty', 'cz+qwerty_wide',
 | 
			
		||||
    'de', 'de_wide',
 | 
			
		||||
    'dk',
 | 
			
		||||
    'epo',
 | 
			
		||||
    'es',
 | 
			
		||||
    'fi',
 | 
			
		||||
    'fr', 'fr_wide',
 | 
			
		||||
    'it+fur',
 | 
			
		||||
    'gr',
 | 
			
		||||
    'ir',
 | 
			
		||||
    'it',
 | 
			
		||||
    'it+fur',
 | 
			
		||||
    'jp+kana','jp+kana_wide',
 | 
			
		||||
    'no',
 | 
			
		||||
    'number',
 | 
			
		||||
    'pl', 'pl_wide',
 | 
			
		||||
    'ru',
 | 
			
		||||
    'se',
 | 
			
		||||
    'th',
 | 
			
		||||
    'ua',
 | 
			
		||||
    'terminal', 'terminal_wide',
 | 
			
		||||
    'us+colemak',
 | 
			
		||||
 | 
			
		||||
    # Block: Not languages.
 | 
			
		||||
    'emoji',
 | 
			
		||||
    'number',
 | 
			
		||||
    'terminal', 'terminal_wide',
 | 
			
		||||
]
 | 
			
		||||
    extra = []
 | 
			
		||||
    if layout == 'emoji'
 | 
			
		||||
        extra += ['allow_missing_return']
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    # Older Cargo seens to be sensitive to something
 | 
			
		||||
    # about the RUST_FLAGS env var, and rebuilds all tests when it's set,
 | 
			
		||||
    # increasing test time by 2 orders of magnitude.
 | 
			
		||||
    # Let it have its way.
 | 
			
		||||
    if get_option('legacy') == true
 | 
			
		||||
        timeout = 300
 | 
			
		||||
    else
 | 
			
		||||
        timeout = 30
 | 
			
		||||
    endif
 | 
			
		||||
    test(
 | 
			
		||||
        'test_layout_' + layout,
 | 
			
		||||
        cargo_script,
 | 
			
		||||
        args: ['run'] + cargo_build_flags
 | 
			
		||||
            + ['--example', 'test_layout', '--', layout]
 | 
			
		||||
            + extra,
 | 
			
		||||
        timeout: timeout,
 | 
			
		||||
        workdir: meson.build_root(),
 | 
			
		||||
    )
 | 
			
		||||
endforeach
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user