
The middle mouse button code (the complicated part) was created by erikjanp for the shade windows patch, which means that almost every line of this code was made by him.
Right now the behaviour is to close tools if there's a tool active, which lefts open the possibility of allowing it to do other things under different conditions. Do you think this behaviour for the middle button is consistent enough?. Is there any problem with using the middle button (besides that this feature can't be used in platforms without this button)?.