#38 Power Button

open
nobody
5
2009-04-24
2009-04-24
Anonymous
No

It would be cool to see the power button mapped to turn the system off. to do this, you could have the button press invoke an apple script that shuts down the computer. Example Script:
tell application "Finder" to shut down
The pitfall:Once the computer is shut down, you can't power it on with a bluetooth device (at least not to my knowledge)
Another cool thing you could do is map the power button to invoke a script to make the computer go to sleep like the following:
tell application "Finder" to sleep

Then, you could have the program wake the computer if the button is pressed again.
Note: you would have to allow bluetooth devices to wake the computer (this setting is found in system prefs under bluetooth-> advanced)

Discussion