Here is a methode to remap the hard keys functions as you want, I've done it for HD2 devices in this thread http://forum.xda-developers.com/show....php?t=1114737 but it's exactly the same thing for other HTC devices under WP7 and surely can be adapted for other devices like LG and Samsung.
First to know, there is a list of a function but there isn't a way to affect a long press or double press for now, it don't work like this. (but there is surely a way I won't search since it's good for me now)
For exemple When you long press Search (home button on hd2) you obtain Speech recogntition. If you affect Search to another key you'll obtain too Speech recognition when you'll long press this key.
Second, camera (green on hd2) and power (red on hd2) hard keys run under screen off, it's not the function, So if you wan't a function not run under screen off, just use the template in which it's on another hard key.
To achieve that you have to edit the dll keybdpdd_htc.dll you can find in your ROM (in IMGFS/OEM) section (there are equivalents for aother devices as HTC).
To decompress a rom and rebuild use the package I've post in my thread for HD2.
Don't take it from another rom since it hasn't the same location place in memory or you should have to relocate it.
In this module, edit the file S001, in which you can find this part:
On the right in red you can find the functions.
RC_PLAY is the bluetooth function so Play/pause on press, Skip on double press, Answer when receive a call and End call when in call, Quickly call a contact by speech recognition on long press.
RC_UP and RC_DOWN are bluetooth volume but are usually not used by HTC as it use only VOL_UP and VOL_DOWN
CAMSTEP_1 is autofocus and CAMSTEP_2 is camera launcher/shot
SEARCH is search when press and Full speech recognition on long press.
Just after each serie of FF FF FF FF in yellow, you can find a number.
So you can easily find that for exemple that 74 correspond to the function RC_PLAY
At top in blue you can find attribuated functions in the dll for launching actions. It's a serie starting at 00 00 and finishing at 0B 00. For each item there is the associated function.
So starting of the Hard keys we have and the functions we already know we can easily deduce this mapping:
Bluetooth Play | 00 | 74 | RC_PLAY
Bluetooth Vol_up | 01 | 75 | VOL_UP
Bluetooth Vol_Down | 02 | 76 | VOL_DOWN
Power | 03 | 81 | POWER
Camera short press | 04 | 83 | CAMSTEP_1
Camera full press | 05 | 82 | CAMSTEP_2
Volume up | 06 | 75 | VOL_UP
Volume down | 07 | 76 | VOL_DOWN
| 08 | 7F | TOGGLE
Windows | 09 | 5B | START
Search | 0A | 7C | SEARCH
Back | 0B | 1B | BACK
So if you want for exemple the function RC_PLAY instead of the Camera hard key you just have to change 05 00 82 by 05 00 74 in the blue section.
Save and rebuild your rom, you've got it.