Jump to content

Hoe to detect the On/Off button on a laptop computer?


pixi
 Share

Recommended Posts

Hi Andreas,

Interesting question. Unfortunately I don't have a good answer, but maybe some ideas you could work on?

As the Power button ain't a regular keyboard key I doubt you will find a regular HotKey solution. If I was to explore this I would try to figure out if I could detect any windows message corresponding to shutdown or suspend from the OS. I would also explore if any of the PowerManagement API's could be hooked or used. maybe you could get some ideas in this topic?

Best wishes for your quest..:)

Link to comment
Share on other sites

when y say that u give me a idea :-)

in the power manager i can chose what i want to to if i press the button hibernate,standby,"ask me what to to"

if i chose "ask me what to do" a windows will appear, and my be detect that window.

i write a scrips and se if it works, i come back if it works

Thanks

/Andreas

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...