#!/sbin/sh
export PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
while :; do
  KEY=`busybox hexdump -x -n 48 /dev/input/event0 | busybox head -n 2 | busybox tail -n 1 | busybox awk '{print $6,$7,$8}'`
  case "$KEY" in
    "0001 0066 0001")
      busybox touch /.pressed_home
    ;;
    "0001 009e 0001")
      busybox touch /.pressed_prev
    ;;
    "0001 008b 0001")
      busybox touch /.pressed_menu
    ;;
  esac
done
