Mobile: Use power button to run a server action

How can I change the power button of a phone to run a server action or to press the default button (one only) on the screen?

Hi

As far as I know, that is not possible.

Regards,

Daniel