diff options
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.sh | 27 |
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 |