summaryrefslogtreecommitdiff
path: root/meta/packages/matchbox-keyboard/files/80matchboxkeyboard
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/matchbox-keyboard/files/80matchboxkeyboard')
-rwxr-xr-xmeta/packages/matchbox-keyboard/files/80matchboxkeyboard23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/packages/matchbox-keyboard/files/80matchboxkeyboard b/meta/packages/matchbox-keyboard/files/80matchboxkeyboard
new file mode 100755
index 000000000..60d9ff0e5
--- /dev/null
+++ b/meta/packages/matchbox-keyboard/files/80matchboxkeyboard
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+. /etc/formfactor/config
+
+CMD=""
+
+if [ "$DISPLAY_CAN_ROTATE" = "1" ]; then
+ if [ "$HAVE_KEYBOARD_PORTRAIT" = "1" -a "$HAVE_KEYBOARD_LANDSCAPE" = "0" ]; then
+ CMD="matchbox-keyboard -d -o landscape"
+ elif [ "$HAVE_KEYBOARD_LANDSCAPE" = "1" -a "$HAVE_KEYBOARD_PORTRAIT" = "0" ]; then
+ CMD="matchbox-keyboard -d -o portrait"
+ fi
+elif [ "$HAVE_KEYBOARD" = "1" ]; then
+ # Have a physical keyboard, nothing to do
+ exit
+fi
+
+# Delay to make sure the window manager is active
+
+if [ "$CMD" ]; then
+ (sleep 2 && $CMD) &
+fi
+