Unlikely with official API ... wouldn't allow you to change the use of standard buttons like those. It would be against their overall concept and desired UX.
If possible when jail broken I don't know ...
Its specifically mentioned in guidelines that you cant use certain buttons for any other function.
(even if you find a way to do it), and the volume buttons are included.