From 750ac44ddbac46babedeadae439ab8de2999e57e Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Wed, 15 Jun 2022 14:28:17 +0900 Subject: [PATCH] Reconfigure input for iot-headless Change-Id: I035784568172ce7d8367f26361460d136b7d9c32 Signed-off-by: Youngjae Cho --- conf/battery.conf | 2 ++ conf/input-profile-iot-headless.conf | 57 +++++++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 14 deletions(-) diff --git a/conf/battery.conf b/conf/battery.conf index 1bd6a2c..d854e14 100644 --- a/conf/battery.conf +++ b/conf/battery.conf @@ -18,6 +18,8 @@ ChargerWakeLockEnabled=yes # - define action for the event # ActionBroadcast=yes # - broadcast upon occuring the event +# WakeLockDurationSec= +# - acquire wakelock for a specfied timeout [EventAction] Name=CHARGER_CONNECTED diff --git a/conf/input-profile-iot-headless.conf b/conf/input-profile-iot-headless.conf index c422d64..a2c0284 100644 --- a/conf/input-profile-iot-headless.conf +++ b/conf/input-profile-iot-headless.conf @@ -14,9 +14,11 @@ # - Broadcast upon occuring an event, default no. # ActionChangeState=current,next # - define state transition action for the event. +# WakeLockDurationSec= +# - acquire wakelock for a specfied timeout [EventAction] -Name=BLINKKEY_EDGE +Name=BTKEY_SHORT Enum=1000 Keycode=bluetooth DetectionRangeMsec=0,2000 @@ -25,35 +27,62 @@ ActionBroadcast=yes WakeLockDurationSec=5 [EventAction] -Name=SHORTKEY_LEVEL +Name=BTKEY_LONG Enum=1001 -Keycode=power -DetectionRangeMsec=2000,-1 -TriggerType=level +Keycode=bluetooth +DetectionRangeMsec=2000,7000 +TriggerType=edge ActionBroadcast=yes [EventAction] -Name=SHORTKEY_EDGE +Name=PWKEY_SHORT Enum=1002 Keycode=power -DetectionRangeMsec=2000,7000 +DetectionRangeMsec=0,2000 TriggerType=edge -ActionChangeState=normal,sleep -ActionChangeState=sleep,normal +ActionBroadcast=yes [EventAction] -Name=LONGKEY_LEVEL +Name=PWKEY_LONG Enum=1003 Keycode=power -DetectionRangeMsec=7000,-1 -TriggerType=level -ActionBroadcast=yes +DetectionRangeMsec=2000,7000 +TriggerType=edge +ActionChangeState=normal,sleep +ActionChangeState=sleep,normal [EventAction] -Name=LONGKEY_EDGE +Name=PWKEY_LONGEST Enum=1004 Keycode=power DetectionRangeMsec=7000,-1 TriggerType=edge ConditionVconf=memory/sysman/charger_status,int,0 ActionChangeState=normal,poweroff + +# This doesn't trigger any action. +# It is just for logging that bluetooth key has been pressed for 2000ms +[EventAction] +Name=BTKEY_CHECKPOINT_LONG +Enum=1005 +Keycode=bluetooth +DetectionRangeMsec=2000,-1 +TriggerType=level + +# This doesn't trigger any action. +# It is just for logging that powerkey has been pressed for 2000ms +[EventAction] +Name=PWKEY_CHECKPOINT_LONG +Enum=1006 +Keycode=power +DetectionRangeMsec=2000,-1 +TriggerType=level + +# Powerkey has been pressed for 7000ms +# It is just for logging that powerkey has been pressed for 7000ms +[EventAction] +Name=PWKEY_CHECKPOINT_LONGEST +Enum=1007 +Keycode=power +DetectionRangeMsec=7000,-1 +TriggerType=level -- 2.7.4