To have one input, regardless of whether it's a keypress or a mouse click, "follow" another, you can employ a loop:
Hold left mouse button down
Start Loop While : Keyboard Key 'Tab' Is Pressed
End Loop
Release left mouse button
Alternatively, you can use two separate commands: One where the "When I press keys" "Shortcut is invoked only when all keys are released" option is unchecked, containing the action that presses the mouse button, and another that does have the "Shortcut is invoked only when all keys are released" checked, which would release the mouse button.