How to activate/deactive SHIFT and Middle Mouse

I want to select multiple frames (e.g 1 to 25) on the timeslider with the help of the SHIFT key and the middle mouse button. How can this be done from MEL?

Thank you.