# - acquire wakelock for a specfied timeout
[EventAction]
-Name=BTKEY_SHORT
+Name=PWKEY_SHORT
Enum=1000
-Keycode=bluetooth
+Keycode=power
DetectionRangeMsec=0,2000
TriggerType=edge
ActionBroadcast=yes
-WakeLockDurationSec=5
[EventAction]
-Name=BTKEY_LONG
+Name=PWKEY_CHECKPOINT_LONG
Enum=1001
-Keycode=bluetooth
-DetectionRangeMsec=2000,7000
-TriggerType=edge
-ActionBroadcast=yes
-
-[EventAction]
-Name=PWKEY_SHORT
-Enum=1002
Keycode=power
-DetectionRangeMsec=0,2000
-TriggerType=edge
+DetectionRangeMsec=2000,-1
+TriggerType=level
ActionBroadcast=yes
[EventAction]
Name=PWKEY_LONG
-Enum=1003
+Enum=1002
Keycode=power
DetectionRangeMsec=2000,7000
TriggerType=edge
ActionChangeState=sleep,normal
[EventAction]
+Name=PWKEY_CHECKPOINT_LONGEST
+Enum=1003
+Keycode=power
+DetectionRangeMsec=7000,-1
+TriggerType=level
+ActionBroadcast=yes
+
+[EventAction]
Name=PWKEY_LONGEST
Enum=1004
Keycode=power
ActionChangeState=normal,poweroff
[EventAction]
-Name=BTKEY_CHECKPOINT_LONG
+Name=BTKEY_SHORT
Enum=1005
Keycode=bluetooth
-DetectionRangeMsec=2000,-1
-TriggerType=level
+DetectionRangeMsec=0,2000
+TriggerType=edge
ActionBroadcast=yes
+WakeLockDurationSec=5
[EventAction]
-Name=PWKEY_CHECKPOINT_LONG
+Name=BTKEY_CHECKPOINT_LONG
Enum=1006
-Keycode=power
+Keycode=bluetooth
DetectionRangeMsec=2000,-1
TriggerType=level
ActionBroadcast=yes
[EventAction]
-Name=PWKEY_CHECKPOINT_LONGEST
+Name=BTKEY_LONG
Enum=1007
-Keycode=power
-DetectionRangeMsec=7000,-1
-TriggerType=level
+Keycode=bluetooth
+DetectionRangeMsec=2000,7000
+TriggerType=edge
ActionBroadcast=yes