Detect mac control click in project tree

This is for #3924.