summaryrefslogtreecommitdiffstats
path: root/meta-agl-ic-container/recipes-demo/momikey/files/momikey.sh
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-05-07 08:22:51 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-05-09 08:13:10 +0900
commit211ddbdf4143da9509c8c747485bc87b2ab49ba9 (patch)
tree7933879f4445f585fe2509319265f756fb5539c4 /meta-agl-ic-container/recipes-demo/momikey/files/momikey.sh
parent8b34a041b3d5599ec83dad23cfeea3ad39160db3 (diff)
Add CH57x keyboard based UI for container demo
Container exchange user interface using CH57x keyboard. This UI based on mock container manager for AGL CES2023 demo. That is contributed by Hiroyuki Ishii <ishii.hiroyuki002@jp.panasonic.com> Bug-AGL: SPEC-4766 Change-Id: I3654bb0fd22787c66af554db71fc3adb82440702 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Diffstat (limited to 'meta-agl-ic-container/recipes-demo/momikey/files/momikey.sh')
-rw-r--r--meta-agl-ic-container/recipes-demo/momikey/files/momikey.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/meta-agl-ic-container/recipes-demo/momikey/files/momikey.sh b/meta-agl-ic-container/recipes-demo/momikey/files/momikey.sh
new file mode 100644
index 00000000..d0e0b0b6
--- /dev/null
+++ b/meta-agl-ic-container/recipes-demo/momikey/files/momikey.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+while sleep 1 ;do evtest /dev/input/by-id/usb-wch.cn_CH57x-event-kbd ;done | while read line; do
+ unset key target_container
+ [[ "$line" =~ \((KEY_.)\),\ value\ 1 ]] && key="${BASH_REMATCH[1]}"
+ case "$key" in
+ KEY_G)
+ cmcontrol --change-active-guest-name=agl-flutter-ivi-demo
+ cmcontrol --shutdown-guest-role=ivi
+ ;;
+ KEY_D)
+ cmcontrol --change-active-guest-name=agl-qt-ivi-demo
+ cmcontrol --shutdown-guest-role=ivi
+ ;;
+ KEY_A)
+ cmcontrol --change-active-guest-name=agl-momi-ivi-demo
+ cmcontrol --shutdown-guest-role=ivi
+ ;;
+ KEY_H)
+ cmcontrol --change-active-guest-name=agl-html5-ivi-demo
+ cmcontrol --shutdown-guest-role=ivi
+ ;;
+ KEY_C)
+ cmcontrol --force-reboot-guest-role=ivi
+ ;;
+ esac
+done