Select or Deselect All - can't get it to work with default Blender controls?

Hi, I am trying to make it so that I can clear my entire selection by clicking on empty space (as is default in 3Dsmax preset).

So, I tried copying all the controls for the view3d.select_or_deselect_all function, from the max preset, to the Blender one, and disabled the default Activate/Select function.

It works until I try to use shift to select multiple vertices. Then, clicking on an empty space to deselect stops working. Not sure what I’m doing wrong and why it won’t work, it should be simple.

But basically, I want to use the default Blender controls, just with the 3DsMax way of selecting things.

Thanks

Under 3d View / 3D View (Global)


With factory default setting and just this added clicking on an empty space deselects all vertices even after shift selecting multiple vertices

Thanks, that seems to work fine.