apple keyboard volume buttons

is there a way to recognize the volume up/down/mute presses as normal buttons?
I want a script triggered when pressing the buttons