diff options
author | Daniel Drake <dsd@laptop.org> | 2012-10-14 17:55:01 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2012-10-14 17:55:01 (GMT) |
commit | 5022236a8a6bdb5ce26527753f9a08a91a0b8d20 (patch) | |
tree | c90e07f531b45879aad48ed7e9241022a0ea6cb4 | |
parent | dfac2306e70405c61eecee9477a2fdb9d3beefd6 (diff) |
osk: add languages configuration option (#12166)
-rw-r--r-- | modules/osk/README | 8 | ||||
-rw-r--r-- | modules/osk/kspost.50.osk-config.sh | 20 |
2 files changed, 28 insertions, 0 deletions
diff --git a/modules/osk/README b/modules/osk/README index a6b3f76..d1054b3 100644 --- a/modules/osk/README +++ b/modules/osk/README @@ -1 +1,9 @@ Include this module in your build if you want to enable the on-screen keyboard. + +The keyboard language can be changed with a horizontal swipe on the +touchscreen. By default, this scrolls through a long list of languages. +If you wish to configure this list to just cycle through a few keyboard +of relevance to your deployment, use the 'languages' option, e.g.: + +[osk] +languages=en_gb,de,es diff --git a/modules/osk/kspost.50.osk-config.sh b/modules/osk/kspost.50.osk-config.sh new file mode 100644 index 0000000..a3780a2 --- /dev/null +++ b/modules/osk/kspost.50.osk-config.sh @@ -0,0 +1,20 @@ +# Copyright (C) 2010 One Laptop Per Child +# Licensed under the terms of the GNU GPL v2 or later; see COPYING for details. + +. $OOB__shlib + +langs=$(read_config osk languages) + +[ -z "$langs" ] && exit 0 + +oIFS=$IFS +IFS=$'\n\t, ' +for lang in $langs; do + output+=", libmaliit-keyboard-plugin.so:${lang}" +done +IFS=$oIFS + +output="${output:2}" +echo 'mkdir -p /etc/xdg/maliit.org' +echo 'echo "[maliit]" > /etc/xdg/maliit.org/server.conf' +echo "echo 'onscreen\\enabled=${output}' >> /etc/xdg/maliit.org/server.conf" |