I have a captivate with a broken power button and it was driving me nuts for the last 2 months since I couldnot wake up the phone if it went to lock screen. I tried no lock and other apps but they didnt work 100% of the time. Today I found this thread :
It is button remapper utility but it doesnot support captivate yet. However my only concern was to remap my volume buttons to power button.
This is how I did it :
Firstly, we'll need to pull the file that controls the buttons which is entitled "aries-keypad.kl" in "system/usr/keylayout".
To pull the file, connect your captivate and run:
adb pull system/usr/keylayout/aries-keypad.kl aries-keypad.kl
key 115 POWER WAKE
key 114 POWER WAKE
key 102 HOME WAKE_DROPPED
key 116 POWER WAKE
After you're done with your edits, you'll need to save the file properly (NO .txt files!), and then you'll have to push it back to the phone.
adb push aries-keypad.kl /system/usr/keylayout
Simple and Effective!
For more info, look at threads :