How do i control Leonardo with other arduino boards?

what i want to do is simple: use arduino host to tell Leonardo to mouse click/keyboard stroke, my project does not deal with physical buttons to use Leonardo to act as HID device, my project DEALS with controlling Leonardo with commands from a host (another arduino) can this be done?

Sure, you just need to decide how the 2 Arduinos will communicate with each other, there are several options. One important consideration is the distance over which you need to communicate. But I think first you should explain why you think you need two Arduinos. Why can't you just do everything on the Leonardo?

pert:
Sure, you just need to decide how the 2 Arduinos will communicate with each other, there are several options. One important consideration is the distance over which you need to communicate. But I think first you should explain why you think you need two Arduinos. Why can't you just do everything on the Leonardo?

Here's why: I currently own 2 boards: intel galileo gen 2, arduino leonardo, from what im used to, my gen 2 can mount an SD card and operate on an OS, with this capability i can send commands to my gen 2 from Putty.exe and make gen2 activate my arduino projects, however, with the leonardo, i dont know how to send commands to let it know to activate certain projects, from my experience, leonardo only uploads 1 project at a time... or so it seems, what should i do?

Well I do remember a recent thread talking about using an SD card bootloader like GitHub - zevero/avr_boot: Arduino Bootloader to Flash from SD Card so that the Arduino could load itself with different programs but I can't find it for some reason and that would probably require some small changes to the bootloader to make that work so that might be beyond the scope of your project.

I can understand your reasoning for wanting to use the Leonardo to provide the Galileo with keyboard and mouse emulation. So if the two boards are going to be close together it might be easiest to use serial communication. If you only need to communicate one way then you should only have to connect the Galileo tx(transmit) pin to the Leonardo rx(receive) pin and then connect Galileo GND to Leonardo GND. Then you can use serial between the two just as you would with the Arduino and the Serial Monitor. You can see some examples in File > Examples > 04. Communication.