I am currently trying to listen for when the power button is pressed. Ultimately I would like to have some code run when the power button is pressed twice, to check whether
AFAIK, it's not possible for Power key.
Power
You might want to refer to this answer: http://groups.google.com/group/android-developers/browse_thread/thread/a4db4def1bdaa8d9