Since I run XBMC as a program, and not standalone, I would just like it to exit when I click the power button. The default behavior is to show the shutdown menu, and I don't want to accidently shut down my computer.
Remap the Power button on the home screen to quit xbmc instead of showing the shutdown menu:
In this file you need to replace the line (in my case line 1067, see bottom of the post on how to quickly open the file at that position)
Now if you click the power button in XBMC it should just exit, without showing a menu.
Alternatives / Notes
Instead of doing the above (simply quiting, not showing the shutdown menu) you can also edit the shutdown menu instead. The menu itself is in
changing this to
should hide it from the menu. You can do the same trick for suspend, reboot, etc.
This still doesn't prevent shutting down from the webinterface I think,
If only I knew how to set
Extra: Commands to quickly open the file at the right position (1067,33)