In the first version of the IDE that was released there were examples called USB-Keyboard, and USB-Mouse. I tried to get these examples to work, but they would not even compile.
These examples (along with others that were not working) have been removed from the IDE in the latest version.
I tried to get them to compile with the latest release of the IDE, and they still did not compile. I do not recall what the error was.
I do not think anyone has ever gotten this to work on Galileo.
If you want to see what the examples look like you can look here:
Arduino - KeyboardAndMouseControl
In theory, the linked example should work on Galileo, but I have not tried it.