I wrote this script to mimic Pro Tools region/time range selection, thus it toggles with defer script.
By default, mouse modifier
Shift + double click for media item is
Set time selection to item. But it only create time selection from last selected media item.
If you want to create time selection from all selected items, there is native action for that. Find the following action
Code:
Time selection: Set time selection to items (40290)
and assign it to Media item context mouse modifier (Shift + Double click, or whatever you wish).