For anyone coming in the future I figured out the solution.
you wan to use
KeyMapping.click(Minecraft.getInstance().options.keyAttack.getKey());
to simulate initial click and if you want to hold down left click afterward just do
KeyMapping.click(Minecraft.getInstance().options.keyAttack.getKey());
Minecraft.getInstance().options.keyAttack.setDown(true);
and you can switch KeyAttack for other keys