# Match the special power key input/event
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="axp81x-supplyer", TAG+="power-switch"
# Match the touchpad and special/blue Fn-keys
# Also matches the normal keyboard but it fires no power-switch relevant events
ACTION=="add", SUBSYSTEM=="input", ATTRS{idVendor}=="258a", ATTRS{idProduct}=="000c", TAG+="power-switch"
# Match the lid/hall sensor
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="hall", TAG+="power-switch"
Gist
Copied here for convenience.