If you prefer for your Galaxy S II not to wake when the home button is pressed, take a look at this tweak. XDA forum member paalkr got annoyed by the fact that the device was almost always turned on when pulling the SGSII out of his pocket.
The solution is to simply tweak the key system/usr/keylayout/sec_key.kl to prevent wake on home button press. Additionally, the XDA member has enabled support for the HTC headset buttons (coming from an HTC device). The headset has one button and a 3.5mm extension jack. The solution here was to simply edit the system/usr/keylayout/sec_jack.kl so that the GSII responds to the headset key press.
For more detailed information, head on over to the original forum thread.___________________