How can i assign functions to mouse buttons ?

Is it possible add  function to mouse button?.

For eg: Ctrl+MB=Pan

Thanks