Help with mouse input and output?

MorganS:
How often do you accidentally press any button? I don't think that is a constraint on your design.

Yes a normal foot pedal will be fast enough. Test it by getting a second mouse and putting it on the floor. Tape it down so it doesn't slide. (tape over the optical sensor on the bottom so it can't detect any movement.) It won't have the rapid fire feature but you can test if you like having a pedal.

weird_dave:
This might be easier
https://www.amazon.co.uk/gp/product/B008MU0TBU/
If you map the fire button to a key, map the footpedal to that key, job's almost there. 555 timer in the foot pedal to make it autofire when pressed (you could use the Due as a 555, but then you may as well just buy a basic foot switch and hook it up to the arduino anyway).

Yeah now testing it I understand that I will be quick enough. I have never had a foot pedal though so I don't know if they work like this though but since I will be needing to activate it quickly and frequently on and off I would like to be able to rest my foot against it while it's not in use. If you try holding your foot mid air for like more than even 20 seconds your calf begins to get tired real quick.

@weird_dave Yeah I don't really want to do that solution though because I want to be able to have the code sent via mouseclick from the Arduino. That way I can customize the code and be able to send it like I want. All I want to do is while the foot pedal is held the Arduino clicks, which is quite easy in terms of software but I really don't know how to do that hardware wise. I know that it is a simple setup both hardware and software but I don't know how to connect the Arduino to the pedal, I know I need to access the wires but I don't know where or how to plug them into the Arduino.

I found this: http://www.instructables.com/id/Arduino-foot-pedal-PTT-switch/

This is exactly the same thing I need but I need the mouse click code instead of sending a key, which I know is quite easy to change but hardware wise I don't get a few things.

How is the pedal getting power?

Can I use any pedal for this? If so what is the best pedal to use for my use?